diff --git a/gtkcairo-0.3/AUTHORS b/gtkcairo-0.3/AUTHORS new file mode 100644 index 00000000..56c5c5d0 --- /dev/null +++ b/gtkcairo-0.3/AUTHORS @@ -0,0 +1,4 @@ +Carl Worth +Evan Martin +Øyvind Kolås +David Reveman diff --git a/gtkcairo-0.3/COPYING b/gtkcairo-0.3/COPYING new file mode 100644 index 00000000..b124cf58 --- /dev/null +++ b/gtkcairo-0.3/COPYING @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/gtkcairo-0.3/ChangeLog b/gtkcairo-0.3/ChangeLog new file mode 100644 index 00000000..ea12682e --- /dev/null +++ b/gtkcairo-0.3/ChangeLog @@ -0,0 +1,218 @@ +2005-10-08 Carl Worth + + Port to latest glitz (thanks to sunmoon1997 ) + + * configure.in: Require glitz 0.5.0 or newer. + + * gtkcairo/gdkcairo.c: (gdkcairo_realize), + (gdkcairo_size_allocate): Track glitz API changes. + +2005-08-06 Bertram Felgenhauer + + * README: added note about cairo support in upcoming GTK+. + +2005-08-02 Bertram Felgenhauer + + * configure.in: bump cairo requirements + + * tests/demo.c (paint): replace deprecated functions. + + * gtkcairo/gtkcairo.c (gtk_cairo_expose): don't save cairo's state + here. + (gtk_cairo_set_gdk_color): replace deprecated function. + + * gtkcairo/gdkcairo.c: change to use new cairo_create() semantics + (gdkcairo_destroy): free glitz_surface if it was allocated + (gdkcairo_size_allocate): make a temporary reference to glitz_surface + to prevent it from being freed. + (gdkcairo_expose): (xlib backend) use actual drawable width and height + for the X11 surface, create new cairo state for every expose. + (gdkcairo_expose): (glitz backend) save cairo's state. + +2005-04-08 Dave Beckett + + * autogen.sh: Use LIBTOOLIZE_FLAGS + + * autogen.sh: Allow libtoolize, aclocal, autoheader, automake and + autoconf to be overridden. Keep the defaults the same. + +2005-04-01 Carl Worth + + * README: Remove invalid whitespace from export examples. + +2005-03-30 Øyvind Kolås + + * gtkcairo/gdkcairo.c: include cairo-xlib header, and string.h for + strcmp to silence compile time errors. + +2005-02-22 David Reveman + + * gtkcairo/gdkcairo.c (gdkcairo_expose): Don't change the default + color when clearing background of GL surface. + +2005-01-25 David Reveman + + * configure.in: Require glitz-glx >= 0.4.0. + + * gtkcairo/gdkcairo.c (gdkcairo_size_allocate): Track changes to glitz. + +2005-01-20 Carl Worth + + * gtkcairo/gdkcairo.c: Add mising includes for stdio.h and + stdlib.h. + +2004-12-11 Øyvind Kolås + + * README: rewrote, removed authors, since almost all that information + is available in AUTHORS. + +2004-12-11 Øyvind Kolås + + * */*.[ch]: transformed to GNU coding style. + +2004-11-14 David Reveman + + * gtkcairo/gdkcairo.c (gdkcairo_size_allocate): Don't destroy drawable. + (gdkcairo_expose): Flush surface even though drawable is double + buffered. + +2004-11-12 David Reveman + + * tests/Makefile.am (AM_CFLAGS): Added -I$(top_srcdir)/gtkcairo, + so that demo compiles without gtkcairo already installed. + + * gtkcairo/gdkcairo.c: Better glitz backend support. + Environment variable GTKCAIRO_GL_DOUBLEBUFFER specifies if a + double buffered visual should be chosen and GTKCAIRO_GL_SAMPLES + specifies if a multi-sample visual should be chosen. + + * configure.in: Require glitz-glx >= 0.3.0. + Made it default to compile with glitz support again. + +2004-11-11 Øyvind Kolås + + * tests/demo.c: remove unused variable. + +2004-11-11 Øyvind Kolås + + * configure.in: default to not compiling with glitz support (since it + is bitrotted.) + +2004-09-21 Øyvind Kolås + + * configure.in, gtkcairo/gdkcairo.[ch]: Committed changes from + David Reveman , to bring the gl backend back + in sync with glitz API. + +2004-08-24 Øyvind Kolås + + * configure.in: incremented version to 0.3 + +2004-08-09 Øyvind Kolås + + * gtkcairo/*.[ch], COPYING: Changed license to gtk+ to harmonize with gtk+ + and cairo. + * AUTHORS, ChangeLog: utf8'ified my name + +2004-06-29 Øyvind Kolås + + * gtkcairo/g[td]kcairo.[ch]: Renamed redraw signal to paint + +2004-06-26 Øyvind Kolås + + * gtkcairo/gtkcairo.c: Added a save/restore pair around the expose + +2004-06-20 Øyvind Kolås + + * gtkcairo/gtkcairo.c: Added a non public function to query whether + the glitz backend is used. Need to figure out + a better API for this. + +2004-05-24 Øyvind Kolås + + * configure.in: made glitz-glx usage autodetected + * gtkcairo/gdkcairo.[ch]: USE_GL define instead of CAIRO_HAS_... + +2004-05-20 Øyvind Kolås + + * gdkcairo/gdkcairo.[ch]: started working on smarter virtualization of + backend, by moving all cairo touching parts out into a single file. + * gdkcairo/Makefile.am: added above + * README: New section about backend selection. + +2004-05-20 David Reveman + + * configure.in: Require glitz-glx >= 0.1.3. + + * gtkcairo/gtkcairo.c (gtk_cairo_expose): Use + glitz_surface_swap_buffers instead of glitz_surface_flush. + +Thu, 13 May 2004 23:33:46 +0100 Øyvind Kolås + + * README: Gave some minimal hints about usage, added information about + GTKCAIRO_GL variable + +Thu, 13 May 2004 23:33:46 +0100 Øyvind Kolås + + * gtkcairo/gtkcairo.[ch]: Added gtk_cairo_set_gdk_color convenience + function, added logic for using GTKCAIRO_GL enviroment variable to + toggle usage of glitz for rendering when compiled with a cairo library + supporting it. + +Tue, 20 Apr 2004 14:48:20 +0100 Øyvind Kolås + + Paper for guadec was accepted, work needs to be done brushing up + gtkcairo before writing the paper, api changes first. + + * doc/guadec_abstract_draft.txt: The original abstrast + +Mon, 23 Feb 2004 00:45:03 +0100 Øyvind Kolås + + * gtkcairo.c: Fix double free during destruction of GtkCairo instance + +Sat, 21 Feb 2004 00:07:00 +0100 Øyvind Kolås + + * gtkcairo.c, gtkcairo.h: Cosmetic cleanup + +Sun, 15 Feb 2004 18:35:00 +0100 Øyvind Kolås + + * gtkcairo.c: intitial preparations for gl backend + +Sat, 14 Feb 2004 18:00:00 +0100 Øyvind Kolås + + Changes needed to be able to derive new widgets from gtkcairo + * gtkcairo.c, gtkcairo.h: Move instance and class struct to header file. + +Thu, 12 Feb 2004 18:51:57 +0100 Øyvind Kolås + + Removed cairo-xlib.h include, added gtk_style_attach (), + widget now defaults to the current themes, default background + color. + + Compensate for offsets in expose handler. + + * gtkcairo.c: See above, Cosmetic changes. + * demo.c: Change color of box to red for better contrast against bg. + +Fri, 21 Nov 2003 11:18:06 -0800 Evan Martin + + * gtkcairo.c, gtkcairo.h: Add a "redraw" signal. + +Wed, 19 Nov 2003 10:57:38 -0800 Evan Martin + + Merged local copy with the version Carl checked into CVS: + * gtkcairo.c, gtkcairo.h: Cosmetic changes. + * demo.c: Work with different sizes of windows. + +Tue, 04 Nov 2003 22:08:32 -0800 Evan Martin + + * Initial announcement. + +Salvaged from original COPYING file, prior to license change: + +GtkCairo is Copyright © 2003 Evan Martin + +Based on code from grrobot: + +grrobot is Copyright © 2003 Carl Worth + diff --git a/gtkcairo-0.3/Makefile.am b/gtkcairo-0.3/Makefile.am new file mode 100644 index 00000000..99a61f74 --- /dev/null +++ b/gtkcairo-0.3/Makefile.am @@ -0,0 +1,9 @@ +AUTOMAKE_OPTIONS=dist-bzip2 + +SUBDIRS = gtkcairo tests + +EXTRA_DIST = gtkcairo.pc.in COPYING + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = gtkcairo.pc + diff --git a/gtkcairo-0.3/NEWS b/gtkcairo-0.3/NEWS new file mode 100644 index 00000000..3cf8b2b3 --- /dev/null +++ b/gtkcairo-0.3/NEWS @@ -0,0 +1 @@ +See the ChangeLog. diff --git a/gtkcairo-0.3/README b/gtkcairo-0.3/README new file mode 100644 index 00000000..aa066f44 --- /dev/null +++ b/gtkcairo-0.3/README @@ -0,0 +1,74 @@ +GtkCairo +======== + +GtkCairo is an extension of GtkWidget that can paint itself using the +cairo api using a few backends (xlib w/Render acceleration, and glitz +w/open gl acceleration). + +NOTE: GTK+ 2.7+ supports creating cairo contexts for GDK drawables, +making GtkCairo obsolete; see gdk_drawable_get_cairo(). +GtkCairo can still be used as a convenient interface to cairo for +earlier GTK+ versions. + +Synopsis +======== + +GtkWidget *gtk_cairo_new (void); +cairo_t *gtk_cairo_get_cairo (GtkCairo *gtkcairo); + +Signal prototypes +================= + +"paint" + void user_function (GtkWidget *widget, + cairo_t *cr, + gpointer user_data) + +Object Hierarchy +================ + +GObject ++---GtkObject + +----GtkWidget + +----GtkCairo + +Usage +===== + +Hook up to the widgets "paint" signal with your custom drawing code, +queue redraw of the widget using gtk_widget_queue_draw (widget); + +The interesting bits are the operations you can perform on the Cairo +surface, the documentation of which is outside the scope of GtkCairo. + +To use GtkCairo in your code, add the package "gtkcairo" to the list +of packages you pull in via pkg-config. + +Backend selection +================= + +GtkCairo should choose a reasonable cairo backend by default, at the +moment this means the xlib backend since it provides AA at all times, +setting the backend can be done through the enviroment variable + +export GTKCAIRO_BACKEND=gl +export GTKCAIRO_BACKEND=xlib +export GTKCAIRO_BACKEND=image (not implemented yet) + +before starting an application. + +Todo +==== + +* Make it possible to switch backend on the fly using a property, +* Implement the image backend, probably using gdkpixbuf. + +Dependencies +============ + +GtkCairo depends on the obvious two: + - GTK 2: http://www.gtk.org + - Cairo: http://www.cairographics.org + + +vim: tw=70 diff --git a/gtkcairo-0.3/autogen.sh b/gtkcairo-0.3/autogen.sh new file mode 100755 index 00000000..677be62c --- /dev/null +++ b/gtkcairo-0.3/autogen.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +set -e + +ARGV0=$0 + +LIBTOOLIZE=${LIBTOOLIZE-libtoolize} +LIBTOOLIZE_FLAGS="--copy --force" +ACLOCAL=${ACLOCAL-aclocal} +AUTOHEADER=${AUTOHEADER-autoheader} +AUTOMAKE=${AUTOMAKE-automake} +AUTOMAKE_FLAGS="--add-missing" +AUTOCONF=${AUTOCONF-autoconf} + + +if test -z "$ACLOCAL_FLAGS"; then + acdir=`$ACLOCAL --print-ac-dir` + if [ ! -f $acdir/pkg.m4 ]; then + echo "$ARGV0: Error: Could not find pkg-config macros." + echo " (Looked in $acdir/pkg.m4)" + echo " If pkg.m4 is available in /another/directory, please set" + echo " ACLOCAL_FLAGS=\"-I /another/directory\"" + echo " Otherwise, please install pkg-config." + echo "" + echo "pkg-config is available from:" + echo "http://www.freedesktop.org/software/pkgconfig/" + exit 1 + fi +fi + +if test -z "$*"; then + echo "$ARGV0: Note: \`./configure' will be run with no arguments." + echo " If you wish to pass any to it, please specify them on the" + echo " \`$0' command line." + echo +fi + +do_cmd() { + echo "$ARGV0: running \`$@'" + $@ +} + +do_cmd $LIBTOOLIZE ${LIBTOOLIZE_FLAGS} + +do_cmd $ACLOCAL ${ACLOCAL_FLAGS} + +do_cmd $AUTOHEADER + +do_cmd $AUTOMAKE --add-missing + +do_cmd $AUTOCONF + +do_cmd ./configure --enable-maintainer-mode ${1+"$@"} && echo "Now type \`make' to compile" || exit 1 diff --git a/gtkcairo-0.3/configure.in b/gtkcairo-0.3/configure.in new file mode 100644 index 00000000..44f77668 --- /dev/null +++ b/gtkcairo-0.3/configure.in @@ -0,0 +1,67 @@ +AC_INIT(gtkcairo/gtkcairo.h) + +dnl =========================================================================== + +# Package version number, (as distinct from shared library version) +GTKCAIRO_VERSION=0.3 + +# libtool shared library version + +# Increment if the interface has additions, changes, removals. +LT_CURRENT=2 + +# Increment any time the source changes; set to +# 0 if you increment CURRENT +LT_REVISION=1 + +# Increment if any interfaces have been added; set to 0 +# if any interfaces have been removed. removal has +# precedence over adding, so set to 0 if both happened. +LT_AGE=0 + +VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE" +AC_SUBST(VERSION_INFO) + +dnl =========================================================================== + +AM_INIT_AUTOMAKE(gtkcairo, $GTKCAIRO_VERSION, [dist-bzip2]) +AM_CONFIG_HEADER(config.h) + +AM_MAINTAINER_MODE + +AC_PROG_CC +AC_PROG_CPP +AM_PROG_LIBTOOL +AC_STDC_HEADERS + +dnl =========================================================================== + +AC_PATH_XTRA + +dnl =========================================================================== +PKG_CHECK_MODULES(GTKCAIRO, gtk+-2.0 cairo >= 0.6.0) +AC_SUBST(GTKCAIRO_CFLAGS) +AC_SUBST(GTKCAIRO_LIBS) + +dnl =========================================================================== + +AC_ARG_ENABLE(gl, + [ --enable-gl Enable OpenGL support (glitz)], + [use_gl=$enableval], [use_gl=yes]) + +if test "x$use_gl" = "xyes"; then + PKG_CHECK_MODULES(GL, glitz-glx >= 0.5.0, [ + GTKCAIRO_CFLAGS="$GTKCAIRO_CFLAGS $GL_CFLAGS -DUSE_GL" + GTKCAIRO_LIBS="$GTKCAIRO_LIBS $GL_LIBS" + use_gl=yes], [use_gl="no (bitrotted at the moment)"]) +fi + +dnl =========================================================================== + +AC_OUTPUT([ +gtkcairo.pc +Makefile +gtkcairo/Makefile +tests/Makefile +]) + diff --git a/gtkcairo-0.3/doc/guadec_abstract_draft.txt b/gtkcairo-0.3/doc/guadec_abstract_draft.txt new file mode 100644 index 00000000..ca7a8669 --- /dev/null +++ b/gtkcairo-0.3/doc/guadec_abstract_draft.txt @@ -0,0 +1,19 @@ +Draft for abstract for guadec 2004, kristiansand norway. + +Title: Custom GtkWidgets using GtkCairo + +Abstract: + +Cairo is a vector graphics library with cross-device output support. There are +plans for basing either the next generation, gtk+ or gnome canvas on cairo. One +of the existing prototypes gtk+/Cairo integration is GtkCairo. + +In this talk, I'll give an introduction to programming with Cairo's imaging +model, focusing specially on issues relating to integration with gtk+, and +deriving GtkWidgets using GtkCairo, maintaing a consistent look and feel with +the rest of the gtk+ widget set. During the presentation I will demonstrate code +and usage of both simple and advanced GtkCairo widgets. + +How cairo eventually will be integrated with gtk+/gnome in the future isn't quite +sure yet, but Cairo's base API won't change, thus code created using GtkCairo; will +easily be adopted to future interfaces. diff --git a/gtkcairo-0.3/gtkcairo.pc.in b/gtkcairo-0.3/gtkcairo.pc.in new file mode 100644 index 00000000..e6ae4fb5 --- /dev/null +++ b/gtkcairo-0.3/gtkcairo.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: gtkcairo +Description: Gtk wrapper for Cairo +Version: @VERSION@ + +Requires: cairo gtk+-2.0 +Libs: -L${libdir} -lgtkcairo +Cflags: -I${includedir} + diff --git a/gtkcairo-0.3/gtkcairo/CVS/Entries b/gtkcairo-0.3/gtkcairo/CVS/Entries new file mode 100644 index 00000000..0aa15a1a --- /dev/null +++ b/gtkcairo-0.3/gtkcairo/CVS/Entries @@ -0,0 +1,7 @@ +/.cvsignore/1.1/Mon Oct 11 16:42:57 2004// +/Makefile.am/1.2/Thu May 20 18:41:16 2004// +/gdkcairo.c/1.16/Sun Oct 9 02:38:04 2005// +/gdkcairo.h/1.10/Sat Dec 11 16:04:42 2004// +/gtkcairo.c/1.19/Sun Aug 7 22:57:09 2005// +/gtkcairo.h/1.11/Sat Dec 11 16:04:42 2004// +D diff --git a/gtkcairo-0.3/gtkcairo/CVS/Repository b/gtkcairo-0.3/gtkcairo/CVS/Repository new file mode 100644 index 00000000..8b3be1a6 --- /dev/null +++ b/gtkcairo-0.3/gtkcairo/CVS/Repository @@ -0,0 +1 @@ +gtkcairo/gtkcairo diff --git a/gtkcairo-0.3/gtkcairo/CVS/Root b/gtkcairo-0.3/gtkcairo/CVS/Root new file mode 100644 index 00000000..92851c1c --- /dev/null +++ b/gtkcairo-0.3/gtkcairo/CVS/Root @@ -0,0 +1 @@ +:pserver:anoncvs@cvs.cairographics.org:/cvs/cairo diff --git a/gtkcairo-0.3/gtkcairo/Makefile.am b/gtkcairo-0.3/gtkcairo/Makefile.am new file mode 100644 index 00000000..44039473 --- /dev/null +++ b/gtkcairo-0.3/gtkcairo/Makefile.am @@ -0,0 +1,15 @@ +lib_LTLIBRARIES = libgtkcairo.la +include_HEADERS = gtkcairo.h + +libgtkcairo_la_SOURCES = \ + gtkcairo.c \ + gtkcairo.h \ + gdkcairo.h \ + gdkcairo.c + +libgtkcairo_la_LDFLAGS = -version-info @VERSION_INFO@ + +INCLUDES = $(GTKCAIRO_CFLAGS) + +libgtkcairo_la_LIBADD = $(GTKCAIRO_LIBS) + diff --git a/gtkcairo-0.3/gtkcairo/gdkcairo.c b/gtkcairo-0.3/gtkcairo/gdkcairo.c new file mode 100644 index 00000000..0584bb88 --- /dev/null +++ b/gtkcairo-0.3/gtkcairo/gdkcairo.c @@ -0,0 +1,415 @@ +/* gdkcairo - replacing a gdkwindow with a cairo surface + * + * Copyright © 2003, 2004 Carl D. Worth + * Evan Martin + * Øyvind Kolås + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#include +#include "gdkcairo.h" +#include + +#ifdef CAIRO_HAS_XLIB_SURFACE +#include +#endif + +#ifdef CAIRO_HAS_GLITZ_SURFACE +#include +#endif + +static void +gdkcairo_init (gdkcairo_t *self, + GtkWidget *widget) +{ + self->widget = widget; + self->cr = NULL; + + self->backend = GDKCAIRO_BACKEND_IMAGE; +#ifdef CAIRO_HAS_XLIB_SURFACE + self->backend = GDKCAIRO_BACKEND_XLIB; +#endif +#ifdef USE_GL + { + char *GTKCAIRO_GL = getenv ("GTKCAIRO_GL"); + if (GTKCAIRO_GL && atoi (GTKCAIRO_GL)) + self->backend = GDKCAIRO_BACKEND_GL; + } +#endif + { + char *GDKCAIRO_BACKEND = getenv ("GTKCAIRO_BACKEND"); + if (GDKCAIRO_BACKEND) + { + if (!strcmp (GDKCAIRO_BACKEND, "image")) + { + self->backend = GDKCAIRO_BACKEND_IMAGE; + } +#ifdef CAIRO_HAS_XLIB_SURFACE + else if (!strcmp (GDKCAIRO_BACKEND, "xlib")) + { + self->backend = GDKCAIRO_BACKEND_XLIB; + } +#endif +#ifdef USE_GL + else if (!strcmp (GDKCAIRO_BACKEND, "gl")) + { + self->backend = GDKCAIRO_BACKEND_GL; + } +#endif + else + { + self->backend = GDKCAIRO_BACKEND_IMAGE; +#ifdef CAIRO_HAS_XLIB_SURFACE + self->backend = GDKCAIRO_BACKEND_XLIB; +#endif + fprintf (stderr, "unknown GTKCAIRO_BACKEND '%s' falling back\n", + GDKCAIRO_BACKEND); + } + } + } + + switch (self->backend) + { + case GDKCAIRO_BACKEND_IMAGE: + break; +#ifdef CAIRO_HAS_XLIB_SURFACE + case GDKCAIRO_BACKEND_XLIB: + break; +#endif +#ifdef USE_GL + case GDKCAIRO_BACKEND_GL: + self->glitz_surface = NULL; + break; +#endif + default: + g_assert (0); + break; + } +} + +gdkcairo_t * +gdkcairo_new (GtkWidget *widget) +{ + gdkcairo_t *self = malloc (sizeof (gdkcairo_t)); + gdkcairo_init (self, widget); + return self; +} + +void +gdkcairo_destroy (gdkcairo_t *self) +{ + GtkWidget *widget = self->widget; + + if (self->cr != NULL) + { + cairo_destroy (self->cr); + self->cr = NULL; + } +#ifdef USE_GL + if (self->glitz_surface != NULL) + { + glitz_surface_destroy (self->glitz_surface); + self->glitz_surface = NULL; + } +#endif + /* FIXME: gtk_style_detach (self->widget->style) is missing */ + /* FIXME: how is self freed? */ +} + +void +gdkcairo_realize (gdkcairo_t *self) +{ + GtkWidget *widget = self->widget; + GdkWindowAttr attributes; + gint attributes_mask; + + g_return_if_fail (widget != NULL); + + GTK_WIDGET_SET_FLAGS (self->widget, GTK_REALIZED); + + attributes.x = widget->allocation.x; + attributes.y = widget->allocation.y; + attributes.width = widget->allocation.width; + attributes.height = widget->allocation.height; + attributes.wclass = GDK_INPUT_OUTPUT; + attributes.window_type = GDK_WINDOW_CHILD; + attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; + attributes.visual = gtk_widget_get_visual (widget); + +retry: + switch (self->backend) + { + case GDKCAIRO_BACKEND_IMAGE: + break; +#ifdef CAIRO_HAS_XLIB_SURFACE + case GDKCAIRO_BACKEND_XLIB: + attributes.colormap = gtk_widget_get_colormap (widget); + + attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; + widget->window = gdk_window_new (widget->parent->window, + &attributes, attributes_mask); + + break; +#endif +#ifdef USE_GL + case GDKCAIRO_BACKEND_GL: + { + Display *dpy = gdk_x11_get_default_xdisplay (); + int screen = gdk_x11_get_default_screen (); + XVisualInfo *vinfo; + glitz_drawable_format_t *dformat; + glitz_drawable_format_t templ; + unsigned long mask; + char *GTKCAIRO_GL_DOUBLEBUFFER; + char *GTKCAIRO_GL_SAMPLES; + + GTKCAIRO_GL_DOUBLEBUFFER = getenv ("GTKCAIRO_GL_DOUBLEBUFFER"); + GTKCAIRO_GL_SAMPLES = getenv ("GTKCAIRO_GL_SAMPLES"); + + if (GTKCAIRO_GL_DOUBLEBUFFER) + { + if (atoi (GTKCAIRO_GL_DOUBLEBUFFER)) + templ.doublebuffer = 1; + else + templ.doublebuffer = 0; + + mask |= GLITZ_FORMAT_DOUBLEBUFFER_MASK; + } + + if (GTKCAIRO_GL_SAMPLES) + { + templ.samples = atoi (GTKCAIRO_GL_SAMPLES); + + /* less than 1 sample is not possible */ + if (templ.samples < 1) + templ.samples = 1; + + mask |= GLITZ_FORMAT_SAMPLES_MASK; + } + + dformat = + glitz_glx_find_window_format (dpy, screen, mask, &templ, 0); + + if (dformat) + { + glitz_drawable_t *drawable; + glitz_format_t *format; + XID xid; + cairo_surface_t *cr_surface; + + vinfo = glitz_glx_get_visual_info_from_format (dpy, screen, + dformat); + gtk_widget_set_double_buffered (widget, FALSE); + attributes.visual = gdkx_visual_get (vinfo->visualid); + attributes.colormap = gdk_colormap_new (attributes.visual, TRUE); + + attributes_mask = + GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; + + widget->window = + gdk_window_new (gtk_widget_get_parent_window (widget), + &attributes, attributes_mask); + + xid = gdk_x11_drawable_get_xid (widget->window); + + drawable = + glitz_glx_create_drawable_for_window (dpy, screen, + dformat, xid, + attributes.width, + attributes.height); + format = glitz_find_standard_format (drawable, + GLITZ_STANDARD_ARGB32); + self->glitz_surface = + glitz_surface_create (drawable, + format, + attributes.width, + attributes.height, + 0, NULL); + + glitz_surface_attach (self->glitz_surface, + drawable, + (dformat->doublebuffer) ? + GLITZ_DRAWABLE_BUFFER_BACK_COLOR : + GLITZ_DRAWABLE_BUFFER_FRONT_COLOR); + + glitz_drawable_destroy (drawable); + + cr_surface = cairo_glitz_surface_create (self->glitz_surface); + self->cr = cairo_create (cr_surface); + cairo_surface_destroy (cr_surface); + } + else + { + g_warning ("could not find a usable GL visual\n"); + self->backend = GDKCAIRO_BACKEND_XLIB; + goto retry; + } + } + break; +#endif + default: + break; + } + + gtk_style_attach (widget->style, widget->window); + gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); + gdk_window_set_user_data (widget->window, widget); +} + +void +gdkcairo_size_allocate (gdkcairo_t *self, + gint x, + gint y, + gint width, + gint height) +{ + if (GTK_WIDGET_REALIZED (self->widget)) + { + gdk_window_move_resize (self->widget->window, x, y, width, height); + + switch (self->backend) + { +#ifdef CAIRO_HAS_XLIB_SURFACE + case GDKCAIRO_BACKEND_XLIB: + break; +#endif +#ifdef USE_GL + case GDKCAIRO_BACKEND_GL: + if (self->glitz_surface) + { + glitz_format_t *format; + glitz_drawable_t *drawable; + glitz_drawable_format_t *dformat; + cairo_surface_t *cr_surface; + + format = glitz_surface_get_format (self->glitz_surface); + drawable = glitz_surface_get_drawable (self->glitz_surface); + glitz_drawable_reference (drawable); + dformat = glitz_drawable_get_format (drawable); + + cairo_destroy (self->cr); + + glitz_surface_destroy (self->glitz_surface); + + glitz_drawable_update_size (drawable, width, height); + + self->glitz_surface = + glitz_surface_create (drawable, format, width, height, + 0, NULL); + glitz_drawable_destroy(drawable); + + glitz_surface_attach (self->glitz_surface, + drawable, + (dformat->doublebuffer) ? + GLITZ_DRAWABLE_BUFFER_BACK_COLOR : + GLITZ_DRAWABLE_BUFFER_FRONT_COLOR); + + cr_surface = cairo_glitz_surface_create (self->glitz_surface); + self->cr = cairo_create (cr_surface); + cairo_surface_destroy (cr_surface); + } + + break; +#endif + default: + g_assert (0); + break; + } + } +} + +gint +gdkcairo_expose (gdkcairo_t *self, + GdkEventExpose *event) +{ + GtkWidget *widget = self->widget; + + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (event != NULL, FALSE); + + switch (self->backend) + { +#ifdef USE_GL + case GDKCAIRO_BACKEND_GL: + { + glitz_drawable_t *drawable; + glitz_drawable_format_t *dformat; + + cairo_save (self->cr); + cairo_rectangle (self->cr, 0, 0, widget->allocation.width, + widget->allocation.height); + gtk_cairo_set_gdk_color (self->cr, + &(self->widget->style->bg[GTK_STATE_NORMAL])); + cairo_fill (self->cr); + cairo_restore (self->cr); + + cairo_save (self->cr); + g_signal_emit_by_name (self->widget, "paint", self->cr); + cairo_restore (self->cr); + + /* FIXME: flush cairo first. */ + + drawable = glitz_surface_get_drawable (self->glitz_surface); + dformat = glitz_drawable_get_format (drawable); + + glitz_surface_flush (self->glitz_surface); + + if (dformat->doublebuffer) + glitz_drawable_swap_buffers (drawable); + else + glitz_drawable_flush (drawable); + } + break; +#endif +#ifdef CAIRO_HAS_XLIB_SURFACE + case GDKCAIRO_BACKEND_XLIB: + { + GdkDrawable *gdkdrawable; + gint x_off, y_off; + gint width, height; + cairo_surface_t *x11_surface; + + /* find drawable, offset and size */ + gdk_window_get_internal_paint_info (widget->window, + &gdkdrawable, &x_off, &y_off); + gdk_drawable_get_size (gdkdrawable, &width, &height); + + x11_surface = cairo_xlib_surface_create + (gdk_x11_drawable_get_xdisplay (gdkdrawable), + gdk_x11_drawable_get_xid (gdkdrawable), + gdk_x11_visual_get_xvisual (gdk_drawable_get_visual (gdkdrawable)), + width, height); + cairo_surface_set_device_offset (x11_surface, -x_off, -y_off); + + self->cr = cairo_create (x11_surface); + cairo_surface_destroy (x11_surface); + + g_signal_emit_by_name (self->widget, "paint", self->cr); + + cairo_destroy (self->cr); + self->cr = NULL; + } + break; +#endif + default: + g_assert (0); + } + return FALSE; +} + +/* vim: set ts=4 sw=4 et : */ diff --git a/gtkcairo-0.3/gtkcairo/gdkcairo.h b/gtkcairo-0.3/gtkcairo/gdkcairo.h new file mode 100644 index 00000000..1b9c98ac --- /dev/null +++ b/gtkcairo-0.3/gtkcairo/gdkcairo.h @@ -0,0 +1,71 @@ +/* gdkcairo - replacing a gdkwindow with a cairo surface + * + * Copyright © 2003, 2004 Carl D. Worth + * Evan Martin + * Øyvind Kolås + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef GDKCAIRO_H +#define GDKCAIRO_H + +#include +#include + +#ifdef USE_GL +#ifndef CAIRO_HAS_GLITZ_SURFACE +#undef USE_GL +#endif +#endif + +#ifdef USE_GL +#include +#endif + +typedef enum +{ + GDKCAIRO_BACKEND_IMAGE, + GDKCAIRO_BACKEND_XLIB, + GDKCAIRO_BACKEND_GL, + GDKCAIRO_BACKEND_NONE +} +gdkcairo_backend; + +typedef struct gdkcairo_t +{ + GtkWidget *widget; + cairo_t *cr; + gdkcairo_backend backend; + +#ifdef USE_GL + glitz_surface_t *glitz_surface; +#endif +} gdkcairo_t; + +gdkcairo_t *gdkcairo_new (GtkWidget *widget); + +void gdkcairo_destroy (gdkcairo_t *self); + +void gdkcairo_realize (gdkcairo_t *self); + +void gdkcairo_size_allocate (gdkcairo_t *self, + gint x, + gint y, + gint width, + gint height); +gint gdkcairo_expose (gdkcairo_t *self, + GdkEventExpose *event); + +#endif /* GDKCAIRO_H */ diff --git a/gtkcairo-0.3/gtkcairo/gtkcairo.c b/gtkcairo-0.3/gtkcairo/gtkcairo.c new file mode 100644 index 00000000..19e82a15 --- /dev/null +++ b/gtkcairo-0.3/gtkcairo/gtkcairo.c @@ -0,0 +1,240 @@ +/* gtkcairo - cairo drawing widget for gtk+ + * + * Copyright © 2003, 2004 Carl D. Worth + * Evan Martin + * Øyvind Kolås + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include + +#include "gdkcairo.h" +#include "gtkcairo.h" + +enum +{ + PAINT, + LAST_SIGNAL +}; + +static void gtk_cairo_class_init (GtkCairoClass * klass); + +static void gtk_cairo_init (GtkCairo *gtkcairo); + +static void gtk_cairo_destroy (GtkObject *object); + +static void gtk_cairo_realize (GtkWidget *widget); + +static void +gtk_cairo_size_allocate (GtkWidget *widget, GtkAllocation * allocation); +static gint gtk_cairo_expose (GtkWidget *widget, GdkEventExpose *event); + +static GtkWidgetClass *parent_class = NULL; +static guint signals[LAST_SIGNAL] = { 0 }; + +/*FIXME: make the cairo object a property as well,. and deprecate the get_cairo function */ + +GType +gtk_cairo_get_type (void) +{ + static GType gtk_cairo_type = 0; + + if (!gtk_cairo_type) + { + static const GTypeInfo gtk_cairo_info = { + sizeof (GtkCairoClass), + NULL, + NULL, + (GClassInitFunc) gtk_cairo_class_init, + NULL, + NULL, + sizeof (GtkCairo), + 0, + (GInstanceInitFunc) gtk_cairo_init, + }; + + gtk_cairo_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkCairo", + >k_cairo_info, 0); + } + + return gtk_cairo_type; +} + +static void +gtk_cairo_class_init (GtkCairoClass * class) +{ + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + + object_class = (GtkObjectClass *) class; + widget_class = (GtkWidgetClass *) class; + + parent_class = gtk_type_class (GTK_TYPE_WIDGET); + + object_class->destroy = gtk_cairo_destroy; + + widget_class->realize = gtk_cairo_realize; + widget_class->expose_event = gtk_cairo_expose; + widget_class->size_allocate = gtk_cairo_size_allocate; + + signals[PAINT] = g_signal_new ("paint", + GTK_TYPE_CAIRO, + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GtkCairoClass, paint), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); +} + +static void +gtk_cairo_init (GtkCairo *gtkcairo) +{ + gtkcairo->gdkcairo = gdkcairo_new (GTK_WIDGET (gtkcairo)); +} + +GtkWidget * +gtk_cairo_new (void) +{ + GtkWidget *gtkcairo; + gtkcairo = GTK_WIDGET (g_object_new (GTK_TYPE_CAIRO, NULL)); + + gtk_widget_queue_draw (GTK_WIDGET (gtkcairo)); + + return gtkcairo; +} + +static void +gtk_cairo_destroy (GtkObject *object) +{ + GtkCairo *gtkcairo; + + g_return_if_fail (object != NULL); + g_return_if_fail (GTK_IS_CAIRO (object)); + + gtkcairo = GTK_CAIRO (object); + + gdkcairo_destroy (gtkcairo->gdkcairo); + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (*GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + +static void +gtk_cairo_realize (GtkWidget *widget) +{ + GtkCairo *gtkcairo; + + g_return_if_fail (widget != NULL); + g_return_if_fail (GTK_IS_CAIRO (widget)); + + GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); + gtkcairo = GTK_CAIRO (widget); + + gdkcairo_realize (gtkcairo->gdkcairo); +} + +static void +gtk_cairo_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) +{ + GtkCairo *gtkcairo; + g_return_if_fail (widget != NULL); + g_return_if_fail (GTK_IS_CAIRO (widget)); + g_return_if_fail (allocation != NULL); + + gtkcairo = GTK_CAIRO (widget); + + widget->allocation = *allocation; + + gdkcairo_size_allocate (gtkcairo->gdkcairo, + allocation->x, allocation->y, + allocation->width, allocation->height); +} + +static gint +gtk_cairo_expose (GtkWidget *widget, + GdkEventExpose *event) +{ + GtkCairo *gtkcairo; + + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (GTK_IS_CAIRO (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); + + gtkcairo = GTK_CAIRO (widget); + + gdkcairo_expose (gtkcairo->gdkcairo, event); + return FALSE; +} + +cairo_t * +gtk_cairo_get_cairo (GtkCairo *gtkcairo) +{ + g_return_val_if_fail (gtkcairo != NULL, NULL); + g_return_val_if_fail (GTK_IS_CAIRO (gtkcairo), NULL); + return ((gdkcairo_t *) gtkcairo->gdkcairo)->cr; +} + +void +gtk_cairo_set_gdk_color (cairo_t *cr, + GdkColor *color) +{ + double red, green, blue; + + red = color->red / 65535.0; + green = color->green / 65535.0; + blue = color->blue / 65535.0; + + cairo_set_source_rgb (cr, red, green, blue); +} + +int +gtk_cairo_backend_is_gl (GtkCairo *gtkcairo) +{ + if (((gdkcairo_t *) gtkcairo->gdkcairo)->backend == GDKCAIRO_BACKEND_GL) + return 1; + return 0; +} + +#if 0 +/* FIXME: premultiply the buffer, but who should own it? + */ + +cairo_surface_t * +gtk_cairo_surface_create_for_gdk_pixbuf (const GdkPixbuf * pixbuf) +{ + cairo_surface_t *self; + char *data; + cairo_format_t format; + int width; + int height; + int stride; + + if (!pixbuf) + return NULL; + data = gdk_pixbuf_get_pixels (pixbuf); + width = gdk_pixbuf_get_width (pixbuf); + height = gdk_pixbuf_get_height (pixbuf); + format = CAIRO_FORMAT_ARGB32; + stride = gdk_pixbuf_get_rowstride (pixbuf); + + self = cairo_surface_create_for_image (data, format, width, height, stride); + return self; +} +#endif + +/* vim: set ts=4 sw=4 noet : */ diff --git a/gtkcairo-0.3/gtkcairo/gtkcairo.h b/gtkcairo-0.3/gtkcairo/gtkcairo.h new file mode 100644 index 00000000..bafdff16 --- /dev/null +++ b/gtkcairo-0.3/gtkcairo/gtkcairo.h @@ -0,0 +1,73 @@ +/* gtkcairo - cairo drawing widget for gtk+ + * + * Copyright © 2003, 2004 Carl D. Worth + * Evan Martin + * Øyvind Kolås + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef GTK_CAIRO_H +#define GTK_CAIRO_H + +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#define GTK_TYPE_CAIRO (gtk_cairo_get_type()) +#define GTK_CAIRO(obj) GTK_CHECK_CAST (obj, GTK_TYPE_CAIRO, GtkCairo) +#define GTK_CAIRO_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, GTK_TYPE_CAIRO, GtkCairoClass) +#define GTK_IS_CAIRO(obj) GTK_CHECK_TYPE (obj, GTK_TYPE_CAIRO) + + typedef struct _GtkCairo GtkCairo; + typedef struct _GtkCairoClass GtkCairoClass; + +#define gdkcairo_t void + + struct _GtkCairo + { + GtkWidget widget; + gdkcairo_t *gdkcairo; + }; + +#undef gdkcairo_t + + struct _GtkCairoClass + { + GtkWidgetClass parent_class; + void (*paint) (GtkCairo *, cairo_t *c); + }; + + GType gtk_cairo_get_type (void); + + GtkWidget *gtk_cairo_new (void); + + cairo_t *gtk_cairo_get_cairo (GtkCairo *gtkcairo); + + +/* convenience function to set the current cairo color + * from a GdkColor + */ + void gtk_cairo_set_gdk_color (cairo_t *cr, + GdkColor *color); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* GTK_CAIRO_H */ diff --git a/gtkcairo-0.3/tests/CVS/Entries b/gtkcairo-0.3/tests/CVS/Entries new file mode 100644 index 00000000..4d74f7d4 --- /dev/null +++ b/gtkcairo-0.3/tests/CVS/Entries @@ -0,0 +1,4 @@ +/.cvsignore/1.1/Mon Oct 11 16:42:57 2004// +/Makefile.am/1.3/Fri Nov 12 11:47:46 2004// +/demo.c/1.10/Sun Aug 7 22:57:09 2005// +D diff --git a/gtkcairo-0.3/tests/CVS/Repository b/gtkcairo-0.3/tests/CVS/Repository new file mode 100644 index 00000000..d745e975 --- /dev/null +++ b/gtkcairo-0.3/tests/CVS/Repository @@ -0,0 +1 @@ +gtkcairo/tests diff --git a/gtkcairo-0.3/tests/CVS/Root b/gtkcairo-0.3/tests/CVS/Root new file mode 100644 index 00000000..92851c1c --- /dev/null +++ b/gtkcairo-0.3/tests/CVS/Root @@ -0,0 +1 @@ +:pserver:anoncvs@cvs.cairographics.org:/cvs/cairo diff --git a/gtkcairo-0.3/tests/Makefile.am b/gtkcairo-0.3/tests/Makefile.am new file mode 100644 index 00000000..8bd03e27 --- /dev/null +++ b/gtkcairo-0.3/tests/Makefile.am @@ -0,0 +1,9 @@ +noinst_PROGRAMS = demo + +demo_SOURCES = \ + demo.c + +AM_CFLAGS = $(GTKCAIRO_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/gtkcairo + +demo_LDADD = $(GTKCAIRO_LIBS) $(top_builddir)/gtkcairo/libgtkcairo.la + diff --git a/gtkcairo-0.3/tests/demo.c b/gtkcairo-0.3/tests/demo.c new file mode 100644 index 00000000..a2043c2f --- /dev/null +++ b/gtkcairo-0.3/tests/demo.c @@ -0,0 +1,119 @@ +/* vim: set ts=4 sw=4 et : */ + +#include +#include + +#define ANIMATE_ROTATE_STEP 0.05 +#define ANIMATE_FRAME_DELAY 40 + +#define ROTATE_MAX 6.28 /* 2*pi */ + +#define MARGIN 20 +#define INITIAL_SIZE 200 + +static void +paint (GtkWidget *widget, + cairo_t *cairo, + GtkRange *range) +{ + gint width = widget->allocation.width; + gint height = widget->allocation.height; + gint box_size = (width + height) / 6; + + cairo_save (cairo); + cairo_identity_matrix (cairo); + cairo_translate (cairo, width / 2, height / 2); + + cairo_rotate (cairo, gtk_range_get_value (range)); + cairo_rectangle (cairo, -box_size, -box_size, box_size, box_size); + cairo_set_source_rgb (cairo, 1, 0, 0); + cairo_fill (cairo); + cairo_restore (cairo); +} + +static void +slider_changed (GtkRange *range, + GtkWidget *gtkcairo) +{ + gtk_widget_queue_draw (gtkcairo); +} + +static gboolean +animate_step (GtkRange *range) +{ + double newval = gtk_range_get_value (range) + ANIMATE_ROTATE_STEP; + if (newval > ROTATE_MAX) + newval -= ROTATE_MAX; + gtk_range_set_value (range, newval); + return TRUE; +} + +static void +animate_toggled (GtkToggleButton *tb, + GtkRange *range) +{ + static guint timerid = 0; + gboolean active = gtk_toggle_button_get_active (tb); + if (active && !timerid) + { + timerid = gtk_timeout_add (ANIMATE_FRAME_DELAY, + (GtkFunction) animate_step, range); + } + else if (!active && timerid) + { + gtk_timeout_remove (timerid); + timerid = 0; + } +} + +static void +show_test (void) +{ + GtkWidget *win, *vbox, *frame, *gtkcairo, *slider, *animate; + + win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (win), "GtkCairo Demo"); + g_signal_connect (G_OBJECT (win), "delete-event", + G_CALLBACK (gtk_main_quit), NULL); + + vbox = gtk_vbox_new (FALSE, 6); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 12); + + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); + + slider = gtk_hscale_new_with_range (0, ROTATE_MAX, 0.05); + + gtkcairo = gtk_cairo_new (); + gtk_widget_set_usize (GTK_WIDGET (gtkcairo), INITIAL_SIZE, INITIAL_SIZE); + g_signal_connect (G_OBJECT (gtkcairo), "paint", G_CALLBACK (paint), slider); + + gtk_container_add (GTK_CONTAINER (frame), gtkcairo); + gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); + + gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE); + g_signal_connect (G_OBJECT (slider), "value-changed", + G_CALLBACK (slider_changed), gtkcairo); + gtk_box_pack_start (GTK_BOX (vbox), slider, FALSE, FALSE, 0); + + animate = gtk_check_button_new_with_label ("Animate"); + g_signal_connect (G_OBJECT (animate), "toggled", + G_CALLBACK (animate_toggled), slider); + gtk_box_pack_start (GTK_BOX (vbox), animate, FALSE, FALSE, 0); + + gtk_container_add (GTK_CONTAINER (win), vbox); + gtk_widget_show_all (vbox); + + gtk_widget_show (win); +} + +int +main (gint argc, + gchar *argv[]) +{ + gtk_init (&argc, &argv); + show_test (); + gtk_main (); + + return 0; +} diff --git a/veejay-client/AUTHORS b/veejay-client/AUTHORS new file mode 100644 index 00000000..a1efdba0 --- /dev/null +++ b/veejay-client/AUTHORS @@ -0,0 +1,21 @@ +Tim Philipp Mller + (CellRendererSpin 15 minute hack - good enough) + +Matthijs v. Henten : + Glade-2 interface design + Icon/picture design + +Thomas Reinhold + Samplebank + +Dursun Koca + Veejay Logo (V) design + +Niels Elburg + Lead programming + +Contributions by: + Toni < oc2pus@arcor.de > + (making gveejay happen on GTK 2.4, veejay.spec file) + + diff --git a/veejay-client/COPYING b/veejay-client/COPYING new file mode 100644 index 00000000..d60c31a9 --- /dev/null +++ b/veejay-client/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/veejay-client/ChangeLog b/veejay-client/ChangeLog new file mode 100644 index 00000000..e69de29b diff --git a/veejay-client/INSTALL b/veejay-client/INSTALL new file mode 100644 index 00000000..5458714e --- /dev/null +++ b/veejay-client/INSTALL @@ -0,0 +1,234 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/veejay-client/Makefile b/veejay-client/Makefile new file mode 100644 index 00000000..cef48e5e --- /dev/null +++ b/veejay-client/Makefile @@ -0,0 +1,757 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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. + + + +pkgdatadir = $(datadir)/gveejay +pkglibdir = $(libdir)/gveejay +pkgincludedir = $(includedir)/gveejay +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 = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +target_triplet = i686-pc-linux-gnu +am__append_1 = src +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/gveejay-paths.sh.in $(top_srcdir)/configure AUTHORS \ + COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(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 = config.h +CONFIG_CLEAN_FILES = gveejay-paths.sh +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = src +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run aclocal-1.10 +ALSA_LIBS = -lasound +ALTIVEC_CFLAGS = +AMTAR = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run autoconf +AUTOHEADER = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run autoheader +AUTOMAKE = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCAS = gcc +CCASDEPMODE = depmode=gcc3 +CCASFLAGS = +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -DSTRICT_CHECKING -Wall -Wunused -march=nocona -mtune=nocona +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -march=nocona -mtune=nocona -g -O2 +CYGPATH_W = echo +DEBUGLIBS = +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F77 = +FFLAGS = +FFMPEG_AVCODEC_CFLAGS = -I/usr/include/ffmpeg +FFMPEG_AVCODEC_LIBS = -lavcodec -ltheora -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg +FFMPEG_SWSCALER_CFLAGS = -I/usr/include/swscale -I/usr/include/ffmpeg +FFMPEG_SWSCALER_LIBS = -lswscale -lavutil +GLADE_CFLAGS = -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +GLADE_LIBS = -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +GLIB_LIBS = -lglib-2.0 +GREP = /bin/grep +GTKCAIRO_CFLAGS = -I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include +GTKCAIRO_LIBS = -L/usr/local/lib -lgtkcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +GTK_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LEX = flex +LEXLIB = -lfl +LEX_OUTPUT_ROOT = lex.yy +LIBGETOPT_LIB = +LIBM_LIBS = -lm +LIBOBJS = +LIBS = -ldl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +LTLIBOBJS = +LT_AGE = 0 +LT_CURRENT = 0 +LT_RELEASE = 1.2 +LT_REVISION = 0 +MAINT = # +MAKEINFO = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run makeinfo +MJPEGTOOLS_CFLAGS = -I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex +MJPEGTOOLS_LIBS = -lmjpegutils +MKDIR_P = /bin/mkdir -p +OBJEXT = o +OP_CFLAGS = +PACKAGE = gveejay +PACKAGE_BUGREPORT = veejay-users@lists.sourceforge.net +PACKAGE_NAME = gveejay +PACKAGE_STRING = gveejay 1.2 +PACKAGE_TARNAME = gveejay +PACKAGE_VERSION = 1.2 +PATH_SEPARATOR = : +PIXBUF_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +PIXBUF_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +PKG_CONFIG = /usr/bin/pkg-config +PROGRAM_NOPIC = -fno-PIC +PTHREAD_LIBS = -lpthread +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VEEJAY_CFLAGS = -I/usr/local/include/veejay +VEEJAY_LIBS = -L/usr/local/lib -lveejay +VERSION = 1.2 +XMKMF = +X_CFLAGS = +X_EXTRA_LIBS = +X_LIBS = +X_PRE_LIBS = -lSM -lICE +YACC = bison -y +YFLAGS = +YUVCFLAGS = -fif-conversion +abs_builddir = /home/control/resynced/veejay-1.1/veejay-client +abs_srcdir = /home/control/resynced/veejay-1.1/veejay-client +abs_top_builddir = /home/control/resynced/veejay-1.1/veejay-client +abs_top_srcdir = /home/control/resynced/veejay-1.1/veejay-client +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +gveejay_datadir = ${datarootdir}/gveejay +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/control/resynced/veejay-1.1/veejay-client/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target = i686-pc-linux-gnu +target_alias = +target_cpu = i686 +target_os = linux-gnu +target_vendor = pc +top_builddir = . +top_srcdir = . + +# Process with automake to produce Makefile.in +SUBDIRS = $(am__append_1) +EXTRA_DIST = \ + autogen.sh\ + depcomp \ + cpuinfo.sh \ + autogen.sh \ + gveejay-paths.sh.in + +DISTCLEANFILES = \ + confdefs.h \ + config.cache \ + config.status \ + config.log \ + gveejay-paths.h + +MAINTAINERCLEANFILES = \ + compile \ + depcomp \ + install-sh \ + missing \ + mkinstalldirs \ + Makefile.in \ + aclocal.m4 \ + config.guess \ + config.h.in \ + config.sub \ + configure \ + ltmain.sh \ + stamp-h.in + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(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 config.h +$(srcdir)/config.h.in: # $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +gveejay-paths.sh: $(top_builddir)/config.status $(srcdir)/gveejay-paths.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) 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; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-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 + + +install-data-local: + @$(NORMAL_INSTALL) + if test -d $(srcdir)/share; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \ + for dialog in $(srcdir)/share/*; do \ + if test -f $$dialog; then \ + $(INSTALL_DATA) $$dialog $(DESTDIR)$(pkgdatadir); \ + fi \ + done \ + fi; + +gveejay-path.h: gveejay-paths.sh + @sh $< > $@.tmp ; + if cmp -s $@.tmp $@; then + rm $@.tmp; + else + mv $@.tmp $@ ; echo updated gveejay-paths.h; + fi + +dist-hook: + rm -f %(distdir)/gveejay-paths.sh \ + if test -d share; then \ + mkdir $(distdir)/dialogs; \ + for dialog in share/*; do \ + if test -f $$dialog; then \ + cp -p $$dialog $(distdir)/dialogs; \ + fi \ + done \ + fi + +rpm: Makefile + $(MAKE) dist + rpmbuild -ta --clean $(PACKAGE)-$(VERSION).tar.gz + +deb: Makefile dist + -chmod -R +w $(PACKAGE)-$(VERSION) + rm -rf $(PACKAGE)-$(VERSION) + tar xzf $(PACKAGE)-$(VERSION).tar.gz + cd $(PACKAGE)-$(VERSION); dpkg-buildpackage -rfakeroot +# 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/veejay-client/Makefile.am b/veejay-client/Makefile.am new file mode 100644 index 00000000..110a7d2d --- /dev/null +++ b/veejay-client/Makefile.am @@ -0,0 +1,82 @@ +# Process with automake to produce Makefile.in +SUBDIRS = +if USE_GVEEJAYRELOADED +SUBDIRS += src +endif + +EXTRA_DIST = \ + autogen.sh\ + depcomp \ + cpuinfo.sh \ + autogen.sh \ + gveejay-paths.sh.in + +DISTCLEANFILES = \ + confdefs.h \ + config.cache \ + config.status \ + config.log \ + gveejay-paths.h + + +MAINTAINERCLEANFILES = \ + compile \ + depcomp \ + install-sh \ + missing \ + mkinstalldirs \ + Makefile.in \ + aclocal.m4 \ + config.guess \ + config.h.in \ + config.sub \ + configure \ + ltmain.sh \ + stamp-h.in + +## .glade files must be in same directory as pixmaps ?!! +install-data-local: + @$(NORMAL_INSTALL) + if test -d $(srcdir)/share; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \ + for dialog in $(srcdir)/share/*; do \ + if test -f $$dialog; then \ + $(INSTALL_DATA) $$dialog $(DESTDIR)$(pkgdatadir); \ + fi \ + done \ + fi; + + + +gveejay-path.h: gveejay-paths.sh + @sh $< > $@.tmp ; + if cmp -s $@.tmp $@; then + rm $@.tmp; + else + mv $@.tmp $@ ; echo updated gveejay-paths.h; + fi + +dist-hook: + rm -f %(distdir)/gveejay-paths.sh \ + if test -d share; then \ + mkdir $(distdir)/dialogs; \ + for dialog in share/*; do \ + if test -f $$dialog; then \ + cp -p $$dialog $(distdir)/dialogs; \ + fi \ + done \ + fi + + + +## make rpms +rpm: Makefile + $(MAKE) dist + rpmbuild -ta --clean $(PACKAGE)-$(VERSION).tar.gz + +## make debs +deb: Makefile dist + -chmod -R +w $(PACKAGE)-$(VERSION) + rm -rf $(PACKAGE)-$(VERSION) + tar xzf $(PACKAGE)-$(VERSION).tar.gz + cd $(PACKAGE)-$(VERSION); dpkg-buildpackage -rfakeroot diff --git a/veejay-client/Makefile.in b/veejay-client/Makefile.in new file mode 100644 index 00000000..6412fe75 --- /dev/null +++ b/veejay-client/Makefile.in @@ -0,0 +1,757 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@USE_GVEEJAYRELOADED_TRUE@am__append_1 = src +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/gveejay-paths.sh.in $(top_srcdir)/configure AUTHORS \ + COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(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 = config.h +CONFIG_CLEAN_FILES = gveejay-paths.sh +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = src +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ALSA_LIBS = @ALSA_LIBS@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +GLADE_CFLAGS = @GLADE_CFLAGS@ +GLADE_LIBS = @GLADE_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GREP = @GREP@ +GTKCAIRO_CFLAGS = @GTKCAIRO_CFLAGS@ +GTKCAIRO_LIBS = @GTKCAIRO_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VEEJAY_CFLAGS = @VEEJAY_CFLAGS@ +VEEJAY_LIBS = @VEEJAY_LIBS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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@ +gveejay_datadir = @gveejay_datadir@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Process with automake to produce Makefile.in +SUBDIRS = $(am__append_1) +EXTRA_DIST = \ + autogen.sh\ + depcomp \ + cpuinfo.sh \ + autogen.sh \ + gveejay-paths.sh.in + +DISTCLEANFILES = \ + confdefs.h \ + config.cache \ + config.status \ + config.log \ + gveejay-paths.h + +MAINTAINERCLEANFILES = \ + compile \ + depcomp \ + install-sh \ + missing \ + mkinstalldirs \ + Makefile.in \ + aclocal.m4 \ + config.guess \ + config.h.in \ + config.sub \ + configure \ + ltmain.sh \ + stamp-h.in + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(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 config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +gveejay-paths.sh: $(top_builddir)/config.status $(srcdir)/gveejay-paths.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) 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; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-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 + + +install-data-local: + @$(NORMAL_INSTALL) + if test -d $(srcdir)/share; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \ + for dialog in $(srcdir)/share/*; do \ + if test -f $$dialog; then \ + $(INSTALL_DATA) $$dialog $(DESTDIR)$(pkgdatadir); \ + fi \ + done \ + fi; + +gveejay-path.h: gveejay-paths.sh + @sh $< > $@.tmp ; + if cmp -s $@.tmp $@; then + rm $@.tmp; + else + mv $@.tmp $@ ; echo updated gveejay-paths.h; + fi + +dist-hook: + rm -f %(distdir)/gveejay-paths.sh \ + if test -d share; then \ + mkdir $(distdir)/dialogs; \ + for dialog in share/*; do \ + if test -f $$dialog; then \ + cp -p $$dialog $(distdir)/dialogs; \ + fi \ + done \ + fi + +rpm: Makefile + $(MAKE) dist + rpmbuild -ta --clean $(PACKAGE)-$(VERSION).tar.gz + +deb: Makefile dist + -chmod -R +w $(PACKAGE)-$(VERSION) + rm -rf $(PACKAGE)-$(VERSION) + tar xzf $(PACKAGE)-$(VERSION).tar.gz + cd $(PACKAGE)-$(VERSION); dpkg-buildpackage -rfakeroot +# 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/veejay-client/NEWS b/veejay-client/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/veejay-client/README b/veejay-client/README new file mode 100644 index 00000000..18d242d2 --- /dev/null +++ b/veejay-client/README @@ -0,0 +1,104 @@ + + ~== + ~==== + :... ~~==== + :...... ~~~~==== + :.....: ~~~~==== + :...... -~~~~=== + :....... --~~~~~== + :....... ::~~~~~~= + :...... "::~~~~== + :....., :::~~~=== + :..... =::~~~~=== + :...... :::~~~==== + ....... ::~~~~~=== + ....... :::~~~~~~== + ...... ~::~~~~~~== + ...... |::~~~=| + ..... :::|:~==| + ..::: |:=|||==+ + ., :., :|||?||+= + ..::,,.: :||=~=.|| + ,...::,,, |~:=|||||+| + :..,:::||||~~~====++ + ,:,,,:::~~~~~===++++ Reloaded + ,::::~~~====++++ + ~~~~~===+++++ version 1.0 + ~~===+++++++: + N=++++++++++ April 2007. + +++++++++ + ++++:::: + ::::: + || + + + :: Reloaded, a graphical interface for Veejay :: + + + FEATURE OVERVIEW + + +General: + + # Thin client (TCP/IP) + # MIDI support (auto learning) + # Slick interface designed for live performing + # Tracks multiple veejay servers + +Install +======= + +See file 'INSTALL' + +See doc/Howto_Compile.html +See doc/Howto_Compile_on_Ubuntu.html + +Documentation +============= + +See source code. + +Running +======= + +$ reloaded + + +To use a midi controller with veejay you must connect +the veejay's sequencer port to the MIDI controller port. +There is a utility 'aconnect' (comes with ALSA) that does this. + +1. List inputs (midi keyboards) + $ aconnect -i + + client 129: 'Virtual Keyboard' [type=user] + + +2. List outputs (Veejay) + $ aconnect -o + + client 128: 'Veejay' [type=user] + + +3. Connect the ports + + $ aconnect 129 128 + + +4. Launch reloaded + +About +===== + +GveejayReloaded is a client for veejay. As long as veejay (the server) +is running, you can connect and disconnect from it with reloaded. + + + + + + + + + + diff --git a/veejay-client/aclocal.m4 b/veejay-client/aclocal.m4 new file mode 100644 index 00000000..9d19b4eb --- /dev/null +++ b/veejay-client/aclocal.m4 @@ -0,0 +1,7696 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# 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_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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 conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|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*) + 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_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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 < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +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_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [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="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + 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_AC_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_AC_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 +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_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 .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_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 +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_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 +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[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 +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +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" +m4_if($1,[],[ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognize shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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 + +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 +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognize a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_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 + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_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]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible 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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[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_AC_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_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# 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 + ;; + +aix4* | aix5*) + 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]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_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(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + 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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_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' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_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' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + osf3*) + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([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. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +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... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +])# AC_LIBTOOL_POSTDEP_PREDEP + +# AC_LIBTOOL_LANG_F77_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +[AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_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_AC_TAGVAR(objext, $1)=$objext + +# 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_AC_SYS_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" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +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 + ;; +aix4* | aix5*) + 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_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_F77_CONFIG + + +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +[AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_GCJ_CONFIG + + +# AC_LIBTOOL_LANG_RC_CONFIG +# ------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +[AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_RC_CONFIG + + +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then 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 +# TAGNAME from the matching tagged config vars. +AC_DEFUN([AC_LIBTOOL_CONFIG], +[# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac + +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) + + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# 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]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $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 < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f 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 +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_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 + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_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_AC_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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_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' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + +# 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. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_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]) +]) + +# 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 "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +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 --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + 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, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 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, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + + +# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# This was merged into AC_PROG_CC in Autoconf. + +AU_DEFUN([AM_PROG_CC_STDC], +[AC_PROG_CC +AC_DIAGNOSE([obsolete], [$0: + your code should no longer depend upon `am_cv_prog_cc_stdc', but upon + `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when + you adjust the code. You can also remove the above call to + AC_PROG_CC if you already called it elsewhere.]) +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +]) +AU_DEFUN([fp_PROG_CC_STDC]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 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 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_LEX +# ----------- +# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a +# "missing" invocation, for better error output. +AC_DEFUN([AM_PROG_LEX], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AM_MISSING_HAS_RUN])dnl +AC_REQUIRE([AC_PROG_LEX])dnl +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/veejay-client/autogen.sh b/veejay-client/autogen.sh new file mode 100755 index 00000000..ba7e3840 --- /dev/null +++ b/veejay-client/autogen.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + + +autoreconf -v -f -i diff --git a/veejay-client/autom4te.cache/output.0 b/veejay-client/autom4te.cache/output.0 new file mode 100644 index 00000000..2f74e76b --- /dev/null +++ b/veejay-client/autom4te.cache/output.0 @@ -0,0 +1,32359 @@ +@%:@! /bin/sh +@%:@ Guess values for system-dependent variables and create Makefiles. +@%:@ Generated by GNU Autoconf 2.61 for gveejay 1.2. +@%:@ +@%:@ Report bugs to . +@%:@ +@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +@%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +@%:@ This configure script is free software; the Free Software Foundation +@%:@ gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIB@&t@OBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='gveejay' +PACKAGE_TARNAME='gveejay' +PACKAGE_VERSION='1.2' +PACKAGE_STRING='gveejay 1.2' +PACKAGE_BUGREPORT='veejay-users@lists.sourceforge.net' + +ac_unique_file="src/gveejay.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +LT_RELEASE +LT_CURRENT +LT_REVISION +LT_AGE +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +SED +GREP +EGREP +LN_S +ECHO +AR +RANLIB +CPP +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +YACC +YFLAGS +LEX +LEX_OUTPUT_ROOT +LEXLIB +CCAS +CCASFLAGS +CCASDEPMODE +am__fastdepCCAS_TRUE +am__fastdepCCAS_FALSE +LIBGETOPT_LIB +LIBM_LIBS +PTHREAD_LIBS +ALSA_LIBS +PKG_CONFIG +VEEJAY_CFLAGS +VEEJAY_LIBS +VEEJAY_CFLAGS +VEEJAY_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +XMKMF +X_CFLAGS +X_PRE_LIBS +X_LIBS +X_EXTRA_LIBS +HAVE_X_TRUE +HAVE_X_FALSE +DEBUGLIBS +OP_CFLAGS +YUVCFLAGS +PROGRAM_NOPIC +ALTIVEC_CFLAGS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +HAVE_ASM_MMX_TRUE +HAVE_ASM_MMX_FALSE +HAVE_X86CPU_TRUE +HAVE_X86CPU_FALSE +HAVE_PPCCPU_TRUE +HAVE_PPCCPU_FALSE +ARCH_PPC_TRUE +ARCH_PPC_FALSE +ARCH_X86_TRUE +ARCH_X86_FALSE +HAVE_ALTIVEC_TRUE +HAVE_ALTIVEC_FALSE +HAVE_ASM_MMX2_TRUE +HAVE_ASM_MMX2_FALSE +HAVE_ASM_SSE_TRUE +HAVE_ASM_SSE_FALSE +HAVE_ASM_SSE2_TRUE +HAVE_ASM_SSE2_FALSE +HAVE_ASM_NASM_TRUE +HAVE_ASM_NASM_FALSE +HAVE_MMX_TRUE +HAVE_MMX_FALSE +HAVE_SSE_TRUE +HAVE_SSE_FALSE +HAVE_SSE2_TRUE +HAVE_SSE2_FALSE +HAVE_MMX2_TRUE +HAVE_MMX2_FALSE +HAVE_DL_DLOPEN_TRUE +HAVE_DL_DLOPEN_FALSE +USE_GVEEJAYRELOADED_TRUE +USE_GVEEJAYRELOADED_FALSE +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +gveejay_datadir +GLIB_CFLAGS +GLIB_LIBS +GTK_CFLAGS +GTK_LIBS +GLADE_CFLAGS +GLADE_LIBS +LIB@&t@OBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS +YACC +YFLAGS +CCAS +CCASFLAGS +PKG_CONFIG +VEEJAY_CFLAGS +VEEJAY_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +XMKMF +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +GLIB_CFLAGS +GLIB_LIBS +GTK_CFLAGS +GTK_LIBS +GLADE_CFLAGS +GLADE_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures gveejay 1.2 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/gveejay@:>@ + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of gveejay 1.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-strict Compile in paranoia assertion checking + --enable-debug Compile in debugging information + --enable-profiling Compile in profiling information + --enable-compile-warnings + Turn on compiler warnings. + --enable-warnings_as_errors + Compiler warnings are errors. + --enable-simd-accel use SIMD multimedia instructions such as MMX, + AltiVec, etc.if possible + --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ + --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ + --enable-fast-install@<:@=PKGS@:>@ + optimize for fast installation @<:@default=yes@:>@ + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-extra-cflags=flags + Options to be added to CFLAGS (optional) + --without-pixbuf Do not use GDK pixbuf + --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ + --with-pic try to use only PIC/non-PIC objects @<:@default=use + both@:>@ + --with-tags@<:@=TAGS@:>@ include additional configurations @<:@automatic@:>@ + --with-x use the X Window System + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + PKG_CONFIG path to pkg-config utility + VEEJAY_CFLAGS + C compiler flags for VEEJAY, overriding pkg-config + VEEJAY_LIBS linker flags for VEEJAY, overriding pkg-config + MJPEGTOOLS_CFLAGS + C compiler flags for MJPEGTOOLS, overriding pkg-config + MJPEGTOOLS_LIBS + linker flags for MJPEGTOOLS, overriding pkg-config + PIXBUF_CFLAGS + C compiler flags for PIXBUF, overriding pkg-config + PIXBUF_LIBS linker flags for PIXBUF, overriding pkg-config + XMKMF Path to xmkmf, Makefile generator for X Window System + FFMPEG_AVCODEC_CFLAGS + C compiler flags for FFMPEG_AVCODEC, overriding pkg-config + FFMPEG_AVCODEC_LIBS + linker flags for FFMPEG_AVCODEC, overriding pkg-config + FFMPEG_SWSCALER_CFLAGS + C compiler flags for FFMPEG_SWSCALER, overriding pkg-config + FFMPEG_SWSCALER_LIBS + linker flags for FFMPEG_SWSCALER, overriding pkg-config + GTKCAIRO_CFLAGS + C compiler flags for GTKCAIRO, overriding pkg-config + GTKCAIRO_LIBS + linker flags for GTKCAIRO, overriding pkg-config + GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config + GLIB_LIBS linker flags for GLIB, overriding pkg-config + GTK_CFLAGS C compiler flags for GTK, overriding pkg-config + GTK_LIBS linker flags for GTK, overriding pkg-config + GLADE_CFLAGS + C compiler flags for GLADE, overriding pkg-config + GLADE_LIBS linker flags for GLADE, 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" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +gveejay configure 1.2 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by gveejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +@%:@@%:@ --------- @%:@@%:@ +@%:@@%:@ Platform. @%:@@%:@ +@%:@@%:@ --------- @%:@@%:@ + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +@%:@@%:@ ----------- @%:@@%:@ +@%:@@%:@ Core tests. @%:@@%:@ +@%:@@%:@ ----------- @%:@@%:@ + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +@%:@@%:@ ---------------- @%:@@%:@ +@%:@@%:@ Cache variables. @%:@@%:@ +@%:@@%:@ ---------------- @%:@@%:@ +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +@%:@@%:@ ----------------- @%:@@%:@ +@%:@@%:@ Output variables. @%:@@%:@ +@%:@@%:@ ----------------- @%:@@%:@ +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +@%:@@%:@ ------------------- @%:@@%:@ +@%:@@%:@ File substitutions. @%:@@%:@ +@%:@@%:@ ------------------- @%:@@%:@ +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +@%:@@%:@ ----------- @%:@@%:@ +@%:@@%:@ confdefs.h. @%:@@%:@ +@%:@@%:@ ----------- @%:@@%:@ +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + +VEEJAY_MAJOR_VERSION=1 +VEEJAY_MINOR_VERSION=2 +VEEJAY_MICRO_VERSION=0 +VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION +VEEJAY_CODENAME="Reloaded - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" +ac_config_headers="$ac_config_headers config.h" + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gveejay' + VERSION='1.2' + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gveejay' + VERSION='1.2' + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_CONFIG_H 1 +_ACEOF + +# libtool versioning +LT_RELEASE=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION +LT_CURRENT=$VEEJAY_MICRO_VERSION +LT_REVISION=$VEEJAY_MICRO_VERSION +LT_AGE=$VEEJAY_MICRO_VERSION + + + + + +CFLAGS="" +# Check whether --enable-strict was given. +if test "${enable_strict+set}" = set; then + enableval=$enable_strict; +fi + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; +fi + +# Check whether --enable-profile was given. +if test "${enable_profile+set}" = set; then + enableval=$enable_profile; +fi + +# Check whether --enable-compile-warnings was given. +if test "${enable_compile_warnings+set}" = set; then + enableval=$enable_compile_warnings; +fi + +# Check whether --enable-warnings_as_errors was given. +if test "${enable_warnings_as_errors+set}" = set; then + enableval=$enable_warnings_as_errors; +fi + +# Check whether --enable-simd-accel was given. +if test "${enable_simd_accel+set}" = set; then + enableval=$enable_simd_accel; +fi + + +# Check whether --with-extra-cflags was given. +if test "${with_extra_cflags+set}" = set; then + withval=$with_extra_cflags; +fi + + +# Check whether --with-pixbuf was given. +if test "${with_pixbuf+set}" = set; then + withval=$with_pixbuf; +else + with_pixbuf=yes +fi + + + +cat >>confdefs.h <<\_ACEOF +@%:@define _GNU_SOURCE 1 +_ACEOF + + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + +# Check whether --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 + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $@%:@ != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 + +fi + +SED=$lt_cv_path_SED + +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If 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 whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line __oline__ "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + + +esac + +need_locks="$enable_libtool_lock" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +@%:@include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# 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 + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +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 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 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... + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # 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' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + 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 + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_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 +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 + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # 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_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + 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 + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; 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 + link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + 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_libdir_separator=':' + link_all_deplibs=yes + + 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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + 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 + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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 + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + 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' + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +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" + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant 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_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; 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 + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + fix_srcfile_path \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_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 + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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(int, char *[]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + 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].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + ld_shlibs_CXX=no + fi + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# 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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-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_F77='-Bstatic' + fi + ;; + + amigaos*) + # 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_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + 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_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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_F77="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$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_F77='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_F77=no + fi + ;; + + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${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_F77='$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_F77='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$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 + link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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_F77=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_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$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].*|aix5*) + 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_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + 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_F77=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_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=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_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$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*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_F77=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=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_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # 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_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + 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_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # 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_GCJ="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$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_GCJ='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_GCJ=no + fi + ;; + + interix[3-9]*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$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 + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$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].*|aix5*) + 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_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + 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_GCJ=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_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=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_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$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*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_GCJ=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$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' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=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_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $@%:@ != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $@%:@ != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { echo "$as_me:$LINENO: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ (ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { echo "$as_me:$LINENO: checking lex library" >&5 +echo $ECHO_N "checking lex library... $ECHO_C" >&6; } +if test "${ac_cv_lib_lex+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lex=$ac_lib +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 +echo "${ECHO_T}$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat >conftest.$ac_ext <<_ACEOF +#define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_prog_lex_yytext_pointer=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define YYTEXT_POINTER 1 +_ACEOF + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +@%:@define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* 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. */ + char *t; + 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 saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +@%:@define const +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$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 + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$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 -f conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$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 -f conftest* + fi +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= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_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 + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +echo "${ECHO_T}$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 + + + + + + + + +for ac_header in fenv.h stdint.h inttypes.h sys/types.h alloca.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + +for ac_func in posix_memalign memalign fmax lround pow bzero gettimeofday memset mmap strndup strstr strncasecmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in sched_get_priority_max +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + +for ac_func in select socket getpagesize memcpy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ echo "$as_me:$LINENO: checking for getopt_long" >&5 +echo $ECHO_N "checking for getopt_long... $ECHO_C" >&6; } +if test "${ac_cv_func_getopt_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getopt_long to an innocuous variant, in case declares getopt_long. + For example, HP-UX 11i declares gettimeofday. */ +#define getopt_long innocuous_getopt_long + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getopt_long (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getopt_long + +/* 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 getopt_long (); +/* 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_getopt_long || defined __stub___getopt_long +choke me +#endif + +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getopt_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getopt_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 +echo "${ECHO_T}$ac_cv_func_getopt_long" >&6; } +if test $ac_cv_func_getopt_long = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_GETOPT_LONG 1 +_ACEOF + +else + # FreeBSD and BSD/OS have a gnugetopt library for this: + { echo "$as_me:$LINENO: checking for getopt_long in -lgnugetopt" >&5 +echo $ECHO_N "checking for getopt_long in -lgnugetopt... $ECHO_C" >&6; } +if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnugetopt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getopt_long (); +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gnugetopt_getopt_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gnugetopt_getopt_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gnugetopt_getopt_long" >&5 +echo "${ECHO_T}$ac_cv_lib_gnugetopt_getopt_long" >&6; } +if test $ac_cv_lib_gnugetopt_getopt_long = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_GETOPT_LONG 1 +_ACEOF + + LIBGETOPT_LIB="-lgnugetopt" +fi + + +fi + + +{ echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6; } +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for long int" >&5 +echo $ECHO_N "checking for long int... $ECHO_C" >&6; } +if test "${ac_cv_type_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_int" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of long int" >&5 +echo $ECHO_N "checking size of long int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_int=$ac_lo;; +'') if test "$ac_cv_type_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_LONG_INT $ac_cv_sizeof_long_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of size_t" >&5 +echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_size_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + +{ echo "$as_me:$LINENO: checking for float" >&5 +echo $ECHO_N "checking for float... $ECHO_C" >&6; } +if test "${ac_cv_type_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef float ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_float=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_float=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5 +echo "${ECHO_T}$ac_cv_type_float" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of float" >&5 +echo $ECHO_N "checking size of float... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_float=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF + + + + + + + +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +@%:@define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + +{ echo "$as_me:$LINENO: The host is $host $host_cpu $host_vendor $host_os ." >&5 +echo "$as_me: The host is $host $host_cpu $host_vendor $host_os ." >&6;} + +use_gveejayreloaded=true +case $host in + *-*-linux*) + if test "${ac_cv_header_linux_version_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking linux/version.h usability" >&5 +echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking linux/version.h presence" >&5 +echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_version_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; } + +fi +if test $ac_cv_header_linux_version_h = yes; then + have_linux=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_LINUX +_ACEOF + + +else + { { echo "$as_me:$LINENO: error: version.h not found - please install the linux kernel headers" >&5 +echo "$as_me: error: version.h not found - please install the linux kernel headers" >&2;} + { (exit 1); exit 1; }; } + +fi + + + LIBM_LIBS="-lm" + ;; + *-apple-darwin*) + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_DARWIN +_ACEOF + + CFLAGS="$CFLAGS -no-cpp-precomp" + have_darwin=true + LIBM_LIBS="" + ;; + *) + { echo "$as_me:$LINENO: WARNING: Alien platform - Good Luck!" >&5 +echo "$as_me: WARNING: Alien platform - Good Luck!" >&2;} + LIBM_LIBS="" + ;; +esac + + +if test x"$PKG_CONFIG_PATH" = x ; then + { echo "$as_me:$LINENO: The PKG_CONFIG_PATH variable was not set" >&5 +echo "$as_me: The PKG_CONFIG_PATH variable was not set" >&6;} + { echo "$as_me:$LINENO: You should set it to the directories that contain the .pc files" >&5 +echo "$as_me: You should set it to the directories that contain the .pc files" >&6;} + { { echo "$as_me:$LINENO: error: Abort" >&5 +echo "$as_me: error: Abort" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + +have_pthread=false +{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; } +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int +main () +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_pthread_pthread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pthread_pthread_create=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; } +if test $ac_cv_lib_pthread_pthread_create = yes; then + PTHREAD_LIBS="-lpthread" + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_LIBPTHREAD +_ACEOF + + have_pthread=true +fi + + +{ echo "$as_me:$LINENO: checking for pthread_attr_getstacksize" >&5 +echo $ECHO_N "checking for pthread_attr_getstacksize... $ECHO_C" >&6; } +if test "${ac_cv_func_pthread_attr_getstacksize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define pthread_attr_getstacksize to an innocuous variant, in case declares pthread_attr_getstacksize. + For example, HP-UX 11i declares gettimeofday. */ +#define pthread_attr_getstacksize innocuous_pthread_attr_getstacksize + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pthread_attr_getstacksize (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef pthread_attr_getstacksize + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_attr_getstacksize (); +/* 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_pthread_attr_getstacksize || defined __stub___pthread_attr_getstacksize +choke me +#endif + +int +main () +{ +return pthread_attr_getstacksize (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_pthread_attr_getstacksize=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_pthread_attr_getstacksize=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_getstacksize" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_attr_getstacksize" >&6; } +if test $ac_cv_func_pthread_attr_getstacksize = yes; then + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_PTHREADSTACKSIZE +_ACEOF + + +fi + + + +have_alsa=false +{ echo "$as_me:$LINENO: checking for snd_seq_open in -lasound" >&5 +echo $ECHO_N "checking for snd_seq_open in -lasound... $ECHO_C" >&6; } +if test "${ac_cv_lib_asound_snd_seq_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lasound $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char snd_seq_open (); +int +main () +{ +return snd_seq_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_asound_snd_seq_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_asound_snd_seq_open=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_seq_open" >&5 +echo "${ECHO_T}$ac_cv_lib_asound_snd_seq_open" >&6; } +if test $ac_cv_lib_asound_snd_seq_open = yes; then + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ALSA 1 +_ACEOF + + ALSA_LIBS="-lasound" + + have_alsa=true +fi + + +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 +echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking alsa/asoundlib.h usability" >&5 +echo $ECHO_N "checking alsa/asoundlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking alsa/asoundlib.h presence" >&5 +echo $ECHO_N "checking alsa/asoundlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 +echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_alsa_asoundlib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6; } + +fi +if test $ac_cv_header_alsa_asoundlib_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: alsa/asoundlib.h not found - please install the alsa header" >&5 +echo "$as_me: error: alsa/asoundlib.h not found - please install the alsa header" >&2;} + { (exit 1); exit 1; }; } +fi + + + +have_dl_dlopen=false + +{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + +if test "$ac_cv_lib_dl_dlopen" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_DL_DLOPEN +_ACEOF + + have_dl_dlopen=true +fi + +have_veejay=false + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi + +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for VEEJAY" >&5 +echo $ECHO_N "checking for VEEJAY... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$VEEJAY_CFLAGS"; then + pkg_cv_VEEJAY_CFLAGS="$VEEJAY_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"veejay >= 1.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "veejay >= 1.0 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_VEEJAY_CFLAGS=`$PKG_CONFIG --cflags "veejay >= 1.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$VEEJAY_LIBS"; then + pkg_cv_VEEJAY_LIBS="$VEEJAY_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"veejay >= 1.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "veejay >= 1.0 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_VEEJAY_LIBS=`$PKG_CONFIG --libs "veejay >= 1.0 " 2>/dev/null` +else + pkg_failed=yes +fi + 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 + VEEJAY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "veejay >= 1.0 "` + else + VEEJAY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "veejay >= 1.0 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$VEEJAY_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_veejay=false +elif test $pkg_failed = untried; then + have_veejay=false +else + VEEJAY_CFLAGS=$pkg_cv_VEEJAY_CFLAGS + VEEJAY_LIBS=$pkg_cv_VEEJAY_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_veejay=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_VEEJAY 1 +_ACEOF + + +fi + +if test x$have_veejay != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find Veejay." >&5 +echo "$as_me: error: Cannot find Veejay." >&2;} + { (exit 1); exit 1; }; } +fi + +have_mjpegtools=false + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for MJPEGTOOLS" >&5 +echo $ECHO_N "checking for MJPEGTOOLS... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$MJPEGTOOLS_CFLAGS"; then + pkg_cv_MJPEGTOOLS_CFLAGS="$MJPEGTOOLS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mjpegtools >= 1.6 \"") >&5 + ($PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MJPEGTOOLS_CFLAGS=`$PKG_CONFIG --cflags "mjpegtools >= 1.6 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$MJPEGTOOLS_LIBS"; then + pkg_cv_MJPEGTOOLS_LIBS="$MJPEGTOOLS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mjpegtools >= 1.6 \"") >&5 + ($PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MJPEGTOOLS_LIBS=`$PKG_CONFIG --libs "mjpegtools >= 1.6 " 2>/dev/null` +else + pkg_failed=yes +fi + 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 + MJPEGTOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mjpegtools >= 1.6 "` + else + MJPEGTOOLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mjpegtools >= 1.6 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$MJPEGTOOLS_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_mjpegtools=false +elif test $pkg_failed = untried; then + have_mjpegtools=false +else + MJPEGTOOLS_CFLAGS=$pkg_cv_MJPEGTOOLS_CFLAGS + MJPEGTOOLS_LIBS=$pkg_cv_MJPEGTOOLS_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_mjpegtools=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_MJPEGTOOLS 1 +_ACEOF + +fi + +if test x$have_mjpegtools != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find mjpegtools. Did you set PKG_CONFIG_PATH variable?" >&5 +echo "$as_me: error: Cannot find mjpegtools. Did you set PKG_CONFIG_PATH variable?" >&2;} + { (exit 1); exit 1; }; } +fi + +have_pixbuf=false +if test x$with_pixbuf != xno ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for PIXBUF" >&5 +echo $ECHO_N "checking for PIXBUF... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PIXBUF_CFLAGS"; then + pkg_cv_PIXBUF_CFLAGS="$PIXBUF_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0 gdk-pixbuf-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$PIXBUF_LIBS"; then + pkg_cv_PIXBUF_LIBS="$PIXBUF_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0 gdk-pixbuf-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXBUF_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + PIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0"` + else + PIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$PIXBUF_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_pixbuf=false +elif test $pkg_failed = untried; then + have_pixbuf=false +else + PIXBUF_CFLAGS=$pkg_cv_PIXBUF_CFLAGS + PIXBUF_LIBS=$pkg_cv_PIXBUF_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_pixbuf=true + +cat >>confdefs.h <<\_ACEOF +@%:@define USE_GDK_PIXBUF 1 +_ACEOF + +fi +fi + +{ echo "$as_me:$LINENO: checking for __progname" >&5 +echo $ECHO_N "checking for __progname... $ECHO_C" >&6; } +if test "${mjt_cv_extern___progname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +extern char *__progname; + puts(__progname); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + mjt_cv_extern___progname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + mjt_cv_extern___progname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $mjt_cv_extern___progname" >&5 +echo "${ECHO_T}$mjt_cv_extern___progname" >&6; } +if test x$mjt_cv_extern___progname = xyes ; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE___PROGNAME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then + withval=$with_x; +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + case $x_includes,$x_libraries in #( + *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 +echo "$as_me: error: Cannot use X directory names containing '" >&2;} + { (exit 1); exit 1; }; };; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi + +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac +fi +;; #( + *) have_x=yes;; + esac + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + { echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6; } + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +cat >>confdefs.h <<\_ACEOF +@%:@define X_DISPLAY_MISSING 1 +_ACEOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XOpenDisplay (); +int +main () +{ +return XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_stub_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_gethostbyname || defined __stub___gethostbyname +choke me +#endif + +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } + + if test $ac_cv_func_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_bsd_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_connect || defined __stub___connect +choke me +#endif + +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } + + if test $ac_cv_func_connect = no; then + { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } +if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + { echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6; } +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef remove + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_remove || defined __stub___remove +choke me +#endif + +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6; } + + if test $ac_cv_func_remove = no; then + { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_posix_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } +if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + { echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shmat + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shmat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shmat || defined __stub___shmat +choke me +#endif + +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6; } + + if test $ac_cv_func_shmat = no; then + { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shmat (); +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ipc_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } +if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char IceConnectionNumber (); +int +main () +{ +return IceConnectionNumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ICE_IceConnectionNumber=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + + if test x$have_x = xyes; then + HAVE_X_TRUE= + HAVE_X_FALSE='#' +else + HAVE_X_TRUE='#' + HAVE_X_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking whether to compile in profiling information" >&5 +echo $ECHO_N "checking whether to compile in profiling information... $ECHO_C" >&6; } +if test "x$enable_profiling" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -fprofile-arcs -ftest-coverage" + DEBUGLIBS="-lgcov" + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +{ echo "$as_me:$LINENO: checking whether to compile in assertion checking" >&5 +echo $ECHO_N "checking whether to compile in assertion checking... $ECHO_C" >&6; } +if test "x$enable_strict" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -g -DSTRICT_CHECKING" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +have_asm_nasm=false +have_asm_mmx=false +have_asm_sse=false +have_asm_sse2=false +have_asm_mmx2=false +have_asm_3dnow=false +have_cmov=false +have_x86cpu=false +have_x86_64cpu=false +have_altivec=false +have_mips=false +have_ppccpu=false +have_ps2=false + +OP_CFLAGS="" +YUVCFLAGS="-fif-conversion" + +{ echo "$as_me:$LINENO: checking Architecture" >&5 +echo $ECHO_N "checking Architecture... $ECHO_C" >&6; } +case $host_cpu in + i[3-7]86) + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_X86CPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define ARCH_X86 1 +_ACEOF + + have_x86cpu=true + + PROGRAM_NOPIC="-fno-PIC" + + if test "x$enable_debug" != "xyes" ; then + OP_CFLAGS="-O3" + fi + + + + + case $host_cpu in + i686) + CFLAGS="$CFLAGS" + ;; + *) + ;; + esac + + ;; + x86_64*|k8-*) + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_X86_CPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define ARCH_X86_64 1 +_ACEOF + + have_x86cpu=true + have_x86_64cpu=true + CFLAGS="$CFLAGS -fPIC -DPIC" + ;; + powerpc | powerpc64) + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_PPCCPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define ARCH_PPC +_ACEOF + + have_ppccpu=true + + case $host in + *-apple-darwin*) + PROGRAM_NOPIC="-mdynamic-no-pic" # dynamic-no-pic is an Apple gcc option + + ;; + *) + PROGRAM_NOPIC="" + ;; + esac + ;; + mips | mipsel) + +cat >>confdefs.h <<\_ACEOF +@%:@define ARCH_MIPS +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_MIPS +_ACEOF + + have_mips=true + { echo "$as_me:$LINENO: checking if we are compiling on playstation2 hardware" >&5 +echo $ECHO_N "checking if we are compiling on playstation2 hardware... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#include + #include + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + have_ps2=true +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + have_ps2=false +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test x$have_ps2 = xtrue ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_PS2 +_ACEOF + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + ;; + *) + { echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6; } + ;; +esac + + + + +if test x$have_x86cpu = xtrue +then + { echo "$as_me:$LINENO: checking for MMX on processor(s)" >&5 +echo $ECHO_N "checking for MMX on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_mmx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx=yes + else + ac_cv_flag_mmx=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_mmx" >&5 +echo "${ECHO_T}$ac_cv_flag_mmx" >&6; } + + if test $ac_cv_flag_mmx = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_MMX +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_MMX +_ACEOF + + have_asm_mmx=true + fi + + { echo "$as_me:$LINENO: checking for SSE on processor(s)" >&5 +echo $ECHO_N "checking for SSE on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_sse+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse=yes + else + ac_cv_flag_sse=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_sse" >&5 +echo "${ECHO_T}$ac_cv_flag_sse" >&6; } + + if test $ac_cv_flag_sse = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_SSE +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_SSE +_ACEOF + + have_asm_sse=true + fi + + + { echo "$as_me:$LINENO: checking for SSE2 on processor(s)" >&5 +echo $ECHO_N "checking for SSE2 on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_sse2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse2=yes + else + ac_cv_flag_sse2=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_sse2" >&5 +echo "${ECHO_T}$ac_cv_flag_sse2" >&6; } + + if test $ac_cv_flag_sse2 = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_SSE2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_SSE2 +_ACEOF + + have_asm_sse2=true + fi + + { echo "$as_me:$LINENO: checking for 3DNOW on processor(s)" >&5 +echo $ECHO_N "checking for 3DNOW on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_3dnow+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* 3dnow" /proc/cpuinfo > /dev/null; then + ac_cv_flag_3dnow=yes + else + ac_cv_flag_3dnow=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_3dnow" >&5 +echo "${ECHO_T}$ac_cv_flag_3dnow" >&6; } + + if test $ac_cv_flag_3dnow = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_3DNOW +_ACEOF + + have_asm_3dnow=true + fi + + { echo "$as_me:$LINENO: checking for CMOV on processor(s)" >&5 +echo $ECHO_N "checking for CMOV on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_cmov+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* cmov" /proc/cpuinfo > /dev/null; then + ac_cv_flag_cmov=yes + else + ac_cv_flag_cmov=yes + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_cmov" >&5 +echo "${ECHO_T}$ac_cv_flag_cmov" >&6; } + + if test $ac_cv_flag_cmov = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_CMOV +_ACEOF + + have_cmov=true + fi + + + { echo "$as_me:$LINENO: checking for MMX2 on processor(s)" >&5 +echo $ECHO_N "checking for MMX2 on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_mmx2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* mmxext" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx2=yes + else + ac_cv_flag_mmx2=yes + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_mmx2" >&5 +echo "${ECHO_T}$ac_cv_flag_mmx2" >&6; } + + if test $ac_cv_flag_mmx2 = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_MMX2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_MMX2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_MMXEXT +_ACEOF + + have_asm_mmx2=true + fi + +fi + +if test x$have_ppccpu = xtrue +then + { echo "$as_me:$LINENO: checking compiler support for AltiVec" >&5 +echo $ECHO_N "checking compiler support for AltiVec... $ECHO_C" >&6; } + cat > conftest.c < +#endif +int main() { + union { vector signed int v; + signed int i; + } vi; + vi.v = vec_splat_s32(1); + return vi.i; +} +EOF + ALTIVEC_CFLAGS="" + if $CC -o conftest conftest.c >/dev/null 2>&1; then + have_altivec=true + elif $CC $CFLAGS -faltivec -o conftest conftest.c >/dev/null 2>&1; then + # Mac OS X style + have_altivec=true + ALTIVEC_CFLAGS="-faltivec" + elif $CC $CFLAGS -fvec -o conftest conftest.c >/dev/null 2>&1; then + # Motorola style + have_altivec=true + ALTIVEC_CFLAGS="-fvec" + elif $CC $CFLAGS -DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec -o conftest conftest.c >/dev/null 2>&1; then + # gcc 3.1 style + have_altivec=true + ALTIVEC_CFLAGS="-DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec" + fi + rm -f conftest*; + + if test x$have_altivec = xtrue + then + # add -O3 flag + ALTIVEC_CFLAGS="-O3 ${ALTIVEC_CFLAGS}" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ALTIVEC +_ACEOF + + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + +fi + +if test ! -r $srcdir/cpuinfo.sh; then + { { echo "$as_me:$LINENO: error: cpuinfo.sh script not found - do a cvs update" >&5 +echo "$as_me: error: cpuinfo.sh script not found - do a cvs update" >&2;} + { (exit 1); exit 1; }; } +fi + + +if test x$have_x86cpu = xtrue -o x$have_ppccpu = xtrue; then + if test x$host_alias != x; then + { echo "$as_me:$LINENO: checking sub-architecture settings" >&5 +echo $ECHO_N "checking sub-architecture settings... $ECHO_C" >&6; } + if test x$have_x86cpu = xtrue; then + host_mod_cpu=`echo $host_cpu|tr _ -` + ARCHFLAGS="-march=$host_mod_cpu -mcpu=$host_mod_cpu" + { echo "$as_me:$LINENO: result: $ARCHFLAGS" >&5 +echo "${ECHO_T}$ARCHFLAGS" >&6; } + fi + else + { echo "$as_me:$LINENO: checking sub-architecture settings" >&5 +echo $ECHO_N "checking sub-architecture settings... $ECHO_C" >&6; } + chmod +x $srcdir/cpuinfo.sh + + if test x$have_x86cpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh x86` + fi + if test x$have_ppccpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh ppc` + fi + { echo "$as_me:$LINENO: result: $ARCHFLAGS" >&5 +echo "${ECHO_T}$ARCHFLAGS" >&6; } + fi +fi + + +if test x$have_x86cpu = xtrue; +then + { echo "$as_me:$LINENO: enable_debug = $enable_debug" >&5 +echo "$as_me: enable_debug = $enable_debug" >&6;} + if test "x$enable_debug" != "xyes" ; + then + { echo "$as_me:$LINENO: debug koekje" >&5 +echo "$as_me: debug koekje" >&6;} + if test $ac_cv_flag_sse = yes; then + CFLAGS="$CFLAGS -msse -mfpmath=sse" + { echo "$as_me:$LINENO: cflags aangepast" >&5 +echo "$as_me: cflags aangepast" >&6;} + fi + if test $av_cv_flag_sse2 = yes; then + CFLAGS="$CFLAGS -msse2 -mfpmath=sse" + { echo "$as_me:$LINENO: cflags aangepast" >&5 +echo "$as_me: cflags aangepast" >&6;} + fi + fi +fi + +{ echo "$as_me:$LINENO: result: $CFLAGS" >&5 +echo "${ECHO_T}$CFLAGS" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define HAVE_FFMPEG_UNINSTALLED +_ACEOF + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_AVCODEC" >&5 +echo $ECHO_N "checking for FFMPEG_AVCODEC... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVCODEC_CFLAGS"; then + pkg_cv_FFMPEG_AVCODEC_CFLAGS="$FFMPEG_AVCODEC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavcodec\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVCODEC_CFLAGS=`$PKG_CONFIG --cflags "libavcodec" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVCODEC_LIBS"; then + pkg_cv_FFMPEG_AVCODEC_LIBS="$FFMPEG_AVCODEC_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavcodec\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVCODEC_LIBS=`$PKG_CONFIG --libs "libavcodec" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_AVCODEC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavcodec"` + else + FFMPEG_AVCODEC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_AVCODEC_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_avcodec=false +elif test $pkg_failed = untried; then + have_avcodec=false +else + FFMPEG_AVCODEC_CFLAGS=$pkg_cv_FFMPEG_AVCODEC_CFLAGS + FFMPEG_AVCODEC_LIBS=$pkg_cv_FFMPEG_AVCODEC_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_avcodec=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_AVCODEC 1 +_ACEOF + +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_SWSCALER" >&5 +echo $ECHO_N "checking for FFMPEG_SWSCALER... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_SWSCALER_CFLAGS"; then + pkg_cv_FFMPEG_SWSCALER_CFLAGS="$FFMPEG_SWSCALER_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libswscale\"") >&5 + ($PKG_CONFIG --exists --print-errors "libswscale") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_SWSCALER_CFLAGS=`$PKG_CONFIG --cflags "libswscale" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_SWSCALER_LIBS"; then + pkg_cv_FFMPEG_SWSCALER_LIBS="$FFMPEG_SWSCALER_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libswscale\"") >&5 + ($PKG_CONFIG --exists --print-errors "libswscale") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_SWSCALER_LIBS=`$PKG_CONFIG --libs "libswscale" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_SWSCALER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libswscale"` + else + FFMPEG_SWSCALER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libswscale"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_SWSCALER_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_swscaler=false +elif test $pkg_failed = untried; then + have_swscaler=false +else + FFMPEG_SWSCALER_CFLAGS=$pkg_cv_FFMPEG_SWSCALER_CFLAGS + FFMPEG_SWSCALER_LIBS=$pkg_cv_FFMPEG_SWSCALER_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_swscaler=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_SWSCALER 1 +_ACEOF + +fi + + + +if test x$have_avcodec != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net " >&5 +echo "$as_me: error: FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net " >&2;} + { (exit 1); exit 1; }; } +fi + +if test x$have_swscaler != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? " >&5 +echo "$as_me: error: FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? " >&2;} + { (exit 1); exit 1; }; } +fi + +FFMPEG_INCLUDE_AVCODEC="" +FFMPEG_INCLUDE_SWSCALE="" +FFMPEG_INCLUDE_AVUTIL="" + +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avutil.h" >&5 +echo $ECHO_N "checking for ffmpeg/avutil.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avutil_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avutil_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avutil.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avutil.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avutil.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avutil.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avutil.h" >&5 +echo $ECHO_N "checking for ffmpeg/avutil.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avutil_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avutil_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avutil_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avutil_h = yes; then + FFMPEG_INCLUDE_AVUTIL="" +fi + + +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5 +echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avcodec.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avcodec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avcodec.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avcodec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5 +echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avcodec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avcodec_h = yes; then + FFMPEG_INCLUDE_AVCODEC="" +fi + + +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/swscale.h" >&5 +echo $ECHO_N "checking for ffmpeg/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_swscale_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/swscale.h usability" >&5 +echo $ECHO_N "checking ffmpeg/swscale.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/swscale.h presence" >&5 +echo $ECHO_N "checking ffmpeg/swscale.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/swscale.h" >&5 +echo $ECHO_N "checking for ffmpeg/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_swscale_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_swscale_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_swscale_h = yes; then + FFMPEG_INCLUDE_SWSCALE="" +fi + + +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libswscale/swscale.h" >&5 +echo $ECHO_N "checking for libswscale/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libswscale_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_libswscale_swscale_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libswscale/swscale.h usability" >&5 +echo $ECHO_N "checking libswscale/swscale.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libswscale/swscale.h presence" >&5 +echo $ECHO_N "checking libswscale/swscale.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libswscale/swscale.h" >&5 +echo $ECHO_N "checking for libswscale/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libswscale_swscale_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libswscale_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_libswscale_swscale_h" >&6; } + +fi +if test $ac_cv_header_libswscale_swscale_h = yes; then + FFMPEG_INCLUDE_SWSCALE="" +fi + + +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libavcodec/avcodec.h" >&5 +echo $ECHO_N "checking for libavcodec/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavcodec_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavcodec_avcodec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavcodec/avcodec.h usability" >&5 +echo $ECHO_N "checking libavcodec/avcodec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavcodec/avcodec.h presence" >&5 +echo $ECHO_N "checking libavcodec/avcodec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavcodec/avcodec.h" >&5 +echo $ECHO_N "checking for libavcodec/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavcodec_avcodec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavcodec_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavcodec_avcodec_h" >&6; } + +fi +if test $ac_cv_header_libavcodec_avcodec_h = yes; then + FFMPEG_INCLUDE_AVCODEC="" +fi + + +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + { echo "$as_me:$LINENO: checking for libavutil/avutil.h " >&5 +echo $ECHO_N "checking for libavutil/avutil.h ... $ECHO_C" >&6; } +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavutil_avutil_h_" >&5 +echo "${ECHO_T}$ac_cv_header_libavutil_avutil_h_" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavutil/avutil.h usability" >&5 +echo $ECHO_N "checking libavutil/avutil.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavutil/avutil.h presence" >&5 +echo $ECHO_N "checking libavutil/avutil.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavutil/avutil.h " >&5 +echo $ECHO_N "checking for libavutil/avutil.h ... $ECHO_C" >&6; } +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavutil_avutil_h_=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavutil_avutil_h_" >&5 +echo "${ECHO_T}$ac_cv_header_libavutil_avutil_h_" >&6; } + +fi +if test $ac_cv_header_libavutil_avutil_h_ = yes; then + FFMPEG_INCLUDE_AVUTIL="" +fi + + + + +cat >>confdefs.h <<_ACEOF +@%:@define AVCODEC_INC $FFMPEG_INCLUDE_AVCODEC +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define SWSCALE_INC $FFMPEG_INCLUDE_SWSCALE +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define AVUTIL_INC $FFMPEG_INCLUDE_AVUTIL +_ACEOF + + + + if test x$have_asm_mmx = xtrue; then + HAVE_ASM_MMX_TRUE= + HAVE_ASM_MMX_FALSE='#' +else + HAVE_ASM_MMX_TRUE='#' + HAVE_ASM_MMX_FALSE= +fi + + if test x$have_x86cpu = xtrue; then + HAVE_X86CPU_TRUE= + HAVE_X86CPU_FALSE='#' +else + HAVE_X86CPU_TRUE='#' + HAVE_X86CPU_FALSE= +fi + + if test x$have_ppccpu = xtrue; then + HAVE_PPCCPU_TRUE= + HAVE_PPCCPU_FALSE='#' +else + HAVE_PPCCPU_TRUE='#' + HAVE_PPCCPU_FALSE= +fi + + if test x$have_ppccpu = xtrue; then + ARCH_PPC_TRUE= + ARCH_PPC_FALSE='#' +else + ARCH_PPC_TRUE='#' + ARCH_PPC_FALSE= +fi + + if test x$have_x86cpu = xtrue; then + ARCH_X86_TRUE= + ARCH_X86_FALSE='#' +else + ARCH_X86_TRUE='#' + ARCH_X86_FALSE= +fi + + if test x$have_altivec = xtrue; then + HAVE_ALTIVEC_TRUE= + HAVE_ALTIVEC_FALSE='#' +else + HAVE_ALTIVEC_TRUE='#' + HAVE_ALTIVEC_FALSE= +fi + + if test x$have_asm_mmx2 = xtrue; then + HAVE_ASM_MMX2_TRUE= + HAVE_ASM_MMX2_FALSE='#' +else + HAVE_ASM_MMX2_TRUE='#' + HAVE_ASM_MMX2_FALSE= +fi + + if test x$have_asm_sse = xtrue; then + HAVE_ASM_SSE_TRUE= + HAVE_ASM_SSE_FALSE='#' +else + HAVE_ASM_SSE_TRUE='#' + HAVE_ASM_SSE_FALSE= +fi + + if test x$have_asm_sse2 = xtrue; then + HAVE_ASM_SSE2_TRUE= + HAVE_ASM_SSE2_FALSE='#' +else + HAVE_ASM_SSE2_TRUE='#' + HAVE_ASM_SSE2_FALSE= +fi + + if test x$have_asm_nasm = xtrue; then + HAVE_ASM_NASM_TRUE= + HAVE_ASM_NASM_FALSE='#' +else + HAVE_ASM_NASM_TRUE='#' + HAVE_ASM_NASM_FALSE= +fi + + if test x$have_asm_mmx = xtrue; then + HAVE_MMX_TRUE= + HAVE_MMX_FALSE='#' +else + HAVE_MMX_TRUE='#' + HAVE_MMX_FALSE= +fi + + if test x$have_asm_sse = xtrue; then + HAVE_SSE_TRUE= + HAVE_SSE_FALSE='#' +else + HAVE_SSE_TRUE='#' + HAVE_SSE_FALSE= +fi + + if test x$have_asm_sse2 = xtrue; then + HAVE_SSE2_TRUE= + HAVE_SSE2_FALSE='#' +else + HAVE_SSE2_TRUE='#' + HAVE_SSE2_FALSE= +fi + + if test x$have_asm_mmx2 = xtrue; then + HAVE_MMX2_TRUE= + HAVE_MMX2_FALSE='#' +else + HAVE_MMX2_TRUE='#' + HAVE_MMX2_FALSE= +fi + + if test x$have_dl_dlopen = xtrue; then + HAVE_DL_DLOPEN_TRUE= + HAVE_DL_DLOPEN_FALSE='#' +else + HAVE_DL_DLOPEN_TRUE='#' + HAVE_DL_DLOPEN_FALSE= +fi + + if test x$use_gveejayreloaded = xtrue ; then + USE_GVEEJAYRELOADED_TRUE= + USE_GVEEJAYRELOADED_FALSE='#' +else + USE_GVEEJAYRELOADED_TRUE='#' + USE_GVEEJAYRELOADED_FALSE= +fi + + +CFLAGS="$ARCHFLAGS $CFLAGS" +CXXFLAGS="$ARCHFLAGS $CXXFLAGS" + + +if test "x${GCC}" != "xyes" ; then + enable_compile_warnings=no +fi + +{ echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 +echo $ECHO_N "checking what warning flags to pass to the C compiler... $ECHO_C" >&6; } +warnCFLAGS= +warnCXXFLAGS= +if test "x$enable_compile_warnings" != "xno" ; then + if test "x$GCC" = "xyes" ; then + case "$CFLAGS" in + *-Wall*) ;; + *) warnCFLAGS="-Wall -Wunused " ;; + esac + if test "x$enable_compile_warnings" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wundef -Wshadow -Wbad-function-cast -Wconversion -Wpadded -Wunreachable-code -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + fi + if test "x$enable_warnings_as_errors" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Werror" + warnCXXFLAGS="$warnCXXFLAGS -Werror" + fi + fi +fi + +if test "x$cflags_set" != "xyes" ; then + if test "x$enable_debug" = "xyes" ; then + CFLAGS="$debugCFLAGS $warnCFLAGS $CFLAGS" + else + CFLAGS="$CFLAGS $warnCFLAGS" + fi + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS" + cflags_set=yes +fi + + +if test x"$with_extra_cflags" != "x"; then + CFLAGS="$CFLAGS $with_extra_cflags" + CXXFLAGS="$CXXFLAGS $with_extra_cflags" +fi + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GTKCAIRO" >&5 +echo $ECHO_N "checking for GTKCAIRO... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GTKCAIRO_CFLAGS"; then + pkg_cv_GTKCAIRO_CFLAGS="$GTKCAIRO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkcairo >= 0.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtkcairo >= 0.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTKCAIRO_CFLAGS=`$PKG_CONFIG --cflags "gtkcairo >= 0.3" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GTKCAIRO_LIBS"; then + pkg_cv_GTKCAIRO_LIBS="$GTKCAIRO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkcairo >= 0.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtkcairo >= 0.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTKCAIRO_LIBS=`$PKG_CONFIG --libs "gtkcairo >= 0.3" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GTKCAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtkcairo >= 0.3"` + else + GTKCAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtkcairo >= 0.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTKCAIRO_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + use_gtkcairo="no" + +elif test $pkg_failed = untried; then + use_gtkcairo="no" + +else + GTKCAIRO_CFLAGS=$pkg_cv_GTKCAIRO_CFLAGS + GTKCAIRO_LIBS=$pkg_cv_GTKCAIRO_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + use_gtkcairo=yes +fi + +if test "x$use_gtkcairo" = "xyes"; then + + + +cat >>confdefs.h <<\_ACEOF +@%:@define USE_GTKCAIRO +_ACEOF + +else + { { echo "$as_me:$LINENO: error: GtkCairo not found: get it at http://www.cairographics.org/GtkCairo" >&5 +echo "$as_me: error: GtkCairo not found: get it at http://www.cairographics.org/GtkCairo" >&2;} + { (exit 1); exit 1; }; } +fi + +gveejay_datadir="${datadir}/gveejay" + +sh gveejay-paths.sh > gveejay-paths.h + +glib_modules="glib-2.0 >= 2.4" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GLIB" >&5 +echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$glib_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$glib_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "$glib_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$glib_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$glib_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "$glib_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$glib_modules"` + else + GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$glib_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($glib_modules) were not met: + +$GLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($glib_modules) were not met: + +$GLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS + GLIB_LIBS=$pkg_cv_GLIB_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + +gtk_modules="gtk+-2.0 >= 2.4" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GTK" >&5 +echo $ECHO_N "checking for GTK... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GTK_CFLAGS"; then + pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$gtk_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$gtk_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GTK_LIBS"; then + pkg_cv_GTK_LIBS="$GTK_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$gtk_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$gtk_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$gtk_modules"` + else + GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$gtk_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($gtk_modules) were not met: + +$GTK_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($gtk_modules) were not met: + +$GTK_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GTK_CFLAGS=$pkg_cv_GTK_CFLAGS + GTK_LIBS=$pkg_cv_GTK_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + +libglade_modules="libglade-2.0 >= 2.0.1" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GLADE" >&5 +echo $ECHO_N "checking for GLADE... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GLADE_CFLAGS"; then + pkg_cv_GLADE_CFLAGS="$GLADE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$libglade_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$libglade_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLADE_CFLAGS=`$PKG_CONFIG --cflags "$libglade_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GLADE_LIBS"; then + pkg_cv_GLADE_LIBS="$GLADE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$libglade_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$libglade_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLADE_LIBS=`$PKG_CONFIG --libs "$libglade_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GLADE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$libglade_modules"` + else + GLADE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$libglade_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLADE_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($libglade_modules) were not met: + +$GLADE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($libglade_modules) were not met: + +$GLADE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GLADE_CFLAGS=$pkg_cv_GLADE_CFLAGS + GLADE_LIBS=$pkg_cv_GLADE_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + + +ac_config_files="$ac_config_files Makefile src/Makefile gveejay-paths.sh" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIB@&t@OBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X_TRUE}" && test -z "${HAVE_X_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_MMX_TRUE}" && test -z "${HAVE_ASM_MMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X86CPU_TRUE}" && test -z "${HAVE_X86CPU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X86CPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X86CPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_PPCCPU_TRUE}" && test -z "${HAVE_PPCCPU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_PPCCPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_PPCCPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_PPC_TRUE}" && test -z "${ARCH_PPC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_X86_TRUE}" && test -z "${ARCH_X86_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ALTIVEC_TRUE}" && test -z "${HAVE_ALTIVEC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_MMX2_TRUE}" && test -z "${HAVE_ASM_MMX2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_SSE_TRUE}" && test -z "${HAVE_ASM_SSE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_SSE2_TRUE}" && test -z "${HAVE_ASM_SSE2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_NASM_TRUE}" && test -z "${HAVE_ASM_NASM_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_MMX_TRUE}" && test -z "${HAVE_MMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SSE_TRUE}" && test -z "${HAVE_SSE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SSE2_TRUE}" && test -z "${HAVE_SSE2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_MMX2_TRUE}" && test -z "${HAVE_MMX2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_DL_DLOPEN_TRUE}" && test -z "${HAVE_DL_DLOPEN_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_DL_DLOPEN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_DL_DLOPEN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_GVEEJAYRELOADED_TRUE}" && test -z "${USE_GVEEJAYRELOADED_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_GVEEJAYRELOADED\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_GVEEJAYRELOADED\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by gveejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +gveejay config.status 1.2 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX +@%:@@%:@ Running $as_me. @%:@@%:@ +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "gveejay-paths.sh") CONFIG_FILES="$CONFIG_FILES gveejay-paths.sh" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +LT_RELEASE!$LT_RELEASE$ac_delim +LT_CURRENT!$LT_CURRENT$ac_delim +LT_REVISION!$LT_REVISION$ac_delim +LT_AGE!$LT_AGE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +CPP!$CPP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +YACC!$YACC$ac_delim +YFLAGS!$YFLAGS$ac_delim +LEX!$LEX$ac_delim +LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim +LEXLIB!$LEXLIB$ac_delim +CCAS!$CCAS$ac_delim +CCASFLAGS!$CCASFLAGS$ac_delim +CCASDEPMODE!$CCASDEPMODE$ac_delim +am__fastdepCCAS_TRUE!$am__fastdepCCAS_TRUE$ac_delim +am__fastdepCCAS_FALSE!$am__fastdepCCAS_FALSE$ac_delim +LIBGETOPT_LIB!$LIBGETOPT_LIB$ac_delim +LIBM_LIBS!$LIBM_LIBS$ac_delim +PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim +ALSA_LIBS!$ALSA_LIBS$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +VEEJAY_CFLAGS!$VEEJAY_CFLAGS$ac_delim +VEEJAY_LIBS!$VEEJAY_LIBS$ac_delim +VEEJAY_CFLAGS!$VEEJAY_CFLAGS$ac_delim +VEEJAY_LIBS!$VEEJAY_LIBS$ac_delim +MJPEGTOOLS_CFLAGS!$MJPEGTOOLS_CFLAGS$ac_delim +MJPEGTOOLS_LIBS!$MJPEGTOOLS_LIBS$ac_delim +MJPEGTOOLS_CFLAGS!$MJPEGTOOLS_CFLAGS$ac_delim +MJPEGTOOLS_LIBS!$MJPEGTOOLS_LIBS$ac_delim +PIXBUF_CFLAGS!$PIXBUF_CFLAGS$ac_delim +PIXBUF_LIBS!$PIXBUF_LIBS$ac_delim +PIXBUF_CFLAGS!$PIXBUF_CFLAGS$ac_delim +PIXBUF_LIBS!$PIXBUF_LIBS$ac_delim +XMKMF!$XMKMF$ac_delim +X_CFLAGS!$X_CFLAGS$ac_delim +X_PRE_LIBS!$X_PRE_LIBS$ac_delim +X_LIBS!$X_LIBS$ac_delim +X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim +HAVE_X_TRUE!$HAVE_X_TRUE$ac_delim +HAVE_X_FALSE!$HAVE_X_FALSE$ac_delim +DEBUGLIBS!$DEBUGLIBS$ac_delim +OP_CFLAGS!$OP_CFLAGS$ac_delim +YUVCFLAGS!$YUVCFLAGS$ac_delim +PROGRAM_NOPIC!$PROGRAM_NOPIC$ac_delim +ALTIVEC_CFLAGS!$ALTIVEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_CFLAGS!$FFMPEG_AVCODEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_LIBS!$FFMPEG_AVCODEC_LIBS$ac_delim +FFMPEG_AVCODEC_CFLAGS!$FFMPEG_AVCODEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_LIBS!$FFMPEG_AVCODEC_LIBS$ac_delim +FFMPEG_SWSCALER_CFLAGS!$FFMPEG_SWSCALER_CFLAGS$ac_delim +FFMPEG_SWSCALER_LIBS!$FFMPEG_SWSCALER_LIBS$ac_delim +FFMPEG_SWSCALER_CFLAGS!$FFMPEG_SWSCALER_CFLAGS$ac_delim +FFMPEG_SWSCALER_LIBS!$FFMPEG_SWSCALER_LIBS$ac_delim +HAVE_ASM_MMX_TRUE!$HAVE_ASM_MMX_TRUE$ac_delim +HAVE_ASM_MMX_FALSE!$HAVE_ASM_MMX_FALSE$ac_delim +HAVE_X86CPU_TRUE!$HAVE_X86CPU_TRUE$ac_delim +HAVE_X86CPU_FALSE!$HAVE_X86CPU_FALSE$ac_delim +HAVE_PPCCPU_TRUE!$HAVE_PPCCPU_TRUE$ac_delim +HAVE_PPCCPU_FALSE!$HAVE_PPCCPU_FALSE$ac_delim +ARCH_PPC_TRUE!$ARCH_PPC_TRUE$ac_delim +ARCH_PPC_FALSE!$ARCH_PPC_FALSE$ac_delim +ARCH_X86_TRUE!$ARCH_X86_TRUE$ac_delim +ARCH_X86_FALSE!$ARCH_X86_FALSE$ac_delim +HAVE_ALTIVEC_TRUE!$HAVE_ALTIVEC_TRUE$ac_delim +HAVE_ALTIVEC_FALSE!$HAVE_ALTIVEC_FALSE$ac_delim +HAVE_ASM_MMX2_TRUE!$HAVE_ASM_MMX2_TRUE$ac_delim +HAVE_ASM_MMX2_FALSE!$HAVE_ASM_MMX2_FALSE$ac_delim +HAVE_ASM_SSE_TRUE!$HAVE_ASM_SSE_TRUE$ac_delim +HAVE_ASM_SSE_FALSE!$HAVE_ASM_SSE_FALSE$ac_delim +HAVE_ASM_SSE2_TRUE!$HAVE_ASM_SSE2_TRUE$ac_delim +HAVE_ASM_SSE2_FALSE!$HAVE_ASM_SSE2_FALSE$ac_delim +HAVE_ASM_NASM_TRUE!$HAVE_ASM_NASM_TRUE$ac_delim +HAVE_ASM_NASM_FALSE!$HAVE_ASM_NASM_FALSE$ac_delim +HAVE_MMX_TRUE!$HAVE_MMX_TRUE$ac_delim +HAVE_MMX_FALSE!$HAVE_MMX_FALSE$ac_delim +HAVE_SSE_TRUE!$HAVE_SSE_TRUE$ac_delim +HAVE_SSE_FALSE!$HAVE_SSE_FALSE$ac_delim +HAVE_SSE2_TRUE!$HAVE_SSE2_TRUE$ac_delim +HAVE_SSE2_FALSE!$HAVE_SSE2_FALSE$ac_delim +HAVE_MMX2_TRUE!$HAVE_MMX2_TRUE$ac_delim +HAVE_MMX2_FALSE!$HAVE_MMX2_FALSE$ac_delim +HAVE_DL_DLOPEN_TRUE!$HAVE_DL_DLOPEN_TRUE$ac_delim +HAVE_DL_DLOPEN_FALSE!$HAVE_DL_DLOPEN_FALSE$ac_delim +USE_GVEEJAYRELOADED_TRUE!$USE_GVEEJAYRELOADED_TRUE$ac_delim +USE_GVEEJAYRELOADED_FALSE!$USE_GVEEJAYRELOADED_FALSE$ac_delim +GTKCAIRO_CFLAGS!$GTKCAIRO_CFLAGS$ac_delim +GTKCAIRO_LIBS!$GTKCAIRO_LIBS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +GTKCAIRO_CFLAGS!$GTKCAIRO_CFLAGS$ac_delim +GTKCAIRO_LIBS!$GTKCAIRO_LIBS$ac_delim +gveejay_datadir!$gveejay_datadir$ac_delim +GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim +GLIB_LIBS!$GLIB_LIBS$ac_delim +GTK_CFLAGS!$GTK_CFLAGS$ac_delim +GTK_LIBS!$GTK_LIBS$ac_delim +GLADE_CFLAGS!$GLADE_CFLAGS$ac_delim +GLADE_LIBS!$GLADE_LIBS$ac_delim +LIB@&t@OBJS!$LIB@&t@OBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 11; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + +cat >>confdefs.h <<\_ACEOF +@%:@define VERSION ${VERSION} +_ACEOF + + +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: GVeejayReloaded ${VERSION} build configuration :" >&5 +echo "$as_me: GVeejayReloaded ${VERSION} build configuration :" >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Compiler flags: $CFLAGS" >&5 +echo "$as_me: Compiler flags: $CFLAGS" >&6;} +{ echo "$as_me:$LINENO: $YUVCFLAGS" >&5 +echo "$as_me: $YUVCFLAGS" >&6;} +{ echo "$as_me:$LINENO: $OP_CFLAGS" >&5 +echo "$as_me: $OP_CFLAGS" >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Architecture: ${host_cpu} " >&5 +echo "$as_me: Architecture: ${host_cpu} " >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +if test "$have_x86cpu" = "true" ; then +{ echo "$as_me:$LINENO: x86 " >&5 +echo "$as_me: x86 " >&6;} +{ echo "$as_me:$LINENO: MMX enabled : ${ac_cv_flag_mmx}" >&5 +echo "$as_me: MMX enabled : ${ac_cv_flag_mmx}" >&6;} +{ echo "$as_me:$LINENO: MMX2 enabled : ${ac_cv_flag_mmx2}" >&5 +echo "$as_me: MMX2 enabled : ${ac_cv_flag_mmx2}" >&6;} +{ echo "$as_me:$LINENO: SSE enabled : ${ac_cv_flag_sse}" >&5 +echo "$as_me: SSE enabled : ${ac_cv_flag_sse}" >&6;} +{ echo "$as_me:$LINENO: SSE2 enabled : ${ac_cv_flag_sse2}" >&5 +echo "$as_me: SSE2 enabled : ${ac_cv_flag_sse2}" >&6;} +{ echo "$as_me:$LINENO: 3DNOW enabled : ${ac_cv_flag_3dnow}" >&5 +echo "$as_me: 3DNOW enabled : ${ac_cv_flag_3dnow}" >&6;} +{ echo "$as_me:$LINENO: CMOV enabled : ${ac_cv_flag_cmov}" >&5 +echo "$as_me: CMOV enabled : ${ac_cv_flag_cmov}" >&6;} +fi + +if test "$have_ppccpu" = "true" ; then +{ echo "$as_me:$LINENO: ppc" >&5 +echo "$as_me: ppc" >&6;} +{ echo "$as_me:$LINENO: AltiVec enabled : ${have_altivec}" >&5 +echo "$as_me: AltiVec enabled : ${have_altivec}" >&6;} +fi + +if test "$have_mips" = "true" ; then +{ echo "$as_me:$LINENO: mips" >&5 +echo "$as_me: mips" >&6;} +{ echo "$as_me:$LINENO: PS/2 enabled : ${have_ps2}" >&5 +echo "$as_me: PS/2 enabled : ${have_ps2}" >&6;} +fi +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +if test "$have_linux" = "true" ; then +{ echo "$as_me:$LINENO: Platform: Linux" >&5 +echo "$as_me: Platform: Linux" >&6;} +fi + +if test "$have_darwin" = "true" ; then +{ echo "$as_me:$LINENO: Platform: Darwin" >&5 +echo "$as_me: Platform: Darwin" >&6;} +{ echo "$as_me:$LINENO: Good luck! You can be the first! " >&5 +echo "$as_me: Good luck! You can be the first! " >&6;} +fi +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Required dependencies:" >&5 +echo "$as_me: Required dependencies:" >&6;} +{ echo "$as_me:$LINENO: - Veejay 1.0 : ${have_veejay}" >&5 +echo "$as_me: - Veejay 1.0 : ${have_veejay}" >&6;} +{ echo "$as_me:$LINENO: - POSIX Threads (pthread) : ${have_pthread}" >&5 +echo "$as_me: - POSIX Threads (pthread) : ${have_pthread}" >&6;} +{ echo "$as_me:$LINENO: - MJPEGTools : ${have_mjpegtools}" >&5 +echo "$as_me: - MJPEGTools : ${have_mjpegtools}" >&6;} +{ echo "$as_me:$LINENO: - FFmpeg AVCodec : ${have_avcodec} " >&5 +echo "$as_me: - FFmpeg AVCodec : ${have_avcodec} " >&6;} +{ echo "$as_me:$LINENO: - FFmpeg Swscaler : ${have_swscaler} " >&5 +echo "$as_me: - FFmpeg Swscaler : ${have_swscaler} " >&6;} +{ echo "$as_me:$LINENO: - GDK Pixbuf support : ${have_pixbuf}" >&5 +echo "$as_me: - GDK Pixbuf support : ${have_pixbuf}" >&6;} +{ echo "$as_me:$LINENO: - Alsa support (midi sequencer) : ${have_alsa}" >&5 +echo "$as_me: - Alsa support (midi sequencer) : ${have_alsa}" >&6;} diff --git a/veejay-client/autom4te.cache/output.1 b/veejay-client/autom4te.cache/output.1 new file mode 100644 index 00000000..0641f04c --- /dev/null +++ b/veejay-client/autom4te.cache/output.1 @@ -0,0 +1,32347 @@ +@%:@! /bin/sh +@%:@ Guess values for system-dependent variables and create Makefiles. +@%:@ Generated by GNU Autoconf 2.61 for gveejay 1.2. +@%:@ +@%:@ Report bugs to . +@%:@ +@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +@%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +@%:@ This configure script is free software; the Free Software Foundation +@%:@ gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIB@&t@OBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='gveejay' +PACKAGE_TARNAME='gveejay' +PACKAGE_VERSION='1.2' +PACKAGE_STRING='gveejay 1.2' +PACKAGE_BUGREPORT='veejay-users@lists.sourceforge.net' + +ac_unique_file="src/gveejay.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +LT_RELEASE +LT_CURRENT +LT_REVISION +LT_AGE +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +SED +GREP +EGREP +LN_S +ECHO +AR +RANLIB +CPP +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +YACC +YFLAGS +LEX +LEX_OUTPUT_ROOT +LEXLIB +CCAS +CCASFLAGS +CCASDEPMODE +am__fastdepCCAS_TRUE +am__fastdepCCAS_FALSE +LIBGETOPT_LIB +LIBM_LIBS +PTHREAD_LIBS +ALSA_LIBS +PKG_CONFIG +VEEJAY_CFLAGS +VEEJAY_LIBS +VEEJAY_CFLAGS +VEEJAY_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +XMKMF +X_CFLAGS +X_PRE_LIBS +X_LIBS +X_EXTRA_LIBS +HAVE_X_TRUE +HAVE_X_FALSE +DEBUGLIBS +OP_CFLAGS +YUVCFLAGS +PROGRAM_NOPIC +ALTIVEC_CFLAGS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +HAVE_ASM_MMX_TRUE +HAVE_ASM_MMX_FALSE +HAVE_X86CPU_TRUE +HAVE_X86CPU_FALSE +HAVE_PPCCPU_TRUE +HAVE_PPCCPU_FALSE +ARCH_PPC_TRUE +ARCH_PPC_FALSE +ARCH_X86_TRUE +ARCH_X86_FALSE +HAVE_ALTIVEC_TRUE +HAVE_ALTIVEC_FALSE +HAVE_ASM_MMX2_TRUE +HAVE_ASM_MMX2_FALSE +HAVE_ASM_SSE_TRUE +HAVE_ASM_SSE_FALSE +HAVE_ASM_SSE2_TRUE +HAVE_ASM_SSE2_FALSE +HAVE_ASM_NASM_TRUE +HAVE_ASM_NASM_FALSE +HAVE_MMX_TRUE +HAVE_MMX_FALSE +HAVE_SSE_TRUE +HAVE_SSE_FALSE +HAVE_SSE2_TRUE +HAVE_SSE2_FALSE +HAVE_MMX2_TRUE +HAVE_MMX2_FALSE +HAVE_DL_DLOPEN_TRUE +HAVE_DL_DLOPEN_FALSE +USE_GVEEJAYRELOADED_TRUE +USE_GVEEJAYRELOADED_FALSE +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +gveejay_datadir +GLIB_CFLAGS +GLIB_LIBS +GTK_CFLAGS +GTK_LIBS +GLADE_CFLAGS +GLADE_LIBS +LIB@&t@OBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS +YACC +YFLAGS +CCAS +CCASFLAGS +PKG_CONFIG +VEEJAY_CFLAGS +VEEJAY_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +XMKMF +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +GLIB_CFLAGS +GLIB_LIBS +GTK_CFLAGS +GTK_LIBS +GLADE_CFLAGS +GLADE_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures gveejay 1.2 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/gveejay@:>@ + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of gveejay 1.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-strict Compile in paranoia assertion checking + --enable-debug Compile in debugging information + --enable-profiling Compile in profiling information + --enable-compile-warnings + Turn on compiler warnings. + --enable-warnings_as_errors + Compiler warnings are errors. + --enable-simd-accel use SIMD multimedia instructions such as MMX, + AltiVec, etc.if possible + --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ + --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ + --enable-fast-install@<:@=PKGS@:>@ + optimize for fast installation @<:@default=yes@:>@ + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-extra-cflags=flags + Options to be added to CFLAGS (optional) + --without-pixbuf Do not use GDK pixbuf + --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ + --with-pic try to use only PIC/non-PIC objects @<:@default=use + both@:>@ + --with-tags@<:@=TAGS@:>@ include additional configurations @<:@automatic@:>@ + --with-x use the X Window System + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + PKG_CONFIG path to pkg-config utility + VEEJAY_CFLAGS + C compiler flags for VEEJAY, overriding pkg-config + VEEJAY_LIBS linker flags for VEEJAY, overriding pkg-config + MJPEGTOOLS_CFLAGS + C compiler flags for MJPEGTOOLS, overriding pkg-config + MJPEGTOOLS_LIBS + linker flags for MJPEGTOOLS, overriding pkg-config + PIXBUF_CFLAGS + C compiler flags for PIXBUF, overriding pkg-config + PIXBUF_LIBS linker flags for PIXBUF, overriding pkg-config + XMKMF Path to xmkmf, Makefile generator for X Window System + FFMPEG_AVCODEC_CFLAGS + C compiler flags for FFMPEG_AVCODEC, overriding pkg-config + FFMPEG_AVCODEC_LIBS + linker flags for FFMPEG_AVCODEC, overriding pkg-config + FFMPEG_SWSCALER_CFLAGS + C compiler flags for FFMPEG_SWSCALER, overriding pkg-config + FFMPEG_SWSCALER_LIBS + linker flags for FFMPEG_SWSCALER, overriding pkg-config + GTKCAIRO_CFLAGS + C compiler flags for GTKCAIRO, overriding pkg-config + GTKCAIRO_LIBS + linker flags for GTKCAIRO, overriding pkg-config + GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config + GLIB_LIBS linker flags for GLIB, overriding pkg-config + GTK_CFLAGS C compiler flags for GTK, overriding pkg-config + GTK_LIBS linker flags for GTK, overriding pkg-config + GLADE_CFLAGS + C compiler flags for GLADE, overriding pkg-config + GLADE_LIBS linker flags for GLADE, 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" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +gveejay configure 1.2 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by gveejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +@%:@@%:@ --------- @%:@@%:@ +@%:@@%:@ Platform. @%:@@%:@ +@%:@@%:@ --------- @%:@@%:@ + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +@%:@@%:@ ----------- @%:@@%:@ +@%:@@%:@ Core tests. @%:@@%:@ +@%:@@%:@ ----------- @%:@@%:@ + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +@%:@@%:@ ---------------- @%:@@%:@ +@%:@@%:@ Cache variables. @%:@@%:@ +@%:@@%:@ ---------------- @%:@@%:@ +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +@%:@@%:@ ----------------- @%:@@%:@ +@%:@@%:@ Output variables. @%:@@%:@ +@%:@@%:@ ----------------- @%:@@%:@ +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +@%:@@%:@ ------------------- @%:@@%:@ +@%:@@%:@ File substitutions. @%:@@%:@ +@%:@@%:@ ------------------- @%:@@%:@ +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +@%:@@%:@ ----------- @%:@@%:@ +@%:@@%:@ confdefs.h. @%:@@%:@ +@%:@@%:@ ----------- @%:@@%:@ +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + +VEEJAY_MAJOR_VERSION=1 +VEEJAY_MINOR_VERSION=2 +VEEJAY_MICRO_VERSION=0 +VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION +VEEJAY_CODENAME="Reloaded - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" +ac_config_headers="$ac_config_headers config.h" + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gveejay' + VERSION='1.2' + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gveejay' + VERSION='1.2' + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_CONFIG_H 1 +_ACEOF + +# libtool versioning +LT_RELEASE=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION +LT_CURRENT=$VEEJAY_MICRO_VERSION +LT_REVISION=$VEEJAY_MICRO_VERSION +LT_AGE=$VEEJAY_MICRO_VERSION + + + + + +CFLAGS="" +# Check whether --enable-strict was given. +if test "${enable_strict+set}" = set; then + enableval=$enable_strict; +fi + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; +fi + +# Check whether --enable-profile was given. +if test "${enable_profile+set}" = set; then + enableval=$enable_profile; +fi + +# Check whether --enable-compile-warnings was given. +if test "${enable_compile_warnings+set}" = set; then + enableval=$enable_compile_warnings; +fi + +# Check whether --enable-warnings_as_errors was given. +if test "${enable_warnings_as_errors+set}" = set; then + enableval=$enable_warnings_as_errors; +fi + +# Check whether --enable-simd-accel was given. +if test "${enable_simd_accel+set}" = set; then + enableval=$enable_simd_accel; +fi + + +# Check whether --with-extra-cflags was given. +if test "${with_extra_cflags+set}" = set; then + withval=$with_extra_cflags; +fi + + +# Check whether --with-pixbuf was given. +if test "${with_pixbuf+set}" = set; then + withval=$with_pixbuf; +else + with_pixbuf=yes +fi + + + +cat >>confdefs.h <<\_ACEOF +@%:@define _GNU_SOURCE 1 +_ACEOF + + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + +# Check whether --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 + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $@%:@ != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 + +fi + +SED=$lt_cv_path_SED + +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If 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 whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line __oline__ "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + + +esac + +need_locks="$enable_libtool_lock" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +@%:@include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# 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 + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +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 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 conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # 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' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + 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 + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_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 +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 + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # 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_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + 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 + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; 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 + link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + 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_libdir_separator=':' + link_all_deplibs=yes + + 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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + 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 + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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 + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + 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' + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +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" + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant 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_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; 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 + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + fix_srcfile_path \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_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 + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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(int, char *[]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + 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].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + ld_shlibs_CXX=no + fi + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# 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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-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_F77='-Bstatic' + fi + ;; + + amigaos*) + # 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_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + 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_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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_F77="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$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_F77='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_F77=no + fi + ;; + + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${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_F77='$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_F77='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$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 + link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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_F77=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_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$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].*|aix5*) + 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_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + 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_F77=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_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=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_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$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*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_F77=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=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_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # 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_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + 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_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:__oline__: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # 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_GCJ="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$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_GCJ='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_GCJ=no + fi + ;; + + interix[3-9]*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$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 + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$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].*|aix5*) + 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_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + 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_GCJ=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_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=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_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$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*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_GCJ=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$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' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=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_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $@%:@ != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $@%:@ != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { echo "$as_me:$LINENO: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ (ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { echo "$as_me:$LINENO: checking lex library" >&5 +echo $ECHO_N "checking lex library... $ECHO_C" >&6; } +if test "${ac_cv_lib_lex+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lex=$ac_lib +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 +echo "${ECHO_T}$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat >conftest.$ac_ext <<_ACEOF +#define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_prog_lex_yytext_pointer=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define YYTEXT_POINTER 1 +_ACEOF + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +@%:@define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* 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. */ + char *t; + 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 saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +@%:@define const +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$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 + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$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 -f conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$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 -f conftest* + fi +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= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_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 + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +echo "${ECHO_T}$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 + + + + + + + + +for ac_header in fenv.h stdint.h inttypes.h sys/types.h alloca.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + +for ac_func in posix_memalign memalign fmax lround pow bzero gettimeofday memset mmap strndup strstr strncasecmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in sched_get_priority_max +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + +for ac_func in select socket getpagesize memcpy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ echo "$as_me:$LINENO: checking for getopt_long" >&5 +echo $ECHO_N "checking for getopt_long... $ECHO_C" >&6; } +if test "${ac_cv_func_getopt_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getopt_long to an innocuous variant, in case declares getopt_long. + For example, HP-UX 11i declares gettimeofday. */ +#define getopt_long innocuous_getopt_long + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getopt_long (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getopt_long + +/* 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 getopt_long (); +/* 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_getopt_long || defined __stub___getopt_long +choke me +#endif + +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getopt_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getopt_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 +echo "${ECHO_T}$ac_cv_func_getopt_long" >&6; } +if test $ac_cv_func_getopt_long = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_GETOPT_LONG 1 +_ACEOF + +else + # FreeBSD and BSD/OS have a gnugetopt library for this: + { echo "$as_me:$LINENO: checking for getopt_long in -lgnugetopt" >&5 +echo $ECHO_N "checking for getopt_long in -lgnugetopt... $ECHO_C" >&6; } +if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnugetopt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getopt_long (); +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gnugetopt_getopt_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gnugetopt_getopt_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gnugetopt_getopt_long" >&5 +echo "${ECHO_T}$ac_cv_lib_gnugetopt_getopt_long" >&6; } +if test $ac_cv_lib_gnugetopt_getopt_long = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_GETOPT_LONG 1 +_ACEOF + + LIBGETOPT_LIB="-lgnugetopt" +fi + + +fi + + +{ echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6; } +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for long int" >&5 +echo $ECHO_N "checking for long int... $ECHO_C" >&6; } +if test "${ac_cv_type_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_int" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of long int" >&5 +echo $ECHO_N "checking size of long int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_int=$ac_lo;; +'') if test "$ac_cv_type_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_LONG_INT $ac_cv_sizeof_long_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of size_t" >&5 +echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_size_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + +{ echo "$as_me:$LINENO: checking for float" >&5 +echo $ECHO_N "checking for float... $ECHO_C" >&6; } +if test "${ac_cv_type_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef float ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_float=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_float=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5 +echo "${ECHO_T}$ac_cv_type_float" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of float" >&5 +echo $ECHO_N "checking size of float... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@; +test_array @<:@0@:>@ = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +@%:@include +@%:@include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_float=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF + + + + + + + +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +@%:@define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + +{ echo "$as_me:$LINENO: The host is $host $host_cpu $host_vendor $host_os ." >&5 +echo "$as_me: The host is $host $host_cpu $host_vendor $host_os ." >&6;} + +use_gveejayreloaded=true +case $host in + *-*-linux*) + if test "${ac_cv_header_linux_version_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking linux/version.h usability" >&5 +echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking linux/version.h presence" >&5 +echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_version_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; } + +fi +if test $ac_cv_header_linux_version_h = yes; then + have_linux=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_LINUX +_ACEOF + + +else + { { echo "$as_me:$LINENO: error: version.h not found - please install the linux kernel headers" >&5 +echo "$as_me: error: version.h not found - please install the linux kernel headers" >&2;} + { (exit 1); exit 1; }; } + +fi + + + LIBM_LIBS="-lm" + ;; + *-apple-darwin*) + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_DARWIN +_ACEOF + + CFLAGS="$CFLAGS -no-cpp-precomp" + have_darwin=true + LIBM_LIBS="" + ;; + *) + { echo "$as_me:$LINENO: WARNING: Alien platform - Good Luck!" >&5 +echo "$as_me: WARNING: Alien platform - Good Luck!" >&2;} + LIBM_LIBS="" + ;; +esac + + +if test x"$PKG_CONFIG_PATH" = x ; then + { echo "$as_me:$LINENO: The PKG_CONFIG_PATH variable was not set" >&5 +echo "$as_me: The PKG_CONFIG_PATH variable was not set" >&6;} + { echo "$as_me:$LINENO: You should set it to the directories that contain the .pc files" >&5 +echo "$as_me: You should set it to the directories that contain the .pc files" >&6;} + { { echo "$as_me:$LINENO: error: Abort" >&5 +echo "$as_me: error: Abort" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + +have_pthread=false +{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; } +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int +main () +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_pthread_pthread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pthread_pthread_create=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; } +if test $ac_cv_lib_pthread_pthread_create = yes; then + PTHREAD_LIBS="-lpthread" + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_LIBPTHREAD +_ACEOF + + have_pthread=true +fi + + +{ echo "$as_me:$LINENO: checking for pthread_attr_getstacksize" >&5 +echo $ECHO_N "checking for pthread_attr_getstacksize... $ECHO_C" >&6; } +if test "${ac_cv_func_pthread_attr_getstacksize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define pthread_attr_getstacksize to an innocuous variant, in case declares pthread_attr_getstacksize. + For example, HP-UX 11i declares gettimeofday. */ +#define pthread_attr_getstacksize innocuous_pthread_attr_getstacksize + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pthread_attr_getstacksize (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef pthread_attr_getstacksize + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_attr_getstacksize (); +/* 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_pthread_attr_getstacksize || defined __stub___pthread_attr_getstacksize +choke me +#endif + +int +main () +{ +return pthread_attr_getstacksize (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_pthread_attr_getstacksize=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_pthread_attr_getstacksize=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_getstacksize" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_attr_getstacksize" >&6; } +if test $ac_cv_func_pthread_attr_getstacksize = yes; then + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_PTHREADSTACKSIZE +_ACEOF + + +fi + + + +have_alsa=false +{ echo "$as_me:$LINENO: checking for snd_seq_open in -lasound" >&5 +echo $ECHO_N "checking for snd_seq_open in -lasound... $ECHO_C" >&6; } +if test "${ac_cv_lib_asound_snd_seq_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lasound $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char snd_seq_open (); +int +main () +{ +return snd_seq_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_asound_snd_seq_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_asound_snd_seq_open=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_seq_open" >&5 +echo "${ECHO_T}$ac_cv_lib_asound_snd_seq_open" >&6; } +if test $ac_cv_lib_asound_snd_seq_open = yes; then + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ALSA 1 +_ACEOF + + ALSA_LIBS="-lasound" + + have_alsa=true +fi + + +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 +echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking alsa/asoundlib.h usability" >&5 +echo $ECHO_N "checking alsa/asoundlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking alsa/asoundlib.h presence" >&5 +echo $ECHO_N "checking alsa/asoundlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 +echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_alsa_asoundlib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6; } + +fi +if test $ac_cv_header_alsa_asoundlib_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: alsa/asoundlib.h not found - please install the alsa header" >&5 +echo "$as_me: error: alsa/asoundlib.h not found - please install the alsa header" >&2;} + { (exit 1); exit 1; }; } +fi + + + +have_dl_dlopen=false + +{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + +if test "$ac_cv_lib_dl_dlopen" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_DL_DLOPEN +_ACEOF + + have_dl_dlopen=true +fi + +have_veejay=false + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi + +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for VEEJAY" >&5 +echo $ECHO_N "checking for VEEJAY... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$VEEJAY_CFLAGS"; then + pkg_cv_VEEJAY_CFLAGS="$VEEJAY_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"veejay >= 1.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "veejay >= 1.0 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_VEEJAY_CFLAGS=`$PKG_CONFIG --cflags "veejay >= 1.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$VEEJAY_LIBS"; then + pkg_cv_VEEJAY_LIBS="$VEEJAY_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"veejay >= 1.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "veejay >= 1.0 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_VEEJAY_LIBS=`$PKG_CONFIG --libs "veejay >= 1.0 " 2>/dev/null` +else + pkg_failed=yes +fi + 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 + VEEJAY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "veejay >= 1.0 "` + else + VEEJAY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "veejay >= 1.0 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$VEEJAY_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_veejay=false +elif test $pkg_failed = untried; then + have_veejay=false +else + VEEJAY_CFLAGS=$pkg_cv_VEEJAY_CFLAGS + VEEJAY_LIBS=$pkg_cv_VEEJAY_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_veejay=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_VEEJAY 1 +_ACEOF + + +fi + +if test x$have_veejay != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find Veejay." >&5 +echo "$as_me: error: Cannot find Veejay." >&2;} + { (exit 1); exit 1; }; } +fi + +have_mjpegtools=false + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for MJPEGTOOLS" >&5 +echo $ECHO_N "checking for MJPEGTOOLS... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$MJPEGTOOLS_CFLAGS"; then + pkg_cv_MJPEGTOOLS_CFLAGS="$MJPEGTOOLS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mjpegtools >= 1.6 \"") >&5 + ($PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MJPEGTOOLS_CFLAGS=`$PKG_CONFIG --cflags "mjpegtools >= 1.6 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$MJPEGTOOLS_LIBS"; then + pkg_cv_MJPEGTOOLS_LIBS="$MJPEGTOOLS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mjpegtools >= 1.6 \"") >&5 + ($PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MJPEGTOOLS_LIBS=`$PKG_CONFIG --libs "mjpegtools >= 1.6 " 2>/dev/null` +else + pkg_failed=yes +fi + 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 + MJPEGTOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mjpegtools >= 1.6 "` + else + MJPEGTOOLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mjpegtools >= 1.6 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$MJPEGTOOLS_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_mjpegtools=false +elif test $pkg_failed = untried; then + have_mjpegtools=false +else + MJPEGTOOLS_CFLAGS=$pkg_cv_MJPEGTOOLS_CFLAGS + MJPEGTOOLS_LIBS=$pkg_cv_MJPEGTOOLS_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_mjpegtools=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_MJPEGTOOLS 1 +_ACEOF + +fi + +if test x$have_mjpegtools != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find mjpegtools. Did you set PKG_CONFIG_PATH variable?" >&5 +echo "$as_me: error: Cannot find mjpegtools. Did you set PKG_CONFIG_PATH variable?" >&2;} + { (exit 1); exit 1; }; } +fi + +have_pixbuf=false +if test x$with_pixbuf != xno ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for PIXBUF" >&5 +echo $ECHO_N "checking for PIXBUF... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PIXBUF_CFLAGS"; then + pkg_cv_PIXBUF_CFLAGS="$PIXBUF_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0 gdk-pixbuf-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$PIXBUF_LIBS"; then + pkg_cv_PIXBUF_LIBS="$PIXBUF_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0 gdk-pixbuf-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXBUF_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + PIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0"` + else + PIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$PIXBUF_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_pixbuf=false +elif test $pkg_failed = untried; then + have_pixbuf=false +else + PIXBUF_CFLAGS=$pkg_cv_PIXBUF_CFLAGS + PIXBUF_LIBS=$pkg_cv_PIXBUF_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_pixbuf=true + +cat >>confdefs.h <<\_ACEOF +@%:@define USE_GDK_PIXBUF 1 +_ACEOF + +fi +fi + +{ echo "$as_me:$LINENO: checking for __progname" >&5 +echo $ECHO_N "checking for __progname... $ECHO_C" >&6; } +if test "${mjt_cv_extern___progname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +extern char *__progname; + puts(__progname); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + mjt_cv_extern___progname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + mjt_cv_extern___progname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $mjt_cv_extern___progname" >&5 +echo "${ECHO_T}$mjt_cv_extern___progname" >&6; } +if test x$mjt_cv_extern___progname = xyes ; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE___PROGNAME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then + withval=$with_x; +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + case $x_includes,$x_libraries in #( + *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 +echo "$as_me: error: Cannot use X directory names containing '" >&2;} + { (exit 1); exit 1; }; };; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi + +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac +fi +;; #( + *) have_x=yes;; + esac + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + { echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6; } + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +cat >>confdefs.h <<\_ACEOF +@%:@define X_DISPLAY_MISSING 1 +_ACEOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XOpenDisplay (); +int +main () +{ +return XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_stub_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_gethostbyname || defined __stub___gethostbyname +choke me +#endif + +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } + + if test $ac_cv_func_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_bsd_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_connect || defined __stub___connect +choke me +#endif + +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } + + if test $ac_cv_func_connect = no; then + { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } +if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + { echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6; } +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef remove + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_remove || defined __stub___remove +choke me +#endif + +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6; } + + if test $ac_cv_func_remove = no; then + { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_posix_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } +if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + { echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shmat + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shmat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shmat || defined __stub___shmat +choke me +#endif + +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6; } + + if test $ac_cv_func_shmat = no; then + { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shmat (); +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ipc_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } +if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char IceConnectionNumber (); +int +main () +{ +return IceConnectionNumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ICE_IceConnectionNumber=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + + if test x$have_x = xyes; then + HAVE_X_TRUE= + HAVE_X_FALSE='#' +else + HAVE_X_TRUE='#' + HAVE_X_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking whether to compile in profiling information" >&5 +echo $ECHO_N "checking whether to compile in profiling information... $ECHO_C" >&6; } +if test "x$enable_profiling" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -fprofile-arcs -ftest-coverage" + DEBUGLIBS="-lgcov" + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +{ echo "$as_me:$LINENO: checking whether to compile in assertion checking" >&5 +echo $ECHO_N "checking whether to compile in assertion checking... $ECHO_C" >&6; } +if test "x$enable_strict" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -g -DSTRICT_CHECKING" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +have_asm_nasm=false +have_asm_mmx=false +have_asm_sse=false +have_asm_sse2=false +have_asm_mmx2=false +have_asm_3dnow=false +have_cmov=false +have_x86cpu=false +have_x86_64cpu=false +have_altivec=false +have_mips=false +have_ppccpu=false +have_ps2=false + +OP_CFLAGS="" +YUVCFLAGS="-fif-conversion" + +{ echo "$as_me:$LINENO: checking Architecture" >&5 +echo $ECHO_N "checking Architecture... $ECHO_C" >&6; } +case $host_cpu in + i[3-7]86) + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_X86CPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define ARCH_X86 1 +_ACEOF + + have_x86cpu=true + + PROGRAM_NOPIC="-fno-PIC" + + if test "x$enable_debug" != "xyes" ; then + OP_CFLAGS="-O3" + fi + + + + + case $host_cpu in + i686) + CFLAGS="$CFLAGS" + ;; + *) + ;; + esac + + ;; + x86_64*|k8-*) + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_X86_CPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define ARCH_X86_64 1 +_ACEOF + + have_x86cpu=true + have_x86_64cpu=true + CFLAGS="$CFLAGS -fPIC -DPIC" + ;; + powerpc | powerpc64) + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_PPCCPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define ARCH_PPC +_ACEOF + + have_ppccpu=true + + case $host in + *-apple-darwin*) + PROGRAM_NOPIC="-mdynamic-no-pic" # dynamic-no-pic is an Apple gcc option + + ;; + *) + PROGRAM_NOPIC="" + ;; + esac + ;; + mips | mipsel) + +cat >>confdefs.h <<\_ACEOF +@%:@define ARCH_MIPS +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_MIPS +_ACEOF + + have_mips=true + { echo "$as_me:$LINENO: checking if we are compiling on playstation2 hardware" >&5 +echo $ECHO_N "checking if we are compiling on playstation2 hardware... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#include + #include + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + have_ps2=true +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + have_ps2=false +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test x$have_ps2 = xtrue ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_PS2 +_ACEOF + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + ;; + *) + { echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6; } + ;; +esac + + + + +if test x$have_x86cpu = xtrue +then + { echo "$as_me:$LINENO: checking for MMX on processor(s)" >&5 +echo $ECHO_N "checking for MMX on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_mmx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx=yes + else + ac_cv_flag_mmx=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_mmx" >&5 +echo "${ECHO_T}$ac_cv_flag_mmx" >&6; } + + if test $ac_cv_flag_mmx = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_MMX +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_MMX +_ACEOF + + have_asm_mmx=true + fi + + { echo "$as_me:$LINENO: checking for SSE on processor(s)" >&5 +echo $ECHO_N "checking for SSE on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_sse+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse=yes + else + ac_cv_flag_sse=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_sse" >&5 +echo "${ECHO_T}$ac_cv_flag_sse" >&6; } + + if test $ac_cv_flag_sse = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_SSE +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_SSE +_ACEOF + + have_asm_sse=true + fi + + + { echo "$as_me:$LINENO: checking for SSE2 on processor(s)" >&5 +echo $ECHO_N "checking for SSE2 on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_sse2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse2=yes + else + ac_cv_flag_sse2=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_sse2" >&5 +echo "${ECHO_T}$ac_cv_flag_sse2" >&6; } + + if test $ac_cv_flag_sse2 = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_SSE2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_SSE2 +_ACEOF + + have_asm_sse2=true + fi + + { echo "$as_me:$LINENO: checking for 3DNOW on processor(s)" >&5 +echo $ECHO_N "checking for 3DNOW on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_3dnow+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* 3dnow" /proc/cpuinfo > /dev/null; then + ac_cv_flag_3dnow=yes + else + ac_cv_flag_3dnow=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_3dnow" >&5 +echo "${ECHO_T}$ac_cv_flag_3dnow" >&6; } + + if test $ac_cv_flag_3dnow = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_3DNOW +_ACEOF + + have_asm_3dnow=true + fi + + { echo "$as_me:$LINENO: checking for CMOV on processor(s)" >&5 +echo $ECHO_N "checking for CMOV on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_cmov+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* cmov" /proc/cpuinfo > /dev/null; then + ac_cv_flag_cmov=yes + else + ac_cv_flag_cmov=yes + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_cmov" >&5 +echo "${ECHO_T}$ac_cv_flag_cmov" >&6; } + + if test $ac_cv_flag_cmov = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_CMOV +_ACEOF + + have_cmov=true + fi + + + { echo "$as_me:$LINENO: checking for MMX2 on processor(s)" >&5 +echo $ECHO_N "checking for MMX2 on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_mmx2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* mmxext" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx2=yes + else + ac_cv_flag_mmx2=yes + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_mmx2" >&5 +echo "${ECHO_T}$ac_cv_flag_mmx2" >&6; } + + if test $ac_cv_flag_mmx2 = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_MMX2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_MMX2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ASM_MMXEXT +_ACEOF + + have_asm_mmx2=true + fi + +fi + +if test x$have_ppccpu = xtrue +then + { echo "$as_me:$LINENO: checking compiler support for AltiVec" >&5 +echo $ECHO_N "checking compiler support for AltiVec... $ECHO_C" >&6; } + cat > conftest.c < +#endif +int main() { + union { vector signed int v; + signed int i; + } vi; + vi.v = vec_splat_s32(1); + return vi.i; +} +EOF + ALTIVEC_CFLAGS="" + if $CC -o conftest conftest.c >/dev/null 2>&1; then + have_altivec=true + elif $CC $CFLAGS -faltivec -o conftest conftest.c >/dev/null 2>&1; then + # Mac OS X style + have_altivec=true + ALTIVEC_CFLAGS="-faltivec" + elif $CC $CFLAGS -fvec -o conftest conftest.c >/dev/null 2>&1; then + # Motorola style + have_altivec=true + ALTIVEC_CFLAGS="-fvec" + elif $CC $CFLAGS -DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec -o conftest conftest.c >/dev/null 2>&1; then + # gcc 3.1 style + have_altivec=true + ALTIVEC_CFLAGS="-DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec" + fi + rm -f conftest*; + + if test x$have_altivec = xtrue + then + # add -O3 flag + ALTIVEC_CFLAGS="-O3 ${ALTIVEC_CFLAGS}" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_ALTIVEC +_ACEOF + + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + +fi + +if test ! -r $srcdir/cpuinfo.sh; then + { { echo "$as_me:$LINENO: error: cpuinfo.sh script not found - do a cvs update" >&5 +echo "$as_me: error: cpuinfo.sh script not found - do a cvs update" >&2;} + { (exit 1); exit 1; }; } +fi + + +if test x$have_x86cpu = xtrue -o x$have_ppccpu = xtrue; then + if test x$host_alias != x; then + { echo "$as_me:$LINENO: checking sub-architecture settings" >&5 +echo $ECHO_N "checking sub-architecture settings... $ECHO_C" >&6; } + if test x$have_x86cpu = xtrue; then + host_mod_cpu=`echo $host_cpu|tr _ -` + ARCHFLAGS="-march=$host_mod_cpu -mcpu=$host_mod_cpu" + { echo "$as_me:$LINENO: result: $ARCHFLAGS" >&5 +echo "${ECHO_T}$ARCHFLAGS" >&6; } + fi + else + { echo "$as_me:$LINENO: checking sub-architecture settings" >&5 +echo $ECHO_N "checking sub-architecture settings... $ECHO_C" >&6; } + chmod +x $srcdir/cpuinfo.sh + + if test x$have_x86cpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh x86` + fi + if test x$have_ppccpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh ppc` + fi + { echo "$as_me:$LINENO: result: $ARCHFLAGS" >&5 +echo "${ECHO_T}$ARCHFLAGS" >&6; } + fi +fi + + +if test x$have_x86cpu = xtrue; +then + { echo "$as_me:$LINENO: enable_debug = $enable_debug" >&5 +echo "$as_me: enable_debug = $enable_debug" >&6;} + if test "x$enable_debug" != "xyes" ; + then + { echo "$as_me:$LINENO: debug koekje" >&5 +echo "$as_me: debug koekje" >&6;} + if test $ac_cv_flag_sse = yes; then + CFLAGS="$CFLAGS -msse -mfpmath=sse" + { echo "$as_me:$LINENO: cflags aangepast" >&5 +echo "$as_me: cflags aangepast" >&6;} + fi + if test $av_cv_flag_sse2 = yes; then + CFLAGS="$CFLAGS -msse2 -mfpmath=sse" + { echo "$as_me:$LINENO: cflags aangepast" >&5 +echo "$as_me: cflags aangepast" >&6;} + fi + fi +fi + +{ echo "$as_me:$LINENO: result: $CFLAGS" >&5 +echo "${ECHO_T}$CFLAGS" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define HAVE_FFMPEG_UNINSTALLED +_ACEOF + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_AVCODEC" >&5 +echo $ECHO_N "checking for FFMPEG_AVCODEC... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVCODEC_CFLAGS"; then + pkg_cv_FFMPEG_AVCODEC_CFLAGS="$FFMPEG_AVCODEC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavcodec\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVCODEC_CFLAGS=`$PKG_CONFIG --cflags "libavcodec" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVCODEC_LIBS"; then + pkg_cv_FFMPEG_AVCODEC_LIBS="$FFMPEG_AVCODEC_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavcodec\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVCODEC_LIBS=`$PKG_CONFIG --libs "libavcodec" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_AVCODEC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavcodec"` + else + FFMPEG_AVCODEC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_AVCODEC_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_avcodec=false +elif test $pkg_failed = untried; then + have_avcodec=false +else + FFMPEG_AVCODEC_CFLAGS=$pkg_cv_FFMPEG_AVCODEC_CFLAGS + FFMPEG_AVCODEC_LIBS=$pkg_cv_FFMPEG_AVCODEC_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_avcodec=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_AVCODEC 1 +_ACEOF + +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_SWSCALER" >&5 +echo $ECHO_N "checking for FFMPEG_SWSCALER... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_SWSCALER_CFLAGS"; then + pkg_cv_FFMPEG_SWSCALER_CFLAGS="$FFMPEG_SWSCALER_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libswscale\"") >&5 + ($PKG_CONFIG --exists --print-errors "libswscale") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_SWSCALER_CFLAGS=`$PKG_CONFIG --cflags "libswscale" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_SWSCALER_LIBS"; then + pkg_cv_FFMPEG_SWSCALER_LIBS="$FFMPEG_SWSCALER_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libswscale\"") >&5 + ($PKG_CONFIG --exists --print-errors "libswscale") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_SWSCALER_LIBS=`$PKG_CONFIG --libs "libswscale" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_SWSCALER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libswscale"` + else + FFMPEG_SWSCALER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libswscale"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_SWSCALER_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_swscaler=false +elif test $pkg_failed = untried; then + have_swscaler=false +else + FFMPEG_SWSCALER_CFLAGS=$pkg_cv_FFMPEG_SWSCALER_CFLAGS + FFMPEG_SWSCALER_LIBS=$pkg_cv_FFMPEG_SWSCALER_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_swscaler=true + +cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_SWSCALER 1 +_ACEOF + +fi + + + +if test x$have_avcodec != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net " >&5 +echo "$as_me: error: FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net " >&2;} + { (exit 1); exit 1; }; } +fi + +if test x$have_swscaler != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? " >&5 +echo "$as_me: error: FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? " >&2;} + { (exit 1); exit 1; }; } +fi + +FFMPEG_INCLUDE_AVCODEC="" +FFMPEG_INCLUDE_SWSCALE="" +FFMPEG_INCLUDE_AVUTIL="" + +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avutil.h" >&5 +echo $ECHO_N "checking for ffmpeg/avutil.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avutil_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avutil_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avutil.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avutil.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avutil.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avutil.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avutil.h" >&5 +echo $ECHO_N "checking for ffmpeg/avutil.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avutil_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avutil_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avutil_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avutil_h = yes; then + FFMPEG_INCLUDE_AVUTIL="" +fi + + +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5 +echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avcodec.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avcodec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avcodec.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avcodec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5 +echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avcodec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avcodec_h = yes; then + FFMPEG_INCLUDE_AVCODEC="" +fi + + +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/swscale.h" >&5 +echo $ECHO_N "checking for ffmpeg/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_swscale_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/swscale.h usability" >&5 +echo $ECHO_N "checking ffmpeg/swscale.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/swscale.h presence" >&5 +echo $ECHO_N "checking ffmpeg/swscale.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/swscale.h" >&5 +echo $ECHO_N "checking for ffmpeg/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_swscale_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_swscale_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_swscale_h = yes; then + FFMPEG_INCLUDE_SWSCALE="" +fi + + +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libswscale/swscale.h" >&5 +echo $ECHO_N "checking for libswscale/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libswscale_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_libswscale_swscale_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libswscale/swscale.h usability" >&5 +echo $ECHO_N "checking libswscale/swscale.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libswscale/swscale.h presence" >&5 +echo $ECHO_N "checking libswscale/swscale.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libswscale/swscale.h" >&5 +echo $ECHO_N "checking for libswscale/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libswscale_swscale_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libswscale_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_libswscale_swscale_h" >&6; } + +fi +if test $ac_cv_header_libswscale_swscale_h = yes; then + FFMPEG_INCLUDE_SWSCALE="" +fi + + +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libavcodec/avcodec.h" >&5 +echo $ECHO_N "checking for libavcodec/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavcodec_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavcodec_avcodec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavcodec/avcodec.h usability" >&5 +echo $ECHO_N "checking libavcodec/avcodec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavcodec/avcodec.h presence" >&5 +echo $ECHO_N "checking libavcodec/avcodec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavcodec/avcodec.h" >&5 +echo $ECHO_N "checking for libavcodec/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavcodec_avcodec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavcodec_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavcodec_avcodec_h" >&6; } + +fi +if test $ac_cv_header_libavcodec_avcodec_h = yes; then + FFMPEG_INCLUDE_AVCODEC="" +fi + + +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + { echo "$as_me:$LINENO: checking for libavutil/avutil.h " >&5 +echo $ECHO_N "checking for libavutil/avutil.h ... $ECHO_C" >&6; } +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavutil_avutil_h_" >&5 +echo "${ECHO_T}$ac_cv_header_libavutil_avutil_h_" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavutil/avutil.h usability" >&5 +echo $ECHO_N "checking libavutil/avutil.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +@%:@include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavutil/avutil.h presence" >&5 +echo $ECHO_N "checking libavutil/avutil.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +@%:@include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +@%:@@%:@ Report this to veejay-users@lists.sourceforge.net @%:@@%:@ +@%:@@%:@ ------------------------------------------------- @%:@@%:@ +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavutil/avutil.h " >&5 +echo $ECHO_N "checking for libavutil/avutil.h ... $ECHO_C" >&6; } +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavutil_avutil_h_=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavutil_avutil_h_" >&5 +echo "${ECHO_T}$ac_cv_header_libavutil_avutil_h_" >&6; } + +fi +if test $ac_cv_header_libavutil_avutil_h_ = yes; then + FFMPEG_INCLUDE_AVUTIL="" +fi + + + + +cat >>confdefs.h <<_ACEOF +@%:@define AVCODEC_INC $FFMPEG_INCLUDE_AVCODEC +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define SWSCALE_INC $FFMPEG_INCLUDE_SWSCALE +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define AVUTIL_INC $FFMPEG_INCLUDE_AVUTIL +_ACEOF + + + + if test x$have_asm_mmx = xtrue; then + HAVE_ASM_MMX_TRUE= + HAVE_ASM_MMX_FALSE='#' +else + HAVE_ASM_MMX_TRUE='#' + HAVE_ASM_MMX_FALSE= +fi + + if test x$have_x86cpu = xtrue; then + HAVE_X86CPU_TRUE= + HAVE_X86CPU_FALSE='#' +else + HAVE_X86CPU_TRUE='#' + HAVE_X86CPU_FALSE= +fi + + if test x$have_ppccpu = xtrue; then + HAVE_PPCCPU_TRUE= + HAVE_PPCCPU_FALSE='#' +else + HAVE_PPCCPU_TRUE='#' + HAVE_PPCCPU_FALSE= +fi + + if test x$have_ppccpu = xtrue; then + ARCH_PPC_TRUE= + ARCH_PPC_FALSE='#' +else + ARCH_PPC_TRUE='#' + ARCH_PPC_FALSE= +fi + + if test x$have_x86cpu = xtrue; then + ARCH_X86_TRUE= + ARCH_X86_FALSE='#' +else + ARCH_X86_TRUE='#' + ARCH_X86_FALSE= +fi + + if test x$have_altivec = xtrue; then + HAVE_ALTIVEC_TRUE= + HAVE_ALTIVEC_FALSE='#' +else + HAVE_ALTIVEC_TRUE='#' + HAVE_ALTIVEC_FALSE= +fi + + if test x$have_asm_mmx2 = xtrue; then + HAVE_ASM_MMX2_TRUE= + HAVE_ASM_MMX2_FALSE='#' +else + HAVE_ASM_MMX2_TRUE='#' + HAVE_ASM_MMX2_FALSE= +fi + + if test x$have_asm_sse = xtrue; then + HAVE_ASM_SSE_TRUE= + HAVE_ASM_SSE_FALSE='#' +else + HAVE_ASM_SSE_TRUE='#' + HAVE_ASM_SSE_FALSE= +fi + + if test x$have_asm_sse2 = xtrue; then + HAVE_ASM_SSE2_TRUE= + HAVE_ASM_SSE2_FALSE='#' +else + HAVE_ASM_SSE2_TRUE='#' + HAVE_ASM_SSE2_FALSE= +fi + + if test x$have_asm_nasm = xtrue; then + HAVE_ASM_NASM_TRUE= + HAVE_ASM_NASM_FALSE='#' +else + HAVE_ASM_NASM_TRUE='#' + HAVE_ASM_NASM_FALSE= +fi + + if test x$have_asm_mmx = xtrue; then + HAVE_MMX_TRUE= + HAVE_MMX_FALSE='#' +else + HAVE_MMX_TRUE='#' + HAVE_MMX_FALSE= +fi + + if test x$have_asm_sse = xtrue; then + HAVE_SSE_TRUE= + HAVE_SSE_FALSE='#' +else + HAVE_SSE_TRUE='#' + HAVE_SSE_FALSE= +fi + + if test x$have_asm_sse2 = xtrue; then + HAVE_SSE2_TRUE= + HAVE_SSE2_FALSE='#' +else + HAVE_SSE2_TRUE='#' + HAVE_SSE2_FALSE= +fi + + if test x$have_asm_mmx2 = xtrue; then + HAVE_MMX2_TRUE= + HAVE_MMX2_FALSE='#' +else + HAVE_MMX2_TRUE='#' + HAVE_MMX2_FALSE= +fi + + if test x$have_dl_dlopen = xtrue; then + HAVE_DL_DLOPEN_TRUE= + HAVE_DL_DLOPEN_FALSE='#' +else + HAVE_DL_DLOPEN_TRUE='#' + HAVE_DL_DLOPEN_FALSE= +fi + + if test x$use_gveejayreloaded = xtrue ; then + USE_GVEEJAYRELOADED_TRUE= + USE_GVEEJAYRELOADED_FALSE='#' +else + USE_GVEEJAYRELOADED_TRUE='#' + USE_GVEEJAYRELOADED_FALSE= +fi + + +CFLAGS="$ARCHFLAGS $CFLAGS" +CXXFLAGS="$ARCHFLAGS $CXXFLAGS" + + +if test "x${GCC}" != "xyes" ; then + enable_compile_warnings=no +fi + +{ echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 +echo $ECHO_N "checking what warning flags to pass to the C compiler... $ECHO_C" >&6; } +warnCFLAGS= +warnCXXFLAGS= +if test "x$enable_compile_warnings" != "xno" ; then + if test "x$GCC" = "xyes" ; then + case "$CFLAGS" in + *-Wall*) ;; + *) warnCFLAGS="-Wall -Wunused " ;; + esac + if test "x$enable_compile_warnings" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wundef -Wshadow -Wbad-function-cast -Wconversion -Wpadded -Wunreachable-code -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + fi + if test "x$enable_warnings_as_errors" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Werror" + warnCXXFLAGS="$warnCXXFLAGS -Werror" + fi + fi +fi + +if test "x$cflags_set" != "xyes" ; then + if test "x$enable_debug" = "xyes" ; then + CFLAGS="$debugCFLAGS $warnCFLAGS $CFLAGS" + else + CFLAGS="$CFLAGS $warnCFLAGS" + fi + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS" + cflags_set=yes +fi + + +if test x"$with_extra_cflags" != "x"; then + CFLAGS="$CFLAGS $with_extra_cflags" + CXXFLAGS="$CXXFLAGS $with_extra_cflags" +fi + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GTKCAIRO" >&5 +echo $ECHO_N "checking for GTKCAIRO... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GTKCAIRO_CFLAGS"; then + pkg_cv_GTKCAIRO_CFLAGS="$GTKCAIRO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkcairo >= 0.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtkcairo >= 0.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTKCAIRO_CFLAGS=`$PKG_CONFIG --cflags "gtkcairo >= 0.3" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GTKCAIRO_LIBS"; then + pkg_cv_GTKCAIRO_LIBS="$GTKCAIRO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkcairo >= 0.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtkcairo >= 0.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTKCAIRO_LIBS=`$PKG_CONFIG --libs "gtkcairo >= 0.3" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GTKCAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtkcairo >= 0.3"` + else + GTKCAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtkcairo >= 0.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTKCAIRO_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + use_gtkcairo="no" + +elif test $pkg_failed = untried; then + use_gtkcairo="no" + +else + GTKCAIRO_CFLAGS=$pkg_cv_GTKCAIRO_CFLAGS + GTKCAIRO_LIBS=$pkg_cv_GTKCAIRO_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + use_gtkcairo=yes +fi + +if test "x$use_gtkcairo" = "xyes"; then + + + +cat >>confdefs.h <<\_ACEOF +@%:@define USE_GTKCAIRO +_ACEOF + +else + { { echo "$as_me:$LINENO: error: GtkCairo not found: get it at http://www.cairographics.org/GtkCairo" >&5 +echo "$as_me: error: GtkCairo not found: get it at http://www.cairographics.org/GtkCairo" >&2;} + { (exit 1); exit 1; }; } +fi + +gveejay_datadir="${datadir}/gveejay" + +sh gveejay-paths.sh > gveejay-paths.h + +glib_modules="glib-2.0 >= 2.4" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GLIB" >&5 +echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$glib_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$glib_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "$glib_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$glib_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$glib_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "$glib_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$glib_modules"` + else + GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$glib_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($glib_modules) were not met: + +$GLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($glib_modules) were not met: + +$GLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS + GLIB_LIBS=$pkg_cv_GLIB_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + +gtk_modules="gtk+-2.0 >= 2.4" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GTK" >&5 +echo $ECHO_N "checking for GTK... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GTK_CFLAGS"; then + pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$gtk_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$gtk_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GTK_LIBS"; then + pkg_cv_GTK_LIBS="$GTK_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$gtk_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$gtk_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$gtk_modules"` + else + GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$gtk_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($gtk_modules) were not met: + +$GTK_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($gtk_modules) were not met: + +$GTK_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GTK_CFLAGS=$pkg_cv_GTK_CFLAGS + GTK_LIBS=$pkg_cv_GTK_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + +libglade_modules="libglade-2.0 >= 2.0.1" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GLADE" >&5 +echo $ECHO_N "checking for GLADE... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GLADE_CFLAGS"; then + pkg_cv_GLADE_CFLAGS="$GLADE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$libglade_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$libglade_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLADE_CFLAGS=`$PKG_CONFIG --cflags "$libglade_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GLADE_LIBS"; then + pkg_cv_GLADE_LIBS="$GLADE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$libglade_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$libglade_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLADE_LIBS=`$PKG_CONFIG --libs "$libglade_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GLADE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$libglade_modules"` + else + GLADE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$libglade_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLADE_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($libglade_modules) were not met: + +$GLADE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($libglade_modules) were not met: + +$GLADE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GLADE_CFLAGS=$pkg_cv_GLADE_CFLAGS + GLADE_LIBS=$pkg_cv_GLADE_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + + +ac_config_files="$ac_config_files Makefile src/Makefile gveejay-paths.sh" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIB@&t@OBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X_TRUE}" && test -z "${HAVE_X_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_MMX_TRUE}" && test -z "${HAVE_ASM_MMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X86CPU_TRUE}" && test -z "${HAVE_X86CPU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X86CPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X86CPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_PPCCPU_TRUE}" && test -z "${HAVE_PPCCPU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_PPCCPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_PPCCPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_PPC_TRUE}" && test -z "${ARCH_PPC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_X86_TRUE}" && test -z "${ARCH_X86_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ALTIVEC_TRUE}" && test -z "${HAVE_ALTIVEC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_MMX2_TRUE}" && test -z "${HAVE_ASM_MMX2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_SSE_TRUE}" && test -z "${HAVE_ASM_SSE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_SSE2_TRUE}" && test -z "${HAVE_ASM_SSE2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_NASM_TRUE}" && test -z "${HAVE_ASM_NASM_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_MMX_TRUE}" && test -z "${HAVE_MMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SSE_TRUE}" && test -z "${HAVE_SSE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SSE2_TRUE}" && test -z "${HAVE_SSE2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_MMX2_TRUE}" && test -z "${HAVE_MMX2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_DL_DLOPEN_TRUE}" && test -z "${HAVE_DL_DLOPEN_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_DL_DLOPEN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_DL_DLOPEN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_GVEEJAYRELOADED_TRUE}" && test -z "${USE_GVEEJAYRELOADED_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_GVEEJAYRELOADED\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_GVEEJAYRELOADED\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by gveejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +gveejay config.status 1.2 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX +@%:@@%:@ Running $as_me. @%:@@%:@ +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "gveejay-paths.sh") CONFIG_FILES="$CONFIG_FILES gveejay-paths.sh" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +LT_RELEASE!$LT_RELEASE$ac_delim +LT_CURRENT!$LT_CURRENT$ac_delim +LT_REVISION!$LT_REVISION$ac_delim +LT_AGE!$LT_AGE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +CPP!$CPP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +YACC!$YACC$ac_delim +YFLAGS!$YFLAGS$ac_delim +LEX!$LEX$ac_delim +LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim +LEXLIB!$LEXLIB$ac_delim +CCAS!$CCAS$ac_delim +CCASFLAGS!$CCASFLAGS$ac_delim +CCASDEPMODE!$CCASDEPMODE$ac_delim +am__fastdepCCAS_TRUE!$am__fastdepCCAS_TRUE$ac_delim +am__fastdepCCAS_FALSE!$am__fastdepCCAS_FALSE$ac_delim +LIBGETOPT_LIB!$LIBGETOPT_LIB$ac_delim +LIBM_LIBS!$LIBM_LIBS$ac_delim +PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim +ALSA_LIBS!$ALSA_LIBS$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +VEEJAY_CFLAGS!$VEEJAY_CFLAGS$ac_delim +VEEJAY_LIBS!$VEEJAY_LIBS$ac_delim +VEEJAY_CFLAGS!$VEEJAY_CFLAGS$ac_delim +VEEJAY_LIBS!$VEEJAY_LIBS$ac_delim +MJPEGTOOLS_CFLAGS!$MJPEGTOOLS_CFLAGS$ac_delim +MJPEGTOOLS_LIBS!$MJPEGTOOLS_LIBS$ac_delim +MJPEGTOOLS_CFLAGS!$MJPEGTOOLS_CFLAGS$ac_delim +MJPEGTOOLS_LIBS!$MJPEGTOOLS_LIBS$ac_delim +PIXBUF_CFLAGS!$PIXBUF_CFLAGS$ac_delim +PIXBUF_LIBS!$PIXBUF_LIBS$ac_delim +PIXBUF_CFLAGS!$PIXBUF_CFLAGS$ac_delim +PIXBUF_LIBS!$PIXBUF_LIBS$ac_delim +XMKMF!$XMKMF$ac_delim +X_CFLAGS!$X_CFLAGS$ac_delim +X_PRE_LIBS!$X_PRE_LIBS$ac_delim +X_LIBS!$X_LIBS$ac_delim +X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim +HAVE_X_TRUE!$HAVE_X_TRUE$ac_delim +HAVE_X_FALSE!$HAVE_X_FALSE$ac_delim +DEBUGLIBS!$DEBUGLIBS$ac_delim +OP_CFLAGS!$OP_CFLAGS$ac_delim +YUVCFLAGS!$YUVCFLAGS$ac_delim +PROGRAM_NOPIC!$PROGRAM_NOPIC$ac_delim +ALTIVEC_CFLAGS!$ALTIVEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_CFLAGS!$FFMPEG_AVCODEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_LIBS!$FFMPEG_AVCODEC_LIBS$ac_delim +FFMPEG_AVCODEC_CFLAGS!$FFMPEG_AVCODEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_LIBS!$FFMPEG_AVCODEC_LIBS$ac_delim +FFMPEG_SWSCALER_CFLAGS!$FFMPEG_SWSCALER_CFLAGS$ac_delim +FFMPEG_SWSCALER_LIBS!$FFMPEG_SWSCALER_LIBS$ac_delim +FFMPEG_SWSCALER_CFLAGS!$FFMPEG_SWSCALER_CFLAGS$ac_delim +FFMPEG_SWSCALER_LIBS!$FFMPEG_SWSCALER_LIBS$ac_delim +HAVE_ASM_MMX_TRUE!$HAVE_ASM_MMX_TRUE$ac_delim +HAVE_ASM_MMX_FALSE!$HAVE_ASM_MMX_FALSE$ac_delim +HAVE_X86CPU_TRUE!$HAVE_X86CPU_TRUE$ac_delim +HAVE_X86CPU_FALSE!$HAVE_X86CPU_FALSE$ac_delim +HAVE_PPCCPU_TRUE!$HAVE_PPCCPU_TRUE$ac_delim +HAVE_PPCCPU_FALSE!$HAVE_PPCCPU_FALSE$ac_delim +ARCH_PPC_TRUE!$ARCH_PPC_TRUE$ac_delim +ARCH_PPC_FALSE!$ARCH_PPC_FALSE$ac_delim +ARCH_X86_TRUE!$ARCH_X86_TRUE$ac_delim +ARCH_X86_FALSE!$ARCH_X86_FALSE$ac_delim +HAVE_ALTIVEC_TRUE!$HAVE_ALTIVEC_TRUE$ac_delim +HAVE_ALTIVEC_FALSE!$HAVE_ALTIVEC_FALSE$ac_delim +HAVE_ASM_MMX2_TRUE!$HAVE_ASM_MMX2_TRUE$ac_delim +HAVE_ASM_MMX2_FALSE!$HAVE_ASM_MMX2_FALSE$ac_delim +HAVE_ASM_SSE_TRUE!$HAVE_ASM_SSE_TRUE$ac_delim +HAVE_ASM_SSE_FALSE!$HAVE_ASM_SSE_FALSE$ac_delim +HAVE_ASM_SSE2_TRUE!$HAVE_ASM_SSE2_TRUE$ac_delim +HAVE_ASM_SSE2_FALSE!$HAVE_ASM_SSE2_FALSE$ac_delim +HAVE_ASM_NASM_TRUE!$HAVE_ASM_NASM_TRUE$ac_delim +HAVE_ASM_NASM_FALSE!$HAVE_ASM_NASM_FALSE$ac_delim +HAVE_MMX_TRUE!$HAVE_MMX_TRUE$ac_delim +HAVE_MMX_FALSE!$HAVE_MMX_FALSE$ac_delim +HAVE_SSE_TRUE!$HAVE_SSE_TRUE$ac_delim +HAVE_SSE_FALSE!$HAVE_SSE_FALSE$ac_delim +HAVE_SSE2_TRUE!$HAVE_SSE2_TRUE$ac_delim +HAVE_SSE2_FALSE!$HAVE_SSE2_FALSE$ac_delim +HAVE_MMX2_TRUE!$HAVE_MMX2_TRUE$ac_delim +HAVE_MMX2_FALSE!$HAVE_MMX2_FALSE$ac_delim +HAVE_DL_DLOPEN_TRUE!$HAVE_DL_DLOPEN_TRUE$ac_delim +HAVE_DL_DLOPEN_FALSE!$HAVE_DL_DLOPEN_FALSE$ac_delim +USE_GVEEJAYRELOADED_TRUE!$USE_GVEEJAYRELOADED_TRUE$ac_delim +USE_GVEEJAYRELOADED_FALSE!$USE_GVEEJAYRELOADED_FALSE$ac_delim +GTKCAIRO_CFLAGS!$GTKCAIRO_CFLAGS$ac_delim +GTKCAIRO_LIBS!$GTKCAIRO_LIBS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +GTKCAIRO_CFLAGS!$GTKCAIRO_CFLAGS$ac_delim +GTKCAIRO_LIBS!$GTKCAIRO_LIBS$ac_delim +gveejay_datadir!$gveejay_datadir$ac_delim +GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim +GLIB_LIBS!$GLIB_LIBS$ac_delim +GTK_CFLAGS!$GTK_CFLAGS$ac_delim +GTK_LIBS!$GTK_LIBS$ac_delim +GLADE_CFLAGS!$GLADE_CFLAGS$ac_delim +GLADE_LIBS!$GLADE_LIBS$ac_delim +LIB@&t@OBJS!$LIB@&t@OBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 11; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + +cat >>confdefs.h <<\_ACEOF +@%:@define VERSION ${VERSION} +_ACEOF + + +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: GVeejayReloaded ${VERSION} build configuration :" >&5 +echo "$as_me: GVeejayReloaded ${VERSION} build configuration :" >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Compiler flags: $CFLAGS" >&5 +echo "$as_me: Compiler flags: $CFLAGS" >&6;} +{ echo "$as_me:$LINENO: $YUVCFLAGS" >&5 +echo "$as_me: $YUVCFLAGS" >&6;} +{ echo "$as_me:$LINENO: $OP_CFLAGS" >&5 +echo "$as_me: $OP_CFLAGS" >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Architecture: ${host_cpu} " >&5 +echo "$as_me: Architecture: ${host_cpu} " >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +if test "$have_x86cpu" = "true" ; then +{ echo "$as_me:$LINENO: x86 " >&5 +echo "$as_me: x86 " >&6;} +{ echo "$as_me:$LINENO: MMX enabled : ${ac_cv_flag_mmx}" >&5 +echo "$as_me: MMX enabled : ${ac_cv_flag_mmx}" >&6;} +{ echo "$as_me:$LINENO: MMX2 enabled : ${ac_cv_flag_mmx2}" >&5 +echo "$as_me: MMX2 enabled : ${ac_cv_flag_mmx2}" >&6;} +{ echo "$as_me:$LINENO: SSE enabled : ${ac_cv_flag_sse}" >&5 +echo "$as_me: SSE enabled : ${ac_cv_flag_sse}" >&6;} +{ echo "$as_me:$LINENO: SSE2 enabled : ${ac_cv_flag_sse2}" >&5 +echo "$as_me: SSE2 enabled : ${ac_cv_flag_sse2}" >&6;} +{ echo "$as_me:$LINENO: 3DNOW enabled : ${ac_cv_flag_3dnow}" >&5 +echo "$as_me: 3DNOW enabled : ${ac_cv_flag_3dnow}" >&6;} +{ echo "$as_me:$LINENO: CMOV enabled : ${ac_cv_flag_cmov}" >&5 +echo "$as_me: CMOV enabled : ${ac_cv_flag_cmov}" >&6;} +fi + +if test "$have_ppccpu" = "true" ; then +{ echo "$as_me:$LINENO: ppc" >&5 +echo "$as_me: ppc" >&6;} +{ echo "$as_me:$LINENO: AltiVec enabled : ${have_altivec}" >&5 +echo "$as_me: AltiVec enabled : ${have_altivec}" >&6;} +fi + +if test "$have_mips" = "true" ; then +{ echo "$as_me:$LINENO: mips" >&5 +echo "$as_me: mips" >&6;} +{ echo "$as_me:$LINENO: PS/2 enabled : ${have_ps2}" >&5 +echo "$as_me: PS/2 enabled : ${have_ps2}" >&6;} +fi +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +if test "$have_linux" = "true" ; then +{ echo "$as_me:$LINENO: Platform: Linux" >&5 +echo "$as_me: Platform: Linux" >&6;} +fi + +if test "$have_darwin" = "true" ; then +{ echo "$as_me:$LINENO: Platform: Darwin" >&5 +echo "$as_me: Platform: Darwin" >&6;} +{ echo "$as_me:$LINENO: Good luck! You can be the first! " >&5 +echo "$as_me: Good luck! You can be the first! " >&6;} +fi +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Required dependencies:" >&5 +echo "$as_me: Required dependencies:" >&6;} +{ echo "$as_me:$LINENO: - Veejay 1.0 : ${have_veejay}" >&5 +echo "$as_me: - Veejay 1.0 : ${have_veejay}" >&6;} +{ echo "$as_me:$LINENO: - POSIX Threads (pthread) : ${have_pthread}" >&5 +echo "$as_me: - POSIX Threads (pthread) : ${have_pthread}" >&6;} +{ echo "$as_me:$LINENO: - MJPEGTools : ${have_mjpegtools}" >&5 +echo "$as_me: - MJPEGTools : ${have_mjpegtools}" >&6;} +{ echo "$as_me:$LINENO: - FFmpeg AVCodec : ${have_avcodec} " >&5 +echo "$as_me: - FFmpeg AVCodec : ${have_avcodec} " >&6;} +{ echo "$as_me:$LINENO: - FFmpeg Swscaler : ${have_swscaler} " >&5 +echo "$as_me: - FFmpeg Swscaler : ${have_swscaler} " >&6;} +{ echo "$as_me:$LINENO: - GDK Pixbuf support : ${have_pixbuf}" >&5 +echo "$as_me: - GDK Pixbuf support : ${have_pixbuf}" >&6;} +{ echo "$as_me:$LINENO: - Alsa support (midi sequencer) : ${have_alsa}" >&5 +echo "$as_me: - Alsa support (midi sequencer) : ${have_alsa}" >&6;} diff --git a/veejay-client/autom4te.cache/requests b/veejay-client/autom4te.cache/requests new file mode 100644 index 00000000..96553499 --- /dev/null +++ b/veejay-client/autom4te.cache/requests @@ -0,0 +1,225 @@ +# This file was generated by Autom4te Sat Apr 28 03:44:04 GMT 2007. +# It contains the lists of macros which have been traced. +# It can be safely removed. + +@request = ( + bless( [ + '0', + 1, + [ + '/usr/share/autoconf' + ], + [ + '/usr/share/autoconf/autoconf/autoconf.m4f', + '/usr/share/aclocal/libtool.m4', + '/usr/share/aclocal/pkg.m4', + '/usr/share/aclocal-1.10/amversion.m4', + '/usr/share/aclocal-1.10/as.m4', + '/usr/share/aclocal-1.10/auxdir.m4', + '/usr/share/aclocal-1.10/ccstdc.m4', + '/usr/share/aclocal-1.10/cond.m4', + '/usr/share/aclocal-1.10/depend.m4', + '/usr/share/aclocal-1.10/depout.m4', + '/usr/share/aclocal-1.10/init.m4', + '/usr/share/aclocal-1.10/install-sh.m4', + '/usr/share/aclocal-1.10/lead-dot.m4', + '/usr/share/aclocal-1.10/lex.m4', + '/usr/share/aclocal-1.10/maintainer.m4', + '/usr/share/aclocal-1.10/make.m4', + '/usr/share/aclocal-1.10/missing.m4', + '/usr/share/aclocal-1.10/mkdirp.m4', + '/usr/share/aclocal-1.10/options.m4', + '/usr/share/aclocal-1.10/runlog.m4', + '/usr/share/aclocal-1.10/sanity.m4', + '/usr/share/aclocal-1.10/strip.m4', + '/usr/share/aclocal-1.10/substnot.m4', + '/usr/share/aclocal-1.10/tar.m4', + 'configure.ac' + ], + { + '_LT_AC_TAGCONFIG' => 1, + 'AM_ENABLE_STATIC' => 1, + 'm4_pattern_forbid' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + '_LT_AC_SHELL_INIT' => 1, + 'AC_DISABLE_SHARED' => 1, + 'AC_DEFUN' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AC_LIBTOOL_SETUP' => 1, + 'AC_LIBTOOL_WIN32_DLL' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + 'AM_PROG_MKDIR_P' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AM_MISSING_HAS_RUN' => 1, + 'AM_MISSING_PROG' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, + 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, + '_LT_AC_LANG_C_CONFIG' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + '_PKG_SHORT_ERRORS_SUPPORTED' => 1, + '_m4_warn' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, + 'AM_SANITY_CHECK' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, + 'PKG_CHECK_EXISTS' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + '_LT_AC_CHECK_DLFCN' => 1, + 'LT_AC_PROG_RC' => 1, + 'AC_LIBTOOL_CXX' => 1, + '_AM_PROG_TAR' => 1, + 'AC_LIBTOOL_GCJ' => 1, + 'LT_AC_PROG_GCJ' => 1, + 'AM_DEP_TRACK' => 1, + '_LT_AC_PROG_CXXCPP' => 1, + 'AM_DISABLE_STATIC' => 1, + '_AC_PROG_LIBTOOL' => 1, + 'AM_PROG_CC_STDC' => 1, + '_LT_AC_LANG_F77' => 1, + 'AC_LIBTOOL_CONFIG' => 1, + '_AM_IF_OPTION' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, + 'AC_LIBTOOL_F77' => 1, + '_AM_AUTOCONF_VERSION' => 1, + 'm4_pattern_allow' => 1, + 'AM_DISABLE_SHARED' => 1, + 'AM_SET_LEADING_DOT' => 1, + '_LT_AC_LANG_CXX' => 1, + 'AM_PROG_LIBTOOL' => 1, + '_AM_DEPENDENCIES' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + 'AM_PROG_LD' => 1, + 'AC_LIBTOOL_LANG_C_CONFIG' => 1, + '_LT_AC_SYS_COMPILER' => 1, + 'AM_PROG_NM' => 1, + 'PKG_CHECK_MODULES' => 1, + 'AU_DEFUN' => 1, + 'AC_PROG_NM' => 1, + 'AC_LIBTOOL_DLOPEN' => 1, + 'AC_LIBLTDL_CONVENIENCE' => 1, + 'AC_PROG_LD' => 1, + 'AC_ENABLE_FAST_INSTALL' => 1, + 'AC_PROG_LD_GNU' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, + 'jm_MAINTAINER_MODE' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'AC_LIBLTDL_INSTALLABLE' => 1, + 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, + '_AM_SET_OPTION' => 1, + '_LT_LINKER_BOILERPLATE' => 1, + 'AC_LIBTOOL_PROG_CC_C_O' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AC_DISABLE_STATIC' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AC_DEFUN_ONCE' => 1, + '_LT_AC_LOCK' => 1, + '_LT_AC_LANG_RC_CONFIG' => 1, + '_LT_AC_LANG_GCJ' => 1, + 'fp_PROG_CC_STDC' => 1, + 'AC_LIBTOOL_RC' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, + '_LT_AC_TRY_DLOPEN_SELF' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, + 'include' => 1, + 'LT_AC_PROG_SED' => 1, + 'AM_ENABLE_SHARED' => 1, + 'AM_PROG_AS' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + '_LT_AC_LANG_GCJ_CONFIG' => 1, + 'AC_ENABLE_SHARED' => 1, + 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, + '_AM_SET_OPTIONS' => 1, + 'AM_RUN_LOG' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'AM_PROG_LEX' => 1, + 'AC_ENABLE_STATIC' => 1, + 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, + 'AC_CHECK_LIBM' => 1, + '_LT_AC_TAGVAR' => 1, + 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, + '_AM_MANGLE_OPTION' => 1, + 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, + 'AM_CONDITIONAL' => 1, + 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, + 'AM_SET_DEPDIR' => 1, + '_LT_CC_BASENAME' => 1, + 'AM_PROG_INSTALL_SH' => 1, + 'PKG_PROG_PKG_CONFIG' => 1, + 'm4_include' => 1, + 'AC_PROG_EGREP' => 1, + 'AC_PATH_MAGIC' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'AM_MAKE_INCLUDE' => 1 + } + ], 'Autom4te::Request' ), + bless( [ + '1', + 1, + [ + '/usr/share/autoconf' + ], + [ + '/usr/share/autoconf/autoconf/autoconf.m4f', + 'aclocal.m4', + 'configure.ac' + ], + { + '_LT_AC_TAGCONFIG' => 1, + 'AM_PROG_F77_C_O' => 1, + 'm4_pattern_forbid' => 1, + 'AC_INIT' => 1, + 'AC_CANONICAL_TARGET' => 1, + 'AC_SUBST' => 1, + 'AC_CONFIG_LIBOBJ_DIR' => 1, + 'AC_FC_SRCEXT' => 1, + 'AC_CANONICAL_HOST' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'AC_REQUIRE_AUX_FILE' => 1, + 'AC_CONFIG_LINKS' => 1, + 'm4_sinclude' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + '_m4_warn' => 1, + 'AM_PROG_CXX_C_O' => 1, + 'AM_ENABLE_MULTILIB' => 1, + 'AC_CONFIG_FILES' => 1, + 'LT_INIT' => 1, + 'include' => 1, + 'AM_GNU_GETTEXT' => 1, + 'AC_LIBSOURCE' => 1, + 'AM_PROG_FC_C_O' => 1, + 'AC_CANONICAL_BUILD' => 1, + 'AC_FC_FREEFORM' => 1, + 'AH_OUTPUT' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'sinclude' => 1, + 'm4_pattern_allow' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AC_CANONICAL_SYSTEM' => 1, + 'AM_CONDITIONAL' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'm4_include' => 1, + 'AC_SUBST_TRACE' => 1 + } + ], 'Autom4te::Request' ) + ); + diff --git a/veejay-client/autom4te.cache/traces.0 b/veejay-client/autom4te.cache/traces.0 new file mode 100644 index 00000000..9065e699 --- /dev/null +++ b/veejay-client/autom4te.cache/traces.0 @@ -0,0 +1,9893 @@ +m4trace:/usr/share/aclocal/libtool.m4:25: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote AM_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or AM_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])]) +m4trace:/usr/share/aclocal/libtool.m4:60: -1- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +]) +m4trace:/usr/share/aclocal/libtool.m4:80: -1- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +]) +m4trace:/usr/share/aclocal/libtool.m4:225: -1- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])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 +]) +m4trace:/usr/share/aclocal/libtool.m4:242: -1- AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) +m4trace:/usr/share/aclocal/libtool.m4:259: -1- AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_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* +]) +m4trace:/usr/share/aclocal/libtool.m4:273: -1- AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_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 conftest* +]) +m4trace:/usr/share/aclocal/libtool.m4:291: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +]) +m4trace:/usr/share/aclocal/libtool.m4:312: -1- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +]) +m4trace:/usr/share/aclocal/libtool.m4:325: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])]) +m4trace:/usr/share/aclocal/libtool.m4:479: -1- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|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*) + 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_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +]) +m4trace:/usr/share/aclocal/libtool.m4:632: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:677: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:713: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 +]) +m4trace:/usr/share/aclocal/libtool.m4:831: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl +]) +m4trace:/usr/share/aclocal/libtool.m4:839: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_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 < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +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* +]) +m4trace:/usr/share/aclocal/libtool.m4:929: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [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="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + 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_AC_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_AC_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 +]) +m4trace:/usr/share/aclocal/libtool.m4:1043: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_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 .. + rmdir conftest + $rm conftest* +]) +]) +m4trace:/usr/share/aclocal/libtool.m4:1095: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_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 +]) +m4trace:/usr/share/aclocal/libtool.m4:1121: -1- AC_DEFUN([AC_LIBTOOL_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 +]) +m4trace:/usr/share/aclocal/libtool.m4:1139: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 +]) +m4trace:/usr/share/aclocal/libtool.m4:1179: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [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 +]) +m4trace:/usr/share/aclocal/libtool.m4:1210: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +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" +m4_if($1,[],[ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:1837: -1- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:1943: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +]) +m4trace:/usr/share/aclocal/libtool.m4:1951: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +]) +m4trace:/usr/share/aclocal/libtool.m4:1960: -1- AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) +]) +m4trace:/usr/share/aclocal/libtool.m4:1989: -1- AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +]) +m4trace:/usr/share/aclocal/libtool.m4:1999: -1- AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) +]) +m4trace:/usr/share/aclocal/libtool.m4:2028: -1- AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +]) +m4trace:/usr/share/aclocal/libtool.m4:2038: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) +]) +m4trace:/usr/share/aclocal/libtool.m4:2067: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +]) +m4trace:/usr/share/aclocal/libtool.m4:2077: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +]) +m4trace:/usr/share/aclocal/libtool.m4:2101: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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 + +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 +]) +m4trace:/usr/share/aclocal/libtool.m4:2164: -1- AC_DEFUN([AC_PATH_MAGIC], [AC_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 + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:2179: -1- AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], + [AC_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]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +]) +m4trace:/usr/share/aclocal/libtool.m4:2501: -1- AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible 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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +]) +m4trace:/usr/share/aclocal/libtool.m4:2553: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +]) +m4trace:/usr/share/aclocal/libtool.m4:2582: -1- AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +]) +m4trace:/usr/share/aclocal/libtool.m4:2608: -1- AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +]) +m4trace:/usr/share/aclocal/libtool.m4:2635: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) +]) +m4trace:/usr/share/aclocal/libtool.m4:2642: -1- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +]) +m4trace:/usr/share/aclocal/libtool.m4:2650: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP], [ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:2663: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) +]) +m4trace:/usr/share/aclocal/libtool.m4:2670: -1- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +]) +m4trace:/usr/share/aclocal/libtool.m4:2679: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) +]) +m4trace:/usr/share/aclocal/libtool.m4:2686: -1- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +]) +m4trace:/usr/share/aclocal/libtool.m4:2700: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +]) +m4trace:/usr/share/aclocal/libtool.m4:2711: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +m4trace:/usr/share/aclocal/libtool.m4:2712: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG], [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_AC_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_AC_SYS_COMPILER + +# 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... +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# 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 + ;; + +aix4* | aix5*) + 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]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +]) +m4trace:/usr/share/aclocal/libtool.m4:2792: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +m4trace:/usr/share/aclocal/libtool.m4:2793: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_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(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + 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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_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' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_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' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + osf3*) + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_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... +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 +]) +m4trace:/usr/share/aclocal/libtool.m4:3826: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [ +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... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +]) +m4trace:/usr/share/aclocal/libtool.m4:4018: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +m4trace:/usr/share/aclocal/libtool.m4:4019: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_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_AC_TAGVAR(objext, $1)=$objext + +# 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_AC_SYS_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" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +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 + ;; +aix4* | aix5*) + 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_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +]) +m4trace:/usr/share/aclocal/libtool.m4:4127: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +m4trace:/usr/share/aclocal/libtool.m4:4128: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +]) +m4trace:/usr/share/aclocal/libtool.m4:4187: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +m4trace:/usr/share/aclocal/libtool.m4:4188: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +]) +m4trace:/usr/share/aclocal/libtool.m4:4232: -1- AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac + +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) + + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:4723: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:4741: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# 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]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $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 < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f 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 +]) +m4trace:/usr/share/aclocal/libtool.m4:4944: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) +m4trace:/usr/share/aclocal/libtool.m4:5503: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_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 + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_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_AC_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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_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' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +]) +m4trace:/usr/share/aclocal/libtool.m4:6450: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +]) +m4trace:/usr/share/aclocal/libtool.m4:6489: -1- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) +m4trace:/usr/share/aclocal/libtool.m4:6493: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +m4trace:/usr/share/aclocal/libtool.m4:6494: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +m4trace:/usr/share/aclocal/libtool.m4:6495: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +m4trace:/usr/share/aclocal/libtool.m4:6496: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +m4trace:/usr/share/aclocal/libtool.m4:6497: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +m4trace:/usr/share/aclocal/libtool.m4:6498: -1- AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +m4trace:/usr/share/aclocal/libtool.m4:6499: -1- AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) +m4trace:/usr/share/aclocal/libtool.m4:6504: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) +m4trace:/usr/share/aclocal/libtool.m4:6510: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) +]) +m4trace:/usr/share/aclocal/libtool.m4:6548: -1- AC_DEFUN([LT_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]) +]) +m4trace:/usr/share/aclocal/pkg.m4:26: -1- 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 +]) +m4trace:/usr/share/aclocal/pkg.m4:56: -1- 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]) +m4trace:/usr/share/aclocal/pkg.m4:84: -1- 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 +]) +m4trace:/usr/share/aclocal/pkg.m4:104: -1- 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 --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + 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 +]) +m4trace:/usr/share/aclocal-1.10/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) +m4trace:/usr/share/aclocal-1.10/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) +m4trace:/usr/share/aclocal-1.10/as.m4:13: -1- 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 +]) +m4trace:/usr/share/aclocal-1.10/auxdir.m4:47: -1- 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` +]) +m4trace:/usr/share/aclocal-1.10/ccstdc.m4:17: -1- AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC +AC_DIAGNOSE([obsolete], [$0: + your code should no longer depend upon `am_cv_prog_cc_stdc', but upon + `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when + you adjust the code. You can also remove the above call to + AC_PROG_CC if you already called it elsewhere.]) +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +]) +m4trace:/usr/share/aclocal-1.10/ccstdc.m4:17: -1- AC_DEFUN([AM_PROG_CC_STDC], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_CC_STDC' is obsolete. +You should run autoupdate.])dnl +AC_PROG_CC +AC_DIAGNOSE([obsolete], [$0: + your code should no longer depend upon `am_cv_prog_cc_stdc', but upon + `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when + you adjust the code. You can also remove the above call to + AC_PROG_CC if you already called it elsewhere.]) +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +]) +m4trace:/usr/share/aclocal-1.10/ccstdc.m4:26: -1- AU_DEFUN([fp_PROG_CC_STDC]) +m4trace:/usr/share/aclocal-1.10/ccstdc.m4:26: -1- AC_DEFUN([fp_PROG_CC_STDC], [AC_DIAGNOSE([obsolete], [The macro `fp_PROG_CC_STDC' is obsolete. +You should run autoupdate.])dnl +]) +m4trace:/usr/share/aclocal-1.10/cond.m4:15: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) +m4trace:/usr/share/aclocal-1.10/depend.m4:28: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) +m4trace:/usr/share/aclocal-1.10/depend.m4:139: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) +m4trace:/usr/share/aclocal-1.10/depend.m4:147: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) +m4trace:/usr/share/aclocal-1.10/depout.m4:14: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +]) +m4trace:/usr/share/aclocal-1.10/depout.m4:64: -1- 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"]) +]) +m4trace:/usr/share/aclocal-1.10/init.m4:26: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) +m4trace:/usr/share/aclocal-1.10/init.m4:113: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +m4trace:/usr/share/aclocal-1.10/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) +m4trace:/usr/share/aclocal-1.10/lead-dot.m4:12: -1- 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])]) +m4trace:/usr/share/aclocal-1.10/lex.m4:16: -1- AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl +AC_REQUIRE([AM_MISSING_HAS_RUN])dnl +AC_REQUIRE([AC_PROG_LEX])dnl +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi]) +m4trace:/usr/share/aclocal-1.10/maintainer.m4:13: -1- AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl + +]) +m4trace:/usr/share/aclocal-1.10/maintainer.m4:28: -1- AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) +m4trace:/usr/share/aclocal-1.10/maintainer.m4:28: -1- AC_DEFUN([jm_MAINTAINER_MODE], [AC_DIAGNOSE([obsolete], [The macro `jm_MAINTAINER_MODE' is obsolete. +You should run autoupdate.])dnl +AM_MAINTAINER_MODE]) +m4trace:/usr/share/aclocal-1.10/make.m4:14: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) +m4trace:/usr/share/aclocal-1.10/missing.m4:14: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) +m4trace:/usr/share/aclocal-1.10/missing.m4:24: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) +m4trace:/usr/share/aclocal-1.10/mkdirp.m4:11: -1- AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) +m4trace:/usr/share/aclocal-1.10/options.m4:13: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +m4trace:/usr/share/aclocal-1.10/options.m4:19: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +m4trace:/usr/share/aclocal-1.10/options.m4:25: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +m4trace:/usr/share/aclocal-1.10/options.m4:31: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +m4trace:/usr/share/aclocal-1.10/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) +m4trace:/usr/share/aclocal-1.10/sanity.m4:14: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) +m4trace:/usr/share/aclocal-1.10/strip.m4:17: -1- 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])]) +m4trace:/usr/share/aclocal-1.10/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) +m4trace:/usr/share/aclocal-1.10/tar.m4:24: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) +m4trace:configure.ac:3: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^SHELL$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PATH_SEPARATOR$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^exec_prefix$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^prefix$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^program_transform_name$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^bindir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^sbindir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^libexecdir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^datarootdir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^datadir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^sysconfdir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^sharedstatedir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^localstatedir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^includedir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^oldincludedir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^docdir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^infodir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^htmldir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^dvidir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^pdfdir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^psdir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^libdir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^mandir$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_C$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_N$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_T$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^build_alias$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^host_alias$]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^target_alias$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^build$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^build_cpu$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^build_vendor$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^build_os$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^host$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^host_cpu$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^host_vendor$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^host_os$]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^target$]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^target_cpu$]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^target_vendor$]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^target_os$]) +m4trace:configure.ac:16: -1- AM_INIT_AUTOMAKE([1.7]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:16: -1- AM_SET_CURRENT_AUTOMAKE_VERSION +m4trace:configure.ac:16: -1- AM_AUTOMAKE_VERSION([1.10]) +m4trace:configure.ac:16: -1- _AM_AUTOCONF_VERSION([2.61]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:16: -1- _AM_SET_OPTIONS([1.7]) +m4trace:configure.ac:16: -1- _AM_SET_OPTION([1.7]) +m4trace:configure.ac:16: -2- _AM_MANGLE_OPTION([1.7]) +m4trace:configure.ac:16: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:196: AC_FOREACH is expanded from... +/usr/share/aclocal-1.10/options.m4:25: _AM_SET_OPTIONS is expanded from... +/usr/share/aclocal-1.10/init.m4:26: AM_INIT_AUTOMAKE is expanded from... +configure.ac:16: the top level]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:16: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) +m4trace:configure.ac:16: -2- _AM_MANGLE_OPTION([no-define]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:16: -1- AM_SANITY_CHECK +m4trace:configure.ac:16: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +m4trace:configure.ac:16: -1- AM_MISSING_HAS_RUN +m4trace:configure.ac:16: -1- AM_AUX_DIR_EXPAND +m4trace:configure.ac:16: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:16: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:16: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:16: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:16: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:16: -1- AM_PROG_INSTALL_SH +m4trace:configure.ac:16: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:16: -1- AM_PROG_INSTALL_STRIP +m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:16: -1- AM_PROG_MKDIR_P +m4trace:configure.ac:16: -1- m4_pattern_allow([^mkdir_p$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:16: -1- AM_SET_LEADING_DOT +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__leading_dot$]) +m4trace:configure.ac:16: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +m4trace:configure.ac:16: -2- _AM_MANGLE_OPTION([tar-ustar]) +m4trace:configure.ac:16: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) +m4trace:configure.ac:16: -2- _AM_MANGLE_OPTION([tar-pax]) +m4trace:configure.ac:16: -1- _AM_PROG_TAR([v7]) +m4trace:configure.ac:16: -1- AM_MISSING_PROG([AMTAR], [tar]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:16: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +m4trace:configure.ac:16: -2- _AM_MANGLE_OPTION([no-dependencies]) +m4trace:configure.ac:17: -1- AM_MAINTAINER_MODE +m4trace:configure.ac:17: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) +m4trace:configure.ac:17: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) +m4trace:configure.ac:17: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) +m4trace:configure.ac:17: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:17: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:17: -1- m4_pattern_allow([^MAINT$]) +m4trace:configure.ac:18: -1- AM_INIT_AUTOMAKE([dist-bzip2]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:18: -1- _AM_SET_OPTIONS([dist-bzip2]) +m4trace:configure.ac:18: -1- _AM_SET_OPTION([dist-bzip2]) +m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([dist-bzip2]) +m4trace:configure.ac:18: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:196: AC_FOREACH is expanded from... +/usr/share/aclocal-1.10/options.m4:25: _AM_SET_OPTIONS is expanded from... +/usr/share/aclocal-1.10/init.m4:26: AM_INIT_AUTOMAKE is expanded from... +configure.ac:18: the top level]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:18: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) +m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([no-define]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:18: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:18: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:18: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:18: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:18: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:18: -1- AM_PROG_INSTALL_SH +m4trace:configure.ac:18: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:18: -1- AM_PROG_INSTALL_STRIP +m4trace:configure.ac:18: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:18: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([tar-ustar]) +m4trace:configure.ac:18: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) +m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([tar-pax]) +m4trace:configure.ac:18: -1- _AM_PROG_TAR([v7]) +m4trace:configure.ac:18: -1- AM_MISSING_PROG([AMTAR], [tar]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:18: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([no-dependencies]) +m4trace:configure.ac:20: -1- m4_pattern_allow([^HAVE_CONFIG_H$]) +m4trace:configure.ac:26: -1- m4_pattern_allow([^LT_RELEASE$]) +m4trace:configure.ac:27: -1- m4_pattern_allow([^LT_CURRENT$]) +m4trace:configure.ac:28: -1- m4_pattern_allow([^LT_REVISION$]) +m4trace:configure.ac:29: -1- m4_pattern_allow([^LT_AGE$]) +m4trace:configure.ac:34: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:34: the top level]) +m4trace:configure.ac:37: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:37: the top level]) +m4trace:configure.ac:40: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:40: the top level]) +m4trace:configure.ac:43: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:43: the top level]) +m4trace:configure.ac:46: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:46: the top level]) +m4trace:configure.ac:49: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:49: the top level]) +m4trace:configure.ac:52: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:52: the top level]) +m4trace:configure.ac:55: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:55: the top level]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^_GNU_SOURCE$]) +m4trace:configure.ac:61: -1- AC_PROG_LIBTOOL +m4trace:configure.ac:61: -1- _AC_PROG_LIBTOOL +m4trace:configure.ac:61: -1- AC_LIBTOOL_SETUP +m4trace:configure.ac:61: -1- AC_ENABLE_SHARED +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1364: AC_ARG_ENABLE is expanded from... +/usr/share/aclocal/libtool.m4:1960: AC_ENABLE_SHARED is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_ENABLE_STATIC +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1364: AC_ARG_ENABLE is expanded from... +/usr/share/aclocal/libtool.m4:1999: AC_ENABLE_STATIC is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_ENABLE_FAST_INSTALL +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1364: AC_ARG_ENABLE is expanded from... +/usr/share/aclocal/libtool.m4:2038: AC_ENABLE_FAST_INSTALL is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^EXEEXT$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:61: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:61: -1- AM_SET_DEPDIR +m4trace:configure.ac:61: -1- m4_pattern_allow([^DEPDIR$]) +m4trace:configure.ac:61: -1- AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:61: -1- AM_MAKE_INCLUDE +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__include$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__quote$]) +m4trace:configure.ac:61: -1- AM_DEP_TRACK +m4trace:configure.ac:61: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^AMDEP_TRUE$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^AMDEP_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:61: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:61: -1- AC_PROG_LD +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1382: AC_ARG_WITH is expanded from... +/usr/share/aclocal/libtool.m4:2179: AC_PROG_LD is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- LT_AC_PROG_SED +m4trace:configure.ac:61: -1- m4_pattern_allow([^SED$]) +m4trace:configure.ac:61: -1- AC_PROG_LD_GNU +m4trace:configure.ac:61: -1- AC_PROG_EGREP +m4trace:configure.ac:61: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.ac:61: -1- AC_PROG_LD_RELOAD_FLAG +m4trace:configure.ac:61: -1- AC_PROG_NM +m4trace:configure.ac:61: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:61: -1- AC_DEPLIBS_CHECK_METHOD +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_MAX_CMD_LEN +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_OBJDIR +m4trace:configure.ac:61: -1- _LT_AC_SYS_COMPILER +m4trace:configure.ac:61: -1- _LT_AC_PROG_ECHO_BACKSLASH +m4trace:configure.ac:61: -1- _LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^ECHO$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^AR$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:61: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:61: -1- AC_PATH_MAGIC +m4trace:configure.ac:61: -1- AC_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) +m4trace:configure.ac:61: -1- AC_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1364: AC_ARG_ENABLE is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1382: AC_ARG_WITH is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LANG_C_CONFIG +m4trace:configure.ac:61: -1- _LT_AC_LANG_C_CONFIG +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([objext], []) +m4trace:configure.ac:61: -1- _LT_AC_SYS_COMPILER +m4trace:configure.ac:61: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_COMPILER_NO_RTTI([]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_COMPILER_PIC([]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, ) works], [lt_prog_compiler_pic_works], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, )ifelse([],[],[ -DPIC],[ifelse([],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, ) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, )=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, )" ;; + esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, )= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, )=no]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, )=]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_CC_C_O([]) +m4trace:configure.ac:61: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([]) +m4trace:configure.ac:61: -1- _LT_AC_LOCK +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2414: AC_TRY_LINK is expanded from... +../../lib/m4sugar/m4sh.m4:516: AS_IF is expanded from... +../../lib/autoconf/general.m4:1898: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:1911: AC_CACHE_CHECK is expanded from... +/usr/share/aclocal/libtool.m4:479: _LT_AC_LOCK is expanded from... +/usr/share/aclocal/libtool.m4:1095: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from... +/usr/share/aclocal/libtool.m4:2712: _LT_AC_LANG_C_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:2711: AC_LIBTOOL_LANG_C_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_LD_SHLIBS([]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], []) +m4trace:configure.ac:61: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_SYS_LIBPATH_AIX +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_SYS_LIBPATH_AIX +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([fix_srcfile_path], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([reload_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([runpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], []) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_LIB_STRIP +m4trace:configure.ac:61: -1- AC_LIBTOOL_DLOPEN_SELF +m4trace:configure.ac:61: -1- _LT_AC_CHECK_DLFCN +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:61: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=no], [lt_cv_dlopen_self=cross]) +m4trace:configure.ac:61: -1- _LT_AC_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]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_CONFIG([]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([CC], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postinstall_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postuninstall_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([fix_srcfile_path], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([GCC], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], []) +m4trace:configure.ac:61: -1- _LT_AC_TAGCONFIG +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1382: AC_ARG_WITH is expanded from... +/usr/share/aclocal/libtool.m4:1837: _LT_AC_TAGCONFIG is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists], [/usr/share/aclocal/libtool.m4:1837: _LT_AC_TAGCONFIG is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists], [/usr/share/aclocal/libtool.m4:1837: _LT_AC_TAGCONFIG is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LANG_CXX_CONFIG +m4trace:configure.ac:61: -1- _LT_AC_LANG_CXX_CONFIG([CXX]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^ac_ct_CXX$]) +m4trace:configure.ac:61: -1- _AM_DEPENDENCIES([CXX]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:61: -1- _AM_DEPENDENCIES([CXX]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:61: -1- _LT_AC_PROG_CXXCPP +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([objext], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_COMPILER +m4trace:configure.ac:61: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [CXX]) +m4trace:configure.ac:61: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) +m4trace:configure.ac:61: -1- AC_PROG_LD +m4trace:configure.ac:61: -1- AC_PROG_LD_GNU +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_LIBPATH_AIX +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_LIBPATH_AIX +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([GCC], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_POSTDEP_PREDEP([CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_COMPILER_PIC([CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX) works], [lt_prog_compiler_pic_works_CXX], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)ifelse([CXX],[],[ -DPIC],[ifelse([CXX],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)" ;; + esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, CXX)=no]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_prog_compiler_static_works_CXX], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, CXX)=]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_CC_C_O([CXX]) +m4trace:configure.ac:61: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_LD_SHLIBS([CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([runpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_CONFIG([CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([CC], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postinstall_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postuninstall_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([fix_srcfile_path], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([GCC], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LANG_F77_CONFIG +m4trace:configure.ac:61: -1- _LT_AC_LANG_F77_CONFIG([F77]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^F77$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^FFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^F77$]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^ac_ct_F77$]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([objext], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_COMPILER +m4trace:configure.ac:61: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [F77]) +m4trace:configure.ac:61: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([GCC], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_COMPILER_PIC([F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77) works], [lt_prog_compiler_pic_works_F77], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)ifelse([F77],[],[ -DPIC],[ifelse([F77],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, F77)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)" ;; + esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, F77)=no]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_prog_compiler_static_works_F77], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, F77)=]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_CC_C_O([F77]) +m4trace:configure.ac:61: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_LD_SHLIBS([F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) +m4trace:configure.ac:61: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_LIBPATH_AIX +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_LIBPATH_AIX +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([fix_srcfile_path], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([reload_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([runpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_CONFIG([F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([CC], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postinstall_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postuninstall_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([fix_srcfile_path], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([GCC], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LANG_GCJ_CONFIG +m4trace:configure.ac:61: -1- _LT_AC_LANG_GCJ_CONFIG([GCJ]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/lang.m4:167: AC_LANG_SAVE is expanded from... +/usr/share/aclocal/libtool.m4:4128: _LT_AC_LANG_GCJ_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:4127: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:1837: _LT_AC_TAGCONFIG is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([objext], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_COMPILER +m4trace:configure.ac:61: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [GCJ]) +m4trace:configure.ac:61: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_COMPILER_NO_RTTI([GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, GCJ)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, GCJ) -fno-rtti -fno-exceptions"]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_COMPILER_PIC([GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ) works], [lt_prog_compiler_pic_works_GCJ], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)ifelse([GCJ],[],[ -DPIC],[ifelse([GCJ],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)" ;; + esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, GCJ)=no]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_prog_compiler_static_works_GCJ], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, GCJ)=]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_CC_C_O([GCJ]) +m4trace:configure.ac:61: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_LD_SHLIBS([GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) +m4trace:configure.ac:61: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_LIBPATH_AIX +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_LIBPATH_AIX +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([fix_srcfile_path], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([reload_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -2- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([runpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_CONFIG([GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([CC], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postinstall_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postuninstall_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([fix_srcfile_path], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([GCC], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from... +/usr/share/aclocal/libtool.m4:4128: _LT_AC_LANG_GCJ_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:4127: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:1837: _LT_AC_TAGCONFIG is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_LANG_RC_CONFIG +m4trace:configure.ac:61: -1- _LT_AC_LANG_RC_CONFIG([RC]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/lang.m4:167: AC_LANG_SAVE is expanded from... +/usr/share/aclocal/libtool.m4:4188: _LT_AC_LANG_RC_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:4187: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:1837: _LT_AC_TAGCONFIG is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([objext], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_SYS_COMPILER +m4trace:configure.ac:61: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [RC]) +m4trace:configure.ac:61: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_CONFIG([RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([CC], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postinstall_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postuninstall_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([fix_srcfile_path], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([GCC], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([LD], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predep_objects], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdep_objects], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([predeps], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([postdeps], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([allow_undefined_flag], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([no_undefined_flag], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_action], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_direct], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_minus_L], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([hardcode_automatic], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([link_all_deplibs], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([always_export_symbols], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([exclude_expsyms], [RC]) +m4trace:configure.ac:61: -1- _LT_AC_TAGVAR([include_expsyms], [RC]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from... +/usr/share/aclocal/libtool.m4:4188: _LT_AC_LANG_RC_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:4187: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... +/usr/share/aclocal/libtool.m4:1837: _LT_AC_TAGCONFIG is expanded from... +/usr/share/aclocal/libtool.m4:80: AC_LIBTOOL_SETUP is expanded from... +/usr/share/aclocal/libtool.m4:60: _AC_PROG_LIBTOOL is expanded from... +/usr/share/aclocal/libtool.m4:25: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LIBTOOL$]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_CXX +m4trace:configure.ac:61: -1- _LT_AC_LANG_CXX +m4trace:configure.ac:61: -1- _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +m4trace:configure.ac:61: -1- AC_LIBTOOL_F77 +m4trace:configure.ac:61: -1- _LT_AC_LANG_F77 +m4trace:configure.ac:61: -1- _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +m4trace:configure.ac:64: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:65: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:65: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:65: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:65: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- AM_PROG_CC_STDC +m4trace:configure.ac:66: -1- _m4_warn([obsolete], [The macro `AM_PROG_CC_STDC' is obsolete. +You should run autoupdate.], [/usr/share/aclocal-1.10/ccstdc.m4:17: AM_PROG_CC_STDC is expanded from... +configure.ac:66: the top level]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:66: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:66: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:66: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:66: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:66: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:66: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:66: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- _m4_warn([obsolete], [AM_PROG_CC_STDC: + your code should no longer depend upon `am_cv_prog_cc_stdc', but upon + `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when + you adjust the code. You can also remove the above call to + AC_PROG_CC if you already called it elsewhere.], [/usr/share/aclocal-1.10/ccstdc.m4:17: AM_PROG_CC_STDC is expanded from... +configure.ac:66: the top level]) +m4trace:configure.ac:67: -1- m4_pattern_allow([^YACC$]) +m4trace:configure.ac:67: -1- m4_pattern_allow([^YACC$]) +m4trace:configure.ac:67: -1- m4_pattern_allow([^YFLAGS$]) +m4trace:configure.ac:68: -1- AM_PROG_LEX +m4trace:configure.ac:68: -1- m4_pattern_allow([^LEX$]) +m4trace:configure.ac:68: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) +m4trace:configure.ac:68: -1- m4_pattern_allow([^LEXLIB$]) +m4trace:configure.ac:68: -1- m4_pattern_allow([^YYTEXT_POINTER$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXXFLAGS$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^ac_ct_CXX$]) +m4trace:configure.ac:69: -1- _AM_DEPENDENCIES([CXX]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:69: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:69: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:69: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:69: -1- _AM_DEPENDENCIES([CXX]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:69: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:69: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:69: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:70: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:70: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:70: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:71: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:72: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) +m4trace:configure.ac:73: -1- m4_pattern_allow([^const$]) +m4trace:configure.ac:75: -1- m4_pattern_allow([^_FILE_OFFSET_BITS$]) +m4trace:configure.ac:75: -1- m4_pattern_allow([^_LARGE_FILES$]) +m4trace:configure.ac:78: -1- AM_PROG_AS +m4trace:configure.ac:78: -1- m4_pattern_allow([^CCAS$]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^CCASFLAGS$]) +m4trace:configure.ac:78: -1- _AM_IF_OPTION([no-dependencies], [], [_AM_DEPENDENCIES([CCAS])]) +m4trace:configure.ac:78: -2- _AM_MANGLE_OPTION([no-dependencies]) +m4trace:configure.ac:78: -1- _AM_DEPENDENCIES([CCAS]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^CCASDEPMODE$]) +m4trace:configure.ac:78: -1- AM_CONDITIONAL([am__fastdepCCAS], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) +m4trace:configure.ac:78: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:78: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^HAVE_GETOPT_LONG$]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^HAVE_GETOPT_LONG$]) +m4trace:configure.ac:98: -1- m4_pattern_allow([^SIZEOF_INT$]) +m4trace:configure.ac:99: -1- m4_pattern_allow([^SIZEOF_LONG_INT$]) +m4trace:configure.ac:100: -1- m4_pattern_allow([^SIZEOF_SIZE_T$]) +m4trace:configure.ac:101: -1- m4_pattern_allow([^SIZEOF_FLOAT$]) +m4trace:configure.ac:105: -1- m4_pattern_allow([^LIBGETOPT_LIB$]) +m4trace:configure.ac:107: -1- m4_pattern_allow([^RETSIGTYPE$]) +m4trace:configure.ac:114: -1- m4_pattern_allow([^HAVE_LINUX$]) +m4trace:configure.ac:123: -1- m4_pattern_allow([^HAVE_DARWIN$]) +m4trace:configure.ac:144: -1- m4_pattern_allow([^LIBM_LIBS$]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^PTHREAD_LIBS$]) +m4trace:configure.ac:151: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) +m4trace:configure.ac:156: -1- m4_pattern_allow([^HAVE_PTHREADSTACKSIZE$]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^HAVE_ALSA$]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^ALSA_LIBS $]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^HAVE_LIBDL$]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_DL_DLOPEN$]) +m4trace:configure.ac:181: -1- PKG_CHECK_MODULES([VEEJAY], [veejay >= 1.0 ], [ + AC_SUBST( VEEJAY_CFLAGS ) + AC_SUBST( VEEJAY_LIBS ) + have_veejay=true + AC_DEFINE(HAVE_VEEJAY,1, [Veejay installed]) + ], [have_veejay=false]) +m4trace:configure.ac:181: -1- PKG_PROG_PKG_CONFIG +m4trace:configure.ac:181: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^PKG_CONFIG$]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^PKG_CONFIG$]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^VEEJAY_CFLAGS$]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^VEEJAY_LIBS$]) +m4trace:configure.ac:181: -1- PKG_CHECK_EXISTS([veejay >= 1.0 ], [pkg_cv_[]VEEJAY_CFLAGS=`$PKG_CONFIG --[]cflags "veejay >= 1.0 " 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:181: -1- PKG_CHECK_EXISTS([veejay >= 1.0 ], [pkg_cv_[]VEEJAY_LIBS=`$PKG_CONFIG --[]libs "veejay >= 1.0 " 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:181: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:181: -1- m4_pattern_allow([^VEEJAY_CFLAGS $]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^VEEJAY_LIBS $]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^HAVE_VEEJAY$]) +m4trace:configure.ac:199: -1- PKG_CHECK_MODULES([MJPEGTOOLS], [mjpegtools >= 1.6 ], [ + AC_SUBST( MJPEGTOOLS_CFLAGS ) + AC_SUBST( MJPEGTOOLS_LIBS ) + have_mjpegtools=true + AC_DEFINE(HAVE_MJPEGTOOLS, 1, [MJPEGTools installed])], [have_mjpegtools=false]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^MJPEGTOOLS_CFLAGS$]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^MJPEGTOOLS_LIBS$]) +m4trace:configure.ac:199: -1- PKG_CHECK_EXISTS([mjpegtools >= 1.6 ], [pkg_cv_[]MJPEGTOOLS_CFLAGS=`$PKG_CONFIG --[]cflags "mjpegtools >= 1.6 " 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:199: -1- PKG_CHECK_EXISTS([mjpegtools >= 1.6 ], [pkg_cv_[]MJPEGTOOLS_LIBS=`$PKG_CONFIG --[]libs "mjpegtools >= 1.6 " 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:199: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:199: -1- m4_pattern_allow([^MJPEGTOOLS_CFLAGS $]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^MJPEGTOOLS_LIBS $]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^HAVE_MJPEGTOOLS$]) +m4trace:configure.ac:213: -1- PKG_CHECK_MODULES([PIXBUF], [gtk+-2.0 >= 2.0 gdk-pixbuf-2.0], [ + AC_SUBST( PIXBUF_CFLAGS ) + AC_SUBST( PIXBUF_LIBS ) + have_pixbuf=true + AC_DEFINE(USE_GDK_PIXBUF, 1, [use gdk image load / save])], [have_pixbuf=false]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^PIXBUF_CFLAGS$]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^PIXBUF_LIBS$]) +m4trace:configure.ac:213: -1- PKG_CHECK_EXISTS([gtk+-2.0 >= 2.0 gdk-pixbuf-2.0], [pkg_cv_[]PIXBUF_CFLAGS=`$PKG_CONFIG --[]cflags "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:213: -1- PKG_CHECK_EXISTS([gtk+-2.0 >= 2.0 gdk-pixbuf-2.0], [pkg_cv_[]PIXBUF_LIBS=`$PKG_CONFIG --[]libs "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:213: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:213: -1- m4_pattern_allow([^PIXBUF_CFLAGS $]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^PIXBUF_LIBS $]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^USE_GDK_PIXBUF$]) +m4trace:configure.ac:233: -1- m4_pattern_allow([^HAVE___PROGNAME$]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^XMKMF$]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_DISPLAY_MISSING$]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_CFLAGS$]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_PRE_LIBS$]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_LIBS$]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_EXTRA_LIBS$]) +m4trace:configure.ac:238: -1- AM_CONDITIONAL([HAVE_X], [test x$have_x = xyes]) +m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_X_TRUE$]) +m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_X_FALSE$]) +m4trace:configure.ac:238: -1- _AM_SUBST_NOTMAKE([HAVE_X_TRUE]) +m4trace:configure.ac:238: -1- _AM_SUBST_NOTMAKE([HAVE_X_FALSE]) +m4trace:configure.ac:244: -1- m4_pattern_allow([^DEBUGLIBS $]) +m4trace:configure.ac:277: -1- m4_pattern_allow([^HAVE_X86CPU$]) +m4trace:configure.ac:278: -1- m4_pattern_allow([^ARCH_X86$]) +m4trace:configure.ac:287: -1- m4_pattern_allow([^OP_CFLAGS $]) +m4trace:configure.ac:288: -1- m4_pattern_allow([^YUVCFLAGS $]) +m4trace:configure.ac:301: -1- m4_pattern_allow([^HAVE_X86_CPU$]) +m4trace:configure.ac:302: -1- m4_pattern_allow([^ARCH_X86_64$]) +m4trace:configure.ac:308: -1- m4_pattern_allow([^HAVE_PPCCPU$]) +m4trace:configure.ac:309: -1- m4_pattern_allow([^ARCH_PPC$]) +m4trace:configure.ac:324: -1- m4_pattern_allow([^ARCH_MIPS$]) +m4trace:configure.ac:325: -1- m4_pattern_allow([^HAVE_MIPS$]) +m4trace:configure.ac:337: -1- m4_pattern_allow([^HAVE_PS2$]) +m4trace:configure.ac:353: -1- m4_pattern_allow([^PROGRAM_NOPIC$]) +m4trace:configure.ac:366: -1- m4_pattern_allow([^HAVE_ASM_MMX$]) +m4trace:configure.ac:367: -1- m4_pattern_allow([^HAVE_MMX$]) +m4trace:configure.ac:380: -1- m4_pattern_allow([^HAVE_ASM_SSE$]) +m4trace:configure.ac:381: -1- m4_pattern_allow([^HAVE_SSE$]) +m4trace:configure.ac:396: -1- m4_pattern_allow([^HAVE_ASM_SSE2$]) +m4trace:configure.ac:397: -1- m4_pattern_allow([^HAVE_SSE2$]) +m4trace:configure.ac:410: -1- m4_pattern_allow([^HAVE_ASM_3DNOW$]) +m4trace:configure.ac:423: -1- m4_pattern_allow([^HAVE_CMOV$]) +m4trace:configure.ac:438: -1- m4_pattern_allow([^HAVE_ASM_MMX2$]) +m4trace:configure.ac:439: -1- m4_pattern_allow([^HAVE_MMX2$]) +m4trace:configure.ac:440: -1- m4_pattern_allow([^HAVE_ASM_MMXEXT$]) +m4trace:configure.ac:484: -1- m4_pattern_allow([^HAVE_ALTIVEC$]) +m4trace:configure.ac:486: -1- m4_pattern_allow([^ALTIVEC_CFLAGS$]) +m4trace:configure.ac:543: -1- m4_pattern_allow([^HAVE_FFMPEG_UNINSTALLED$]) +m4trace:configure.ac:546: -1- PKG_CHECK_MODULES([FFMPEG_AVCODEC], [libavcodec], [ + AC_SUBST( FFMPEG_AVCODEC_CFLAGS ) + AC_SUBST( FFMPEG_AVCODEC_LIBS ) + have_avcodec=true + AC_DEFINE(HAVE_AVCODEC, 1, [use avcodec])], [have_avcodec=false]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^FFMPEG_AVCODEC_CFLAGS$]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^FFMPEG_AVCODEC_LIBS$]) +m4trace:configure.ac:546: -1- PKG_CHECK_EXISTS([libavcodec], [pkg_cv_[]FFMPEG_AVCODEC_CFLAGS=`$PKG_CONFIG --[]cflags "libavcodec" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:546: -1- PKG_CHECK_EXISTS([libavcodec], [pkg_cv_[]FFMPEG_AVCODEC_LIBS=`$PKG_CONFIG --[]libs "libavcodec" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:546: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:546: -1- m4_pattern_allow([^FFMPEG_AVCODEC_CFLAGS $]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^FFMPEG_AVCODEC_LIBS $]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^HAVE_AVCODEC$]) +m4trace:configure.ac:554: -1- PKG_CHECK_MODULES([FFMPEG_SWSCALER], [libswscale], [ + AC_SUBST( FFMPEG_SWSCALER_CFLAGS ) + AC_SUBST( FFMPEG_SWSCALER_LIBS ) + have_swscaler=true + AC_DEFINE( HAVE_SWSCALER,1,[use swscaler])], [ have_swscaler=false ]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^FFMPEG_SWSCALER_CFLAGS$]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^FFMPEG_SWSCALER_LIBS$]) +m4trace:configure.ac:554: -1- PKG_CHECK_EXISTS([libswscale], [pkg_cv_[]FFMPEG_SWSCALER_CFLAGS=`$PKG_CONFIG --[]cflags "libswscale" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:554: -1- PKG_CHECK_EXISTS([libswscale], [pkg_cv_[]FFMPEG_SWSCALER_LIBS=`$PKG_CONFIG --[]libs "libswscale" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:554: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:554: -1- m4_pattern_allow([^FFMPEG_SWSCALER_CFLAGS $]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^FFMPEG_SWSCALER_LIBS $]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^HAVE_SWSCALER$]) +m4trace:configure.ac:583: -1- m4_pattern_allow([^AVCODEC_INC$]) +m4trace:configure.ac:584: -1- m4_pattern_allow([^SWSCALE_INC$]) +m4trace:configure.ac:585: -1- m4_pattern_allow([^AVUTIL_INC$]) +m4trace:configure.ac:590: -1- AM_CONDITIONAL([HAVE_ASM_MMX], [test x$have_asm_mmx = xtrue]) +m4trace:configure.ac:590: -1- m4_pattern_allow([^HAVE_ASM_MMX_TRUE$]) +m4trace:configure.ac:590: -1- m4_pattern_allow([^HAVE_ASM_MMX_FALSE$]) +m4trace:configure.ac:590: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_MMX_TRUE]) +m4trace:configure.ac:590: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_MMX_FALSE]) +m4trace:configure.ac:591: -1- AM_CONDITIONAL([HAVE_X86CPU], [test x$have_x86cpu = xtrue]) +m4trace:configure.ac:591: -1- m4_pattern_allow([^HAVE_X86CPU_TRUE$]) +m4trace:configure.ac:591: -1- m4_pattern_allow([^HAVE_X86CPU_FALSE$]) +m4trace:configure.ac:591: -1- _AM_SUBST_NOTMAKE([HAVE_X86CPU_TRUE]) +m4trace:configure.ac:591: -1- _AM_SUBST_NOTMAKE([HAVE_X86CPU_FALSE]) +m4trace:configure.ac:592: -1- AM_CONDITIONAL([HAVE_PPCCPU], [test x$have_ppccpu = xtrue]) +m4trace:configure.ac:592: -1- m4_pattern_allow([^HAVE_PPCCPU_TRUE$]) +m4trace:configure.ac:592: -1- m4_pattern_allow([^HAVE_PPCCPU_FALSE$]) +m4trace:configure.ac:592: -1- _AM_SUBST_NOTMAKE([HAVE_PPCCPU_TRUE]) +m4trace:configure.ac:592: -1- _AM_SUBST_NOTMAKE([HAVE_PPCCPU_FALSE]) +m4trace:configure.ac:593: -1- AM_CONDITIONAL([ARCH_PPC], [test x$have_ppccpu = xtrue]) +m4trace:configure.ac:593: -1- m4_pattern_allow([^ARCH_PPC_TRUE$]) +m4trace:configure.ac:593: -1- m4_pattern_allow([^ARCH_PPC_FALSE$]) +m4trace:configure.ac:593: -1- _AM_SUBST_NOTMAKE([ARCH_PPC_TRUE]) +m4trace:configure.ac:593: -1- _AM_SUBST_NOTMAKE([ARCH_PPC_FALSE]) +m4trace:configure.ac:594: -1- AM_CONDITIONAL([ARCH_X86], [test x$have_x86cpu = xtrue]) +m4trace:configure.ac:594: -1- m4_pattern_allow([^ARCH_X86_TRUE$]) +m4trace:configure.ac:594: -1- m4_pattern_allow([^ARCH_X86_FALSE$]) +m4trace:configure.ac:594: -1- _AM_SUBST_NOTMAKE([ARCH_X86_TRUE]) +m4trace:configure.ac:594: -1- _AM_SUBST_NOTMAKE([ARCH_X86_FALSE]) +m4trace:configure.ac:595: -1- AM_CONDITIONAL([HAVE_ALTIVEC], [test x$have_altivec = xtrue]) +m4trace:configure.ac:595: -1- m4_pattern_allow([^HAVE_ALTIVEC_TRUE$]) +m4trace:configure.ac:595: -1- m4_pattern_allow([^HAVE_ALTIVEC_FALSE$]) +m4trace:configure.ac:595: -1- _AM_SUBST_NOTMAKE([HAVE_ALTIVEC_TRUE]) +m4trace:configure.ac:595: -1- _AM_SUBST_NOTMAKE([HAVE_ALTIVEC_FALSE]) +m4trace:configure.ac:596: -1- AM_CONDITIONAL([HAVE_ASM_MMX2], [test x$have_asm_mmx2 = xtrue]) +m4trace:configure.ac:596: -1- m4_pattern_allow([^HAVE_ASM_MMX2_TRUE$]) +m4trace:configure.ac:596: -1- m4_pattern_allow([^HAVE_ASM_MMX2_FALSE$]) +m4trace:configure.ac:596: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_MMX2_TRUE]) +m4trace:configure.ac:596: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_MMX2_FALSE]) +m4trace:configure.ac:597: -1- AM_CONDITIONAL([HAVE_ASM_SSE], [test x$have_asm_sse = xtrue]) +m4trace:configure.ac:597: -1- m4_pattern_allow([^HAVE_ASM_SSE_TRUE$]) +m4trace:configure.ac:597: -1- m4_pattern_allow([^HAVE_ASM_SSE_FALSE$]) +m4trace:configure.ac:597: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_SSE_TRUE]) +m4trace:configure.ac:597: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_SSE_FALSE]) +m4trace:configure.ac:598: -1- AM_CONDITIONAL([HAVE_ASM_SSE2], [test x$have_asm_sse2 = xtrue]) +m4trace:configure.ac:598: -1- m4_pattern_allow([^HAVE_ASM_SSE2_TRUE$]) +m4trace:configure.ac:598: -1- m4_pattern_allow([^HAVE_ASM_SSE2_FALSE$]) +m4trace:configure.ac:598: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_SSE2_TRUE]) +m4trace:configure.ac:598: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_SSE2_FALSE]) +m4trace:configure.ac:599: -1- AM_CONDITIONAL([HAVE_ASM_NASM], [test x$have_asm_nasm = xtrue]) +m4trace:configure.ac:599: -1- m4_pattern_allow([^HAVE_ASM_NASM_TRUE$]) +m4trace:configure.ac:599: -1- m4_pattern_allow([^HAVE_ASM_NASM_FALSE$]) +m4trace:configure.ac:599: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_NASM_TRUE]) +m4trace:configure.ac:599: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_NASM_FALSE]) +m4trace:configure.ac:600: -1- AM_CONDITIONAL([HAVE_MMX], [test x$have_asm_mmx = xtrue]) +m4trace:configure.ac:600: -1- m4_pattern_allow([^HAVE_MMX_TRUE$]) +m4trace:configure.ac:600: -1- m4_pattern_allow([^HAVE_MMX_FALSE$]) +m4trace:configure.ac:600: -1- _AM_SUBST_NOTMAKE([HAVE_MMX_TRUE]) +m4trace:configure.ac:600: -1- _AM_SUBST_NOTMAKE([HAVE_MMX_FALSE]) +m4trace:configure.ac:601: -1- AM_CONDITIONAL([HAVE_SSE], [test x$have_asm_sse = xtrue]) +m4trace:configure.ac:601: -1- m4_pattern_allow([^HAVE_SSE_TRUE$]) +m4trace:configure.ac:601: -1- m4_pattern_allow([^HAVE_SSE_FALSE$]) +m4trace:configure.ac:601: -1- _AM_SUBST_NOTMAKE([HAVE_SSE_TRUE]) +m4trace:configure.ac:601: -1- _AM_SUBST_NOTMAKE([HAVE_SSE_FALSE]) +m4trace:configure.ac:602: -1- AM_CONDITIONAL([HAVE_SSE2], [test x$have_asm_sse2 = xtrue]) +m4trace:configure.ac:602: -1- m4_pattern_allow([^HAVE_SSE2_TRUE$]) +m4trace:configure.ac:602: -1- m4_pattern_allow([^HAVE_SSE2_FALSE$]) +m4trace:configure.ac:602: -1- _AM_SUBST_NOTMAKE([HAVE_SSE2_TRUE]) +m4trace:configure.ac:602: -1- _AM_SUBST_NOTMAKE([HAVE_SSE2_FALSE]) +m4trace:configure.ac:603: -1- AM_CONDITIONAL([HAVE_MMX2], [test x$have_asm_mmx2 = xtrue]) +m4trace:configure.ac:603: -1- m4_pattern_allow([^HAVE_MMX2_TRUE$]) +m4trace:configure.ac:603: -1- m4_pattern_allow([^HAVE_MMX2_FALSE$]) +m4trace:configure.ac:603: -1- _AM_SUBST_NOTMAKE([HAVE_MMX2_TRUE]) +m4trace:configure.ac:603: -1- _AM_SUBST_NOTMAKE([HAVE_MMX2_FALSE]) +m4trace:configure.ac:604: -1- AM_CONDITIONAL([HAVE_DL_DLOPEN], [test x$have_dl_dlopen = xtrue]) +m4trace:configure.ac:604: -1- m4_pattern_allow([^HAVE_DL_DLOPEN_TRUE$]) +m4trace:configure.ac:604: -1- m4_pattern_allow([^HAVE_DL_DLOPEN_FALSE$]) +m4trace:configure.ac:604: -1- _AM_SUBST_NOTMAKE([HAVE_DL_DLOPEN_TRUE]) +m4trace:configure.ac:604: -1- _AM_SUBST_NOTMAKE([HAVE_DL_DLOPEN_FALSE]) +m4trace:configure.ac:605: -1- AM_CONDITIONAL([USE_GVEEJAYRELOADED], [test x$use_gveejayreloaded = xtrue ]) +m4trace:configure.ac:605: -1- m4_pattern_allow([^USE_GVEEJAYRELOADED_TRUE$]) +m4trace:configure.ac:605: -1- m4_pattern_allow([^USE_GVEEJAYRELOADED_FALSE$]) +m4trace:configure.ac:605: -1- _AM_SUBST_NOTMAKE([USE_GVEEJAYRELOADED_TRUE]) +m4trace:configure.ac:605: -1- _AM_SUBST_NOTMAKE([USE_GVEEJAYRELOADED_FALSE]) +m4trace:configure.ac:656: -1- PKG_CHECK_MODULES([GTKCAIRO], [gtkcairo >= 0.3], [use_gtkcairo=yes], [use_gtkcairo="no" +]) +m4trace:configure.ac:656: -1- m4_pattern_allow([^GTKCAIRO_CFLAGS$]) +m4trace:configure.ac:656: -1- m4_pattern_allow([^GTKCAIRO_LIBS$]) +m4trace:configure.ac:656: -1- PKG_CHECK_EXISTS([gtkcairo >= 0.3], [pkg_cv_[]GTKCAIRO_CFLAGS=`$PKG_CONFIG --[]cflags "gtkcairo >= 0.3" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:656: -1- PKG_CHECK_EXISTS([gtkcairo >= 0.3], [pkg_cv_[]GTKCAIRO_LIBS=`$PKG_CONFIG --[]libs "gtkcairo >= 0.3" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:656: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:662: -1- m4_pattern_allow([^GTKCAIRO_CFLAGS $]) +m4trace:configure.ac:663: -1- m4_pattern_allow([^GTKCAIRO_LIBS $]) +m4trace:configure.ac:664: -1- m4_pattern_allow([^USE_GTKCAIRO$]) +m4trace:configure.ac:670: -1- m4_pattern_allow([^gveejay_datadir$]) +m4trace:configure.ac:674: -1- PKG_CHECK_MODULES([GLIB], [$glib_modules]) +m4trace:configure.ac:674: -1- m4_pattern_allow([^GLIB_CFLAGS$]) +m4trace:configure.ac:674: -1- m4_pattern_allow([^GLIB_LIBS$]) +m4trace:configure.ac:674: -1- PKG_CHECK_EXISTS([$glib_modules], [pkg_cv_[]GLIB_CFLAGS=`$PKG_CONFIG --[]cflags "$glib_modules" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:674: -1- PKG_CHECK_EXISTS([$glib_modules], [pkg_cv_[]GLIB_LIBS=`$PKG_CONFIG --[]libs "$glib_modules" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:674: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:675: -1- m4_pattern_allow([^GLIB_CFLAGS$]) +m4trace:configure.ac:676: -1- m4_pattern_allow([^GLIB_LIBS$]) +m4trace:configure.ac:679: -1- PKG_CHECK_MODULES([GTK], [$gtk_modules]) +m4trace:configure.ac:679: -1- m4_pattern_allow([^GTK_CFLAGS$]) +m4trace:configure.ac:679: -1- m4_pattern_allow([^GTK_LIBS$]) +m4trace:configure.ac:679: -1- PKG_CHECK_EXISTS([$gtk_modules], [pkg_cv_[]GTK_CFLAGS=`$PKG_CONFIG --[]cflags "$gtk_modules" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:679: -1- PKG_CHECK_EXISTS([$gtk_modules], [pkg_cv_[]GTK_LIBS=`$PKG_CONFIG --[]libs "$gtk_modules" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:679: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:680: -1- m4_pattern_allow([^GTK_CFLAGS$]) +m4trace:configure.ac:681: -1- m4_pattern_allow([^GTK_LIBS$]) +m4trace:configure.ac:684: -1- PKG_CHECK_MODULES([GLADE], [$libglade_modules]) +m4trace:configure.ac:684: -1- m4_pattern_allow([^GLADE_CFLAGS$]) +m4trace:configure.ac:684: -1- m4_pattern_allow([^GLADE_LIBS$]) +m4trace:configure.ac:684: -1- PKG_CHECK_EXISTS([$libglade_modules], [pkg_cv_[]GLADE_CFLAGS=`$PKG_CONFIG --[]cflags "$libglade_modules" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:684: -1- PKG_CHECK_EXISTS([$libglade_modules], [pkg_cv_[]GLADE_LIBS=`$PKG_CONFIG --[]libs "$libglade_modules" 2>/dev/null`], [pkg_failed=yes]) +m4trace:configure.ac:684: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:685: -1- m4_pattern_allow([^GLADE_CFLAGS$]) +m4trace:configure.ac:686: -1- m4_pattern_allow([^GLADE_LIBS$]) +m4trace:configure.ac:697: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:697: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:697: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file]) +m4trace:configure.ac:697: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:699: -1- m4_pattern_allow([^VERSION$]) diff --git a/veejay-client/autom4te.cache/traces.1 b/veejay-client/autom4te.cache/traces.1 new file mode 100644 index 00000000..2e32e854 --- /dev/null +++ b/veejay-client/autom4te.cache/traces.1 @@ -0,0 +1,1556 @@ +m4trace:configure.ac:3: -1- AC_INIT([gveejay], [1.2], [veejay-users@lists.sourceforge.net]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) +m4trace:configure.ac:3: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.ac:3: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([SHELL]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^SHELL$]) +m4trace:configure.ac:3: -1- AC_SUBST([PATH_SEPARATOR]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PATH_SEPARATOR$]) +m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_NAME]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_STRING]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:3: -1- AC_SUBST([exec_prefix], [NONE]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([exec_prefix]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^exec_prefix$]) +m4trace:configure.ac:3: -1- AC_SUBST([prefix], [NONE]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([prefix]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^prefix$]) +m4trace:configure.ac:3: -1- AC_SUBST([program_transform_name], [s,x,x,]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([program_transform_name]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^program_transform_name$]) +m4trace:configure.ac:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([bindir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^bindir$]) +m4trace:configure.ac:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([sbindir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^sbindir$]) +m4trace:configure.ac:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([libexecdir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^libexecdir$]) +m4trace:configure.ac:3: -1- AC_SUBST([datarootdir], ['${prefix}/share']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([datarootdir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^datarootdir$]) +m4trace:configure.ac:3: -1- AC_SUBST([datadir], ['${datarootdir}']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([datadir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^datadir$]) +m4trace:configure.ac:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([sysconfdir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^sysconfdir$]) +m4trace:configure.ac:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([sharedstatedir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^sharedstatedir$]) +m4trace:configure.ac:3: -1- AC_SUBST([localstatedir], ['${prefix}/var']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([localstatedir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^localstatedir$]) +m4trace:configure.ac:3: -1- AC_SUBST([includedir], ['${prefix}/include']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([includedir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^includedir$]) +m4trace:configure.ac:3: -1- AC_SUBST([oldincludedir], ['/usr/include']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([oldincludedir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^oldincludedir$]) +m4trace:configure.ac:3: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], + ['${datarootdir}/doc/${PACKAGE_TARNAME}'], + ['${datarootdir}/doc/${PACKAGE}'])]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([docdir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^docdir$]) +m4trace:configure.ac:3: -1- AC_SUBST([infodir], ['${datarootdir}/info']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([infodir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^infodir$]) +m4trace:configure.ac:3: -1- AC_SUBST([htmldir], ['${docdir}']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([htmldir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^htmldir$]) +m4trace:configure.ac:3: -1- AC_SUBST([dvidir], ['${docdir}']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([dvidir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^dvidir$]) +m4trace:configure.ac:3: -1- AC_SUBST([pdfdir], ['${docdir}']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([pdfdir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^pdfdir$]) +m4trace:configure.ac:3: -1- AC_SUBST([psdir], ['${docdir}']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([psdir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^psdir$]) +m4trace:configure.ac:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([libdir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^libdir$]) +m4trace:configure.ac:3: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([localedir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:3: -1- AC_SUBST([mandir], ['${datarootdir}/man']) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([mandir]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^mandir$]) +m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ +#undef PACKAGE_NAME]) +m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME]) +m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ +#undef PACKAGE_VERSION]) +m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING]) +m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT]) +m4trace:configure.ac:3: -1- AC_SUBST([DEFS]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([DEFS]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:3: -1- AC_SUBST([ECHO_C]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([ECHO_C]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_C$]) +m4trace:configure.ac:3: -1- AC_SUBST([ECHO_N]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([ECHO_N]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_N$]) +m4trace:configure.ac:3: -1- AC_SUBST([ECHO_T]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([ECHO_T]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_T$]) +m4trace:configure.ac:3: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:3: -1- AC_SUBST([build_alias]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([build_alias]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^build_alias$]) +m4trace:configure.ac:3: -1- AC_SUBST([host_alias]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([host_alias]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^host_alias$]) +m4trace:configure.ac:3: -1- AC_SUBST([target_alias]) +m4trace:configure.ac:3: -1- AC_SUBST_TRACE([target_alias]) +m4trace:configure.ac:3: -1- m4_pattern_allow([^target_alias$]) +m4trace:configure.ac:12: -1- AC_CONFIG_HEADERS([config.h]) +m4trace:configure.ac:14: -1- AC_CANONICAL_HOST +m4trace:configure.ac:14: -1- AC_CANONICAL_BUILD +m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([config.sub]) +m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([config.guess]) +m4trace:configure.ac:14: -1- AC_SUBST([build], [$ac_cv_build]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([build]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^build$]) +m4trace:configure.ac:14: -1- AC_SUBST([build_cpu], [$[1]]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([build_cpu]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^build_cpu$]) +m4trace:configure.ac:14: -1- AC_SUBST([build_vendor], [$[2]]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([build_vendor]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^build_vendor$]) +m4trace:configure.ac:14: -1- AC_SUBST([build_os]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([build_os]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^build_os$]) +m4trace:configure.ac:14: -1- AC_SUBST([host], [$ac_cv_host]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([host]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^host$]) +m4trace:configure.ac:14: -1- AC_SUBST([host_cpu], [$[1]]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([host_cpu]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^host_cpu$]) +m4trace:configure.ac:14: -1- AC_SUBST([host_vendor], [$[2]]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([host_vendor]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^host_vendor$]) +m4trace:configure.ac:14: -1- AC_SUBST([host_os]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([host_os]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^host_os$]) +m4trace:configure.ac:15: -1- AC_CANONICAL_TARGET +m4trace:configure.ac:15: -1- AC_SUBST([target], [$ac_cv_target]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([target]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^target$]) +m4trace:configure.ac:15: -1- AC_SUBST([target_cpu], [$[1]]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([target_cpu]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^target_cpu$]) +m4trace:configure.ac:15: -1- AC_SUBST([target_vendor], [$[2]]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([target_vendor]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^target_vendor$]) +m4trace:configure.ac:15: -1- AC_SUBST([target_os]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([target_os]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^target_os$]) +m4trace:configure.ac:16: -1- AM_INIT_AUTOMAKE([1.7]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:16: -1- AM_AUTOMAKE_VERSION([1.10]) +m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_PROGRAM]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_SCRIPT]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_DATA]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_DATA]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:16: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__isrc]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:16: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:16: -1- AC_SUBST([CYGPATH_W]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CYGPATH_W]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:16: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:196: AC_FOREACH is expanded from... +aclocal.m4:7500: _AM_SET_OPTIONS is expanded from... +aclocal.m4:7177: AM_INIT_AUTOMAKE is expanded from... +configure.ac:16: the top level]) +m4trace:configure.ac:16: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([PACKAGE]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:16: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([VERSION]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:16: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ +#undef PACKAGE]) +m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:16: -1- AH_OUTPUT([VERSION], [/* Version number of package */ +#undef VERSION]) +m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([missing]) +m4trace:configure.ac:16: -1- AC_SUBST([ACLOCAL]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([ACLOCAL]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:16: -1- AC_SUBST([AUTOCONF]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOCONF]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:16: -1- AC_SUBST([AUTOMAKE]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOMAKE]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:16: -1- AC_SUBST([AUTOHEADER]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AUTOHEADER]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:16: -1- AC_SUBST([MAKEINFO]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([MAKEINFO]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:16: -1- AC_SUBST([install_sh]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([install_sh]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:16: -1- AC_SUBST([STRIP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:16: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:16: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([mkdir_p]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^mkdir_p$]) +m4trace:configure.ac:16: -1- AC_SUBST([AWK]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AWK]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:16: -1- AC_SUBST([SET_MAKE]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([SET_MAKE]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:16: -1- AC_SUBST([am__leading_dot]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__leading_dot]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__leading_dot$]) +m4trace:configure.ac:16: -1- AC_SUBST([AMTAR]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AMTAR]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:16: -1- AC_SUBST([am__tar]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__tar]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:16: -1- AC_SUBST([am__untar]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([am__untar]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:17: -1- AM_MAINTAINER_MODE +m4trace:configure.ac:17: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) +m4trace:configure.ac:17: -1- AC_SUBST([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:17: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:17: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) +m4trace:configure.ac:17: -1- AC_SUBST([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:17: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:17: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) +m4trace:configure.ac:17: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:17: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:17: -1- AC_SUBST([MAINT]) +m4trace:configure.ac:17: -1- AC_SUBST_TRACE([MAINT]) +m4trace:configure.ac:17: -1- m4_pattern_allow([^MAINT$]) +m4trace:configure.ac:18: -1- AM_INIT_AUTOMAKE([dist-bzip2]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:18: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([am__isrc]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:18: -1- AC_SUBST([CYGPATH_W]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([CYGPATH_W]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:18: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:196: AC_FOREACH is expanded from... +aclocal.m4:7500: _AM_SET_OPTIONS is expanded from... +aclocal.m4:7177: AM_INIT_AUTOMAKE is expanded from... +configure.ac:18: the top level]) +m4trace:configure.ac:18: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([PACKAGE]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:18: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([VERSION]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:18: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ +#undef PACKAGE]) +m4trace:configure.ac:18: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:18: -1- AH_OUTPUT([VERSION], [/* Version number of package */ +#undef VERSION]) +m4trace:configure.ac:18: -1- AC_SUBST([ACLOCAL]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([ACLOCAL]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:18: -1- AC_SUBST([AUTOCONF]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AUTOCONF]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:18: -1- AC_SUBST([AUTOMAKE]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AUTOMAKE]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:18: -1- AC_SUBST([AUTOHEADER]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AUTOHEADER]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:18: -1- AC_SUBST([MAKEINFO]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([MAKEINFO]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:18: -1- AC_SUBST([install_sh]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([install_sh]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:18: -1- AC_SUBST([STRIP]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:18: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:18: -1- AC_SUBST([AMTAR]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AMTAR]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:18: -1- AC_SUBST([am__tar]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([am__tar]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:18: -1- AC_SUBST([am__untar]) +m4trace:configure.ac:18: -1- AC_SUBST_TRACE([am__untar]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:20: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CONFIG_H]) +m4trace:configure.ac:20: -1- m4_pattern_allow([^HAVE_CONFIG_H$]) +m4trace:configure.ac:20: -1- AH_OUTPUT([HAVE_CONFIG_H], [/* Include config.h */ +#undef HAVE_CONFIG_H]) +m4trace:configure.ac:26: -1- AC_SUBST([LT_RELEASE]) +m4trace:configure.ac:26: -1- AC_SUBST_TRACE([LT_RELEASE]) +m4trace:configure.ac:26: -1- m4_pattern_allow([^LT_RELEASE$]) +m4trace:configure.ac:27: -1- AC_SUBST([LT_CURRENT]) +m4trace:configure.ac:27: -1- AC_SUBST_TRACE([LT_CURRENT]) +m4trace:configure.ac:27: -1- m4_pattern_allow([^LT_CURRENT$]) +m4trace:configure.ac:28: -1- AC_SUBST([LT_REVISION]) +m4trace:configure.ac:28: -1- AC_SUBST_TRACE([LT_REVISION]) +m4trace:configure.ac:28: -1- m4_pattern_allow([^LT_REVISION$]) +m4trace:configure.ac:29: -1- AC_SUBST([LT_AGE]) +m4trace:configure.ac:29: -1- AC_SUBST_TRACE([LT_AGE]) +m4trace:configure.ac:29: -1- m4_pattern_allow([^LT_AGE$]) +m4trace:configure.ac:34: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:34: the top level]) +m4trace:configure.ac:37: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:37: the top level]) +m4trace:configure.ac:40: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:40: the top level]) +m4trace:configure.ac:43: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:43: the top level]) +m4trace:configure.ac:46: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:46: the top level]) +m4trace:configure.ac:49: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:49: the top level]) +m4trace:configure.ac:52: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:52: the top level]) +m4trace:configure.ac:55: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.ac:55: the top level]) +m4trace:configure.ac:58: -1- AH_OUTPUT([_GNU_SOURCE], [/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif]) +m4trace:configure.ac:58: -1- AC_DEFINE_TRACE_LITERAL([_GNU_SOURCE]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^_GNU_SOURCE$]) +m4trace:configure.ac:61: -1- AC_PROG_LIBTOOL +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1364: AC_ARG_ENABLE is expanded from... +aclocal.m4:1971: AC_ENABLE_SHARED is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1364: AC_ARG_ENABLE is expanded from... +aclocal.m4:2010: AC_ENABLE_STATIC is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1364: AC_ARG_ENABLE is expanded from... +aclocal.m4:2049: AC_ENABLE_FAST_INSTALL is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_SUBST([CC]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- AC_SUBST([CFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:61: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([CC]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- AC_SUBST([CC]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- AC_SUBST([CC]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- AC_SUBST([CC]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:61: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([ac_ct_CC]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:61: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([EXEEXT]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^EXEEXT$]) +m4trace:configure.ac:61: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([OBJEXT]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:61: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([DEPDIR]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^DEPDIR$]) +m4trace:configure.ac:61: -1- AC_SUBST([am__include]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__include]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__include$]) +m4trace:configure.ac:61: -1- AC_SUBST([am__quote]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__quote]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__quote$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +m4trace:configure.ac:61: -1- AC_SUBST([AMDEP_TRUE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([AMDEP_TRUE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^AMDEP_TRUE$]) +m4trace:configure.ac:61: -1- AC_SUBST([AMDEP_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([AMDEP_FALSE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^AMDEP_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST([AMDEPBACKSLASH]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) +m4trace:configure.ac:61: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:61: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:61: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:61: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:61: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1382: AC_ARG_WITH is expanded from... +aclocal.m4:2190: AC_PROG_LD is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_SUBST([SED]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([SED]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^SED$]) +m4trace:configure.ac:61: -1- AC_SUBST([GREP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([GREP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:61: -1- AC_SUBST([GREP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([GREP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:61: -1- AC_SUBST([EGREP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([EGREP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.ac:61: -1- AC_SUBST([EGREP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([EGREP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.ac:61: -1- AC_SUBST([LN_S], [$as_ln_s]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([LN_S]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:61: -1- AC_SUBST([ECHO]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([ECHO]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^ECHO$]) +m4trace:configure.ac:61: -1- AC_SUBST([AR]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([AR]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^AR$]) +m4trace:configure.ac:61: -1- AC_SUBST([RANLIB]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([RANLIB]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.ac:61: -1- AC_SUBST([STRIP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1364: AC_ARG_ENABLE is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1382: AC_ARG_WITH is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2414: AC_TRY_LINK is expanded from... +../../lib/m4sugar/m4sh.m4:516: AS_IF is expanded from... +../../lib/autoconf/general.m4:1898: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:1911: AC_CACHE_CHECK is expanded from... +aclocal.m4:490: _LT_AC_LOCK is expanded from... +aclocal.m4:1106: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from... +aclocal.m4:2723: _LT_AC_LANG_C_CONFIG is expanded from... +aclocal.m4:2722: AC_LIBTOOL_LANG_C_CONFIG is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H]) +m4trace:configure.ac:61: -1- AC_SUBST([CPP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CPP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:61: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([CPP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CPP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:61: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:61: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H]) +m4trace:configure.ac:61: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H]) +m4trace:configure.ac:61: -1- _LT_AC_TAGCONFIG +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1382: AC_ARG_WITH is expanded from... +aclocal.m4:1848: _LT_AC_TAGCONFIG is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists], [aclocal.m4:1848: _LT_AC_TAGCONFIG is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists], [aclocal.m4:1848: _LT_AC_TAGCONFIG is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_SUBST([CXX]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:61: -1- AC_SUBST([CXXFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CXXFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:61: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([CXX]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:61: -1- AC_SUBST([ac_ct_CXX]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([ac_ct_CXX]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^ac_ct_CXX$]) +m4trace:configure.ac:61: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CXXDEPMODE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:61: -1- AC_SUBST([am__fastdepCXX_TRUE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:61: -1- AC_SUBST([am__fastdepCXX_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CXXDEPMODE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:61: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:61: -1- AC_SUBST([am__fastdepCXX_TRUE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:61: -1- AC_SUBST([am__fastdepCXX_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:61: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:61: -1- AC_SUBST([CXXCPP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CXXCPP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.ac:61: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([CXXCPP]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([CXXCPP]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.ac:61: -1- AC_SUBST([F77]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([F77]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^F77$]) +m4trace:configure.ac:61: -1- AC_SUBST([FFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([FFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^FFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:61: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:61: -1- AC_SUBST([F77]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([F77]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^F77$]) +m4trace:configure.ac:61: -1- AC_SUBST([ac_ct_F77]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([ac_ct_F77]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^ac_ct_F77$]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/lang.m4:167: AC_LANG_SAVE is expanded from... +aclocal.m4:4131: _LT_AC_LANG_GCJ_CONFIG is expanded from... +aclocal.m4:4130: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... +aclocal.m4:1848: _LT_AC_TAGCONFIG is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from... +aclocal.m4:4131: _LT_AC_LANG_GCJ_CONFIG is expanded from... +aclocal.m4:4130: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... +aclocal.m4:1848: _LT_AC_TAGCONFIG is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/lang.m4:167: AC_LANG_SAVE is expanded from... +aclocal.m4:4187: _LT_AC_LANG_RC_CONFIG is expanded from... +aclocal.m4:4186: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... +aclocal.m4:1848: _LT_AC_TAGCONFIG is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from... +aclocal.m4:4187: _LT_AC_LANG_RC_CONFIG is expanded from... +aclocal.m4:4186: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... +aclocal.m4:1848: _LT_AC_TAGCONFIG is expanded from... +aclocal.m4:91: AC_LIBTOOL_SETUP is expanded from... +aclocal.m4:71: _AC_PROG_LIBTOOL is expanded from... +aclocal.m4:36: AC_PROG_LIBTOOL is expanded from... +configure.ac:61: the top level]) +m4trace:configure.ac:61: -1- AC_SUBST([LIBTOOL]) +m4trace:configure.ac:61: -1- AC_SUBST_TRACE([LIBTOOL]) +m4trace:configure.ac:61: -1- m4_pattern_allow([^LIBTOOL$]) +m4trace:configure.ac:64: -1- AC_SUBST([AWK]) +m4trace:configure.ac:64: -1- AC_SUBST_TRACE([AWK]) +m4trace:configure.ac:64: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:65: -1- AC_SUBST([CC]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- AC_SUBST([CFLAGS]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CFLAGS]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:65: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:65: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:65: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:65: -1- AC_SUBST([CC]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- AC_SUBST([CC]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- AC_SUBST([CC]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- AC_SUBST([CC]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:65: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([ac_ct_CC]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:65: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:65: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:65: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:65: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:65: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:65: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:65: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:65: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:65: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- _m4_warn([obsolete], [The macro `AM_PROG_CC_STDC' is obsolete. +You should run autoupdate.], [aclocal.m4:6879: AM_PROG_CC_STDC is expanded from... +configure.ac:66: the top level]) +m4trace:configure.ac:66: -1- AC_SUBST([CC]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- AC_SUBST([CFLAGS]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CFLAGS]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:66: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:66: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:66: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:66: -1- AC_SUBST([CC]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- AC_SUBST([CC]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- AC_SUBST([CC]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- AC_SUBST([CC]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:66: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([ac_ct_CC]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:66: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:66: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:66: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:66: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:66: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:66: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:66: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:66: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:66: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:66: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:66: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:66: -1- _m4_warn([obsolete], [AM_PROG_CC_STDC: + your code should no longer depend upon `am_cv_prog_cc_stdc', but upon + `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when + you adjust the code. You can also remove the above call to + AC_PROG_CC if you already called it elsewhere.], [aclocal.m4:6879: AM_PROG_CC_STDC is expanded from... +configure.ac:66: the top level]) +m4trace:configure.ac:67: -1- AC_SUBST([YACC]) +m4trace:configure.ac:67: -1- AC_SUBST_TRACE([YACC]) +m4trace:configure.ac:67: -1- m4_pattern_allow([^YACC$]) +m4trace:configure.ac:67: -1- AC_SUBST([YACC]) +m4trace:configure.ac:67: -1- AC_SUBST_TRACE([YACC]) +m4trace:configure.ac:67: -1- m4_pattern_allow([^YACC$]) +m4trace:configure.ac:67: -1- AC_SUBST([YFLAGS]) +m4trace:configure.ac:67: -1- AC_SUBST_TRACE([YFLAGS]) +m4trace:configure.ac:67: -1- m4_pattern_allow([^YFLAGS$]) +m4trace:configure.ac:68: -1- AC_SUBST([LEX]) +m4trace:configure.ac:68: -1- AC_SUBST_TRACE([LEX]) +m4trace:configure.ac:68: -1- m4_pattern_allow([^LEX$]) +m4trace:configure.ac:68: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root]) +m4trace:configure.ac:68: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT]) +m4trace:configure.ac:68: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) +m4trace:configure.ac:68: -1- AC_SUBST([LEXLIB]) +m4trace:configure.ac:68: -1- AC_SUBST_TRACE([LEXLIB]) +m4trace:configure.ac:68: -1- m4_pattern_allow([^LEXLIB$]) +m4trace:configure.ac:68: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER]) +m4trace:configure.ac:68: -1- m4_pattern_allow([^YYTEXT_POINTER$]) +m4trace:configure.ac:68: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a + `char[]\'. */ +#undef YYTEXT_POINTER]) +m4trace:configure.ac:69: -1- AC_SUBST([CXX]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:69: -1- AC_SUBST([CXXFLAGS]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CXXFLAGS]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXXFLAGS$]) +m4trace:configure.ac:69: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:69: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:69: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:69: -1- AC_SUBST([CXX]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.ac:69: -1- AC_SUBST([ac_ct_CXX]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([ac_ct_CXX]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^ac_ct_CXX$]) +m4trace:configure.ac:69: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CXXDEPMODE]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:69: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:69: -1- AC_SUBST([am__fastdepCXX_TRUE]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:69: -1- AC_SUBST([am__fastdepCXX_FALSE]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:69: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:69: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:69: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CXXDEPMODE]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^CXXDEPMODE$]) +m4trace:configure.ac:69: -1- AM_CONDITIONAL([am__fastdepCXX], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:69: -1- AC_SUBST([am__fastdepCXX_TRUE]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) +m4trace:configure.ac:69: -1- AC_SUBST([am__fastdepCXX_FALSE]) +m4trace:configure.ac:69: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:69: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) +m4trace:configure.ac:69: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) +m4trace:configure.ac:69: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) +m4trace:configure.ac:70: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:70: -1- AC_SUBST([INSTALL_PROGRAM]) +m4trace:configure.ac:70: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) +m4trace:configure.ac:70: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:70: -1- AC_SUBST([INSTALL_SCRIPT]) +m4trace:configure.ac:70: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) +m4trace:configure.ac:70: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:70: -1- AC_SUBST([INSTALL_DATA]) +m4trace:configure.ac:70: -1- AC_SUBST_TRACE([INSTALL_DATA]) +m4trace:configure.ac:70: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:71: -1- AC_SUBST([LN_S], [$as_ln_s]) +m4trace:configure.ac:71: -1- AC_SUBST_TRACE([LN_S]) +m4trace:configure.ac:71: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:72: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN]) +m4trace:configure.ac:72: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) +m4trace:configure.ac:72: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN]) +m4trace:configure.ac:73: -1- AC_DEFINE_TRACE_LITERAL([const]) +m4trace:configure.ac:73: -1- m4_pattern_allow([^const$]) +m4trace:configure.ac:73: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ +#undef const]) +m4trace:configure.ac:74: -1- AH_OUTPUT([inline], [/* 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]) +m4trace:configure.ac:75: -1- AC_DEFINE_TRACE_LITERAL([_FILE_OFFSET_BITS]) +m4trace:configure.ac:75: -1- m4_pattern_allow([^_FILE_OFFSET_BITS$]) +m4trace:configure.ac:75: -1- AH_OUTPUT([_FILE_OFFSET_BITS], [/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS]) +m4trace:configure.ac:75: -1- AC_DEFINE_TRACE_LITERAL([_LARGE_FILES]) +m4trace:configure.ac:75: -1- m4_pattern_allow([^_LARGE_FILES$]) +m4trace:configure.ac:75: -1- AH_OUTPUT([_LARGE_FILES], [/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES]) +m4trace:configure.ac:78: -1- AC_SUBST([CCAS]) +m4trace:configure.ac:78: -1- AC_SUBST_TRACE([CCAS]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^CCAS$]) +m4trace:configure.ac:78: -1- AC_SUBST([CCASFLAGS]) +m4trace:configure.ac:78: -1- AC_SUBST_TRACE([CCASFLAGS]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^CCASFLAGS$]) +m4trace:configure.ac:78: -1- AC_SUBST([CCASDEPMODE], [depmode=$am_cv_CCAS_dependencies_compiler_type]) +m4trace:configure.ac:78: -1- AC_SUBST_TRACE([CCASDEPMODE]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^CCASDEPMODE$]) +m4trace:configure.ac:78: -1- AM_CONDITIONAL([am__fastdepCCAS], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:78: -1- AC_SUBST([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:78: -1- AC_SUBST_TRACE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) +m4trace:configure.ac:78: -1- AC_SUBST([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:78: -1- AC_SUBST_TRACE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:78: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) +m4trace:configure.ac:78: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:78: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_FENV_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_FENV_H]) +m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H]) +m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H]) +m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H]) +m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_ALLOCA_H]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_POSIX_MEMALIGN], [/* Define to 1 if you have the `posix_memalign\' function. */ +#undef HAVE_POSIX_MEMALIGN]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_MEMALIGN], [/* Define to 1 if you have the `memalign\' function. */ +#undef HAVE_MEMALIGN]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_FMAX], [/* Define to 1 if you have the `fmax\' function. */ +#undef HAVE_FMAX]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_LROUND], [/* Define to 1 if you have the `lround\' function. */ +#undef HAVE_LROUND]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_POW], [/* Define to 1 if you have the `pow\' function. */ +#undef HAVE_POW]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_BZERO], [/* Define to 1 if you have the `bzero\' function. */ +#undef HAVE_BZERO]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ +#undef HAVE_GETTIMEOFDAY]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ +#undef HAVE_MEMSET]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have the `mmap\' function. */ +#undef HAVE_MMAP]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_STRNDUP], [/* Define to 1 if you have the `strndup\' function. */ +#undef HAVE_STRNDUP]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ +#undef HAVE_STRSTR]) +m4trace:configure.ac:85: -1- AH_OUTPUT([HAVE_STRNCASECMP], [/* Define to 1 if you have the `strncasecmp\' function. */ +#undef HAVE_STRNCASECMP]) +m4trace:configure.ac:86: -1- AH_OUTPUT([HAVE_SCHED_GET_PRIORITY_MAX], [/* Define to 1 if you have the `sched_get_priority_max\' function. */ +#undef HAVE_SCHED_GET_PRIORITY_MAX]) +m4trace:configure.ac:87: -1- AH_OUTPUT([HAVE_SELECT], [/* Define to 1 if you have the `select\' function. */ +#undef HAVE_SELECT]) +m4trace:configure.ac:87: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */ +#undef HAVE_SOCKET]) +m4trace:configure.ac:87: -1- AH_OUTPUT([HAVE_GETPAGESIZE], [/* Define to 1 if you have the `getpagesize\' function. */ +#undef HAVE_GETPAGESIZE]) +m4trace:configure.ac:87: -1- AH_OUTPUT([HAVE_MEMCPY], [/* Define to 1 if you have the `memcpy\' function. */ +#undef HAVE_MEMCPY]) +m4trace:configure.ac:89: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_LONG]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^HAVE_GETOPT_LONG$]) +m4trace:configure.ac:89: -1- AH_OUTPUT([HAVE_GETOPT_LONG], [/* long getopt support */ +#undef HAVE_GETOPT_LONG]) +m4trace:configure.ac:89: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_LONG]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^HAVE_GETOPT_LONG$]) +m4trace:configure.ac:89: -1- AH_OUTPUT([HAVE_GETOPT_LONG], [/* long getopt support */ +#undef HAVE_GETOPT_LONG]) +m4trace:configure.ac:98: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_INT]) +m4trace:configure.ac:98: -1- m4_pattern_allow([^SIZEOF_INT$]) +m4trace:configure.ac:98: -1- AH_OUTPUT([SIZEOF_INT], [/* The size of `int\', as computed by sizeof. */ +#undef SIZEOF_INT]) +m4trace:configure.ac:99: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_INT]) +m4trace:configure.ac:99: -1- m4_pattern_allow([^SIZEOF_LONG_INT$]) +m4trace:configure.ac:99: -1- AH_OUTPUT([SIZEOF_LONG_INT], [/* The size of `long int\', as computed by sizeof. */ +#undef SIZEOF_LONG_INT]) +m4trace:configure.ac:100: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SIZE_T]) +m4trace:configure.ac:100: -1- m4_pattern_allow([^SIZEOF_SIZE_T$]) +m4trace:configure.ac:100: -1- AH_OUTPUT([SIZEOF_SIZE_T], [/* The size of `size_t\', as computed by sizeof. */ +#undef SIZEOF_SIZE_T]) +m4trace:configure.ac:101: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_FLOAT]) +m4trace:configure.ac:101: -1- m4_pattern_allow([^SIZEOF_FLOAT$]) +m4trace:configure.ac:101: -1- AH_OUTPUT([SIZEOF_FLOAT], [/* The size of `float\', as computed by sizeof. */ +#undef SIZEOF_FLOAT]) +m4trace:configure.ac:105: -1- AC_SUBST([LIBGETOPT_LIB]) +m4trace:configure.ac:105: -1- AC_SUBST_TRACE([LIBGETOPT_LIB]) +m4trace:configure.ac:105: -1- m4_pattern_allow([^LIBGETOPT_LIB$]) +m4trace:configure.ac:107: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) +m4trace:configure.ac:107: -1- m4_pattern_allow([^RETSIGTYPE$]) +m4trace:configure.ac:107: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ +#undef RETSIGTYPE]) +m4trace:configure.ac:114: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LINUX]) +m4trace:configure.ac:114: -1- m4_pattern_allow([^HAVE_LINUX$]) +m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_LINUX], [/* Linux platform */ +#undef HAVE_LINUX]) +m4trace:configure.ac:123: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DARWIN]) +m4trace:configure.ac:123: -1- m4_pattern_allow([^HAVE_DARWIN$]) +m4trace:configure.ac:123: -1- AH_OUTPUT([HAVE_DARWIN], [/* MAC OS X Darin */ +#undef HAVE_DARWIN]) +m4trace:configure.ac:144: -1- AC_SUBST([LIBM_LIBS]) +m4trace:configure.ac:144: -1- AC_SUBST_TRACE([LIBM_LIBS]) +m4trace:configure.ac:144: -1- m4_pattern_allow([^LIBM_LIBS$]) +m4trace:configure.ac:149: -1- AC_SUBST([PTHREAD_LIBS]) +m4trace:configure.ac:149: -1- AC_SUBST_TRACE([PTHREAD_LIBS]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^PTHREAD_LIBS$]) +m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPTHREAD]) +m4trace:configure.ac:151: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) +m4trace:configure.ac:151: -1- AH_OUTPUT([HAVE_LIBPTHREAD], [/* Compiling with pthread library */ +#undef HAVE_LIBPTHREAD]) +m4trace:configure.ac:156: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREADSTACKSIZE]) +m4trace:configure.ac:156: -1- m4_pattern_allow([^HAVE_PTHREADSTACKSIZE$]) +m4trace:configure.ac:156: -1- AH_OUTPUT([HAVE_PTHREADSTACKSIZE], [/* Using pthread stack size */ +#undef HAVE_PTHREADSTACKSIZE]) +m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALSA]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^HAVE_ALSA$]) +m4trace:configure.ac:163: -1- AH_OUTPUT([HAVE_ALSA], [/* Whether or not we have alsa */ +#undef HAVE_ALSA]) +m4trace:configure.ac:163: -1- AC_SUBST([ALSA_LIBS ]) +m4trace:configure.ac:163: -1- AC_SUBST_TRACE([ALSA_LIBS ]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^ALSA_LIBS $]) +m4trace:configure.ac:173: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the `dl\' library (-ldl). */ +#undef HAVE_LIBDL]) +m4trace:configure.ac:173: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^HAVE_LIBDL$]) +m4trace:configure.ac:175: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DL_DLOPEN]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_DL_DLOPEN$]) +m4trace:configure.ac:175: -1- AH_OUTPUT([HAVE_DL_DLOPEN], [/* Compile with dlopen support */ +#undef HAVE_DL_DLOPEN]) +m4trace:configure.ac:181: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4trace:configure.ac:181: -1- AC_SUBST([PKG_CONFIG]) +m4trace:configure.ac:181: -1- AC_SUBST_TRACE([PKG_CONFIG]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^PKG_CONFIG$]) +m4trace:configure.ac:181: -1- AC_SUBST([PKG_CONFIG]) +m4trace:configure.ac:181: -1- AC_SUBST_TRACE([PKG_CONFIG]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^PKG_CONFIG$]) +m4trace:configure.ac:181: -1- AC_SUBST([VEEJAY_CFLAGS]) +m4trace:configure.ac:181: -1- AC_SUBST_TRACE([VEEJAY_CFLAGS]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^VEEJAY_CFLAGS$]) +m4trace:configure.ac:181: -1- AC_SUBST([VEEJAY_LIBS]) +m4trace:configure.ac:181: -1- AC_SUBST_TRACE([VEEJAY_LIBS]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^VEEJAY_LIBS$]) +m4trace:configure.ac:181: -1- AC_SUBST([VEEJAY_CFLAGS ]) +m4trace:configure.ac:181: -1- AC_SUBST_TRACE([VEEJAY_CFLAGS ]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^VEEJAY_CFLAGS $]) +m4trace:configure.ac:181: -1- AC_SUBST([VEEJAY_LIBS ]) +m4trace:configure.ac:181: -1- AC_SUBST_TRACE([VEEJAY_LIBS ]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^VEEJAY_LIBS $]) +m4trace:configure.ac:181: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VEEJAY]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^HAVE_VEEJAY$]) +m4trace:configure.ac:181: -1- AH_OUTPUT([HAVE_VEEJAY], [/* Veejay installed */ +#undef HAVE_VEEJAY]) +m4trace:configure.ac:199: -1- AC_SUBST([MJPEGTOOLS_CFLAGS]) +m4trace:configure.ac:199: -1- AC_SUBST_TRACE([MJPEGTOOLS_CFLAGS]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^MJPEGTOOLS_CFLAGS$]) +m4trace:configure.ac:199: -1- AC_SUBST([MJPEGTOOLS_LIBS]) +m4trace:configure.ac:199: -1- AC_SUBST_TRACE([MJPEGTOOLS_LIBS]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^MJPEGTOOLS_LIBS$]) +m4trace:configure.ac:199: -1- AC_SUBST([MJPEGTOOLS_CFLAGS ]) +m4trace:configure.ac:199: -1- AC_SUBST_TRACE([MJPEGTOOLS_CFLAGS ]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^MJPEGTOOLS_CFLAGS $]) +m4trace:configure.ac:199: -1- AC_SUBST([MJPEGTOOLS_LIBS ]) +m4trace:configure.ac:199: -1- AC_SUBST_TRACE([MJPEGTOOLS_LIBS ]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^MJPEGTOOLS_LIBS $]) +m4trace:configure.ac:199: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MJPEGTOOLS]) +m4trace:configure.ac:199: -1- m4_pattern_allow([^HAVE_MJPEGTOOLS$]) +m4trace:configure.ac:199: -1- AH_OUTPUT([HAVE_MJPEGTOOLS], [/* MJPEGTools installed */ +#undef HAVE_MJPEGTOOLS]) +m4trace:configure.ac:213: -1- AC_SUBST([PIXBUF_CFLAGS]) +m4trace:configure.ac:213: -1- AC_SUBST_TRACE([PIXBUF_CFLAGS]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^PIXBUF_CFLAGS$]) +m4trace:configure.ac:213: -1- AC_SUBST([PIXBUF_LIBS]) +m4trace:configure.ac:213: -1- AC_SUBST_TRACE([PIXBUF_LIBS]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^PIXBUF_LIBS$]) +m4trace:configure.ac:213: -1- AC_SUBST([PIXBUF_CFLAGS ]) +m4trace:configure.ac:213: -1- AC_SUBST_TRACE([PIXBUF_CFLAGS ]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^PIXBUF_CFLAGS $]) +m4trace:configure.ac:213: -1- AC_SUBST([PIXBUF_LIBS ]) +m4trace:configure.ac:213: -1- AC_SUBST_TRACE([PIXBUF_LIBS ]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^PIXBUF_LIBS $]) +m4trace:configure.ac:213: -1- AC_DEFINE_TRACE_LITERAL([USE_GDK_PIXBUF]) +m4trace:configure.ac:213: -1- m4_pattern_allow([^USE_GDK_PIXBUF$]) +m4trace:configure.ac:213: -1- AH_OUTPUT([USE_GDK_PIXBUF], [/* use gdk image load / save */ +#undef USE_GDK_PIXBUF]) +m4trace:configure.ac:233: -1- AC_DEFINE_TRACE_LITERAL([HAVE___PROGNAME]) +m4trace:configure.ac:233: -1- m4_pattern_allow([^HAVE___PROGNAME$]) +m4trace:configure.ac:233: -1- AH_OUTPUT([HAVE___PROGNAME], [/* Is __progname defined by system? */ +#undef HAVE___PROGNAME]) +m4trace:configure.ac:237: -1- AC_SUBST([XMKMF]) +m4trace:configure.ac:237: -1- AC_SUBST_TRACE([XMKMF]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^XMKMF$]) +m4trace:configure.ac:237: -1- AC_DEFINE_TRACE_LITERAL([X_DISPLAY_MISSING]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_DISPLAY_MISSING$]) +m4trace:configure.ac:237: -1- AH_OUTPUT([X_DISPLAY_MISSING], [/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING]) +m4trace:configure.ac:237: -1- AC_SUBST([X_CFLAGS]) +m4trace:configure.ac:237: -1- AC_SUBST_TRACE([X_CFLAGS]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_CFLAGS$]) +m4trace:configure.ac:237: -1- AC_SUBST([X_PRE_LIBS]) +m4trace:configure.ac:237: -1- AC_SUBST_TRACE([X_PRE_LIBS]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_PRE_LIBS$]) +m4trace:configure.ac:237: -1- AC_SUBST([X_LIBS]) +m4trace:configure.ac:237: -1- AC_SUBST_TRACE([X_LIBS]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_LIBS$]) +m4trace:configure.ac:237: -1- AC_SUBST([X_EXTRA_LIBS]) +m4trace:configure.ac:237: -1- AC_SUBST_TRACE([X_EXTRA_LIBS]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^X_EXTRA_LIBS$]) +m4trace:configure.ac:238: -1- AM_CONDITIONAL([HAVE_X], [test x$have_x = xyes]) +m4trace:configure.ac:238: -1- AC_SUBST([HAVE_X_TRUE]) +m4trace:configure.ac:238: -1- AC_SUBST_TRACE([HAVE_X_TRUE]) +m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_X_TRUE$]) +m4trace:configure.ac:238: -1- AC_SUBST([HAVE_X_FALSE]) +m4trace:configure.ac:238: -1- AC_SUBST_TRACE([HAVE_X_FALSE]) +m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_X_FALSE$]) +m4trace:configure.ac:238: -1- _AM_SUBST_NOTMAKE([HAVE_X_TRUE]) +m4trace:configure.ac:238: -1- _AM_SUBST_NOTMAKE([HAVE_X_FALSE]) +m4trace:configure.ac:244: -1- AC_SUBST([DEBUGLIBS ]) +m4trace:configure.ac:244: -1- AC_SUBST_TRACE([DEBUGLIBS ]) +m4trace:configure.ac:244: -1- m4_pattern_allow([^DEBUGLIBS $]) +m4trace:configure.ac:277: -1- AC_DEFINE_TRACE_LITERAL([HAVE_X86CPU]) +m4trace:configure.ac:277: -1- m4_pattern_allow([^HAVE_X86CPU$]) +m4trace:configure.ac:277: -1- AH_OUTPUT([HAVE_X86CPU], [/* Compiling for x86 architecture CPU */ +#undef HAVE_X86CPU]) +m4trace:configure.ac:278: -1- AC_DEFINE_TRACE_LITERAL([ARCH_X86]) +m4trace:configure.ac:278: -1- m4_pattern_allow([^ARCH_X86$]) +m4trace:configure.ac:278: -1- AH_OUTPUT([ARCH_X86], [/* Compiling for x86 architecture */ +#undef ARCH_X86]) +m4trace:configure.ac:287: -1- AC_SUBST([OP_CFLAGS ]) +m4trace:configure.ac:287: -1- AC_SUBST_TRACE([OP_CFLAGS ]) +m4trace:configure.ac:287: -1- m4_pattern_allow([^OP_CFLAGS $]) +m4trace:configure.ac:288: -1- AC_SUBST([YUVCFLAGS ]) +m4trace:configure.ac:288: -1- AC_SUBST_TRACE([YUVCFLAGS ]) +m4trace:configure.ac:288: -1- m4_pattern_allow([^YUVCFLAGS $]) +m4trace:configure.ac:301: -1- AC_DEFINE_TRACE_LITERAL([HAVE_X86_CPU]) +m4trace:configure.ac:301: -1- m4_pattern_allow([^HAVE_X86_CPU$]) +m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_X86_CPU], [/* Compiling for x86-64 architecture CPU */ +#undef HAVE_X86_CPU]) +m4trace:configure.ac:302: -1- AC_DEFINE_TRACE_LITERAL([ARCH_X86_64]) +m4trace:configure.ac:302: -1- m4_pattern_allow([^ARCH_X86_64$]) +m4trace:configure.ac:302: -1- AH_OUTPUT([ARCH_X86_64], [/* Compiling for x86-64 architecture CPU */ +#undef ARCH_X86_64]) +m4trace:configure.ac:308: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PPCCPU]) +m4trace:configure.ac:308: -1- m4_pattern_allow([^HAVE_PPCCPU$]) +m4trace:configure.ac:308: -1- AH_OUTPUT([HAVE_PPCCPU], [/* Compiling for PowerPC CPU */ +#undef HAVE_PPCCPU]) +m4trace:configure.ac:309: -1- AC_DEFINE_TRACE_LITERAL([ARCH_PPC]) +m4trace:configure.ac:309: -1- m4_pattern_allow([^ARCH_PPC$]) +m4trace:configure.ac:309: -1- AH_OUTPUT([ARCH_PPC], [/* Compiling for PowerPC */ +#undef ARCH_PPC]) +m4trace:configure.ac:324: -1- AC_DEFINE_TRACE_LITERAL([ARCH_MIPS]) +m4trace:configure.ac:324: -1- m4_pattern_allow([^ARCH_MIPS$]) +m4trace:configure.ac:324: -1- AH_OUTPUT([ARCH_MIPS], [/* Compiling for MIPS CPU */ +#undef ARCH_MIPS]) +m4trace:configure.ac:325: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MIPS]) +m4trace:configure.ac:325: -1- m4_pattern_allow([^HAVE_MIPS$]) +m4trace:configure.ac:325: -1- AH_OUTPUT([HAVE_MIPS], [/* Compiling for MIPS CPU */ +#undef HAVE_MIPS]) +m4trace:configure.ac:337: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PS2]) +m4trace:configure.ac:337: -1- m4_pattern_allow([^HAVE_PS2$]) +m4trace:configure.ac:337: -1- AH_OUTPUT([HAVE_PS2], [/* Compile for playstation2 */ +#undef HAVE_PS2]) +m4trace:configure.ac:353: -1- AC_SUBST([PROGRAM_NOPIC]) +m4trace:configure.ac:353: -1- AC_SUBST_TRACE([PROGRAM_NOPIC]) +m4trace:configure.ac:353: -1- m4_pattern_allow([^PROGRAM_NOPIC$]) +m4trace:configure.ac:366: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ASM_MMX]) +m4trace:configure.ac:366: -1- m4_pattern_allow([^HAVE_ASM_MMX$]) +m4trace:configure.ac:366: -1- AH_OUTPUT([HAVE_ASM_MMX], [/* Compiling in MMX support */ +#undef HAVE_ASM_MMX]) +m4trace:configure.ac:367: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MMX]) +m4trace:configure.ac:367: -1- m4_pattern_allow([^HAVE_MMX$]) +m4trace:configure.ac:367: -1- AH_OUTPUT([HAVE_MMX], [/* Compiling in MMX support */ +#undef HAVE_MMX]) +m4trace:configure.ac:380: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ASM_SSE]) +m4trace:configure.ac:380: -1- m4_pattern_allow([^HAVE_ASM_SSE$]) +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_ASM_SSE], [/* Compiling in SSE support */ +#undef HAVE_ASM_SSE]) +m4trace:configure.ac:381: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSE]) +m4trace:configure.ac:381: -1- m4_pattern_allow([^HAVE_SSE$]) +m4trace:configure.ac:381: -1- AH_OUTPUT([HAVE_SSE], [/* Compiling in SSE support */ +#undef HAVE_SSE]) +m4trace:configure.ac:396: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ASM_SSE2]) +m4trace:configure.ac:396: -1- m4_pattern_allow([^HAVE_ASM_SSE2$]) +m4trace:configure.ac:396: -1- AH_OUTPUT([HAVE_ASM_SSE2], [/* Compiling in SSE2 support */ +#undef HAVE_ASM_SSE2]) +m4trace:configure.ac:397: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSE2]) +m4trace:configure.ac:397: -1- m4_pattern_allow([^HAVE_SSE2$]) +m4trace:configure.ac:397: -1- AH_OUTPUT([HAVE_SSE2], [/* Compiling in SSE2 support */ +#undef HAVE_SSE2]) +m4trace:configure.ac:410: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ASM_3DNOW]) +m4trace:configure.ac:410: -1- m4_pattern_allow([^HAVE_ASM_3DNOW$]) +m4trace:configure.ac:410: -1- AH_OUTPUT([HAVE_ASM_3DNOW], [/* Compiling in 3Dnow */ +#undef HAVE_ASM_3DNOW]) +m4trace:configure.ac:423: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CMOV]) +m4trace:configure.ac:423: -1- m4_pattern_allow([^HAVE_CMOV$]) +m4trace:configure.ac:423: -1- AH_OUTPUT([HAVE_CMOV], [/* Compiling in CMOV */ +#undef HAVE_CMOV]) +m4trace:configure.ac:438: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ASM_MMX2]) +m4trace:configure.ac:438: -1- m4_pattern_allow([^HAVE_ASM_MMX2$]) +m4trace:configure.ac:438: -1- AH_OUTPUT([HAVE_ASM_MMX2], [/* Compiling in MMX2 */ +#undef HAVE_ASM_MMX2]) +m4trace:configure.ac:439: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MMX2]) +m4trace:configure.ac:439: -1- m4_pattern_allow([^HAVE_MMX2$]) +m4trace:configure.ac:439: -1- AH_OUTPUT([HAVE_MMX2], [/* Compiling in MMX2 */ +#undef HAVE_MMX2]) +m4trace:configure.ac:440: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ASM_MMXEXT]) +m4trace:configure.ac:440: -1- m4_pattern_allow([^HAVE_ASM_MMXEXT$]) +m4trace:configure.ac:440: -1- AH_OUTPUT([HAVE_ASM_MMXEXT], [/* Compiling in MMXEXT */ +#undef HAVE_ASM_MMXEXT]) +m4trace:configure.ac:484: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALTIVEC]) +m4trace:configure.ac:484: -1- m4_pattern_allow([^HAVE_ALTIVEC$]) +m4trace:configure.ac:484: -1- AH_OUTPUT([HAVE_ALTIVEC], [/* Inline PPC Altivec primitives available */ +#undef HAVE_ALTIVEC]) +m4trace:configure.ac:486: -1- AC_SUBST([ALTIVEC_CFLAGS]) +m4trace:configure.ac:486: -1- AC_SUBST_TRACE([ALTIVEC_CFLAGS]) +m4trace:configure.ac:486: -1- m4_pattern_allow([^ALTIVEC_CFLAGS$]) +m4trace:configure.ac:543: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FFMPEG_UNINSTALLED]) +m4trace:configure.ac:543: -1- m4_pattern_allow([^HAVE_FFMPEG_UNINSTALLED$]) +m4trace:configure.ac:543: -1- AH_OUTPUT([HAVE_FFMPEG_UNINSTALLED], [/* Defined if building against uninstalled FFmpeg source */ +#undef HAVE_FFMPEG_UNINSTALLED]) +m4trace:configure.ac:546: -1- AC_SUBST([FFMPEG_AVCODEC_CFLAGS]) +m4trace:configure.ac:546: -1- AC_SUBST_TRACE([FFMPEG_AVCODEC_CFLAGS]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^FFMPEG_AVCODEC_CFLAGS$]) +m4trace:configure.ac:546: -1- AC_SUBST([FFMPEG_AVCODEC_LIBS]) +m4trace:configure.ac:546: -1- AC_SUBST_TRACE([FFMPEG_AVCODEC_LIBS]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^FFMPEG_AVCODEC_LIBS$]) +m4trace:configure.ac:546: -1- AC_SUBST([FFMPEG_AVCODEC_CFLAGS ]) +m4trace:configure.ac:546: -1- AC_SUBST_TRACE([FFMPEG_AVCODEC_CFLAGS ]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^FFMPEG_AVCODEC_CFLAGS $]) +m4trace:configure.ac:546: -1- AC_SUBST([FFMPEG_AVCODEC_LIBS ]) +m4trace:configure.ac:546: -1- AC_SUBST_TRACE([FFMPEG_AVCODEC_LIBS ]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^FFMPEG_AVCODEC_LIBS $]) +m4trace:configure.ac:546: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AVCODEC]) +m4trace:configure.ac:546: -1- m4_pattern_allow([^HAVE_AVCODEC$]) +m4trace:configure.ac:546: -1- AH_OUTPUT([HAVE_AVCODEC], [/* use avcodec */ +#undef HAVE_AVCODEC]) +m4trace:configure.ac:554: -1- AC_SUBST([FFMPEG_SWSCALER_CFLAGS]) +m4trace:configure.ac:554: -1- AC_SUBST_TRACE([FFMPEG_SWSCALER_CFLAGS]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^FFMPEG_SWSCALER_CFLAGS$]) +m4trace:configure.ac:554: -1- AC_SUBST([FFMPEG_SWSCALER_LIBS]) +m4trace:configure.ac:554: -1- AC_SUBST_TRACE([FFMPEG_SWSCALER_LIBS]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^FFMPEG_SWSCALER_LIBS$]) +m4trace:configure.ac:554: -1- AC_SUBST([FFMPEG_SWSCALER_CFLAGS ]) +m4trace:configure.ac:554: -1- AC_SUBST_TRACE([FFMPEG_SWSCALER_CFLAGS ]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^FFMPEG_SWSCALER_CFLAGS $]) +m4trace:configure.ac:554: -1- AC_SUBST([FFMPEG_SWSCALER_LIBS ]) +m4trace:configure.ac:554: -1- AC_SUBST_TRACE([FFMPEG_SWSCALER_LIBS ]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^FFMPEG_SWSCALER_LIBS $]) +m4trace:configure.ac:554: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SWSCALER]) +m4trace:configure.ac:554: -1- m4_pattern_allow([^HAVE_SWSCALER$]) +m4trace:configure.ac:554: -1- AH_OUTPUT([HAVE_SWSCALER], [/* use swscaler */ +#undef HAVE_SWSCALER]) +m4trace:configure.ac:583: -1- AC_DEFINE_TRACE_LITERAL([AVCODEC_INC]) +m4trace:configure.ac:583: -1- m4_pattern_allow([^AVCODEC_INC$]) +m4trace:configure.ac:583: -1- AH_OUTPUT([AVCODEC_INC], [/* */ +#undef AVCODEC_INC]) +m4trace:configure.ac:584: -1- AC_DEFINE_TRACE_LITERAL([SWSCALE_INC]) +m4trace:configure.ac:584: -1- m4_pattern_allow([^SWSCALE_INC$]) +m4trace:configure.ac:584: -1- AH_OUTPUT([SWSCALE_INC], [/* */ +#undef SWSCALE_INC]) +m4trace:configure.ac:585: -1- AC_DEFINE_TRACE_LITERAL([AVUTIL_INC]) +m4trace:configure.ac:585: -1- m4_pattern_allow([^AVUTIL_INC$]) +m4trace:configure.ac:585: -1- AH_OUTPUT([AVUTIL_INC], [/* */ +#undef AVUTIL_INC]) +m4trace:configure.ac:590: -1- AM_CONDITIONAL([HAVE_ASM_MMX], [test x$have_asm_mmx = xtrue]) +m4trace:configure.ac:590: -1- AC_SUBST([HAVE_ASM_MMX_TRUE]) +m4trace:configure.ac:590: -1- AC_SUBST_TRACE([HAVE_ASM_MMX_TRUE]) +m4trace:configure.ac:590: -1- m4_pattern_allow([^HAVE_ASM_MMX_TRUE$]) +m4trace:configure.ac:590: -1- AC_SUBST([HAVE_ASM_MMX_FALSE]) +m4trace:configure.ac:590: -1- AC_SUBST_TRACE([HAVE_ASM_MMX_FALSE]) +m4trace:configure.ac:590: -1- m4_pattern_allow([^HAVE_ASM_MMX_FALSE$]) +m4trace:configure.ac:590: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_MMX_TRUE]) +m4trace:configure.ac:590: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_MMX_FALSE]) +m4trace:configure.ac:591: -1- AM_CONDITIONAL([HAVE_X86CPU], [test x$have_x86cpu = xtrue]) +m4trace:configure.ac:591: -1- AC_SUBST([HAVE_X86CPU_TRUE]) +m4trace:configure.ac:591: -1- AC_SUBST_TRACE([HAVE_X86CPU_TRUE]) +m4trace:configure.ac:591: -1- m4_pattern_allow([^HAVE_X86CPU_TRUE$]) +m4trace:configure.ac:591: -1- AC_SUBST([HAVE_X86CPU_FALSE]) +m4trace:configure.ac:591: -1- AC_SUBST_TRACE([HAVE_X86CPU_FALSE]) +m4trace:configure.ac:591: -1- m4_pattern_allow([^HAVE_X86CPU_FALSE$]) +m4trace:configure.ac:591: -1- _AM_SUBST_NOTMAKE([HAVE_X86CPU_TRUE]) +m4trace:configure.ac:591: -1- _AM_SUBST_NOTMAKE([HAVE_X86CPU_FALSE]) +m4trace:configure.ac:592: -1- AM_CONDITIONAL([HAVE_PPCCPU], [test x$have_ppccpu = xtrue]) +m4trace:configure.ac:592: -1- AC_SUBST([HAVE_PPCCPU_TRUE]) +m4trace:configure.ac:592: -1- AC_SUBST_TRACE([HAVE_PPCCPU_TRUE]) +m4trace:configure.ac:592: -1- m4_pattern_allow([^HAVE_PPCCPU_TRUE$]) +m4trace:configure.ac:592: -1- AC_SUBST([HAVE_PPCCPU_FALSE]) +m4trace:configure.ac:592: -1- AC_SUBST_TRACE([HAVE_PPCCPU_FALSE]) +m4trace:configure.ac:592: -1- m4_pattern_allow([^HAVE_PPCCPU_FALSE$]) +m4trace:configure.ac:592: -1- _AM_SUBST_NOTMAKE([HAVE_PPCCPU_TRUE]) +m4trace:configure.ac:592: -1- _AM_SUBST_NOTMAKE([HAVE_PPCCPU_FALSE]) +m4trace:configure.ac:593: -1- AM_CONDITIONAL([ARCH_PPC], [test x$have_ppccpu = xtrue]) +m4trace:configure.ac:593: -1- AC_SUBST([ARCH_PPC_TRUE]) +m4trace:configure.ac:593: -1- AC_SUBST_TRACE([ARCH_PPC_TRUE]) +m4trace:configure.ac:593: -1- m4_pattern_allow([^ARCH_PPC_TRUE$]) +m4trace:configure.ac:593: -1- AC_SUBST([ARCH_PPC_FALSE]) +m4trace:configure.ac:593: -1- AC_SUBST_TRACE([ARCH_PPC_FALSE]) +m4trace:configure.ac:593: -1- m4_pattern_allow([^ARCH_PPC_FALSE$]) +m4trace:configure.ac:593: -1- _AM_SUBST_NOTMAKE([ARCH_PPC_TRUE]) +m4trace:configure.ac:593: -1- _AM_SUBST_NOTMAKE([ARCH_PPC_FALSE]) +m4trace:configure.ac:594: -1- AM_CONDITIONAL([ARCH_X86], [test x$have_x86cpu = xtrue]) +m4trace:configure.ac:594: -1- AC_SUBST([ARCH_X86_TRUE]) +m4trace:configure.ac:594: -1- AC_SUBST_TRACE([ARCH_X86_TRUE]) +m4trace:configure.ac:594: -1- m4_pattern_allow([^ARCH_X86_TRUE$]) +m4trace:configure.ac:594: -1- AC_SUBST([ARCH_X86_FALSE]) +m4trace:configure.ac:594: -1- AC_SUBST_TRACE([ARCH_X86_FALSE]) +m4trace:configure.ac:594: -1- m4_pattern_allow([^ARCH_X86_FALSE$]) +m4trace:configure.ac:594: -1- _AM_SUBST_NOTMAKE([ARCH_X86_TRUE]) +m4trace:configure.ac:594: -1- _AM_SUBST_NOTMAKE([ARCH_X86_FALSE]) +m4trace:configure.ac:595: -1- AM_CONDITIONAL([HAVE_ALTIVEC], [test x$have_altivec = xtrue]) +m4trace:configure.ac:595: -1- AC_SUBST([HAVE_ALTIVEC_TRUE]) +m4trace:configure.ac:595: -1- AC_SUBST_TRACE([HAVE_ALTIVEC_TRUE]) +m4trace:configure.ac:595: -1- m4_pattern_allow([^HAVE_ALTIVEC_TRUE$]) +m4trace:configure.ac:595: -1- AC_SUBST([HAVE_ALTIVEC_FALSE]) +m4trace:configure.ac:595: -1- AC_SUBST_TRACE([HAVE_ALTIVEC_FALSE]) +m4trace:configure.ac:595: -1- m4_pattern_allow([^HAVE_ALTIVEC_FALSE$]) +m4trace:configure.ac:595: -1- _AM_SUBST_NOTMAKE([HAVE_ALTIVEC_TRUE]) +m4trace:configure.ac:595: -1- _AM_SUBST_NOTMAKE([HAVE_ALTIVEC_FALSE]) +m4trace:configure.ac:596: -1- AM_CONDITIONAL([HAVE_ASM_MMX2], [test x$have_asm_mmx2 = xtrue]) +m4trace:configure.ac:596: -1- AC_SUBST([HAVE_ASM_MMX2_TRUE]) +m4trace:configure.ac:596: -1- AC_SUBST_TRACE([HAVE_ASM_MMX2_TRUE]) +m4trace:configure.ac:596: -1- m4_pattern_allow([^HAVE_ASM_MMX2_TRUE$]) +m4trace:configure.ac:596: -1- AC_SUBST([HAVE_ASM_MMX2_FALSE]) +m4trace:configure.ac:596: -1- AC_SUBST_TRACE([HAVE_ASM_MMX2_FALSE]) +m4trace:configure.ac:596: -1- m4_pattern_allow([^HAVE_ASM_MMX2_FALSE$]) +m4trace:configure.ac:596: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_MMX2_TRUE]) +m4trace:configure.ac:596: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_MMX2_FALSE]) +m4trace:configure.ac:597: -1- AM_CONDITIONAL([HAVE_ASM_SSE], [test x$have_asm_sse = xtrue]) +m4trace:configure.ac:597: -1- AC_SUBST([HAVE_ASM_SSE_TRUE]) +m4trace:configure.ac:597: -1- AC_SUBST_TRACE([HAVE_ASM_SSE_TRUE]) +m4trace:configure.ac:597: -1- m4_pattern_allow([^HAVE_ASM_SSE_TRUE$]) +m4trace:configure.ac:597: -1- AC_SUBST([HAVE_ASM_SSE_FALSE]) +m4trace:configure.ac:597: -1- AC_SUBST_TRACE([HAVE_ASM_SSE_FALSE]) +m4trace:configure.ac:597: -1- m4_pattern_allow([^HAVE_ASM_SSE_FALSE$]) +m4trace:configure.ac:597: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_SSE_TRUE]) +m4trace:configure.ac:597: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_SSE_FALSE]) +m4trace:configure.ac:598: -1- AM_CONDITIONAL([HAVE_ASM_SSE2], [test x$have_asm_sse2 = xtrue]) +m4trace:configure.ac:598: -1- AC_SUBST([HAVE_ASM_SSE2_TRUE]) +m4trace:configure.ac:598: -1- AC_SUBST_TRACE([HAVE_ASM_SSE2_TRUE]) +m4trace:configure.ac:598: -1- m4_pattern_allow([^HAVE_ASM_SSE2_TRUE$]) +m4trace:configure.ac:598: -1- AC_SUBST([HAVE_ASM_SSE2_FALSE]) +m4trace:configure.ac:598: -1- AC_SUBST_TRACE([HAVE_ASM_SSE2_FALSE]) +m4trace:configure.ac:598: -1- m4_pattern_allow([^HAVE_ASM_SSE2_FALSE$]) +m4trace:configure.ac:598: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_SSE2_TRUE]) +m4trace:configure.ac:598: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_SSE2_FALSE]) +m4trace:configure.ac:599: -1- AM_CONDITIONAL([HAVE_ASM_NASM], [test x$have_asm_nasm = xtrue]) +m4trace:configure.ac:599: -1- AC_SUBST([HAVE_ASM_NASM_TRUE]) +m4trace:configure.ac:599: -1- AC_SUBST_TRACE([HAVE_ASM_NASM_TRUE]) +m4trace:configure.ac:599: -1- m4_pattern_allow([^HAVE_ASM_NASM_TRUE$]) +m4trace:configure.ac:599: -1- AC_SUBST([HAVE_ASM_NASM_FALSE]) +m4trace:configure.ac:599: -1- AC_SUBST_TRACE([HAVE_ASM_NASM_FALSE]) +m4trace:configure.ac:599: -1- m4_pattern_allow([^HAVE_ASM_NASM_FALSE$]) +m4trace:configure.ac:599: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_NASM_TRUE]) +m4trace:configure.ac:599: -1- _AM_SUBST_NOTMAKE([HAVE_ASM_NASM_FALSE]) +m4trace:configure.ac:600: -1- AM_CONDITIONAL([HAVE_MMX], [test x$have_asm_mmx = xtrue]) +m4trace:configure.ac:600: -1- AC_SUBST([HAVE_MMX_TRUE]) +m4trace:configure.ac:600: -1- AC_SUBST_TRACE([HAVE_MMX_TRUE]) +m4trace:configure.ac:600: -1- m4_pattern_allow([^HAVE_MMX_TRUE$]) +m4trace:configure.ac:600: -1- AC_SUBST([HAVE_MMX_FALSE]) +m4trace:configure.ac:600: -1- AC_SUBST_TRACE([HAVE_MMX_FALSE]) +m4trace:configure.ac:600: -1- m4_pattern_allow([^HAVE_MMX_FALSE$]) +m4trace:configure.ac:600: -1- _AM_SUBST_NOTMAKE([HAVE_MMX_TRUE]) +m4trace:configure.ac:600: -1- _AM_SUBST_NOTMAKE([HAVE_MMX_FALSE]) +m4trace:configure.ac:601: -1- AM_CONDITIONAL([HAVE_SSE], [test x$have_asm_sse = xtrue]) +m4trace:configure.ac:601: -1- AC_SUBST([HAVE_SSE_TRUE]) +m4trace:configure.ac:601: -1- AC_SUBST_TRACE([HAVE_SSE_TRUE]) +m4trace:configure.ac:601: -1- m4_pattern_allow([^HAVE_SSE_TRUE$]) +m4trace:configure.ac:601: -1- AC_SUBST([HAVE_SSE_FALSE]) +m4trace:configure.ac:601: -1- AC_SUBST_TRACE([HAVE_SSE_FALSE]) +m4trace:configure.ac:601: -1- m4_pattern_allow([^HAVE_SSE_FALSE$]) +m4trace:configure.ac:601: -1- _AM_SUBST_NOTMAKE([HAVE_SSE_TRUE]) +m4trace:configure.ac:601: -1- _AM_SUBST_NOTMAKE([HAVE_SSE_FALSE]) +m4trace:configure.ac:602: -1- AM_CONDITIONAL([HAVE_SSE2], [test x$have_asm_sse2 = xtrue]) +m4trace:configure.ac:602: -1- AC_SUBST([HAVE_SSE2_TRUE]) +m4trace:configure.ac:602: -1- AC_SUBST_TRACE([HAVE_SSE2_TRUE]) +m4trace:configure.ac:602: -1- m4_pattern_allow([^HAVE_SSE2_TRUE$]) +m4trace:configure.ac:602: -1- AC_SUBST([HAVE_SSE2_FALSE]) +m4trace:configure.ac:602: -1- AC_SUBST_TRACE([HAVE_SSE2_FALSE]) +m4trace:configure.ac:602: -1- m4_pattern_allow([^HAVE_SSE2_FALSE$]) +m4trace:configure.ac:602: -1- _AM_SUBST_NOTMAKE([HAVE_SSE2_TRUE]) +m4trace:configure.ac:602: -1- _AM_SUBST_NOTMAKE([HAVE_SSE2_FALSE]) +m4trace:configure.ac:603: -1- AM_CONDITIONAL([HAVE_MMX2], [test x$have_asm_mmx2 = xtrue]) +m4trace:configure.ac:603: -1- AC_SUBST([HAVE_MMX2_TRUE]) +m4trace:configure.ac:603: -1- AC_SUBST_TRACE([HAVE_MMX2_TRUE]) +m4trace:configure.ac:603: -1- m4_pattern_allow([^HAVE_MMX2_TRUE$]) +m4trace:configure.ac:603: -1- AC_SUBST([HAVE_MMX2_FALSE]) +m4trace:configure.ac:603: -1- AC_SUBST_TRACE([HAVE_MMX2_FALSE]) +m4trace:configure.ac:603: -1- m4_pattern_allow([^HAVE_MMX2_FALSE$]) +m4trace:configure.ac:603: -1- _AM_SUBST_NOTMAKE([HAVE_MMX2_TRUE]) +m4trace:configure.ac:603: -1- _AM_SUBST_NOTMAKE([HAVE_MMX2_FALSE]) +m4trace:configure.ac:604: -1- AM_CONDITIONAL([HAVE_DL_DLOPEN], [test x$have_dl_dlopen = xtrue]) +m4trace:configure.ac:604: -1- AC_SUBST([HAVE_DL_DLOPEN_TRUE]) +m4trace:configure.ac:604: -1- AC_SUBST_TRACE([HAVE_DL_DLOPEN_TRUE]) +m4trace:configure.ac:604: -1- m4_pattern_allow([^HAVE_DL_DLOPEN_TRUE$]) +m4trace:configure.ac:604: -1- AC_SUBST([HAVE_DL_DLOPEN_FALSE]) +m4trace:configure.ac:604: -1- AC_SUBST_TRACE([HAVE_DL_DLOPEN_FALSE]) +m4trace:configure.ac:604: -1- m4_pattern_allow([^HAVE_DL_DLOPEN_FALSE$]) +m4trace:configure.ac:604: -1- _AM_SUBST_NOTMAKE([HAVE_DL_DLOPEN_TRUE]) +m4trace:configure.ac:604: -1- _AM_SUBST_NOTMAKE([HAVE_DL_DLOPEN_FALSE]) +m4trace:configure.ac:605: -1- AM_CONDITIONAL([USE_GVEEJAYRELOADED], [test x$use_gveejayreloaded = xtrue ]) +m4trace:configure.ac:605: -1- AC_SUBST([USE_GVEEJAYRELOADED_TRUE]) +m4trace:configure.ac:605: -1- AC_SUBST_TRACE([USE_GVEEJAYRELOADED_TRUE]) +m4trace:configure.ac:605: -1- m4_pattern_allow([^USE_GVEEJAYRELOADED_TRUE$]) +m4trace:configure.ac:605: -1- AC_SUBST([USE_GVEEJAYRELOADED_FALSE]) +m4trace:configure.ac:605: -1- AC_SUBST_TRACE([USE_GVEEJAYRELOADED_FALSE]) +m4trace:configure.ac:605: -1- m4_pattern_allow([^USE_GVEEJAYRELOADED_FALSE$]) +m4trace:configure.ac:605: -1- _AM_SUBST_NOTMAKE([USE_GVEEJAYRELOADED_TRUE]) +m4trace:configure.ac:605: -1- _AM_SUBST_NOTMAKE([USE_GVEEJAYRELOADED_FALSE]) +m4trace:configure.ac:656: -1- AC_SUBST([GTKCAIRO_CFLAGS]) +m4trace:configure.ac:656: -1- AC_SUBST_TRACE([GTKCAIRO_CFLAGS]) +m4trace:configure.ac:656: -1- m4_pattern_allow([^GTKCAIRO_CFLAGS$]) +m4trace:configure.ac:656: -1- AC_SUBST([GTKCAIRO_LIBS]) +m4trace:configure.ac:656: -1- AC_SUBST_TRACE([GTKCAIRO_LIBS]) +m4trace:configure.ac:656: -1- m4_pattern_allow([^GTKCAIRO_LIBS$]) +m4trace:configure.ac:662: -1- AC_SUBST([GTKCAIRO_CFLAGS ]) +m4trace:configure.ac:662: -1- AC_SUBST_TRACE([GTKCAIRO_CFLAGS ]) +m4trace:configure.ac:662: -1- m4_pattern_allow([^GTKCAIRO_CFLAGS $]) +m4trace:configure.ac:663: -1- AC_SUBST([GTKCAIRO_LIBS ]) +m4trace:configure.ac:663: -1- AC_SUBST_TRACE([GTKCAIRO_LIBS ]) +m4trace:configure.ac:663: -1- m4_pattern_allow([^GTKCAIRO_LIBS $]) +m4trace:configure.ac:664: -1- AC_DEFINE_TRACE_LITERAL([USE_GTKCAIRO]) +m4trace:configure.ac:664: -1- m4_pattern_allow([^USE_GTKCAIRO$]) +m4trace:configure.ac:664: -1- AH_OUTPUT([USE_GTKCAIRO], [/* GtkCairo widget - Cairo */ +#undef USE_GTKCAIRO]) +m4trace:configure.ac:670: -1- AC_SUBST([gveejay_datadir]) +m4trace:configure.ac:670: -1- AC_SUBST_TRACE([gveejay_datadir]) +m4trace:configure.ac:670: -1- m4_pattern_allow([^gveejay_datadir$]) +m4trace:configure.ac:674: -1- AC_SUBST([GLIB_CFLAGS]) +m4trace:configure.ac:674: -1- AC_SUBST_TRACE([GLIB_CFLAGS]) +m4trace:configure.ac:674: -1- m4_pattern_allow([^GLIB_CFLAGS$]) +m4trace:configure.ac:674: -1- AC_SUBST([GLIB_LIBS]) +m4trace:configure.ac:674: -1- AC_SUBST_TRACE([GLIB_LIBS]) +m4trace:configure.ac:674: -1- m4_pattern_allow([^GLIB_LIBS$]) +m4trace:configure.ac:675: -1- AC_SUBST([GLIB_CFLAGS]) +m4trace:configure.ac:675: -1- AC_SUBST_TRACE([GLIB_CFLAGS]) +m4trace:configure.ac:675: -1- m4_pattern_allow([^GLIB_CFLAGS$]) +m4trace:configure.ac:676: -1- AC_SUBST([GLIB_LIBS]) +m4trace:configure.ac:676: -1- AC_SUBST_TRACE([GLIB_LIBS]) +m4trace:configure.ac:676: -1- m4_pattern_allow([^GLIB_LIBS$]) +m4trace:configure.ac:679: -1- AC_SUBST([GTK_CFLAGS]) +m4trace:configure.ac:679: -1- AC_SUBST_TRACE([GTK_CFLAGS]) +m4trace:configure.ac:679: -1- m4_pattern_allow([^GTK_CFLAGS$]) +m4trace:configure.ac:679: -1- AC_SUBST([GTK_LIBS]) +m4trace:configure.ac:679: -1- AC_SUBST_TRACE([GTK_LIBS]) +m4trace:configure.ac:679: -1- m4_pattern_allow([^GTK_LIBS$]) +m4trace:configure.ac:680: -1- AC_SUBST([GTK_CFLAGS]) +m4trace:configure.ac:680: -1- AC_SUBST_TRACE([GTK_CFLAGS]) +m4trace:configure.ac:680: -1- m4_pattern_allow([^GTK_CFLAGS$]) +m4trace:configure.ac:681: -1- AC_SUBST([GTK_LIBS]) +m4trace:configure.ac:681: -1- AC_SUBST_TRACE([GTK_LIBS]) +m4trace:configure.ac:681: -1- m4_pattern_allow([^GTK_LIBS$]) +m4trace:configure.ac:684: -1- AC_SUBST([GLADE_CFLAGS]) +m4trace:configure.ac:684: -1- AC_SUBST_TRACE([GLADE_CFLAGS]) +m4trace:configure.ac:684: -1- m4_pattern_allow([^GLADE_CFLAGS$]) +m4trace:configure.ac:684: -1- AC_SUBST([GLADE_LIBS]) +m4trace:configure.ac:684: -1- AC_SUBST_TRACE([GLADE_LIBS]) +m4trace:configure.ac:684: -1- m4_pattern_allow([^GLADE_LIBS$]) +m4trace:configure.ac:685: -1- AC_SUBST([GLADE_CFLAGS]) +m4trace:configure.ac:685: -1- AC_SUBST_TRACE([GLADE_CFLAGS]) +m4trace:configure.ac:685: -1- m4_pattern_allow([^GLADE_CFLAGS$]) +m4trace:configure.ac:686: -1- AC_SUBST([GLADE_LIBS]) +m4trace:configure.ac:686: -1- AC_SUBST_TRACE([GLADE_LIBS]) +m4trace:configure.ac:686: -1- m4_pattern_allow([^GLADE_LIBS$]) +m4trace:configure.ac:692: -1- AC_CONFIG_FILES([ +Makefile +src/Makefile +gveejay-paths.sh +]) +m4trace:configure.ac:697: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:697: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:697: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.ac:697: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([INSTALL]) +m4trace:configure.ac:697: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.ac:699: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) +m4trace:configure.ac:699: -1- m4_pattern_allow([^VERSION$]) diff --git a/veejay-client/config.guess b/veejay-client/config.guess new file mode 100755 index 00000000..0f0fe712 --- /dev/null +++ b/veejay-client/config.guess @@ -0,0 +1,1516 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-03-06' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/veejay-client/config.h b/veejay-client/config.h new file mode 100644 index 00000000..a57521b7 --- /dev/null +++ b/veejay-client/config.h @@ -0,0 +1,282 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Compiling for MIPS CPU */ +/* #undef ARCH_MIPS */ + +/* Compiling for PowerPC */ +/* #undef ARCH_PPC */ + +/* Compiling for x86 architecture */ +#define ARCH_X86 1 + +/* Compiling for x86-64 architecture CPU */ +/* #undef ARCH_X86_64 */ + +/* */ +#define AVCODEC_INC + +/* */ +#define AVUTIL_INC + +/* Define to 1 if you have the header file. */ +#define HAVE_ALLOCA_H 1 + +/* Whether or not we have alsa */ +#define HAVE_ALSA 1 + +/* Inline PPC Altivec primitives available */ +/* #undef HAVE_ALTIVEC */ + +/* Compiling in 3Dnow */ +/* #undef HAVE_ASM_3DNOW */ + +/* Compiling in MMX support */ +#define HAVE_ASM_MMX + +/* Compiling in MMX2 */ +#define HAVE_ASM_MMX2 + +/* Compiling in MMXEXT */ +#define HAVE_ASM_MMXEXT + +/* Compiling in SSE support */ +#define HAVE_ASM_SSE + +/* Compiling in SSE2 support */ +#define HAVE_ASM_SSE2 + +/* use avcodec */ +#define HAVE_AVCODEC 1 + +/* Define to 1 if you have the `bzero' function. */ +#define HAVE_BZERO 1 + +/* Compiling in CMOV */ +#define HAVE_CMOV + +/* Include config.h */ +#define HAVE_CONFIG_H 1 + +/* MAC OS X Darin */ +/* #undef HAVE_DARWIN */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Compile with dlopen support */ +#define HAVE_DL_DLOPEN + +/* Define to 1 if you have the header file. */ +#define HAVE_FENV_H 1 + +/* Defined if building against uninstalled FFmpeg source */ +#define HAVE_FFMPEG_UNINSTALLED + +/* Define to 1 if you have the `fmax' function. */ +/* #undef HAVE_FMAX */ + +/* long getopt support */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `dl' library (-ldl). */ +#define HAVE_LIBDL 1 + +/* Compiling with pthread library */ +#define HAVE_LIBPTHREAD + +/* Linux platform */ +#define HAVE_LINUX + +/* Define to 1 if you have the `lround' function. */ +/* #undef HAVE_LROUND */ + +/* Define to 1 if you have the `memalign' function. */ +#define HAVE_MEMALIGN 1 + +/* Define to 1 if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Compiling for MIPS CPU */ +/* #undef HAVE_MIPS */ + +/* MJPEGTools installed */ +#define HAVE_MJPEGTOOLS 1 + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Compiling in MMX support */ +#define HAVE_MMX + +/* Compiling in MMX2 */ +#define HAVE_MMX2 + +/* Define to 1 if you have the `posix_memalign' function. */ +#define HAVE_POSIX_MEMALIGN 1 + +/* Define to 1 if you have the `pow' function. */ +/* #undef HAVE_POW */ + +/* Compiling for PowerPC CPU */ +/* #undef HAVE_PPCCPU */ + +/* Compile for playstation2 */ +/* #undef HAVE_PS2 */ + +/* Using pthread stack size */ +/* #undef HAVE_PTHREADSTACKSIZE */ + +/* Define to 1 if you have the `sched_get_priority_max' function. */ +#define HAVE_SCHED_GET_PRIORITY_MAX 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Compiling in SSE support */ +#define HAVE_SSE + +/* Compiling in SSE2 support */ +#define HAVE_SSE2 + +/* 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_STDLIB_H 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 `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the `strndup' function. */ +#define HAVE_STRNDUP 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* use swscaler */ +#define HAVE_SWSCALER 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_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Veejay installed */ +#define HAVE_VEEJAY 1 + +/* Compiling for x86 architecture CPU */ +#define HAVE_X86CPU + +/* Compiling for x86-64 architecture CPU */ +/* #undef HAVE_X86_CPU */ + +/* Is __progname defined by system? */ +#define HAVE___PROGNAME 1 + +/* Name of package */ +#define PACKAGE "gveejay" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gveejay" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gveejay 1.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gveejay" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2" + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* The size of `float', as computed by sizeof. */ +#define SIZEOF_FLOAT 4 + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long int', as computed by sizeof. */ +#define SIZEOF_LONG_INT 4 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* */ +#define SWSCALE_INC + +/* use gdk image load / save */ +#define USE_GDK_PIXBUF 1 + +/* GtkCairo widget - Cairo */ +#define USE_GTKCAIRO + +/* Version number of package */ +#define VERSION "1.2" + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ + +/* Define to 1 if the X Window System is missing or not being used. */ +/* #undef X_DISPLAY_MISSING */ + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS 64 + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +/* 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 diff --git a/veejay-client/config.h.in b/veejay-client/config.h.in new file mode 100644 index 00000000..bcf4e1d1 --- /dev/null +++ b/veejay-client/config.h.in @@ -0,0 +1,281 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Compiling for MIPS CPU */ +#undef ARCH_MIPS + +/* Compiling for PowerPC */ +#undef ARCH_PPC + +/* Compiling for x86 architecture */ +#undef ARCH_X86 + +/* Compiling for x86-64 architecture CPU */ +#undef ARCH_X86_64 + +/* */ +#undef AVCODEC_INC + +/* */ +#undef AVUTIL_INC + +/* Define to 1 if you have the header file. */ +#undef HAVE_ALLOCA_H + +/* Whether or not we have alsa */ +#undef HAVE_ALSA + +/* Inline PPC Altivec primitives available */ +#undef HAVE_ALTIVEC + +/* Compiling in 3Dnow */ +#undef HAVE_ASM_3DNOW + +/* Compiling in MMX support */ +#undef HAVE_ASM_MMX + +/* Compiling in MMX2 */ +#undef HAVE_ASM_MMX2 + +/* Compiling in MMXEXT */ +#undef HAVE_ASM_MMXEXT + +/* Compiling in SSE support */ +#undef HAVE_ASM_SSE + +/* Compiling in SSE2 support */ +#undef HAVE_ASM_SSE2 + +/* use avcodec */ +#undef HAVE_AVCODEC + +/* Define to 1 if you have the `bzero' function. */ +#undef HAVE_BZERO + +/* Compiling in CMOV */ +#undef HAVE_CMOV + +/* Include config.h */ +#undef HAVE_CONFIG_H + +/* MAC OS X Darin */ +#undef HAVE_DARWIN + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Compile with dlopen support */ +#undef HAVE_DL_DLOPEN + +/* Define to 1 if you have the header file. */ +#undef HAVE_FENV_H + +/* Defined if building against uninstalled FFmpeg source */ +#undef HAVE_FFMPEG_UNINSTALLED + +/* Define to 1 if you have the `fmax' function. */ +#undef HAVE_FMAX + +/* long getopt support */ +#undef HAVE_GETOPT_LONG + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `dl' library (-ldl). */ +#undef HAVE_LIBDL + +/* Compiling with pthread library */ +#undef HAVE_LIBPTHREAD + +/* Linux platform */ +#undef HAVE_LINUX + +/* Define to 1 if you have the `lround' function. */ +#undef HAVE_LROUND + +/* Define to 1 if you have the `memalign' function. */ +#undef HAVE_MEMALIGN + +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Compiling for MIPS CPU */ +#undef HAVE_MIPS + +/* MJPEGTools installed */ +#undef HAVE_MJPEGTOOLS + +/* Define to 1 if you have the `mmap' function. */ +#undef HAVE_MMAP + +/* Compiling in MMX support */ +#undef HAVE_MMX + +/* Compiling in MMX2 */ +#undef HAVE_MMX2 + +/* Define to 1 if you have the `posix_memalign' function. */ +#undef HAVE_POSIX_MEMALIGN + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Compiling for PowerPC CPU */ +#undef HAVE_PPCCPU + +/* Compile for playstation2 */ +#undef HAVE_PS2 + +/* Using pthread stack size */ +#undef HAVE_PTHREADSTACKSIZE + +/* Define to 1 if you have the `sched_get_priority_max' function. */ +#undef HAVE_SCHED_GET_PRIORITY_MAX + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* Compiling in SSE support */ +#undef HAVE_SSE + +/* Compiling in SSE2 support */ +#undef HAVE_SSE2 + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strncasecmp' function. */ +#undef HAVE_STRNCASECMP + +/* Define to 1 if you have the `strndup' function. */ +#undef HAVE_STRNDUP + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* use swscaler */ +#undef HAVE_SWSCALER + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Veejay installed */ +#undef HAVE_VEEJAY + +/* Compiling for x86 architecture CPU */ +#undef HAVE_X86CPU + +/* Compiling for x86-64 architecture CPU */ +#undef HAVE_X86_CPU + +/* Is __progname defined by system? */ +#undef HAVE___PROGNAME + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* The size of `float', as computed by sizeof. */ +#undef SIZEOF_FLOAT + +/* The size of `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of `long int', as computed by sizeof. */ +#undef SIZEOF_LONG_INT + +/* The size of `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* */ +#undef SWSCALE_INC + +/* use gdk image load / save */ +#undef USE_GDK_PIXBUF + +/* GtkCairo widget - Cairo */ +#undef USE_GTKCAIRO + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#undef YYTEXT_POINTER + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif + +/* 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 diff --git a/veejay-client/config.log b/veejay-client/config.log new file mode 100644 index 00000000..39d36a91 --- /dev/null +++ b/veejay-client/config.log @@ -0,0 +1,4342 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by gveejay configure 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ ./configure --enable-debug --enable-strict + +## --------- ## +## Platform. ## +## --------- ## + +hostname = cc1161740-a +uname -m = i686 +uname -r = 2.6.22-14-generic +uname -s = Linux +uname -v = #1 SMP Tue Feb 12 07:42:25 UTC 2008 + +/usr/bin/uname -p = unknown +/bin/uname -X = unknown + +/bin/arch = unknown +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +/usr/bin/hostinfo = unknown +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /usr/local/sbin +PATH: /usr/local/bin +PATH: /usr/sbin +PATH: /usr/bin +PATH: /sbin +PATH: /bin +PATH: /usr/games + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:2165: checking build system type +configure:2183: result: i686-pc-linux-gnu +configure:2205: checking host system type +configure:2220: result: i686-pc-linux-gnu +configure:2242: checking target system type +configure:2257: result: i686-pc-linux-gnu +configure:2300: checking for a BSD-compatible install +configure:2356: result: /usr/bin/install -c +configure:2367: checking whether build environment is sane +configure:2410: result: yes +configure:2438: checking for a thread-safe mkdir -p +configure:2477: result: /bin/mkdir -p +configure:2490: checking for gawk +configure:2506: found /usr/bin/gawk +configure:2517: result: gawk +configure:2528: checking whether make sets $(MAKE) +configure:2549: result: yes +configure:2737: checking whether to enable maintainer-specific portions of Makefiles +configure:2746: result: no +configure:3082: checking for style of include used by make +configure:3110: result: GNU +configure:3180: checking for gcc +configure:3196: found /usr/bin/gcc +configure:3207: result: gcc +configure:3445: checking for C compiler version +configure:3452: gcc --version >&5 +gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +Copyright (C) 2006 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:3455: $? = 0 +configure:3462: gcc -v >&5 +Using built-in specs. +Target: i486-linux-gnu +Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu +Thread model: posix +gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +configure:3465: $? = 0 +configure:3472: gcc -V >&5 +gcc: '-V' option must have argument +configure:3475: $? = 1 +configure:3498: checking for C compiler default output file name +configure:3525: gcc conftest.c >&5 +configure:3528: $? = 0 +configure:3566: result: a.out +configure:3583: checking whether the C compiler works +configure:3593: ./a.out +configure:3596: $? = 0 +configure:3613: result: yes +configure:3620: checking whether we are cross compiling +configure:3622: result: no +configure:3625: checking for suffix of executables +configure:3632: gcc -o conftest conftest.c >&5 +configure:3635: $? = 0 +configure:3659: result: +configure:3665: checking for suffix of object files +configure:3691: gcc -c conftest.c >&5 +configure:3694: $? = 0 +configure:3717: result: o +configure:3721: checking whether we are using the GNU C compiler +configure:3750: gcc -c conftest.c >&5 +configure:3756: $? = 0 +configure:3773: result: yes +configure:3778: checking whether gcc accepts -g +configure:3808: gcc -c -g conftest.c >&5 +configure:3814: $? = 0 +configure:3913: result: yes +configure:3930: checking for gcc option to accept ISO C89 +configure:4004: gcc -c conftest.c >&5 +configure:4010: $? = 0 +configure:4033: result: none needed +configure:4053: checking dependency style of gcc +configure:4144: result: gcc3 +configure:4161: checking dependency style of gcc +configure:4252: result: gcc3 +configure:4267: checking for a sed that does not truncate output +configure:4323: result: /bin/sed +configure:4326: checking for grep that handles long lines and -e +configure:4400: result: /bin/grep +configure:4405: checking for egrep +configure:4483: result: /bin/grep -E +configure:4499: checking for ld used by gcc +configure:4566: result: /usr/bin/ld +configure:4575: checking if the linker (/usr/bin/ld) is GNU ld +configure:4590: result: yes +configure:4595: checking for /usr/bin/ld option to reload object files +configure:4602: result: -r +configure:4620: checking for BSD-compatible nm +configure:4669: result: /usr/bin/nm -B +configure:4673: checking whether ln -s works +configure:4677: result: yes +configure:4684: checking how to recognize dependent libraries +configure:4870: result: pass_all +configure:5111: checking how to run the C preprocessor +configure:5151: gcc -E conftest.c +configure:5157: $? = 0 +configure:5188: gcc -E conftest.c +conftest.c:14:28: error: ac_nonexistent.h: No such file or directory +configure:5194: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| /* end confdefs.h. */ +| #include +configure:5227: result: gcc -E +configure:5256: gcc -E conftest.c +configure:5262: $? = 0 +configure:5293: gcc -E conftest.c +conftest.c:14:28: error: ac_nonexistent.h: No such file or directory +configure:5299: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| /* end confdefs.h. */ +| #include +configure:5337: checking for ANSI C header files +configure:5367: gcc -c conftest.c >&5 +configure:5373: $? = 0 +configure:5472: gcc -o conftest conftest.c >&5 +configure:5475: $? = 0 +configure:5481: ./conftest +configure:5484: $? = 0 +configure:5501: result: yes +configure:5525: checking for sys/types.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5525: checking for sys/stat.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5525: checking for stdlib.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5525: checking for string.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5525: checking for memory.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5525: checking for strings.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5525: checking for inttypes.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5525: checking for stdint.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5525: checking for unistd.h +configure:5546: gcc -c conftest.c >&5 +configure:5552: $? = 0 +configure:5568: result: yes +configure:5595: checking dlfcn.h usability +configure:5612: gcc -c conftest.c >&5 +configure:5618: $? = 0 +configure:5632: result: yes +configure:5636: checking dlfcn.h presence +configure:5651: gcc -E conftest.c +configure:5657: $? = 0 +configure:5671: result: yes +configure:5704: checking for dlfcn.h +configure:5712: result: yes +configure:5783: checking for g++ +configure:5799: found /usr/bin/g++ +configure:5810: result: g++ +configure:5841: checking for C++ compiler version +configure:5848: g++ --version >&5 +g++ (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +Copyright (C) 2006 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:5851: $? = 0 +configure:5858: g++ -v >&5 +Using built-in specs. +Target: i486-linux-gnu +Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu +Thread model: posix +gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +configure:5861: $? = 0 +configure:5868: g++ -V >&5 +g++: '-V' option must have argument +configure:5871: $? = 1 +configure:5874: checking whether we are using the GNU C++ compiler +configure:5903: g++ -c conftest.cpp >&5 +configure:5909: $? = 0 +configure:5926: result: yes +configure:5931: checking whether g++ accepts -g +configure:5961: g++ -c -g conftest.cpp >&5 +configure:5967: $? = 0 +configure:6066: result: yes +configure:6091: checking dependency style of g++ +configure:6182: result: gcc3 +configure:6199: checking dependency style of g++ +configure:6290: result: gcc3 +configure:6315: checking how to run the C++ preprocessor +configure:6351: g++ -E conftest.cpp +configure:6357: $? = 0 +configure:6388: g++ -E conftest.cpp +conftest.cpp:25:28: error: ac_nonexistent.h: No such file or directory +configure:6394: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| /* end confdefs.h. */ +| #include +configure:6427: result: g++ -E +configure:6456: g++ -E conftest.cpp +configure:6462: $? = 0 +configure:6493: g++ -E conftest.cpp +conftest.cpp:25:28: error: ac_nonexistent.h: No such file or directory +configure:6499: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| /* end confdefs.h. */ +| #include +configure:6592: checking for g77 +configure:6622: result: no +configure:6592: checking for xlf +configure:6622: result: no +configure:6592: checking for f77 +configure:6622: result: no +configure:6592: checking for frt +configure:6622: result: no +configure:6592: checking for pgf77 +configure:6622: result: no +configure:6592: checking for cf77 +configure:6622: result: no +configure:6592: checking for fort77 +configure:6622: result: no +configure:6592: checking for fl32 +configure:6622: result: no +configure:6592: checking for af77 +configure:6622: result: no +configure:6592: checking for xlf90 +configure:6622: result: no +configure:6592: checking for f90 +configure:6622: result: no +configure:6592: checking for pgf90 +configure:6622: result: no +configure:6592: checking for pghpf +configure:6622: result: no +configure:6592: checking for epcf90 +configure:6622: result: no +configure:6592: checking for gfortran +configure:6622: result: no +configure:6592: checking for g95 +configure:6622: result: no +configure:6592: checking for xlf95 +configure:6622: result: no +configure:6592: checking for f95 +configure:6622: result: no +configure:6592: checking for fort +configure:6622: result: no +configure:6592: checking for ifort +configure:6622: result: no +configure:6592: checking for ifc +configure:6622: result: no +configure:6592: checking for efc +configure:6622: result: no +configure:6592: checking for pgf95 +configure:6622: result: no +configure:6592: checking for lf95 +configure:6622: result: no +configure:6592: checking for ftn +configure:6622: result: no +configure:6649: checking for Fortran 77 compiler version +configure:6656: --version >&5 +./configure: line 6657: --version: command not found +configure:6659: $? = 127 +configure:6666: -v >&5 +./configure: line 6667: -v: command not found +configure:6669: $? = 127 +configure:6676: -V >&5 +./configure: line 6677: -V: command not found +configure:6679: $? = 127 +configure:6687: checking whether we are using the GNU Fortran 77 compiler +configure:6706: -c conftest.F >&5 +./configure: line 6707: -c: command not found +configure:6712: $? = 127 +configure: failed program was: +| program main +| #ifndef __GNUC__ +| choke me +| #endif +| +| end +configure:6729: result: no +configure:6735: checking whether accepts -g +configure:6752: -c -g conftest.f >&5 +./configure: line 6753: -c: command not found +configure:6758: $? = 127 +configure: failed program was: +| program main +| +| end +configure:6774: result: no +configure:6804: checking the maximum length of command line arguments +configure:6916: result: 98304 +configure:6928: checking command to parse /usr/bin/nm -B output from gcc object +configure:7033: gcc -c conftest.c >&5 +configure:7036: $? = 0 +configure:7040: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm +configure:7043: $? = 0 +configure:7095: gcc -o conftest conftest.c conftstm.o >&5 +configure:7098: $? = 0 +configure:7136: result: ok +configure:7140: checking for objdir +configure:7155: result: .libs +configure:7247: checking for ar +configure:7263: found /usr/bin/ar +configure:7274: result: ar +configure:7343: checking for ranlib +configure:7359: found /usr/bin/ranlib +configure:7370: result: ranlib +configure:7439: checking for strip +configure:7455: found /usr/bin/strip +configure:7466: result: strip +configure:7752: checking if gcc supports -fno-rtti -fno-exceptions +configure:7770: gcc -c -fno-rtti -fno-exceptions conftest.c >&5 +cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C +configure:7774: $? = 0 +configure:7787: result: no +configure:7802: checking for gcc option to produce PIC +configure:8034: result: -fPIC +configure:8042: checking if gcc PIC flag -fPIC works +configure:8060: gcc -c -fPIC -DPIC conftest.c >&5 +configure:8064: $? = 0 +configure:8077: result: yes +configure:8105: checking if gcc static flag -static works +configure:8133: result: yes +configure:8143: checking if gcc supports -c -o file.o +configure:8164: gcc -c -o out/conftest2.o conftest.c >&5 +configure:8168: $? = 0 +configure:8190: result: yes +configure:8216: checking whether the gcc linker (/usr/bin/ld) supports shared libraries +configure:9197: result: yes +configure:9218: checking whether -lc should be explicitly linked in +configure:9223: gcc -c conftest.c >&5 +configure:9226: $? = 0 +configure:9241: gcc -shared conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| grep -lc \>/dev/null 2\>\&1 +configure:9244: $? = 0 +configure:9256: result: no +configure:9264: checking dynamic linker characteristics +configure:9878: result: GNU/Linux ld.so +configure:9887: checking how to hardcode library paths into programs +configure:9912: result: immediate +configure:9926: checking whether stripping libraries is possible +configure:9931: result: yes +configure:10733: checking if libtool supports shared libraries +configure:10735: result: yes +configure:10738: checking whether to build shared libraries +configure:10759: result: yes +configure:10762: checking whether to build static libraries +configure:10766: result: yes +configure:10859: creating libtool +configure:11447: checking for ld used by g++ +configure:11514: result: /usr/bin/ld +configure:11523: checking if the linker (/usr/bin/ld) is GNU ld +configure:11538: result: yes +configure:11589: checking whether the g++ linker (/usr/bin/ld) supports shared libraries +configure:12563: result: yes +configure:12581: g++ -c -g -O2 conftest.cpp >&5 +configure:12584: $? = 0 +configure:12736: checking for g++ option to produce PIC +configure:13020: result: -fPIC +configure:13028: checking if g++ PIC flag -fPIC works +configure:13046: g++ -c -g -O2 -fPIC -DPIC conftest.cpp >&5 +configure:13050: $? = 0 +configure:13063: result: yes +configure:13091: checking if g++ static flag -static works +configure:13119: result: yes +configure:13129: checking if g++ supports -c -o file.o +configure:13150: g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5 +configure:13154: $? = 0 +configure:13176: result: yes +configure:13202: checking whether the g++ linker (/usr/bin/ld) supports shared libraries +configure:13230: result: yes +configure:13297: checking dynamic linker characteristics +configure:13859: result: GNU/Linux ld.so +configure:13868: checking how to hardcode library paths into programs +configure:13893: result: immediate +configure:20095: checking for gawk +configure:20122: result: gawk +configure:20181: checking for gcc +configure:20208: result: gcc +configure:20446: checking for C compiler version +configure:20453: gcc --version >&5 +gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +Copyright (C) 2006 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:20456: $? = 0 +configure:20463: gcc -v >&5 +Using built-in specs. +Target: i486-linux-gnu +Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu +Thread model: posix +gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +configure:20466: $? = 0 +configure:20473: gcc -V >&5 +gcc: '-V' option must have argument +configure:20476: $? = 1 +configure:20479: checking whether we are using the GNU C compiler +configure:20531: result: yes +configure:20536: checking whether gcc accepts -g +configure:20671: result: yes +configure:20688: checking for gcc option to accept ISO C89 +configure:20791: result: none needed +configure:20811: checking dependency style of gcc +configure:20902: result: gcc3 +configure:20919: checking dependency style of gcc +configure:21010: result: gcc3 +configure:21073: checking for gcc +configure:21100: result: gcc +configure:21338: checking for C compiler version +configure:21345: gcc --version >&5 +gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +Copyright (C) 2006 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:21348: $? = 0 +configure:21355: gcc -v >&5 +Using built-in specs. +Target: i486-linux-gnu +Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu +Thread model: posix +gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +configure:21358: $? = 0 +configure:21365: gcc -V >&5 +gcc: '-V' option must have argument +configure:21368: $? = 1 +configure:21371: checking whether we are using the GNU C compiler +configure:21423: result: yes +configure:21428: checking whether gcc accepts -g +configure:21563: result: yes +configure:21580: checking for gcc option to accept ISO C89 +configure:21683: result: none needed +configure:21703: checking dependency style of gcc +configure:21794: result: gcc3 +configure:21811: checking dependency style of gcc +configure:21902: result: gcc3 +configure:21924: checking for bison +configure:21940: found /usr/bin/bison +configure:21951: result: bison -y +configure:21967: checking for flex +configure:21983: found /usr/bin/flex +configure:21994: result: flex +configure:22031: flex conftest.l +configure:22034: $? = 0 +configure:22036: checking lex output file root +configure:22052: result: lex.yy +configure:22057: checking lex library +configure:22076: gcc -o conftest conftest.c >&5 +/tmp/ccY1fDzv.o: In function `yylex': +conftest.c:(.text+0x605): undefined reference to `yywrap' +/tmp/ccY1fDzv.o: In function `input': +conftest.c:(.text+0xeac): undefined reference to `yywrap' +/tmp/ccY1fDzv.o: In function `main': +conftest.c:(.text+0x1990): undefined reference to `yywrap' +collect2: ld returned 1 exit status +configure:22082: $? = 1 +configure: failed program was: +| +| #line 3 "lex.yy.c" +| +| #define YY_INT_ALIGNED short int +| +| /* A lexical scanner generated by flex */ +| +| #define FLEX_SCANNER +| #define YY_FLEX_MAJOR_VERSION 2 +| #define YY_FLEX_MINOR_VERSION 5 +| #define YY_FLEX_SUBMINOR_VERSION 33 +| #if YY_FLEX_SUBMINOR_VERSION > 0 +| #define FLEX_BETA +| #endif +| +| /* First, we deal with platform-specific or compiler-specific issues. */ +| +| /* begin standard C headers. */ +| #include +| #include +| #include +| #include +| +| /* end standard C headers. */ +| +| /* flex integer type definitions */ +| +| #ifndef FLEXINT_H +| #define FLEXINT_H +| +| /* C99 systems have . Non-C99 systems may or may not. */ +| +| #if __STDC_VERSION__ >= 199901L +| +| /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, +| * if you want the limit (max/min) macros for int types. +| */ +| #ifndef __STDC_LIMIT_MACROS +| #define __STDC_LIMIT_MACROS 1 +| #endif +| +| #include +| typedef int8_t flex_int8_t; +| typedef uint8_t flex_uint8_t; +| typedef int16_t flex_int16_t; +| typedef uint16_t flex_uint16_t; +| typedef int32_t flex_int32_t; +| typedef uint32_t flex_uint32_t; +| #else +| typedef signed char flex_int8_t; +| typedef short int flex_int16_t; +| typedef int flex_int32_t; +| typedef unsigned char flex_uint8_t; +| typedef unsigned short int flex_uint16_t; +| typedef unsigned int flex_uint32_t; +| #endif /* ! C99 */ +| +| /* Limits of integral types. */ +| #ifndef INT8_MIN +| #define INT8_MIN (-128) +| #endif +| #ifndef INT16_MIN +| #define INT16_MIN (-32767-1) +| #endif +| #ifndef INT32_MIN +| #define INT32_MIN (-2147483647-1) +| #endif +| #ifndef INT8_MAX +| #define INT8_MAX (127) +| #endif +| #ifndef INT16_MAX +| #define INT16_MAX (32767) +| #endif +| #ifndef INT32_MAX +| #define INT32_MAX (2147483647) +| #endif +| #ifndef UINT8_MAX +| #define UINT8_MAX (255U) +| #endif +| #ifndef UINT16_MAX +| #define UINT16_MAX (65535U) +| #endif +| #ifndef UINT32_MAX +| #define UINT32_MAX (4294967295U) +| #endif +| +| #endif /* ! FLEXINT_H */ +| +| #ifdef __cplusplus +| +| /* The "const" storage-class-modifier is valid. */ +| #define YY_USE_CONST +| +| #else /* ! __cplusplus */ +| +| #if __STDC__ +| +| #define YY_USE_CONST +| +| #endif /* __STDC__ */ +| #endif /* ! __cplusplus */ +| +| #ifdef YY_USE_CONST +| #define yyconst const +| #else +| #define yyconst +| #endif +| +| /* Returned upon end-of-file. */ +| #define YY_NULL 0 +| +| /* Promotes a possibly negative, possibly signed char to an unsigned +| * integer for use as an array index. If the signed char is negative, +| * we want to instead treat it as an 8-bit unsigned char, hence the +| * double cast. +| */ +| #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +| +| /* Enter a start condition. This macro really ought to take a parameter, +| * but we do it the disgusting crufty way forced on us by the ()-less +| * definition of BEGIN. +| */ +| #define BEGIN (yy_start) = 1 + 2 * +| +| /* Translate the current start state into a value that can be later handed +| * to BEGIN to return to the state. The YYSTATE alias is for lex +| * compatibility. +| */ +| #define YY_START (((yy_start) - 1) / 2) +| #define YYSTATE YY_START +| +| /* Action number for EOF rule of a given start state. */ +| #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +| +| /* Special action meaning "start processing a new file". */ +| #define YY_NEW_FILE yyrestart(yyin ) +| +| #define YY_END_OF_BUFFER_CHAR 0 +| +| /* Size of default input buffer. */ +| #ifndef YY_BUF_SIZE +| #define YY_BUF_SIZE 16384 +| #endif +| +| /* The state buf must be large enough to hold one state per character in the main buffer. +| */ +| #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +| +| #ifndef YY_TYPEDEF_YY_BUFFER_STATE +| #define YY_TYPEDEF_YY_BUFFER_STATE +| typedef struct yy_buffer_state *YY_BUFFER_STATE; +| #endif +| +| extern int yyleng; +| +| extern FILE *yyin, *yyout; +| +| #define EOB_ACT_CONTINUE_SCAN 0 +| #define EOB_ACT_END_OF_FILE 1 +| #define EOB_ACT_LAST_MATCH 2 +| +| #define YY_LESS_LINENO(n) +| +| /* Return all but the first "n" matched characters back to the input stream. */ +| #define yyless(n) \ +| do \ +| { \ +| /* Undo effects of setting up yytext. */ \ +| int yyless_macro_arg = (n); \ +| YY_LESS_LINENO(yyless_macro_arg);\ +| *yy_cp = (yy_hold_char); \ +| YY_RESTORE_YY_MORE_OFFSET \ +| (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ +| YY_DO_BEFORE_ACTION; /* set up yytext again */ \ +| } \ +| while ( 0 ) +| +| #define unput(c) yyunput( c, (yytext_ptr) ) +| +| /* The following is because we cannot portably get our hands on size_t +| * (without autoconf's help, which isn't available because we want +| * flex-generated scanners to compile on their own). +| */ +| +| #ifndef YY_TYPEDEF_YY_SIZE_T +| #define YY_TYPEDEF_YY_SIZE_T +| typedef unsigned int yy_size_t; +| #endif +| +| #ifndef YY_STRUCT_YY_BUFFER_STATE +| #define YY_STRUCT_YY_BUFFER_STATE +| struct yy_buffer_state +| { +| FILE *yy_input_file; +| +| char *yy_ch_buf; /* input buffer */ +| char *yy_buf_pos; /* current position in input buffer */ +| +| /* Size of input buffer in bytes, not including room for EOB +| * characters. +| */ +| yy_size_t yy_buf_size; +| +| /* Number of characters read into yy_ch_buf, not including EOB +| * characters. +| */ +| int yy_n_chars; +| +| /* Whether we "own" the buffer - i.e., we know we created it, +| * and can realloc() it to grow it, and should free() it to +| * delete it. +| */ +| int yy_is_our_buffer; +| +| /* Whether this is an "interactive" input source; if so, and +| * if we're using stdio for input, then we want to use getc() +| * instead of fread(), to make sure we stop fetching input after +| * each newline. +| */ +| int yy_is_interactive; +| +| /* Whether we're considered to be at the beginning of a line. +| * If so, '^' rules will be active on the next match, otherwise +| * not. +| */ +| int yy_at_bol; +| +| int yy_bs_lineno; /**< The line count. */ +| int yy_bs_column; /**< The column count. */ +| +| /* Whether to try to fill the input buffer when we reach the +| * end of it. +| */ +| int yy_fill_buffer; +| +| int yy_buffer_status; +| +| #define YY_BUFFER_NEW 0 +| #define YY_BUFFER_NORMAL 1 +| /* When an EOF's been seen but there's still some text to process +| * then we mark the buffer as YY_EOF_PENDING, to indicate that we +| * shouldn't try reading from the input source any more. We might +| * still have a bunch of tokens to match, though, because of +| * possible backing-up. +| * +| * When we actually see the EOF, we change the status to "new" +| * (via yyrestart()), so that the user can continue scanning by +| * just pointing yyin at a new input file. +| */ +| #define YY_BUFFER_EOF_PENDING 2 +| +| }; +| #endif /* !YY_STRUCT_YY_BUFFER_STATE */ +| +| /* Stack of input buffers. */ +| static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +| static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +| static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ +| +| /* We provide macros for accessing buffer states in case in the +| * future we want to put the buffer states in a more general +| * "scanner state". +| * +| * Returns the top of the stack, or NULL. +| */ +| #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ +| ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ +| : NULL) +| +| /* Same as previous macro, but useful when we know that the buffer stack is not +| * NULL or when we need an lvalue. For internal use only. +| */ +| #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] +| +| /* yy_hold_char holds the character lost when yytext is formed. */ +| static char yy_hold_char; +| static int yy_n_chars; /* number of characters read into yy_ch_buf */ +| int yyleng; +| +| /* Points to current character in buffer. */ +| static char *yy_c_buf_p = (char *) 0; +| static int yy_init = 0; /* whether we need to initialize */ +| static int yy_start = 0; /* start state number */ +| +| /* Flag which is used to allow yywrap()'s to do buffer switches +| * instead of setting up a fresh yyin. A bit of a hack ... +| */ +| static int yy_did_buffer_switch_on_eof; +| +| void yyrestart (FILE *input_file ); +| void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +| YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +| void yy_delete_buffer (YY_BUFFER_STATE b ); +| void yy_flush_buffer (YY_BUFFER_STATE b ); +| void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +| void yypop_buffer_state (void ); +| +| static void yyensure_buffer_stack (void ); +| static void yy_load_buffer_state (void ); +| static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); +| +| #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) +| +| YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +| YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +| YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); +| +| void *yyalloc (yy_size_t ); +| void *yyrealloc (void *,yy_size_t ); +| void yyfree (void * ); +| +| #define yy_new_buffer yy_create_buffer +| +| #define yy_set_interactive(is_interactive) \ +| { \ +| if ( ! YY_CURRENT_BUFFER ){ \ +| yyensure_buffer_stack (); \ +| YY_CURRENT_BUFFER_LVALUE = \ +| yy_create_buffer(yyin,YY_BUF_SIZE ); \ +| } \ +| YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ +| } +| +| #define yy_set_bol(at_bol) \ +| { \ +| if ( ! YY_CURRENT_BUFFER ){\ +| yyensure_buffer_stack (); \ +| YY_CURRENT_BUFFER_LVALUE = \ +| yy_create_buffer(yyin,YY_BUF_SIZE ); \ +| } \ +| YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ +| } +| +| #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) +| +| /* Begin user sect3 */ +| +| typedef unsigned char YY_CHAR; +| +| FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +| +| typedef int yy_state_type; +| +| extern int yylineno; +| +| int yylineno = 1; +| +| extern char *yytext; +| #define yytext_ptr yytext +| +| static yy_state_type yy_get_previous_state (void ); +| static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +| static int yy_get_next_buffer (void ); +| static void yy_fatal_error (yyconst char msg[] ); +| +| /* Done after the current pattern has been matched and before the +| * corresponding action - sets up yytext. +| */ +| #define YY_DO_BEFORE_ACTION \ +| (yytext_ptr) = yy_bp; \ +| (yytext_ptr) -= (yy_more_len); \ +| yyleng = (size_t) (yy_cp - (yytext_ptr)); \ +| (yy_hold_char) = *yy_cp; \ +| *yy_cp = '\0'; \ +| (yy_c_buf_p) = yy_cp; +| +| #define YY_NUM_RULES 8 +| #define YY_END_OF_BUFFER 9 +| /* This struct is not used in this scanner, +| but its presence is necessary. */ +| struct yy_trans_info +| { +| flex_int32_t yy_verify; +| flex_int32_t yy_nxt; +| }; +| static yyconst flex_int16_t yy_acclist[23] = +| { 0, +| 9, 7, 8, 8, 1, 7, 8, 2, 7, 8, +| 3, 7, 8, 4, 7, 8, 5, 7, 8, 6, +| 7, 8 +| } ; +| +| static yyconst flex_int16_t yy_accept[14] = +| { 0, +| 1, 1, 1, 2, 4, 5, 8, 11, 14, 17, +| 20, 23, 23 +| } ; +| +| static yyconst flex_int32_t yy_ec[256] = +| { 0, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 3, 4, 5, 6, +| +| 7, 8, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +| 1, 1, 1, 1, 1 +| } ; +| +| static yyconst flex_int32_t yy_meta[9] = +| { 0, +| 1, 1, 1, 1, 1, 1, 1, 1 +| } ; +| +| static yyconst flex_int16_t yy_base[13] = +| { 0, +| 0, 0, 9, 10, 10, 10, 10, 10, 10, 10, +| 10, 10 +| } ; +| +| static yyconst flex_int16_t yy_def[13] = +| { 0, +| 12, 1, 12, 12, 12, 12, 12, 12, 12, 12, +| 12, 0 +| } ; +| +| static yyconst flex_int16_t yy_nxt[19] = +| { 0, +| 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, +| 12, 12, 12, 12, 12, 12, 12, 12 +| } ; +| +| static yyconst flex_int16_t yy_chk[19] = +| { 0, +| 1, 1, 1, 1, 1, 1, 1, 1, 3, 12, +| 12, 12, 12, 12, 12, 12, 12, 12 +| } ; +| +| extern int yy_flex_debug; +| int yy_flex_debug = 0; +| +| static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; +| static char *yy_full_match; +| static int yy_lp; +| #define REJECT \ +| { \ +| *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \ +| yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ +| ++(yy_lp); \ +| goto find_rule; \ +| } +| +| static int yy_more_flag = 0; +| static int yy_more_len = 0; +| #define yymore() ((yy_more_flag) = 1) +| #define YY_MORE_ADJ (yy_more_len) +| #define YY_RESTORE_YY_MORE_OFFSET +| char *yytext; +| #line 1 "conftest.l" +| #line 472 "lex.yy.c" +| +| #define INITIAL 0 +| +| #ifndef YY_NO_UNISTD_H +| /* Special case for "unistd.h", since it is non-ANSI. We include it way +| * down here because we want the user's section 1 to have been scanned first. +| * The user has a chance to override it with an option. +| */ +| #include +| #endif +| +| #ifndef YY_EXTRA_TYPE +| #define YY_EXTRA_TYPE void * +| #endif +| +| static int yy_init_globals (void ); +| +| /* Macros after this point can all be overridden by user definitions in +| * section 1. +| */ +| +| #ifndef YY_SKIP_YYWRAP +| #ifdef __cplusplus +| extern "C" int yywrap (void ); +| #else +| extern int yywrap (void ); +| #endif +| #endif +| +| static void yyunput (int c,char *buf_ptr ); +| +| #ifndef yytext_ptr +| static void yy_flex_strncpy (char *,yyconst char *,int ); +| #endif +| +| #ifdef YY_NEED_STRLEN +| static int yy_flex_strlen (yyconst char * ); +| #endif +| +| #ifndef YY_NO_INPUT +| +| #ifdef __cplusplus +| static int yyinput (void ); +| #else +| static int input (void ); +| #endif +| +| #endif +| +| /* Amount of stuff to slurp up with each read. */ +| #ifndef YY_READ_BUF_SIZE +| #define YY_READ_BUF_SIZE 8192 +| #endif +| +| /* Copy whatever the last rule matched to the standard output. */ +| #ifndef ECHO +| /* This used to be an fputs(), but since the string might contain NUL's, +| * we now use fwrite(). +| */ +| #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +| #endif +| +| /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, +| * is returned in "result". +| */ +| #ifndef YY_INPUT +| #define YY_INPUT(buf,result,max_size) \ +| if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ +| { \ +| int c = '*'; \ +| size_t n; \ +| for ( n = 0; n < max_size && \ +| (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ +| buf[n] = (char) c; \ +| if ( c == '\n' ) \ +| buf[n++] = (char) c; \ +| if ( c == EOF && ferror( yyin ) ) \ +| YY_FATAL_ERROR( "input in flex scanner failed" ); \ +| result = n; \ +| } \ +| else \ +| { \ +| errno=0; \ +| while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ +| { \ +| if( errno != EINTR) \ +| { \ +| YY_FATAL_ERROR( "input in flex scanner failed" ); \ +| break; \ +| } \ +| errno=0; \ +| clearerr(yyin); \ +| } \ +| }\ +| \ +| +| #endif +| +| /* No semi-colon after return; correct usage is to write "yyterminate();" - +| * we don't want an extra ';' after the "return" because that will cause +| * some compilers to complain about unreachable statements. +| */ +| #ifndef yyterminate +| #define yyterminate() return YY_NULL +| #endif +| +| /* Number of entries by which start-condition stack grows. */ +| #ifndef YY_START_STACK_INCR +| #define YY_START_STACK_INCR 25 +| #endif +| +| /* Report a fatal error. */ +| #ifndef YY_FATAL_ERROR +| #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +| #endif +| +| /* end tables serialization structures and prototypes */ +| +| /* Default declaration of generated scanner - a define so the user can +| * easily add parameters. +| */ +| #ifndef YY_DECL +| #define YY_DECL_IS_OURS 1 +| +| extern int yylex (void); +| +| #define YY_DECL int yylex (void) +| #endif /* !YY_DECL */ +| +| /* Code executed at the beginning of each rule, after yytext and yyleng +| * have been set up. +| */ +| #ifndef YY_USER_ACTION +| #define YY_USER_ACTION +| #endif +| +| /* Code executed at the end of each rule. */ +| #ifndef YY_BREAK +| #define YY_BREAK break; +| #endif +| +| #define YY_RULE_SETUP \ +| YY_USER_ACTION +| +| /** The main scanner function which does all the work. +| */ +| YY_DECL +| { +| register yy_state_type yy_current_state; +| register char *yy_cp, *yy_bp; +| register int yy_act; +| +| #line 1 "conftest.l" +| +| #line 627 "lex.yy.c" +| +| if ( !(yy_init) ) +| { +| (yy_init) = 1; +| +| #ifdef YY_USER_INIT +| YY_USER_INIT; +| #endif +| +| /* Create the reject buffer large enough to save one state per allowed character. */ +| if ( ! (yy_state_buf) ) +| (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE ); +| +| if ( ! (yy_start) ) +| (yy_start) = 1; /* first start state */ +| +| if ( ! yyin ) +| yyin = stdin; +| +| if ( ! yyout ) +| yyout = stdout; +| +| if ( ! YY_CURRENT_BUFFER ) { +| yyensure_buffer_stack (); +| YY_CURRENT_BUFFER_LVALUE = +| yy_create_buffer(yyin,YY_BUF_SIZE ); +| } +| +| yy_load_buffer_state( ); +| } +| +| while ( 1 ) /* loops until end-of-file is reached */ +| { +| (yy_more_len) = 0; +| if ( (yy_more_flag) ) +| { +| (yy_more_len) = (yy_c_buf_p) - (yytext_ptr); +| (yy_more_flag) = 0; +| } +| yy_cp = (yy_c_buf_p); +| +| /* Support of yytext. */ +| *yy_cp = (yy_hold_char); +| +| /* yy_bp points to the position in yy_ch_buf of the start of +| * the current run. +| */ +| yy_bp = yy_cp; +| +| yy_current_state = (yy_start); +| +| (yy_state_ptr) = (yy_state_buf); +| *(yy_state_ptr)++ = yy_current_state; +| +| yy_match: +| do +| { +| register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; +| while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +| { +| yy_current_state = (int) yy_def[yy_current_state]; +| if ( yy_current_state >= 13 ) +| yy_c = yy_meta[(unsigned int) yy_c]; +| } +| yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +| *(yy_state_ptr)++ = yy_current_state; +| ++yy_cp; +| } +| while ( yy_base[yy_current_state] != 10 ); +| +| yy_find_action: +| yy_current_state = *--(yy_state_ptr); +| (yy_lp) = yy_accept[yy_current_state]; +| find_rule: /* we branch to this label when backing up */ +| for ( ; ; ) /* until we find what rule we matched */ +| { +| if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) +| { +| yy_act = yy_acclist[(yy_lp)]; +| { +| (yy_full_match) = yy_cp; +| break; +| } +| } +| --yy_cp; +| yy_current_state = *--(yy_state_ptr); +| (yy_lp) = yy_accept[yy_current_state]; +| } +| +| YY_DO_BEFORE_ACTION; +| +| do_action: /* This label is used only to access EOF actions. */ +| +| switch ( yy_act ) +| { /* beginning of action switch */ +| case 1: +| YY_RULE_SETUP +| #line 2 "conftest.l" +| { ECHO; } +| YY_BREAK +| case 2: +| YY_RULE_SETUP +| #line 3 "conftest.l" +| { REJECT; } +| YY_BREAK +| case 3: +| YY_RULE_SETUP +| #line 4 "conftest.l" +| { yymore (); } +| YY_BREAK +| case 4: +| YY_RULE_SETUP +| #line 5 "conftest.l" +| { yyless (1); } +| YY_BREAK +| case 5: +| YY_RULE_SETUP +| #line 6 "conftest.l" +| { yyless (input () != 0); } +| YY_BREAK +| case 6: +| YY_RULE_SETUP +| #line 7 "conftest.l" +| { unput (yytext[0]); } +| YY_BREAK +| case 7: +| YY_RULE_SETUP +| #line 8 "conftest.l" +| { BEGIN INITIAL; } +| YY_BREAK +| case 8: +| YY_RULE_SETUP +| #line 9 "conftest.l" +| ECHO; +| YY_BREAK +| #line 763 "lex.yy.c" +| case YY_STATE_EOF(INITIAL): +| yyterminate(); +| +| case YY_END_OF_BUFFER: +| { +| /* Amount of text matched not including the EOB char. */ +| int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; +| +| /* Undo the effects of YY_DO_BEFORE_ACTION. */ +| *yy_cp = (yy_hold_char); +| YY_RESTORE_YY_MORE_OFFSET +| +| if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) +| { +| /* We're scanning a new file or input source. It's +| * possible that this happened because the user +| * just pointed yyin at a new source and called +| * yylex(). If so, then we have to assure +| * consistency between YY_CURRENT_BUFFER and our +| * globals. Here is the right place to do so, because +| * this is the first action (other than possibly a +| * back-up) that will match for the new input source. +| */ +| (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; +| YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; +| YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; +| } +| +| /* Note that here we test for yy_c_buf_p "<=" to the position +| * of the first EOB in the buffer, since yy_c_buf_p will +| * already have been incremented past the NUL character +| * (since all states make transitions on EOB to the +| * end-of-buffer state). Contrast this with the test +| * in input(). +| */ +| if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) +| { /* This was really a NUL. */ +| yy_state_type yy_next_state; +| +| (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; +| +| yy_current_state = yy_get_previous_state( ); +| +| /* Okay, we're now positioned to make the NUL +| * transition. We couldn't have +| * yy_get_previous_state() go ahead and do it +| * for us because it doesn't know how to deal +| * with the possibility of jamming (and we don't +| * want to build jamming into it because then it +| * will run more slowly). +| */ +| +| yy_next_state = yy_try_NUL_trans( yy_current_state ); +| +| yy_bp = (yytext_ptr) + YY_MORE_ADJ; +| +| if ( yy_next_state ) +| { +| /* Consume the NUL. */ +| yy_cp = ++(yy_c_buf_p); +| yy_current_state = yy_next_state; +| goto yy_match; +| } +| +| else +| { +| yy_cp = (yy_c_buf_p); +| goto yy_find_action; +| } +| } +| +| else switch ( yy_get_next_buffer( ) ) +| { +| case EOB_ACT_END_OF_FILE: +| { +| (yy_did_buffer_switch_on_eof) = 0; +| +| if ( yywrap( ) ) +| { +| /* Note: because we've taken care in +| * yy_get_next_buffer() to have set up +| * yytext, we can now set up +| * yy_c_buf_p so that if some total +| * hoser (like flex itself) wants to +| * call the scanner after we return the +| * YY_NULL, it'll still work - another +| * YY_NULL will get returned. +| */ +| (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; +| +| yy_act = YY_STATE_EOF(YY_START); +| goto do_action; +| } +| +| else +| { +| if ( ! (yy_did_buffer_switch_on_eof) ) +| YY_NEW_FILE; +| } +| break; +| } +| +| case EOB_ACT_CONTINUE_SCAN: +| (yy_c_buf_p) = +| (yytext_ptr) + yy_amount_of_matched_text; +| +| yy_current_state = yy_get_previous_state( ); +| +| yy_cp = (yy_c_buf_p); +| yy_bp = (yytext_ptr) + YY_MORE_ADJ; +| goto yy_match; +| +| case EOB_ACT_LAST_MATCH: +| (yy_c_buf_p) = +| &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; +| +| yy_current_state = yy_get_previous_state( ); +| +| yy_cp = (yy_c_buf_p); +| yy_bp = (yytext_ptr) + YY_MORE_ADJ; +| goto yy_find_action; +| } +| break; +| } +| +| default: +| YY_FATAL_ERROR( +| "fatal flex scanner internal error--no action found" ); +| } /* end of action switch */ +| } /* end of scanning one token */ +| } /* end of yylex */ +| +| /* yy_get_next_buffer - try to read in a new buffer +| * +| * Returns a code representing an action: +| * EOB_ACT_LAST_MATCH - +| * EOB_ACT_CONTINUE_SCAN - continue scanning from current position +| * EOB_ACT_END_OF_FILE - end of file +| */ +| static int yy_get_next_buffer (void) +| { +| register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; +| register char *source = (yytext_ptr); +| register int number_to_move, i; +| int ret_val; +| +| if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) +| YY_FATAL_ERROR( +| "fatal flex scanner internal error--end of buffer missed" ); +| +| if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) +| { /* Don't try to fill the buffer, so this is an EOF. */ +| if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) +| { +| /* We matched a single character, the EOB, so +| * treat this as a final EOF. +| */ +| return EOB_ACT_END_OF_FILE; +| } +| +| else +| { +| /* We matched some text prior to the EOB, first +| * process it. +| */ +| return EOB_ACT_LAST_MATCH; +| } +| } +| +| /* Try to read more data. */ +| +| /* First move last chars to start of buffer. */ +| number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; +| +| for ( i = 0; i < number_to_move; ++i ) +| *(dest++) = *(source++); +| +| if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) +| /* don't do the read, it's not guaranteed to return an EOF, +| * just force an EOF +| */ +| YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; +| +| else +| { +| int num_to_read = +| YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; +| +| while ( num_to_read <= 0 ) +| { /* Not enough room in the buffer - grow it. */ +| +| YY_FATAL_ERROR( +| "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +| +| } +| +| if ( num_to_read > YY_READ_BUF_SIZE ) +| num_to_read = YY_READ_BUF_SIZE; +| +| /* Read in more data. */ +| YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), +| (yy_n_chars), (size_t) num_to_read ); +| +| YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); +| } +| +| if ( (yy_n_chars) == 0 ) +| { +| if ( number_to_move == YY_MORE_ADJ ) +| { +| ret_val = EOB_ACT_END_OF_FILE; +| yyrestart(yyin ); +| } +| +| else +| { +| ret_val = EOB_ACT_LAST_MATCH; +| YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = +| YY_BUFFER_EOF_PENDING; +| } +| } +| +| else +| ret_val = EOB_ACT_CONTINUE_SCAN; +| +| (yy_n_chars) += number_to_move; +| YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; +| YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; +| +| (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; +| +| return ret_val; +| } +| +| /* yy_get_previous_state - get the state just before the EOB char was reached */ +| +| static yy_state_type yy_get_previous_state (void) +| { +| register yy_state_type yy_current_state; +| register char *yy_cp; +| +| yy_current_state = (yy_start); +| +| (yy_state_ptr) = (yy_state_buf); +| *(yy_state_ptr)++ = yy_current_state; +| +| for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) +| { +| register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); +| while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +| { +| yy_current_state = (int) yy_def[yy_current_state]; +| if ( yy_current_state >= 13 ) +| yy_c = yy_meta[(unsigned int) yy_c]; +| } +| yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +| *(yy_state_ptr)++ = yy_current_state; +| } +| +| return yy_current_state; +| } +| +| /* yy_try_NUL_trans - try to make a transition on the NUL character +| * +| * synopsis +| * next_state = yy_try_NUL_trans( current_state ); +| */ +| static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +| { +| register int yy_is_jam; +| +| register YY_CHAR yy_c = 1; +| while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +| { +| yy_current_state = (int) yy_def[yy_current_state]; +| if ( yy_current_state >= 13 ) +| yy_c = yy_meta[(unsigned int) yy_c]; +| } +| yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +| yy_is_jam = (yy_current_state == 12); +| if ( ! yy_is_jam ) +| *(yy_state_ptr)++ = yy_current_state; +| +| return yy_is_jam ? 0 : yy_current_state; +| } +| +| static void yyunput (int c, register char * yy_bp ) +| { +| register char *yy_cp; +| +| yy_cp = (yy_c_buf_p); +| +| /* undo effects of setting up yytext */ +| *yy_cp = (yy_hold_char); +| +| if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) +| { /* need to shift things up to make room */ +| /* +2 for EOB chars. */ +| register int number_to_move = (yy_n_chars) + 2; +| register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ +| YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; +| register char *source = +| &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; +| +| while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) +| *--dest = *--source; +| +| yy_cp += (int) (dest - source); +| yy_bp += (int) (dest - source); +| YY_CURRENT_BUFFER_LVALUE->yy_n_chars = +| (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; +| +| if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) +| YY_FATAL_ERROR( "flex scanner push-back overflow" ); +| } +| +| *--yy_cp = (char) c; +| +| (yytext_ptr) = yy_bp; +| (yy_hold_char) = *yy_cp; +| (yy_c_buf_p) = yy_cp; +| } +| +| #ifndef YY_NO_INPUT +| #ifdef __cplusplus +| static int yyinput (void) +| #else +| static int input (void) +| #endif +| +| { +| int c; +| +| *(yy_c_buf_p) = (yy_hold_char); +| +| if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) +| { +| /* yy_c_buf_p now points to the character we want to return. +| * If this occurs *before* the EOB characters, then it's a +| * valid NUL; if not, then we've hit the end of the buffer. +| */ +| if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) +| /* This was really a NUL. */ +| *(yy_c_buf_p) = '\0'; +| +| else +| { /* need more input */ +| int offset = (yy_c_buf_p) - (yytext_ptr); +| ++(yy_c_buf_p); +| +| switch ( yy_get_next_buffer( ) ) +| { +| case EOB_ACT_LAST_MATCH: +| /* This happens because yy_g_n_b() +| * sees that we've accumulated a +| * token and flags that we need to +| * try matching the token before +| * proceeding. But for input(), +| * there's no matching to consider. +| * So convert the EOB_ACT_LAST_MATCH +| * to EOB_ACT_END_OF_FILE. +| */ +| +| /* Reset buffer status. */ +| yyrestart(yyin ); +| +| /*FALLTHROUGH*/ +| +| case EOB_ACT_END_OF_FILE: +| { +| if ( yywrap( ) ) +| return EOF; +| +| if ( ! (yy_did_buffer_switch_on_eof) ) +| YY_NEW_FILE; +| #ifdef __cplusplus +| return yyinput(); +| #else +| return input(); +| #endif +| } +| +| case EOB_ACT_CONTINUE_SCAN: +| (yy_c_buf_p) = (yytext_ptr) + offset; +| break; +| } +| } +| } +| +| c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ +| *(yy_c_buf_p) = '\0'; /* preserve yytext */ +| (yy_hold_char) = *++(yy_c_buf_p); +| +| return c; +| } +| #endif /* ifndef YY_NO_INPUT */ +| +| /** Immediately switch to a different input stream. +| * @param input_file A readable stream. +| * +| * @note This function does not reset the start condition to @c INITIAL . +| */ +| void yyrestart (FILE * input_file ) +| { +| +| if ( ! YY_CURRENT_BUFFER ){ +| yyensure_buffer_stack (); +| YY_CURRENT_BUFFER_LVALUE = +| yy_create_buffer(yyin,YY_BUF_SIZE ); +| } +| +| yy_init_buffer(YY_CURRENT_BUFFER,input_file ); +| yy_load_buffer_state( ); +| } +| +| /** Switch to a different input buffer. +| * @param new_buffer The new input buffer. +| * +| */ +| void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +| { +| +| /* TODO. We should be able to replace this entire function body +| * with +| * yypop_buffer_state(); +| * yypush_buffer_state(new_buffer); +| */ +| yyensure_buffer_stack (); +| if ( YY_CURRENT_BUFFER == new_buffer ) +| return; +| +| if ( YY_CURRENT_BUFFER ) +| { +| /* Flush out information for old buffer. */ +| *(yy_c_buf_p) = (yy_hold_char); +| YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); +| YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); +| } +| +| YY_CURRENT_BUFFER_LVALUE = new_buffer; +| yy_load_buffer_state( ); +| +| /* We don't actually know whether we did this switch during +| * EOF (yywrap()) processing, but the only time this flag +| * is looked at is after yywrap() is called, so it's safe +| * to go ahead and always set it. +| */ +| (yy_did_buffer_switch_on_eof) = 1; +| } +| +| static void yy_load_buffer_state (void) +| { +| (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; +| (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; +| yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; +| (yy_hold_char) = *(yy_c_buf_p); +| } +| +| /** Allocate and initialize an input buffer state. +| * @param file A readable stream. +| * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. +| * +| * @return the allocated buffer state. +| */ +| YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +| { +| YY_BUFFER_STATE b; +| +| b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); +| if ( ! b ) +| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +| +| b->yy_buf_size = size; +| +| /* yy_ch_buf has to be 2 characters longer than the size given because +| * we need to put in 2 end-of-buffer characters. +| */ +| b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); +| if ( ! b->yy_ch_buf ) +| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +| +| b->yy_is_our_buffer = 1; +| +| yy_init_buffer(b,file ); +| +| return b; +| } +| +| /** Destroy the buffer. +| * @param b a buffer created with yy_create_buffer() +| * +| */ +| void yy_delete_buffer (YY_BUFFER_STATE b ) +| { +| +| if ( ! b ) +| return; +| +| if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ +| YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; +| +| if ( b->yy_is_our_buffer ) +| yyfree((void *) b->yy_ch_buf ); +| +| yyfree((void *) b ); +| } +| +| #ifndef __cplusplus +| extern int isatty (int ); +| #endif /* __cplusplus */ +| +| /* Initializes or reinitializes a buffer. +| * This function is sometimes called more than once on the same buffer, +| * such as during a yyrestart() or at EOF. +| */ +| static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) +| +| { +| int oerrno = errno; +| +| yy_flush_buffer(b ); +| +| b->yy_input_file = file; +| b->yy_fill_buffer = 1; +| +| /* If b is the current buffer, then yy_init_buffer was _probably_ +| * called from yyrestart() or through yy_get_next_buffer. +| * In that case, we don't want to reset the lineno or column. +| */ +| if (b != YY_CURRENT_BUFFER){ +| b->yy_bs_lineno = 1; +| b->yy_bs_column = 0; +| } +| +| b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +| +| errno = oerrno; +| } +| +| /** Discard all buffered characters. On the next scan, YY_INPUT will be called. +| * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. +| * +| */ +| void yy_flush_buffer (YY_BUFFER_STATE b ) +| { +| if ( ! b ) +| return; +| +| b->yy_n_chars = 0; +| +| /* We always need two end-of-buffer characters. The first causes +| * a transition to the end-of-buffer state. The second causes +| * a jam in that state. +| */ +| b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; +| b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; +| +| b->yy_buf_pos = &b->yy_ch_buf[0]; +| +| b->yy_at_bol = 1; +| b->yy_buffer_status = YY_BUFFER_NEW; +| +| if ( b == YY_CURRENT_BUFFER ) +| yy_load_buffer_state( ); +| } +| +| /** Pushes the new state onto the stack. The new state becomes +| * the current state. This function will allocate the stack +| * if necessary. +| * @param new_buffer The new state. +| * +| */ +| void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +| { +| if (new_buffer == NULL) +| return; +| +| yyensure_buffer_stack(); +| +| /* This block is copied from yy_switch_to_buffer. */ +| if ( YY_CURRENT_BUFFER ) +| { +| /* Flush out information for old buffer. */ +| *(yy_c_buf_p) = (yy_hold_char); +| YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); +| YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); +| } +| +| /* Only push if top exists. Otherwise, replace top. */ +| if (YY_CURRENT_BUFFER) +| (yy_buffer_stack_top)++; +| YY_CURRENT_BUFFER_LVALUE = new_buffer; +| +| /* copied from yy_switch_to_buffer. */ +| yy_load_buffer_state( ); +| (yy_did_buffer_switch_on_eof) = 1; +| } +| +| /** Removes and deletes the top of the stack, if present. +| * The next element becomes the new top. +| * +| */ +| void yypop_buffer_state (void) +| { +| if (!YY_CURRENT_BUFFER) +| return; +| +| yy_delete_buffer(YY_CURRENT_BUFFER ); +| YY_CURRENT_BUFFER_LVALUE = NULL; +| if ((yy_buffer_stack_top) > 0) +| --(yy_buffer_stack_top); +| +| if (YY_CURRENT_BUFFER) { +| yy_load_buffer_state( ); +| (yy_did_buffer_switch_on_eof) = 1; +| } +| } +| +| /* Allocates the stack if it does not exist. +| * Guarantees space for at least one push. +| */ +| static void yyensure_buffer_stack (void) +| { +| int num_to_alloc; +| +| if (!(yy_buffer_stack)) { +| +| /* First allocation is just for 2 elements, since we don't know if this +| * scanner will even need a stack. We use 2 instead of 1 to avoid an +| * immediate realloc on the next call. +| */ +| num_to_alloc = 1; +| (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc +| (num_to_alloc * sizeof(struct yy_buffer_state*) +| ); +| +| memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); +| +| (yy_buffer_stack_max) = num_to_alloc; +| (yy_buffer_stack_top) = 0; +| return; +| } +| +| if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ +| +| /* Increase the buffer to prepare for a possible push. */ +| int grow_size = 8 /* arbitrary grow size */; +| +| num_to_alloc = (yy_buffer_stack_max) + grow_size; +| (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc +| ((yy_buffer_stack), +| num_to_alloc * sizeof(struct yy_buffer_state*) +| ); +| +| /* zero only the new slots.*/ +| memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); +| (yy_buffer_stack_max) = num_to_alloc; +| } +| } +| +| /** Setup the input buffer state to scan directly from a user-specified character buffer. +| * @param base the character buffer +| * @param size the size in bytes of the character buffer +| * +| * @return the newly allocated buffer state object. +| */ +| YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +| { +| YY_BUFFER_STATE b; +| +| if ( size < 2 || +| base[size-2] != YY_END_OF_BUFFER_CHAR || +| base[size-1] != YY_END_OF_BUFFER_CHAR ) +| /* They forgot to leave room for the EOB's. */ +| return 0; +| +| b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); +| if ( ! b ) +| YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); +| +| b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ +| b->yy_buf_pos = b->yy_ch_buf = base; +| b->yy_is_our_buffer = 0; +| b->yy_input_file = 0; +| b->yy_n_chars = b->yy_buf_size; +| b->yy_is_interactive = 0; +| b->yy_at_bol = 1; +| b->yy_fill_buffer = 0; +| b->yy_buffer_status = YY_BUFFER_NEW; +| +| yy_switch_to_buffer(b ); +| +| return b; +| } +| +| /** Setup the input buffer state to scan a string. The next call to yylex() will +| * scan from a @e copy of @a str. +| * @param yystr a NUL-terminated string to scan +| * +| * @return the newly allocated buffer state object. +| * @note If you want to scan bytes that may contain NUL values, then use +| * yy_scan_bytes() instead. +| */ +| YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +| { +| +| return yy_scan_bytes(yystr,strlen(yystr) ); +| } +| +| /** Setup the input buffer state to scan the given bytes. The next call to yylex() will +| * scan from a @e copy of @a bytes. +| * @param bytes the byte buffer to scan +| * @param len the number of bytes in the buffer pointed to by @a bytes. +| * +| * @return the newly allocated buffer state object. +| */ +| YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +| { +| YY_BUFFER_STATE b; +| char *buf; +| yy_size_t n; +| int i; +| +| /* Get memory for full buffer, including space for trailing EOB's. */ +| n = _yybytes_len + 2; +| buf = (char *) yyalloc(n ); +| if ( ! buf ) +| YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); +| +| for ( i = 0; i < _yybytes_len; ++i ) +| buf[i] = yybytes[i]; +| +| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; +| +| b = yy_scan_buffer(buf,n ); +| if ( ! b ) +| YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); +| +| /* It's okay to grow etc. this buffer, and we should throw it +| * away when we're done. +| */ +| b->yy_is_our_buffer = 1; +| +| return b; +| } +| +| #ifndef YY_EXIT_FAILURE +| #define YY_EXIT_FAILURE 2 +| #endif +| +| static void yy_fatal_error (yyconst char* msg ) +| { +| (void) fprintf( stderr, "%s\n", msg ); +| exit( YY_EXIT_FAILURE ); +| } +| +| /* Redefine yyless() so it works in section 3 code. */ +| +| #undef yyless +| #define yyless(n) \ +| do \ +| { \ +| /* Undo effects of setting up yytext. */ \ +| int yyless_macro_arg = (n); \ +| YY_LESS_LINENO(yyless_macro_arg);\ +| yytext[yyleng] = (yy_hold_char); \ +| (yy_c_buf_p) = yytext + yyless_macro_arg; \ +| (yy_hold_char) = *(yy_c_buf_p); \ +| *(yy_c_buf_p) = '\0'; \ +| yyleng = yyless_macro_arg; \ +| } \ +| while ( 0 ) +| +| /* Accessor methods (get/set functions) to struct members. */ +| +| /** Get the current line number. +| * +| */ +| int yyget_lineno (void) +| { +| +| return yylineno; +| } +| +| /** Get the input stream. +| * +| */ +| FILE *yyget_in (void) +| { +| return yyin; +| } +| +| /** Get the output stream. +| * +| */ +| FILE *yyget_out (void) +| { +| return yyout; +| } +| +| /** Get the length of the current token. +| * +| */ +| int yyget_leng (void) +| { +| return yyleng; +| } +| +| /** Get the current token. +| * +| */ +| +| char *yyget_text (void) +| { +| return yytext; +| } +| +| /** Set the current line number. +| * @param line_number +| * +| */ +| void yyset_lineno (int line_number ) +| { +| +| yylineno = line_number; +| } +| +| /** Set the input stream. This does not discard the current +| * input buffer. +| * @param in_str A readable stream. +| * +| * @see yy_switch_to_buffer +| */ +| void yyset_in (FILE * in_str ) +| { +| yyin = in_str ; +| } +| +| void yyset_out (FILE * out_str ) +| { +| yyout = out_str ; +| } +| +| int yyget_debug (void) +| { +| return yy_flex_debug; +| } +| +| void yyset_debug (int bdebug ) +| { +| yy_flex_debug = bdebug ; +| } +| +| static int yy_init_globals (void) +| { +| /* Initialization is the same as for the non-reentrant scanner. +| * This function is called from yylex_destroy(), so don't allocate here. +| */ +| +| (yy_buffer_stack) = 0; +| (yy_buffer_stack_top) = 0; +| (yy_buffer_stack_max) = 0; +| (yy_c_buf_p) = (char *) 0; +| (yy_init) = 0; +| (yy_start) = 0; +| +| (yy_state_buf) = 0; +| (yy_state_ptr) = 0; +| (yy_full_match) = 0; +| (yy_lp) = 0; +| +| /* Defined in main.c */ +| #ifdef YY_STDINIT +| yyin = stdin; +| yyout = stdout; +| #else +| yyin = (FILE *) 0; +| yyout = (FILE *) 0; +| #endif +| +| /* For future reference: Set errno on error, since we are called by +| * yylex_init() +| */ +| return 0; +| } +| +| /* yylex_destroy is for both reentrant and non-reentrant scanners. */ +| int yylex_destroy (void) +| { +| +| /* Pop the buffer stack, destroying each element. */ +| while(YY_CURRENT_BUFFER){ +| yy_delete_buffer(YY_CURRENT_BUFFER ); +| YY_CURRENT_BUFFER_LVALUE = NULL; +| yypop_buffer_state(); +| } +| +| /* Destroy the stack itself. */ +| yyfree((yy_buffer_stack) ); +| (yy_buffer_stack) = NULL; +| +| yyfree ( (yy_state_buf) ); +| (yy_state_buf) = NULL; +| +| /* Reset the globals. This is important in a non-reentrant scanner so the next time +| * yylex() is called, initialization will occur. */ +| yy_init_globals( ); +| +| return 0; +| } +| +| /* +| * Internal utility routines. +| */ +| +| #ifndef yytext_ptr +| static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +| { +| register int i; +| for ( i = 0; i < n; ++i ) +| s1[i] = s2[i]; +| } +| #endif +| +| #ifdef YY_NEED_STRLEN +| static int yy_flex_strlen (yyconst char * s ) +| { +| register int n; +| for ( n = 0; s[n]; ++n ) +| ; +| +| return n; +| } +| #endif +| +| void *yyalloc (yy_size_t size ) +| { +| return (void *) malloc( size ); +| } +| +| void *yyrealloc (void * ptr, yy_size_t size ) +| { +| /* The cast to (char *) in the following accommodates both +| * implementations that use char* generic pointers, and those +| * that use void* generic pointers. It works with the latter +| * because both ANSI C and C++ allow castless assignment from +| * any pointer type to void*, and deal with argument conversions +| * as though doing an assignment. +| */ +| return (void *) realloc( (char *) ptr, size ); +| } +| +| void yyfree (void * ptr ) +| { +| free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +| } +| +| #define YYTABLES_NAME "yytables" +| +| #line 9 "conftest.l" +| +| +| #ifdef YYTEXT_POINTER +| extern char *yytext; +| #endif +| int +| main (void) +| { +| return ! yylex () + ! yywrap (); +| } +configure:22076: gcc -o conftest conftest.c -lfl >&5 +configure:22082: $? = 0 +configure:22103: result: -lfl +configure:22109: checking whether yytext is a pointer +configure:22130: gcc -o conftest conftest.c -lfl >&5 +configure:22136: $? = 0 +configure:22155: result: yes +configure:22286: checking for C++ compiler version +configure:22293: g++ --version >&5 +g++ (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +Copyright (C) 2006 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:22296: $? = 0 +configure:22303: g++ -v >&5 +Using built-in specs. +Target: i486-linux-gnu +Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu +Thread model: posix +gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) +configure:22306: $? = 0 +configure:22313: g++ -V >&5 +g++: '-V' option must have argument +configure:22316: $? = 1 +configure:22319: checking whether we are using the GNU C++ compiler +configure:22371: result: yes +configure:22376: checking whether g++ accepts -g +configure:22511: result: yes +configure:22536: checking dependency style of g++ +configure:22627: result: gcc3 +configure:22644: checking dependency style of g++ +configure:22735: result: gcc3 +configure:22763: checking for a BSD-compatible install +configure:22819: result: /usr/bin/install -c +configure:22830: checking whether ln -s works +configure:22834: result: yes +configure:22841: checking whether byte ordering is bigendian +configure:22874: gcc -c conftest.c >&5 +configure:22880: $? = 0 +configure:22912: gcc -c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:33: error: 'not' undeclared (first use in this function) +conftest.c:33: error: (Each undeclared identifier is reported only once +conftest.c:33: error: for each function it appears in.) +conftest.c:33: error: expected ';' before 'big' +configure:22918: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| /* end confdefs.h. */ +| #include +| #include +| +| int +| main () +| { +| #if BYTE_ORDER != BIG_ENDIAN +| not big endian +| #endif +| +| ; +| return 0; +| } +configure:23058: result: no +configure:23077: checking for an ANSI C-conforming const +configure:23152: gcc -c conftest.c >&5 +configure:23158: $? = 0 +configure:23173: result: yes +configure:23183: checking for inline +configure:23209: gcc -c conftest.c >&5 +configure:23215: $? = 0 +configure:23233: result: inline +configure:23259: checking for special C compiler options needed for large files +configure:23352: result: no +configure:23358: checking for _FILE_OFFSET_BITS value needed for large files +configure:23393: gcc -c conftest.c >&5 +conftest.c:32: warning: left shift count >= width of type +conftest.c:32: warning: left shift count >= width of type +conftest.c:34: error: size of array 'off_t_is_large' is negative +configure:23399: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| /* 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; +| } +configure:23443: gcc -c conftest.c >&5 +configure:23449: $? = 0 +configure:23467: result: 64 +configure:23612: checking dependency style of gcc +configure:23703: result: gcc3 +configure:23738: checking fenv.h usability +configure:23755: gcc -c conftest.c >&5 +configure:23761: $? = 0 +configure:23775: result: yes +configure:23779: checking fenv.h presence +configure:23794: gcc -E conftest.c +configure:23800: $? = 0 +configure:23814: result: yes +configure:23847: checking for fenv.h +configure:23855: result: yes +configure:23728: checking for stdint.h +configure:23734: result: yes +configure:23728: checking for inttypes.h +configure:23734: result: yes +configure:23728: checking for sys/types.h +configure:23734: result: yes +configure:23738: checking alloca.h usability +configure:23755: gcc -c conftest.c >&5 +configure:23761: $? = 0 +configure:23775: result: yes +configure:23779: checking alloca.h presence +configure:23794: gcc -E conftest.c +configure:23800: $? = 0 +configure:23814: result: yes +configure:23847: checking for alloca.h +configure:23855: result: yes +configure:23885: checking for posix_memalign +configure:23941: gcc -o conftest conftest.c >&5 +configure:23947: $? = 0 +configure:23965: result: yes +configure:23885: checking for memalign +configure:23941: gcc -o conftest conftest.c >&5 +configure:23947: $? = 0 +configure:23965: result: yes +configure:23885: checking for fmax +configure:23941: gcc -o conftest conftest.c >&5 +conftest.c:57: warning: conflicting types for built-in function 'fmax' +/tmp/ccWl4y6f.o: In function `main': +conftest.c:(.text+0x12): undefined reference to `fmax' +collect2: ld returned 1 exit status +configure:23947: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| /* end confdefs.h. */ +| /* Define fmax to an innocuous variant, in case declares fmax. +| For example, HP-UX 11i declares gettimeofday. */ +| #define fmax innocuous_fmax +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char fmax (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef fmax +| +| /* 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 fmax (); +| /* 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_fmax || defined __stub___fmax +| choke me +| #endif +| +| int +| main () +| { +| return fmax (); +| ; +| return 0; +| } +configure:23965: result: no +configure:23885: checking for lround +configure:23941: gcc -o conftest conftest.c >&5 +conftest.c:57: warning: conflicting types for built-in function 'lround' +/tmp/cc61l3Np.o: In function `main': +conftest.c:(.text+0x12): undefined reference to `lround' +collect2: ld returned 1 exit status +configure:23947: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| /* end confdefs.h. */ +| /* Define lround to an innocuous variant, in case declares lround. +| For example, HP-UX 11i declares gettimeofday. */ +| #define lround innocuous_lround +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char lround (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef lround +| +| /* 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 lround (); +| /* 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_lround || defined __stub___lround +| choke me +| #endif +| +| int +| main () +| { +| return lround (); +| ; +| return 0; +| } +configure:23965: result: no +configure:23885: checking for pow +configure:23941: gcc -o conftest conftest.c >&5 +conftest.c:57: warning: conflicting types for built-in function 'pow' +/tmp/ccogRJJz.o: In function `main': +conftest.c:(.text+0x12): undefined reference to `pow' +collect2: ld returned 1 exit status +configure:23947: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| /* end confdefs.h. */ +| /* Define pow to an innocuous variant, in case declares pow. +| For example, HP-UX 11i declares gettimeofday. */ +| #define pow innocuous_pow +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char pow (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef pow +| +| /* 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 pow (); +| /* 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_pow || defined __stub___pow +| choke me +| #endif +| +| int +| main () +| { +| return pow (); +| ; +| return 0; +| } +configure:23965: result: no +configure:23885: checking for bzero +configure:23941: gcc -o conftest conftest.c >&5 +conftest.c:57: warning: conflicting types for built-in function 'bzero' +configure:23947: $? = 0 +configure:23965: result: yes +configure:23885: checking for gettimeofday +configure:23941: gcc -o conftest conftest.c >&5 +configure:23947: $? = 0 +configure:23965: result: yes +configure:23885: checking for memset +configure:23941: gcc -o conftest conftest.c >&5 +conftest.c:59: warning: conflicting types for built-in function 'memset' +configure:23947: $? = 0 +configure:23965: result: yes +configure:23885: checking for mmap +configure:23941: gcc -o conftest conftest.c >&5 +configure:23947: $? = 0 +configure:23965: result: yes +configure:23885: checking for strndup +configure:23941: gcc -o conftest conftest.c >&5 +conftest.c:61: warning: conflicting types for built-in function 'strndup' +configure:23947: $? = 0 +configure:23965: result: yes +configure:23885: checking for strstr +configure:23941: gcc -o conftest conftest.c >&5 +conftest.c:62: warning: conflicting types for built-in function 'strstr' +configure:23947: $? = 0 +configure:23965: result: yes +configure:23885: checking for strncasecmp +configure:23941: gcc -o conftest conftest.c >&5 +conftest.c:63: warning: conflicting types for built-in function 'strncasecmp' +configure:23947: $? = 0 +configure:23965: result: yes +configure:23979: checking for sched_get_priority_max +configure:24035: gcc -o conftest conftest.c >&5 +configure:24041: $? = 0 +configure:24059: result: yes +configure:24076: checking for select +configure:24132: gcc -o conftest conftest.c >&5 +configure:24138: $? = 0 +configure:24156: result: yes +configure:24076: checking for socket +configure:24132: gcc -o conftest conftest.c >&5 +configure:24138: $? = 0 +configure:24156: result: yes +configure:24076: checking for getpagesize +configure:24132: gcc -o conftest conftest.c >&5 +configure:24138: $? = 0 +configure:24156: result: yes +configure:24076: checking for memcpy +configure:24132: gcc -o conftest conftest.c >&5 +conftest.c:68: warning: conflicting types for built-in function 'memcpy' +configure:24138: $? = 0 +configure:24156: result: yes +configure:24167: checking for getopt_long +configure:24223: gcc -o conftest conftest.c >&5 +configure:24229: $? = 0 +configure:24246: result: yes +configure:24330: checking for int +configure:24360: gcc -c conftest.c >&5 +configure:24366: $? = 0 +configure:24381: result: yes +configure:24388: checking size of int +configure:24690: gcc -o conftest conftest.c >&5 +configure:24693: $? = 0 +configure:24699: ./conftest +configure:24702: $? = 0 +configure:24725: result: 4 +configure:24735: checking for long int +configure:24765: gcc -c conftest.c >&5 +configure:24771: $? = 0 +configure:24786: result: yes +configure:24793: checking size of long int +configure:25095: gcc -o conftest conftest.c >&5 +configure:25098: $? = 0 +configure:25104: ./conftest +configure:25107: $? = 0 +configure:25130: result: 4 +configure:25140: checking for size_t +configure:25170: gcc -c conftest.c >&5 +configure:25176: $? = 0 +configure:25191: result: yes +configure:25198: checking size of size_t +configure:25500: gcc -o conftest conftest.c >&5 +configure:25503: $? = 0 +configure:25509: ./conftest +configure:25512: $? = 0 +configure:25535: result: 4 +configure:25545: checking for float +configure:25575: gcc -c conftest.c >&5 +configure:25581: $? = 0 +configure:25596: result: yes +configure:25603: checking size of float +configure:25905: gcc -o conftest conftest.c >&5 +configure:25908: $? = 0 +configure:25914: ./conftest +configure:25917: $? = 0 +configure:25940: result: 4 +configure:25955: checking return type of signal handlers +configure:25983: gcc -c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:57: error: void value not ignored as it ought to be +configure:25989: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_BZERO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| #define HAVE_MMAP 1 +| #define HAVE_STRNDUP 1 +| #define HAVE_STRSTR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SCHED_GET_PRIORITY_MAX 1 +| #define HAVE_SELECT 1 +| #define HAVE_SOCKET 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_GETOPT_LONG 1 +| #define SIZEOF_INT 4 +| #define SIZEOF_LONG_INT 4 +| #define SIZEOF_SIZE_T 4 +| #define SIZEOF_FLOAT 4 +| /* end confdefs.h. */ +| #include +| #include +| +| int +| main () +| { +| return *(signal (0, 0)) (0) == 1; +| ; +| return 0; +| } +configure:26004: result: void +configure:26013: The host is i686-pc-linux-gnu i686 pc linux-gnu . +configure:26029: checking linux/version.h usability +configure:26046: gcc -c conftest.c >&5 +configure:26052: $? = 0 +configure:26066: result: yes +configure:26070: checking linux/version.h presence +configure:26085: gcc -E conftest.c +configure:26091: $? = 0 +configure:26105: result: yes +configure:26138: checking for linux/version.h +configure:26145: result: yes +configure:26200: checking for pthread_create in -lpthread +configure:26235: gcc -o conftest conftest.c -lpthread >&5 +configure:26241: $? = 0 +configure:26259: result: yes +configure:26272: checking for pthread_attr_getstacksize +configure:26328: gcc -o conftest conftest.c >&5 +/tmp/cce24pEn.o: In function `main': +conftest.c:(.text+0x12): undefined reference to `pthread_attr_getstacksize' +collect2: ld returned 1 exit status +configure:26334: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_BZERO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| #define HAVE_MMAP 1 +| #define HAVE_STRNDUP 1 +| #define HAVE_STRSTR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SCHED_GET_PRIORITY_MAX 1 +| #define HAVE_SELECT 1 +| #define HAVE_SOCKET 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_GETOPT_LONG 1 +| #define SIZEOF_INT 4 +| #define SIZEOF_LONG_INT 4 +| #define SIZEOF_SIZE_T 4 +| #define SIZEOF_FLOAT 4 +| #define RETSIGTYPE void +| #define HAVE_LINUX +| #define HAVE_LIBPTHREAD +| /* end confdefs.h. */ +| /* Define pthread_attr_getstacksize to an innocuous variant, in case declares pthread_attr_getstacksize. +| For example, HP-UX 11i declares gettimeofday. */ +| #define pthread_attr_getstacksize innocuous_pthread_attr_getstacksize +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char pthread_attr_getstacksize (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef pthread_attr_getstacksize +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char pthread_attr_getstacksize (); +| /* 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_pthread_attr_getstacksize || defined __stub___pthread_attr_getstacksize +| choke me +| #endif +| +| int +| main () +| { +| return pthread_attr_getstacksize (); +| ; +| return 0; +| } +configure:26351: result: no +configure:26366: checking for snd_seq_open in -lasound +configure:26401: gcc -o conftest conftest.c -lasound >&5 +configure:26407: $? = 0 +configure:26425: result: yes +configure:26450: checking alsa/asoundlib.h usability +configure:26467: gcc -c conftest.c >&5 +configure:26473: $? = 0 +configure:26487: result: yes +configure:26491: checking alsa/asoundlib.h presence +configure:26506: gcc -E conftest.c +configure:26512: $? = 0 +configure:26526: result: yes +configure:26559: checking for alsa/asoundlib.h +configure:26566: result: yes +configure:26582: checking for dlopen in -ldl +configure:26617: gcc -o conftest conftest.c -ldl >&5 +configure:26623: $? = 0 +configure:26641: result: yes +configure:26711: checking for pkg-config +configure:26729: found /usr/bin/pkg-config +configure:26741: result: /usr/bin/pkg-config +configure:26770: checking pkg-config is at least version 0.9.0 +configure:26773: result: yes +configure:26784: checking for VEEJAY +configure:26792: $PKG_CONFIG --exists --print-errors "veejay >= 1.0 " +configure:26795: $? = 0 +configure:26810: $PKG_CONFIG --exists --print-errors "veejay >= 1.0 " +configure:26813: $? = 0 +configure:26849: result: yes +configure:26872: checking for MJPEGTOOLS +configure:26880: $PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 " +configure:26883: $? = 0 +configure:26898: $PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 " +configure:26901: $? = 0 +configure:26937: result: yes +configure:26960: checking for PIXBUF +configure:26968: $PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" +configure:26971: $? = 0 +configure:26986: $PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" +configure:26989: $? = 0 +configure:27025: result: yes +configure:27039: checking for __progname +configure:27066: gcc -o conftest conftest.c -ldl >&5 +configure:27072: $? = 0 +configure:27089: result: yes +configure:27099: checking for X +configure:27269: gcc -o conftest conftest.c -lX11 -ldl >&5 +configure:27275: $? = 0 +configure:27334: result: libraries , headers +configure:27495: gcc -o conftest conftest.c -ldl -lX11 >&5 +configure:27501: $? = 0 +configure:27658: checking for gethostbyname +configure:27714: gcc -o conftest conftest.c -ldl >&5 +configure:27720: $? = 0 +configure:27737: result: yes +configure:27882: checking for connect +configure:27938: gcc -o conftest conftest.c -ldl >&5 +configure:27944: $? = 0 +configure:27961: result: yes +configure:28033: checking for remove +configure:28089: gcc -o conftest conftest.c -ldl >&5 +configure:28095: $? = 0 +configure:28112: result: yes +configure:28184: checking for shmat +configure:28240: gcc -o conftest conftest.c -ldl >&5 +configure:28246: $? = 0 +configure:28263: result: yes +configure:28344: checking for IceConnectionNumber in -lICE +configure:28379: gcc -o conftest conftest.c -lICE -ldl >&5 +configure:28385: $? = 0 +configure:28403: result: yes +configure:28422: checking whether to compile in profiling information +configure:28431: result: no +configure:28434: checking whether to compile in assertion checking +configure:28438: result: yes +configure:28462: checking Architecture +configure:28617: checking for MMX on processor(s) +configure:28630: result: yes +configure:28647: checking for SSE on processor(s) +configure:28660: result: yes +configure:28678: checking for SSE2 on processor(s) +configure:28691: result: yes +configure:28708: checking for 3DNOW on processor(s) +configure:28721: result: no +configure:28733: checking for CMOV on processor(s) +configure:28746: result: yes +configure:28759: checking for MMX2 on processor(s) +configure:28772: result: yes +configure:28868: checking sub-architecture settings +configure:28878: result: -march=nocona -mtune=nocona +configure:28886: enable_debug = yes +configure:28905: result: +configure:28917: checking for FFMPEG_AVCODEC +configure:28925: $PKG_CONFIG --exists --print-errors "libavcodec" +configure:28928: $? = 0 +configure:28943: $PKG_CONFIG --exists --print-errors "libavcodec" +configure:28946: $? = 0 +configure:28982: result: yes +configure:28997: checking for FFMPEG_SWSCALER +configure:29005: $PKG_CONFIG --exists --print-errors "libswscale" +configure:29008: $? = 0 +configure:29023: $PKG_CONFIG --exists --print-errors "libswscale" +configure:29026: $? = 0 +configure:29062: result: yes +configure:29103: checking ffmpeg/avutil.h usability +configure:29120: gcc -c conftest.c >&5 +configure:29126: $? = 0 +configure:29140: result: yes +configure:29144: checking ffmpeg/avutil.h presence +configure:29159: gcc -E conftest.c +configure:29165: $? = 0 +configure:29179: result: yes +configure:29212: checking for ffmpeg/avutil.h +configure:29219: result: yes +configure:29238: checking ffmpeg/avcodec.h usability +configure:29255: gcc -c conftest.c >&5 +configure:29261: $? = 0 +configure:29275: result: yes +configure:29279: checking ffmpeg/avcodec.h presence +configure:29294: gcc -E conftest.c +configure:29300: $? = 0 +configure:29314: result: yes +configure:29347: checking for ffmpeg/avcodec.h +configure:29354: result: yes +configure:29373: checking ffmpeg/swscale.h usability +configure:29390: gcc -c conftest.c >&5 +configure:29396: $? = 0 +configure:29410: result: yes +configure:29414: checking ffmpeg/swscale.h presence +configure:29429: gcc -E conftest.c +configure:29435: $? = 0 +configure:29449: result: yes +configure:29482: checking for ffmpeg/swscale.h +configure:29489: result: yes +configure:29508: checking libswscale/swscale.h usability +configure:29525: gcc -c conftest.c >&5 +conftest.c:109:32: error: libswscale/swscale.h: No such file or directory +configure:29531: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_BZERO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| #define HAVE_MMAP 1 +| #define HAVE_STRNDUP 1 +| #define HAVE_STRSTR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SCHED_GET_PRIORITY_MAX 1 +| #define HAVE_SELECT 1 +| #define HAVE_SOCKET 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_GETOPT_LONG 1 +| #define SIZEOF_INT 4 +| #define SIZEOF_LONG_INT 4 +| #define SIZEOF_SIZE_T 4 +| #define SIZEOF_FLOAT 4 +| #define RETSIGTYPE void +| #define HAVE_LINUX +| #define HAVE_LIBPTHREAD +| #define HAVE_ALSA 1 +| #define HAVE_LIBDL 1 +| #define HAVE_DL_DLOPEN +| #define HAVE_VEEJAY 1 +| #define HAVE_MJPEGTOOLS 1 +| #define USE_GDK_PIXBUF 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_X86CPU +| #define ARCH_X86 1 +| #define HAVE_ASM_MMX +| #define HAVE_MMX +| #define HAVE_ASM_SSE +| #define HAVE_SSE +| #define HAVE_ASM_SSE2 +| #define HAVE_SSE2 +| #define HAVE_CMOV +| #define HAVE_ASM_MMX2 +| #define HAVE_MMX2 +| #define HAVE_ASM_MMXEXT +| #define HAVE_FFMPEG_UNINSTALLED +| #define HAVE_AVCODEC 1 +| #define HAVE_SWSCALER 1 +| /* end confdefs.h. */ +| #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 +| #include +configure:29545: result: no +configure:29549: checking libswscale/swscale.h presence +configure:29564: gcc -E conftest.c +conftest.c:76:32: error: libswscale/swscale.h: No such file or directory +configure:29570: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_BZERO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| #define HAVE_MMAP 1 +| #define HAVE_STRNDUP 1 +| #define HAVE_STRSTR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SCHED_GET_PRIORITY_MAX 1 +| #define HAVE_SELECT 1 +| #define HAVE_SOCKET 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_GETOPT_LONG 1 +| #define SIZEOF_INT 4 +| #define SIZEOF_LONG_INT 4 +| #define SIZEOF_SIZE_T 4 +| #define SIZEOF_FLOAT 4 +| #define RETSIGTYPE void +| #define HAVE_LINUX +| #define HAVE_LIBPTHREAD +| #define HAVE_ALSA 1 +| #define HAVE_LIBDL 1 +| #define HAVE_DL_DLOPEN +| #define HAVE_VEEJAY 1 +| #define HAVE_MJPEGTOOLS 1 +| #define USE_GDK_PIXBUF 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_X86CPU +| #define ARCH_X86 1 +| #define HAVE_ASM_MMX +| #define HAVE_MMX +| #define HAVE_ASM_SSE +| #define HAVE_SSE +| #define HAVE_ASM_SSE2 +| #define HAVE_SSE2 +| #define HAVE_CMOV +| #define HAVE_ASM_MMX2 +| #define HAVE_MMX2 +| #define HAVE_ASM_MMXEXT +| #define HAVE_FFMPEG_UNINSTALLED +| #define HAVE_AVCODEC 1 +| #define HAVE_SWSCALER 1 +| /* end confdefs.h. */ +| #include +configure:29584: result: no +configure:29617: checking for libswscale/swscale.h +configure:29624: result: no +configure:29643: checking libavcodec/avcodec.h usability +configure:29660: gcc -c conftest.c >&5 +conftest.c:109:32: error: libavcodec/avcodec.h: No such file or directory +configure:29666: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_BZERO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| #define HAVE_MMAP 1 +| #define HAVE_STRNDUP 1 +| #define HAVE_STRSTR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SCHED_GET_PRIORITY_MAX 1 +| #define HAVE_SELECT 1 +| #define HAVE_SOCKET 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_GETOPT_LONG 1 +| #define SIZEOF_INT 4 +| #define SIZEOF_LONG_INT 4 +| #define SIZEOF_SIZE_T 4 +| #define SIZEOF_FLOAT 4 +| #define RETSIGTYPE void +| #define HAVE_LINUX +| #define HAVE_LIBPTHREAD +| #define HAVE_ALSA 1 +| #define HAVE_LIBDL 1 +| #define HAVE_DL_DLOPEN +| #define HAVE_VEEJAY 1 +| #define HAVE_MJPEGTOOLS 1 +| #define USE_GDK_PIXBUF 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_X86CPU +| #define ARCH_X86 1 +| #define HAVE_ASM_MMX +| #define HAVE_MMX +| #define HAVE_ASM_SSE +| #define HAVE_SSE +| #define HAVE_ASM_SSE2 +| #define HAVE_SSE2 +| #define HAVE_CMOV +| #define HAVE_ASM_MMX2 +| #define HAVE_MMX2 +| #define HAVE_ASM_MMXEXT +| #define HAVE_FFMPEG_UNINSTALLED +| #define HAVE_AVCODEC 1 +| #define HAVE_SWSCALER 1 +| /* end confdefs.h. */ +| #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 +| #include +configure:29680: result: no +configure:29684: checking libavcodec/avcodec.h presence +configure:29699: gcc -E conftest.c +conftest.c:76:32: error: libavcodec/avcodec.h: No such file or directory +configure:29705: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_BZERO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| #define HAVE_MMAP 1 +| #define HAVE_STRNDUP 1 +| #define HAVE_STRSTR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SCHED_GET_PRIORITY_MAX 1 +| #define HAVE_SELECT 1 +| #define HAVE_SOCKET 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_GETOPT_LONG 1 +| #define SIZEOF_INT 4 +| #define SIZEOF_LONG_INT 4 +| #define SIZEOF_SIZE_T 4 +| #define SIZEOF_FLOAT 4 +| #define RETSIGTYPE void +| #define HAVE_LINUX +| #define HAVE_LIBPTHREAD +| #define HAVE_ALSA 1 +| #define HAVE_LIBDL 1 +| #define HAVE_DL_DLOPEN +| #define HAVE_VEEJAY 1 +| #define HAVE_MJPEGTOOLS 1 +| #define USE_GDK_PIXBUF 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_X86CPU +| #define ARCH_X86 1 +| #define HAVE_ASM_MMX +| #define HAVE_MMX +| #define HAVE_ASM_SSE +| #define HAVE_SSE +| #define HAVE_ASM_SSE2 +| #define HAVE_SSE2 +| #define HAVE_CMOV +| #define HAVE_ASM_MMX2 +| #define HAVE_MMX2 +| #define HAVE_ASM_MMXEXT +| #define HAVE_FFMPEG_UNINSTALLED +| #define HAVE_AVCODEC 1 +| #define HAVE_SWSCALER 1 +| /* end confdefs.h. */ +| #include +configure:29719: result: no +configure:29752: checking for libavcodec/avcodec.h +configure:29759: result: no +configure:29778: checking libavutil/avutil.h usability +configure:29795: gcc -c conftest.c >&5 +conftest.c:109:31: error: libavutil/avutil.h : No such file or directory +configure:29801: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_BZERO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| #define HAVE_MMAP 1 +| #define HAVE_STRNDUP 1 +| #define HAVE_STRSTR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SCHED_GET_PRIORITY_MAX 1 +| #define HAVE_SELECT 1 +| #define HAVE_SOCKET 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_GETOPT_LONG 1 +| #define SIZEOF_INT 4 +| #define SIZEOF_LONG_INT 4 +| #define SIZEOF_SIZE_T 4 +| #define SIZEOF_FLOAT 4 +| #define RETSIGTYPE void +| #define HAVE_LINUX +| #define HAVE_LIBPTHREAD +| #define HAVE_ALSA 1 +| #define HAVE_LIBDL 1 +| #define HAVE_DL_DLOPEN +| #define HAVE_VEEJAY 1 +| #define HAVE_MJPEGTOOLS 1 +| #define USE_GDK_PIXBUF 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_X86CPU +| #define ARCH_X86 1 +| #define HAVE_ASM_MMX +| #define HAVE_MMX +| #define HAVE_ASM_SSE +| #define HAVE_SSE +| #define HAVE_ASM_SSE2 +| #define HAVE_SSE2 +| #define HAVE_CMOV +| #define HAVE_ASM_MMX2 +| #define HAVE_MMX2 +| #define HAVE_ASM_MMXEXT +| #define HAVE_FFMPEG_UNINSTALLED +| #define HAVE_AVCODEC 1 +| #define HAVE_SWSCALER 1 +| /* end confdefs.h. */ +| #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 +| #include +configure:29815: result: no +configure:29819: checking libavutil/avutil.h presence +configure:29834: gcc -E conftest.c +conftest.c:76:31: error: libavutil/avutil.h : No such file or directory +configure:29840: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| #define PACKAGE_NAME "gveejay" +| #define PACKAGE_TARNAME "gveejay" +| #define PACKAGE_VERSION "1.2" +| #define PACKAGE_STRING "gveejay 1.2" +| #define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define PACKAGE "gveejay" +| #define VERSION "1.2" +| #define HAVE_CONFIG_H 1 +| #define _GNU_SOURCE 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define YYTEXT_POINTER 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FENV_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_BZERO 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| #define HAVE_MMAP 1 +| #define HAVE_STRNDUP 1 +| #define HAVE_STRSTR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SCHED_GET_PRIORITY_MAX 1 +| #define HAVE_SELECT 1 +| #define HAVE_SOCKET 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_GETOPT_LONG 1 +| #define SIZEOF_INT 4 +| #define SIZEOF_LONG_INT 4 +| #define SIZEOF_SIZE_T 4 +| #define SIZEOF_FLOAT 4 +| #define RETSIGTYPE void +| #define HAVE_LINUX +| #define HAVE_LIBPTHREAD +| #define HAVE_ALSA 1 +| #define HAVE_LIBDL 1 +| #define HAVE_DL_DLOPEN +| #define HAVE_VEEJAY 1 +| #define HAVE_MJPEGTOOLS 1 +| #define USE_GDK_PIXBUF 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_X86CPU +| #define ARCH_X86 1 +| #define HAVE_ASM_MMX +| #define HAVE_MMX +| #define HAVE_ASM_SSE +| #define HAVE_SSE +| #define HAVE_ASM_SSE2 +| #define HAVE_SSE2 +| #define HAVE_CMOV +| #define HAVE_ASM_MMX2 +| #define HAVE_MMX2 +| #define HAVE_ASM_MMXEXT +| #define HAVE_FFMPEG_UNINSTALLED +| #define HAVE_AVCODEC 1 +| #define HAVE_SWSCALER 1 +| /* end confdefs.h. */ +| #include +configure:29854: result: no +configure:29887: checking for libavutil/avutil.h +configure:29894: result: no +configure:30058: checking what warning flags to pass to the C compiler +configure:30098: checking for GTKCAIRO +configure:30106: $PKG_CONFIG --exists --print-errors "gtkcairo >= 0.3" +configure:30109: $? = 0 +configure:30124: $PKG_CONFIG --exists --print-errors "gtkcairo >= 0.3" +configure:30127: $? = 0 +configure:30165: result: yes +configure:30191: checking for GLIB +configure:30199: $PKG_CONFIG --exists --print-errors "$glib_modules" +configure:30202: $? = 0 +configure:30217: $PKG_CONFIG --exists --print-errors "$glib_modules" +configure:30220: $? = 0 +configure:30296: result: yes +configure:30306: checking for GTK +configure:30314: $PKG_CONFIG --exists --print-errors "$gtk_modules" +configure:30317: $? = 0 +configure:30332: $PKG_CONFIG --exists --print-errors "$gtk_modules" +configure:30335: $? = 0 +configure:30411: result: yes +configure:30421: checking for GLADE +configure:30429: $PKG_CONFIG --exists --print-errors "$libglade_modules" +configure:30432: $? = 0 +configure:30447: $PKG_CONFIG --exists --print-errors "$libglade_modules" +configure:30450: $? = 0 +configure:30526: result: yes +configure:30846: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by gveejay config.status 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on cc1161740-a + +config.status:768: creating Makefile +config.status:768: creating src/Makefile +config.status:768: creating gveejay-paths.sh +config.status:908: WARNING: gveejay-paths.sh.in seems to ignore the --datarootdir setting +config.status:768: creating config.h +config.status:1108: executing depfiles commands +configure:32269: +configure:32271: GVeejayReloaded 1.2 build configuration : +configure:32273: +configure:32275: Compiler flags: -g -DSTRICT_CHECKING -Wall -Wunused -march=nocona -mtune=nocona +configure:32277: -fif-conversion +configure:32279: +configure:32281: +configure:32283: Architecture: i686 +configure:32285: +configure:32288: x86 +configure:32290: MMX enabled : yes +configure:32292: MMX2 enabled : yes +configure:32294: SSE enabled : yes +configure:32296: SSE2 enabled : yes +configure:32298: 3DNOW enabled : no +configure:32300: CMOV enabled : yes +configure:32317: +configure:32320: Platform: Linux +configure:32330: +configure:32332: Required dependencies: +configure:32334: - Veejay 1.0 : true +configure:32336: - POSIX Threads (pthread) : true +configure:32338: - MJPEGTools : true +configure:32340: - FFmpeg AVCodec : true +configure:32342: - FFmpeg Swscaler : true +configure:32344: - GDK Pixbuf support : true +configure:32346: - Alsa support (midi sequencer) : true + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +ac_cv_build=i686-pc-linux-gnu +ac_cv_c_bigendian=no +ac_cv_c_compiler_gnu=yes +ac_cv_c_const=yes +ac_cv_c_inline=inline +ac_cv_cxx_compiler_gnu=yes +ac_cv_env_CCASFLAGS_set= +ac_cv_env_CCASFLAGS_value= +ac_cv_env_CCAS_set= +ac_cv_env_CCAS_value= +ac_cv_env_CCC_set= +ac_cv_env_CCC_value= +ac_cv_env_CC_set= +ac_cv_env_CC_value= +ac_cv_env_CFLAGS_set= +ac_cv_env_CFLAGS_value= +ac_cv_env_CPPFLAGS_set= +ac_cv_env_CPPFLAGS_value= +ac_cv_env_CPP_set= +ac_cv_env_CPP_value= +ac_cv_env_CXXCPP_set= +ac_cv_env_CXXCPP_value= +ac_cv_env_CXXFLAGS_set= +ac_cv_env_CXXFLAGS_value= +ac_cv_env_CXX_set= +ac_cv_env_CXX_value= +ac_cv_env_F77_set= +ac_cv_env_F77_value= +ac_cv_env_FFLAGS_set= +ac_cv_env_FFLAGS_value= +ac_cv_env_FFMPEG_AVCODEC_CFLAGS_set= +ac_cv_env_FFMPEG_AVCODEC_CFLAGS_value= +ac_cv_env_FFMPEG_AVCODEC_LIBS_set= +ac_cv_env_FFMPEG_AVCODEC_LIBS_value= +ac_cv_env_FFMPEG_SWSCALER_CFLAGS_set= +ac_cv_env_FFMPEG_SWSCALER_CFLAGS_value= +ac_cv_env_FFMPEG_SWSCALER_LIBS_set= +ac_cv_env_FFMPEG_SWSCALER_LIBS_value= +ac_cv_env_GLADE_CFLAGS_set= +ac_cv_env_GLADE_CFLAGS_value= +ac_cv_env_GLADE_LIBS_set= +ac_cv_env_GLADE_LIBS_value= +ac_cv_env_GLIB_CFLAGS_set= +ac_cv_env_GLIB_CFLAGS_value= +ac_cv_env_GLIB_LIBS_set= +ac_cv_env_GLIB_LIBS_value= +ac_cv_env_GTKCAIRO_CFLAGS_set= +ac_cv_env_GTKCAIRO_CFLAGS_value= +ac_cv_env_GTKCAIRO_LIBS_set= +ac_cv_env_GTKCAIRO_LIBS_value= +ac_cv_env_GTK_CFLAGS_set= +ac_cv_env_GTK_CFLAGS_value= +ac_cv_env_GTK_LIBS_set= +ac_cv_env_GTK_LIBS_value= +ac_cv_env_LDFLAGS_set= +ac_cv_env_LDFLAGS_value= +ac_cv_env_LIBS_set= +ac_cv_env_LIBS_value= +ac_cv_env_MJPEGTOOLS_CFLAGS_set= +ac_cv_env_MJPEGTOOLS_CFLAGS_value= +ac_cv_env_MJPEGTOOLS_LIBS_set= +ac_cv_env_MJPEGTOOLS_LIBS_value= +ac_cv_env_PIXBUF_CFLAGS_set= +ac_cv_env_PIXBUF_CFLAGS_value= +ac_cv_env_PIXBUF_LIBS_set= +ac_cv_env_PIXBUF_LIBS_value= +ac_cv_env_PKG_CONFIG_set= +ac_cv_env_PKG_CONFIG_value= +ac_cv_env_VEEJAY_CFLAGS_set= +ac_cv_env_VEEJAY_CFLAGS_value= +ac_cv_env_VEEJAY_LIBS_set= +ac_cv_env_VEEJAY_LIBS_value= +ac_cv_env_XMKMF_set= +ac_cv_env_XMKMF_value= +ac_cv_env_YACC_set= +ac_cv_env_YACC_value= +ac_cv_env_YFLAGS_set= +ac_cv_env_YFLAGS_value= +ac_cv_env_build_alias_set= +ac_cv_env_build_alias_value= +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_f77_compiler_gnu=no +ac_cv_flag_3dnow=no +ac_cv_flag_cmov=yes +ac_cv_flag_mmx2=yes +ac_cv_flag_mmx=yes +ac_cv_flag_sse2=yes +ac_cv_flag_sse=yes +ac_cv_func_bzero=yes +ac_cv_func_connect=yes +ac_cv_func_fmax=no +ac_cv_func_gethostbyname=yes +ac_cv_func_getopt_long=yes +ac_cv_func_getpagesize=yes +ac_cv_func_gettimeofday=yes +ac_cv_func_lround=no +ac_cv_func_memalign=yes +ac_cv_func_memcpy=yes +ac_cv_func_memset=yes +ac_cv_func_mmap=yes +ac_cv_func_posix_memalign=yes +ac_cv_func_pow=no +ac_cv_func_pthread_attr_getstacksize=no +ac_cv_func_remove=yes +ac_cv_func_sched_get_priority_max=yes +ac_cv_func_select=yes +ac_cv_func_shmat=yes +ac_cv_func_socket=yes +ac_cv_func_strncasecmp=yes +ac_cv_func_strndup=yes +ac_cv_func_strstr=yes +ac_cv_have_x='have_x=yes ac_x_includes='\'''\'' ac_x_libraries='\'''\''' +ac_cv_header_alloca_h=yes +ac_cv_header_alsa_asoundlib_h=yes +ac_cv_header_dlfcn_h=yes +ac_cv_header_fenv_h=yes +ac_cv_header_ffmpeg_avcodec_h=yes +ac_cv_header_ffmpeg_avutil_h=yes +ac_cv_header_ffmpeg_swscale_h=yes +ac_cv_header_inttypes_h=yes +ac_cv_header_libavcodec_avcodec_h=no +ac_cv_header_libavutil_avutil_h_=no +ac_cv_header_libswscale_swscale_h=no +ac_cv_header_linux_version_h=yes +ac_cv_header_memory_h=yes +ac_cv_header_stdc=yes +ac_cv_header_stdint_h=yes +ac_cv_header_stdlib_h=yes +ac_cv_header_string_h=yes +ac_cv_header_strings_h=yes +ac_cv_header_sys_stat_h=yes +ac_cv_header_sys_types_h=yes +ac_cv_header_unistd_h=yes +ac_cv_host=i686-pc-linux-gnu +ac_cv_lib_ICE_IceConnectionNumber=yes +ac_cv_lib_asound_snd_seq_open=yes +ac_cv_lib_dl_dlopen=yes +ac_cv_lib_lex=-lfl +ac_cv_lib_pthread_pthread_create=yes +ac_cv_objext=o +ac_cv_path_EGREP='/bin/grep -E' +ac_cv_path_GREP=/bin/grep +ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config +ac_cv_path_install='/usr/bin/install -c' +ac_cv_path_mkdir=/bin/mkdir +ac_cv_prog_AWK=gawk +ac_cv_prog_CPP='gcc -E' +ac_cv_prog_CXXCPP='g++ -E' +ac_cv_prog_LEX=flex +ac_cv_prog_YACC='bison -y' +ac_cv_prog_ac_ct_AR=ar +ac_cv_prog_ac_ct_CC=gcc +ac_cv_prog_ac_ct_CXX=g++ +ac_cv_prog_ac_ct_RANLIB=ranlib +ac_cv_prog_ac_ct_STRIP=strip +ac_cv_prog_cc_c89= +ac_cv_prog_cc_g=yes +ac_cv_prog_cxx_g=yes +ac_cv_prog_f77_g=no +ac_cv_prog_lex_root=lex.yy +ac_cv_prog_lex_yytext_pointer=yes +ac_cv_prog_make_make_set=yes +ac_cv_sizeof_float=4 +ac_cv_sizeof_int=4 +ac_cv_sizeof_long_int=4 +ac_cv_sizeof_size_t=4 +ac_cv_sys_file_offset_bits=64 +ac_cv_sys_largefile_CC=no +ac_cv_target=i686-pc-linux-gnu +ac_cv_type_float=yes +ac_cv_type_int=yes +ac_cv_type_long_int=yes +ac_cv_type_signal=void +ac_cv_type_size_t=yes +am_cv_CCAS_dependencies_compiler_type=gcc3 +am_cv_CC_dependencies_compiler_type=gcc3 +am_cv_CXX_dependencies_compiler_type=gcc3 +am_cv_prog_cc_stdc= +lt_cv_deplibs_check_method=pass_all +lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_ld_reload_flag=-r +lt_cv_objdir=.libs +lt_cv_path_LD=/usr/bin/ld +lt_cv_path_LDCXX=/usr/bin/ld +lt_cv_path_NM='/usr/bin/nm -B' +lt_cv_path_SED=/bin/sed +lt_cv_prog_compiler_c_o=yes +lt_cv_prog_compiler_c_o_CXX=yes +lt_cv_prog_compiler_rtti_exceptions=no +lt_cv_prog_gnu_ld=yes +lt_cv_prog_gnu_ldcxx=yes +lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\''' +lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr) \&\2},/p'\''' +lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^. .* \(.*\)$/extern int \1;/p'\''' +lt_cv_sys_max_cmd_len=98304 +lt_lt_cv_prog_compiler_c_o='"yes"' +lt_lt_cv_prog_compiler_c_o_CXX='"yes"' +lt_lt_cv_sys_global_symbol_pipe='"sed -n -e '\''s/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'\''"' +lt_lt_cv_sys_global_symbol_to_c_name_address='"sed -n -e '\''s/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'\''"' +lt_lt_cv_sys_global_symbol_to_cdecl='"sed -n -e '\''s/^. .* \\(.*\\)\$/extern int \\1;/p'\''"' +mjt_cv_extern___progname=yes +pkg_cv_FFMPEG_AVCODEC_CFLAGS='-I/usr/include/ffmpeg ' +pkg_cv_FFMPEG_AVCODEC_LIBS='-lavcodec -ltheora -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg ' +pkg_cv_FFMPEG_SWSCALER_CFLAGS='-I/usr/include/swscale -I/usr/include/ffmpeg ' +pkg_cv_FFMPEG_SWSCALER_LIBS='-lswscale -lavutil ' +pkg_cv_GLADE_CFLAGS='-I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ' +pkg_cv_GLADE_LIBS='-lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +pkg_cv_GLIB_CFLAGS='-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ' +pkg_cv_GLIB_LIBS='-lglib-2.0 ' +pkg_cv_GTKCAIRO_CFLAGS='-I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include ' +pkg_cv_GTKCAIRO_LIBS='-L/usr/local/lib -lgtkcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +pkg_cv_GTK_CFLAGS='-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ' +pkg_cv_GTK_LIBS='-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +pkg_cv_MJPEGTOOLS_CFLAGS='-I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex ' +pkg_cv_MJPEGTOOLS_LIBS='-lmjpegutils ' +pkg_cv_PIXBUF_CFLAGS='-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ' +pkg_cv_PIXBUF_LIBS='-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +pkg_cv_VEEJAY_CFLAGS='-I/usr/local/include/veejay ' +pkg_cv_VEEJAY_LIBS='-L/usr/local/lib -lveejay ' + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ACLOCAL='${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run aclocal-1.10' +ALSA_LIBS='-lasound' +ALTIVEC_CFLAGS='' +AMDEPBACKSLASH='\' +AMDEP_FALSE='#' +AMDEP_TRUE='' +AMTAR='${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run tar' +AR='ar' +ARCH_PPC_FALSE='' +ARCH_PPC_TRUE='#' +ARCH_X86_FALSE='#' +ARCH_X86_TRUE='' +AUTOCONF='${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run autoconf' +AUTOHEADER='${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run autoheader' +AUTOMAKE='${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run automake-1.10' +AWK='gawk' +CC='gcc' +CCAS='gcc' +CCASDEPMODE='depmode=gcc3' +CCASFLAGS='' +CCDEPMODE='depmode=gcc3' +CFLAGS=' -g -DSTRICT_CHECKING -Wall -Wunused -march=nocona -mtune=nocona ' +CPP='gcc -E' +CPPFLAGS='' +CXX='g++' +CXXCPP='g++ -E' +CXXDEPMODE='depmode=gcc3' +CXXFLAGS='-march=nocona -mtune=nocona -g -O2 ' +CYGPATH_W='echo' +DEBUGLIBS='' +DEFS='-DHAVE_CONFIG_H' +DEPDIR='.deps' +ECHO='echo' +ECHO_C='' +ECHO_N='-n' +ECHO_T='' +EGREP='/bin/grep -E' +EXEEXT='' +F77='' +FFLAGS='' +FFMPEG_AVCODEC_CFLAGS='-I/usr/include/ffmpeg ' +FFMPEG_AVCODEC_CFLAGS='-I/usr/include/ffmpeg ' +FFMPEG_AVCODEC_LIBS='-lavcodec -ltheora -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg ' +FFMPEG_AVCODEC_LIBS='-lavcodec -ltheora -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg ' +FFMPEG_SWSCALER_CFLAGS='-I/usr/include/swscale -I/usr/include/ffmpeg ' +FFMPEG_SWSCALER_CFLAGS='-I/usr/include/swscale -I/usr/include/ffmpeg ' +FFMPEG_SWSCALER_LIBS='-lswscale -lavutil ' +FFMPEG_SWSCALER_LIBS='-lswscale -lavutil ' +GLADE_CFLAGS='-I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ' +GLADE_LIBS='-lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +GLIB_CFLAGS='-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ' +GLIB_LIBS='-lglib-2.0 ' +GREP='/bin/grep' +GTKCAIRO_CFLAGS='-I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include ' +GTKCAIRO_CFLAGS='-I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include ' +GTKCAIRO_LIBS='-L/usr/local/lib -lgtkcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +GTKCAIRO_LIBS='-L/usr/local/lib -lgtkcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +GTK_CFLAGS='-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ' +GTK_LIBS='-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +HAVE_ALTIVEC_FALSE='' +HAVE_ALTIVEC_TRUE='#' +HAVE_ASM_MMX2_FALSE='#' +HAVE_ASM_MMX2_TRUE='' +HAVE_ASM_MMX_FALSE='#' +HAVE_ASM_MMX_TRUE='' +HAVE_ASM_NASM_FALSE='' +HAVE_ASM_NASM_TRUE='#' +HAVE_ASM_SSE2_FALSE='#' +HAVE_ASM_SSE2_TRUE='' +HAVE_ASM_SSE_FALSE='#' +HAVE_ASM_SSE_TRUE='' +HAVE_DL_DLOPEN_FALSE='#' +HAVE_DL_DLOPEN_TRUE='' +HAVE_MMX2_FALSE='#' +HAVE_MMX2_TRUE='' +HAVE_MMX_FALSE='#' +HAVE_MMX_TRUE='' +HAVE_PPCCPU_FALSE='' +HAVE_PPCCPU_TRUE='#' +HAVE_SSE2_FALSE='#' +HAVE_SSE2_TRUE='' +HAVE_SSE_FALSE='#' +HAVE_SSE_TRUE='' +HAVE_X86CPU_FALSE='#' +HAVE_X86CPU_TRUE='' +HAVE_X_FALSE='#' +HAVE_X_TRUE='' +INSTALL_DATA='${INSTALL} -m 644' +INSTALL_PROGRAM='${INSTALL}' +INSTALL_SCRIPT='${INSTALL}' +INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' +LDFLAGS='' +LEX='flex' +LEXLIB='-lfl' +LEX_OUTPUT_ROOT='lex.yy' +LIBGETOPT_LIB='' +LIBM_LIBS='-lm' +LIBOBJS='' +LIBS='-ldl ' +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +LN_S='ln -s' +LTLIBOBJS='' +LT_AGE='0' +LT_CURRENT='0' +LT_RELEASE='1.2' +LT_REVISION='0' +MAINT='#' +MAINTAINER_MODE_FALSE='' +MAINTAINER_MODE_TRUE='#' +MAKEINFO='${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run makeinfo' +MJPEGTOOLS_CFLAGS='-I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex ' +MJPEGTOOLS_CFLAGS='-I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex ' +MJPEGTOOLS_LIBS='-lmjpegutils ' +MJPEGTOOLS_LIBS='-lmjpegutils ' +OBJEXT='o' +OP_CFLAGS='' +PACKAGE='gveejay' +PACKAGE_BUGREPORT='veejay-users@lists.sourceforge.net' +PACKAGE_NAME='gveejay' +PACKAGE_STRING='gveejay 1.2' +PACKAGE_TARNAME='gveejay' +PACKAGE_VERSION='1.2' +PATH_SEPARATOR=':' +PIXBUF_CFLAGS='-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ' +PIXBUF_CFLAGS='-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ' +PIXBUF_LIBS='-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +PIXBUF_LIBS='-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ' +PKG_CONFIG='/usr/bin/pkg-config' +PROGRAM_NOPIC='-fno-PIC' +PTHREAD_LIBS='-lpthread' +RANLIB='ranlib' +SED='/bin/sed' +SET_MAKE='' +SHELL='/bin/bash' +STRIP='strip' +USE_GVEEJAYRELOADED_FALSE='#' +USE_GVEEJAYRELOADED_TRUE='' +VEEJAY_CFLAGS='-I/usr/local/include/veejay ' +VEEJAY_CFLAGS='-I/usr/local/include/veejay ' +VEEJAY_LIBS='-L/usr/local/lib -lveejay ' +VEEJAY_LIBS='-L/usr/local/lib -lveejay ' +VERSION='1.2' +XMKMF='' +X_CFLAGS='' +X_EXTRA_LIBS='' +X_LIBS='' +X_PRE_LIBS=' -lSM -lICE' +YACC='bison -y' +YFLAGS='' +YUVCFLAGS='-fif-conversion' +ac_ct_CC='gcc' +ac_ct_CXX='g++' +ac_ct_F77='' +am__fastdepCCAS_FALSE='#' +am__fastdepCCAS_TRUE='' +am__fastdepCC_FALSE='#' +am__fastdepCC_TRUE='' +am__fastdepCXX_FALSE='#' +am__fastdepCXX_TRUE='' +am__include='include' +am__isrc='' +am__leading_dot='.' +am__quote='' +am__tar='${AMTAR} chof - "$$tardir"' +am__untar='${AMTAR} xf -' +bindir='${exec_prefix}/bin' +build='i686-pc-linux-gnu' +build_alias='' +build_cpu='i686' +build_os='linux-gnu' +build_vendor='pc' +datadir='${datarootdir}' +datarootdir='${prefix}/share' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +dvidir='${docdir}' +exec_prefix='${prefix}' +gveejay_datadir='${datarootdir}/gveejay' +host='i686-pc-linux-gnu' +host_alias='' +host_cpu='i686' +host_os='linux-gnu' +host_vendor='pc' +htmldir='${docdir}' +includedir='${prefix}/include' +infodir='${datarootdir}/info' +install_sh='$(SHELL) /home/control/resynced/veejay-1.1/veejay-client/install-sh' +libdir='${exec_prefix}/lib' +libexecdir='${exec_prefix}/libexec' +localedir='${datarootdir}/locale' +localstatedir='${prefix}/var' +mandir='${datarootdir}/man' +mkdir_p='/bin/mkdir -p' +oldincludedir='/usr/include' +pdfdir='${docdir}' +prefix='/usr/local' +program_transform_name='s,x,x,' +psdir='${docdir}' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +sysconfdir='${prefix}/etc' +target='i686-pc-linux-gnu' +target_alias='' +target_cpu='i686' +target_os='linux-gnu' +target_vendor='pc' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +#define PACKAGE_NAME "gveejay" +#define PACKAGE_TARNAME "gveejay" +#define PACKAGE_VERSION "1.2" +#define PACKAGE_STRING "gveejay 1.2" +#define PACKAGE_BUGREPORT "veejay-users@lists.sourceforge.net" +#define PACKAGE "gveejay" +#define VERSION "1.2" +#define PACKAGE "gveejay" +#define VERSION "1.2" +#define HAVE_CONFIG_H 1 +#define _GNU_SOURCE 1 +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_DLFCN_H 1 +#define YYTEXT_POINTER 1 +#define _FILE_OFFSET_BITS 64 +#define HAVE_FENV_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_ALLOCA_H 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_MEMALIGN 1 +#define HAVE_BZERO 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_MEMSET 1 +#define HAVE_MMAP 1 +#define HAVE_STRNDUP 1 +#define HAVE_STRSTR 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_SCHED_GET_PRIORITY_MAX 1 +#define HAVE_SELECT 1 +#define HAVE_SOCKET 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_MEMCPY 1 +#define HAVE_GETOPT_LONG 1 +#define SIZEOF_INT 4 +#define SIZEOF_LONG_INT 4 +#define SIZEOF_SIZE_T 4 +#define SIZEOF_FLOAT 4 +#define RETSIGTYPE void +#define HAVE_LINUX +#define HAVE_LIBPTHREAD +#define HAVE_ALSA 1 +#define HAVE_LIBDL 1 +#define HAVE_DL_DLOPEN +#define HAVE_VEEJAY 1 +#define HAVE_MJPEGTOOLS 1 +#define USE_GDK_PIXBUF 1 +#define HAVE___PROGNAME 1 +#define HAVE_X86CPU +#define ARCH_X86 1 +#define HAVE_ASM_MMX +#define HAVE_MMX +#define HAVE_ASM_SSE +#define HAVE_SSE +#define HAVE_ASM_SSE2 +#define HAVE_SSE2 +#define HAVE_CMOV +#define HAVE_ASM_MMX2 +#define HAVE_MMX2 +#define HAVE_ASM_MMXEXT +#define HAVE_FFMPEG_UNINSTALLED +#define HAVE_AVCODEC 1 +#define HAVE_SWSCALER 1 +#define AVCODEC_INC +#define SWSCALE_INC +#define AVUTIL_INC +#define USE_GTKCAIRO +#define VERSION ${VERSION} + +configure: exit 0 diff --git a/veejay-client/config.status b/veejay-client/config.status new file mode 100755 index 00000000..89cf9bc0 --- /dev/null +++ b/veejay-client/config.status @@ -0,0 +1,1244 @@ +#! /bin/bash +# Generated by configure. +# 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-/bin/bash} +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by gveejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +# Files that config.status was made for. +config_files=" Makefile src/Makefile gveejay-paths.sh" +config_headers=" config.h" +config_commands=" depfiles" + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +ac_cs_version="\ +gveejay config.status 1.2 +configured by ./configure, generated by GNU Autoconf 2.61, + with options \"'--enable-debug' '--enable-strict'\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='/home/control/resynced/veejay-1.1/veejay-client' +srcdir='.' +INSTALL='/usr/bin/install -c' +MKDIR_P='/bin/mkdir -p' +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +if $ac_cs_recheck; then + echo "running CONFIG_SHELL=/bin/bash /bin/bash ./configure " '--enable-debug' '--enable-strict' $ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=/bin/bash + export CONFIG_SHELL + exec /bin/bash "./configure" '--enable-debug' '--enable-strict' $ac_configure_extra_args --no-create --no-recursion +fi + +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +# +# INIT-COMMANDS +# +AMDEP_TRUE="" ac_aux_dir="." + + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "gveejay-paths.sh") CONFIG_FILES="$CONFIG_FILES gveejay-paths.sh" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +cat >"$tmp/subs-1.sed" <<\CEOF +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@SHELL@,|#_!!_#|/bin/bash,g +s,@PATH_SEPARATOR@,|#_!!_#|:,g +s,@PACKAGE_NAME@,|#_!!_#|gveejay,g +s,@PACKAGE_TARNAME@,|#_!!_#|gveejay,g +s,@PACKAGE_VERSION@,|#_!!_#|1.2,g +s,@PACKAGE_STRING@,|#_!!_#|gveejay 1.2,g +s,@PACKAGE_BUGREPORT@,|#_!!_#|veejay-users@|#_!!_#|lists.sourceforge.net,g +s,@exec_prefix@,|#_!!_#|${prefix},g +s,@prefix@,|#_!!_#|/usr/local,g +s,@program_transform_name@,|#_!!_#|s\,x\,x\,,g +s,@bindir@,|#_!!_#|${exec_prefix}/bin,g +s,@sbindir@,|#_!!_#|${exec_prefix}/sbin,g +s,@libexecdir@,|#_!!_#|${exec_prefix}/libexec,g +s,@datarootdir@,|#_!!_#|${prefix}/share,g +s,@datadir@,|#_!!_#|${datarootdir},g +s,@sysconfdir@,|#_!!_#|${prefix}/etc,g +s,@sharedstatedir@,|#_!!_#|${prefix}/com,g +s,@localstatedir@,|#_!!_#|${prefix}/var,g +s,@includedir@,|#_!!_#|${prefix}/include,g +s,@oldincludedir@,|#_!!_#|/usr/include,g +s,@docdir@,|#_!!_#|${datarootdir}/doc/${PACKAGE_TARNAME},g +s,@infodir@,|#_!!_#|${datarootdir}/info,g +s,@htmldir@,|#_!!_#|${docdir},g +s,@dvidir@,|#_!!_#|${docdir},g +s,@pdfdir@,|#_!!_#|${docdir},g +s,@psdir@,|#_!!_#|${docdir},g +s,@libdir@,|#_!!_#|${exec_prefix}/lib,g +s,@localedir@,|#_!!_#|${datarootdir}/locale,g +s,@mandir@,|#_!!_#|${datarootdir}/man,g +s,@DEFS@,|#_!!_#|-DHAVE_CONFIG_H,g +s,@ECHO_C@,|#_!!_#|,g +s,@ECHO_N@,|#_!!_#|-n,g +s,@ECHO_T@,|#_!!_#|,g +s,@LIBS@,|#_!!_#|-ldl ,g +s,@build_alias@,|#_!!_#|,g +s,@host_alias@,|#_!!_#|,g +s,@target_alias@,|#_!!_#|,g +s,@build@,|#_!!_#|i686-pc-linux-gnu,g +s,@build_cpu@,|#_!!_#|i686,g +s,@build_vendor@,|#_!!_#|pc,g +s,@build_os@,|#_!!_#|linux-gnu,g +s,@host@,|#_!!_#|i686-pc-linux-gnu,g +s,@host_cpu@,|#_!!_#|i686,g +s,@host_vendor@,|#_!!_#|pc,g +s,@host_os@,|#_!!_#|linux-gnu,g +s,@target@,|#_!!_#|i686-pc-linux-gnu,g +s,@target_cpu@,|#_!!_#|i686,g +s,@target_vendor@,|#_!!_#|pc,g +s,@target_os@,|#_!!_#|linux-gnu,g +s,@INSTALL_PROGRAM@,|#_!!_#|${INSTALL},g +s,@INSTALL_SCRIPT@,|#_!!_#|${INSTALL},g +s,@INSTALL_DATA@,|#_!!_#|${INSTALL} -m 644,g +s,@am__isrc@,|#_!!_#|,g +s,@CYGPATH_W@,|#_!!_#|echo,g +s,@PACKAGE@,|#_!!_#|gveejay,g +s,@VERSION@,|#_!!_#|1.2,g +s,@ACLOCAL@,|#_!!_#|${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run aclocal-1.10,g +s,@AUTOCONF@,|#_!!_#|${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run autoconf,g +s,@AUTOMAKE@,|#_!!_#|${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run automake-1.10,g +s,@AUTOHEADER@,|#_!!_#|${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run autoheader,g +s,@MAKEINFO@,|#_!!_#|${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run makeinfo,g +s,@install_sh@,|#_!!_#|$(SHELL) /home/control/resynced/veejay-1.1/veejay-client/install-sh,g +s,@STRIP@,|#_!!_#|strip,g +s,@INSTALL_STRIP_PROGRAM@,|#_!!_#|$(install_sh) -c -s,g +s,@mkdir_p@,|#_!!_#|/bin/mkdir -p,g +s,@AWK@,|#_!!_#|gawk,g +s,@SET_MAKE@,|#_!!_#|,g +s,@am__leading_dot@,|#_!!_#|.,g +s,@AMTAR@,|#_!!_#|${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run tar,g +s,@am__tar@,|#_!!_#|${AMTAR} chof - "$$tardir",g +s,@am__untar@,|#_!!_#|${AMTAR} xf -,g +s,@MAINTAINER_MODE_TRUE@,|#_!!_#|#,g +s,@MAINTAINER_MODE_FALSE@,|#_!!_#|,g +s,@MAINT@,|#_!!_#|#,g +s,@LT_RELEASE@,|#_!!_#|1.2,g +s,@LT_CURRENT@,|#_!!_#|0,g +s,@LT_REVISION@,|#_!!_#|0,g +s,@LT_AGE@,|#_!!_#|0,g +s,@CC@,|#_!!_#|gcc,g +s,@CFLAGS@,|#_!!_#| -g -DSTRICT_CHECKING -Wall -Wunused -march=nocona -mtune=nocona ,g +s,@LDFLAGS@,|#_!!_#|,g +s,@CPPFLAGS@,|#_!!_#|,g +s,@ac_ct_CC@,|#_!!_#|gcc,g +s,@EXEEXT@,|#_!!_#|,g +s,@OBJEXT@,|#_!!_#|o,g +s,@DEPDIR@,|#_!!_#|.deps,g +s,@am__include@,|#_!!_#|include,g +s,@am__quote@,|#_!!_#|,g +s,@AMDEP_TRUE@,|#_!!_#|,g +s,@AMDEP_FALSE@,|#_!!_#|#,g +s,@AMDEPBACKSLASH@,|#_!!_#|\\,g +s,@CCDEPMODE@,|#_!!_#|depmode=gcc3,g +s,@am__fastdepCC_TRUE@,|#_!!_#|,g +s,@am__fastdepCC_FALSE@,|#_!!_#|#,g +s,@SED@,|#_!!_#|/bin/sed,g +s,@GREP@,|#_!!_#|/bin/grep,g +s,@EGREP@,|#_!!_#|/bin/grep -E,g +CEOF +cat >"$tmp/subs-2.sed" <<\CEOF +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@LN_S@,|#_!!_#|ln -s,g +s,@ECHO@,|#_!!_#|echo,g +s,@AR@,|#_!!_#|ar,g +s,@RANLIB@,|#_!!_#|ranlib,g +s,@CPP@,|#_!!_#|gcc -E,g +s,@CXX@,|#_!!_#|g++,g +s,@CXXFLAGS@,|#_!!_#|-march=nocona -mtune=nocona -g -O2 ,g +s,@ac_ct_CXX@,|#_!!_#|g++,g +s,@CXXDEPMODE@,|#_!!_#|depmode=gcc3,g +s,@am__fastdepCXX_TRUE@,|#_!!_#|,g +s,@am__fastdepCXX_FALSE@,|#_!!_#|#,g +s,@CXXCPP@,|#_!!_#|g++ -E,g +s,@F77@,|#_!!_#|,g +s,@FFLAGS@,|#_!!_#|,g +s,@ac_ct_F77@,|#_!!_#|,g +s,@LIBTOOL@,|#_!!_#|$(SHELL) $(top_builddir)/libtool,g +s,@YACC@,|#_!!_#|bison -y,g +s,@YFLAGS@,|#_!!_#|,g +s,@LEX@,|#_!!_#|flex,g +s,@LEX_OUTPUT_ROOT@,|#_!!_#|lex.yy,g +s,@LEXLIB@,|#_!!_#|-lfl,g +s,@CCAS@,|#_!!_#|gcc,g +s,@CCASFLAGS@,|#_!!_#|,g +s,@CCASDEPMODE@,|#_!!_#|depmode=gcc3,g +s,@am__fastdepCCAS_TRUE@,|#_!!_#|,g +s,@am__fastdepCCAS_FALSE@,|#_!!_#|#,g +s,@LIBGETOPT_LIB@,|#_!!_#|,g +s,@LIBM_LIBS@,|#_!!_#|-lm,g +s,@PTHREAD_LIBS@,|#_!!_#|-lpthread,g +s,@ALSA_LIBS@,|#_!!_#|-lasound,g +s,@PKG_CONFIG@,|#_!!_#|/usr/bin/pkg-config,g +s,@VEEJAY_CFLAGS@,|#_!!_#|-I/usr/local/include/veejay ,g +s,@VEEJAY_LIBS@,|#_!!_#|-L/usr/local/lib -lveejay ,g +s,@VEEJAY_CFLAGS@,|#_!!_#|-I/usr/local/include/veejay ,g +s,@VEEJAY_LIBS@,|#_!!_#|-L/usr/local/lib -lveejay ,g +s,@MJPEGTOOLS_CFLAGS@,|#_!!_#|-I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex ,g +s,@MJPEGTOOLS_LIBS@,|#_!!_#|-lmjpegutils ,g +s,@MJPEGTOOLS_CFLAGS@,|#_!!_#|-I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex ,g +s,@MJPEGTOOLS_LIBS@,|#_!!_#|-lmjpegutils ,g +s,@PIXBUF_CFLAGS@,|#_!!_#|-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ,g +s,@PIXBUF_LIBS@,|#_!!_#|-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ,g +s,@PIXBUF_CFLAGS@,|#_!!_#|-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ,g +s,@PIXBUF_LIBS@,|#_!!_#|-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ,g +s,@XMKMF@,|#_!!_#|,g +s,@X_CFLAGS@,|#_!!_#|,g +s,@X_PRE_LIBS@,|#_!!_#| -lSM -lICE,g +s,@X_LIBS@,|#_!!_#|,g +s,@X_EXTRA_LIBS@,|#_!!_#|,g +s,@HAVE_X_TRUE@,|#_!!_#|,g +s,@HAVE_X_FALSE@,|#_!!_#|#,g +s,@DEBUGLIBS@,|#_!!_#|,g +s,@OP_CFLAGS@,|#_!!_#|,g +s,@YUVCFLAGS@,|#_!!_#|-fif-conversion,g +s,@PROGRAM_NOPIC@,|#_!!_#|-fno-PIC,g +s,@ALTIVEC_CFLAGS@,|#_!!_#|,g +s,@FFMPEG_AVCODEC_CFLAGS@,|#_!!_#|-I/usr/include/ffmpeg ,g +s,@FFMPEG_AVCODEC_LIBS@,|#_!!_#|-lavcodec -ltheora -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg ,g +s,@FFMPEG_AVCODEC_CFLAGS@,|#_!!_#|-I/usr/include/ffmpeg ,g +s,@FFMPEG_AVCODEC_LIBS@,|#_!!_#|-lavcodec -ltheora -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg ,g +s,@FFMPEG_SWSCALER_CFLAGS@,|#_!!_#|-I/usr/include/swscale -I/usr/include/ffmpeg ,g +s,@FFMPEG_SWSCALER_LIBS@,|#_!!_#|-lswscale -lavutil ,g +s,@FFMPEG_SWSCALER_CFLAGS@,|#_!!_#|-I/usr/include/swscale -I/usr/include/ffmpeg ,g +s,@FFMPEG_SWSCALER_LIBS@,|#_!!_#|-lswscale -lavutil ,g +s,@HAVE_ASM_MMX_TRUE@,|#_!!_#|,g +s,@HAVE_ASM_MMX_FALSE@,|#_!!_#|#,g +s,@HAVE_X86CPU_TRUE@,|#_!!_#|,g +s,@HAVE_X86CPU_FALSE@,|#_!!_#|#,g +s,@HAVE_PPCCPU_TRUE@,|#_!!_#|#,g +s,@HAVE_PPCCPU_FALSE@,|#_!!_#|,g +s,@ARCH_PPC_TRUE@,|#_!!_#|#,g +s,@ARCH_PPC_FALSE@,|#_!!_#|,g +s,@ARCH_X86_TRUE@,|#_!!_#|,g +s,@ARCH_X86_FALSE@,|#_!!_#|#,g +s,@HAVE_ALTIVEC_TRUE@,|#_!!_#|#,g +s,@HAVE_ALTIVEC_FALSE@,|#_!!_#|,g +s,@HAVE_ASM_MMX2_TRUE@,|#_!!_#|,g +s,@HAVE_ASM_MMX2_FALSE@,|#_!!_#|#,g +s,@HAVE_ASM_SSE_TRUE@,|#_!!_#|,g +s,@HAVE_ASM_SSE_FALSE@,|#_!!_#|#,g +s,@HAVE_ASM_SSE2_TRUE@,|#_!!_#|,g +s,@HAVE_ASM_SSE2_FALSE@,|#_!!_#|#,g +s,@HAVE_ASM_NASM_TRUE@,|#_!!_#|#,g +s,@HAVE_ASM_NASM_FALSE@,|#_!!_#|,g +s,@HAVE_MMX_TRUE@,|#_!!_#|,g +s,@HAVE_MMX_FALSE@,|#_!!_#|#,g +s,@HAVE_SSE_TRUE@,|#_!!_#|,g +s,@HAVE_SSE_FALSE@,|#_!!_#|#,g +s,@HAVE_SSE2_TRUE@,|#_!!_#|,g +s,@HAVE_SSE2_FALSE@,|#_!!_#|#,g +s,@HAVE_MMX2_TRUE@,|#_!!_#|,g +s,@HAVE_MMX2_FALSE@,|#_!!_#|#,g +s,@HAVE_DL_DLOPEN_TRUE@,|#_!!_#|,g +s,@HAVE_DL_DLOPEN_FALSE@,|#_!!_#|#,g +s,@USE_GVEEJAYRELOADED_TRUE@,|#_!!_#|,g +s,@USE_GVEEJAYRELOADED_FALSE@,|#_!!_#|#,g +s,@GTKCAIRO_CFLAGS@,|#_!!_#|-I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include ,g +s,@GTKCAIRO_LIBS@,|#_!!_#|-L/usr/local/lib -lgtkcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ,g +CEOF +cat >"$tmp/subs-3.sed" <<\CEOF +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +s,@GTKCAIRO_CFLAGS@,|#_!!_#|-I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include ,g +s,@GTKCAIRO_LIBS@,|#_!!_#|-L/usr/local/lib -lgtkcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ,g +s,@gveejay_datadir@,|#_!!_#|${datarootdir}/gveejay,g +s,@GLIB_CFLAGS@,|#_!!_#|-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ,g +s,@GLIB_LIBS@,|#_!!_#|-lglib-2.0 ,g +s,@GTK_CFLAGS@,|#_!!_#|-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ,g +s,@GTK_LIBS@,|#_!!_#|-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ,g +s,@GLADE_CFLAGS@,|#_!!_#|-I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 ,g +s,@GLADE_LIBS@,|#_!!_#|-lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ,g +s,@LIBOBJS@,|#_!!_#|,g +s,@LTLIBOBJS@,|#_!!_#|,g +:end +s/|#_!!_#|//g +CEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&${datarootdir}/locale&g + s&@mandir@&${datarootdir}/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac + sed "/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +} + +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # + # First, check the format of the line: + cat >"$tmp/defines.sed" <<\CEOF +/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def +/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def +b +:def +s/$/ / +s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_NAME\)[ (].*,\1define\2 "gveejay" , +s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_TARNAME\)[ (].*,\1define\2 "gveejay" , +s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_VERSION\)[ (].*,\1define\2 "1.2" , +s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_STRING\)[ (].*,\1define\2 "gveejay 1.2" , +s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_BUGREPORT\)[ (].*,\1define\2 "veejay-users@lists.sourceforge.net" , +s,^\([ #]*\)[^ ]*\([ ]*PACKAGE\)[ (].*,\1define\2 "gveejay" , +s,^\([ #]*\)[^ ]*\([ ]*VERSION\)[ (].*,\1define\2 "1.2" , +s,^\([ #]*\)[^ ]*\([ ]*PACKAGE\)[ (].*,\1define\2 "gveejay" , +s,^\([ #]*\)[^ ]*\([ ]*VERSION\)[ (].*,\1define\2 "1.2" , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_CONFIG_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*_GNU_SOURCE\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*STDC_HEADERS\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_TYPES_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_STAT_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDLIB_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRING_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_MEMORY_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRINGS_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_INTTYPES_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDINT_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNISTD_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_DLFCN_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*YYTEXT_POINTER\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*_FILE_OFFSET_BITS\)[ (].*,\1define\2 64 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_FENV_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDINT_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_INTTYPES_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_TYPES_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_ALLOCA_H\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_POSIX_MEMALIGN\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_MEMALIGN\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_BZERO\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETTIMEOFDAY\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_MEMSET\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_MMAP\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRNDUP\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRSTR\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRNCASECMP\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SCHED_GET_PRIORITY_MAX\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SELECT\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SOCKET\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETPAGESIZE\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_MEMCPY\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETOPT_LONG\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*SIZEOF_INT\)[ (].*,\1define\2 4 , +s,^\([ #]*\)[^ ]*\([ ]*SIZEOF_LONG_INT\)[ (].*,\1define\2 4 , +s,^\([ #]*\)[^ ]*\([ ]*SIZEOF_SIZE_T\)[ (].*,\1define\2 4 , +s,^\([ #]*\)[^ ]*\([ ]*SIZEOF_FLOAT\)[ (].*,\1define\2 4 , +s,^\([ #]*\)[^ ]*\([ ]*RETSIGTYPE\)[ (].*,\1define\2 void , +CEOF + sed -f "$tmp/defines.sed" $ac_file_inputs >"$tmp/out1" + # First, check the format of the line: + cat >"$tmp/defines.sed" <<\CEOF +/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def +/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def +b +:def +s,^\([ #]*\)[^ ]*\([ ]*HAVE_LINUX\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_LIBPTHREAD\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_ALSA\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_LIBDL\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_DL_DLOPEN\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_VEEJAY\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_MJPEGTOOLS\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*USE_GDK_PIXBUF\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE___PROGNAME\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_X86CPU\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*ARCH_X86\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_ASM_MMX\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_MMX\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_ASM_SSE\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SSE\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_ASM_SSE2\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SSE2\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_CMOV\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_ASM_MMX2\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_MMX2\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_ASM_MMXEXT\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_FFMPEG_UNINSTALLED\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_AVCODEC\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*HAVE_SWSCALER\)[ (].*,\1define\2 1 , +s,^\([ #]*\)[^ ]*\([ ]*AVCODEC_INC\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*SWSCALE_INC\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*AVUTIL_INC\)[ (].*,\1define\2 , +s,^\([ #]*\)[^ ]*\([ ]*USE_GTKCAIRO\)[ (].*,\1define\2 , +s/ $// +s,^[ #]*u.*,/* & */, +CEOF + sed -f "$tmp/defines.sed" "$tmp/out1" >"$tmp/out2" +ac_result="$tmp/out2" + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } diff --git a/veejay-client/config.sub b/veejay-client/config.sub new file mode 100755 index 00000000..5defff65 --- /dev/null +++ b/veejay-client/config.sub @@ -0,0 +1,1622 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-01-18' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/veejay-client/configure b/veejay-client/configure new file mode 100755 index 00000000..87100fa2 --- /dev/null +++ b/veejay-client/configure @@ -0,0 +1,32347 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for gveejay 1.2. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='gveejay' +PACKAGE_TARNAME='gveejay' +PACKAGE_VERSION='1.2' +PACKAGE_STRING='gveejay 1.2' +PACKAGE_BUGREPORT='veejay-users@lists.sourceforge.net' + +ac_unique_file="src/gveejay.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +LT_RELEASE +LT_CURRENT +LT_REVISION +LT_AGE +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +SED +GREP +EGREP +LN_S +ECHO +AR +RANLIB +CPP +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +YACC +YFLAGS +LEX +LEX_OUTPUT_ROOT +LEXLIB +CCAS +CCASFLAGS +CCASDEPMODE +am__fastdepCCAS_TRUE +am__fastdepCCAS_FALSE +LIBGETOPT_LIB +LIBM_LIBS +PTHREAD_LIBS +ALSA_LIBS +PKG_CONFIG +VEEJAY_CFLAGS +VEEJAY_LIBS +VEEJAY_CFLAGS +VEEJAY_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +XMKMF +X_CFLAGS +X_PRE_LIBS +X_LIBS +X_EXTRA_LIBS +HAVE_X_TRUE +HAVE_X_FALSE +DEBUGLIBS +OP_CFLAGS +YUVCFLAGS +PROGRAM_NOPIC +ALTIVEC_CFLAGS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +HAVE_ASM_MMX_TRUE +HAVE_ASM_MMX_FALSE +HAVE_X86CPU_TRUE +HAVE_X86CPU_FALSE +HAVE_PPCCPU_TRUE +HAVE_PPCCPU_FALSE +ARCH_PPC_TRUE +ARCH_PPC_FALSE +ARCH_X86_TRUE +ARCH_X86_FALSE +HAVE_ALTIVEC_TRUE +HAVE_ALTIVEC_FALSE +HAVE_ASM_MMX2_TRUE +HAVE_ASM_MMX2_FALSE +HAVE_ASM_SSE_TRUE +HAVE_ASM_SSE_FALSE +HAVE_ASM_SSE2_TRUE +HAVE_ASM_SSE2_FALSE +HAVE_ASM_NASM_TRUE +HAVE_ASM_NASM_FALSE +HAVE_MMX_TRUE +HAVE_MMX_FALSE +HAVE_SSE_TRUE +HAVE_SSE_FALSE +HAVE_SSE2_TRUE +HAVE_SSE2_FALSE +HAVE_MMX2_TRUE +HAVE_MMX2_FALSE +HAVE_DL_DLOPEN_TRUE +HAVE_DL_DLOPEN_FALSE +USE_GVEEJAYRELOADED_TRUE +USE_GVEEJAYRELOADED_FALSE +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +gveejay_datadir +GLIB_CFLAGS +GLIB_LIBS +GTK_CFLAGS +GTK_LIBS +GLADE_CFLAGS +GLADE_LIBS +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS +YACC +YFLAGS +CCAS +CCASFLAGS +PKG_CONFIG +VEEJAY_CFLAGS +VEEJAY_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +XMKMF +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +GTKCAIRO_CFLAGS +GTKCAIRO_LIBS +GLIB_CFLAGS +GLIB_LIBS +GTK_CFLAGS +GTK_LIBS +GLADE_CFLAGS +GLADE_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures gveejay 1.2 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/gveejay] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of gveejay 1.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-strict Compile in paranoia assertion checking + --enable-debug Compile in debugging information + --enable-profiling Compile in profiling information + --enable-compile-warnings + Turn on compiler warnings. + --enable-warnings_as_errors + Compiler warnings are errors. + --enable-simd-accel use SIMD multimedia instructions such as MMX, + AltiVec, etc.if possible + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-extra-cflags=flags + Options to be added to CFLAGS (optional) + --without-pixbuf Do not use GDK pixbuf + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] include additional configurations [automatic] + --with-x use the X Window System + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + PKG_CONFIG path to pkg-config utility + VEEJAY_CFLAGS + C compiler flags for VEEJAY, overriding pkg-config + VEEJAY_LIBS linker flags for VEEJAY, overriding pkg-config + MJPEGTOOLS_CFLAGS + C compiler flags for MJPEGTOOLS, overriding pkg-config + MJPEGTOOLS_LIBS + linker flags for MJPEGTOOLS, overriding pkg-config + PIXBUF_CFLAGS + C compiler flags for PIXBUF, overriding pkg-config + PIXBUF_LIBS linker flags for PIXBUF, overriding pkg-config + XMKMF Path to xmkmf, Makefile generator for X Window System + FFMPEG_AVCODEC_CFLAGS + C compiler flags for FFMPEG_AVCODEC, overriding pkg-config + FFMPEG_AVCODEC_LIBS + linker flags for FFMPEG_AVCODEC, overriding pkg-config + FFMPEG_SWSCALER_CFLAGS + C compiler flags for FFMPEG_SWSCALER, overriding pkg-config + FFMPEG_SWSCALER_LIBS + linker flags for FFMPEG_SWSCALER, overriding pkg-config + GTKCAIRO_CFLAGS + C compiler flags for GTKCAIRO, overriding pkg-config + GTKCAIRO_LIBS + linker flags for GTKCAIRO, overriding pkg-config + GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config + GLIB_LIBS linker flags for GLIB, overriding pkg-config + GTK_CFLAGS C compiler flags for GTK, overriding pkg-config + GTK_LIBS linker flags for GTK, overriding pkg-config + GLADE_CFLAGS + C compiler flags for GLADE, overriding pkg-config + GLADE_LIBS linker flags for GLADE, 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" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +gveejay configure 1.2 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by gveejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + +VEEJAY_MAJOR_VERSION=1 +VEEJAY_MINOR_VERSION=2 +VEEJAY_MICRO_VERSION=0 +VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION +VEEJAY_CODENAME="Reloaded - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" +ac_config_headers="$ac_config_headers config.h" + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gveejay' + VERSION='1.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gveejay' + VERSION='1.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CONFIG_H 1 +_ACEOF + +# libtool versioning +LT_RELEASE=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION +LT_CURRENT=$VEEJAY_MICRO_VERSION +LT_REVISION=$VEEJAY_MICRO_VERSION +LT_AGE=$VEEJAY_MICRO_VERSION + + + + + +CFLAGS="" +# Check whether --enable-strict was given. +if test "${enable_strict+set}" = set; then + enableval=$enable_strict; +fi + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; +fi + +# Check whether --enable-profile was given. +if test "${enable_profile+set}" = set; then + enableval=$enable_profile; +fi + +# Check whether --enable-compile-warnings was given. +if test "${enable_compile_warnings+set}" = set; then + enableval=$enable_compile_warnings; +fi + +# Check whether --enable-warnings_as_errors was given. +if test "${enable_warnings_as_errors+set}" = set; then + enableval=$enable_warnings_as_errors; +fi + +# Check whether --enable-simd-accel was given. +if test "${enable_simd_accel+set}" = set; then + enableval=$enable_simd_accel; +fi + + +# Check whether --with-extra-cflags was given. +if test "${with_extra_cflags+set}" = set; then + withval=$with_extra_cflags; +fi + + +# Check whether --with-pixbuf was given. +if test "${with_pixbuf+set}" = set; then + withval=$with_pixbuf; +else + with_pixbuf=yes +fi + + + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + +# Check whether --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 + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 + +fi + +SED=$lt_cv_path_SED + +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If 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 whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 4920 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + + +esac + +need_locks="$enable_libtool_lock" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# 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 + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +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 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 conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7770: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7774: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # 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' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + 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 + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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:8060: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8064: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_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 +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 + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8164: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8168: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # 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_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + 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 + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; 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 + link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + 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_libdir_separator=':' + link_all_deplibs=yes + + 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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + 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 + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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 + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + 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' + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +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" + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant 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_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; 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 + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + fix_srcfile_path \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_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 + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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(int, char *[]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + 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].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + ld_shlibs_CXX=no + fi + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13046: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13050: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13150: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13154: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# 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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-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_F77='-Bstatic' + fi + ;; + + amigaos*) + # 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_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + 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_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # 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:14727: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14731: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=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:14831: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14835: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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_F77="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$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_F77='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_F77=no + fi + ;; + + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${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_F77='$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_F77='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$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 + link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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_F77=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_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$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].*|aix5*) + 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_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + 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_F77=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_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=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_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$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*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_F77=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=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_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17031: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17035: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # 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_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + 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_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # 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:17321: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17325: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=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:17425: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:17429: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # 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_GCJ="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$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_GCJ='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_GCJ=no + fi + ;; + + interix[3-9]*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$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 + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$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].*|aix5*) + 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_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + 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_GCJ=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_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=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_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$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*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_GCJ=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$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' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=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_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { echo "$as_me:$LINENO: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ (ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { echo "$as_me:$LINENO: checking lex library" >&5 +echo $ECHO_N "checking lex library... $ECHO_C" >&6; } +if test "${ac_cv_lib_lex+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lex=$ac_lib +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 +echo "${ECHO_T}$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat >conftest.$ac_ext <<_ACEOF +#define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_prog_lex_yytext_pointer=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\_ACEOF +#define YYTEXT_POINTER 1 +_ACEOF + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* 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. */ + char *t; + 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 saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$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 + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$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 -f conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$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 -f conftest* + fi +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= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_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 + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +echo "${ECHO_T}$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 + + + + + + + + +for ac_header in fenv.h stdint.h inttypes.h sys/types.h alloca.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + +for ac_func in posix_memalign memalign fmax lround pow bzero gettimeofday memset mmap strndup strstr strncasecmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in sched_get_priority_max +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + +for ac_func in select socket getpagesize memcpy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ echo "$as_me:$LINENO: checking for getopt_long" >&5 +echo $ECHO_N "checking for getopt_long... $ECHO_C" >&6; } +if test "${ac_cv_func_getopt_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getopt_long to an innocuous variant, in case declares getopt_long. + For example, HP-UX 11i declares gettimeofday. */ +#define getopt_long innocuous_getopt_long + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getopt_long (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getopt_long + +/* 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 getopt_long (); +/* 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_getopt_long || defined __stub___getopt_long +choke me +#endif + +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getopt_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getopt_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 +echo "${ECHO_T}$ac_cv_func_getopt_long" >&6; } +if test $ac_cv_func_getopt_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETOPT_LONG 1 +_ACEOF + +else + # FreeBSD and BSD/OS have a gnugetopt library for this: + { echo "$as_me:$LINENO: checking for getopt_long in -lgnugetopt" >&5 +echo $ECHO_N "checking for getopt_long in -lgnugetopt... $ECHO_C" >&6; } +if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnugetopt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getopt_long (); +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gnugetopt_getopt_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gnugetopt_getopt_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gnugetopt_getopt_long" >&5 +echo "${ECHO_T}$ac_cv_lib_gnugetopt_getopt_long" >&6; } +if test $ac_cv_lib_gnugetopt_getopt_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETOPT_LONG 1 +_ACEOF + + LIBGETOPT_LIB="-lgnugetopt" +fi + + +fi + + +{ echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6; } +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for long int" >&5 +echo $ECHO_N "checking for long int... $ECHO_C" >&6; } +if test "${ac_cv_type_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_int" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of long int" >&5 +echo $ECHO_N "checking size of long int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_int=$ac_lo;; +'') if test "$ac_cv_type_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of size_t" >&5 +echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_size_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + +{ echo "$as_me:$LINENO: checking for float" >&5 +echo $ECHO_N "checking for float... $ECHO_C" >&6; } +if test "${ac_cv_type_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef float ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_float=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_float=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5 +echo "${ECHO_T}$ac_cv_type_float" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of float" >&5 +echo $ECHO_N "checking size of float... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_float=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF + + + + + + + +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + +{ echo "$as_me:$LINENO: The host is $host $host_cpu $host_vendor $host_os ." >&5 +echo "$as_me: The host is $host $host_cpu $host_vendor $host_os ." >&6;} + +use_gveejayreloaded=true +case $host in + *-*-linux*) + if test "${ac_cv_header_linux_version_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking linux/version.h usability" >&5 +echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking linux/version.h presence" >&5 +echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_version_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; } + +fi +if test $ac_cv_header_linux_version_h = yes; then + have_linux=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINUX +_ACEOF + + +else + { { echo "$as_me:$LINENO: error: version.h not found - please install the linux kernel headers" >&5 +echo "$as_me: error: version.h not found - please install the linux kernel headers" >&2;} + { (exit 1); exit 1; }; } + +fi + + + LIBM_LIBS="-lm" + ;; + *-apple-darwin*) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DARWIN +_ACEOF + + CFLAGS="$CFLAGS -no-cpp-precomp" + have_darwin=true + LIBM_LIBS="" + ;; + *) + { echo "$as_me:$LINENO: WARNING: Alien platform - Good Luck!" >&5 +echo "$as_me: WARNING: Alien platform - Good Luck!" >&2;} + LIBM_LIBS="" + ;; +esac + + +if test x"$PKG_CONFIG_PATH" = x ; then + { echo "$as_me:$LINENO: The PKG_CONFIG_PATH variable was not set" >&5 +echo "$as_me: The PKG_CONFIG_PATH variable was not set" >&6;} + { echo "$as_me:$LINENO: You should set it to the directories that contain the .pc files" >&5 +echo "$as_me: You should set it to the directories that contain the .pc files" >&6;} + { { echo "$as_me:$LINENO: error: Abort" >&5 +echo "$as_me: error: Abort" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + +have_pthread=false +{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; } +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int +main () +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_pthread_pthread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pthread_pthread_create=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; } +if test $ac_cv_lib_pthread_pthread_create = yes; then + PTHREAD_LIBS="-lpthread" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBPTHREAD +_ACEOF + + have_pthread=true +fi + + +{ echo "$as_me:$LINENO: checking for pthread_attr_getstacksize" >&5 +echo $ECHO_N "checking for pthread_attr_getstacksize... $ECHO_C" >&6; } +if test "${ac_cv_func_pthread_attr_getstacksize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define pthread_attr_getstacksize to an innocuous variant, in case declares pthread_attr_getstacksize. + For example, HP-UX 11i declares gettimeofday. */ +#define pthread_attr_getstacksize innocuous_pthread_attr_getstacksize + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pthread_attr_getstacksize (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef pthread_attr_getstacksize + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_attr_getstacksize (); +/* 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_pthread_attr_getstacksize || defined __stub___pthread_attr_getstacksize +choke me +#endif + +int +main () +{ +return pthread_attr_getstacksize (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_pthread_attr_getstacksize=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_pthread_attr_getstacksize=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_getstacksize" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_attr_getstacksize" >&6; } +if test $ac_cv_func_pthread_attr_getstacksize = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREADSTACKSIZE +_ACEOF + + +fi + + + +have_alsa=false +{ echo "$as_me:$LINENO: checking for snd_seq_open in -lasound" >&5 +echo $ECHO_N "checking for snd_seq_open in -lasound... $ECHO_C" >&6; } +if test "${ac_cv_lib_asound_snd_seq_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lasound $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char snd_seq_open (); +int +main () +{ +return snd_seq_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_asound_snd_seq_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_asound_snd_seq_open=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_seq_open" >&5 +echo "${ECHO_T}$ac_cv_lib_asound_snd_seq_open" >&6; } +if test $ac_cv_lib_asound_snd_seq_open = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALSA 1 +_ACEOF + + ALSA_LIBS="-lasound" + + have_alsa=true +fi + + +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 +echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking alsa/asoundlib.h usability" >&5 +echo $ECHO_N "checking alsa/asoundlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking alsa/asoundlib.h presence" >&5 +echo $ECHO_N "checking alsa/asoundlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 +echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_alsa_asoundlib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6; } + +fi +if test $ac_cv_header_alsa_asoundlib_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: alsa/asoundlib.h not found - please install the alsa header" >&5 +echo "$as_me: error: alsa/asoundlib.h not found - please install the alsa header" >&2;} + { (exit 1); exit 1; }; } +fi + + + +have_dl_dlopen=false + +{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + +if test "$ac_cv_lib_dl_dlopen" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DL_DLOPEN +_ACEOF + + have_dl_dlopen=true +fi + +have_veejay=false + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi + +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for VEEJAY" >&5 +echo $ECHO_N "checking for VEEJAY... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$VEEJAY_CFLAGS"; then + pkg_cv_VEEJAY_CFLAGS="$VEEJAY_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"veejay >= 1.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "veejay >= 1.0 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_VEEJAY_CFLAGS=`$PKG_CONFIG --cflags "veejay >= 1.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$VEEJAY_LIBS"; then + pkg_cv_VEEJAY_LIBS="$VEEJAY_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"veejay >= 1.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "veejay >= 1.0 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_VEEJAY_LIBS=`$PKG_CONFIG --libs "veejay >= 1.0 " 2>/dev/null` +else + pkg_failed=yes +fi + 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 + VEEJAY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "veejay >= 1.0 "` + else + VEEJAY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "veejay >= 1.0 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$VEEJAY_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_veejay=false +elif test $pkg_failed = untried; then + have_veejay=false +else + VEEJAY_CFLAGS=$pkg_cv_VEEJAY_CFLAGS + VEEJAY_LIBS=$pkg_cv_VEEJAY_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_veejay=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VEEJAY 1 +_ACEOF + + +fi + +if test x$have_veejay != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find Veejay." >&5 +echo "$as_me: error: Cannot find Veejay." >&2;} + { (exit 1); exit 1; }; } +fi + +have_mjpegtools=false + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for MJPEGTOOLS" >&5 +echo $ECHO_N "checking for MJPEGTOOLS... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$MJPEGTOOLS_CFLAGS"; then + pkg_cv_MJPEGTOOLS_CFLAGS="$MJPEGTOOLS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mjpegtools >= 1.6 \"") >&5 + ($PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MJPEGTOOLS_CFLAGS=`$PKG_CONFIG --cflags "mjpegtools >= 1.6 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$MJPEGTOOLS_LIBS"; then + pkg_cv_MJPEGTOOLS_LIBS="$MJPEGTOOLS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mjpegtools >= 1.6 \"") >&5 + ($PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MJPEGTOOLS_LIBS=`$PKG_CONFIG --libs "mjpegtools >= 1.6 " 2>/dev/null` +else + pkg_failed=yes +fi + 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 + MJPEGTOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mjpegtools >= 1.6 "` + else + MJPEGTOOLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mjpegtools >= 1.6 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$MJPEGTOOLS_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_mjpegtools=false +elif test $pkg_failed = untried; then + have_mjpegtools=false +else + MJPEGTOOLS_CFLAGS=$pkg_cv_MJPEGTOOLS_CFLAGS + MJPEGTOOLS_LIBS=$pkg_cv_MJPEGTOOLS_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_mjpegtools=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MJPEGTOOLS 1 +_ACEOF + +fi + +if test x$have_mjpegtools != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find mjpegtools. Did you set PKG_CONFIG_PATH variable?" >&5 +echo "$as_me: error: Cannot find mjpegtools. Did you set PKG_CONFIG_PATH variable?" >&2;} + { (exit 1); exit 1; }; } +fi + +have_pixbuf=false +if test x$with_pixbuf != xno ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for PIXBUF" >&5 +echo $ECHO_N "checking for PIXBUF... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PIXBUF_CFLAGS"; then + pkg_cv_PIXBUF_CFLAGS="$PIXBUF_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0 gdk-pixbuf-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$PIXBUF_LIBS"; then + pkg_cv_PIXBUF_LIBS="$PIXBUF_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0 gdk-pixbuf-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXBUF_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + PIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0"` + else + PIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$PIXBUF_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_pixbuf=false +elif test $pkg_failed = untried; then + have_pixbuf=false +else + PIXBUF_CFLAGS=$pkg_cv_PIXBUF_CFLAGS + PIXBUF_LIBS=$pkg_cv_PIXBUF_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_pixbuf=true + +cat >>confdefs.h <<\_ACEOF +#define USE_GDK_PIXBUF 1 +_ACEOF + +fi +fi + +{ echo "$as_me:$LINENO: checking for __progname" >&5 +echo $ECHO_N "checking for __progname... $ECHO_C" >&6; } +if test "${mjt_cv_extern___progname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +extern char *__progname; + puts(__progname); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + mjt_cv_extern___progname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + mjt_cv_extern___progname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $mjt_cv_extern___progname" >&5 +echo "${ECHO_T}$mjt_cv_extern___progname" >&6; } +if test x$mjt_cv_extern___progname = xyes ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___PROGNAME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then + withval=$with_x; +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + case $x_includes,$x_libraries in #( + *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 +echo "$as_me: error: Cannot use X directory names containing '" >&2;} + { (exit 1); exit 1; }; };; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi + +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac +fi +;; #( + *) have_x=yes;; + esac + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + { echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6; } + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +cat >>confdefs.h <<\_ACEOF +#define X_DISPLAY_MISSING 1 +_ACEOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XOpenDisplay (); +int +main () +{ +return XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_stub_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_gethostbyname || defined __stub___gethostbyname +choke me +#endif + +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } + + if test $ac_cv_func_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_bsd_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_connect || defined __stub___connect +choke me +#endif + +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } + + if test $ac_cv_func_connect = no; then + { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } +if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + { echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6; } +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef remove + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_remove || defined __stub___remove +choke me +#endif + +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6; } + + if test $ac_cv_func_remove = no; then + { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_posix_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } +if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + { echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shmat + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shmat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shmat || defined __stub___shmat +choke me +#endif + +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6; } + + if test $ac_cv_func_shmat = no; then + { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shmat (); +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ipc_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } +if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char IceConnectionNumber (); +int +main () +{ +return IceConnectionNumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ICE_IceConnectionNumber=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + + if test x$have_x = xyes; then + HAVE_X_TRUE= + HAVE_X_FALSE='#' +else + HAVE_X_TRUE='#' + HAVE_X_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking whether to compile in profiling information" >&5 +echo $ECHO_N "checking whether to compile in profiling information... $ECHO_C" >&6; } +if test "x$enable_profiling" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -fprofile-arcs -ftest-coverage" + DEBUGLIBS="-lgcov" + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +{ echo "$as_me:$LINENO: checking whether to compile in assertion checking" >&5 +echo $ECHO_N "checking whether to compile in assertion checking... $ECHO_C" >&6; } +if test "x$enable_strict" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -g -DSTRICT_CHECKING" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +have_asm_nasm=false +have_asm_mmx=false +have_asm_sse=false +have_asm_sse2=false +have_asm_mmx2=false +have_asm_3dnow=false +have_cmov=false +have_x86cpu=false +have_x86_64cpu=false +have_altivec=false +have_mips=false +have_ppccpu=false +have_ps2=false + +OP_CFLAGS="" +YUVCFLAGS="-fif-conversion" + +{ echo "$as_me:$LINENO: checking Architecture" >&5 +echo $ECHO_N "checking Architecture... $ECHO_C" >&6; } +case $host_cpu in + i[3-7]86) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_X86CPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ARCH_X86 1 +_ACEOF + + have_x86cpu=true + + PROGRAM_NOPIC="-fno-PIC" + + if test "x$enable_debug" != "xyes" ; then + OP_CFLAGS="-O3" + fi + + + + + case $host_cpu in + i686) + CFLAGS="$CFLAGS" + ;; + *) + ;; + esac + + ;; + x86_64*|k8-*) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_X86_CPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ARCH_X86_64 1 +_ACEOF + + have_x86cpu=true + have_x86_64cpu=true + CFLAGS="$CFLAGS -fPIC -DPIC" + ;; + powerpc | powerpc64) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PPCCPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ARCH_PPC +_ACEOF + + have_ppccpu=true + + case $host in + *-apple-darwin*) + PROGRAM_NOPIC="-mdynamic-no-pic" # dynamic-no-pic is an Apple gcc option + + ;; + *) + PROGRAM_NOPIC="" + ;; + esac + ;; + mips | mipsel) + +cat >>confdefs.h <<\_ACEOF +#define ARCH_MIPS +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MIPS +_ACEOF + + have_mips=true + { echo "$as_me:$LINENO: checking if we are compiling on playstation2 hardware" >&5 +echo $ECHO_N "checking if we are compiling on playstation2 hardware... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#include + #include + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + have_ps2=true +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + have_ps2=false +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test x$have_ps2 = xtrue ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PS2 +_ACEOF + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + ;; + *) + { echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6; } + ;; +esac + + + + +if test x$have_x86cpu = xtrue +then + { echo "$as_me:$LINENO: checking for MMX on processor(s)" >&5 +echo $ECHO_N "checking for MMX on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_mmx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx=yes + else + ac_cv_flag_mmx=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_mmx" >&5 +echo "${ECHO_T}$ac_cv_flag_mmx" >&6; } + + if test $ac_cv_flag_mmx = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_MMX +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMX +_ACEOF + + have_asm_mmx=true + fi + + { echo "$as_me:$LINENO: checking for SSE on processor(s)" >&5 +echo $ECHO_N "checking for SSE on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_sse+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse=yes + else + ac_cv_flag_sse=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_sse" >&5 +echo "${ECHO_T}$ac_cv_flag_sse" >&6; } + + if test $ac_cv_flag_sse = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_SSE +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SSE +_ACEOF + + have_asm_sse=true + fi + + + { echo "$as_me:$LINENO: checking for SSE2 on processor(s)" >&5 +echo $ECHO_N "checking for SSE2 on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_sse2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse2=yes + else + ac_cv_flag_sse2=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_sse2" >&5 +echo "${ECHO_T}$ac_cv_flag_sse2" >&6; } + + if test $ac_cv_flag_sse2 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_SSE2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SSE2 +_ACEOF + + have_asm_sse2=true + fi + + { echo "$as_me:$LINENO: checking for 3DNOW on processor(s)" >&5 +echo $ECHO_N "checking for 3DNOW on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_3dnow+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* 3dnow" /proc/cpuinfo > /dev/null; then + ac_cv_flag_3dnow=yes + else + ac_cv_flag_3dnow=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_3dnow" >&5 +echo "${ECHO_T}$ac_cv_flag_3dnow" >&6; } + + if test $ac_cv_flag_3dnow = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_3DNOW +_ACEOF + + have_asm_3dnow=true + fi + + { echo "$as_me:$LINENO: checking for CMOV on processor(s)" >&5 +echo $ECHO_N "checking for CMOV on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_cmov+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* cmov" /proc/cpuinfo > /dev/null; then + ac_cv_flag_cmov=yes + else + ac_cv_flag_cmov=yes + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_cmov" >&5 +echo "${ECHO_T}$ac_cv_flag_cmov" >&6; } + + if test $ac_cv_flag_cmov = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CMOV +_ACEOF + + have_cmov=true + fi + + + { echo "$as_me:$LINENO: checking for MMX2 on processor(s)" >&5 +echo $ECHO_N "checking for MMX2 on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_mmx2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* mmxext" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx2=yes + else + ac_cv_flag_mmx2=yes + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_mmx2" >&5 +echo "${ECHO_T}$ac_cv_flag_mmx2" >&6; } + + if test $ac_cv_flag_mmx2 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_MMX2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMX2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_MMXEXT +_ACEOF + + have_asm_mmx2=true + fi + +fi + +if test x$have_ppccpu = xtrue +then + { echo "$as_me:$LINENO: checking compiler support for AltiVec" >&5 +echo $ECHO_N "checking compiler support for AltiVec... $ECHO_C" >&6; } + cat > conftest.c < +#endif +int main() { + union { vector signed int v; + signed int i; + } vi; + vi.v = vec_splat_s32(1); + return vi.i; +} +EOF + ALTIVEC_CFLAGS="" + if $CC -o conftest conftest.c >/dev/null 2>&1; then + have_altivec=true + elif $CC $CFLAGS -faltivec -o conftest conftest.c >/dev/null 2>&1; then + # Mac OS X style + have_altivec=true + ALTIVEC_CFLAGS="-faltivec" + elif $CC $CFLAGS -fvec -o conftest conftest.c >/dev/null 2>&1; then + # Motorola style + have_altivec=true + ALTIVEC_CFLAGS="-fvec" + elif $CC $CFLAGS -DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec -o conftest conftest.c >/dev/null 2>&1; then + # gcc 3.1 style + have_altivec=true + ALTIVEC_CFLAGS="-DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec" + fi + rm -f conftest*; + + if test x$have_altivec = xtrue + then + # add -O3 flag + ALTIVEC_CFLAGS="-O3 ${ALTIVEC_CFLAGS}" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALTIVEC +_ACEOF + + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + +fi + +if test ! -r $srcdir/cpuinfo.sh; then + { { echo "$as_me:$LINENO: error: cpuinfo.sh script not found - do a cvs update" >&5 +echo "$as_me: error: cpuinfo.sh script not found - do a cvs update" >&2;} + { (exit 1); exit 1; }; } +fi + + +if test x$have_x86cpu = xtrue -o x$have_ppccpu = xtrue; then + if test x$host_alias != x; then + { echo "$as_me:$LINENO: checking sub-architecture settings" >&5 +echo $ECHO_N "checking sub-architecture settings... $ECHO_C" >&6; } + if test x$have_x86cpu = xtrue; then + host_mod_cpu=`echo $host_cpu|tr _ -` + ARCHFLAGS="-march=$host_mod_cpu -mcpu=$host_mod_cpu" + { echo "$as_me:$LINENO: result: $ARCHFLAGS" >&5 +echo "${ECHO_T}$ARCHFLAGS" >&6; } + fi + else + { echo "$as_me:$LINENO: checking sub-architecture settings" >&5 +echo $ECHO_N "checking sub-architecture settings... $ECHO_C" >&6; } + chmod +x $srcdir/cpuinfo.sh + + if test x$have_x86cpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh x86` + fi + if test x$have_ppccpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh ppc` + fi + { echo "$as_me:$LINENO: result: $ARCHFLAGS" >&5 +echo "${ECHO_T}$ARCHFLAGS" >&6; } + fi +fi + + +if test x$have_x86cpu = xtrue; +then + { echo "$as_me:$LINENO: enable_debug = $enable_debug" >&5 +echo "$as_me: enable_debug = $enable_debug" >&6;} + if test "x$enable_debug" != "xyes" ; + then + { echo "$as_me:$LINENO: debug koekje" >&5 +echo "$as_me: debug koekje" >&6;} + if test $ac_cv_flag_sse = yes; then + CFLAGS="$CFLAGS -msse -mfpmath=sse" + { echo "$as_me:$LINENO: cflags aangepast" >&5 +echo "$as_me: cflags aangepast" >&6;} + fi + if test $av_cv_flag_sse2 = yes; then + CFLAGS="$CFLAGS -msse2 -mfpmath=sse" + { echo "$as_me:$LINENO: cflags aangepast" >&5 +echo "$as_me: cflags aangepast" >&6;} + fi + fi +fi + +{ echo "$as_me:$LINENO: result: $CFLAGS" >&5 +echo "${ECHO_T}$CFLAGS" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_FFMPEG_UNINSTALLED +_ACEOF + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_AVCODEC" >&5 +echo $ECHO_N "checking for FFMPEG_AVCODEC... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVCODEC_CFLAGS"; then + pkg_cv_FFMPEG_AVCODEC_CFLAGS="$FFMPEG_AVCODEC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavcodec\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVCODEC_CFLAGS=`$PKG_CONFIG --cflags "libavcodec" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVCODEC_LIBS"; then + pkg_cv_FFMPEG_AVCODEC_LIBS="$FFMPEG_AVCODEC_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavcodec\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVCODEC_LIBS=`$PKG_CONFIG --libs "libavcodec" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_AVCODEC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavcodec"` + else + FFMPEG_AVCODEC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_AVCODEC_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_avcodec=false +elif test $pkg_failed = untried; then + have_avcodec=false +else + FFMPEG_AVCODEC_CFLAGS=$pkg_cv_FFMPEG_AVCODEC_CFLAGS + FFMPEG_AVCODEC_LIBS=$pkg_cv_FFMPEG_AVCODEC_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_avcodec=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AVCODEC 1 +_ACEOF + +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_SWSCALER" >&5 +echo $ECHO_N "checking for FFMPEG_SWSCALER... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_SWSCALER_CFLAGS"; then + pkg_cv_FFMPEG_SWSCALER_CFLAGS="$FFMPEG_SWSCALER_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libswscale\"") >&5 + ($PKG_CONFIG --exists --print-errors "libswscale") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_SWSCALER_CFLAGS=`$PKG_CONFIG --cflags "libswscale" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_SWSCALER_LIBS"; then + pkg_cv_FFMPEG_SWSCALER_LIBS="$FFMPEG_SWSCALER_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libswscale\"") >&5 + ($PKG_CONFIG --exists --print-errors "libswscale") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_SWSCALER_LIBS=`$PKG_CONFIG --libs "libswscale" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_SWSCALER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libswscale"` + else + FFMPEG_SWSCALER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libswscale"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_SWSCALER_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_swscaler=false +elif test $pkg_failed = untried; then + have_swscaler=false +else + FFMPEG_SWSCALER_CFLAGS=$pkg_cv_FFMPEG_SWSCALER_CFLAGS + FFMPEG_SWSCALER_LIBS=$pkg_cv_FFMPEG_SWSCALER_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_swscaler=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SWSCALER 1 +_ACEOF + +fi + + + +if test x$have_avcodec != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net " >&5 +echo "$as_me: error: FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net " >&2;} + { (exit 1); exit 1; }; } +fi + +if test x$have_swscaler != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? " >&5 +echo "$as_me: error: FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? " >&2;} + { (exit 1); exit 1; }; } +fi + +FFMPEG_INCLUDE_AVCODEC="" +FFMPEG_INCLUDE_SWSCALE="" +FFMPEG_INCLUDE_AVUTIL="" + +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avutil.h" >&5 +echo $ECHO_N "checking for ffmpeg/avutil.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avutil_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avutil_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avutil.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avutil.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avutil.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avutil.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avutil.h" >&5 +echo $ECHO_N "checking for ffmpeg/avutil.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avutil_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avutil_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avutil_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avutil_h = yes; then + FFMPEG_INCLUDE_AVUTIL="" +fi + + +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5 +echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avcodec.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avcodec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avcodec.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avcodec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5 +echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avcodec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avcodec_h = yes; then + FFMPEG_INCLUDE_AVCODEC="" +fi + + +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/swscale.h" >&5 +echo $ECHO_N "checking for ffmpeg/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_swscale_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/swscale.h usability" >&5 +echo $ECHO_N "checking ffmpeg/swscale.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/swscale.h presence" >&5 +echo $ECHO_N "checking ffmpeg/swscale.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/swscale.h" >&5 +echo $ECHO_N "checking for ffmpeg/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_swscale_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_swscale_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_swscale_h = yes; then + FFMPEG_INCLUDE_SWSCALE="" +fi + + +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libswscale/swscale.h" >&5 +echo $ECHO_N "checking for libswscale/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libswscale_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_libswscale_swscale_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libswscale/swscale.h usability" >&5 +echo $ECHO_N "checking libswscale/swscale.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libswscale/swscale.h presence" >&5 +echo $ECHO_N "checking libswscale/swscale.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libswscale/swscale.h" >&5 +echo $ECHO_N "checking for libswscale/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libswscale_swscale_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libswscale_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_libswscale_swscale_h" >&6; } + +fi +if test $ac_cv_header_libswscale_swscale_h = yes; then + FFMPEG_INCLUDE_SWSCALE="" +fi + + +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libavcodec/avcodec.h" >&5 +echo $ECHO_N "checking for libavcodec/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavcodec_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavcodec_avcodec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavcodec/avcodec.h usability" >&5 +echo $ECHO_N "checking libavcodec/avcodec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavcodec/avcodec.h presence" >&5 +echo $ECHO_N "checking libavcodec/avcodec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavcodec/avcodec.h" >&5 +echo $ECHO_N "checking for libavcodec/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavcodec_avcodec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavcodec_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavcodec_avcodec_h" >&6; } + +fi +if test $ac_cv_header_libavcodec_avcodec_h = yes; then + FFMPEG_INCLUDE_AVCODEC="" +fi + + +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + { echo "$as_me:$LINENO: checking for libavutil/avutil.h " >&5 +echo $ECHO_N "checking for libavutil/avutil.h ... $ECHO_C" >&6; } +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavutil_avutil_h_" >&5 +echo "${ECHO_T}$ac_cv_header_libavutil_avutil_h_" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavutil/avutil.h usability" >&5 +echo $ECHO_N "checking libavutil/avutil.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavutil/avutil.h presence" >&5 +echo $ECHO_N "checking libavutil/avutil.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavutil/avutil.h " >&5 +echo $ECHO_N "checking for libavutil/avutil.h ... $ECHO_C" >&6; } +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavutil_avutil_h_=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavutil_avutil_h_" >&5 +echo "${ECHO_T}$ac_cv_header_libavutil_avutil_h_" >&6; } + +fi +if test $ac_cv_header_libavutil_avutil_h_ = yes; then + FFMPEG_INCLUDE_AVUTIL="" +fi + + + + +cat >>confdefs.h <<_ACEOF +#define AVCODEC_INC $FFMPEG_INCLUDE_AVCODEC +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SWSCALE_INC $FFMPEG_INCLUDE_SWSCALE +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define AVUTIL_INC $FFMPEG_INCLUDE_AVUTIL +_ACEOF + + + + if test x$have_asm_mmx = xtrue; then + HAVE_ASM_MMX_TRUE= + HAVE_ASM_MMX_FALSE='#' +else + HAVE_ASM_MMX_TRUE='#' + HAVE_ASM_MMX_FALSE= +fi + + if test x$have_x86cpu = xtrue; then + HAVE_X86CPU_TRUE= + HAVE_X86CPU_FALSE='#' +else + HAVE_X86CPU_TRUE='#' + HAVE_X86CPU_FALSE= +fi + + if test x$have_ppccpu = xtrue; then + HAVE_PPCCPU_TRUE= + HAVE_PPCCPU_FALSE='#' +else + HAVE_PPCCPU_TRUE='#' + HAVE_PPCCPU_FALSE= +fi + + if test x$have_ppccpu = xtrue; then + ARCH_PPC_TRUE= + ARCH_PPC_FALSE='#' +else + ARCH_PPC_TRUE='#' + ARCH_PPC_FALSE= +fi + + if test x$have_x86cpu = xtrue; then + ARCH_X86_TRUE= + ARCH_X86_FALSE='#' +else + ARCH_X86_TRUE='#' + ARCH_X86_FALSE= +fi + + if test x$have_altivec = xtrue; then + HAVE_ALTIVEC_TRUE= + HAVE_ALTIVEC_FALSE='#' +else + HAVE_ALTIVEC_TRUE='#' + HAVE_ALTIVEC_FALSE= +fi + + if test x$have_asm_mmx2 = xtrue; then + HAVE_ASM_MMX2_TRUE= + HAVE_ASM_MMX2_FALSE='#' +else + HAVE_ASM_MMX2_TRUE='#' + HAVE_ASM_MMX2_FALSE= +fi + + if test x$have_asm_sse = xtrue; then + HAVE_ASM_SSE_TRUE= + HAVE_ASM_SSE_FALSE='#' +else + HAVE_ASM_SSE_TRUE='#' + HAVE_ASM_SSE_FALSE= +fi + + if test x$have_asm_sse2 = xtrue; then + HAVE_ASM_SSE2_TRUE= + HAVE_ASM_SSE2_FALSE='#' +else + HAVE_ASM_SSE2_TRUE='#' + HAVE_ASM_SSE2_FALSE= +fi + + if test x$have_asm_nasm = xtrue; then + HAVE_ASM_NASM_TRUE= + HAVE_ASM_NASM_FALSE='#' +else + HAVE_ASM_NASM_TRUE='#' + HAVE_ASM_NASM_FALSE= +fi + + if test x$have_asm_mmx = xtrue; then + HAVE_MMX_TRUE= + HAVE_MMX_FALSE='#' +else + HAVE_MMX_TRUE='#' + HAVE_MMX_FALSE= +fi + + if test x$have_asm_sse = xtrue; then + HAVE_SSE_TRUE= + HAVE_SSE_FALSE='#' +else + HAVE_SSE_TRUE='#' + HAVE_SSE_FALSE= +fi + + if test x$have_asm_sse2 = xtrue; then + HAVE_SSE2_TRUE= + HAVE_SSE2_FALSE='#' +else + HAVE_SSE2_TRUE='#' + HAVE_SSE2_FALSE= +fi + + if test x$have_asm_mmx2 = xtrue; then + HAVE_MMX2_TRUE= + HAVE_MMX2_FALSE='#' +else + HAVE_MMX2_TRUE='#' + HAVE_MMX2_FALSE= +fi + + if test x$have_dl_dlopen = xtrue; then + HAVE_DL_DLOPEN_TRUE= + HAVE_DL_DLOPEN_FALSE='#' +else + HAVE_DL_DLOPEN_TRUE='#' + HAVE_DL_DLOPEN_FALSE= +fi + + if test x$use_gveejayreloaded = xtrue ; then + USE_GVEEJAYRELOADED_TRUE= + USE_GVEEJAYRELOADED_FALSE='#' +else + USE_GVEEJAYRELOADED_TRUE='#' + USE_GVEEJAYRELOADED_FALSE= +fi + + +CFLAGS="$ARCHFLAGS $CFLAGS" +CXXFLAGS="$ARCHFLAGS $CXXFLAGS" + + +if test "x${GCC}" != "xyes" ; then + enable_compile_warnings=no +fi + +{ echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 +echo $ECHO_N "checking what warning flags to pass to the C compiler... $ECHO_C" >&6; } +warnCFLAGS= +warnCXXFLAGS= +if test "x$enable_compile_warnings" != "xno" ; then + if test "x$GCC" = "xyes" ; then + case "$CFLAGS" in + *-Wall*) ;; + *) warnCFLAGS="-Wall -Wunused " ;; + esac + if test "x$enable_compile_warnings" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wundef -Wshadow -Wbad-function-cast -Wconversion -Wpadded -Wunreachable-code -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + fi + if test "x$enable_warnings_as_errors" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Werror" + warnCXXFLAGS="$warnCXXFLAGS -Werror" + fi + fi +fi + +if test "x$cflags_set" != "xyes" ; then + if test "x$enable_debug" = "xyes" ; then + CFLAGS="$debugCFLAGS $warnCFLAGS $CFLAGS" + else + CFLAGS="$CFLAGS $warnCFLAGS" + fi + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS" + cflags_set=yes +fi + + +if test x"$with_extra_cflags" != "x"; then + CFLAGS="$CFLAGS $with_extra_cflags" + CXXFLAGS="$CXXFLAGS $with_extra_cflags" +fi + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GTKCAIRO" >&5 +echo $ECHO_N "checking for GTKCAIRO... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GTKCAIRO_CFLAGS"; then + pkg_cv_GTKCAIRO_CFLAGS="$GTKCAIRO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkcairo >= 0.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtkcairo >= 0.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTKCAIRO_CFLAGS=`$PKG_CONFIG --cflags "gtkcairo >= 0.3" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GTKCAIRO_LIBS"; then + pkg_cv_GTKCAIRO_LIBS="$GTKCAIRO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkcairo >= 0.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtkcairo >= 0.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTKCAIRO_LIBS=`$PKG_CONFIG --libs "gtkcairo >= 0.3" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GTKCAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtkcairo >= 0.3"` + else + GTKCAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtkcairo >= 0.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTKCAIRO_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + use_gtkcairo="no" + +elif test $pkg_failed = untried; then + use_gtkcairo="no" + +else + GTKCAIRO_CFLAGS=$pkg_cv_GTKCAIRO_CFLAGS + GTKCAIRO_LIBS=$pkg_cv_GTKCAIRO_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + use_gtkcairo=yes +fi + +if test "x$use_gtkcairo" = "xyes"; then + + + +cat >>confdefs.h <<\_ACEOF +#define USE_GTKCAIRO +_ACEOF + +else + { { echo "$as_me:$LINENO: error: GtkCairo not found: get it at http://www.cairographics.org/GtkCairo" >&5 +echo "$as_me: error: GtkCairo not found: get it at http://www.cairographics.org/GtkCairo" >&2;} + { (exit 1); exit 1; }; } +fi + +gveejay_datadir="${datadir}/gveejay" + +sh gveejay-paths.sh > gveejay-paths.h + +glib_modules="glib-2.0 >= 2.4" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GLIB" >&5 +echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$glib_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$glib_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "$glib_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$glib_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$glib_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "$glib_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$glib_modules"` + else + GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$glib_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($glib_modules) were not met: + +$GLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($glib_modules) were not met: + +$GLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLIB_CFLAGS +and GLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS + GLIB_LIBS=$pkg_cv_GLIB_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + +gtk_modules="gtk+-2.0 >= 2.4" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GTK" >&5 +echo $ECHO_N "checking for GTK... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GTK_CFLAGS"; then + pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$gtk_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$gtk_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GTK_LIBS"; then + pkg_cv_GTK_LIBS="$GTK_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$gtk_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$gtk_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$gtk_modules"` + else + GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$gtk_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($gtk_modules) were not met: + +$GTK_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($gtk_modules) were not met: + +$GTK_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GTK_CFLAGS +and GTK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GTK_CFLAGS=$pkg_cv_GTK_CFLAGS + GTK_LIBS=$pkg_cv_GTK_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + +libglade_modules="libglade-2.0 >= 2.0.1" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GLADE" >&5 +echo $ECHO_N "checking for GLADE... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GLADE_CFLAGS"; then + pkg_cv_GLADE_CFLAGS="$GLADE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$libglade_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$libglade_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLADE_CFLAGS=`$PKG_CONFIG --cflags "$libglade_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GLADE_LIBS"; then + pkg_cv_GLADE_LIBS="$GLADE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$libglade_modules\"") >&5 + ($PKG_CONFIG --exists --print-errors "$libglade_modules") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLADE_LIBS=`$PKG_CONFIG --libs "$libglade_modules" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + GLADE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$libglade_modules"` + else + GLADE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$libglade_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLADE_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($libglade_modules) were not met: + +$GLADE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($libglade_modules) were not met: + +$GLADE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLADE_CFLAGS +and GLADE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GLADE_CFLAGS=$pkg_cv_GLADE_CFLAGS + GLADE_LIBS=$pkg_cv_GLADE_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + + +ac_config_files="$ac_config_files Makefile src/Makefile gveejay-paths.sh" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X_TRUE}" && test -z "${HAVE_X_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_MMX_TRUE}" && test -z "${HAVE_ASM_MMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X86CPU_TRUE}" && test -z "${HAVE_X86CPU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X86CPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X86CPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_PPCCPU_TRUE}" && test -z "${HAVE_PPCCPU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_PPCCPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_PPCCPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_PPC_TRUE}" && test -z "${ARCH_PPC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_X86_TRUE}" && test -z "${ARCH_X86_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ALTIVEC_TRUE}" && test -z "${HAVE_ALTIVEC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_MMX2_TRUE}" && test -z "${HAVE_ASM_MMX2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_SSE_TRUE}" && test -z "${HAVE_ASM_SSE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_SSE2_TRUE}" && test -z "${HAVE_ASM_SSE2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_NASM_TRUE}" && test -z "${HAVE_ASM_NASM_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_MMX_TRUE}" && test -z "${HAVE_MMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SSE_TRUE}" && test -z "${HAVE_SSE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SSE2_TRUE}" && test -z "${HAVE_SSE2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_MMX2_TRUE}" && test -z "${HAVE_MMX2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_DL_DLOPEN_TRUE}" && test -z "${HAVE_DL_DLOPEN_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_DL_DLOPEN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_DL_DLOPEN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_GVEEJAYRELOADED_TRUE}" && test -z "${USE_GVEEJAYRELOADED_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_GVEEJAYRELOADED\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_GVEEJAYRELOADED\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by gveejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +gveejay config.status 1.2 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "gveejay-paths.sh") CONFIG_FILES="$CONFIG_FILES gveejay-paths.sh" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +LT_RELEASE!$LT_RELEASE$ac_delim +LT_CURRENT!$LT_CURRENT$ac_delim +LT_REVISION!$LT_REVISION$ac_delim +LT_AGE!$LT_AGE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +CPP!$CPP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +YACC!$YACC$ac_delim +YFLAGS!$YFLAGS$ac_delim +LEX!$LEX$ac_delim +LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim +LEXLIB!$LEXLIB$ac_delim +CCAS!$CCAS$ac_delim +CCASFLAGS!$CCASFLAGS$ac_delim +CCASDEPMODE!$CCASDEPMODE$ac_delim +am__fastdepCCAS_TRUE!$am__fastdepCCAS_TRUE$ac_delim +am__fastdepCCAS_FALSE!$am__fastdepCCAS_FALSE$ac_delim +LIBGETOPT_LIB!$LIBGETOPT_LIB$ac_delim +LIBM_LIBS!$LIBM_LIBS$ac_delim +PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim +ALSA_LIBS!$ALSA_LIBS$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +VEEJAY_CFLAGS!$VEEJAY_CFLAGS$ac_delim +VEEJAY_LIBS!$VEEJAY_LIBS$ac_delim +VEEJAY_CFLAGS!$VEEJAY_CFLAGS$ac_delim +VEEJAY_LIBS!$VEEJAY_LIBS$ac_delim +MJPEGTOOLS_CFLAGS!$MJPEGTOOLS_CFLAGS$ac_delim +MJPEGTOOLS_LIBS!$MJPEGTOOLS_LIBS$ac_delim +MJPEGTOOLS_CFLAGS!$MJPEGTOOLS_CFLAGS$ac_delim +MJPEGTOOLS_LIBS!$MJPEGTOOLS_LIBS$ac_delim +PIXBUF_CFLAGS!$PIXBUF_CFLAGS$ac_delim +PIXBUF_LIBS!$PIXBUF_LIBS$ac_delim +PIXBUF_CFLAGS!$PIXBUF_CFLAGS$ac_delim +PIXBUF_LIBS!$PIXBUF_LIBS$ac_delim +XMKMF!$XMKMF$ac_delim +X_CFLAGS!$X_CFLAGS$ac_delim +X_PRE_LIBS!$X_PRE_LIBS$ac_delim +X_LIBS!$X_LIBS$ac_delim +X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim +HAVE_X_TRUE!$HAVE_X_TRUE$ac_delim +HAVE_X_FALSE!$HAVE_X_FALSE$ac_delim +DEBUGLIBS!$DEBUGLIBS$ac_delim +OP_CFLAGS!$OP_CFLAGS$ac_delim +YUVCFLAGS!$YUVCFLAGS$ac_delim +PROGRAM_NOPIC!$PROGRAM_NOPIC$ac_delim +ALTIVEC_CFLAGS!$ALTIVEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_CFLAGS!$FFMPEG_AVCODEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_LIBS!$FFMPEG_AVCODEC_LIBS$ac_delim +FFMPEG_AVCODEC_CFLAGS!$FFMPEG_AVCODEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_LIBS!$FFMPEG_AVCODEC_LIBS$ac_delim +FFMPEG_SWSCALER_CFLAGS!$FFMPEG_SWSCALER_CFLAGS$ac_delim +FFMPEG_SWSCALER_LIBS!$FFMPEG_SWSCALER_LIBS$ac_delim +FFMPEG_SWSCALER_CFLAGS!$FFMPEG_SWSCALER_CFLAGS$ac_delim +FFMPEG_SWSCALER_LIBS!$FFMPEG_SWSCALER_LIBS$ac_delim +HAVE_ASM_MMX_TRUE!$HAVE_ASM_MMX_TRUE$ac_delim +HAVE_ASM_MMX_FALSE!$HAVE_ASM_MMX_FALSE$ac_delim +HAVE_X86CPU_TRUE!$HAVE_X86CPU_TRUE$ac_delim +HAVE_X86CPU_FALSE!$HAVE_X86CPU_FALSE$ac_delim +HAVE_PPCCPU_TRUE!$HAVE_PPCCPU_TRUE$ac_delim +HAVE_PPCCPU_FALSE!$HAVE_PPCCPU_FALSE$ac_delim +ARCH_PPC_TRUE!$ARCH_PPC_TRUE$ac_delim +ARCH_PPC_FALSE!$ARCH_PPC_FALSE$ac_delim +ARCH_X86_TRUE!$ARCH_X86_TRUE$ac_delim +ARCH_X86_FALSE!$ARCH_X86_FALSE$ac_delim +HAVE_ALTIVEC_TRUE!$HAVE_ALTIVEC_TRUE$ac_delim +HAVE_ALTIVEC_FALSE!$HAVE_ALTIVEC_FALSE$ac_delim +HAVE_ASM_MMX2_TRUE!$HAVE_ASM_MMX2_TRUE$ac_delim +HAVE_ASM_MMX2_FALSE!$HAVE_ASM_MMX2_FALSE$ac_delim +HAVE_ASM_SSE_TRUE!$HAVE_ASM_SSE_TRUE$ac_delim +HAVE_ASM_SSE_FALSE!$HAVE_ASM_SSE_FALSE$ac_delim +HAVE_ASM_SSE2_TRUE!$HAVE_ASM_SSE2_TRUE$ac_delim +HAVE_ASM_SSE2_FALSE!$HAVE_ASM_SSE2_FALSE$ac_delim +HAVE_ASM_NASM_TRUE!$HAVE_ASM_NASM_TRUE$ac_delim +HAVE_ASM_NASM_FALSE!$HAVE_ASM_NASM_FALSE$ac_delim +HAVE_MMX_TRUE!$HAVE_MMX_TRUE$ac_delim +HAVE_MMX_FALSE!$HAVE_MMX_FALSE$ac_delim +HAVE_SSE_TRUE!$HAVE_SSE_TRUE$ac_delim +HAVE_SSE_FALSE!$HAVE_SSE_FALSE$ac_delim +HAVE_SSE2_TRUE!$HAVE_SSE2_TRUE$ac_delim +HAVE_SSE2_FALSE!$HAVE_SSE2_FALSE$ac_delim +HAVE_MMX2_TRUE!$HAVE_MMX2_TRUE$ac_delim +HAVE_MMX2_FALSE!$HAVE_MMX2_FALSE$ac_delim +HAVE_DL_DLOPEN_TRUE!$HAVE_DL_DLOPEN_TRUE$ac_delim +HAVE_DL_DLOPEN_FALSE!$HAVE_DL_DLOPEN_FALSE$ac_delim +USE_GVEEJAYRELOADED_TRUE!$USE_GVEEJAYRELOADED_TRUE$ac_delim +USE_GVEEJAYRELOADED_FALSE!$USE_GVEEJAYRELOADED_FALSE$ac_delim +GTKCAIRO_CFLAGS!$GTKCAIRO_CFLAGS$ac_delim +GTKCAIRO_LIBS!$GTKCAIRO_LIBS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +GTKCAIRO_CFLAGS!$GTKCAIRO_CFLAGS$ac_delim +GTKCAIRO_LIBS!$GTKCAIRO_LIBS$ac_delim +gveejay_datadir!$gveejay_datadir$ac_delim +GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim +GLIB_LIBS!$GLIB_LIBS$ac_delim +GTK_CFLAGS!$GTK_CFLAGS$ac_delim +GTK_LIBS!$GTK_LIBS$ac_delim +GLADE_CFLAGS!$GLADE_CFLAGS$ac_delim +GLADE_LIBS!$GLADE_LIBS$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 11; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + +cat >>confdefs.h <<\_ACEOF +#define VERSION ${VERSION} +_ACEOF + + +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: GVeejayReloaded ${VERSION} build configuration :" >&5 +echo "$as_me: GVeejayReloaded ${VERSION} build configuration :" >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Compiler flags: $CFLAGS" >&5 +echo "$as_me: Compiler flags: $CFLAGS" >&6;} +{ echo "$as_me:$LINENO: $YUVCFLAGS" >&5 +echo "$as_me: $YUVCFLAGS" >&6;} +{ echo "$as_me:$LINENO: $OP_CFLAGS" >&5 +echo "$as_me: $OP_CFLAGS" >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Architecture: ${host_cpu} " >&5 +echo "$as_me: Architecture: ${host_cpu} " >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +if test "$have_x86cpu" = "true" ; then +{ echo "$as_me:$LINENO: x86 " >&5 +echo "$as_me: x86 " >&6;} +{ echo "$as_me:$LINENO: MMX enabled : ${ac_cv_flag_mmx}" >&5 +echo "$as_me: MMX enabled : ${ac_cv_flag_mmx}" >&6;} +{ echo "$as_me:$LINENO: MMX2 enabled : ${ac_cv_flag_mmx2}" >&5 +echo "$as_me: MMX2 enabled : ${ac_cv_flag_mmx2}" >&6;} +{ echo "$as_me:$LINENO: SSE enabled : ${ac_cv_flag_sse}" >&5 +echo "$as_me: SSE enabled : ${ac_cv_flag_sse}" >&6;} +{ echo "$as_me:$LINENO: SSE2 enabled : ${ac_cv_flag_sse2}" >&5 +echo "$as_me: SSE2 enabled : ${ac_cv_flag_sse2}" >&6;} +{ echo "$as_me:$LINENO: 3DNOW enabled : ${ac_cv_flag_3dnow}" >&5 +echo "$as_me: 3DNOW enabled : ${ac_cv_flag_3dnow}" >&6;} +{ echo "$as_me:$LINENO: CMOV enabled : ${ac_cv_flag_cmov}" >&5 +echo "$as_me: CMOV enabled : ${ac_cv_flag_cmov}" >&6;} +fi + +if test "$have_ppccpu" = "true" ; then +{ echo "$as_me:$LINENO: ppc" >&5 +echo "$as_me: ppc" >&6;} +{ echo "$as_me:$LINENO: AltiVec enabled : ${have_altivec}" >&5 +echo "$as_me: AltiVec enabled : ${have_altivec}" >&6;} +fi + +if test "$have_mips" = "true" ; then +{ echo "$as_me:$LINENO: mips" >&5 +echo "$as_me: mips" >&6;} +{ echo "$as_me:$LINENO: PS/2 enabled : ${have_ps2}" >&5 +echo "$as_me: PS/2 enabled : ${have_ps2}" >&6;} +fi +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +if test "$have_linux" = "true" ; then +{ echo "$as_me:$LINENO: Platform: Linux" >&5 +echo "$as_me: Platform: Linux" >&6;} +fi + +if test "$have_darwin" = "true" ; then +{ echo "$as_me:$LINENO: Platform: Darwin" >&5 +echo "$as_me: Platform: Darwin" >&6;} +{ echo "$as_me:$LINENO: Good luck! You can be the first! " >&5 +echo "$as_me: Good luck! You can be the first! " >&6;} +fi +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Required dependencies:" >&5 +echo "$as_me: Required dependencies:" >&6;} +{ echo "$as_me:$LINENO: - Veejay 1.0 : ${have_veejay}" >&5 +echo "$as_me: - Veejay 1.0 : ${have_veejay}" >&6;} +{ echo "$as_me:$LINENO: - POSIX Threads (pthread) : ${have_pthread}" >&5 +echo "$as_me: - POSIX Threads (pthread) : ${have_pthread}" >&6;} +{ echo "$as_me:$LINENO: - MJPEGTools : ${have_mjpegtools}" >&5 +echo "$as_me: - MJPEGTools : ${have_mjpegtools}" >&6;} +{ echo "$as_me:$LINENO: - FFmpeg AVCodec : ${have_avcodec} " >&5 +echo "$as_me: - FFmpeg AVCodec : ${have_avcodec} " >&6;} +{ echo "$as_me:$LINENO: - FFmpeg Swscaler : ${have_swscaler} " >&5 +echo "$as_me: - FFmpeg Swscaler : ${have_swscaler} " >&6;} +{ echo "$as_me:$LINENO: - GDK Pixbuf support : ${have_pixbuf}" >&5 +echo "$as_me: - GDK Pixbuf support : ${have_pixbuf}" >&6;} +{ echo "$as_me:$LINENO: - Alsa support (midi sequencer) : ${have_alsa}" >&5 +echo "$as_me: - Alsa support (midi sequencer) : ${have_alsa}" >&6;} diff --git a/veejay-client/configure.ac b/veejay-client/configure.ac new file mode 100644 index 00000000..5e34979a --- /dev/null +++ b/veejay-client/configure.ac @@ -0,0 +1,746 @@ +dnl Process this file with autoconf to produce a configure script. +dnl AC_INIT +AC_INIT([gveejay],[1.2],[veejay-users@lists.sourceforge.net]) +AC_PREREQ(2.57) +AC_CONFIG_SRCDIR([src/gveejay.c]) + +VEEJAY_MAJOR_VERSION=1 +VEEJAY_MINOR_VERSION=2 +VEEJAY_MICRO_VERSION=0 +VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION +VEEJAY_CODENAME="Reloaded - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" +AC_CONFIG_HEADERS([config.h]) + +AC_CANONICAL_HOST +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE([1.7]) +AM_MAINTAINER_MODE +AM_INIT_AUTOMAKE([dist-bzip2]) + +AC_DEFINE(HAVE_CONFIG_H,1,[Include config.h]) +# libtool versioning +LT_RELEASE=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION +LT_CURRENT=$VEEJAY_MICRO_VERSION +LT_REVISION=$VEEJAY_MICRO_VERSION +LT_AGE=$VEEJAY_MICRO_VERSION +AC_SUBST(LT_RELEASE) +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) + +dnl kill CFLAGS +CFLAGS="" +AC_ARG_ENABLE(strict, + AC_HELP_STRING([--enable-strict], + [Compile in paranoia assertion checking])) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], + [Compile in debugging information])) +AC_ARG_ENABLE(profile, + AC_HELP_STRING([--enable-profiling], + [Compile in profiling information])) +AC_ARG_ENABLE(compile-warnings, + AC_HELP_STRING([--enable-compile-warnings], + [Turn on compiler warnings.])) +AC_ARG_ENABLE(warnings_as_errors, + AC_HELP_STRING([--enable-warnings_as_errors], + [Compiler warnings are errors.])) +AC_ARG_ENABLE(simd-accel, + AC_HELP_STRING([--enable-simd-accel], + [use SIMD multimedia instructions such as MMX, AltiVec, etc.if possible])) +AC_ARG_WITH(extra-cflags, + AC_HELP_STRING([--with-extra-cflags=flags], + [Options to be added to CFLAGS (optional)])) +AC_ARG_WITH(pixbuf, + AC_HELP_STRING([--without-pixbuf], [Do not use GDK pixbuf]), + [], [with_pixbuf=yes]) + +AC_GNU_SOURCE + +dnl Initialize libtool +AC_PROG_LIBTOOL + +dnl Checks for programs. +AC_PROG_AWK +AC_PROG_CC +AM_PROG_CC_STDC +AC_PROG_YACC +AM_PROG_LEX +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_LN_S +AC_C_BIGENDIAN +AC_C_CONST +AC_C_INLINE +AC_SYS_LARGEFILE + +dnl configure AS and ASFLAGS... +AM_PROG_AS + +AC_CHECK_HEADERS([fenv.h stdint.h inttypes.h sys/types.h alloca.h]) + +dnl AX_PREFIXED_DEFINE([VEEJAY], [HAVE_STDINT_H]) +dnl AX_PREFIXED_DEFINE([VEEJAY], [HAVE_INTTYPES_H]) + +AC_CHECK_FUNCS([posix_memalign memalign fmax lround pow bzero gettimeofday memset mmap strndup strstr strncasecmp]) +AC_CHECK_FUNCS([sched_get_priority_max]) +AC_CHECK_FUNCS([select socket getpagesize memcpy]) + +AC_CHECK_FUNC(getopt_long, + [AC_DEFINE(HAVE_GETOPT_LONG, 1, [long getopt support])], + [ # FreeBSD and BSD/OS have a gnugetopt library for this: + AC_CHECK_LIB([gnugetopt], [getopt_long], + [AC_DEFINE(HAVE_GETOPT_LONG, 1, + [long getopt support]) + LIBGETOPT_LIB="-lgnugetopt"]) + ]) + +AC_CHECK_SIZEOF([int]) +AC_CHECK_SIZEOF([long int]) +AC_CHECK_SIZEOF([size_t]) +AC_CHECK_SIZEOF([float]) + + + +AC_SUBST(LIBGETOPT_LIB) + +AC_TYPE_SIGNAL + +AC_MSG_NOTICE([The host is $host $host_cpu $host_vendor $host_os .]) + +use_gveejayreloaded=true +case $host in + *-*-linux*) + AC_CHECK_HEADER(linux/version.h, + [have_linux=true + AC_DEFINE(HAVE_LINUX,,[Linux platform]) + ], + [AC_MSG_ERROR([version.h not found - please install the linux kernel headers]) + ]) + LIBM_LIBS="-lm" + ;; + *-apple-darwin*) + AC_DEFINE(HAVE_DARWIN,,[MAC OS X Darin]) + dnl OS-X/Darwin needs no-cpp-precomp + CFLAGS="$CFLAGS -no-cpp-precomp" + have_darwin=true + LIBM_LIBS="" + ;; + *) + AC_MSG_WARN([Alien platform - Good Luck!]) + LIBM_LIBS="" + ;; +esac + + +dnl ====== check for PKG_CONFIG_PATH +if test x"$PKG_CONFIG_PATH" = x ; then + AC_MSG_NOTICE([The PKG_CONFIG_PATH variable was not set]) + AC_MSG_NOTICE([You should set it to the directories that contain the .pc files]) + AC_MSG_ERROR([Abort]) +fi + + +AC_SUBST(LIBM_LIBS) + +dnl ********************************************************************* +dnl Check for the pthread lib +dnl +AC_SUBST(PTHREAD_LIBS) +have_pthread=false +AC_CHECK_LIB(pthread, pthread_create, + [ PTHREAD_LIBS="-lpthread" + AC_DEFINE(HAVE_LIBPTHREAD,,[Compiling with pthread library]) + have_pthread=true ],,) + +AC_CHECK_FUNC(pthread_attr_getstacksize, + [ + AC_DEFINE(HAVE_PTHREADSTACKSIZE,,[Using pthread stack size]) + ] ) + + +have_alsa=false +AC_CHECK_LIB( asound, snd_seq_open, + [ + AC_DEFINE( HAVE_ALSA,1, [Whether or not we have alsa]) + ALSA_LIBS="-lasound" + AC_SUBST( ALSA_LIBS ) + have_alsa=true ],,) + +AC_CHECK_HEADER(alsa/asoundlib.h,,[AC_MSG_ERROR([alsa/asoundlib.h not found - please install the alsa header])] ) + +have_dl_dlopen=false +AC_CHECK_LIB(dl,dlopen) +if test "$ac_cv_lib_dl_dlopen" = "yes"; then + AC_DEFINE(HAVE_DL_DLOPEN,,[Compile with dlopen support]) + have_dl_dlopen=true +fi + +dnl Check for Veejay +have_veejay=false +PKG_CHECK_MODULES( VEEJAY, [veejay >= 1.0 ], + [ + AC_SUBST( VEEJAY_CFLAGS ) + AC_SUBST( VEEJAY_LIBS ) + have_veejay=true + AC_DEFINE(HAVE_VEEJAY,1, [Veejay installed])] + , + [have_veejay=false]) + +if test x$have_veejay != xtrue ; then + AC_MSG_ERROR([Cannot find Veejay.]) +fi + +dnl ********************************************************************* +dnl Check for mjpegtools +dnl (creates MJPEGYTOOLS_CFLAGS, +dnl ********************************************************************* +have_mjpegtools=false +PKG_CHECK_MODULES(MJPEGTOOLS, [mjpegtools >= 1.6 ], + [ + AC_SUBST( MJPEGTOOLS_CFLAGS ) + AC_SUBST( MJPEGTOOLS_LIBS ) + have_mjpegtools=true + AC_DEFINE(HAVE_MJPEGTOOLS, 1, [MJPEGTools installed])], + [have_mjpegtools=false]) + +if test x$have_mjpegtools != xtrue ; then + AC_MSG_ERROR([Cannot find mjpegtools. Did you set PKG_CONFIG_PATH variable?]) +fi + +have_pixbuf=false +if test x$with_pixbuf != xno ; then + PKG_CHECK_MODULES(PIXBUF, [gtk+-2.0 >= 2.0 gdk-pixbuf-2.0], + [ + AC_SUBST( PIXBUF_CFLAGS ) + AC_SUBST( PIXBUF_LIBS ) + have_pixbuf=true + AC_DEFINE(USE_GDK_PIXBUF, 1, [use gdk image load / save])], + [have_pixbuf=false]) +fi + +dnl ******************************************************************** +dnl Check to see if __progname is provided by the system +dnl ******************************************************************** +AC_CACHE_CHECK([for __progname], + [mjt_cv_extern___progname], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + [[extern char *__progname; + puts(__progname);]])], + [mjt_cv_extern___progname=yes], + [mjt_cv_extern___progname=no])]) +if test x$mjt_cv_extern___progname = xyes ; then + AC_DEFINE(HAVE___PROGNAME, 1, [Is __progname defined by system?]) +fi + +dnl Look for X +AC_PATH_XTRA +AM_CONDITIONAL(HAVE_X, test x$have_x = xyes) + +AC_MSG_CHECKING(whether to compile in profiling information) +if test "x$enable_profiling" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -fprofile-arcs -ftest-coverage" + DEBUGLIBS="-lgcov" + AC_SUBST( DEBUGLIBS ) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AC_MSG_CHECKING(whether to compile in assertion checking) +if test "x$enable_strict" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -g -DSTRICT_CHECKING" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +have_asm_nasm=false +have_asm_mmx=false +have_asm_sse=false +have_asm_sse2=false +have_asm_mmx2=false +have_asm_3dnow=false +have_cmov=false +have_x86cpu=false +have_x86_64cpu=false +have_altivec=false +have_mips=false +have_ppccpu=false +have_ps2=false + +OP_CFLAGS="" +YUVCFLAGS="-fif-conversion" + +AC_MSG_CHECKING([Architecture]) +case $host_cpu in + i[[3-7]]86) + AC_DEFINE(HAVE_X86CPU,, [Compiling for x86 architecture CPU]) + AC_DEFINE(ARCH_X86,1,[Compiling for x86 architecture]) + have_x86cpu=true + + PROGRAM_NOPIC="-fno-PIC" + + if test "x$enable_debug" != "xyes" ; then + OP_CFLAGS="-O3" + fi + + AC_SUBST( OP_CFLAGS ) + AC_SUBST( YUVCFLAGS ) + + dnl If the host is pentium, align on double word boundary + case $host_cpu in + i686) + CFLAGS="$CFLAGS" + ;; + *) + ;; + esac + + ;; + x86_64*|k8-*) + AC_DEFINE(HAVE_X86_CPU,, [Compiling for x86-64 architecture CPU]) + AC_DEFINE(ARCH_X86_64,1, [Compiling for x86-64 architecture CPU]) + have_x86cpu=true + have_x86_64cpu=true + CFLAGS="$CFLAGS -fPIC -DPIC" + ;; + powerpc | powerpc64) + AC_DEFINE(HAVE_PPCCPU,, [Compiling for PowerPC CPU]) + AC_DEFINE(ARCH_PPC,,[Compiling for PowerPC]) + have_ppccpu=true + + case $host in + *-apple-darwin*) + PROGRAM_NOPIC="-mdynamic-no-pic" # dynamic-no-pic is an Apple gcc option +dnl CFLAGS="$CFLAGS -no-cpp-precomp" + + ;; + *) + PROGRAM_NOPIC="" + ;; + esac + ;; + mips | mipsel) + AC_DEFINE(ARCH_MIPS,,[Compiling for MIPS CPU]) + AC_DEFINE(HAVE_MIPS,,[Compiling for MIPS CPU]) + have_mips=true + AC_MSG_CHECKING([if we are compiling on playstation2 hardware]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], + [[#include + #include + ]])], + [have_ps2=true], + [have_ps2=false]) + + if test x$have_ps2 = xtrue ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PS2,,[Compile for playstation2]) + else + AC_MSG_RESULT(no) + fi + + ;; + *) + AC_MSG_RESULT([unknown]) + ;; +esac + +dnl This flag is used for PROGRAMS not SHARED LIBRARIES. PIC code is required +dnl for shared libraries but is slower than non-pic code. Compute bound +dnl programs such as yuvdenoise and y4mspatialfilter can use this flag by +dnl simply adding programname_CFLAGS=@PROGRAM_NOPIC@ to the Makefile.am + +AC_SUBST(PROGRAM_NOPIC) + +if test x$have_x86cpu = xtrue +then + AC_CACHE_CHECK(for MMX on processor(s), ac_cv_flag_mmx, [ + if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx=yes + else + ac_cv_flag_mmx=no + fi + ]) + + if test $ac_cv_flag_mmx = yes; then + AC_DEFINE(HAVE_ASM_MMX,,[Compiling in MMX support]) + AC_DEFINE(HAVE_MMX,,[Compiling in MMX support]) + have_asm_mmx=true + fi + + AC_CACHE_CHECK(for SSE on processor(s), ac_cv_flag_sse, [ + if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse=yes + else + ac_cv_flag_sse=no + fi + ]) + + if test $ac_cv_flag_sse = yes; then + AC_DEFINE(HAVE_ASM_SSE,,[Compiling in SSE support]) + AC_DEFINE(HAVE_SSE,,[Compiling in SSE support]) + have_asm_sse=true + fi + + + dnl check for sse2 + AC_CACHE_CHECK(for SSE2 on processor(s), ac_cv_flag_sse2, [ + if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse2=yes + else + ac_cv_flag_sse2=no + fi + ]) + + if test $ac_cv_flag_sse2 = yes; then + AC_DEFINE(HAVE_ASM_SSE2,,[Compiling in SSE2 support]) + AC_DEFINE(HAVE_SSE2,,[Compiling in SSE2 support]) + have_asm_sse2=true + fi + + AC_CACHE_CHECK(for 3DNOW on processor(s), ac_cv_flag_3dnow, [ + if grep "^flags.* 3dnow" /proc/cpuinfo > /dev/null; then + ac_cv_flag_3dnow=yes + else + ac_cv_flag_3dnow=no + fi + ]) + + if test $ac_cv_flag_3dnow = yes; then + AC_DEFINE(HAVE_ASM_3DNOW,,[Compiling in 3Dnow]) + have_asm_3dnow=true + fi + + AC_CACHE_CHECK(for CMOV on processor(s), ac_cv_flag_cmov, [ + if grep "^flags.* cmov" /proc/cpuinfo > /dev/null; then + ac_cv_flag_cmov=yes + else + ac_cv_flag_cmov=yes + fi + ]) + + if test $ac_cv_flag_cmov = yes; then + AC_DEFINE(HAVE_CMOV,,[Compiling in CMOV]) + have_cmov=true + fi + + + dnl check for MMX2 + AC_CACHE_CHECK(for MMX2 on processor(s), ac_cv_flag_mmx2, [ + if grep "^flags.* mmxext" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx2=yes + else + ac_cv_flag_mmx2=yes + fi + ]) + + if test $ac_cv_flag_mmx2 = yes; then + AC_DEFINE(HAVE_ASM_MMX2,,[Compiling in MMX2]) + AC_DEFINE(HAVE_MMX2,,[Compiling in MMX2]) + AC_DEFINE(HAVE_ASM_MMXEXT,,[Compiling in MMXEXT]) + have_asm_mmx2=true + fi + +fi + +if test x$have_ppccpu = xtrue +then + AC_MSG_CHECKING([compiler support for AltiVec]) + cat > conftest.c < +#endif +int main() { + union { vector signed int v; + signed int i; + } vi; + vi.v = vec_splat_s32(1); + return vi.i; +} +EOF + ALTIVEC_CFLAGS="" + if $CC -o conftest conftest.c >/dev/null 2>&1; then + have_altivec=true + elif $CC $CFLAGS -faltivec -o conftest conftest.c >/dev/null 2>&1; then + # Mac OS X style + have_altivec=true + ALTIVEC_CFLAGS="-faltivec" + elif $CC $CFLAGS -fvec -o conftest conftest.c >/dev/null 2>&1; then + # Motorola style + have_altivec=true + ALTIVEC_CFLAGS="-fvec" + elif $CC $CFLAGS -DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec -o conftest conftest.c >/dev/null 2>&1; then + # gcc 3.1 style + have_altivec=true + ALTIVEC_CFLAGS="-DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec" + fi + rm -f conftest*; + + if test x$have_altivec = xtrue + then + # add -O3 flag + ALTIVEC_CFLAGS="-O3 ${ALTIVEC_CFLAGS}" + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ALTIVEC,, + [Inline PPC Altivec primitives available]) + AC_SUBST(ALTIVEC_CFLAGS) + else + AC_MSG_RESULT(no) + fi + + +fi + +if test ! -r $srcdir/cpuinfo.sh; then + AC_MSG_ERROR([cpuinfo.sh script not found - do a cvs update]) +fi + + +if test x$have_x86cpu = xtrue -o x$have_ppccpu = xtrue; then + if test x$host_alias != x; then + dnl Cross compiling + AC_MSG_CHECKING(sub-architecture settings) + if test x$have_x86cpu = xtrue; then + host_mod_cpu=`echo $host_cpu|tr _ -` + ARCHFLAGS="-march=$host_mod_cpu -mcpu=$host_mod_cpu" + AC_MSG_RESULT($ARCHFLAGS) + fi + else + AC_MSG_CHECKING(sub-architecture settings) + chmod +x $srcdir/cpuinfo.sh + + if test x$have_x86cpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh x86` + fi + if test x$have_ppccpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh ppc` + fi + AC_MSG_RESULT($ARCHFLAGS) + fi +fi + + +if test x$have_x86cpu = xtrue; +then + AC_MSG_NOTICE([enable_debug = $enable_debug]) + if test "x$enable_debug" != "xyes" ; + then + AC_MSG_NOTICE([debug koekje]) + if test $ac_cv_flag_sse = yes; then + CFLAGS="$CFLAGS -msse -mfpmath=sse" + AC_MSG_NOTICE([cflags aangepast]) + fi + if test $av_cv_flag_sse2 = yes; then + CFLAGS="$CFLAGS -msse2 -mfpmath=sse" + AC_MSG_NOTICE([cflags aangepast]) + fi + fi +fi + +AC_MSG_RESULT($CFLAGS) + + +AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED,, + [Defined if building against uninstalled FFmpeg source]) + +PKG_CHECK_MODULES(FFMPEG_AVCODEC, [libavcodec], + [ + AC_SUBST( FFMPEG_AVCODEC_CFLAGS ) + AC_SUBST( FFMPEG_AVCODEC_LIBS ) + have_avcodec=true + AC_DEFINE(HAVE_AVCODEC, 1, [use avcodec])], + [have_avcodec=false]) + +PKG_CHECK_MODULES(FFMPEG_SWSCALER, [libswscale], + [ + AC_SUBST( FFMPEG_SWSCALER_CFLAGS ) + AC_SUBST( FFMPEG_SWSCALER_LIBS ) + have_swscaler=true + AC_DEFINE( HAVE_SWSCALER,1,[use swscaler])], + [ have_swscaler=false] ) + + + +if test x$have_avcodec != xtrue ; then + AC_MSG_ERROR([ FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net ] ) +fi + +if test x$have_swscaler != xtrue ; then + AC_MSG_ERROR([ FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? ]) +fi + +FFMPEG_INCLUDE_AVCODEC="" +FFMPEG_INCLUDE_SWSCALE="" +FFMPEG_INCLUDE_AVUTIL="" + +AC_CHECK_HEADER( ffmpeg/avutil.h, [FFMPEG_INCLUDE_AVUTIL=""],[]) +AC_CHECK_HEADER( ffmpeg/avcodec.h, [FFMPEG_INCLUDE_AVCODEC=""],[]) +AC_CHECK_HEADER( ffmpeg/swscale.h, [FFMPEG_INCLUDE_SWSCALE=""],[]) +AC_CHECK_HEADER( libswscale/swscale.h, [FFMPEG_INCLUDE_SWSCALE=""],[]) +AC_CHECK_HEADER( libavcodec/avcodec.h, [FFMPEG_INCLUDE_AVCODEC=""],[]) +AC_CHECK_HEADER( libavutil/avutil.h , [FFMPEG_INCLUDE_AVUTIL=""],[]) + +AC_DEFINE_UNQUOTED( AVCODEC_INC, $FFMPEG_INCLUDE_AVCODEC,[] ) +AC_DEFINE_UNQUOTED( SWSCALE_INC, $FFMPEG_INCLUDE_SWSCALE,[] ) +AC_DEFINE_UNQUOTED( AVUTIL_INC, $FFMPEG_INCLUDE_AVUTIL,[] ) + + +dnl ********************************************************************** +dnl All the conditional stuff for the Makefiles +AM_CONDITIONAL(HAVE_ASM_MMX, test x$have_asm_mmx = xtrue) +AM_CONDITIONAL(HAVE_X86CPU, test x$have_x86cpu = xtrue) +AM_CONDITIONAL(HAVE_PPCCPU, test x$have_ppccpu = xtrue) +AM_CONDITIONAL(ARCH_PPC, test x$have_ppccpu = xtrue) +AM_CONDITIONAL(ARCH_X86, test x$have_x86cpu = xtrue) +AM_CONDITIONAL(HAVE_ALTIVEC, test x$have_altivec = xtrue) +AM_CONDITIONAL(HAVE_ASM_MMX2, test x$have_asm_mmx2 = xtrue) +AM_CONDITIONAL(HAVE_ASM_SSE, test x$have_asm_sse = xtrue) +AM_CONDITIONAL(HAVE_ASM_SSE2, test x$have_asm_sse2 = xtrue) +AM_CONDITIONAL(HAVE_ASM_NASM, test x$have_asm_nasm = xtrue) +AM_CONDITIONAL(HAVE_MMX, test x$have_asm_mmx = xtrue) +AM_CONDITIONAL(HAVE_SSE, test x$have_asm_sse = xtrue) +AM_CONDITIONAL(HAVE_SSE2, test x$have_asm_sse2 = xtrue) +AM_CONDITIONAL(HAVE_MMX2, test x$have_asm_mmx2 = xtrue) +AM_CONDITIONAL(HAVE_DL_DLOPEN, test x$have_dl_dlopen = xtrue) +AM_CONDITIONAL(USE_GVEEJAYRELOADED,test x$use_gveejayreloaded = xtrue ) +dnl ********************************************************************* +dnl Check for what warnings we want gcc to use and adjust the CFLAGS +dnl as needed. This only works for GCC. +dnl We do this last as it can screw up library detection etc... + +CFLAGS="$ARCHFLAGS $CFLAGS" +CXXFLAGS="$ARCHFLAGS $CXXFLAGS" + + +if test "x${GCC}" != "xyes" ; then + enable_compile_warnings=no +fi + +AC_MSG_CHECKING(what warning flags to pass to the C compiler) +warnCFLAGS= +warnCXXFLAGS= +if test "x$enable_compile_warnings" != "xno" ; then + if test "x$GCC" = "xyes" ; then + case "$CFLAGS" in + *-Wall*) ;; + *) warnCFLAGS="-Wall -Wunused " ;; + esac + if test "x$enable_compile_warnings" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wundef -Wshadow -Wbad-function-cast -Wconversion -Wpadded -Wunreachable-code -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + fi + if test "x$enable_warnings_as_errors" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Werror" + warnCXXFLAGS="$warnCXXFLAGS -Werror" + fi + fi +fi + +if test "x$cflags_set" != "xyes" ; then + if test "x$enable_debug" = "xyes" ; then + CFLAGS="$debugCFLAGS $warnCFLAGS $CFLAGS" + else + CFLAGS="$CFLAGS $warnCFLAGS" + fi + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS" + cflags_set=yes +fi + + +if test x"$with_extra_cflags" != "x"; then + CFLAGS="$CFLAGS $with_extra_cflags" + CXXFLAGS="$CXXFLAGS $with_extra_cflags" +fi + + +PKG_CHECK_MODULES( GTKCAIRO, gtkcairo >= 0.3, + [use_gtkcairo=yes], + [use_gtkcairo="no"] +) + +if test "x$use_gtkcairo" = "xyes"; then + AC_SUBST( GTKCAIRO_CFLAGS ) + AC_SUBST( GTKCAIRO_LIBS ) + AC_DEFINE( USE_GTKCAIRO,,[GtkCairo widget - Cairo]) +else + AC_MSG_ERROR([GtkCairo not found: get it at http://www.cairographics.org/GtkCairo]) +fi + +gveejay_datadir="${datadir}/gveejay" +AC_SUBST(gveejay_datadir) +sh gveejay-paths.sh > gveejay-paths.h + +glib_modules="glib-2.0 >= 2.4" +PKG_CHECK_MODULES(GLIB, [$glib_modules]) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) + +gtk_modules="gtk+-2.0 >= 2.4" +PKG_CHECK_MODULES(GTK, [$gtk_modules]) +AC_SUBST(GTK_CFLAGS) +AC_SUBST(GTK_LIBS) + +libglade_modules="libglade-2.0 >= 2.0.1" +PKG_CHECK_MODULES(GLADE, [$libglade_modules]) +AC_SUBST(GLADE_CFLAGS) +AC_SUBST(GLADE_LIBS) + + +dnl ********************************************************************** +dnl Output a Makefile or two and the lib/header descriptor script +dnl +AC_CONFIG_FILES([ +Makefile +src/Makefile +gveejay-paths.sh +]) +AC_OUTPUT + +AC_DEFINE(VERSION, ${VERSION}) + +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ GVeejayReloaded ${VERSION} build configuration :]) +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Compiler flags: $CFLAGS]) +AC_MSG_NOTICE([ $YUVCFLAGS]) +AC_MSG_NOTICE([ $OP_CFLAGS]) +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Architecture: ${host_cpu} ]) +AC_MSG_NOTICE([]) +if test "$have_x86cpu" = "true" ; then +AC_MSG_NOTICE([ x86 ]) +AC_MSG_NOTICE([ MMX enabled : ${ac_cv_flag_mmx}]) +AC_MSG_NOTICE([ MMX2 enabled : ${ac_cv_flag_mmx2}]) +AC_MSG_NOTICE([ SSE enabled : ${ac_cv_flag_sse}]) +AC_MSG_NOTICE([ SSE2 enabled : ${ac_cv_flag_sse2}]) +AC_MSG_NOTICE([ 3DNOW enabled : ${ac_cv_flag_3dnow}]) +AC_MSG_NOTICE([ CMOV enabled : ${ac_cv_flag_cmov}]) +fi + +if test "$have_ppccpu" = "true" ; then +AC_MSG_NOTICE([ ppc]) +AC_MSG_NOTICE([ AltiVec enabled : ${have_altivec}]) +fi + +if test "$have_mips" = "true" ; then +AC_MSG_NOTICE([ mips]) +AC_MSG_NOTICE([ PS/2 enabled : ${have_ps2}]) +fi +AC_MSG_NOTICE([]) +if test "$have_linux" = "true" ; then +AC_MSG_NOTICE([ Platform: Linux]) +fi + +if test "$have_darwin" = "true" ; then +AC_MSG_NOTICE([ Platform: Darwin]) +AC_MSG_NOTICE([ Good luck! You can be the first! ]) +fi +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Required dependencies:]) +AC_MSG_NOTICE([ - Veejay 1.0 : ${have_veejay}]) +AC_MSG_NOTICE([ - POSIX Threads (pthread) : ${have_pthread}]) +AC_MSG_NOTICE([ - MJPEGTools : ${have_mjpegtools}]) +AC_MSG_NOTICE([ - FFmpeg AVCodec : ${have_avcodec} ]) +AC_MSG_NOTICE([ - FFmpeg Swscaler : ${have_swscaler} ]) +AC_MSG_NOTICE([ - GDK Pixbuf support : ${have_pixbuf}]) +AC_MSG_NOTICE([ - Alsa support (midi sequencer) : ${have_alsa}]) diff --git a/veejay-client/cpuinfo.sh b/veejay-client/cpuinfo.sh new file mode 100755 index 00000000..a8e6ace8 --- /dev/null +++ b/veejay-client/cpuinfo.sh @@ -0,0 +1,336 @@ +#!/bin/sh + +if test x"$CC" = x; then + CC=gcc +fi + +if test $# -ne 1; then + echo "Please give the arch (ppc or x86) as an argument!" 1>&2 + exit 1 +fi + +if test `uname -s` = Darwin; then + IsDarwin=yes +else + IsDarwin=no +fi + +target=$1 + +cc_version=`$CC -dumpversion` +_cc_major=`echo $cc_version | cut -d'.' -f1` +_cc_minor=`echo $cc_version | cut -d'.' -f2` + +if test $_cc_major -ge 4; then + _opt_mcpu="-mtune" +else + _opt_mcpu="-mcpu" +fi + +do_cc() +{ + $CC -o conftest conftest.c $@ >/dev/null 2>&1 +} + +extcheck() +{ +cat > conftest.c < +void catch() { exit(1); } +int main(void){ + signal(SIGILL, catch); + __asm__ __volatile__ ("$1":::"memory"); + exit(0); +} +EOF + +do_cc +if test -x ./conftest; then + ./conftest + if test $? -ne 0; then + return 1 + fi + return 0 +else + return 1 +fi +} + +do_x86() +{ + +CFLAGS=-O +if test $IsDarwin = yes; then + CFLAGS="$CFLAGS -fno-pic -Wl,-read_only_relocs -Wl,suppress" +fi + +if test -r /proc/cpuinfo; then + _cpuinfo="cat /proc/cpuinfo" +else + $CC $CFLAGS -o cpuinfo utils/cpuinfo.c + _cpuinfo="./cpuinfo" +fi + +# Cpu determination logic adapted from the MPlayer configure script. + +pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -n 1` +pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pfamily=`$_cpuinfo | grep 'cpu family' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pstep=`$_cpuinfo | grep 'stepping' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pparam=`$_cpuinfo | grep 'features' | cut -d':' -f2 | head -n 1` + +if test -z "$pparam" ; then + pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | head -n 1` +fi + +_mmx=no +_3dnow=no +_3dnowex=no +_mmx2=no +_sse=no +_sse2=no +_mtrr=no + +for i in $pparam ; do + case "$i" in + 3dnow) _3dnow=yes ;; + 3dnowext) _3dnow=yes _3dnowex=yes ;; + mmx) _mmx=yes ;; + mmxext) _mmx2=yes ;; + mtrr|k6_mtrr|cyrix_arr) _mtrr=yes ;; + xmm|sse|kni) _sse=yes _mmx2=yes ;; + sse2) _sse2=yes ;; + esac +done + +case "$pvendor" in + AuthenticAMD) + case "$pfamily" in + 3)proc=i386 + ;; + 4) proc=i486 + ;; + 5) iproc=586 + # models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3 + # K6 model 13 are the K6-2+ and K6-III+ + if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then + proc=k6-3 + elif test "$pmodel" -ge 8; then + proc=k6-2 + elif test "$pmodel" -ge 6; then + proc=k6 + else + proc=i586 + fi + ;; + 6) iproc=686 + if test "$pmodel" -ge 7; then + proc=athlon-4 + elif test "$pmodel" -ge 6; then + if test "$_sse" = yes && test "$pstep" -ge 2; then + proc=athlon-xp + else + proc=athlon-4 + fi + elif test "$pmodel" -ge 4; then + proc=athlon-tbird + else + proc=athlon + fi + ;; + 15) + # Despite what the gcc into says 'athlon64' is not accepted as + # synonym for 'k8' + proc=k8 + ;; + *) proc=athlon-xp + ;; + esac + ;; + GenuineIntel) + case "$pfamily" in + 3) proc=i386 + ;; + 4) proc=i486 + ;; + 5) iproc=586 + if test "$pmodel" -eq 4 || test "$pmodel" -eq 8; then + proc=pentium-mmx # 4 is desktop, 8 is mobile + else + proc=i586 + fi + ;; + 6) iproc=686 + if test "$pmodel" -ge 15; then + proc=nocona + elif test "$pmodel" -ge 13; then + proc=pentium-m + elif test "$pmodel" -ge 7; then + proc=pentium3 + elif test "$pmodel" -ge 3; then + proc=pentium2 + else + proc=i686 + fi + ;; + 15) proc=pentium4 + ;; + *) proc=pentium4 + ;; + esac + ;; + unknown) + case "$pfamily" in + 3) proc=i386 + ;; + 4) proc=i486 + ;; + *) proc=i586 + ;; + esac + ;; + *) + proc=i586 + ;; +esac + +# check that gcc supports our CPU, if not, fall back to earlier ones + +cat > conftest.c << EOF +int main(void) { return 0; } +EOF +if test "$proc" = "athlon64" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=athlon-xp +fi + +if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" || test "$proc" = "athlon-tbird"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=athlon +fi + +if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=k6 +fi + +if test "$proc" = "k6"; then + do_cc -march=$proc $_opt_mcpu=$proc + if test $? -ne 0; then + if do_cc -march=i586 $_opt_mcpu=i686; then + proc=i586-i686 + else + proc=i586 + fi + fi +fi + +if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i686 +fi +if test "$proc" = "i686" || test "$proc" = "pentium-mmx"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i586 +fi +if test "$proc" = "i586" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i486 +fi +if test "$proc" = "i486" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i386 +fi +if test "$proc" = "i386" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=error +fi +if test "$proc" = "error" ; then + echo "Your $_cc does not even support \"i386\" for '-march' and $_opt_mcpu." + _mcpu="" + _march="" +elif test "$proc" = "i586-i686"; then + _march="-march=i586" + _mcpu="$_opt_mcpu=i686" +else + _march="-march=$proc" + _mcpu="$_opt_mcpu=$proc" +fi + +if test $_cc_major -ge 3; then + extcheck "xorps %%xmm0, %%xmm0" || _gcc3_ext="$_gcc3_ext -mno-sse" + extcheck "xorpd %%xmm0, %%xmm0" || _gcc3_ext="$_gcc3_ext -mno-sse2" + + if test x"$_gcc3_ext" != "x"; then + # if we had to disable sse/sse2 because the active kernel does not + # support this instruction set extension, we also have to tell + # gcc3 to not generate sse/sse2 instructions for normal C code + cat > conftest.c << EOF +int main(void) { return 0; } +EOF + do_cc $_march $_gcc3_ext && _march="$_march $_gcc3_ext" + fi +fi + +echo $_march $_mcpu +rm -f conftest.c conftest cpuinfo +return 0 +} + +do_ppc() +{ +# Linux on a PPC has /proc/info +# Darwin (OS/X) has the hostinfo command +# If neither of those we have no idea what to do - so do nothing. +if test -r /proc/cpuinfo; then + proc=`grep cpu /proc/cpuinfo | cut -d':' -f2 | cut -d',' -f1 | cut -b 2- | head -n 1` +elif test $IsDarwin = yes; then + proc=`hostinfo | grep "Processor type" | cut -f3 -d' ' | sed 's/ppc//'` +else + return 0 +fi + +case "$proc" in + 601) _march="$_opt_mcpu=601" _mcpu='-mtune=601' + ;; + 603) _march="$_opt_mcpu=603" _mcpu='-mtune=603' + ;; + 603e|603ev) _march="$_opt_mcpu=603e" _mcpu='-mtune=603e' + ;; + 604|604e|604r|604ev) _march="$_opt_mcpu=604" _mcpu='-mtune=604' + ;; + 740|740/750|745/755) _march="$_opt_mcpu=740" _mcpu='-mtune=740' + ;; + 750|750CX) _march="$_opt_mcpu=750" _mcpu='-mtune=750' + ;; + *) ;; +esac + +# gcc 3.1(.1) and up supports 7400 and 7450 +if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" || test "$_cc_major" -ge "4"; then + case "$proc" in + 7400*|7410*) _march="$_opt_mcpu=7400" _mcpu='-mtune=7400' ;; + 7450*|7455*) _march="$_opt_mcpu=7450" _mcpu='-mtune=7450' ;; + *) ;; + esac +fi + +# gcc 3.2 and up supports 970 +if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then + case "$proc" in + 970*) if test $IsDarwin = yes; then + _march="$_opt_mcpu=G5 -mpowerpc64 -mpowerpc-gpopt -falign-loops=16 -force_cpusubtype_ALL" _mcpu='-mtune=G5' + else + _march="$_opt_mcpu=970" _mcpu='-mtune=970' + fi + ;; + *) ;; + esac +fi + +echo $_march $_mcpu +return 0 +} + +# +# The script that runs the various functions above +# + +if test $target = x86; then + do_x86 +elif test $target = ppc; then + do_ppc +fi diff --git a/veejay-client/depcomp b/veejay-client/depcomp new file mode 100755 index 00000000..ca5ea4e1 --- /dev/null +++ b/veejay-client/depcomp @@ -0,0 +1,584 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2006-10-15.18 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/veejay-client/gveejay-paths.h b/veejay-client/gveejay-paths.h new file mode 100644 index 00000000..e69de29b diff --git a/veejay-client/gveejay-paths.sh b/veejay-client/gveejay-paths.sh new file mode 100644 index 00000000..0583f0c7 --- /dev/null +++ b/veejay-client/gveejay-paths.sh @@ -0,0 +1,22 @@ +#!/bin/sh -e + +prefix="/usr/local" +datadir="${prefix}/share" + +DATADIRNAME="@DATADIRNAME@" + +gveejay_datadir="${datarootdir}/gveejay" + +cat << EOF +/* + This file has been automatically generated. Do not edit + +*/ +#ifndef GVEEJAY_PATHS_H +#define GVEEJAY_PATHS_H + +#define GVEEJAY_DATADIR "$gveejay_datadir" + +#endif /* GVEEJAY_PATHS_H */ +EOF + diff --git a/veejay-client/gveejay-paths.sh.in b/veejay-client/gveejay-paths.sh.in new file mode 100644 index 00000000..eca08465 --- /dev/null +++ b/veejay-client/gveejay-paths.sh.in @@ -0,0 +1,22 @@ +#!/bin/sh -e + +prefix="@prefix@" +datadir="@datadir@" + +DATADIRNAME="@DATADIRNAME@" + +gveejay_datadir="@gveejay_datadir@" + +cat << EOF +/* + This file has been automatically generated. Do not edit + +*/ +#ifndef GVEEJAY_PATHS_H +#define GVEEJAY_PATHS_H + +#define GVEEJAY_DATADIR "$gveejay_datadir" + +#endif /* GVEEJAY_PATHS_H */ +EOF + diff --git a/veejay-client/gveejay.spec.in b/veejay-client/gveejay.spec.in new file mode 100644 index 00000000..ea330d46 --- /dev/null +++ b/veejay-client/gveejay.spec.in @@ -0,0 +1,118 @@ +# norootforbuild +# neededforbuild update-desktop-files gtk2-devel-packages glib2 gtk2 libglade3 gtk2-devel glib2-devel libglade-devel libxml2-devel pkgconfig + +%define name gveejay +%define version 1.0 +%define release reloaded +%define prefix /usr + +%define builddir $RPM_BUILD_DIR/%{name}-%{version} + +Summary: Video Mixing/Editing Instrument +Name: %{name} +Version: %{version} +Release: %{release} +Prefix: %{prefix} +Copyright: GNU GPL +URL: http://veejayq.net +Packager: nelburg +Group: Productivity/Multimedia/Video/Editors and Convertors +Source: %{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Prereq: /sbin/ldconfig +#Requires: libxml2 >= 2.5.4 +#Requires: gtk2 +#Requires: glib2 +#Requires: libglade2 +#Requires: libxml2 >= 2.5.4 +#Requires: cairo +#Requires: gtkcairo +#BuildRequires: pkgconfig +#BuildRequires: gtk2-devel +#BuildRequires: glib2-devel +#BuildRequires: libglade2-devel +#BuildRequires: gtkcairo-devel +#BuildRequires: cairo-devel + +%description +Veejay is a visual instrument and realtime video sampler. +It allows you to 'play' the video like you would play a Piano and it allows +you to record the resulting video directly to disk for immediate playback (video sampling). + +GVeejayReloaded is the graphical interface for Veejay. + +Author: Niels Elburg + +Requires: gtk2 +Requires: glib2 +Requires: libglade2 +Requires: libxml2 >= 2.5.4 + +%prep +%setup -q -n %{name}-%{version} + +./autogen.sh +%{?suse_update_config:%{suse_update_config -f}} + +CFLAGS="$RPM_OPT_FLAGS" \ +CXXFLAGS="$RPM_OPT_FLAGS" \ +./configure \ + --prefix=%{prefix} \ + --mandir=%{_mandir} \ + --with-gveejayreloaded \ + --with-swscaler + +%build +# Setup for parallel builds +numprocs=`egrep -c ^cpu[0-9]+ /proc/stat || :` +if [ "$numprocs" = "0" ]; then + numprocs=1 +fi +make -j$numprocs + +%install +[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} + +make install-strip \ + DESTDIR=%{buildroot} + +# icon and menu-entry +mkdir -p %{buildroot}%{_datadir}/pixmaps +install -m 644 share/%{name}-logo.png %{buildroot}%{_datadir}/pixmaps/gveejay.png +cat > gveejay.desktop << EOF +[Desktop Entry] +Comment=Video Mixing/Editing Instrument +Exec=gveejayreloaded +GenericName= +Icon=%{name} +MimeType= +Name=Gveejay Reloaded +Path= +StartupNotify=true +Terminal=false +Type=Application +EOF +%suse_update_desktop_file -i gveejay AudioVideo Player + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%clean +[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} + +%files +%defattr(-, root, root) +%doc AUTHORS BUGS COPYING ChangeLog INSTALL README* +%doc doc +%{_bindir}/%{name} +%{_datadir}/%{name}/*.png +# gveejay +%{_bindir}/src +%{_datadir}/%{name}/gveejay-reloaded-2.glade +%{_datadir}/%{name}/gveejay.rc +%{_datadir}/pixmaps/gveejay.png +%{_datadir}/applications/gveejay.desktop + +%changelog -n veejay +Mar 21, 2007. Initial rpm spec for gveejayreloaded diff --git a/veejay-client/install-sh b/veejay-client/install-sh new file mode 100755 index 00000000..4fbbae7b --- /dev/null +++ b/veejay-client/install-sh @@ -0,0 +1,507 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-10-14.15 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + shift + shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac +done + +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir + shift + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ + || { + echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + } || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/veejay-client/libtool b/veejay-client/libtool new file mode 100755 index 00000000..b03a0475 --- /dev/null +++ b/veejay-client/libtool @@ -0,0 +1,7595 @@ +#! /bin/bash + +# libtoolT - Provide generalized library-building support services. +# Generated automatically by (GNU gveejay 1.2) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED="/bin/sed" + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="/bin/sed -e 1s/^X//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags=" CXX" + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host cc1161740-a: + +# Shell to use when invoking shell scripts. +SHELL="/bin/bash" + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=no + +# Whether or not to optimize for fast installation. +fast_install=yes + +# The host system. +host_alias= +host=i686-pc-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias= +build=i686-pc-linux-gnu +build_os=linux-gnu + +# An echo program that does not interpret backslashes. +echo="echo" + +# The archiver. +AR="ar" +AR_FLAGS="cru" + +# A C compiler. +LTCC="gcc" + +# LTCC compiler flags. +LTCFLAGS="" + +# A language-specific compiler. +CC="gcc" + +# Is the compiler the GNU C compiler? +with_gcc=yes + +# An ERE matcher. +EGREP="/bin/grep -E" + +# The linker used to build libraries. +LD="/usr/bin/ld" + +# Whether we need hard or soft links. +LN_S="ln -s" + +# A BSD-compatible nm program. +NM="/usr/bin/nm -B" + +# A symbol stripping program +STRIP="strip" + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=file + +# Used on cygwin: DLL creation program. +DLLTOOL="dlltool" + +# Used on cygwin: object dumper. +OBJDUMP="objdump" + +# Used on cygwin: assembler. +AS="as" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Object file suffix (normally "o"). +objext="o" + +# Old archive suffix (normally "a"). +libext="a" + +# Shared library suffix (normally ".so"). +shrext_cmds='.so' + +# Executable file suffix (normally ""). +exeext="" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" +pic_mode=default + +# What is the maximum length of a command? +max_cmd_len=98304 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Must we lock files when doing compilation? +need_locks="no" + +# Do we need the lib prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec="" + +# Library versioning type. +version_type=linux + +# Format of library name prefix. +libname_spec="lib\$name" + +# 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="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Commands used to build and install an old-style archive. +RANLIB="ranlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build and install a shared archive. +archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +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 -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" +postinstall_cmds="" +postuninstall_cmds="" + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds="" +module_expsym_cmds="" + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects="" + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps="" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path="" + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd="\$MAGIC_CMD" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that forces no undefined symbols. +no_undefined_flag="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" + +# This is the shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# This is the shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist. +hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into +# a binary during linking. This must work even if $libdir does +# not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="" + +# Set to yes if using DIR/libNAME during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=no + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=no + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=unsupported + +# 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=no + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=no + +# Compile-time system search path for libraries +sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.1.3 /usr/lib /lib" + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib " + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to yes if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + +# Symbols that must always be exported. +include_expsyms="" + +# ### END LIBTOOL CONFIG + +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="1.5.24 Debian 1.5.24-1ubuntu1" +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.[fF][09]?) xform=[fF][09]. ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# Libtool was configured on host cc1161740-a: + +# Shell to use when invoking shell scripts. +SHELL="/bin/bash" + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=no + +# Whether or not to optimize for fast installation. +fast_install=yes + +# The host system. +host_alias= +host=i686-pc-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias= +build=i686-pc-linux-gnu +build_os=linux-gnu + +# An echo program that does not interpret backslashes. +echo="echo" + +# The archiver. +AR="ar" +AR_FLAGS="cru" + +# A C compiler. +LTCC="gcc" + +# LTCC compiler flags. +LTCFLAGS="" + +# A language-specific compiler. +CC="g++" + +# Is the compiler the GNU C compiler? +with_gcc=yes + +# An ERE matcher. +EGREP="/bin/grep -E" + +# The linker used to build libraries. +LD="/usr/bin/ld" + +# Whether we need hard or soft links. +LN_S="ln -s" + +# A BSD-compatible nm program. +NM="/usr/bin/nm -B" + +# A symbol stripping program +STRIP="strip" + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=file + +# Used on cygwin: DLL creation program. +DLLTOOL="dlltool" + +# Used on cygwin: object dumper. +OBJDUMP="objdump" + +# Used on cygwin: assembler. +AS="as" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Object file suffix (normally "o"). +objext="o" + +# Old archive suffix (normally "a"). +libext="a" + +# Shared library suffix (normally ".so"). +shrext_cmds='.so' + +# Executable file suffix (normally ""). +exeext="" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" +pic_mode=default + +# What is the maximum length of a command? +max_cmd_len=98304 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Must we lock files when doing compilation? +need_locks="no" + +# Do we need the lib prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec="" + +# Library versioning type. +version_type=linux + +# Format of library name prefix. +libname_spec="lib\$name" + +# 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="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Commands used to build and install an old-style archive. +RANLIB="ranlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build and install a shared archive. +archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" +postinstall_cmds="" +postuninstall_cmds="" + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds="" +module_expsym_cmds="" + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects="/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.1.3/crtbeginS.o" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects="/usr/lib/gcc/i486-linux-gnu/4.1.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/crtn.o" + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path="-L/usr/lib/gcc/i486-linux-gnu/4.1.3 -L/usr/lib/gcc/i486-linux-gnu/4.1.3 -L/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib" + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd="\$MAGIC_CMD" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that forces no undefined symbols. +no_undefined_flag="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" + +# This is the shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# This is the shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist. +hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into +# a binary during linking. This must work even if $libdir does +# not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="" + +# Set to yes if using DIR/libNAME during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=no + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=no + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=unsupported + +# 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=no + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=no + +# Compile-time system search path for libraries +sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.1.3 /usr/lib /lib" + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib " + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to yes if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="" + +# Symbols that must always be exported. +include_expsyms="" + +# ### END LIBTOOL TAG CONFIG: CXX + diff --git a/veejay-client/ltmain.sh b/veejay-client/ltmain.sh new file mode 100644 index 00000000..2160ef7b --- /dev/null +++ b/veejay-client/ltmain.sh @@ -0,0 +1,6938 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="1.5.24 Debian 1.5.24-1ubuntu1" +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.[fF][09]?) xform=[fF][09]. ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/veejay-client/menu/gveejayreloaded.desktop b/veejay-client/menu/gveejayreloaded.desktop new file mode 100644 index 00000000..299dc2b3 --- /dev/null +++ b/veejay-client/menu/gveejayreloaded.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=GVeejayReloaded +Comment=Graphical Veejay Client +Exec=gveejayreloaded +Terminal=false +Type=Application +Icon=veejay-icon.png +Categories=AudioVideoEditing;AudioVideo; diff --git a/veejay-client/menu/veejay1.desktop b/veejay-client/menu/veejay1.desktop new file mode 100644 index 00000000..31bce654 --- /dev/null +++ b/veejay-client/menu/veejay1.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Veejay (720x576 with audio) +Comment=Start new veejay project, 720x576 with default audio settings +Exec=veejay -v -W720 -H576 -a1 -d +Terminal=true +Type=Application +Icon=veejay-icon.png +Categories=AudioVideoEditing;AudioVideo; diff --git a/veejay-client/menu/veejay2.desktop b/veejay-client/menu/veejay2.desktop new file mode 100644 index 00000000..8f9c8ff1 --- /dev/null +++ b/veejay-client/menu/veejay2.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Veejay (720x576 without audio) +Comment=Start new Veejay project, 720x576 without audio +Exec=veejay -v -W720 -H576 -a0 -d +Terminal=true +Type=Application +Icon=veejay-icon.png +Categories=AudioVideoEditing;AudioVideo; diff --git a/veejay-client/menu/veejay3.desktop b/veejay-client/menu/veejay3.desktop new file mode 100644 index 00000000..c0e53f5e --- /dev/null +++ b/veejay-client/menu/veejay3.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Veejay (640x480, /dev/video0) +Comment=Start veejay server with capture device #0 in 640x480 +Exec=veejay -A1 -v -W640 -H480 +Terminal=true +Type=Application +Icon=veejay-icon.png +Categories=AudioVideoEditing;AudioVideo; diff --git a/veejay-client/menu/veejay4.desktop b/veejay-client/menu/veejay4.desktop new file mode 100644 index 00000000..53e6a3e6 --- /dev/null +++ b/veejay-client/menu/veejay4.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Veejay (720x576, /dev/video0) +Comment=Start veejay server from capture device #0 in 720x576 +Exec=veejay -A1 -v -W720 -H576 +Terminal=true +Type=Application +Icon=veejay-icon.png +Categories=AudioVideoEditing;AudioVideo; diff --git a/veejay-client/menu/veejay5.desktop b/veejay-client/menu/veejay5.desktop new file mode 100644 index 00000000..5371c744 --- /dev/null +++ b/veejay-client/menu/veejay5.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Veejay (352x288, /dev/video0) +Comment=Start veejay server with capture device #0 in 352x288 +Exec=veejay -A1 -v -W352 -H288 +Terminal=true +Type=Application +Icon=veejay-icon.png +Categories=AudioVideoEditing;AudioVideo; diff --git a/veejay-client/missing b/veejay-client/missing new file mode 100755 index 00000000..1c8ff704 --- /dev/null +++ b/veejay-client/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/veejay-client/share/bg.png b/veejay-client/share/bg.png new file mode 100644 index 00000000..92c332d4 Binary files /dev/null and b/veejay-client/share/bg.png differ diff --git a/veejay-client/share/bg_black.png b/veejay-client/share/bg_black.png new file mode 100644 index 00000000..acc56362 Binary files /dev/null and b/veejay-client/share/bg_black.png differ diff --git a/veejay-client/share/bg_blue.png b/veejay-client/share/bg_blue.png new file mode 100644 index 00000000..f1f1b98d Binary files /dev/null and b/veejay-client/share/bg_blue.png differ diff --git a/veejay-client/share/bg_green.png b/veejay-client/share/bg_green.png new file mode 100644 index 00000000..af8aa721 Binary files /dev/null and b/veejay-client/share/bg_green.png differ diff --git a/veejay-client/share/bg_grey.png b/veejay-client/share/bg_grey.png new file mode 100644 index 00000000..20ba15d7 Binary files /dev/null and b/veejay-client/share/bg_grey.png differ diff --git a/veejay-client/share/bg_red.png b/veejay-client/share/bg_red.png new file mode 100644 index 00000000..16e4811c Binary files /dev/null and b/veejay-client/share/bg_red.png differ diff --git a/veejay-client/share/bg_yellow.png b/veejay-client/share/bg_yellow.png new file mode 100644 index 00000000..c245dd3b Binary files /dev/null and b/veejay-client/share/bg_yellow.png differ diff --git a/veejay-client/share/blackwhite.rc b/veejay-client/share/blackwhite.rc new file mode 100644 index 00000000..11331dcc --- /dev/null +++ b/veejay-client/share/blackwhite.rc @@ -0,0 +1,118 @@ +# Edit these colors and fonts however you like. +style "default" +{ + engine "hcengine" {} + xthickness = 1 + ythickness = 1 + GtkWidget::shadow_type = GTK_SHADOW_ETCHED_OUT + #GtkWidget::interior_focus = 0 + #GtkWidget::focus_padding = 0 + #GtkWidget::default_border = {0, 0, 0, 0} + #GtkWidget::default_outside_border = {0, 0, 0, 0} + GtkWidget::default_spacing = 0 + GtkScale::stepper_size = 8 + GtkRange::through-width = 4 + GtkRange::trough_border = 0 + GtkRange::slider-width = 16 + GtkScale::slider-length = 10 + + font_name = "Sans 8" + + fg[NORMAL] = "#ffffff" # borders etc. + fg[PRELIGHT] = "#000000" + fg[ACTIVE] = "#ffffff" # ook borders, van sliders en notebook + fg[SELECTED] = "#000000" + fg[INSENSITIVE] = "#505050" + + bg[NORMAL] = "#303030" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#202020" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#00ff00" + bg[INSENSITIVE] = "#000000" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#c0c0c0" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#303060"# achtergrond van lists, status bars + base[PRELIGHT] = "#00fff0" + base[ACTIVE] = "#0000ff" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + +style "text" +{ + font_name = "Sans 8" + + fg[NORMAL] = "#ffffff" # borders etc. + fg[PRELIGHT] = "#ffffff" + fg[ACTIVE] = "#ffffff" # ook borders, van sliders en notebook + fg[SELECTED] = "#ffffff" + fg[INSENSITIVE] = "#ffffff" + + bg[NORMAL] = "#27282F" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#454f60" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + + +style "buttons" +{ + + font_name = "Sans 8" + + fg[NORMAL] = "#888888" + fg[PRELIGHT] = "#888888" + fg[ACTIVE] = "#888888" + fg[SELECTED] = "#888888" + fg[INSENSITIVE] = "#888888" + + bg[NORMAL] = "#27282F" + bg[PRELIGHT] = "#aaacc1" + bg[ACTIVE] = "#454f60" + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + + + +class "GtkButton" style "default" +class "GtkSpinButton" style "default" +class "GtkToggleButton" style "default" +class "GtkCheckBox" style "default" + +class "GtkLabel" style "default" + +class "GtkWidget" style "default" diff --git a/veejay-client/share/button_bounce.png b/veejay-client/share/button_bounce.png new file mode 100644 index 00000000..82bbce6a Binary files /dev/null and b/veejay-client/share/button_bounce.png differ diff --git a/veejay-client/share/button_dec.png b/veejay-client/share/button_dec.png new file mode 100644 index 00000000..4fc75576 Binary files /dev/null and b/veejay-client/share/button_dec.png differ diff --git a/veejay-client/share/button_down.png b/veejay-client/share/button_down.png new file mode 100644 index 00000000..99621523 Binary files /dev/null and b/veejay-client/share/button_down.png differ diff --git a/veejay-client/share/button_fbw.png b/veejay-client/share/button_fbw.png new file mode 100644 index 00000000..32e6b085 Binary files /dev/null and b/veejay-client/share/button_fbw.png differ diff --git a/veejay-client/share/button_ffw.png b/veejay-client/share/button_ffw.png new file mode 100644 index 00000000..50108d46 Binary files /dev/null and b/veejay-client/share/button_ffw.png differ diff --git a/veejay-client/share/button_gotoend.png b/veejay-client/share/button_gotoend.png new file mode 100644 index 00000000..d7d362f0 Binary files /dev/null and b/veejay-client/share/button_gotoend.png differ diff --git a/veejay-client/share/button_gotostart.png b/veejay-client/share/button_gotostart.png new file mode 100644 index 00000000..c0ed75cc Binary files /dev/null and b/veejay-client/share/button_gotostart.png differ diff --git a/veejay-client/share/button_inc.png b/veejay-client/share/button_inc.png new file mode 100644 index 00000000..862e48ee Binary files /dev/null and b/veejay-client/share/button_inc.png differ diff --git a/veejay-client/share/button_loop.png b/veejay-client/share/button_loop.png new file mode 100644 index 00000000..aacf503f Binary files /dev/null and b/veejay-client/share/button_loop.png differ diff --git a/veejay-client/share/button_looponce.png b/veejay-client/share/button_looponce.png new file mode 100644 index 00000000..3e2e20d9 Binary files /dev/null and b/veejay-client/share/button_looponce.png differ diff --git a/veejay-client/share/button_mini_decrement.png b/veejay-client/share/button_mini_decrement.png new file mode 100644 index 00000000..46dbe3ea Binary files /dev/null and b/veejay-client/share/button_mini_decrement.png differ diff --git a/veejay-client/share/button_mini_increment.png b/veejay-client/share/button_mini_increment.png new file mode 100644 index 00000000..f307df4c Binary files /dev/null and b/veejay-client/share/button_mini_increment.png differ diff --git a/veejay-client/share/button_pause.png b/veejay-client/share/button_pause.png new file mode 100644 index 00000000..50b227a8 Binary files /dev/null and b/veejay-client/share/button_pause.png differ diff --git a/veejay-client/share/button_play.png b/veejay-client/share/button_play.png new file mode 100644 index 00000000..e63e771f Binary files /dev/null and b/veejay-client/share/button_play.png differ diff --git a/veejay-client/share/button_playmode.png b/veejay-client/share/button_playmode.png new file mode 100644 index 00000000..cdc841b0 Binary files /dev/null and b/veejay-client/share/button_playmode.png differ diff --git a/veejay-client/share/button_prev.png b/veejay-client/share/button_prev.png new file mode 100644 index 00000000..653c503f Binary files /dev/null and b/veejay-client/share/button_prev.png differ diff --git a/veejay-client/share/button_rand.png b/veejay-client/share/button_rand.png new file mode 100644 index 00000000..3cc6916f Binary files /dev/null and b/veejay-client/share/button_rand.png differ diff --git a/veejay-client/share/button_reverse.png b/veejay-client/share/button_reverse.png new file mode 100644 index 00000000..59bd29e0 Binary files /dev/null and b/veejay-client/share/button_reverse.png differ diff --git a/veejay-client/share/button_right.png b/veejay-client/share/button_right.png new file mode 100644 index 00000000..3ec7b43f Binary files /dev/null and b/veejay-client/share/button_right.png differ diff --git a/veejay-client/share/button_skip.png b/veejay-client/share/button_skip.png new file mode 100644 index 00000000..7d649bb5 Binary files /dev/null and b/veejay-client/share/button_skip.png differ diff --git a/veejay-client/share/button_skull.png b/veejay-client/share/button_skull.png new file mode 100644 index 00000000..bbed6da0 Binary files /dev/null and b/veejay-client/share/button_skull.png differ diff --git a/veejay-client/share/button_text.png b/veejay-client/share/button_text.png new file mode 100644 index 00000000..bfd19e8d Binary files /dev/null and b/veejay-client/share/button_text.png differ diff --git a/veejay-client/share/button_up.png b/veejay-client/share/button_up.png new file mode 100644 index 00000000..862e48ee Binary files /dev/null and b/veejay-client/share/button_up.png differ diff --git a/veejay-client/share/fx_entry_off.png b/veejay-client/share/fx_entry_off.png new file mode 100644 index 00000000..adb5cafb Binary files /dev/null and b/veejay-client/share/fx_entry_off.png differ diff --git a/veejay-client/share/fx_entry_on.png b/veejay-client/share/fx_entry_on.png new file mode 100644 index 00000000..8de23e6c Binary files /dev/null and b/veejay-client/share/fx_entry_on.png differ diff --git a/veejay-client/share/gveejay-default.rc b/veejay-client/share/gveejay-default.rc new file mode 100644 index 00000000..9fb9e798 --- /dev/null +++ b/veejay-client/share/gveejay-default.rc @@ -0,0 +1,21 @@ +# Edit these colors and fonts however you like. +style "default" +{ + xthickness = 1 + ythickness = 1 + GtkWidget::shadow_type = GTK_SHADOW_ETCHED_OUT + #GtkWidget::interior_focus = 0 + #GtkWidget::focus_padding = 0 + #GtkWidget::default_border = {0, 0, 0, 0} + #GtkWidget::default_outside_border = {0, 0, 0, 0} + GtkWidget::default_spacing = 0 + GtkScale::stepper_size = 8 + GtkRange::through-width = 4 + GtkRange::trough_border = 0 + GtkRange::slider-width = 16 + GtkScale::slider-length = 10 + font_name = "Sans 8" +} + + +class "GtkWidget" style "default" diff --git a/veejay-client/share/gveejay.glade b/veejay-client/share/gveejay.glade new file mode 100644 index 00000000..7a8745eb --- /dev/null +++ b/veejay-client/share/gveejay.glade @@ -0,0 +1,9693 @@ + + + + + + + True + gveejay - graphical veejay + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_EAST + True + + + + True + False + 3 + + + + True + False + 0 + + + + True + False + 3 + + + + True + True + False + 0 + + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + True + True + 0 + localhost + True + * + False + + + 0 + True + True + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 3490 1024 65535 1 4 4 + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + True + True + True + 0 + + True + * + False + + + 0 + True + True + + + + + + True + Open EditList/Videofile + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + PANGO_ELLIPSIZE_NONE + + + 0 + False + False + + + + + + + + True + veejay launch/connect + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + Launch/reconnect + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_connect.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_disconnect.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Screenshot + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_screenshot.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Toggle Bezerk Mode + True + GTK_RELIEF_NORMAL + True + False + False + + + + + True + icon_berserk.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Display Debug + True + GTK_RELIEF_NORMAL + True + False + False + + + + + True + icon_bug.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Change Playback Mode + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_playmode.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Take Background Mask(diff overlay) + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_mask.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + False + False + + + + + True + icon_jack.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Create a new solid colored stream + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_color.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Open Veejay Liveset / Action file + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Save Veejay Liveset / Actionfile + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + icon_save.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + 0 + True + True + + + + + 0 + False + False + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + Editlist positon + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + 00000000000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 14 + False + 0 + + + 0 + False + False + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 11 + False + 0 + + + 0 + False + False + + + + + + True + Editlist frames + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + 00000000000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 14 + False + 0 + + + 0 + False + False + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 11 + False + 0 + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + 0.800000011921 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_gotostart.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_fbw.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_reverse.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_pause.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_play.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_ffw.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_gotoend.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + True + True + + + + + + True + True + True + GTK_POS_LEFT + 0 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 1 2 4 + + + + 0 + True + True + + + + + + True + 1 + 0.5 + 0.5 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_prev.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_skip.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Mark current position as start of a new sample + True + [... + True + GTK_RELIEF_NORMAL + True + + + + 0 + True + True + + + + + + True + Mark current position as sample end and create new sample + True + ...] + True + GTK_RELIEF_NORMAL + True + + + + 0 + True + True + + + + + + + 0 + False + True + + + + + 0 + False + True + + + + + + True + True + False + GTK_POS_TOP + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.0010000000475 0.10000000149 0 + + + + + 0 + False + True + + + + + 0 + True + True + + + + + + True + True + True + GTK_POS_BOTTOM + 2 + GTK_UPDATE_CONTINUOUS + True + 0 0 1 0.0500000007451 0.10000000149 0.20000000298 + + + + 0 + False + True + + + + + + True + True + True + GTK_POS_BOTTOM + 2 + GTK_UPDATE_CONTINUOUS + True + 1 0 1 0.00999999977648 0.10000000149 0 + + + + 0 + False + True + + + + + 0 + False + True + + + + + 0 + False + True + + + + + + True + True + True + 0 + + + + + True + True + True + False + GTK_POS_TOP + False + False + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_IN + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_IN + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_ETCHED_IN + GTK_CORNER_TOP_LEFT + + + + 230 + True + True + False + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + False + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + 33 + True + True + False + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + False + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + + + + + + + + + 0 + True + True + + + + + False + True + + + + + + True + Console + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + 5 + 2 + False + 0 + 3 + + + + True + Timecode + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Current position + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + Start position + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + End position + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + fill + + + + + + + True + False + 0 + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 12 + False + 0 + + + 0 + False + False + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 12 + False + 0 + + + 0 + False + False + + + + + 1 + 2 + 0 + 1 + fill + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 1000000000 1 25 25 + + + + 1 + 2 + 3 + 4 + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 1000000000 1 25 25 + + + + 1 + 2 + 4 + 5 + + + + + + + True + Speed + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 -100 100 1 5 5 + + + + 1 + 2 + 2 + 3 + + + + + + + True + False + 0 + + + + True + 000000000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 12 + False + 0 + + + 0 + False + False + + + + + + True + Enable/disable effectchain + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + True + EffectChain + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + False + False + + + + + 1 + 2 + 1 + 2 + fill + fill + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + Play once + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + button_looponce.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + True + + + + + + True + Normal Loop + True + GTK_RELIEF_NORMAL + True + True + False + True + loop_none + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + button_bounce.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + True + + + + + + True + Pingpong loop + True + GTK_RELIEF_NORMAL + True + False + False + True + loop_none + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + button_loop.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + True + True + GTK_PACK_END + + + + + + + + True + <b>Loop Types</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + Start / Stop randomizer + True + rand() + True + GTK_RELIEF_NORMAL + True + False + False + + + + 0 + False + False + + + + + + True + True + Free Style + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + True + <b>Sample randomizer</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + False + GTK_POS_LEFT + 4 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0 + + + + 0 + True + True + + + + + + True + True + False + GTK_POS_LEFT + 4 + GTK_UPDATE_CONTINUOUS + True + 0 0 1 0.00999999977648 0.10000000149 0 + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + True + Bind marker + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + True + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + Clear marker + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + + + 0 + True + True + + + + + 0 + False + True + + + + + + + + True + <b>Markers</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + + + True + <b>Sample properties</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + Sample + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + False + 0 + + + + True + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + True + EffectChain + True + GTK_RELIEF_NORMAL + True + True + False + True + + + + + + 0 + True + True + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_IN + + + + True + False + True + + + + + + + False + True + + + + + + True + Color dial + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + True + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + 5 + 2 + False + 0 + 0 + + + + True + Brightness + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Contrast + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + Color + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + Hue + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 3 + 4 + fill + fill + + + + + + True + White + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + fill + + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 4 + 5 + fill + fill + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 2 + 3 + fill + fill + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 1 + 2 + fill + fill + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 0 + 1 + fill + + + + + + + + True + Capture card settings + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + + + + True + Capture card controls + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + Hardware controls + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + + + True + <b>Stream properties</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + Stream + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + 3 + 2 + False + 0 + 5 + + + + True + <i>Starting position</i> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 10 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + <i>Duration:</i> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + <i>Ending position:</i> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 10 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 2 + 3 + fill + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 10 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + + + True + <b>Current Selection</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.270000010729 + 0 + 3 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 2 + 2 + False + 0 + 0 + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 100000000 1 10 10 + + + + 0 + 1 + 0 + 1 + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 100000000 1 10 10 + + + + 0 + 1 + 1 + 2 + + + + + + + True + Take current position as ending position + True + Set end + True + GTK_RELIEF_NORMAL + True + + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + Take current position as starting position + True + Set start + True + GTK_RELIEF_NORMAL + True + + + + 1 + 2 + 0 + 1 + fill + + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + Cut selection to buffer + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_cut.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Copy selection to buffer + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_copy.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Paste from buffer into editlist at current position + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_paste.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Delete selection (without buffer) + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_trash.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Crop to selection + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_crop.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + Paste at position + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 100000000 1 10 10 + + + 0 + True + True + + + + + + True + Paste buffer at position + True + Paste At! + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + 2 + False + True + + + + + + + + True + <b>EditList Operations</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 3 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + Editlist + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + False + True + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + + True + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + True + 0 + + + + True + Play selected sample/stream + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_send.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + True + True + + + + + + True + Open Samplelist + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Save Samplelist + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_saveas.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Delete Sample + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Copy sample to new + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_copy.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + 0 + False + False + + + + + False + True + + + + + + True + Sample list + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + + True + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + True + 0 + + + + True + Add Videofiles to EditList + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Save Selection + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_saveas.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Save EditList + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_save.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Create sample from selection + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_new.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + False + True + + + + + + True + Editlist + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + 0 + True + True + + + + + False + True + + + + + + True + Samplelist + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + False + False + False + True + False + False + False + + + + + 0 + True + True + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + False + False + False + True + False + False + False + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + True + Entry enabled + True + GTK_RELIEF_NORMAL + True + True + False + True + + + + 0 + True + True + + + + + + True + Set fade duration + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 1 0.0500000007451 0.10000000149 0.10000000149 + + + + 0 + False + False + + + + + + True + Fade In + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_fadein.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Fade Out + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_fadeout.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Clear Entry + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Create bundle + True + GTK_RELIEF_HALF + True + + + + + True + icon_bundle.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Clear Chain + True + GTK_RELIEF_HALF + True + + + + + True + icon_clearall.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + False + 0 + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 96 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + P0 + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 146 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + P1 + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 96 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + P2 + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 136 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + P3 + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 96 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + P4 + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 177 0 255 0 0 0 + + + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + P5 + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 86 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + P6 + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 126 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + P7 + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + + + True + <b>Effect controls</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + Loops + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + True + True + Frames + True + GTK_RELIEF_NORMAL + True + True + False + True + sample_mulloop + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 9999999 1 10 10 + + + + 0 + True + True + + + + + + True + 00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 10 + False + 0 + + + 0 + False + False + + + + + 0 + False + False + + + + + + 133 + True + MJPEG +DVVIDEO +MPEG4 +MSMPEG4V3 +YV12 +YV16 + False + True + True + + + 0 + False + True + + + + + + True + True + Play when finished + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + Start recording + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_record.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Cancel recording + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_recordstop.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + PANGO_ELLIPSIZE_NONE + + + 0 + False + False + + + + + + + + True + <b>Record to sample</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + label389 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + No. of frames to record: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + True + + + + + + True + False + 0 + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 9999999 1 10 10 + + + + 0 + True + True + + + + + + True + 0:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 16 + 3 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 0 + True + True + + + + + + 100 + True + MJPEG +DVVIDEO +MPEG4 +MSMPEG4V3 +YV12 +YV16 + False + True + True + + + 0 + False + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + True + Play when finished + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + False + False + + + + + + True + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + Start recording + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_record.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Cancel recording + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_recordstop.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + 0 + True + True + + + + + + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + + PANGO_ELLIPSIZE_NONE + + + 0 + False + False + + + + + + + + True + <b>Record to sample</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + label390 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + 0 + True + True + + + + + False + True + + + + + + True + Effect controls + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_IN + + + + True + False + True + + + + + + + False + True + + + + + + True + Color picker + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + False + True + + + + + + True + Effect mixing sources + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + False + True + + + + + 0 + True + True + + + + + False + True + + + + + + True + Effect Chain + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + 0 + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + True + False + + + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + True + True + + + + + 0 + True + True + + + + + + True + 1 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + True + 0 + + + + True + New + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_new.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Load Actionfile + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Write Actionfile + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_saveas.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + VIMS commands + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_question.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Set/Change Key + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_keybind.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Delete selected bundle + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Deatach Key from selected event + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_keydetach.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + Apply changes to this bundle + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_send.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Clear text + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + + + True + <b>VIMS Bundle</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + False + True + + + + + + True + VIMS Bundles + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + True + True + 0 + + + + 140 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + + + + True + Device + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + + + + True + Video4Linux / Digital Video + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + + + 0 + False + True + + + + + + True + True + True + 0 + + + + True + 2 + 5 + False + 0 + 4 + + + + True + True + Try + True + GTK_RELIEF_NORMAL + True + + + + 4 + 5 + 1 + 2 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 4490 1 65535 1 10 10 + + + 4 + 5 + 0 + 1 + + + + + + + True + Port Number + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 3 + 4 + 0 + 1 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 2 + 3 + 0 + 1 + + + + + + + True + Remote + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + True + Use multicast + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + 1 + 0 + 1 + fill + + + + + + + + + True + Network + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + True + True + 0 + + + + True + 2 + 5 + False + 0 + 4 + + + + True + Filename + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 2 + 4 + 0 + 1 + + + + + + + True + True + Try + True + GTK_RELIEF_NORMAL + True + + + + 4 + 5 + 1 + 2 + fill + + + + + + + True + Load Actionfile + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 4 + 5 + 0 + 1 + fill + + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + use YUV4MPEG + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + use FFmpeg + True + GTK_RELIEF_NORMAL + True + False + False + True + inputstream_filey4m + + + 0 + False + False + + + + + + True + True + use picture + True + GTK_RELIEF_NORMAL + True + False + False + True + inputstream_filey4m + + + 0 + False + False + + + + + + + + + + True + Types + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + 1 + 0 + 2 + 3 + fill + fill + + + + + + + + True + File + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + + + True + <b>Input Streams</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + True + False + 0 + + + + True + False + 5 + + + + True + 2 + 4 + False + 0 + 0 + + + + True + Width: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Height: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + X offset: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + Y offset: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 1 + 2 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 4096 1 10 10 + + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 4096 1 10 10 + + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 4096 1 10 10 + + + 3 + 4 + 0 + 1 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 4096 1 10 10 + + + 3 + 4 + 1 + 2 + fill + + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + True + SAR + True + GTK_RELIEF_NORMAL + True + True + False + True + + + + + 0 + True + True + + + + + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + True + Fullscreen + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + 30 + True + wbmp,wmf,jpeg,ani,bmp,gif,ico,pcx,png,pnm,ras,tga,xmb,tiff,xpm,svg + True + True + True + 4 + jpg + False + * + False + + + 0 + False + True + + + + + + True + Apply changes to primary output settings + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_apply.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + True + + + + + 0 + False + True + + + + + + + + True + <b>Primary Video Window (SDL)</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + False + True + + + + + + True + Input/Output + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + + + True + False + 30 + + + + True + False + 3 + + + + True + 352x288 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + @ + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + 25 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + fps + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + PAL + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Top First + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + 44000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Hz/ + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + 16 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + bits/ + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + 2 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Ch + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + 0 + True + True + + + + + + True + 1 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 3 + + + + True + Playing now: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Sample + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + 00000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 7 + False + 0 + + + 0 + False + False + + + + + + + 0 + True + True + + + + + label_item + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + True + True + 0 + 600:; + True + * + False + + + + 3 + True + True + + + + + + True + Send VIMS to veejay + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_send.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + True + True + + + + + + True + VIMS commands + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_question.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + + + True + VIMS messenger + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + CPU remaining time + GTK_PROGRESS_RIGHT_TO_LEFT + 0 + 0.10000000149 + CPU remaining + PANGO_ELLIPSIZE_NONE + + + + + 0 + False + False + + + + + 0 + False + False + + + + + 0 + False + True + + + + + 0 + False + True + + + + + 0 + False + True + + + + + + True + True + False + True + 0 + + True + * + False + + + 0 + False + False + + + + + + + + False + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_EAST + True + + + + True + False + 0 + + + + True + True + True + False + False + True + False + False + False + + + 0 + True + True + + + + + + True + False + 0 + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 19 0 19 1 10 10 + + + + 0 + False + True + + + + + + True + True + True + True + 0 + + True + * + False + 15 + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + Render to selected entry + True + GTK_RELIEF_NORMAL + True + + + + True + icon_render.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Move to new sample + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_send.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + True + button116 + True + GTK_RELIEF_NORMAL + True + + + 0 + False + False + + + + + + + + + + + 0 + False + True + + + + + + + diff --git a/veejay-client/share/gveejay.rc b/veejay-client/share/gveejay.rc new file mode 100644 index 00000000..2a51c5ac --- /dev/null +++ b/veejay-client/share/gveejay.rc @@ -0,0 +1,120 @@ +# Edit these colors and fonts however you like. +style "default" +{ +# engine "hcengine" {} + xthickness = 1 + ythickness = 1 + GtkWidget::shadow_type = GTK_SHADOW_ETCHED_IN + #GtkWidget::interior_focus = 0 + #GtkWidget::focus_padding = 0 + #GtkWidget::default_border = {0, 0, 0, 0} + #GtkWidget::default_outside_border = {0, 0, 0, 0} + GtkWidget::default_spacing = 0 + GtkScale::stepper_size = 8 + GtkRange::through-width = 4 + GtkRange::trough_border = 0 + GtkRange::slider-width = 16 + GtkScale::slider-length = 12 + + font_name = "Sans 8" + + fg[NORMAL] = "#646464" # borders etc. + fg[PRELIGHT] = "#646464" + fg[ACTIVE] = "#646464" # ook borders, van sliders en notebook + fg[SELECTED] = "#646464" + fg[INSENSITIVE] = "#404040" + + bg[NORMAL] = "#27282F" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#454f60" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + +style "text" +{ + font_name = "Sans 8" + + fg[NORMAL] = "#ffffff" # borders etc. + fg[PRELIGHT] = "#ffffff" + fg[ACTIVE] = "#ffffff" # ook borders, van sliders en notebook + fg[SELECTED] = "#ffffff" + fg[INSENSITIVE] = "#ffffff" + + bg[NORMAL] = "#27282F" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#454f60" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + + +style "buttons" +{ + + font_name = "Sans 8" + + fg[NORMAL] = "#888888" + fg[PRELIGHT] = "#888888" + fg[ACTIVE] = "#888888" + fg[SELECTED] = "#888888" + fg[INSENSITIVE] = "#888888" + + bg[NORMAL] = "#27282F" + bg[PRELIGHT] = "#aaacc1" + bg[ACTIVE] = "#454f60" + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + + + +class "GtkButton" style "buttons" +class "GtkSpinButton" style "buttons" +class "GtkToggleButton" style "buttons" +class "GtkCheckBox" style "buttons" +widget_class "*GtkTree*" style "text" +class "GtkLabel" style "text" +class "*List" style "text" +class "GtkListItem" style "text" +class "*GtkCList*" style "text" +class "GtkWidget" style "default" diff --git a/veejay-client/share/gveejay.reloaded.glade b/veejay-client/share/gveejay.reloaded.glade new file mode 100644 index 00000000..e2c69605 --- /dev/null +++ b/veejay-client/share/gveejay.reloaded.glade @@ -0,0 +1,16064 @@ + + + + + + + Reloaded + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 900 + 640 + True + False + veejay-icon.png + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + True + False + 0 + + + + True + False + 0 + + + + True + GTK_PACK_DIRECTION_LTR + GTK_PACK_DIRECTION_LTR + + + + True + _GVeejay + True + + + + + + + True + Sample + True + + + + True + button_loop.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + True + _New from file + True + + + + + True + icon_openlist.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + _Copy + True + + + + + True + icon_copy.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + _Delete + True + + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + + True + Stream + True + + + + True + icon_stream.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + True + _New + True + + + + + True + icon_openlist.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + _New Solid + True + + + + + True + icon_color.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + _Delete + True + + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + + True + _MIDI + True + + + + True + icon_connect.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + True + _learn MIDI + True + True + + + + + + + True + _MIDI enable + True + True + midilearn + + + + + + + + + + + True + _Save + True + + + + True + icon_save.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + True + Save samplelist + True + + + + + True + icon_saveas.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Save actionfile + True + + + + + True + icon_openlist.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Save MIDI layout + True + + + + + True + icon_saveas.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + + True + _Load + True + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + True + Load samplelist + True + + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Load actionfile + True + + + + + True + icon_openlist.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Load MIDI layout + True + + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + + True + + + + + + True + gtk-quit + True + + + + + + + + + + + True + + + + + + True + _View + True + + + + + + + True + Preferences + True + + + + + True + gtk-preferences + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + VIMS Console + True + + + + + True + gtk-dialog-info + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + + + + + + True + VIMS _Bundles + True + + + + + True + icon_bundle.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + + True + _Help + True + + + + + + + True + About Reloaded + True + + + + + True + icon_question.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Report a problem + True + + + + + True + icon_bug.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + 0 + True + True + + + + + + True + cpumeter + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + 100 + True + cache filled + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + False + 0 + + + + localhost:3490 + True + GTK_RELIEF_HALF + True + + + + + True + icon_connect.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + Disconnect + True + GTK_RELIEF_HALF + True + + + + + True + icon_disconnect.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Toggle Bezerk Mode + True + GTK_RELIEF_HALF + True + False + False + + + + + True + icon_berserk.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + True + + + + + + True + Display Debug + True + GTK_RELIEF_HALF + True + False + False + + + + + True + icon_bug.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + True + + + + + + True + Change Playback Mode + True + GTK_RELIEF_HALF + True + + + + + True + icon_playmode.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + True + + + + + + True + Take Background Mask(diff overlay) + True + GTK_RELIEF_HALF + True + + + + + True + icon_mask.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + True + + + + + + True + Enable jack + True + GTK_RELIEF_HALF + True + False + False + + + + + True + icon_jack.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Take Screenshot + True + GTK_RELIEF_HALF + True + + + + + True + icon_screenshot.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Display OSD status + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_osd.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Enable/Disable EDL Cache (see veejay console) + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_cache.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Drop audio/video frames and keep in sync (by default enabled) + True + Sync + True + GTK_RELIEF_NORMAL + True + True + False + + + + 0 + False + False + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + False + GTK_POS_TOP + False + False + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + Play once + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + button_looponce.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Normal Loop + True + GTK_RELIEF_HALF + True + True + False + True + loop_none + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + button_loop.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Pingpong loop + True + GTK_RELIEF_HALF + True + False + False + True + loop_none + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + button_bounce.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Random Frame + True + GTK_RELIEF_HALF + True + False + False + True + loop_none + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + button_rand.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + + True + <b>loop controls</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + Loops + True + GTK_RELIEF_HALF + True + False + False + True + + + + 0 + False + True + + + + + + True + True + Frames + True + GTK_RELIEF_HALF + True + True + False + True + sample_mulloop + + + + 0 + True + True + + + + + + True + 00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 7 + False + 0 + + + 0 + True + False + + + + + + + + + + True + <b>units</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 9999999 1 10 10 + + + + + + + True + <b>duration</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + 120 + True + MJPEG +DVVIDEO +MPEG4 +MSMPEG4V3 +YV12 +YV16 +Quicktime-DV +Quicktime-MJPEG +MLZO + False + True + True + + + + + + True + <b>codec</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + Start recording + True + GTK_RELIEF_HALF + True + + + + + True + icon_record.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + True + + + + + + True + Cancel recording + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_recordstop.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + 0 + True + True + + + + + + True + Auto play sample after recording + True + Autoplay + True + GTK_RELIEF_HALF + True + False + False + True + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + PANGO_ELLIPSIZE_NONE + + + + + + True + <b>progress</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + False + True + + + + + + True + <b>record</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + 3 + 2 + False + 0 + 0 + + + + True + End position + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + Start position + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 1000000000 1 25 25 + + + + 1 + 2 + 0 + 1 + fill + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 1000000000 1 25 25 + + + + 1 + 2 + 1 + 2 + fill + + + + + + True + Playback speed + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 -25 25 1 5 5 + + + + 1 + 2 + 2 + 3 + + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + Slow motion multiplier + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 1 12 1 10 10 + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + True + Set title + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + True + True + True + True + 0 + Untitled + True + * + False + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + Enable/disable effectchain + True + GTK_RELIEF_HALF + True + True + False + True + + + + + True + Effect chain enabled + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + False + False + + + + + False + True + + + + + + True + <b>properties</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + False + 0 + + + + True + False + 0 + + + + True + True + True + False + False + True + False + False + False + + + 0 + True + True + + + + + + True + False + 0 + + + + True + Create sample from selection + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_new.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Save EditList + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_save.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Save Selection + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_saveas.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Add Videofiles to EditList + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + 0 + False + False + + + + + + True + 2 + 3 + False + 0 + 0 + + + + True + 00000000000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 12 + False + 0 + + + 1 + 2 + 1 + 2 + + + + + + + True + Positon + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + + True + Total frames + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + + + + + + + True + 000000000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 10 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 11 + False + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 11 + False + 0 + + + 2 + 3 + 1 + 2 + fill + + + + + + 0 + False + True + + + + + + True + 3 + 2 + False + 0 + 5 + + + + True + <i>Starting position</i> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + + + + + + + True + <i>Duration:</i> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + + True + <i>Ending position:</i> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 10 + 0 + PANGO_ELLIPSIZE_NONE + 10 + False + 0 + + + 1 + 2 + 0 + 1 + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 10 + 0 + PANGO_ELLIPSIZE_NONE + 10 + False + 0 + + + 1 + 2 + 1 + 2 + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 10 + 0 + PANGO_ELLIPSIZE_NONE + 10 + False + 0 + + + 1 + 2 + 2 + 3 + + + + + + 0 + False + True + + + + + + True + 2 + 2 + False + 0 + 0 + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 100000000 1 10 10 + + + + 1 + 2 + 1 + 2 + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 100000000 1 10 10 + + + + 1 + 2 + 0 + 1 + + + + + + True + Take current position as starting position + True + Set start + True + GTK_RELIEF_HALF + True + + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Take current position as ending position + True + Set end + True + GTK_RELIEF_HALF + True + + + + 0 + 1 + 1 + 2 + fill + + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + Cut selection to buffer + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_cut.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Copy selection to buffer + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_copy.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Paste from buffer into editlist at current position + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_paste.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Delete selection (without buffer) + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_trash.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Crop to selection + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_crop.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Paste at this position + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 100000000 1 10 10 + + + 0 + True + True + + + + + + True + Paste buffer at position + True + GTK_RELIEF_HALF + True + + + + + True + icon_paste.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + + + True + <b>EditList Operations</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 3 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + <b>EDL</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + False + True + + + + + + True + Sample + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 50 0 999999 1 10 10 + + + + + + + True + <b>Frames:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 00:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 10 + False + 0 + + + + + + True + <b>Timecode:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + + + True + <b>Ficticious length</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 8 + False + 0 + + + + + + True + <b>timecode</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 9999999 1 10 10 + + + + + + + True + <b>duration</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + 120 + True + MJPEG +DVVIDEO +MPEG4 +MSMPEG4V3 +YV12 +YV16 +Quicktime-DV +Quicktime-MJPEG +MLZO + False + True + True + + + + + + True + <b>codec</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + Start recording + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_record.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Cancel recording + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_recordstop.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + False + False + True + + + + True + Autoplay + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + + PANGO_ELLIPSIZE_NONE + + + + + + True + <b>Recording progress</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + False + True + + + + + + True + <b>record</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + True + Effect chain enabled + True + GTK_RELIEF_HALF + True + True + False + True + + + + + + False + True + + + + + + True + <b>properties</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + True + + + + False + True + + + + + + True + <b>solid</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + True + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 6 + 2 + False + 0 + 0 + + + + True + Brightness + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Contrast + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 4 + 5 + fill + fill + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 1 + 2 + fill + fill + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 0 + 1 + fill + + + + + + True + Color + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 5 + 6 + fill + + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 5 + 6 + fill + fill + + + + + + True + Hue + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 2 + 3 + fill + fill + + + + + + True + White + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + fill + + + + + + + True + Saturation + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0 1 0.00999999977648 0.10000000149 0.10000000149 + + + + 1 + 2 + 3 + 4 + fill + fill + + + + + + + + True + Capture card settings + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + + + + True + <b>capture card controls</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + <b>v4l</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + False + True + + + + + + True + Stream + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + 7 + 2 + False + 0 + 0 + + + + True + fps + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + 25 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + Interlacing + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + Top First + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 2 + 3 + fill + + + + + + + True + Norm + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + PAL + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 3 + 4 + fill + + + + + + + True + Audio bits + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + fill + + + + + + + True + 16 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 4 + 5 + fill + + + + + + + True + Audio Channels + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 5 + 6 + fill + + + + + + + True + 2 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 5 + 6 + fill + + + + + + + True + Audio rate + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 6 + 7 + fill + + + + + + + True + 44000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 6 + 7 + fill + + + + + + + True + 352x288 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + Resolution + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + False + True + + + + + + True + Plain + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + False + 0 + + + + True + Enable or disable selected FX + True + + True + GTK_RELIEF_HALF + True + True + False + True + + + + 0 + False + False + + + + + + + + + + 36 + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 19 1 10 10 + + + + 0 + False + True + + + + + + True + True + True + True + 0 + + True + * + False + 15 + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 96 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + False + True + + + + + + + + True + <b>p0</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 146 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + False + True + + + + + + + + True + <b>p1</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 201 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + False + True + + + + + + + + True + <b>p2</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 0 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + False + True + + + + + + + + True + <b>p3</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 96 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + False + True + + + + + + + + True + <b>p4</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 96 0 255 0 0 0 + + + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + False + True + + + + + + + + True + <b>p5</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 86 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + False + True + + + + + + + + True + <b>p6</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + True + GTK_POS_BOTTOM + 0 + GTK_UPDATE_CONTINUOUS + True + 126 0 255 0 0 0 + + + + 0 + True + True + + + + + + True + 0.5 + 0.5 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + + 0 + False + False + + + + + + + + True + <b>p7</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_ALWAYS + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + False + True + + + + + + True + <b>mixing sources</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + Mixing effects + True + GTK_RELIEF_HALF + True + False + False + True + + + + 0 + False + False + + + + + + True + True + Image effects + True + GTK_RELIEF_HALF + True + False + False + True + mixing_effects + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + False + False + GTK_POS_RIGHT + False + False + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_ALWAYS + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + False + True + + + + + + True + video effects + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 270 + + + tab + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + False + True + + + + + + True + image effects + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 270 + + + tab + + + + + 0 + True + True + + + + + False + True + + + + + + True + <b>FX list</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_NONE + + + + True + False + True + + + + + + + False + True + + + + + + True + <b>RGB control</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + + + + True + <b>FX controls</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + True + False + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + 352 + 288 + True + veejay-logo.png + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + True + <b>preview</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + enable + True + GTK_RELIEF_HALF + True + False + False + True + + + + 0 + False + False + + + + + + True + True + grayscale + True + GTK_RELIEF_HALF + True + False + False + True + + + + 0 + True + False + + + + + + True + False + 0 + + + + True + Quality + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Very low quality preview + True + 1/8 + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + True + Low quality preview + True + 1/4 + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + True + Medium quality preview + True + 1/2 + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + True + High quality preview + True + 1/1 + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + 0 + True + True + + + + + + + + True + <b>preview settings</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_ALWAYS + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + + True + False + 0 + + + + 82 + True + True + False + GTK_POS_LEFT + 1 + GTK_UPDATE_CONTINUOUS + True + 0 0 255 1 10 0 + + + + 0 + True + True + + + + + + True + Toggle logarithmic scale + True + Log + True + GTK_RELIEF_HALF + True + False + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + + + + True + <b>effects chain</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + Create bundle + True + GTK_RELIEF_HALF + True + + + + + True + icon_bundle.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Clear Entry + True + GTK_RELIEF_HALF + True + + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Cut entry + True + GTK_RELIEF_HALF + True + + + + + True + icon_cut.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Copy entry + True + GTK_RELIEF_HALF + True + + + + + True + icon_copy.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Paste entry + True + GTK_RELIEF_HALF + True + + + + + True + icon_paste.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Enable/Disable all keyframes + True + GTK_RELIEF_HALF + True + False + False + + + + + True + icon_keyframe.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 0 + True + True + + + + + + True + Clear Chain + True + GTK_RELIEF_HALF + True + + + + + True + icon_clearall.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + Set fade duration + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 1 0.0500000007451 0.10000000149 0.10000000149 + + + + 0 + True + True + + + + + + True + Fade In + True + GTK_RELIEF_HALF + True + + + + + True + icon_fadein.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Fade Out + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_fadeout.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + + True + <b>Auto chain fade</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + 0 + True + True + + + + + 0 + False + True + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 3 + 4 + False + 0 + 0 + + + + True + L: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + T: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 12 + False + 0 + + + 3 + 4 + 0 + 1 + fill + + + + + + + True + 0:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 12 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + 00000000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 12 + False + 0 + + + 3 + 4 + 1 + 2 + fill + + + + + + + True + F: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 1 + 2 + fill + + + + + + + True + 00000 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 5 + False + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + Sample + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 7 + False + 0 + + + 0 + 1 + 1 + 2 + shrink + shrink + + + + + + True + M: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + 00:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 12 + False + 0 + + + 1 + 2 + 2 + 3 + fill + + + + + + + + + True + <b>status</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + Pause event playback + True + GTK_RELIEF_NORMAL + True + True + False + True + + + + + True + icon_macropause.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Start recording events (keyboard and user interface) + True + GTK_RELIEF_NORMAL + True + False + False + True + macrostop + + + + + True + icon_macrorec.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Start playing recorded events + True + GTK_RELIEF_NORMAL + True + False + False + True + macrostop + + + + + True + icon_macroplay.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Clear recorded events + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_macroclear.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + + True + <b>keystroke recorder</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + 80 + True + True + True + GTK_POS_RIGHT + 0 + GTK_UPDATE_CONTINUOUS + False + 0 0 0 0 0 0 + + + + + + + + + True + <b>playback speed</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + 24 + 24 + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_decrement.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + 24 + 24 + True + True + GTK_RELIEF_HALF + True + + + + + True + button_mini_increment.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + 100 + True + True + True + GTK_POS_LEFT + 2 + GTK_UPDATE_CONTINUOUS + False + 25 1 100 1 10 0 + + + + 0 + True + True + + + + + + True + Fallback to default framerate + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_refresh.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + + True + <b>veejay framerate</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + True + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_gotostart.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_fbw.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_reverse.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_pause.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_play.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_ffw.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_gotoend.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + 0 + False + False + + + + + + + + + + True + True + 0 + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_prev.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + button_skip.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Mark current position as start of a new sample + True + [... + True + GTK_RELIEF_HALF + True + + + + 0 + True + True + + + + + + True + Mark current position as sample end and create new sample + True + ...] + True + GTK_RELIEF_HALF + True + + + + 0 + True + True + + + + + 0 + False + True + + + + + 0 + False + True + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + << + True + GTK_RELIEF_NONE + True + + + + 0 + True + True + + + + + + True + Active bank: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 100 1 10 10 + + + + 0 + False + True + + + + + + True + True + >> + True + GTK_RELIEF_NONE + True + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + + + + + + + + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + Add a video or image file as a new sample + True + GTK_RELIEF_HALF + True + + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Create a new stream (v4l, dv, network ...) + True + GTK_RELIEF_HALF + True + + + + + True + icon_stream.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Create a new solid colored stream + True + GTK_RELIEF_HALF + True + + + + + True + icon_color.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + Open Samplelist + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_openlist.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Save Samplelist + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_saveas.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Copy sample to new + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_copy.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Delete selected slot + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Switch to property panel + True + GTK_RELIEF_HALF + True + + + + + True + gtk-preferences + 4 + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 0 + False + True + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + Randomize sample duration + True + Free Style + True + GTK_RELIEF_HALF + True + False + False + True + + + 0 + True + True + + + + + + True + Start / Stop randomizer + True + GTK_RELIEF_HALF + True + False + False + + + + + 20 + 20 + True + button_rand.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + True + <b>Sample randomizer</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + 0 + True + True + + + + + False + True + + + + + + True + <b>banks</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_NONE + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + Play and repeat sample grid + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + True + Play and record this sequence to a new sample + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_record.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Stop recording from this sequence + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_recordstop.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + PANGO_ELLIPSIZE_NONE + + + 0 + False + False + + + + + 0 + False + False + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + + + + + + + + 0 + True + True + + + + + + True + Click an empty slot to place current selected sample. + SHIFT-Click a slot to remove the sample. + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + True + <b>Sample Grid</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + + + + + False + True + + + + + + True + <b>SEQ</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_connect.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Add Track + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_disconnect.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Close Track + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + 0 + False + True + + + + + 0 + False + False + + + + + + True + False + 0 + + + + + + + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_gotostart.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_reverse.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_pause.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_play.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_skip.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_gotoend.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_dec.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_inc.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_prev.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 0 + False + True + + + + + 0 + True + True + + + + + + True + sync start! + True + GTK_RELIEF_NORMAL + True + + + + + True + sync.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + + True + <b>Sync controls</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + False + True + + + + + + True + <b>MT</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + False + 0 + + + + True + New SRT Sequence + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + button_text.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + 25 + True + 1 +2 +3 +4 +5 + False + True + True + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + 0 + + + + True + Delete this SRT Sequence + True + GTK_RELIEF_NORMAL + True + + + + + True + button_skull.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Apply Text and Start/End position + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_apply.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Load SRT file + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + True + True + + + + + + True + Save SRT file + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_save.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + 0 + False + True + + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + 75 + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 100 1 10 10 + + + + 0 + False + True + + + + + + True + 00:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + True + <b>start</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + 75 + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 100 1 10 10 + + + + 0 + False + True + + + + + + True + 00:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + True + <b>end</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + 100 + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + Veejay Font + False + True + True + + + + + + + True + <b>face</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 100 1 10 10 + + + + + + + True + <b>Size</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + False + 0 + + + + True + <b>X</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 1000 1 10 10 + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + <b>Y</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 1000 1 10 10 + + + + 0 + True + True + + + + + 0 + True + True + + + + + + + + True + <b>Position</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + + + + True + <b>font</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + Outline + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + True + True + Border + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + Set this foreground color + True + GTK_RELIEF_NORMAL + True + + + + + 24 + 24 + True + + + + + + + + True + Foreground color + True + FG + True + GTK_RELIEF_NORMAL + True + True + False + True + + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + Set this background color + True + GTK_RELIEF_NORMAL + True + + + + + 24 + 24 + True + + + + + + + + True + Background color + True + BG + True + GTK_RELIEF_NORMAL + True + False + False + True + textcolorfg + + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + Set this line color + True + GTK_RELIEF_NORMAL + True + + + + + 24 + 24 + True + + + + + + + + True + Line color + True + LC + True + GTK_RELIEF_NORMAL + True + False + False + True + textcolorfg + + + + label_item + + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + 0.5 + 0.5 + 1 + 1 + 17 + 0 + 4 + 4 + + + + True + 4 + 5 + False + 0 + 0 + + + + 24 + 24 + True + + + 1 + 2 + 0 + 1 + fill + + + + + + 24 + 24 + True + + + 1 + 2 + 1 + 2 + fill + fill + + + + + + 24 + 24 + True + + + 1 + 2 + 2 + 3 + fill + fill + + + + + + 100 + True + True + True + GTK_POS_RIGHT + 0 + GTK_UPDATE_CONTINUOUS + False + 255 0 255 1 10 0 + + + + 2 + 5 + 0 + 1 + fill + + + + + + 100 + True + True + True + GTK_POS_RIGHT + 0 + GTK_UPDATE_CONTINUOUS + False + 255 0 255 1 10 0 + + + + 2 + 5 + 1 + 2 + fill + fill + + + + + + 100 + True + True + True + GTK_POS_RIGHT + 0 + GTK_UPDATE_CONTINUOUS + False + 255 0 255 1 10 0 + + + + 2 + 5 + 2 + 3 + fill + fill + + + + + + 100 + True + True + True + GTK_POS_RIGHT + 0 + GTK_UPDATE_CONTINUOUS + False + 0 0 255 1 10 0 + + + + 2 + 5 + 3 + 4 + fill + fill + + + + + + True + <b>R</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + 4 + fill + + + + + + + True + <b>G</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + 4 + fill + + + + + + + True + <b>B</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + 4 + fill + + + + + + + True + <b>A</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + 4 + fill + + + + + + + + 0 + True + True + + + + + + + + True + <b>Color</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + + + True + <b>Text</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + + + + False + True + + + + + + True + <b>SRT</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + 150 + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + True + True + True + 0 + + True + * + False + + + + 3 + True + True + + + + + + True + Send VIMS to veejay + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_send.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + True + + + + + 0 + False + True + + + + + + True + False + 0 + + + + True + True + _Clear + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_gotostart.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + button_gotoend.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + repeat + True + GTK_RELIEF_NORMAL + True + False + False + + + 0 + False + False + + + + + 0 + False + True + + + + + + + + True + <b>VIMS messenger</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + False + True + + + + + + True + <b>VIMS</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + False + 0 + + + + True + <b>current control:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + P0 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + False + + + + + + True + Toggle keyframing for this chain entry + True + GTK_RELIEF_HALF + True + False + False + + + + + True + icon_keyframe.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + True + True + 0 + + + + True + Apply this keyframe + True + GTK_RELIEF_HALF + True + + + + + True + icon_apply.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + Start keyframing + True + GTK_RELIEF_HALF + True + False + False + + + + + True + button_play.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + + True + Reset + True + GTK_RELIEF_HALF + True + + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + 1 + 8 + False + 0 + 0 + + + + True + True + 0 + True + GTK_RELIEF_HALF + True + False + False + True + + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + 2 + True + GTK_RELIEF_HALF + True + False + False + True + kf_p0 + + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + True + 3 + True + GTK_RELIEF_HALF + True + False + False + True + kf_p0 + + + + 3 + 4 + 0 + 1 + fill + + + + + + + True + True + 4 + True + GTK_RELIEF_HALF + True + False + False + True + kf_p0 + + + + 4 + 5 + 0 + 1 + fill + + + + + + + True + True + 5 + True + GTK_RELIEF_HALF + True + False + False + True + kf_p0 + + + + 5 + 6 + 0 + 1 + fill + + + + + + + True + True + 6 + True + GTK_RELIEF_HALF + True + False + False + True + kf_p0 + + + + 6 + 7 + 0 + 1 + fill + + + + + + + True + True + 7 + True + GTK_RELIEF_HALF + True + False + False + True + kf_p0 + + + + 7 + 8 + 0 + 1 + fill + + + + + + + True + True + 1 + True + GTK_RELIEF_HALF + True + False + False + True + kf_p0 + + + + 1 + 2 + 0 + 1 + fill + + + + + + 0 + True + True + + + + + + + + True + <b>animate FX</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 1 + 0 + 1 + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + Linear + True + GTK_RELIEF_HALF + True + False + False + True + + + + 0 + False + False + + + + + + True + True + Spline + True + GTK_RELIEF_HALF + True + False + False + True + curve_typelinear + + + + 0 + False + False + + + + + + True + True + Freehand + True + GTK_RELIEF_HALF + True + False + False + True + curve_typelinear + + + + 0 + False + False + + + + + + + + True + <b>Curve drawing method</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 2 + 5 + False + 0 + 0 + + + + True + startframe + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 100 1 10 10 + + + + 1 + 2 + 0 + 1 + + + + + + + True + endframe + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 100 1 10 10 + + + + 3 + 4 + 0 + 1 + + + + + + + True + 00:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 0 + False + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + 00:00:00:00 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.490000009537 + 0 + 0 + PANGO_ELLIPSIZE_NONE + 0 + False + 0 + + + 3 + 4 + 1 + 2 + fill + + + + + + + Update start/end + True + GTK_RELIEF_NORMAL + True + + + + + True + icon_refresh.png + 0.5 + 0.5 + 0 + 0 + + + + + 4 + 5 + 1 + 2 + fill + + + + + + + + + True + <b>timeline</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + False + True + + + + + + True + <b>FX anim</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + + 32 + True + False + 0 + + + + + + + 0 + False + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + False + + + 0 + True + True + + + + + + True + [hostname] + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + [port] + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + 0 + False + False + + + + + + + + True + Connect to Veejay + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ALWAYS + False + 356 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + False + + Reloaded Launcher + + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + GTK_RELIEF_HALF + True + 0 + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_connect.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Connect + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + + True + True + True + gtk-close + True + GTK_RELIEF_HALF + True + -7 + + + + + + 0 + False + False + GTK_PACK_END + + + + + + True + False + 3 + + + + 352 + 288 + True + veejay-logo.png + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + ver.3144 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + True + True + 0 + + True + * + False + + + + 0 + True + True + + + + + + True + Open EditList/Videofile + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Open advanced properties dialog + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + gtk-preferences + 4 + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + + True + <b>Video File</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + Hostname/IP address + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + True + True + 0 + localhost + True + * + False + + + + + 0 + True + True + + + + + + True + Port + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 3490 1024 65535 1 4 4 + + + 0 + True + True + + + + + + + + True + <b>Connection settings</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + 0 + False + True + + + + + + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + PANGO_ELLIPSIZE_NONE + + + 0 + False + False + GTK_PACK_END + + + + + + + + VIMS Bundles + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + 600 + 550 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-close + True + GTK_RELIEF_HALF + True + -7 + + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + 1 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + True + 0 + + + + True + New + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_new.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Load Actionfile + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Write Actionfile + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_saveas.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Set/Change Key + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_keybind.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Delete selected bundle + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Deatach Key from selected event + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_keydetach.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + True + True + 0 + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + True + False + + + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + False + 0 + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + True + 0 + + + + True + Apply changes to this bundle + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_send.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + True + True + + + + + + True + Clear text + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_clear.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + True + True + + + + + 0 + False + True + + + + + 1 + False + True + + + + + + + + True + <b>Edit VIMS message contents </b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + + + GVeejay Reloaded - Preferences + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-close + True + GTK_RELIEF_HALF + True + -7 + + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + 2 + 4 + False + 2 + 5 + + + + True + Width + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Image format + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 2 + 1 + 2 + fill + + + + + + + True + Height + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 0 + 1 + + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 4096 1 10 10 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 0 4096 1 10 10 + + + 3 + 4 + 0 + 1 + fill + + + + + + + True + Type extension to select image format (jpeg, png, ...) + True + True + True + 12 + jpeg + True + * + False + 5 + + + 2 + 4 + 1 + 2 + fill + + + + + + 0 + False + True + + + + + + + + + + True + <b>Screenshot</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 2 + True + True + + + + + + False + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + 3 + 4 + False + 2 + 5 + + + + True + Width: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Height: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 176 1 800 1 10 10 + + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 144 1 800 1 10 10 + + + + 1 + 2 + 1 + 2 + fill + + + + + + + Frame delay + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 1 100 1 10 10 + + + 3 + 4 + 0 + 1 + fill + + + + + + + True + Keep 4:3 aspect + True + GTK_RELIEF_HALF + True + True + False + True + + + 2 + 4 + 1 + 2 + fill + + + + + + + True + FPS + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + False + 0 + + + + True + True + False + GTK_POS_TOP + 2 + GTK_UPDATE_CONTINUOUS + False + 0 0.019999999553 1 0.019999999553 0 0 + + + + 0 + True + True + + + + + 1 + 3 + 2 + 3 + fill + fill + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 3 + 4 + 2 + 3 + fill + + + + + + + + + + + True + <b>Video preview</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 3 + True + True + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 1 + + + + True + True + Record video from Viewport + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + True + False + + + + + + True + Configure Viewport + True + GTK_RELIEF_NORMAL + True + + + 0 + False + False + + + + + + + + + + True + <b>Viewport settings</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 2 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + 2 + 4 + False + 2 + 5 + + + + True + Width: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Height: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + X offset: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + Y offset: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 1 + 2 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 2 0 4096 1 10 10 + + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 4096 1 10 10 + + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 4096 1 10 10 + + + 3 + 4 + 0 + 1 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 0 4096 1 10 10 + + + 3 + 4 + 1 + 2 + fill + + + + + + 0 + True + True + + + + + + True + True + Keep 4:3 aspect + True + GTK_RELIEF_HALF + True + True + False + True + + + 0 + False + False + + + + + + True + True + Fullscreen (CTRL-F = window) + True + GTK_RELIEF_HALF + True + False + False + True + + + + 0 + False + False + + + + + + True + GTK_BUTTONBOX_START + 10 + + + + True + Apply changes to primary output settings + True + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-execute + 2 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Apply + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + + True + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-close + 2 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Close + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + 0 + True + True + + + + + + + + + + True + <b>Primary Video Window (SDL)</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 2 + True + True + + + + + 0 + True + True + + + + + 3 + True + True + + + + + + + + GVeejay Reloaded - New input stream + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + 400 + 400 + True + False + icon_stream.png + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + + + + + 340 + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + True + 0 + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + Double click to active, single click column for changing settings + True + True + False + False + True + False + False + False + + + + + + + + True + <b>Device</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + True + True + 0 + + + + True + 2 + 4 + False + 0 + 4 + + + + True + True + True + True + 200 + localhost + True + * + False + + + 2 + 3 + 0 + 1 + + + + + + + True + Remote + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + True + Use multicast + True + GTK_RELIEF_HALF + True + False + False + True + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Port Number + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 4490 1 65535 1 10 10 + + + 2 + 3 + 1 + 2 + + + + + + + True + True + Try + True + GTK_RELIEF_HALF + True + + + + 3 + 4 + 1 + 2 + + + + + + + + + True + <b>Network</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + True + 0 + + + + True + 2 + 5 + False + 0 + 4 + + + + True + Filename + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + True + use YUV4MPEG + True + GTK_RELIEF_HALF + True + False + False + True + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + use FFmpeg + True + GTK_RELIEF_HALF + True + False + False + True + inputstream_filey4m + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 2 + 4 + 0 + 1 + + + + + + + True + True + Try + True + GTK_RELIEF_HALF + True + + + 4 + 5 + 1 + 2 + fill + + + + + + + True + Load Actionfile + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_open.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 4 + 5 + 0 + 1 + fill + + + + + + + + + True + <b>File</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + + True + 1 + 4 + False + 0 + 0 + + + + True + Close this window + True + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-close + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Close + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 3 + 4 + 0 + 1 + shrink + shrink + + + + + 0 + False + False + + + + + + + + + + True + <b>Stream types</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + + + + False + ladida + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + True + False + 0 + + + + True + False + 0 + + + + True + 0 + 0 + GTK_SHADOW_NONE + + + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + Open Veejay Liveset / Action file + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + bg_red.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Save Veejay Liveset / Actionfile + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + bg_yellow.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + Cancel + True + GTK_RELIEF_HALF + True + + + + + True + icon_disconnect.png + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + + + + + + + + + True + Play selected slot + True + GTK_RELIEF_HALF + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + icon_send.png + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + + + + True + True + button119 + True + GTK_RELIEF_HALF + True + + + 0 + False + False + + + + + 0 + True + True + + + + + + True + False + GTK_POS_TOP + 0 + GTK_UPDATE_CONTINUOUS + False + 0.10000000149 0 1 0.00999999977648 0.10000000149 0 + + + + 0 + True + True + + + + + 0 + True + True + + + + + + + diff --git a/veejay-client/share/gveejay.reloaded.gladep b/veejay-client/share/gveejay.reloaded.gladep new file mode 100644 index 00000000..183077ba --- /dev/null +++ b/veejay-client/share/gveejay.reloaded.gladep @@ -0,0 +1,8 @@ + + + + + + + FALSE + diff --git a/veejay-client/share/gveejay.reloaded.gladep.bak b/veejay-client/share/gveejay.reloaded.gladep.bak new file mode 100644 index 00000000..183077ba --- /dev/null +++ b/veejay-client/share/gveejay.reloaded.gladep.bak @@ -0,0 +1,8 @@ + + + + + + + FALSE + diff --git a/veejay-client/share/high_contrast.rc b/veejay-client/share/high_contrast.rc new file mode 100644 index 00000000..56e9763a --- /dev/null +++ b/veejay-client/share/high_contrast.rc @@ -0,0 +1,118 @@ +# Edit these colors and fonts however you like. +style "default" +{ + engine "hcengine" {} + xthickness = 1 + ythickness = 1 + GtkWidget::shadow_type = GTK_SHADOW_ETCHED_OUT + #GtkWidget::interior_focus = 0 + #GtkWidget::focus_padding = 0 + #GtkWidget::default_border = {0, 0, 0, 0} + #GtkWidget::default_outside_border = {0, 0, 0, 0} + GtkWidget::default_spacing = 0 + GtkScale::stepper_size = 8 + GtkRange::through-width = 4 + GtkRange::trough_border = 0 + GtkRange::slider-width = 16 + GtkScale::slider-length = 10 + + font_name = "Sans 8" + + fg[NORMAL] = "#000000" # borders etc. + fg[PRELIGHT] = "#ffffff" + fg[ACTIVE] = "#000000" # ook borders, van sliders en notebook + fg[SELECTED] = "#ffffff" + fg[INSENSITIVE] = "#c0c0c0" + + bg[NORMAL] = "#ffffff" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#c0c0c0" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#00ff00" + bg[INSENSITIVE] = "#ffffff" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#050505" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#c0c0c0" + base[PRELIGHT] = "#00fff0" # achtergrond van lists, status bars + base[ACTIVE] = "#0000ff" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + +style "text" +{ + font_name = "Sans 8" + + fg[NORMAL] = "#ffffff" # borders etc. + fg[PRELIGHT] = "#ffffff" + fg[ACTIVE] = "#ffffff" # ook borders, van sliders en notebook + fg[SELECTED] = "#ffffff" + fg[INSENSITIVE] = "#ffffff" + + bg[NORMAL] = "#27282F" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#454f60" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + + +style "buttons" +{ + + font_name = "Sans 8" + + fg[NORMAL] = "#888888" + fg[PRELIGHT] = "#888888" + fg[ACTIVE] = "#888888" + fg[SELECTED] = "#888888" + fg[INSENSITIVE] = "#888888" + + bg[NORMAL] = "#27282F" + bg[PRELIGHT] = "#aaacc1" + bg[ACTIVE] = "#454f60" + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + + + +class "GtkButton" style "default" +class "GtkSpinButton" style "default" +class "GtkToggleButton" style "default" +class "GtkCheckBox" style "default" + +class "GtkLabel" style "default" + +class "GtkWidget" style "default" diff --git a/veejay-client/share/icon_apply.png b/veejay-client/share/icon_apply.png new file mode 100644 index 00000000..cb075f1f Binary files /dev/null and b/veejay-client/share/icon_apply.png differ diff --git a/veejay-client/share/icon_berserk.png b/veejay-client/share/icon_berserk.png new file mode 100644 index 00000000..6270ece0 Binary files /dev/null and b/veejay-client/share/icon_berserk.png differ diff --git a/veejay-client/share/icon_bezerk.png b/veejay-client/share/icon_bezerk.png new file mode 100644 index 00000000..6270ece0 Binary files /dev/null and b/veejay-client/share/icon_bezerk.png differ diff --git a/veejay-client/share/icon_bounce.png b/veejay-client/share/icon_bounce.png new file mode 100644 index 00000000..82bbce6a Binary files /dev/null and b/veejay-client/share/icon_bounce.png differ diff --git a/veejay-client/share/icon_bug.png b/veejay-client/share/icon_bug.png new file mode 100644 index 00000000..a6582fe7 Binary files /dev/null and b/veejay-client/share/icon_bug.png differ diff --git a/veejay-client/share/icon_bundle.png b/veejay-client/share/icon_bundle.png new file mode 100644 index 00000000..ffd2d178 Binary files /dev/null and b/veejay-client/share/icon_bundle.png differ diff --git a/veejay-client/share/icon_cache.png b/veejay-client/share/icon_cache.png new file mode 100644 index 00000000..e4d90492 Binary files /dev/null and b/veejay-client/share/icon_cache.png differ diff --git a/veejay-client/share/icon_clear.png b/veejay-client/share/icon_clear.png new file mode 100644 index 00000000..512b6623 Binary files /dev/null and b/veejay-client/share/icon_clear.png differ diff --git a/veejay-client/share/icon_clearall.png b/veejay-client/share/icon_clearall.png new file mode 100644 index 00000000..709fdeb8 Binary files /dev/null and b/veejay-client/share/icon_clearall.png differ diff --git a/veejay-client/share/icon_color.png b/veejay-client/share/icon_color.png new file mode 100644 index 00000000..291ccf01 Binary files /dev/null and b/veejay-client/share/icon_color.png differ diff --git a/veejay-client/share/icon_connect.png b/veejay-client/share/icon_connect.png new file mode 100644 index 00000000..49cb2217 Binary files /dev/null and b/veejay-client/share/icon_connect.png differ diff --git a/veejay-client/share/icon_copy.png b/veejay-client/share/icon_copy.png new file mode 100644 index 00000000..9d14bc7e Binary files /dev/null and b/veejay-client/share/icon_copy.png differ diff --git a/veejay-client/share/icon_crop.png b/veejay-client/share/icon_crop.png new file mode 100644 index 00000000..5b35f81a Binary files /dev/null and b/veejay-client/share/icon_crop.png differ diff --git a/veejay-client/share/icon_cut.png b/veejay-client/share/icon_cut.png new file mode 100644 index 00000000..05fe1a0c Binary files /dev/null and b/veejay-client/share/icon_cut.png differ diff --git a/veejay-client/share/icon_disconnect.png b/veejay-client/share/icon_disconnect.png new file mode 100644 index 00000000..84217c10 Binary files /dev/null and b/veejay-client/share/icon_disconnect.png differ diff --git a/veejay-client/share/icon_fadein.png b/veejay-client/share/icon_fadein.png new file mode 100644 index 00000000..797fe2fe Binary files /dev/null and b/veejay-client/share/icon_fadein.png differ diff --git a/veejay-client/share/icon_fadeout.png b/veejay-client/share/icon_fadeout.png new file mode 100644 index 00000000..78f8946d Binary files /dev/null and b/veejay-client/share/icon_fadeout.png differ diff --git a/veejay-client/share/icon_jack.png b/veejay-client/share/icon_jack.png new file mode 100644 index 00000000..cf2fe3fb Binary files /dev/null and b/veejay-client/share/icon_jack.png differ diff --git a/veejay-client/share/icon_keybind.png b/veejay-client/share/icon_keybind.png new file mode 100644 index 00000000..fd7b0994 Binary files /dev/null and b/veejay-client/share/icon_keybind.png differ diff --git a/veejay-client/share/icon_keydetach.png b/veejay-client/share/icon_keydetach.png new file mode 100644 index 00000000..c3ce1b77 Binary files /dev/null and b/veejay-client/share/icon_keydetach.png differ diff --git a/veejay-client/share/icon_keyframe.png b/veejay-client/share/icon_keyframe.png new file mode 100644 index 00000000..498668a0 Binary files /dev/null and b/veejay-client/share/icon_keyframe.png differ diff --git a/veejay-client/share/icon_launch.png b/veejay-client/share/icon_launch.png new file mode 100644 index 00000000..49cb2217 Binary files /dev/null and b/veejay-client/share/icon_launch.png differ diff --git a/veejay-client/share/icon_loop.png b/veejay-client/share/icon_loop.png new file mode 100644 index 00000000..aacf503f Binary files /dev/null and b/veejay-client/share/icon_loop.png differ diff --git a/veejay-client/share/icon_looponce.png b/veejay-client/share/icon_looponce.png new file mode 100644 index 00000000..3e2e20d9 Binary files /dev/null and b/veejay-client/share/icon_looponce.png differ diff --git a/veejay-client/share/icon_macroclear.png b/veejay-client/share/icon_macroclear.png new file mode 100644 index 00000000..c1f61079 Binary files /dev/null and b/veejay-client/share/icon_macroclear.png differ diff --git a/veejay-client/share/icon_macropause.png b/veejay-client/share/icon_macropause.png new file mode 100644 index 00000000..a06f6f7c Binary files /dev/null and b/veejay-client/share/icon_macropause.png differ diff --git a/veejay-client/share/icon_macroplay.png b/veejay-client/share/icon_macroplay.png new file mode 100644 index 00000000..db42baa9 Binary files /dev/null and b/veejay-client/share/icon_macroplay.png differ diff --git a/veejay-client/share/icon_macrorec.png b/veejay-client/share/icon_macrorec.png new file mode 100644 index 00000000..5e304b50 Binary files /dev/null and b/veejay-client/share/icon_macrorec.png differ diff --git a/veejay-client/share/icon_mask.png b/veejay-client/share/icon_mask.png new file mode 100644 index 00000000..8b7fbec5 Binary files /dev/null and b/veejay-client/share/icon_mask.png differ diff --git a/veejay-client/share/icon_minus.png b/veejay-client/share/icon_minus.png new file mode 100644 index 00000000..03059371 Binary files /dev/null and b/veejay-client/share/icon_minus.png differ diff --git a/veejay-client/share/icon_new.png b/veejay-client/share/icon_new.png new file mode 100644 index 00000000..c553eb00 Binary files /dev/null and b/veejay-client/share/icon_new.png differ diff --git a/veejay-client/share/icon_noloop.png b/veejay-client/share/icon_noloop.png new file mode 100644 index 00000000..fef7bfcf Binary files /dev/null and b/veejay-client/share/icon_noloop.png differ diff --git a/veejay-client/share/icon_open.png b/veejay-client/share/icon_open.png new file mode 100644 index 00000000..4df40ebc Binary files /dev/null and b/veejay-client/share/icon_open.png differ diff --git a/veejay-client/share/icon_openlist.png b/veejay-client/share/icon_openlist.png new file mode 100644 index 00000000..a7487645 Binary files /dev/null and b/veejay-client/share/icon_openlist.png differ diff --git a/veejay-client/share/icon_openstream.png b/veejay-client/share/icon_openstream.png new file mode 100644 index 00000000..3f0bc34d Binary files /dev/null and b/veejay-client/share/icon_openstream.png differ diff --git a/veejay-client/share/icon_osd.png b/veejay-client/share/icon_osd.png new file mode 100644 index 00000000..e195c9ad Binary files /dev/null and b/veejay-client/share/icon_osd.png differ diff --git a/veejay-client/share/icon_paste.png b/veejay-client/share/icon_paste.png new file mode 100644 index 00000000..337df33c Binary files /dev/null and b/veejay-client/share/icon_paste.png differ diff --git a/veejay-client/share/icon_plarge.png b/veejay-client/share/icon_plarge.png new file mode 100644 index 00000000..f1116bfd Binary files /dev/null and b/veejay-client/share/icon_plarge.png differ diff --git a/veejay-client/share/icon_playmode.png b/veejay-client/share/icon_playmode.png new file mode 100644 index 00000000..efe2350f Binary files /dev/null and b/veejay-client/share/icon_playmode.png differ diff --git a/veejay-client/share/icon_plus.png b/veejay-client/share/icon_plus.png new file mode 100644 index 00000000..830a8024 Binary files /dev/null and b/veejay-client/share/icon_plus.png differ diff --git a/veejay-client/share/icon_psmall.png b/veejay-client/share/icon_psmall.png new file mode 100644 index 00000000..ec2e287a Binary files /dev/null and b/veejay-client/share/icon_psmall.png differ diff --git a/veejay-client/share/icon_question.png b/veejay-client/share/icon_question.png new file mode 100644 index 00000000..dab7e54f Binary files /dev/null and b/veejay-client/share/icon_question.png differ diff --git a/veejay-client/share/icon_record.png b/veejay-client/share/icon_record.png new file mode 100644 index 00000000..80d7747b Binary files /dev/null and b/veejay-client/share/icon_record.png differ diff --git a/veejay-client/share/icon_recordstop.png b/veejay-client/share/icon_recordstop.png new file mode 100644 index 00000000..924b1085 Binary files /dev/null and b/veejay-client/share/icon_recordstop.png differ diff --git a/veejay-client/share/icon_recstop.png b/veejay-client/share/icon_recstop.png new file mode 100644 index 00000000..c2e2d09c Binary files /dev/null and b/veejay-client/share/icon_recstop.png differ diff --git a/veejay-client/share/icon_refresh.png b/veejay-client/share/icon_refresh.png new file mode 100644 index 00000000..5d141530 Binary files /dev/null and b/veejay-client/share/icon_refresh.png differ diff --git a/veejay-client/share/icon_render.png b/veejay-client/share/icon_render.png new file mode 100644 index 00000000..d3dc9659 Binary files /dev/null and b/veejay-client/share/icon_render.png differ diff --git a/veejay-client/share/icon_save.png b/veejay-client/share/icon_save.png new file mode 100644 index 00000000..cd1e9455 Binary files /dev/null and b/veejay-client/share/icon_save.png differ diff --git a/veejay-client/share/icon_saveas.png b/veejay-client/share/icon_saveas.png new file mode 100644 index 00000000..514ef83c Binary files /dev/null and b/veejay-client/share/icon_saveas.png differ diff --git a/veejay-client/share/icon_screenshot.png b/veejay-client/share/icon_screenshot.png new file mode 100644 index 00000000..dba2ed23 Binary files /dev/null and b/veejay-client/share/icon_screenshot.png differ diff --git a/veejay-client/share/icon_send.png b/veejay-client/share/icon_send.png new file mode 100644 index 00000000..3ccdfc88 Binary files /dev/null and b/veejay-client/share/icon_send.png differ diff --git a/veejay-client/share/icon_skull.png b/veejay-client/share/icon_skull.png new file mode 100644 index 00000000..a9de432f Binary files /dev/null and b/veejay-client/share/icon_skull.png differ diff --git a/veejay-client/share/icon_stream.png b/veejay-client/share/icon_stream.png new file mode 100644 index 00000000..cdc841b0 Binary files /dev/null and b/veejay-client/share/icon_stream.png differ diff --git a/veejay-client/share/icon_trash.png b/veejay-client/share/icon_trash.png new file mode 100644 index 00000000..6b3933ce Binary files /dev/null and b/veejay-client/share/icon_trash.png differ diff --git a/veejay-client/share/icon_video.png b/veejay-client/share/icon_video.png new file mode 100644 index 00000000..cdc841b0 Binary files /dev/null and b/veejay-client/share/icon_video.png differ diff --git a/veejay-client/share/knob.png b/veejay-client/share/knob.png new file mode 100644 index 00000000..af1ac70a Binary files /dev/null and b/veejay-client/share/knob.png differ diff --git a/veejay-client/share/smooth.rc b/veejay-client/share/smooth.rc new file mode 100644 index 00000000..2c7fe55b --- /dev/null +++ b/veejay-client/share/smooth.rc @@ -0,0 +1,118 @@ +# Edit these colors and fonts however you like. +style "default" +{ + engine "hcengine" {} + xthickness = 1 + ythickness = 1 + GtkWidget::shadow_type = GTK_SHADOW_ETCHED_OUT + #GtkWidget::interior_focus = 0 + #GtkWidget::focus_padding = 0 + #GtkWidget::default_border = {0, 0, 0, 0} + #GtkWidget::default_outside_border = {0, 0, 0, 0} + GtkWidget::default_spacing = 0 + GtkScale::stepper_size = 8 + GtkRange::through-width = 4 + GtkRange::trough_border = 0 + GtkRange::slider-width = 16 + GtkScale::slider-length = 10 + + font_name = "Trebuchet MS 8" + + fg[NORMAL] = "#000000" # borders etc. + fg[PRELIGHT] = "#ffffff" + fg[ACTIVE] = "#000000" # ook borders, van sliders en notebook + fg[SELECTED] = "#ffffff" + fg[INSENSITIVE] = "#c0c0c0" + + bg[NORMAL] = "#ffffff" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#c0c0c0" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#00ff00" + bg[INSENSITIVE] = "#ffffff" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#050505" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#c0c0c0" + base[PRELIGHT] = "#00fff0" # achtergrond van lists, status bars + base[ACTIVE] = "#0000ff" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + +style "text" +{ + font_name = "Sans 8" + + fg[NORMAL] = "#ffffff" # borders etc. + fg[PRELIGHT] = "#ffffff" + fg[ACTIVE] = "#ffffff" # ook borders, van sliders en notebook + fg[SELECTED] = "#ffffff" + fg[INSENSITIVE] = "#ffffff" + + bg[NORMAL] = "#27282F" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#454f60" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + + +style "buttons" +{ + + font_name = "Sans 8" + + fg[NORMAL] = "#888888" + fg[PRELIGHT] = "#888888" + fg[ACTIVE] = "#888888" + fg[SELECTED] = "#888888" + fg[INSENSITIVE] = "#888888" + + bg[NORMAL] = "#27282F" + bg[PRELIGHT] = "#aaacc1" + bg[ACTIVE] = "#454f60" + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + + + +class "GtkButton" style "default" +class "GtkSpinButton" style "default" +class "GtkToggleButton" style "default" +class "GtkCheckBox" style "default" + +class "GtkLabel" style "default" + +class "GtkWidget" style "default" diff --git a/veejay-client/share/sync.png b/veejay-client/share/sync.png new file mode 100644 index 00000000..471b269b Binary files /dev/null and b/veejay-client/share/sync.png differ diff --git a/veejay-client/share/veejay-icon.png b/veejay-client/share/veejay-icon.png new file mode 100644 index 00000000..c925fd92 Binary files /dev/null and b/veejay-client/share/veejay-icon.png differ diff --git a/veejay-client/share/veejay-logo.png b/veejay-client/share/veejay-logo.png new file mode 100644 index 00000000..00740d08 Binary files /dev/null and b/veejay-client/share/veejay-logo.png differ diff --git a/veejay-client/src/.deps/cellrendererspin.Po b/veejay-client/src/.deps/cellrendererspin.Po new file mode 100644 index 00000000..0ad891af --- /dev/null +++ b/veejay-client/src/.deps/cellrendererspin.Po @@ -0,0 +1,570 @@ +cellrendererspin.o cellrendererspin.o: widgets/cellrendererspin.c \ + widgets/cellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/glib-2.0/glib.h /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/glib-2.0/glib/gcache.h \ + /usr/include/glib-2.0/glib/glist.h /usr/include/glib-2.0/glib/gmem.h \ + /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h /usr/include/gtk-2.0/gdk/gdk.h \ + /usr/include/gtk-2.0/gdk/gdkcairo.h /usr/include/gtk-2.0/gdk/gdkcolor.h \ + /usr/include/cairo/cairo.h /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h + +widgets/cellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/time.h: + +/usr/include/bits/time.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/stdlib.h: + +/usr/include/sys/types.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: diff --git a/veejay-client/src/.deps/curve.Po b/veejay-client/src/.deps/curve.Po new file mode 100644 index 00000000..1062f5ca --- /dev/null +++ b/veejay-client/src/.deps/curve.Po @@ -0,0 +1,1204 @@ +curve.o curve.o: curve.c ../config.h /usr/include/gtk-2.0/gtk/gtk.h \ + /usr/include/gtk-2.0/gdk/gdk.h /usr/include/gtk-2.0/gdk/gdkcairo.h \ + /usr/include/gtk-2.0/gdk/gdkcolor.h /usr/include/cairo/cairo.h \ + /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/xlocale.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/include/bits/sys_errlist.h /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaboutdialog.h \ + /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtkaccellabel.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkaccelmap.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h \ + /usr/include/gtk-2.0/gtk/gtkaction.h \ + /usr/include/gtk-2.0/gtk/gtkactiongroup.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkalignment.h \ + /usr/include/gtk-2.0/gtk/gtkarrow.h \ + /usr/include/gtk-2.0/gtk/gtkaspectframe.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h \ + /usr/include/gtk-2.0/gtk/gtkassistant.h \ + /usr/include/gtk-2.0/gtk/gtkbbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkbindings.h \ + /usr/include/gtk-2.0/gtk/gtkbuildable.h \ + /usr/include/gtk-2.0/gtk/gtkbuilder.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkcalendar.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h \ + /usr/include/gtk-2.0/gtk/gtkcelllayout.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h \ + /usr/include/gtk-2.0/gtk/gtkcellview.h \ + /usr/include/gtk-2.0/gtk/gtkcheckbutton.h \ + /usr/include/gtk-2.0/gtk/gtktogglebutton.h \ + /usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h \ + /usr/include/gtk-2.0/gtk/gtkclipboard.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkclist.h \ + /usr/include/gtk-2.0/gtk/gtkhscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkvscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkcolorbutton.h \ + /usr/include/gtk-2.0/gtk/gtkcolorsel.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h \ + /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h \ + /usr/include/gtk-2.0/gtk/gtkcombo.h /usr/include/gtk-2.0/gtk/gtkhbox.h \ + /usr/include/gtk-2.0/gtk/gtkcombobox.h \ + /usr/include/gtk-2.0/gtk/gtktreeview.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkcomboboxentry.h \ + /usr/include/gtk-2.0/gtk/gtkctree.h /usr/include/gtk-2.0/gtk/gtkcurve.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkeventbox.h \ + /usr/include/gtk-2.0/gtk/gtkexpander.h \ + /usr/include/gtk-2.0/gtk/gtkfilesel.h \ + /usr/include/gtk-2.0/gtk/gtkfixed.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilefilter.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkfontbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfontsel.h \ + /usr/include/gtk-2.0/gtk/gtkgamma.h /usr/include/gtk-2.0/gtk/gtkgc.h \ + /usr/include/gtk-2.0/gtk/gtkhandlebox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h \ + /usr/include/gtk-2.0/gtk/gtkhpaned.h \ + /usr/include/gtk-2.0/gtk/gtkpaned.h \ + /usr/include/gtk-2.0/gtk/gtkhruler.h \ + /usr/include/gtk-2.0/gtk/gtkruler.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtkiconfactory.h \ + /usr/include/gtk-2.0/gtk/gtkicontheme.h \ + /usr/include/gtk-2.0/gtk/gtkiconview.h \ + /usr/include/gtk-2.0/gtk/gtktooltip.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkimagemenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkimcontextsimple.h \ + /usr/include/gtk-2.0/gtk/gtkimmulticontext.h \ + /usr/include/gtk-2.0/gtk/gtkinputdialog.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtklayout.h \ + /usr/include/gtk-2.0/gtk/gtklinkbutton.h \ + /usr/include/gtk-2.0/gtk/gtklist.h \ + /usr/include/gtk-2.0/gtk/gtklistitem.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkmenubar.h \ + /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkmessagedialog.h \ + /usr/include/gtk-2.0/gtk/gtkmodules.h \ + /usr/include/gtk-2.0/gtk/gtknotebook.h \ + /usr/include/gtk-2.0/gtk/gtkoldeditable.h \ + /usr/include/gtk-2.0/gtk/gtkoptionmenu.h \ + /usr/include/gtk-2.0/gtk/gtkpixmap.h /usr/include/gtk-2.0/gtk/gtkplug.h \ + /usr/include/gtk-2.0/gtk/gtksocket.h \ + /usr/include/gtk-2.0/gtk/gtkpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperation.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkpagesetup.h \ + /usr/include/gtk-2.0/gtk/gtkpapersize.h \ + /usr/include/gtk-2.0/gtk/gtkprintsettings.h \ + /usr/include/gtk-2.0/gtk/gtkprintcontext.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprogress.h \ + /usr/include/gtk-2.0/gtk/gtkprogressbar.h \ + /usr/include/gtk-2.0/gtk/gtkradioaction.h \ + /usr/include/gtk-2.0/gtk/gtktoggleaction.h \ + /usr/include/gtk-2.0/gtk/gtkradiobutton.h \ + /usr/include/gtk-2.0/gtk/gtkradiomenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkrecentaction.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkscalebutton.h \ + /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h \ + /usr/include/gtk-2.0/gtk/gtkviewport.h \ + /usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h \ + /usr/include/gtk-2.0/gtk/gtksizegroup.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkstatusbar.h \ + /usr/include/gtk-2.0/gtk/gtkstatusicon.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtktext.h \ + /usr/include/gtk-2.0/gtk/gtktextbuffer.h \ + /usr/include/gtk-2.0/gtk/gtktexttagtable.h \ + /usr/include/gtk-2.0/gtk/gtktextmark.h \ + /usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h \ + /usr/include/gtk-2.0/gtk/gtktextview.h \ + /usr/include/gtk-2.0/gtk/gtktipsquery.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbar.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktree.h \ + /usr/include/gtk-2.0/gtk/gtktreednd.h \ + /usr/include/gtk-2.0/gtk/gtktreeitem.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelsort.h \ + /usr/include/gtk-2.0/gtk/gtktreeselection.h \ + /usr/include/gtk-2.0/gtk/gtktreestore.h \ + /usr/include/gtk-2.0/gtk/gtkuimanager.h \ + /usr/include/gtk-2.0/gtk/gtkvbbox.h \ + /usr/include/gtk-2.0/gtk/gtkversion.h \ + /usr/include/gtk-2.0/gtk/gtkvolumebutton.h \ + /usr/include/gtk-2.0/gtk/gtkvpaned.h \ + /usr/include/gtk-2.0/gtk/gtkvruler.h \ + /usr/include/gtk-2.0/gtk/gtkvscale.h \ + /usr/include/gtk-2.0/gtk/gtkvseparator.h \ + /usr/local/include/veejay/vj-msg.h /usr/include/stdint.h \ + /usr/local/include/veejay/vjmem.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/types.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h ../src/vj-api.h curve.h /usr/include/assert.h + +../config.h: + +/usr/include/gtk-2.0/gtk/gtk.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/bits/xopen_lim.h: + +/usr/include/bits/stdio_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/time.h: + +/usr/include/bits/time.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/xlocale.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/sys_errlist.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaboutdialog.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtkaccellabel.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkaccelmap.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/gtk-2.0/gtk/gtkaction.h: + +/usr/include/gtk-2.0/gtk/gtkactiongroup.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkalignment.h: + +/usr/include/gtk-2.0/gtk/gtkarrow.h: + +/usr/include/gtk-2.0/gtk/gtkaspectframe.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtkassistant.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkbindings.h: + +/usr/include/gtk-2.0/gtk/gtkbuildable.h: + +/usr/include/gtk-2.0/gtk/gtkbuilder.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkcalendar.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +/usr/include/gtk-2.0/gtk/gtkcelllayout.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h: + +/usr/include/gtk-2.0/gtk/gtkcellview.h: + +/usr/include/gtk-2.0/gtk/gtkcheckbutton.h: + +/usr/include/gtk-2.0/gtk/gtktogglebutton.h: + +/usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkclipboard.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkclist.h: + +/usr/include/gtk-2.0/gtk/gtkhscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkvscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkcolorbutton.h: + +/usr/include/gtk-2.0/gtk/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +/usr/include/gtk-2.0/gtk/gtkcolorseldialog.h: + +/usr/include/gtk-2.0/gtk/gtkcombo.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkcombobox.h: + +/usr/include/gtk-2.0/gtk/gtktreeview.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkcomboboxentry.h: + +/usr/include/gtk-2.0/gtk/gtkctree.h: + +/usr/include/gtk-2.0/gtk/gtkcurve.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkeventbox.h: + +/usr/include/gtk-2.0/gtk/gtkexpander.h: + +/usr/include/gtk-2.0/gtk/gtkfilesel.h: + +/usr/include/gtk-2.0/gtk/gtkfixed.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilefilter.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkfontbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfontsel.h: + +/usr/include/gtk-2.0/gtk/gtkgamma.h: + +/usr/include/gtk-2.0/gtk/gtkgc.h: + +/usr/include/gtk-2.0/gtk/gtkhandlebox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkhpaned.h: + +/usr/include/gtk-2.0/gtk/gtkpaned.h: + +/usr/include/gtk-2.0/gtk/gtkhruler.h: + +/usr/include/gtk-2.0/gtk/gtkruler.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtkiconfactory.h: + +/usr/include/gtk-2.0/gtk/gtkicontheme.h: + +/usr/include/gtk-2.0/gtk/gtkiconview.h: + +/usr/include/gtk-2.0/gtk/gtktooltip.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkimagemenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkimcontextsimple.h: + +/usr/include/gtk-2.0/gtk/gtkimmulticontext.h: + +/usr/include/gtk-2.0/gtk/gtkinputdialog.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtklayout.h: + +/usr/include/gtk-2.0/gtk/gtklinkbutton.h: + +/usr/include/gtk-2.0/gtk/gtklist.h: + +/usr/include/gtk-2.0/gtk/gtklistitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkmenubar.h: + +/usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkmessagedialog.h: + +/usr/include/gtk-2.0/gtk/gtkmodules.h: + +/usr/include/gtk-2.0/gtk/gtknotebook.h: + +/usr/include/gtk-2.0/gtk/gtkoldeditable.h: + +/usr/include/gtk-2.0/gtk/gtkoptionmenu.h: + +/usr/include/gtk-2.0/gtk/gtkpixmap.h: + +/usr/include/gtk-2.0/gtk/gtkplug.h: + +/usr/include/gtk-2.0/gtk/gtksocket.h: + +/usr/include/gtk-2.0/gtk/gtkpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperation.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkpagesetup.h: + +/usr/include/gtk-2.0/gtk/gtkpapersize.h: + +/usr/include/gtk-2.0/gtk/gtkprintsettings.h: + +/usr/include/gtk-2.0/gtk/gtkprintcontext.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprogress.h: + +/usr/include/gtk-2.0/gtk/gtkprogressbar.h: + +/usr/include/gtk-2.0/gtk/gtkradioaction.h: + +/usr/include/gtk-2.0/gtk/gtktoggleaction.h: + +/usr/include/gtk-2.0/gtk/gtkradiobutton.h: + +/usr/include/gtk-2.0/gtk/gtkradiomenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkrecentaction.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkscalebutton.h: + +/usr/include/gtk-2.0/gtk/gtkscrolledwindow.h: + +/usr/include/gtk-2.0/gtk/gtkviewport.h: + +/usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h: + +/usr/include/gtk-2.0/gtk/gtksizegroup.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkstatusbar.h: + +/usr/include/gtk-2.0/gtk/gtkstatusicon.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtktext.h: + +/usr/include/gtk-2.0/gtk/gtktextbuffer.h: + +/usr/include/gtk-2.0/gtk/gtktexttagtable.h: + +/usr/include/gtk-2.0/gtk/gtktextmark.h: + +/usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h: + +/usr/include/gtk-2.0/gtk/gtktextview.h: + +/usr/include/gtk-2.0/gtk/gtktipsquery.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbar.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktree.h: + +/usr/include/gtk-2.0/gtk/gtktreednd.h: + +/usr/include/gtk-2.0/gtk/gtktreeitem.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelsort.h: + +/usr/include/gtk-2.0/gtk/gtktreeselection.h: + +/usr/include/gtk-2.0/gtk/gtktreestore.h: + +/usr/include/gtk-2.0/gtk/gtkuimanager.h: + +/usr/include/gtk-2.0/gtk/gtkvbbox.h: + +/usr/include/gtk-2.0/gtk/gtkversion.h: + +/usr/include/gtk-2.0/gtk/gtkvolumebutton.h: + +/usr/include/gtk-2.0/gtk/gtkvpaned.h: + +/usr/include/gtk-2.0/gtk/gtkvruler.h: + +/usr/include/gtk-2.0/gtk/gtkvscale.h: + +/usr/include/gtk-2.0/gtk/gtkvseparator.h: + +/usr/local/include/veejay/vj-msg.h: + +/usr/include/stdint.h: + +/usr/local/include/veejay/vjmem.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sys/types.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +../src/vj-api.h: + +curve.h: + +/usr/include/assert.h: diff --git a/veejay-client/src/.deps/gtkcolorsel.Po b/veejay-client/src/.deps/gtkcolorsel.Po new file mode 100644 index 00000000..c8f6d69a --- /dev/null +++ b/veejay-client/src/.deps/gtkcolorsel.Po @@ -0,0 +1,782 @@ +gtkcolorsel.o gtkcolorsel.o: widgets/gtkcolorsel.c ../config.h \ + /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/huge_val.h \ + /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \ + /usr/include/bits/inf.h /usr/include/bits/nan.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/include/gtk-2.0/gdk/gdkkeysyms.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h /usr/include/gtk-2.0/gdk/gdk.h \ + /usr/include/gtk-2.0/gdk/gdkcairo.h /usr/include/gtk-2.0/gdk/gdkcolor.h \ + /usr/include/cairo/cairo.h /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/xlocale.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/include/bits/sys_errlist.h /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkhbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h /usr/include/gtk-2.0/gtk/gtkbbox.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h /usr/include/string.h \ + widgets/gtkcolorsel.h /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h widgets/gtkhsv.h \ + /usr/include/X11/Xlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \ + /usr/include/X11/Xosdefs.h /usr/include/gtk-2.0/gdk/gdkx.h \ + /usr/include/gtk-2.0/gdk/gdkprivate.h /usr/include/X11/Xutil.h \ + /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h + +../config.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/gtk-2.0/gdk/gdkkeysyms.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/bits/xopen_lim.h: + +/usr/include/bits/stdio_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/time.h: + +/usr/include/bits/time.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/xlocale.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/sys_errlist.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/string.h: + +widgets/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +widgets/gtkhsv.h: + +/usr/include/X11/Xlib.h: + +/usr/include/sys/types.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/X11/X.h: + +/usr/include/X11/Xfuncproto.h: + +/usr/include/X11/Xosdefs.h: + +/usr/include/gtk-2.0/gdk/gdkx.h: + +/usr/include/gtk-2.0/gdk/gdkprivate.h: + +/usr/include/X11/Xutil.h: + +/usr/include/X11/keysym.h: + +/usr/include/X11/keysymdef.h: diff --git a/veejay-client/src/.deps/gtkknob.Po b/veejay-client/src/.deps/gtkknob.Po new file mode 100644 index 00000000..90110bf0 --- /dev/null +++ b/veejay-client/src/.deps/gtkknob.Po @@ -0,0 +1,515 @@ +gtkknob.o gtkknob.o: widgets/gtkknob.c /usr/include/math.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/include/stdio.h /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gdk/gdk.h \ + /usr/include/gtk-2.0/gdk/gdkcairo.h /usr/include/gtk-2.0/gdk/gdkcolor.h \ + /usr/include/cairo/cairo.h /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/glib-2.0/glib/gcache.h \ + /usr/include/glib-2.0/glib/glist.h /usr/include/glib-2.0/glib/gmem.h \ + /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h widgets/gtkknob.h + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/time.h: + +/usr/include/bits/time.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +widgets/gtkknob.h: diff --git a/veejay-client/src/.deps/gtktimeselection.Po b/veejay-client/src/.deps/gtktimeselection.Po new file mode 100644 index 00000000..94e056f9 --- /dev/null +++ b/veejay-client/src/.deps/gtktimeselection.Po @@ -0,0 +1,1196 @@ +gtktimeselection.o gtktimeselection.o: widgets/gtktimeselection.c \ + /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/math.h \ + /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h /usr/include/stdlib.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/local/include/gtkcairo.h /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gdk/gdk.h /usr/include/gtk-2.0/gdk/gdkcairo.h \ + /usr/include/gtk-2.0/gdk/gdkcolor.h /usr/include/cairo/cairo.h \ + /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtk.h \ + /usr/include/gtk-2.0/gtk/gtkaboutdialog.h \ + /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkaccellabel.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkaccelmap.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h \ + /usr/include/gtk-2.0/gtk/gtkaction.h \ + /usr/include/gtk-2.0/gtk/gtkactiongroup.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkalignment.h \ + /usr/include/gtk-2.0/gtk/gtkarrow.h \ + /usr/include/gtk-2.0/gtk/gtkaspectframe.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h \ + /usr/include/gtk-2.0/gtk/gtkassistant.h \ + /usr/include/gtk-2.0/gtk/gtkbbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkbindings.h \ + /usr/include/gtk-2.0/gtk/gtkbuildable.h \ + /usr/include/gtk-2.0/gtk/gtkbuilder.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkcalendar.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h \ + /usr/include/gtk-2.0/gtk/gtkcelllayout.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h \ + /usr/include/gtk-2.0/gtk/gtkcellview.h \ + /usr/include/gtk-2.0/gtk/gtkcheckbutton.h \ + /usr/include/gtk-2.0/gtk/gtktogglebutton.h \ + /usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h \ + /usr/include/gtk-2.0/gtk/gtkclipboard.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkclist.h \ + /usr/include/gtk-2.0/gtk/gtkhscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkvscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkcolorbutton.h \ + /usr/include/gtk-2.0/gtk/gtkcolorsel.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h \ + /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h \ + /usr/include/gtk-2.0/gtk/gtkcombo.h /usr/include/gtk-2.0/gtk/gtkhbox.h \ + /usr/include/gtk-2.0/gtk/gtkcombobox.h \ + /usr/include/gtk-2.0/gtk/gtktreeview.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkcomboboxentry.h \ + /usr/include/gtk-2.0/gtk/gtkctree.h /usr/include/gtk-2.0/gtk/gtkcurve.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkeventbox.h \ + /usr/include/gtk-2.0/gtk/gtkexpander.h \ + /usr/include/gtk-2.0/gtk/gtkfilesel.h \ + /usr/include/gtk-2.0/gtk/gtkfixed.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilefilter.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkfontbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfontsel.h \ + /usr/include/gtk-2.0/gtk/gtkgamma.h /usr/include/gtk-2.0/gtk/gtkgc.h \ + /usr/include/gtk-2.0/gtk/gtkhandlebox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h \ + /usr/include/gtk-2.0/gtk/gtkhpaned.h \ + /usr/include/gtk-2.0/gtk/gtkpaned.h \ + /usr/include/gtk-2.0/gtk/gtkhruler.h \ + /usr/include/gtk-2.0/gtk/gtkruler.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtkiconfactory.h \ + /usr/include/gtk-2.0/gtk/gtkicontheme.h \ + /usr/include/gtk-2.0/gtk/gtkiconview.h \ + /usr/include/gtk-2.0/gtk/gtktooltip.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkimagemenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkimcontextsimple.h \ + /usr/include/gtk-2.0/gtk/gtkimmulticontext.h \ + /usr/include/gtk-2.0/gtk/gtkinputdialog.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtklayout.h \ + /usr/include/gtk-2.0/gtk/gtklinkbutton.h \ + /usr/include/gtk-2.0/gtk/gtklist.h \ + /usr/include/gtk-2.0/gtk/gtklistitem.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkmenubar.h \ + /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkmessagedialog.h \ + /usr/include/gtk-2.0/gtk/gtkmodules.h \ + /usr/include/gtk-2.0/gtk/gtknotebook.h \ + /usr/include/gtk-2.0/gtk/gtkoldeditable.h \ + /usr/include/gtk-2.0/gtk/gtkoptionmenu.h \ + /usr/include/gtk-2.0/gtk/gtkpixmap.h /usr/include/gtk-2.0/gtk/gtkplug.h \ + /usr/include/gtk-2.0/gtk/gtksocket.h \ + /usr/include/gtk-2.0/gtk/gtkpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperation.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkpagesetup.h \ + /usr/include/gtk-2.0/gtk/gtkpapersize.h \ + /usr/include/gtk-2.0/gtk/gtkprintsettings.h \ + /usr/include/gtk-2.0/gtk/gtkprintcontext.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprogress.h \ + /usr/include/gtk-2.0/gtk/gtkprogressbar.h \ + /usr/include/gtk-2.0/gtk/gtkradioaction.h \ + /usr/include/gtk-2.0/gtk/gtktoggleaction.h \ + /usr/include/gtk-2.0/gtk/gtkradiobutton.h \ + /usr/include/gtk-2.0/gtk/gtkradiomenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkrecentaction.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkscalebutton.h \ + /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h \ + /usr/include/gtk-2.0/gtk/gtkviewport.h \ + /usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h \ + /usr/include/gtk-2.0/gtk/gtksizegroup.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkstatusbar.h \ + /usr/include/gtk-2.0/gtk/gtkstatusicon.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtktext.h \ + /usr/include/gtk-2.0/gtk/gtktextbuffer.h \ + /usr/include/gtk-2.0/gtk/gtktexttagtable.h \ + /usr/include/gtk-2.0/gtk/gtktextmark.h \ + /usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h \ + /usr/include/gtk-2.0/gtk/gtktextview.h \ + /usr/include/gtk-2.0/gtk/gtktipsquery.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbar.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktree.h \ + /usr/include/gtk-2.0/gtk/gtktreednd.h \ + /usr/include/gtk-2.0/gtk/gtktreeitem.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelsort.h \ + /usr/include/gtk-2.0/gtk/gtktreeselection.h \ + /usr/include/gtk-2.0/gtk/gtktreestore.h \ + /usr/include/gtk-2.0/gtk/gtkuimanager.h \ + /usr/include/gtk-2.0/gtk/gtkvbbox.h \ + /usr/include/gtk-2.0/gtk/gtkversion.h \ + /usr/include/gtk-2.0/gtk/gtkvolumebutton.h \ + /usr/include/gtk-2.0/gtk/gtkvpaned.h \ + /usr/include/gtk-2.0/gtk/gtkvruler.h \ + /usr/include/gtk-2.0/gtk/gtkvscale.h \ + /usr/include/gtk-2.0/gtk/gtkvseparator.h widgets/gtktimeselection.h + +/usr/include/assert.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/math.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/local/include/gtkcairo.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtk.h: + +/usr/include/gtk-2.0/gtk/gtkaboutdialog.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkaccellabel.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkaccelmap.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/gtk-2.0/gtk/gtkaction.h: + +/usr/include/gtk-2.0/gtk/gtkactiongroup.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkalignment.h: + +/usr/include/gtk-2.0/gtk/gtkarrow.h: + +/usr/include/gtk-2.0/gtk/gtkaspectframe.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtkassistant.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkbindings.h: + +/usr/include/gtk-2.0/gtk/gtkbuildable.h: + +/usr/include/gtk-2.0/gtk/gtkbuilder.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkcalendar.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +/usr/include/gtk-2.0/gtk/gtkcelllayout.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h: + +/usr/include/gtk-2.0/gtk/gtkcellview.h: + +/usr/include/gtk-2.0/gtk/gtkcheckbutton.h: + +/usr/include/gtk-2.0/gtk/gtktogglebutton.h: + +/usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkclipboard.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkclist.h: + +/usr/include/gtk-2.0/gtk/gtkhscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkvscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkcolorbutton.h: + +/usr/include/gtk-2.0/gtk/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +/usr/include/gtk-2.0/gtk/gtkcolorseldialog.h: + +/usr/include/gtk-2.0/gtk/gtkcombo.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkcombobox.h: + +/usr/include/gtk-2.0/gtk/gtktreeview.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkcomboboxentry.h: + +/usr/include/gtk-2.0/gtk/gtkctree.h: + +/usr/include/gtk-2.0/gtk/gtkcurve.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkeventbox.h: + +/usr/include/gtk-2.0/gtk/gtkexpander.h: + +/usr/include/gtk-2.0/gtk/gtkfilesel.h: + +/usr/include/gtk-2.0/gtk/gtkfixed.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilefilter.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkfontbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfontsel.h: + +/usr/include/gtk-2.0/gtk/gtkgamma.h: + +/usr/include/gtk-2.0/gtk/gtkgc.h: + +/usr/include/gtk-2.0/gtk/gtkhandlebox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkhpaned.h: + +/usr/include/gtk-2.0/gtk/gtkpaned.h: + +/usr/include/gtk-2.0/gtk/gtkhruler.h: + +/usr/include/gtk-2.0/gtk/gtkruler.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtkiconfactory.h: + +/usr/include/gtk-2.0/gtk/gtkicontheme.h: + +/usr/include/gtk-2.0/gtk/gtkiconview.h: + +/usr/include/gtk-2.0/gtk/gtktooltip.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkimagemenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkimcontextsimple.h: + +/usr/include/gtk-2.0/gtk/gtkimmulticontext.h: + +/usr/include/gtk-2.0/gtk/gtkinputdialog.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtklayout.h: + +/usr/include/gtk-2.0/gtk/gtklinkbutton.h: + +/usr/include/gtk-2.0/gtk/gtklist.h: + +/usr/include/gtk-2.0/gtk/gtklistitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkmenubar.h: + +/usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkmessagedialog.h: + +/usr/include/gtk-2.0/gtk/gtkmodules.h: + +/usr/include/gtk-2.0/gtk/gtknotebook.h: + +/usr/include/gtk-2.0/gtk/gtkoldeditable.h: + +/usr/include/gtk-2.0/gtk/gtkoptionmenu.h: + +/usr/include/gtk-2.0/gtk/gtkpixmap.h: + +/usr/include/gtk-2.0/gtk/gtkplug.h: + +/usr/include/gtk-2.0/gtk/gtksocket.h: + +/usr/include/gtk-2.0/gtk/gtkpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperation.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkpagesetup.h: + +/usr/include/gtk-2.0/gtk/gtkpapersize.h: + +/usr/include/gtk-2.0/gtk/gtkprintsettings.h: + +/usr/include/gtk-2.0/gtk/gtkprintcontext.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprogress.h: + +/usr/include/gtk-2.0/gtk/gtkprogressbar.h: + +/usr/include/gtk-2.0/gtk/gtkradioaction.h: + +/usr/include/gtk-2.0/gtk/gtktoggleaction.h: + +/usr/include/gtk-2.0/gtk/gtkradiobutton.h: + +/usr/include/gtk-2.0/gtk/gtkradiomenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkrecentaction.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkscalebutton.h: + +/usr/include/gtk-2.0/gtk/gtkscrolledwindow.h: + +/usr/include/gtk-2.0/gtk/gtkviewport.h: + +/usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h: + +/usr/include/gtk-2.0/gtk/gtksizegroup.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkstatusbar.h: + +/usr/include/gtk-2.0/gtk/gtkstatusicon.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtktext.h: + +/usr/include/gtk-2.0/gtk/gtktextbuffer.h: + +/usr/include/gtk-2.0/gtk/gtktexttagtable.h: + +/usr/include/gtk-2.0/gtk/gtktextmark.h: + +/usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h: + +/usr/include/gtk-2.0/gtk/gtktextview.h: + +/usr/include/gtk-2.0/gtk/gtktipsquery.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbar.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktree.h: + +/usr/include/gtk-2.0/gtk/gtktreednd.h: + +/usr/include/gtk-2.0/gtk/gtktreeitem.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelsort.h: + +/usr/include/gtk-2.0/gtk/gtktreeselection.h: + +/usr/include/gtk-2.0/gtk/gtktreestore.h: + +/usr/include/gtk-2.0/gtk/gtkuimanager.h: + +/usr/include/gtk-2.0/gtk/gtkvbbox.h: + +/usr/include/gtk-2.0/gtk/gtkversion.h: + +/usr/include/gtk-2.0/gtk/gtkvolumebutton.h: + +/usr/include/gtk-2.0/gtk/gtkvpaned.h: + +/usr/include/gtk-2.0/gtk/gtkvruler.h: + +/usr/include/gtk-2.0/gtk/gtkvscale.h: + +/usr/include/gtk-2.0/gtk/gtkvseparator.h: + +widgets/gtktimeselection.h: diff --git a/veejay-client/src/.deps/gveejay.Po b/veejay-client/src/.deps/gveejay.Po new file mode 100644 index 00000000..3598d760 --- /dev/null +++ b/veejay-client/src/.deps/gveejay.Po @@ -0,0 +1,1221 @@ +gveejay.o gveejay.o: gveejay.c /usr/include/stdlib.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/gtk-2.0/gtk/gtk.h \ + /usr/include/gtk-2.0/gdk/gdk.h /usr/include/gtk-2.0/gdk/gdkcairo.h \ + /usr/include/gtk-2.0/gdk/gdkcolor.h /usr/include/cairo/cairo.h \ + /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaboutdialog.h \ + /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtkaccellabel.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkaccelmap.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h \ + /usr/include/gtk-2.0/gtk/gtkaction.h \ + /usr/include/gtk-2.0/gtk/gtkactiongroup.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkalignment.h \ + /usr/include/gtk-2.0/gtk/gtkarrow.h \ + /usr/include/gtk-2.0/gtk/gtkaspectframe.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h \ + /usr/include/gtk-2.0/gtk/gtkassistant.h \ + /usr/include/gtk-2.0/gtk/gtkbbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkbindings.h \ + /usr/include/gtk-2.0/gtk/gtkbuildable.h \ + /usr/include/gtk-2.0/gtk/gtkbuilder.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkcalendar.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h \ + /usr/include/gtk-2.0/gtk/gtkcelllayout.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h \ + /usr/include/gtk-2.0/gtk/gtkcellview.h \ + /usr/include/gtk-2.0/gtk/gtkcheckbutton.h \ + /usr/include/gtk-2.0/gtk/gtktogglebutton.h \ + /usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h \ + /usr/include/gtk-2.0/gtk/gtkclipboard.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkclist.h \ + /usr/include/gtk-2.0/gtk/gtkhscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkvscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkcolorbutton.h \ + /usr/include/gtk-2.0/gtk/gtkcolorsel.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h \ + /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h \ + /usr/include/gtk-2.0/gtk/gtkcombo.h /usr/include/gtk-2.0/gtk/gtkhbox.h \ + /usr/include/gtk-2.0/gtk/gtkcombobox.h \ + /usr/include/gtk-2.0/gtk/gtktreeview.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkcomboboxentry.h \ + /usr/include/gtk-2.0/gtk/gtkctree.h /usr/include/gtk-2.0/gtk/gtkcurve.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkeventbox.h \ + /usr/include/gtk-2.0/gtk/gtkexpander.h \ + /usr/include/gtk-2.0/gtk/gtkfilesel.h \ + /usr/include/gtk-2.0/gtk/gtkfixed.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilefilter.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkfontbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfontsel.h \ + /usr/include/gtk-2.0/gtk/gtkgamma.h /usr/include/gtk-2.0/gtk/gtkgc.h \ + /usr/include/gtk-2.0/gtk/gtkhandlebox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h \ + /usr/include/gtk-2.0/gtk/gtkhpaned.h \ + /usr/include/gtk-2.0/gtk/gtkpaned.h \ + /usr/include/gtk-2.0/gtk/gtkhruler.h \ + /usr/include/gtk-2.0/gtk/gtkruler.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtkiconfactory.h \ + /usr/include/gtk-2.0/gtk/gtkicontheme.h \ + /usr/include/gtk-2.0/gtk/gtkiconview.h \ + /usr/include/gtk-2.0/gtk/gtktooltip.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkimagemenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkimcontextsimple.h \ + /usr/include/gtk-2.0/gtk/gtkimmulticontext.h \ + /usr/include/gtk-2.0/gtk/gtkinputdialog.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtklayout.h \ + /usr/include/gtk-2.0/gtk/gtklinkbutton.h \ + /usr/include/gtk-2.0/gtk/gtklist.h \ + /usr/include/gtk-2.0/gtk/gtklistitem.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkmenubar.h \ + /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkmessagedialog.h \ + /usr/include/gtk-2.0/gtk/gtkmodules.h \ + /usr/include/gtk-2.0/gtk/gtknotebook.h \ + /usr/include/gtk-2.0/gtk/gtkoldeditable.h \ + /usr/include/gtk-2.0/gtk/gtkoptionmenu.h \ + /usr/include/gtk-2.0/gtk/gtkpixmap.h /usr/include/gtk-2.0/gtk/gtkplug.h \ + /usr/include/gtk-2.0/gtk/gtksocket.h \ + /usr/include/gtk-2.0/gtk/gtkpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperation.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkpagesetup.h \ + /usr/include/gtk-2.0/gtk/gtkpapersize.h \ + /usr/include/gtk-2.0/gtk/gtkprintsettings.h \ + /usr/include/gtk-2.0/gtk/gtkprintcontext.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprogress.h \ + /usr/include/gtk-2.0/gtk/gtkprogressbar.h \ + /usr/include/gtk-2.0/gtk/gtkradioaction.h \ + /usr/include/gtk-2.0/gtk/gtktoggleaction.h \ + /usr/include/gtk-2.0/gtk/gtkradiobutton.h \ + /usr/include/gtk-2.0/gtk/gtkradiomenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkrecentaction.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkscalebutton.h \ + /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h \ + /usr/include/gtk-2.0/gtk/gtkviewport.h \ + /usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h \ + /usr/include/gtk-2.0/gtk/gtksizegroup.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkstatusbar.h \ + /usr/include/gtk-2.0/gtk/gtkstatusicon.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtktext.h \ + /usr/include/gtk-2.0/gtk/gtktextbuffer.h \ + /usr/include/gtk-2.0/gtk/gtktexttagtable.h \ + /usr/include/gtk-2.0/gtk/gtktextmark.h \ + /usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h \ + /usr/include/gtk-2.0/gtk/gtktextview.h \ + /usr/include/gtk-2.0/gtk/gtktipsquery.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbar.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktree.h \ + /usr/include/gtk-2.0/gtk/gtktreednd.h \ + /usr/include/gtk-2.0/gtk/gtktreeitem.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelsort.h \ + /usr/include/gtk-2.0/gtk/gtktreeselection.h \ + /usr/include/gtk-2.0/gtk/gtktreestore.h \ + /usr/include/gtk-2.0/gtk/gtkuimanager.h \ + /usr/include/gtk-2.0/gtk/gtkvbbox.h \ + /usr/include/gtk-2.0/gtk/gtkversion.h \ + /usr/include/gtk-2.0/gtk/gtkvolumebutton.h \ + /usr/include/gtk-2.0/gtk/gtkvpaned.h \ + /usr/include/gtk-2.0/gtk/gtkvruler.h \ + /usr/include/gtk-2.0/gtk/gtkvscale.h \ + /usr/include/gtk-2.0/gtk/gtkvseparator.h \ + /usr/include/libglade-2.0/glade/glade.h \ + /usr/include/libglade-2.0/glade/glade-init.h \ + /usr/include/libglade-2.0/glade/glade-xml.h \ + /usr/local/include/veejay/vevo.h /usr/include/stdint.h \ + /usr/local/include/veejay/vjmem.h ../config.h \ + /usr/local/include/veejay/vj-msg.h ../src/vj-api.h /usr/include/sched.h \ + /usr/include/bits/sched.h + +/usr/include/stdlib.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/string.h: + +/usr/include/gtk-2.0/gtk/gtk.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaboutdialog.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtkaccellabel.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkaccelmap.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/gtk-2.0/gtk/gtkaction.h: + +/usr/include/gtk-2.0/gtk/gtkactiongroup.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkalignment.h: + +/usr/include/gtk-2.0/gtk/gtkarrow.h: + +/usr/include/gtk-2.0/gtk/gtkaspectframe.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtkassistant.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkbindings.h: + +/usr/include/gtk-2.0/gtk/gtkbuildable.h: + +/usr/include/gtk-2.0/gtk/gtkbuilder.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkcalendar.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +/usr/include/gtk-2.0/gtk/gtkcelllayout.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h: + +/usr/include/gtk-2.0/gtk/gtkcellview.h: + +/usr/include/gtk-2.0/gtk/gtkcheckbutton.h: + +/usr/include/gtk-2.0/gtk/gtktogglebutton.h: + +/usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkclipboard.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkclist.h: + +/usr/include/gtk-2.0/gtk/gtkhscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkvscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkcolorbutton.h: + +/usr/include/gtk-2.0/gtk/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +/usr/include/gtk-2.0/gtk/gtkcolorseldialog.h: + +/usr/include/gtk-2.0/gtk/gtkcombo.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkcombobox.h: + +/usr/include/gtk-2.0/gtk/gtktreeview.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkcomboboxentry.h: + +/usr/include/gtk-2.0/gtk/gtkctree.h: + +/usr/include/gtk-2.0/gtk/gtkcurve.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkeventbox.h: + +/usr/include/gtk-2.0/gtk/gtkexpander.h: + +/usr/include/gtk-2.0/gtk/gtkfilesel.h: + +/usr/include/gtk-2.0/gtk/gtkfixed.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilefilter.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkfontbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfontsel.h: + +/usr/include/gtk-2.0/gtk/gtkgamma.h: + +/usr/include/gtk-2.0/gtk/gtkgc.h: + +/usr/include/gtk-2.0/gtk/gtkhandlebox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkhpaned.h: + +/usr/include/gtk-2.0/gtk/gtkpaned.h: + +/usr/include/gtk-2.0/gtk/gtkhruler.h: + +/usr/include/gtk-2.0/gtk/gtkruler.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtkiconfactory.h: + +/usr/include/gtk-2.0/gtk/gtkicontheme.h: + +/usr/include/gtk-2.0/gtk/gtkiconview.h: + +/usr/include/gtk-2.0/gtk/gtktooltip.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkimagemenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkimcontextsimple.h: + +/usr/include/gtk-2.0/gtk/gtkimmulticontext.h: + +/usr/include/gtk-2.0/gtk/gtkinputdialog.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtklayout.h: + +/usr/include/gtk-2.0/gtk/gtklinkbutton.h: + +/usr/include/gtk-2.0/gtk/gtklist.h: + +/usr/include/gtk-2.0/gtk/gtklistitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkmenubar.h: + +/usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkmessagedialog.h: + +/usr/include/gtk-2.0/gtk/gtkmodules.h: + +/usr/include/gtk-2.0/gtk/gtknotebook.h: + +/usr/include/gtk-2.0/gtk/gtkoldeditable.h: + +/usr/include/gtk-2.0/gtk/gtkoptionmenu.h: + +/usr/include/gtk-2.0/gtk/gtkpixmap.h: + +/usr/include/gtk-2.0/gtk/gtkplug.h: + +/usr/include/gtk-2.0/gtk/gtksocket.h: + +/usr/include/gtk-2.0/gtk/gtkpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperation.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkpagesetup.h: + +/usr/include/gtk-2.0/gtk/gtkpapersize.h: + +/usr/include/gtk-2.0/gtk/gtkprintsettings.h: + +/usr/include/gtk-2.0/gtk/gtkprintcontext.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprogress.h: + +/usr/include/gtk-2.0/gtk/gtkprogressbar.h: + +/usr/include/gtk-2.0/gtk/gtkradioaction.h: + +/usr/include/gtk-2.0/gtk/gtktoggleaction.h: + +/usr/include/gtk-2.0/gtk/gtkradiobutton.h: + +/usr/include/gtk-2.0/gtk/gtkradiomenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkrecentaction.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkscalebutton.h: + +/usr/include/gtk-2.0/gtk/gtkscrolledwindow.h: + +/usr/include/gtk-2.0/gtk/gtkviewport.h: + +/usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h: + +/usr/include/gtk-2.0/gtk/gtksizegroup.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkstatusbar.h: + +/usr/include/gtk-2.0/gtk/gtkstatusicon.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtktext.h: + +/usr/include/gtk-2.0/gtk/gtktextbuffer.h: + +/usr/include/gtk-2.0/gtk/gtktexttagtable.h: + +/usr/include/gtk-2.0/gtk/gtktextmark.h: + +/usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h: + +/usr/include/gtk-2.0/gtk/gtktextview.h: + +/usr/include/gtk-2.0/gtk/gtktipsquery.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbar.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktree.h: + +/usr/include/gtk-2.0/gtk/gtktreednd.h: + +/usr/include/gtk-2.0/gtk/gtktreeitem.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelsort.h: + +/usr/include/gtk-2.0/gtk/gtktreeselection.h: + +/usr/include/gtk-2.0/gtk/gtktreestore.h: + +/usr/include/gtk-2.0/gtk/gtkuimanager.h: + +/usr/include/gtk-2.0/gtk/gtkvbbox.h: + +/usr/include/gtk-2.0/gtk/gtkversion.h: + +/usr/include/gtk-2.0/gtk/gtkvolumebutton.h: + +/usr/include/gtk-2.0/gtk/gtkvpaned.h: + +/usr/include/gtk-2.0/gtk/gtkvruler.h: + +/usr/include/gtk-2.0/gtk/gtkvscale.h: + +/usr/include/gtk-2.0/gtk/gtkvseparator.h: + +/usr/include/libglade-2.0/glade/glade.h: + +/usr/include/libglade-2.0/glade/glade-init.h: + +/usr/include/libglade-2.0/glade/glade-xml.h: + +/usr/local/include/veejay/vevo.h: + +/usr/include/stdint.h: + +/usr/local/include/veejay/vjmem.h: + +../config.h: + +/usr/local/include/veejay/vj-msg.h: + +../src/vj-api.h: + +/usr/include/sched.h: + +/usr/include/bits/sched.h: diff --git a/veejay-client/src/.deps/keyboard.Po b/veejay-client/src/.deps/keyboard.Po new file mode 100644 index 00000000..f82f1c2f --- /dev/null +++ b/veejay-client/src/.deps/keyboard.Po @@ -0,0 +1,1161 @@ +keyboard.o keyboard.o: keyboard.c /usr/include/gtk-2.0/gtk/gtk.h \ + /usr/include/gtk-2.0/gdk/gdk.h /usr/include/gtk-2.0/gdk/gdkcairo.h \ + /usr/include/gtk-2.0/gdk/gdkcolor.h /usr/include/cairo/cairo.h \ + /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/glib-2.0/glib/gcache.h \ + /usr/include/glib-2.0/glib/glist.h /usr/include/glib-2.0/glib/gmem.h \ + /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaboutdialog.h \ + /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtkaccellabel.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkaccelmap.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h \ + /usr/include/gtk-2.0/gtk/gtkaction.h \ + /usr/include/gtk-2.0/gtk/gtkactiongroup.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkalignment.h \ + /usr/include/gtk-2.0/gtk/gtkarrow.h \ + /usr/include/gtk-2.0/gtk/gtkaspectframe.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h \ + /usr/include/gtk-2.0/gtk/gtkassistant.h \ + /usr/include/gtk-2.0/gtk/gtkbbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkbindings.h \ + /usr/include/gtk-2.0/gtk/gtkbuildable.h \ + /usr/include/gtk-2.0/gtk/gtkbuilder.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkcalendar.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h \ + /usr/include/gtk-2.0/gtk/gtkcelllayout.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h \ + /usr/include/gtk-2.0/gtk/gtkcellview.h \ + /usr/include/gtk-2.0/gtk/gtkcheckbutton.h \ + /usr/include/gtk-2.0/gtk/gtktogglebutton.h \ + /usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h \ + /usr/include/gtk-2.0/gtk/gtkclipboard.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkclist.h \ + /usr/include/gtk-2.0/gtk/gtkhscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkvscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkcolorbutton.h \ + /usr/include/gtk-2.0/gtk/gtkcolorsel.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h \ + /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h \ + /usr/include/gtk-2.0/gtk/gtkcombo.h /usr/include/gtk-2.0/gtk/gtkhbox.h \ + /usr/include/gtk-2.0/gtk/gtkcombobox.h \ + /usr/include/gtk-2.0/gtk/gtktreeview.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkcomboboxentry.h \ + /usr/include/gtk-2.0/gtk/gtkctree.h /usr/include/gtk-2.0/gtk/gtkcurve.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkeventbox.h \ + /usr/include/gtk-2.0/gtk/gtkexpander.h \ + /usr/include/gtk-2.0/gtk/gtkfilesel.h \ + /usr/include/gtk-2.0/gtk/gtkfixed.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilefilter.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkfontbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfontsel.h \ + /usr/include/gtk-2.0/gtk/gtkgamma.h /usr/include/gtk-2.0/gtk/gtkgc.h \ + /usr/include/gtk-2.0/gtk/gtkhandlebox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h \ + /usr/include/gtk-2.0/gtk/gtkhpaned.h \ + /usr/include/gtk-2.0/gtk/gtkpaned.h \ + /usr/include/gtk-2.0/gtk/gtkhruler.h \ + /usr/include/gtk-2.0/gtk/gtkruler.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtkiconfactory.h \ + /usr/include/gtk-2.0/gtk/gtkicontheme.h \ + /usr/include/gtk-2.0/gtk/gtkiconview.h \ + /usr/include/gtk-2.0/gtk/gtktooltip.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkimagemenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkimcontextsimple.h \ + /usr/include/gtk-2.0/gtk/gtkimmulticontext.h \ + /usr/include/gtk-2.0/gtk/gtkinputdialog.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtklayout.h \ + /usr/include/gtk-2.0/gtk/gtklinkbutton.h \ + /usr/include/gtk-2.0/gtk/gtklist.h \ + /usr/include/gtk-2.0/gtk/gtklistitem.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkmenubar.h \ + /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkmessagedialog.h \ + /usr/include/gtk-2.0/gtk/gtkmodules.h \ + /usr/include/gtk-2.0/gtk/gtknotebook.h \ + /usr/include/gtk-2.0/gtk/gtkoldeditable.h \ + /usr/include/gtk-2.0/gtk/gtkoptionmenu.h \ + /usr/include/gtk-2.0/gtk/gtkpixmap.h /usr/include/gtk-2.0/gtk/gtkplug.h \ + /usr/include/gtk-2.0/gtk/gtksocket.h \ + /usr/include/gtk-2.0/gtk/gtkpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperation.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkpagesetup.h \ + /usr/include/gtk-2.0/gtk/gtkpapersize.h \ + /usr/include/gtk-2.0/gtk/gtkprintsettings.h \ + /usr/include/gtk-2.0/gtk/gtkprintcontext.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprogress.h \ + /usr/include/gtk-2.0/gtk/gtkprogressbar.h \ + /usr/include/gtk-2.0/gtk/gtkradioaction.h \ + /usr/include/gtk-2.0/gtk/gtktoggleaction.h \ + /usr/include/gtk-2.0/gtk/gtkradiobutton.h \ + /usr/include/gtk-2.0/gtk/gtkradiomenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkrecentaction.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkscalebutton.h \ + /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h \ + /usr/include/gtk-2.0/gtk/gtkviewport.h \ + /usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h \ + /usr/include/gtk-2.0/gtk/gtksizegroup.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkstatusbar.h \ + /usr/include/gtk-2.0/gtk/gtkstatusicon.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtktext.h \ + /usr/include/gtk-2.0/gtk/gtktextbuffer.h \ + /usr/include/gtk-2.0/gtk/gtktexttagtable.h \ + /usr/include/gtk-2.0/gtk/gtktextmark.h \ + /usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h \ + /usr/include/gtk-2.0/gtk/gtktextview.h \ + /usr/include/gtk-2.0/gtk/gtktipsquery.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbar.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktree.h \ + /usr/include/gtk-2.0/gtk/gtktreednd.h \ + /usr/include/gtk-2.0/gtk/gtktreeitem.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelsort.h \ + /usr/include/gtk-2.0/gtk/gtktreeselection.h \ + /usr/include/gtk-2.0/gtk/gtktreestore.h \ + /usr/include/gtk-2.0/gtk/gtkuimanager.h \ + /usr/include/gtk-2.0/gtk/gtkvbbox.h \ + /usr/include/gtk-2.0/gtk/gtkversion.h \ + /usr/include/gtk-2.0/gtk/gtkvolumebutton.h \ + /usr/include/gtk-2.0/gtk/gtkvpaned.h \ + /usr/include/gtk-2.0/gtk/gtkvruler.h \ + /usr/include/gtk-2.0/gtk/gtkvscale.h \ + /usr/include/gtk-2.0/gtk/gtkvseparator.h keyboard.h \ + /usr/include/gtk-2.0/gdk/gdkkeysyms.h /usr/include/SDL/SDL_keysym.h + +/usr/include/gtk-2.0/gtk/gtk.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/time.h: + +/usr/include/bits/time.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaboutdialog.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtkaccellabel.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkaccelmap.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/gtk-2.0/gtk/gtkaction.h: + +/usr/include/gtk-2.0/gtk/gtkactiongroup.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkalignment.h: + +/usr/include/gtk-2.0/gtk/gtkarrow.h: + +/usr/include/gtk-2.0/gtk/gtkaspectframe.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtkassistant.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkbindings.h: + +/usr/include/gtk-2.0/gtk/gtkbuildable.h: + +/usr/include/gtk-2.0/gtk/gtkbuilder.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkcalendar.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +/usr/include/gtk-2.0/gtk/gtkcelllayout.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h: + +/usr/include/gtk-2.0/gtk/gtkcellview.h: + +/usr/include/gtk-2.0/gtk/gtkcheckbutton.h: + +/usr/include/gtk-2.0/gtk/gtktogglebutton.h: + +/usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkclipboard.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkclist.h: + +/usr/include/gtk-2.0/gtk/gtkhscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkvscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkcolorbutton.h: + +/usr/include/gtk-2.0/gtk/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +/usr/include/gtk-2.0/gtk/gtkcolorseldialog.h: + +/usr/include/gtk-2.0/gtk/gtkcombo.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkcombobox.h: + +/usr/include/gtk-2.0/gtk/gtktreeview.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkcomboboxentry.h: + +/usr/include/gtk-2.0/gtk/gtkctree.h: + +/usr/include/gtk-2.0/gtk/gtkcurve.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkeventbox.h: + +/usr/include/gtk-2.0/gtk/gtkexpander.h: + +/usr/include/gtk-2.0/gtk/gtkfilesel.h: + +/usr/include/gtk-2.0/gtk/gtkfixed.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilefilter.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkfontbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfontsel.h: + +/usr/include/gtk-2.0/gtk/gtkgamma.h: + +/usr/include/gtk-2.0/gtk/gtkgc.h: + +/usr/include/gtk-2.0/gtk/gtkhandlebox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkhpaned.h: + +/usr/include/gtk-2.0/gtk/gtkpaned.h: + +/usr/include/gtk-2.0/gtk/gtkhruler.h: + +/usr/include/gtk-2.0/gtk/gtkruler.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtkiconfactory.h: + +/usr/include/gtk-2.0/gtk/gtkicontheme.h: + +/usr/include/gtk-2.0/gtk/gtkiconview.h: + +/usr/include/gtk-2.0/gtk/gtktooltip.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkimagemenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkimcontextsimple.h: + +/usr/include/gtk-2.0/gtk/gtkimmulticontext.h: + +/usr/include/gtk-2.0/gtk/gtkinputdialog.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtklayout.h: + +/usr/include/gtk-2.0/gtk/gtklinkbutton.h: + +/usr/include/gtk-2.0/gtk/gtklist.h: + +/usr/include/gtk-2.0/gtk/gtklistitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkmenubar.h: + +/usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkmessagedialog.h: + +/usr/include/gtk-2.0/gtk/gtkmodules.h: + +/usr/include/gtk-2.0/gtk/gtknotebook.h: + +/usr/include/gtk-2.0/gtk/gtkoldeditable.h: + +/usr/include/gtk-2.0/gtk/gtkoptionmenu.h: + +/usr/include/gtk-2.0/gtk/gtkpixmap.h: + +/usr/include/gtk-2.0/gtk/gtkplug.h: + +/usr/include/gtk-2.0/gtk/gtksocket.h: + +/usr/include/gtk-2.0/gtk/gtkpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperation.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkpagesetup.h: + +/usr/include/gtk-2.0/gtk/gtkpapersize.h: + +/usr/include/gtk-2.0/gtk/gtkprintsettings.h: + +/usr/include/gtk-2.0/gtk/gtkprintcontext.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprogress.h: + +/usr/include/gtk-2.0/gtk/gtkprogressbar.h: + +/usr/include/gtk-2.0/gtk/gtkradioaction.h: + +/usr/include/gtk-2.0/gtk/gtktoggleaction.h: + +/usr/include/gtk-2.0/gtk/gtkradiobutton.h: + +/usr/include/gtk-2.0/gtk/gtkradiomenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkrecentaction.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkscalebutton.h: + +/usr/include/gtk-2.0/gtk/gtkscrolledwindow.h: + +/usr/include/gtk-2.0/gtk/gtkviewport.h: + +/usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h: + +/usr/include/gtk-2.0/gtk/gtksizegroup.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkstatusbar.h: + +/usr/include/gtk-2.0/gtk/gtkstatusicon.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtktext.h: + +/usr/include/gtk-2.0/gtk/gtktextbuffer.h: + +/usr/include/gtk-2.0/gtk/gtktexttagtable.h: + +/usr/include/gtk-2.0/gtk/gtktextmark.h: + +/usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h: + +/usr/include/gtk-2.0/gtk/gtktextview.h: + +/usr/include/gtk-2.0/gtk/gtktipsquery.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbar.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktree.h: + +/usr/include/gtk-2.0/gtk/gtktreednd.h: + +/usr/include/gtk-2.0/gtk/gtktreeitem.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelsort.h: + +/usr/include/gtk-2.0/gtk/gtktreeselection.h: + +/usr/include/gtk-2.0/gtk/gtktreestore.h: + +/usr/include/gtk-2.0/gtk/gtkuimanager.h: + +/usr/include/gtk-2.0/gtk/gtkvbbox.h: + +/usr/include/gtk-2.0/gtk/gtkversion.h: + +/usr/include/gtk-2.0/gtk/gtkvolumebutton.h: + +/usr/include/gtk-2.0/gtk/gtkvpaned.h: + +/usr/include/gtk-2.0/gtk/gtkvruler.h: + +/usr/include/gtk-2.0/gtk/gtkvscale.h: + +/usr/include/gtk-2.0/gtk/gtkvseparator.h: + +keyboard.h: + +/usr/include/gtk-2.0/gdk/gdkkeysyms.h: + +/usr/include/SDL/SDL_keysym.h: diff --git a/veejay-client/src/.deps/multitrack.Po b/veejay-client/src/.deps/multitrack.Po new file mode 100644 index 00000000..d8c358b5 --- /dev/null +++ b/veejay-client/src/.deps/multitrack.Po @@ -0,0 +1,1247 @@ +multitrack.o multitrack.o: multitrack.c ../config.h /usr/include/stdint.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/wchar.h \ + /usr/local/include/veejay/vjmem.h /usr/include/stdlib.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h /usr/local/include/veejay/vj-client.h \ + /usr/local/include/veejay/vj-msg.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/local/include/veejay/vims.h /usr/include/gtk-2.0/gtk/gtk.h \ + /usr/include/gtk-2.0/gdk/gdk.h /usr/include/gtk-2.0/gdk/gdkcairo.h \ + /usr/include/gtk-2.0/gdk/gdkcolor.h /usr/include/cairo/cairo.h \ + /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/gconv.h /usr/include/bits/sys_errlist.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaboutdialog.h \ + /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtkaccellabel.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkaccelmap.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h \ + /usr/include/gtk-2.0/gtk/gtkaction.h \ + /usr/include/gtk-2.0/gtk/gtkactiongroup.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkalignment.h \ + /usr/include/gtk-2.0/gtk/gtkarrow.h \ + /usr/include/gtk-2.0/gtk/gtkaspectframe.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h \ + /usr/include/gtk-2.0/gtk/gtkassistant.h \ + /usr/include/gtk-2.0/gtk/gtkbbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkbindings.h \ + /usr/include/gtk-2.0/gtk/gtkbuildable.h \ + /usr/include/gtk-2.0/gtk/gtkbuilder.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkcalendar.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h \ + /usr/include/gtk-2.0/gtk/gtkcelllayout.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h \ + /usr/include/gtk-2.0/gtk/gtkcellview.h \ + /usr/include/gtk-2.0/gtk/gtkcheckbutton.h \ + /usr/include/gtk-2.0/gtk/gtktogglebutton.h \ + /usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h \ + /usr/include/gtk-2.0/gtk/gtkclipboard.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkclist.h \ + /usr/include/gtk-2.0/gtk/gtkhscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkvscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkcolorbutton.h \ + /usr/include/gtk-2.0/gtk/gtkcolorsel.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h \ + /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h \ + /usr/include/gtk-2.0/gtk/gtkcombo.h /usr/include/gtk-2.0/gtk/gtkhbox.h \ + /usr/include/gtk-2.0/gtk/gtkcombobox.h \ + /usr/include/gtk-2.0/gtk/gtktreeview.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkcomboboxentry.h \ + /usr/include/gtk-2.0/gtk/gtkctree.h /usr/include/gtk-2.0/gtk/gtkcurve.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkeventbox.h \ + /usr/include/gtk-2.0/gtk/gtkexpander.h \ + /usr/include/gtk-2.0/gtk/gtkfilesel.h \ + /usr/include/gtk-2.0/gtk/gtkfixed.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilefilter.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkfontbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfontsel.h \ + /usr/include/gtk-2.0/gtk/gtkgamma.h /usr/include/gtk-2.0/gtk/gtkgc.h \ + /usr/include/gtk-2.0/gtk/gtkhandlebox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h \ + /usr/include/gtk-2.0/gtk/gtkhpaned.h \ + /usr/include/gtk-2.0/gtk/gtkpaned.h \ + /usr/include/gtk-2.0/gtk/gtkhruler.h \ + /usr/include/gtk-2.0/gtk/gtkruler.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtkiconfactory.h \ + /usr/include/gtk-2.0/gtk/gtkicontheme.h \ + /usr/include/gtk-2.0/gtk/gtkiconview.h \ + /usr/include/gtk-2.0/gtk/gtktooltip.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkimagemenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkimcontextsimple.h \ + /usr/include/gtk-2.0/gtk/gtkimmulticontext.h \ + /usr/include/gtk-2.0/gtk/gtkinputdialog.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtklayout.h \ + /usr/include/gtk-2.0/gtk/gtklinkbutton.h \ + /usr/include/gtk-2.0/gtk/gtklist.h \ + /usr/include/gtk-2.0/gtk/gtklistitem.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkmenubar.h \ + /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkmessagedialog.h \ + /usr/include/gtk-2.0/gtk/gtkmodules.h \ + /usr/include/gtk-2.0/gtk/gtknotebook.h \ + /usr/include/gtk-2.0/gtk/gtkoldeditable.h \ + /usr/include/gtk-2.0/gtk/gtkoptionmenu.h \ + /usr/include/gtk-2.0/gtk/gtkpixmap.h /usr/include/gtk-2.0/gtk/gtkplug.h \ + /usr/include/gtk-2.0/gtk/gtksocket.h \ + /usr/include/gtk-2.0/gtk/gtkpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperation.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkpagesetup.h \ + /usr/include/gtk-2.0/gtk/gtkpapersize.h \ + /usr/include/gtk-2.0/gtk/gtkprintsettings.h \ + /usr/include/gtk-2.0/gtk/gtkprintcontext.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprogress.h \ + /usr/include/gtk-2.0/gtk/gtkprogressbar.h \ + /usr/include/gtk-2.0/gtk/gtkradioaction.h \ + /usr/include/gtk-2.0/gtk/gtktoggleaction.h \ + /usr/include/gtk-2.0/gtk/gtkradiobutton.h \ + /usr/include/gtk-2.0/gtk/gtkradiomenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkrecentaction.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkscalebutton.h \ + /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h \ + /usr/include/gtk-2.0/gtk/gtkviewport.h \ + /usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h \ + /usr/include/gtk-2.0/gtk/gtksizegroup.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkstatusbar.h \ + /usr/include/gtk-2.0/gtk/gtkstatusicon.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtktext.h \ + /usr/include/gtk-2.0/gtk/gtktextbuffer.h \ + /usr/include/gtk-2.0/gtk/gtktexttagtable.h \ + /usr/include/gtk-2.0/gtk/gtktextmark.h \ + /usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h \ + /usr/include/gtk-2.0/gtk/gtktextview.h \ + /usr/include/gtk-2.0/gtk/gtktipsquery.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbar.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktree.h \ + /usr/include/gtk-2.0/gtk/gtktreednd.h \ + /usr/include/gtk-2.0/gtk/gtktreeitem.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelsort.h \ + /usr/include/gtk-2.0/gtk/gtktreeselection.h \ + /usr/include/gtk-2.0/gtk/gtktreestore.h \ + /usr/include/gtk-2.0/gtk/gtkuimanager.h \ + /usr/include/gtk-2.0/gtk/gtkvbbox.h \ + /usr/include/gtk-2.0/gtk/gtkversion.h \ + /usr/include/gtk-2.0/gtk/gtkvolumebutton.h \ + /usr/include/gtk-2.0/gtk/gtkvpaned.h \ + /usr/include/gtk-2.0/gtk/gtkvruler.h \ + /usr/include/gtk-2.0/gtk/gtkvscale.h \ + /usr/include/gtk-2.0/gtk/gtkvseparator.h /usr/include/string.h \ + /usr/include/gtk-2.0/gdk/gdkx.h /usr/include/gtk-2.0/gdk/gdkprivate.h \ + /usr/include/X11/Xlib.h /usr/include/X11/X.h \ + /usr/include/X11/Xfuncproto.h /usr/include/X11/Xosdefs.h \ + /usr/include/X11/Xutil.h /usr/include/X11/keysym.h \ + /usr/include/X11/keysymdef.h /usr/local/include/veejay/libvevo.h \ + ../src/vj-api.h sequence.h tracksources.h /usr/include/assert.h \ + ../src/common.h ../src/utils.h ../src/widgets/gtktimeselection.h + +../config.h: + +/usr/include/stdint.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/wchar.h: + +/usr/local/include/veejay/vjmem.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/xlocale.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/local/include/veejay/vj-client.h: + +/usr/local/include/veejay/vj-msg.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/local/include/veejay/vims.h: + +/usr/include/gtk-2.0/gtk/gtk.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/bits/xopen_lim.h: + +/usr/include/bits/stdio_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/sys_errlist.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaboutdialog.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtkaccellabel.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkaccelmap.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/gtk-2.0/gtk/gtkaction.h: + +/usr/include/gtk-2.0/gtk/gtkactiongroup.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkalignment.h: + +/usr/include/gtk-2.0/gtk/gtkarrow.h: + +/usr/include/gtk-2.0/gtk/gtkaspectframe.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtkassistant.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkbindings.h: + +/usr/include/gtk-2.0/gtk/gtkbuildable.h: + +/usr/include/gtk-2.0/gtk/gtkbuilder.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkcalendar.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +/usr/include/gtk-2.0/gtk/gtkcelllayout.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h: + +/usr/include/gtk-2.0/gtk/gtkcellview.h: + +/usr/include/gtk-2.0/gtk/gtkcheckbutton.h: + +/usr/include/gtk-2.0/gtk/gtktogglebutton.h: + +/usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkclipboard.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkclist.h: + +/usr/include/gtk-2.0/gtk/gtkhscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkvscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkcolorbutton.h: + +/usr/include/gtk-2.0/gtk/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +/usr/include/gtk-2.0/gtk/gtkcolorseldialog.h: + +/usr/include/gtk-2.0/gtk/gtkcombo.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkcombobox.h: + +/usr/include/gtk-2.0/gtk/gtktreeview.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkcomboboxentry.h: + +/usr/include/gtk-2.0/gtk/gtkctree.h: + +/usr/include/gtk-2.0/gtk/gtkcurve.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkeventbox.h: + +/usr/include/gtk-2.0/gtk/gtkexpander.h: + +/usr/include/gtk-2.0/gtk/gtkfilesel.h: + +/usr/include/gtk-2.0/gtk/gtkfixed.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilefilter.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkfontbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfontsel.h: + +/usr/include/gtk-2.0/gtk/gtkgamma.h: + +/usr/include/gtk-2.0/gtk/gtkgc.h: + +/usr/include/gtk-2.0/gtk/gtkhandlebox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkhpaned.h: + +/usr/include/gtk-2.0/gtk/gtkpaned.h: + +/usr/include/gtk-2.0/gtk/gtkhruler.h: + +/usr/include/gtk-2.0/gtk/gtkruler.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtkiconfactory.h: + +/usr/include/gtk-2.0/gtk/gtkicontheme.h: + +/usr/include/gtk-2.0/gtk/gtkiconview.h: + +/usr/include/gtk-2.0/gtk/gtktooltip.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkimagemenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkimcontextsimple.h: + +/usr/include/gtk-2.0/gtk/gtkimmulticontext.h: + +/usr/include/gtk-2.0/gtk/gtkinputdialog.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtklayout.h: + +/usr/include/gtk-2.0/gtk/gtklinkbutton.h: + +/usr/include/gtk-2.0/gtk/gtklist.h: + +/usr/include/gtk-2.0/gtk/gtklistitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkmenubar.h: + +/usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkmessagedialog.h: + +/usr/include/gtk-2.0/gtk/gtkmodules.h: + +/usr/include/gtk-2.0/gtk/gtknotebook.h: + +/usr/include/gtk-2.0/gtk/gtkoldeditable.h: + +/usr/include/gtk-2.0/gtk/gtkoptionmenu.h: + +/usr/include/gtk-2.0/gtk/gtkpixmap.h: + +/usr/include/gtk-2.0/gtk/gtkplug.h: + +/usr/include/gtk-2.0/gtk/gtksocket.h: + +/usr/include/gtk-2.0/gtk/gtkpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperation.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkpagesetup.h: + +/usr/include/gtk-2.0/gtk/gtkpapersize.h: + +/usr/include/gtk-2.0/gtk/gtkprintsettings.h: + +/usr/include/gtk-2.0/gtk/gtkprintcontext.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprogress.h: + +/usr/include/gtk-2.0/gtk/gtkprogressbar.h: + +/usr/include/gtk-2.0/gtk/gtkradioaction.h: + +/usr/include/gtk-2.0/gtk/gtktoggleaction.h: + +/usr/include/gtk-2.0/gtk/gtkradiobutton.h: + +/usr/include/gtk-2.0/gtk/gtkradiomenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkrecentaction.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkscalebutton.h: + +/usr/include/gtk-2.0/gtk/gtkscrolledwindow.h: + +/usr/include/gtk-2.0/gtk/gtkviewport.h: + +/usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h: + +/usr/include/gtk-2.0/gtk/gtksizegroup.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkstatusbar.h: + +/usr/include/gtk-2.0/gtk/gtkstatusicon.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtktext.h: + +/usr/include/gtk-2.0/gtk/gtktextbuffer.h: + +/usr/include/gtk-2.0/gtk/gtktexttagtable.h: + +/usr/include/gtk-2.0/gtk/gtktextmark.h: + +/usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h: + +/usr/include/gtk-2.0/gtk/gtktextview.h: + +/usr/include/gtk-2.0/gtk/gtktipsquery.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbar.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktree.h: + +/usr/include/gtk-2.0/gtk/gtktreednd.h: + +/usr/include/gtk-2.0/gtk/gtktreeitem.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelsort.h: + +/usr/include/gtk-2.0/gtk/gtktreeselection.h: + +/usr/include/gtk-2.0/gtk/gtktreestore.h: + +/usr/include/gtk-2.0/gtk/gtkuimanager.h: + +/usr/include/gtk-2.0/gtk/gtkvbbox.h: + +/usr/include/gtk-2.0/gtk/gtkversion.h: + +/usr/include/gtk-2.0/gtk/gtkvolumebutton.h: + +/usr/include/gtk-2.0/gtk/gtkvpaned.h: + +/usr/include/gtk-2.0/gtk/gtkvruler.h: + +/usr/include/gtk-2.0/gtk/gtkvscale.h: + +/usr/include/gtk-2.0/gtk/gtkvseparator.h: + +/usr/include/string.h: + +/usr/include/gtk-2.0/gdk/gdkx.h: + +/usr/include/gtk-2.0/gdk/gdkprivate.h: + +/usr/include/X11/Xlib.h: + +/usr/include/X11/X.h: + +/usr/include/X11/Xfuncproto.h: + +/usr/include/X11/Xosdefs.h: + +/usr/include/X11/Xutil.h: + +/usr/include/X11/keysym.h: + +/usr/include/X11/keysymdef.h: + +/usr/local/include/veejay/libvevo.h: + +../src/vj-api.h: + +sequence.h: + +tracksources.h: + +/usr/include/assert.h: + +../src/common.h: + +../src/utils.h: + +../src/widgets/gtktimeselection.h: diff --git a/veejay-client/src/.deps/sequence.Po b/veejay-client/src/.deps/sequence.Po new file mode 100644 index 00000000..d445ace1 --- /dev/null +++ b/veejay-client/src/.deps/sequence.Po @@ -0,0 +1,543 @@ +sequence.o sequence.o: sequence.c ../config.h /usr/include/stdint.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/wchar.h \ + /usr/local/include/veejay/vjmem.h /usr/include/stdlib.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h /usr/local/include/veejay/vims.h \ + /usr/local/include/veejay/vj-client.h \ + /usr/local/include/veejay/vj-msg.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/glib-2.0/glib.h /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/gtk-2.0/gdk/gdk.h /usr/include/gtk-2.0/gdk/gdkcairo.h \ + /usr/include/gtk-2.0/gdk/gdkcolor.h /usr/include/cairo/cairo.h \ + /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/gconv.h /usr/include/bits/sys_errlist.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h /usr/include/sys/time.h \ + /usr/local/include/veejay/libvevo.h ../src/sequence.h ../src/utils.h \ + /usr/include/ffmpeg/avutil.h /usr/include/ffmpeg/common.h \ + /usr/include/inttypes.h /usr/include/ffmpeg/mathematics.h \ + /usr/include/ffmpeg/rational.h /usr/include/ffmpeg/integer.h \ + /usr/include/ffmpeg/intfloat_readwrite.h /usr/include/ffmpeg/log.h \ + /usr/local/include/veejay/vje.h /usr/local/include/veejay/yuvconv.h \ + /usr/include/string.h /usr/include/assert.h + +../config.h: + +/usr/include/stdint.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/wchar.h: + +/usr/local/include/veejay/vjmem.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/xlocale.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/local/include/veejay/vims.h: + +/usr/local/include/veejay/vj-client.h: + +/usr/local/include/veejay/vj-msg.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/bits/xopen_lim.h: + +/usr/include/bits/stdio_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/sys_errlist.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/sys/time.h: + +/usr/local/include/veejay/libvevo.h: + +../src/sequence.h: + +../src/utils.h: + +/usr/include/ffmpeg/avutil.h: + +/usr/include/ffmpeg/common.h: + +/usr/include/inttypes.h: + +/usr/include/ffmpeg/mathematics.h: + +/usr/include/ffmpeg/rational.h: + +/usr/include/ffmpeg/integer.h: + +/usr/include/ffmpeg/intfloat_readwrite.h: + +/usr/include/ffmpeg/log.h: + +/usr/local/include/veejay/vje.h: + +/usr/local/include/veejay/yuvconv.h: + +/usr/include/string.h: + +/usr/include/assert.h: diff --git a/veejay-client/src/.deps/tracksources.Po b/veejay-client/src/.deps/tracksources.Po new file mode 100644 index 00000000..4640a21c --- /dev/null +++ b/veejay-client/src/.deps/tracksources.Po @@ -0,0 +1,1186 @@ +tracksources.o tracksources.o: tracksources.c \ + /usr/include/gtk-2.0/gtk/gtk.h /usr/include/gtk-2.0/gdk/gdk.h \ + /usr/include/gtk-2.0/gdk/gdkcairo.h /usr/include/gtk-2.0/gdk/gdkcolor.h \ + /usr/include/cairo/cairo.h /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/glib-2.0/glib/gcache.h \ + /usr/include/glib-2.0/glib/glist.h /usr/include/glib-2.0/glib/gmem.h \ + /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaboutdialog.h \ + /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtkaccellabel.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkaccelmap.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h \ + /usr/include/gtk-2.0/gtk/gtkaction.h \ + /usr/include/gtk-2.0/gtk/gtkactiongroup.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkalignment.h \ + /usr/include/gtk-2.0/gtk/gtkarrow.h \ + /usr/include/gtk-2.0/gtk/gtkaspectframe.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h \ + /usr/include/gtk-2.0/gtk/gtkassistant.h \ + /usr/include/gtk-2.0/gtk/gtkbbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkbindings.h \ + /usr/include/gtk-2.0/gtk/gtkbuildable.h \ + /usr/include/gtk-2.0/gtk/gtkbuilder.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkcalendar.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h \ + /usr/include/gtk-2.0/gtk/gtkcelllayout.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h \ + /usr/include/gtk-2.0/gtk/gtkcellview.h \ + /usr/include/gtk-2.0/gtk/gtkcheckbutton.h \ + /usr/include/gtk-2.0/gtk/gtktogglebutton.h \ + /usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h \ + /usr/include/gtk-2.0/gtk/gtkclipboard.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkclist.h \ + /usr/include/gtk-2.0/gtk/gtkhscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkvscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkcolorbutton.h \ + /usr/include/gtk-2.0/gtk/gtkcolorsel.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h \ + /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h \ + /usr/include/gtk-2.0/gtk/gtkcombo.h /usr/include/gtk-2.0/gtk/gtkhbox.h \ + /usr/include/gtk-2.0/gtk/gtkcombobox.h \ + /usr/include/gtk-2.0/gtk/gtktreeview.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkcomboboxentry.h \ + /usr/include/gtk-2.0/gtk/gtkctree.h /usr/include/gtk-2.0/gtk/gtkcurve.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkeventbox.h \ + /usr/include/gtk-2.0/gtk/gtkexpander.h \ + /usr/include/gtk-2.0/gtk/gtkfilesel.h \ + /usr/include/gtk-2.0/gtk/gtkfixed.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilefilter.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkfontbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfontsel.h \ + /usr/include/gtk-2.0/gtk/gtkgamma.h /usr/include/gtk-2.0/gtk/gtkgc.h \ + /usr/include/gtk-2.0/gtk/gtkhandlebox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h \ + /usr/include/gtk-2.0/gtk/gtkhpaned.h \ + /usr/include/gtk-2.0/gtk/gtkpaned.h \ + /usr/include/gtk-2.0/gtk/gtkhruler.h \ + /usr/include/gtk-2.0/gtk/gtkruler.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtkiconfactory.h \ + /usr/include/gtk-2.0/gtk/gtkicontheme.h \ + /usr/include/gtk-2.0/gtk/gtkiconview.h \ + /usr/include/gtk-2.0/gtk/gtktooltip.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkimagemenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkimcontextsimple.h \ + /usr/include/gtk-2.0/gtk/gtkimmulticontext.h \ + /usr/include/gtk-2.0/gtk/gtkinputdialog.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtklayout.h \ + /usr/include/gtk-2.0/gtk/gtklinkbutton.h \ + /usr/include/gtk-2.0/gtk/gtklist.h \ + /usr/include/gtk-2.0/gtk/gtklistitem.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkmenubar.h \ + /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkmessagedialog.h \ + /usr/include/gtk-2.0/gtk/gtkmodules.h \ + /usr/include/gtk-2.0/gtk/gtknotebook.h \ + /usr/include/gtk-2.0/gtk/gtkoldeditable.h \ + /usr/include/gtk-2.0/gtk/gtkoptionmenu.h \ + /usr/include/gtk-2.0/gtk/gtkpixmap.h /usr/include/gtk-2.0/gtk/gtkplug.h \ + /usr/include/gtk-2.0/gtk/gtksocket.h \ + /usr/include/gtk-2.0/gtk/gtkpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperation.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkpagesetup.h \ + /usr/include/gtk-2.0/gtk/gtkpapersize.h \ + /usr/include/gtk-2.0/gtk/gtkprintsettings.h \ + /usr/include/gtk-2.0/gtk/gtkprintcontext.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprogress.h \ + /usr/include/gtk-2.0/gtk/gtkprogressbar.h \ + /usr/include/gtk-2.0/gtk/gtkradioaction.h \ + /usr/include/gtk-2.0/gtk/gtktoggleaction.h \ + /usr/include/gtk-2.0/gtk/gtkradiobutton.h \ + /usr/include/gtk-2.0/gtk/gtkradiomenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkrecentaction.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkscalebutton.h \ + /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h \ + /usr/include/gtk-2.0/gtk/gtkviewport.h \ + /usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h \ + /usr/include/gtk-2.0/gtk/gtksizegroup.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkstatusbar.h \ + /usr/include/gtk-2.0/gtk/gtkstatusicon.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtktext.h \ + /usr/include/gtk-2.0/gtk/gtktextbuffer.h \ + /usr/include/gtk-2.0/gtk/gtktexttagtable.h \ + /usr/include/gtk-2.0/gtk/gtktextmark.h \ + /usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h \ + /usr/include/gtk-2.0/gtk/gtktextview.h \ + /usr/include/gtk-2.0/gtk/gtktipsquery.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbar.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktree.h \ + /usr/include/gtk-2.0/gtk/gtktreednd.h \ + /usr/include/gtk-2.0/gtk/gtktreeitem.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelsort.h \ + /usr/include/gtk-2.0/gtk/gtktreeselection.h \ + /usr/include/gtk-2.0/gtk/gtktreestore.h \ + /usr/include/gtk-2.0/gtk/gtkuimanager.h \ + /usr/include/gtk-2.0/gtk/gtkvbbox.h \ + /usr/include/gtk-2.0/gtk/gtkversion.h \ + /usr/include/gtk-2.0/gtk/gtkvolumebutton.h \ + /usr/include/gtk-2.0/gtk/gtkvpaned.h \ + /usr/include/gtk-2.0/gtk/gtkvruler.h \ + /usr/include/gtk-2.0/gtk/gtkvscale.h \ + /usr/include/gtk-2.0/gtk/gtkvseparator.h \ + /usr/local/include/veejay/vjmem.h ../config.h /usr/include/stdint.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h + +/usr/include/gtk-2.0/gtk/gtk.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/time.h: + +/usr/include/bits/time.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaboutdialog.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtkaccellabel.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkaccelmap.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/gtk-2.0/gtk/gtkaction.h: + +/usr/include/gtk-2.0/gtk/gtkactiongroup.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkalignment.h: + +/usr/include/gtk-2.0/gtk/gtkarrow.h: + +/usr/include/gtk-2.0/gtk/gtkaspectframe.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtkassistant.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkbindings.h: + +/usr/include/gtk-2.0/gtk/gtkbuildable.h: + +/usr/include/gtk-2.0/gtk/gtkbuilder.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkcalendar.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +/usr/include/gtk-2.0/gtk/gtkcelllayout.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h: + +/usr/include/gtk-2.0/gtk/gtkcellview.h: + +/usr/include/gtk-2.0/gtk/gtkcheckbutton.h: + +/usr/include/gtk-2.0/gtk/gtktogglebutton.h: + +/usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkclipboard.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkclist.h: + +/usr/include/gtk-2.0/gtk/gtkhscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkvscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkcolorbutton.h: + +/usr/include/gtk-2.0/gtk/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +/usr/include/gtk-2.0/gtk/gtkcolorseldialog.h: + +/usr/include/gtk-2.0/gtk/gtkcombo.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkcombobox.h: + +/usr/include/gtk-2.0/gtk/gtktreeview.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkcomboboxentry.h: + +/usr/include/gtk-2.0/gtk/gtkctree.h: + +/usr/include/gtk-2.0/gtk/gtkcurve.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkeventbox.h: + +/usr/include/gtk-2.0/gtk/gtkexpander.h: + +/usr/include/gtk-2.0/gtk/gtkfilesel.h: + +/usr/include/gtk-2.0/gtk/gtkfixed.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilefilter.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkfontbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfontsel.h: + +/usr/include/gtk-2.0/gtk/gtkgamma.h: + +/usr/include/gtk-2.0/gtk/gtkgc.h: + +/usr/include/gtk-2.0/gtk/gtkhandlebox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkhpaned.h: + +/usr/include/gtk-2.0/gtk/gtkpaned.h: + +/usr/include/gtk-2.0/gtk/gtkhruler.h: + +/usr/include/gtk-2.0/gtk/gtkruler.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtkiconfactory.h: + +/usr/include/gtk-2.0/gtk/gtkicontheme.h: + +/usr/include/gtk-2.0/gtk/gtkiconview.h: + +/usr/include/gtk-2.0/gtk/gtktooltip.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkimagemenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkimcontextsimple.h: + +/usr/include/gtk-2.0/gtk/gtkimmulticontext.h: + +/usr/include/gtk-2.0/gtk/gtkinputdialog.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtklayout.h: + +/usr/include/gtk-2.0/gtk/gtklinkbutton.h: + +/usr/include/gtk-2.0/gtk/gtklist.h: + +/usr/include/gtk-2.0/gtk/gtklistitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkmenubar.h: + +/usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkmessagedialog.h: + +/usr/include/gtk-2.0/gtk/gtkmodules.h: + +/usr/include/gtk-2.0/gtk/gtknotebook.h: + +/usr/include/gtk-2.0/gtk/gtkoldeditable.h: + +/usr/include/gtk-2.0/gtk/gtkoptionmenu.h: + +/usr/include/gtk-2.0/gtk/gtkpixmap.h: + +/usr/include/gtk-2.0/gtk/gtkplug.h: + +/usr/include/gtk-2.0/gtk/gtksocket.h: + +/usr/include/gtk-2.0/gtk/gtkpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperation.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkpagesetup.h: + +/usr/include/gtk-2.0/gtk/gtkpapersize.h: + +/usr/include/gtk-2.0/gtk/gtkprintsettings.h: + +/usr/include/gtk-2.0/gtk/gtkprintcontext.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprogress.h: + +/usr/include/gtk-2.0/gtk/gtkprogressbar.h: + +/usr/include/gtk-2.0/gtk/gtkradioaction.h: + +/usr/include/gtk-2.0/gtk/gtktoggleaction.h: + +/usr/include/gtk-2.0/gtk/gtkradiobutton.h: + +/usr/include/gtk-2.0/gtk/gtkradiomenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkrecentaction.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkscalebutton.h: + +/usr/include/gtk-2.0/gtk/gtkscrolledwindow.h: + +/usr/include/gtk-2.0/gtk/gtkviewport.h: + +/usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h: + +/usr/include/gtk-2.0/gtk/gtksizegroup.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkstatusbar.h: + +/usr/include/gtk-2.0/gtk/gtkstatusicon.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtktext.h: + +/usr/include/gtk-2.0/gtk/gtktextbuffer.h: + +/usr/include/gtk-2.0/gtk/gtktexttagtable.h: + +/usr/include/gtk-2.0/gtk/gtktextmark.h: + +/usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h: + +/usr/include/gtk-2.0/gtk/gtktextview.h: + +/usr/include/gtk-2.0/gtk/gtktipsquery.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbar.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktree.h: + +/usr/include/gtk-2.0/gtk/gtktreednd.h: + +/usr/include/gtk-2.0/gtk/gtktreeitem.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelsort.h: + +/usr/include/gtk-2.0/gtk/gtktreeselection.h: + +/usr/include/gtk-2.0/gtk/gtktreestore.h: + +/usr/include/gtk-2.0/gtk/gtkuimanager.h: + +/usr/include/gtk-2.0/gtk/gtkvbbox.h: + +/usr/include/gtk-2.0/gtk/gtkversion.h: + +/usr/include/gtk-2.0/gtk/gtkvolumebutton.h: + +/usr/include/gtk-2.0/gtk/gtkvpaned.h: + +/usr/include/gtk-2.0/gtk/gtkvruler.h: + +/usr/include/gtk-2.0/gtk/gtkvscale.h: + +/usr/include/gtk-2.0/gtk/gtkvseparator.h: + +/usr/local/include/veejay/vjmem.h: + +../config.h: + +/usr/include/stdint.h: + +/usr/include/stdlib.h: + +/usr/include/sys/types.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: diff --git a/veejay-client/src/.deps/utils.Po b/veejay-client/src/.deps/utils.Po new file mode 100644 index 00000000..eb56a69b --- /dev/null +++ b/veejay-client/src/.deps/utils.Po @@ -0,0 +1,116 @@ +utils.o utils.o: utils.c ../config.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/mjpegtools/mpegconsts.h /usr/include/mjpegtools/yuv4mpeg.h \ + /usr/include/stdlib.h /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/xlocale.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/mjpegtools/mjpeg_types.h /usr/include/stdint.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/mjpegtools/mjpeg_logging.h \ + /usr/include/mjpegtools/mpegtimecode.h \ + /usr/local/include/veejay/vjmem.h /usr/include/string.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/mjpegtools/mpegconsts.h: + +/usr/include/mjpegtools/yuv4mpeg.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/xlocale.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/mjpegtools/mjpeg_types.h: + +/usr/include/stdint.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/mjpegtools/mjpeg_logging.h: + +/usr/include/mjpegtools/mpegtimecode.h: + +/usr/local/include/veejay/vjmem.h: + +/usr/include/string.h: diff --git a/veejay-client/src/.deps/vj-api.Po b/veejay-client/src/.deps/vj-api.Po new file mode 100644 index 00000000..b4de65a0 --- /dev/null +++ b/veejay-client/src/.deps/vj-api.Po @@ -0,0 +1,1422 @@ +vj-api.o vj-api.o: vj-api.c ../config.h /usr/include/math.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/huge_val.h \ + /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \ + /usr/include/bits/inf.h /usr/include/bits/nan.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/include/stdlib.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h /usr/include/stdint.h /usr/include/bits/wchar.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/asm-i386/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/sys/ucontext.h /usr/include/bits/sigthread.h \ + /usr/include/sys/wait.h /usr/include/sys/resource.h \ + /usr/include/bits/resource.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + /usr/include/dirent.h /usr/include/bits/dirent.h \ + /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/glib-2.0/glib.h /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h /usr/include/bits/stdio_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/asm-i386/errno.h /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/libglade-2.0/glade/glade.h \ + /usr/include/libglade-2.0/glade/glade-init.h \ + /usr/include/libglade-2.0/glade/glade-xml.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h /usr/include/gtk-2.0/gdk/gdk.h \ + /usr/include/gtk-2.0/gdk/gdkcairo.h /usr/include/gtk-2.0/gdk/gdkcolor.h \ + /usr/include/cairo/cairo.h /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/gconv.h /usr/include/bits/sys_errlist.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h /usr/include/gtk-2.0/gtk/gtk.h \ + /usr/include/gtk-2.0/gtk/gtkaboutdialog.h \ + /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkaccellabel.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkaccelmap.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h \ + /usr/include/gtk-2.0/gtk/gtkaction.h \ + /usr/include/gtk-2.0/gtk/gtkactiongroup.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkalignment.h \ + /usr/include/gtk-2.0/gtk/gtkarrow.h \ + /usr/include/gtk-2.0/gtk/gtkaspectframe.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h \ + /usr/include/gtk-2.0/gtk/gtkassistant.h \ + /usr/include/gtk-2.0/gtk/gtkbbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkbindings.h \ + /usr/include/gtk-2.0/gtk/gtkbuildable.h \ + /usr/include/gtk-2.0/gtk/gtkbuilder.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkcalendar.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h \ + /usr/include/gtk-2.0/gtk/gtkcelllayout.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h \ + /usr/include/gtk-2.0/gtk/gtkcellview.h \ + /usr/include/gtk-2.0/gtk/gtkcheckbutton.h \ + /usr/include/gtk-2.0/gtk/gtktogglebutton.h \ + /usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h \ + /usr/include/gtk-2.0/gtk/gtkclipboard.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkclist.h \ + /usr/include/gtk-2.0/gtk/gtkhscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkvscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkcolorbutton.h \ + /usr/include/gtk-2.0/gtk/gtkcolorsel.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h \ + /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h \ + /usr/include/gtk-2.0/gtk/gtkcombo.h /usr/include/gtk-2.0/gtk/gtkhbox.h \ + /usr/include/gtk-2.0/gtk/gtkcombobox.h \ + /usr/include/gtk-2.0/gtk/gtktreeview.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkcomboboxentry.h \ + /usr/include/gtk-2.0/gtk/gtkctree.h /usr/include/gtk-2.0/gtk/gtkcurve.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkeventbox.h \ + /usr/include/gtk-2.0/gtk/gtkexpander.h \ + /usr/include/gtk-2.0/gtk/gtkfilesel.h \ + /usr/include/gtk-2.0/gtk/gtkfixed.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilefilter.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkfontbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfontsel.h \ + /usr/include/gtk-2.0/gtk/gtkgamma.h /usr/include/gtk-2.0/gtk/gtkgc.h \ + /usr/include/gtk-2.0/gtk/gtkhandlebox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h \ + /usr/include/gtk-2.0/gtk/gtkhpaned.h \ + /usr/include/gtk-2.0/gtk/gtkpaned.h \ + /usr/include/gtk-2.0/gtk/gtkhruler.h \ + /usr/include/gtk-2.0/gtk/gtkruler.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtkiconfactory.h \ + /usr/include/gtk-2.0/gtk/gtkicontheme.h \ + /usr/include/gtk-2.0/gtk/gtkiconview.h \ + /usr/include/gtk-2.0/gtk/gtktooltip.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkimagemenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkimcontextsimple.h \ + /usr/include/gtk-2.0/gtk/gtkimmulticontext.h \ + /usr/include/gtk-2.0/gtk/gtkinputdialog.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtklayout.h \ + /usr/include/gtk-2.0/gtk/gtklinkbutton.h \ + /usr/include/gtk-2.0/gtk/gtklist.h \ + /usr/include/gtk-2.0/gtk/gtklistitem.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkmenubar.h \ + /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtkmessagedialog.h \ + /usr/include/gtk-2.0/gtk/gtkmodules.h \ + /usr/include/gtk-2.0/gtk/gtknotebook.h \ + /usr/include/gtk-2.0/gtk/gtkoldeditable.h \ + /usr/include/gtk-2.0/gtk/gtkoptionmenu.h \ + /usr/include/gtk-2.0/gtk/gtkpixmap.h /usr/include/gtk-2.0/gtk/gtkplug.h \ + /usr/include/gtk-2.0/gtk/gtksocket.h \ + /usr/include/gtk-2.0/gtk/gtkpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperation.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkpagesetup.h \ + /usr/include/gtk-2.0/gtk/gtkpapersize.h \ + /usr/include/gtk-2.0/gtk/gtkprintsettings.h \ + /usr/include/gtk-2.0/gtk/gtkprintcontext.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprogress.h \ + /usr/include/gtk-2.0/gtk/gtkprogressbar.h \ + /usr/include/gtk-2.0/gtk/gtkradioaction.h \ + /usr/include/gtk-2.0/gtk/gtktoggleaction.h \ + /usr/include/gtk-2.0/gtk/gtkradiobutton.h \ + /usr/include/gtk-2.0/gtk/gtkradiomenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkrecentaction.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkscalebutton.h \ + /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h \ + /usr/include/gtk-2.0/gtk/gtkviewport.h \ + /usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h \ + /usr/include/gtk-2.0/gtk/gtksizegroup.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkstatusbar.h \ + /usr/include/gtk-2.0/gtk/gtkstatusicon.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtktext.h \ + /usr/include/gtk-2.0/gtk/gtktextbuffer.h \ + /usr/include/gtk-2.0/gtk/gtktexttagtable.h \ + /usr/include/gtk-2.0/gtk/gtktextmark.h \ + /usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h \ + /usr/include/gtk-2.0/gtk/gtktextview.h \ + /usr/include/gtk-2.0/gtk/gtktipsquery.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbar.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktree.h \ + /usr/include/gtk-2.0/gtk/gtktreednd.h \ + /usr/include/gtk-2.0/gtk/gtktreeitem.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelsort.h \ + /usr/include/gtk-2.0/gtk/gtktreeselection.h \ + /usr/include/gtk-2.0/gtk/gtktreestore.h \ + /usr/include/gtk-2.0/gtk/gtkuimanager.h \ + /usr/include/gtk-2.0/gtk/gtkvbbox.h \ + /usr/include/gtk-2.0/gtk/gtkversion.h \ + /usr/include/gtk-2.0/gtk/gtkvolumebutton.h \ + /usr/include/gtk-2.0/gtk/gtkvpaned.h \ + /usr/include/gtk-2.0/gtk/gtkvruler.h \ + /usr/include/gtk-2.0/gtk/gtkvscale.h \ + /usr/include/gtk-2.0/gtk/gtkvseparator.h /usr/include/string.h \ + /usr/include/sys/time.h /usr/local/include/veejay/vjmem.h \ + /usr/local/include/veejay/vje.h /usr/local/include/veejay/vj-client.h \ + /usr/local/include/veejay/vj-msg.h /usr/local/include/veejay/vims.h \ + ../src/vj-api.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/bits/uio.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h /usr/include/mjpegtools/mpegconsts.h \ + /usr/include/mjpegtools/yuv4mpeg.h \ + /usr/include/mjpegtools/mjpeg_types.h \ + /usr/include/mjpegtools/mjpeg_logging.h \ + /usr/include/mjpegtools/mpegtimecode.h /usr/include/gtk-2.0/gdk/gdkx.h \ + /usr/include/gtk-2.0/gdk/gdkprivate.h /usr/include/X11/Xlib.h \ + /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \ + /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \ + /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \ + widgets/cellrendererspin.h widgets/gtkknob.h widgets/gtktimeselection.h \ + /usr/include/libgen.h ../src/keyboard.h \ + /usr/include/gtk-2.0/gdk/gdkkeysyms.h /usr/include/SDL/SDL_keysym.h \ + ../src/curve.h ../src/multitrack.h ../src/common.h ../src/utils.h \ + ../src/sequence.h /usr/local/include/veejay/yuvconv.h \ + /usr/include/ffmpeg/avutil.h /usr/include/ffmpeg/common.h \ + /usr/include/inttypes.h /usr/include/ffmpeg/mathematics.h \ + /usr/include/ffmpeg/rational.h /usr/include/ffmpeg/integer.h \ + /usr/include/ffmpeg/intfloat_readwrite.h /usr/include/ffmpeg/log.h \ + /usr/local/include/veejay/vevo.h /usr/local/include/veejay/libvevo.h \ + ../src/vmidi.h /usr/include/assert.h callback.c /usr/include/ctype.h + +../config.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/xlocale.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/signal.h: + +/usr/include/bits/signum.h: + +/usr/include/bits/siginfo.h: + +/usr/include/bits/sigaction.h: + +/usr/include/bits/sigcontext.h: + +/usr/include/asm/sigcontext.h: + +/usr/include/asm-i386/sigcontext.h: + +/usr/include/bits/sigstack.h: + +/usr/include/sys/ucontext.h: + +/usr/include/bits/sigthread.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/resource.h: + +/usr/include/bits/resource.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/dirent.h: + +/usr/include/bits/dirent.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/bits/xopen_lim.h: + +/usr/include/bits/stdio_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/errno.h: + +/usr/include/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/asm/errno.h: + +/usr/include/asm-i386/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/libglade-2.0/glade/glade.h: + +/usr/include/libglade-2.0/glade/glade-init.h: + +/usr/include/libglade-2.0/glade/glade-xml.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/sys_errlist.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtk.h: + +/usr/include/gtk-2.0/gtk/gtkaboutdialog.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkaccellabel.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkaccelmap.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/gtk-2.0/gtk/gtkaction.h: + +/usr/include/gtk-2.0/gtk/gtkactiongroup.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkalignment.h: + +/usr/include/gtk-2.0/gtk/gtkarrow.h: + +/usr/include/gtk-2.0/gtk/gtkaspectframe.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtkassistant.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkbindings.h: + +/usr/include/gtk-2.0/gtk/gtkbuildable.h: + +/usr/include/gtk-2.0/gtk/gtkbuilder.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkcalendar.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +/usr/include/gtk-2.0/gtk/gtkcelllayout.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h: + +/usr/include/gtk-2.0/gtk/gtkcellview.h: + +/usr/include/gtk-2.0/gtk/gtkcheckbutton.h: + +/usr/include/gtk-2.0/gtk/gtktogglebutton.h: + +/usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkclipboard.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkclist.h: + +/usr/include/gtk-2.0/gtk/gtkhscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkvscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkcolorbutton.h: + +/usr/include/gtk-2.0/gtk/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +/usr/include/gtk-2.0/gtk/gtkcolorseldialog.h: + +/usr/include/gtk-2.0/gtk/gtkcombo.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkcombobox.h: + +/usr/include/gtk-2.0/gtk/gtktreeview.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkcomboboxentry.h: + +/usr/include/gtk-2.0/gtk/gtkctree.h: + +/usr/include/gtk-2.0/gtk/gtkcurve.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkeventbox.h: + +/usr/include/gtk-2.0/gtk/gtkexpander.h: + +/usr/include/gtk-2.0/gtk/gtkfilesel.h: + +/usr/include/gtk-2.0/gtk/gtkfixed.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilefilter.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkfontbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfontsel.h: + +/usr/include/gtk-2.0/gtk/gtkgamma.h: + +/usr/include/gtk-2.0/gtk/gtkgc.h: + +/usr/include/gtk-2.0/gtk/gtkhandlebox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkhpaned.h: + +/usr/include/gtk-2.0/gtk/gtkpaned.h: + +/usr/include/gtk-2.0/gtk/gtkhruler.h: + +/usr/include/gtk-2.0/gtk/gtkruler.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtkiconfactory.h: + +/usr/include/gtk-2.0/gtk/gtkicontheme.h: + +/usr/include/gtk-2.0/gtk/gtkiconview.h: + +/usr/include/gtk-2.0/gtk/gtktooltip.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkimagemenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkimcontextsimple.h: + +/usr/include/gtk-2.0/gtk/gtkimmulticontext.h: + +/usr/include/gtk-2.0/gtk/gtkinputdialog.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtklayout.h: + +/usr/include/gtk-2.0/gtk/gtklinkbutton.h: + +/usr/include/gtk-2.0/gtk/gtklist.h: + +/usr/include/gtk-2.0/gtk/gtklistitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkmenubar.h: + +/usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtkmessagedialog.h: + +/usr/include/gtk-2.0/gtk/gtkmodules.h: + +/usr/include/gtk-2.0/gtk/gtknotebook.h: + +/usr/include/gtk-2.0/gtk/gtkoldeditable.h: + +/usr/include/gtk-2.0/gtk/gtkoptionmenu.h: + +/usr/include/gtk-2.0/gtk/gtkpixmap.h: + +/usr/include/gtk-2.0/gtk/gtkplug.h: + +/usr/include/gtk-2.0/gtk/gtksocket.h: + +/usr/include/gtk-2.0/gtk/gtkpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperation.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkpagesetup.h: + +/usr/include/gtk-2.0/gtk/gtkpapersize.h: + +/usr/include/gtk-2.0/gtk/gtkprintsettings.h: + +/usr/include/gtk-2.0/gtk/gtkprintcontext.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprogress.h: + +/usr/include/gtk-2.0/gtk/gtkprogressbar.h: + +/usr/include/gtk-2.0/gtk/gtkradioaction.h: + +/usr/include/gtk-2.0/gtk/gtktoggleaction.h: + +/usr/include/gtk-2.0/gtk/gtkradiobutton.h: + +/usr/include/gtk-2.0/gtk/gtkradiomenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkrecentaction.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkscalebutton.h: + +/usr/include/gtk-2.0/gtk/gtkscrolledwindow.h: + +/usr/include/gtk-2.0/gtk/gtkviewport.h: + +/usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h: + +/usr/include/gtk-2.0/gtk/gtksizegroup.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkstatusbar.h: + +/usr/include/gtk-2.0/gtk/gtkstatusicon.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtktext.h: + +/usr/include/gtk-2.0/gtk/gtktextbuffer.h: + +/usr/include/gtk-2.0/gtk/gtktexttagtable.h: + +/usr/include/gtk-2.0/gtk/gtktextmark.h: + +/usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h: + +/usr/include/gtk-2.0/gtk/gtktextview.h: + +/usr/include/gtk-2.0/gtk/gtktipsquery.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbar.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktree.h: + +/usr/include/gtk-2.0/gtk/gtktreednd.h: + +/usr/include/gtk-2.0/gtk/gtktreeitem.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelsort.h: + +/usr/include/gtk-2.0/gtk/gtktreeselection.h: + +/usr/include/gtk-2.0/gtk/gtktreestore.h: + +/usr/include/gtk-2.0/gtk/gtkuimanager.h: + +/usr/include/gtk-2.0/gtk/gtkvbbox.h: + +/usr/include/gtk-2.0/gtk/gtkversion.h: + +/usr/include/gtk-2.0/gtk/gtkvolumebutton.h: + +/usr/include/gtk-2.0/gtk/gtkvpaned.h: + +/usr/include/gtk-2.0/gtk/gtkvruler.h: + +/usr/include/gtk-2.0/gtk/gtkvscale.h: + +/usr/include/gtk-2.0/gtk/gtkvseparator.h: + +/usr/include/string.h: + +/usr/include/sys/time.h: + +/usr/local/include/veejay/vjmem.h: + +/usr/local/include/veejay/vje.h: + +/usr/local/include/veejay/vj-client.h: + +/usr/local/include/veejay/vj-msg.h: + +/usr/local/include/veejay/vims.h: + +../src/vj-api.h: + +/usr/include/fcntl.h: + +/usr/include/bits/fcntl.h: + +/usr/include/bits/uio.h: + +/usr/include/sys/stat.h: + +/usr/include/bits/stat.h: + +/usr/include/mjpegtools/mpegconsts.h: + +/usr/include/mjpegtools/yuv4mpeg.h: + +/usr/include/mjpegtools/mjpeg_types.h: + +/usr/include/mjpegtools/mjpeg_logging.h: + +/usr/include/mjpegtools/mpegtimecode.h: + +/usr/include/gtk-2.0/gdk/gdkx.h: + +/usr/include/gtk-2.0/gdk/gdkprivate.h: + +/usr/include/X11/Xlib.h: + +/usr/include/X11/X.h: + +/usr/include/X11/Xfuncproto.h: + +/usr/include/X11/Xosdefs.h: + +/usr/include/X11/Xutil.h: + +/usr/include/X11/keysym.h: + +/usr/include/X11/keysymdef.h: + +widgets/cellrendererspin.h: + +widgets/gtkknob.h: + +widgets/gtktimeselection.h: + +/usr/include/libgen.h: + +../src/keyboard.h: + +/usr/include/gtk-2.0/gdk/gdkkeysyms.h: + +/usr/include/SDL/SDL_keysym.h: + +../src/curve.h: + +../src/multitrack.h: + +../src/common.h: + +../src/utils.h: + +../src/sequence.h: + +/usr/local/include/veejay/yuvconv.h: + +/usr/include/ffmpeg/avutil.h: + +/usr/include/ffmpeg/common.h: + +/usr/include/inttypes.h: + +/usr/include/ffmpeg/mathematics.h: + +/usr/include/ffmpeg/rational.h: + +/usr/include/ffmpeg/integer.h: + +/usr/include/ffmpeg/intfloat_readwrite.h: + +/usr/include/ffmpeg/log.h: + +/usr/local/include/veejay/vevo.h: + +/usr/local/include/veejay/libvevo.h: + +../src/vmidi.h: + +/usr/include/assert.h: + +callback.c: + +/usr/include/ctype.h: diff --git a/veejay-client/src/.deps/vj-midi.Po b/veejay-client/src/.deps/vj-midi.Po new file mode 100644 index 00000000..ccd6b85a --- /dev/null +++ b/veejay-client/src/.deps/vj-midi.Po @@ -0,0 +1,1316 @@ +vj-midi.o vj-midi.o: vj-midi.c ../config.h /usr/include/sys/types.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-32.h /usr/include/bits/types.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h \ + /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + /usr/local/include/veejay/vjmem.h /usr/include/stdint.h \ + /usr/include/bits/wchar.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/xlocale.h /usr/include/alloca.h \ + /usr/local/include/veejay/vj-msg.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h \ + /usr/include/alsa/asoundlib.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/bits/uio.h /usr/include/assert.h /usr/include/sys/poll.h \ + /usr/include/bits/poll.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/asm-i386/errno.h /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h /usr/include/alsa/asoundef.h \ + /usr/include/alsa/version.h /usr/include/alsa/global.h \ + /usr/include/alsa/input.h /usr/include/alsa/output.h \ + /usr/include/alsa/error.h /usr/include/alsa/conf.h \ + /usr/include/alsa/pcm.h /usr/include/alsa/rawmidi.h \ + /usr/include/alsa/timer.h /usr/include/alsa/hwdep.h \ + /usr/include/alsa/control.h /usr/include/alsa/mixer.h \ + /usr/include/alsa/seq_event.h /usr/include/alsa/seq.h \ + /usr/include/alsa/seqmid.h /usr/include/alsa/seq_midi_event.h \ + /usr/include/alsa/conv.h /usr/include/alsa/instr.h \ + /usr/include/gtk-2.0/gtk/gtk.h /usr/include/gtk-2.0/gdk/gdk.h \ + /usr/include/gtk-2.0/gdk/gdkcairo.h /usr/include/gtk-2.0/gdk/gdkcolor.h \ + /usr/include/cairo/cairo.h /usr/include/cairo/cairo-features.h \ + /usr/include/cairo/cairo-deprecated.h \ + /usr/include/gtk-2.0/gdk/gdktypes.h /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ + /usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gregex.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gsequence.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/pango-1.0/pango/pango.h \ + /usr/include/pango-1.0/pango/pango-attributes.h \ + /usr/include/pango-1.0/pango/pango-font.h \ + /usr/include/pango-1.0/pango/pango-coverage.h \ + /usr/include/pango-1.0/pango/pango-types.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/pango-1.0/pango/pango-gravity.h \ + /usr/include/pango-1.0/pango/pango-matrix.h \ + /usr/include/pango-1.0/pango/pango-script.h \ + /usr/include/pango-1.0/pango/pango-language.h \ + /usr/include/pango-1.0/pango/pango-break.h \ + /usr/include/pango-1.0/pango/pango-item.h \ + /usr/include/pango-1.0/pango/pango-context.h \ + /usr/include/pango-1.0/pango/pango-fontmap.h \ + /usr/include/pango-1.0/pango/pango-fontset.h \ + /usr/include/pango-1.0/pango/pango-engine.h \ + /usr/include/pango-1.0/pango/pango-glyph.h \ + /usr/include/pango-1.0/pango/pango-enum-types.h \ + /usr/include/pango-1.0/pango/pango-features.h \ + /usr/include/pango-1.0/pango/pango-glyph-item.h \ + /usr/include/pango-1.0/pango/pango-layout.h \ + /usr/include/pango-1.0/pango/pango-tabs.h \ + /usr/include/pango-1.0/pango/pango-renderer.h \ + /usr/include/pango-1.0/pango/pango-utils.h \ + /usr/lib/gtk-2.0/include/gdkconfig.h \ + /usr/include/gtk-2.0/gdk/gdkpixbuf.h /usr/include/gtk-2.0/gdk/gdkrgb.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h \ + /usr/include/glib-2.0/gmodule.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h \ + /usr/include/pango-1.0/pango/pangocairo.h \ + /usr/include/gtk-2.0/gdk/gdkcursor.h \ + /usr/include/gtk-2.0/gdk/gdkdisplay.h \ + /usr/include/gtk-2.0/gdk/gdkevents.h /usr/include/gtk-2.0/gdk/gdkdnd.h \ + /usr/include/gtk-2.0/gdk/gdkinput.h \ + /usr/include/gtk-2.0/gdk/gdkdrawable.h /usr/include/gtk-2.0/gdk/gdkgc.h \ + /usr/include/gtk-2.0/gdk/gdkenumtypes.h \ + /usr/include/gtk-2.0/gdk/gdkfont.h /usr/include/gtk-2.0/gdk/gdkimage.h \ + /usr/include/gtk-2.0/gdk/gdkkeys.h \ + /usr/include/gtk-2.0/gdk/gdkdisplaymanager.h \ + /usr/include/gtk-2.0/gdk/gdkpango.h \ + /usr/include/gtk-2.0/gdk/gdkpixmap.h \ + /usr/include/gtk-2.0/gdk/gdkproperty.h \ + /usr/include/gtk-2.0/gdk/gdkregion.h \ + /usr/include/gtk-2.0/gdk/gdkscreen.h \ + /usr/include/gtk-2.0/gdk/gdkselection.h \ + /usr/include/gtk-2.0/gdk/gdkspawn.h \ + /usr/include/gtk-2.0/gdk/gdkvisual.h \ + /usr/include/gtk-2.0/gdk/gdkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaboutdialog.h \ + /usr/include/gtk-2.0/gtk/gtkdialog.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkaccelgroup.h \ + /usr/include/gtk-2.0/gtk/gtkenums.h /usr/include/gtk-2.0/gtk/gtkbin.h \ + /usr/include/gtk-2.0/gtk/gtkcontainer.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkobject.h \ + /usr/include/gtk-2.0/gtk/gtktypeutils.h \ + /usr/include/gtk-2.0/gtk/gtktypebuiltins.h \ + /usr/include/gtk-2.0/gtk/gtkdebug.h \ + /usr/include/gtk-2.0/gtk/gtkadjustment.h \ + /usr/include/gtk-2.0/gtk/gtkstyle.h \ + /usr/include/gtk-2.0/gtk/gtksettings.h /usr/include/gtk-2.0/gtk/gtkrc.h \ + /usr/include/atk-1.0/atk/atkobject.h \ + /usr/include/atk-1.0/atk/atkstate.h \ + /usr/include/atk-1.0/atk/atkrelationtype.h \ + /usr/include/gtk-2.0/gtk/gtkaccellabel.h \ + /usr/include/gtk-2.0/gtk/gtklabel.h /usr/include/gtk-2.0/gtk/gtkmisc.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtkmenushell.h \ + /usr/include/gtk-2.0/gtk/gtkaccelmap.h \ + /usr/include/gtk-2.0/gtk/gtkaccessible.h /usr/include/atk-1.0/atk/atk.h \ + /usr/include/atk-1.0/atk/atkaction.h \ + /usr/include/atk-1.0/atk/atkcomponent.h \ + /usr/include/atk-1.0/atk/atkutil.h \ + /usr/include/atk-1.0/atk/atkdocument.h \ + /usr/include/atk-1.0/atk/atkeditabletext.h \ + /usr/include/atk-1.0/atk/atktext.h \ + /usr/include/atk-1.0/atk/atkgobjectaccessible.h \ + /usr/include/atk-1.0/atk/atkhyperlink.h \ + /usr/include/atk-1.0/atk/atkhyperlinkimpl.h \ + /usr/include/atk-1.0/atk/atkhypertext.h \ + /usr/include/atk-1.0/atk/atkimage.h \ + /usr/include/atk-1.0/atk/atknoopobject.h \ + /usr/include/atk-1.0/atk/atknoopobjectfactory.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkregistry.h \ + /usr/include/atk-1.0/atk/atkobjectfactory.h \ + /usr/include/atk-1.0/atk/atkrelation.h \ + /usr/include/atk-1.0/atk/atkrelationset.h \ + /usr/include/atk-1.0/atk/atkselection.h \ + /usr/include/atk-1.0/atk/atkstateset.h \ + /usr/include/atk-1.0/atk/atkstreamablecontent.h \ + /usr/include/atk-1.0/atk/atktable.h /usr/include/atk-1.0/atk/atkmisc.h \ + /usr/include/atk-1.0/atk/atkvalue.h \ + /usr/include/gtk-2.0/gtk/gtkaction.h \ + /usr/include/gtk-2.0/gtk/gtkactiongroup.h \ + /usr/include/gtk-2.0/gtk/gtkitemfactory.h \ + /usr/include/gtk-2.0/gtk/gtkalignment.h \ + /usr/include/gtk-2.0/gtk/gtkarrow.h \ + /usr/include/gtk-2.0/gtk/gtkaspectframe.h \ + /usr/include/gtk-2.0/gtk/gtkframe.h \ + /usr/include/gtk-2.0/gtk/gtkassistant.h \ + /usr/include/gtk-2.0/gtk/gtkbbox.h /usr/include/gtk-2.0/gtk/gtkbox.h \ + /usr/include/gtk-2.0/gtk/gtkbindings.h \ + /usr/include/gtk-2.0/gtk/gtkbuildable.h \ + /usr/include/gtk-2.0/gtk/gtkbuilder.h \ + /usr/include/gtk-2.0/gtk/gtkbutton.h \ + /usr/include/gtk-2.0/gtk/gtkimage.h \ + /usr/include/gtk-2.0/gtk/gtkcalendar.h \ + /usr/include/gtk-2.0/gtk/gtksignal.h \ + /usr/include/gtk-2.0/gtk/gtkmarshal.h \ + /usr/include/gtk-2.0/gtk/gtkcelllayout.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderer.h \ + /usr/include/gtk-2.0/gtk/gtkcelleditable.h \ + /usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h \ + /usr/include/gtk-2.0/gtk/gtktreemodel.h \ + /usr/include/gtk-2.0/gtk/gtktreesortable.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertext.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h \ + /usr/include/gtk-2.0/gtk/gtkcellrendererspin.h \ + /usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h \ + /usr/include/gtk-2.0/gtk/gtkcellview.h \ + /usr/include/gtk-2.0/gtk/gtkcheckbutton.h \ + /usr/include/gtk-2.0/gtk/gtktogglebutton.h \ + /usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkitem.h \ + /usr/include/gtk-2.0/gtk/gtkclipboard.h \ + /usr/include/gtk-2.0/gtk/gtkselection.h \ + /usr/include/gtk-2.0/gtk/gtktextiter.h \ + /usr/include/gtk-2.0/gtk/gtktexttag.h \ + /usr/include/gtk-2.0/gtk/gtktextchild.h \ + /usr/include/gtk-2.0/gtk/gtkclist.h \ + /usr/include/gtk-2.0/gtk/gtkhscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkrange.h \ + /usr/include/gtk-2.0/gtk/gtkvscrollbar.h \ + /usr/include/gtk-2.0/gtk/gtkcolorbutton.h \ + /usr/include/gtk-2.0/gtk/gtkcolorsel.h \ + /usr/include/gtk-2.0/gtk/gtkvbox.h \ + /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h \ + /usr/include/gtk-2.0/gtk/gtkcombo.h /usr/include/gtk-2.0/gtk/gtkhbox.h \ + /usr/include/gtk-2.0/gtk/gtkcombobox.h \ + /usr/include/gtk-2.0/gtk/gtktreeview.h \ + /usr/include/gtk-2.0/gtk/gtkdnd.h /usr/include/gtk-2.0/gtk/gtkentry.h \ + /usr/include/gtk-2.0/gtk/gtkeditable.h \ + /usr/include/gtk-2.0/gtk/gtkimcontext.h \ + /usr/include/gtk-2.0/gtk/gtkentrycompletion.h \ + /usr/include/gtk-2.0/gtk/gtkliststore.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelfilter.h \ + /usr/include/gtk-2.0/gtk/gtkcomboboxentry.h \ + /usr/include/gtk-2.0/gtk/gtkctree.h /usr/include/gtk-2.0/gtk/gtkcurve.h \ + /usr/include/gtk-2.0/gtk/gtkdrawingarea.h \ + /usr/include/gtk-2.0/gtk/gtkeventbox.h \ + /usr/include/gtk-2.0/gtk/gtkexpander.h \ + /usr/include/gtk-2.0/gtk/gtkfilesel.h \ + /usr/include/gtk-2.0/gtk/gtkfixed.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilefilter.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooser.h \ + /usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkfontbutton.h \ + /usr/include/gtk-2.0/gtk/gtkfontsel.h \ + /usr/include/gtk-2.0/gtk/gtkgamma.h /usr/include/gtk-2.0/gtk/gtkgc.h \ + /usr/include/gtk-2.0/gtk/gtkhandlebox.h \ + /usr/include/gtk-2.0/gtk/gtkhbbox.h \ + /usr/include/gtk-2.0/gtk/gtkhpaned.h \ + /usr/include/gtk-2.0/gtk/gtkpaned.h \ + /usr/include/gtk-2.0/gtk/gtkhruler.h \ + /usr/include/gtk-2.0/gtk/gtkruler.h \ + /usr/include/gtk-2.0/gtk/gtkhscale.h \ + /usr/include/gtk-2.0/gtk/gtkscale.h \ + /usr/include/gtk-2.0/gtk/gtkhseparator.h \ + /usr/include/gtk-2.0/gtk/gtkseparator.h \ + /usr/include/gtk-2.0/gtk/gtkiconfactory.h \ + /usr/include/gtk-2.0/gtk/gtkicontheme.h \ + /usr/include/gtk-2.0/gtk/gtkiconview.h \ + /usr/include/gtk-2.0/gtk/gtktooltip.h \ + /usr/include/gtk-2.0/gtk/gtkwidget.h \ + /usr/include/gtk-2.0/gtk/gtkwindow.h \ + /usr/include/gtk-2.0/gtk/gtkimagemenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkimcontextsimple.h \ + /usr/include/gtk-2.0/gtk/gtkimmulticontext.h \ + /usr/include/gtk-2.0/gtk/gtkinputdialog.h \ + /usr/include/gtk-2.0/gtk/gtkinvisible.h \ + /usr/include/gtk-2.0/gtk/gtklayout.h \ + /usr/include/gtk-2.0/gtk/gtklinkbutton.h \ + /usr/include/gtk-2.0/gtk/gtklist.h \ + /usr/include/gtk-2.0/gtk/gtklistitem.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h \ + /usr/include/gtk-2.0/gtk/gtkmenubar.h \ + /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkmenu.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktooltips.h \ + /usr/include/gtk-2.0/gtk/gtkmessagedialog.h \ + /usr/include/gtk-2.0/gtk/gtkmodules.h \ + /usr/include/gtk-2.0/gtk/gtknotebook.h \ + /usr/include/gtk-2.0/gtk/gtkoldeditable.h \ + /usr/include/gtk-2.0/gtk/gtkoptionmenu.h \ + /usr/include/gtk-2.0/gtk/gtkpixmap.h /usr/include/gtk-2.0/gtk/gtkplug.h \ + /usr/include/gtk-2.0/gtk/gtksocket.h \ + /usr/include/gtk-2.0/gtk/gtkpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperation.h \ + /usr/include/gtk-2.0/gtk/gtkmain.h /usr/include/gtk-2.0/gtk/gtkenums.h \ + /usr/include/gtk-2.0/gtk/gtkpagesetup.h \ + /usr/include/gtk-2.0/gtk/gtkpapersize.h \ + /usr/include/gtk-2.0/gtk/gtkprintsettings.h \ + /usr/include/gtk-2.0/gtk/gtkprintcontext.h \ + /usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h \ + /usr/include/gtk-2.0/gtk/gtkprogress.h \ + /usr/include/gtk-2.0/gtk/gtkprogressbar.h \ + /usr/include/gtk-2.0/gtk/gtkradioaction.h \ + /usr/include/gtk-2.0/gtk/gtktoggleaction.h \ + /usr/include/gtk-2.0/gtk/gtkradiobutton.h \ + /usr/include/gtk-2.0/gtk/gtkradiomenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtkrecentaction.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentmanager.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooser.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h \ + /usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h \ + /usr/include/gtk-2.0/gtk/gtkrecentfilter.h \ + /usr/include/gtk-2.0/gtk/gtkscalebutton.h \ + /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h \ + /usr/include/gtk-2.0/gtk/gtkviewport.h \ + /usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h \ + /usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h \ + /usr/include/gtk-2.0/gtk/gtksizegroup.h \ + /usr/include/gtk-2.0/gtk/gtkspinbutton.h \ + /usr/include/gtk-2.0/gtk/gtkstatusbar.h \ + /usr/include/gtk-2.0/gtk/gtkstatusicon.h \ + /usr/include/gtk-2.0/gtk/gtkstock.h /usr/include/gtk-2.0/gtk/gtktable.h \ + /usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h \ + /usr/include/gtk-2.0/gtk/gtktext.h \ + /usr/include/gtk-2.0/gtk/gtktextbuffer.h \ + /usr/include/gtk-2.0/gtk/gtktexttagtable.h \ + /usr/include/gtk-2.0/gtk/gtktextmark.h \ + /usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h \ + /usr/include/gtk-2.0/gtk/gtktextview.h \ + /usr/include/gtk-2.0/gtk/gtktipsquery.h \ + /usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolbar.h \ + /usr/include/gtk-2.0/gtk/gtktoolbutton.h \ + /usr/include/gtk-2.0/gtk/gtktoolitem.h \ + /usr/include/gtk-2.0/gtk/gtktree.h \ + /usr/include/gtk-2.0/gtk/gtktreednd.h \ + /usr/include/gtk-2.0/gtk/gtktreeitem.h \ + /usr/include/gtk-2.0/gtk/gtktreemodelsort.h \ + /usr/include/gtk-2.0/gtk/gtktreeselection.h \ + /usr/include/gtk-2.0/gtk/gtktreestore.h \ + /usr/include/gtk-2.0/gtk/gtkuimanager.h \ + /usr/include/gtk-2.0/gtk/gtkvbbox.h \ + /usr/include/gtk-2.0/gtk/gtkversion.h \ + /usr/include/gtk-2.0/gtk/gtkvolumebutton.h \ + /usr/include/gtk-2.0/gtk/gtkvpaned.h \ + /usr/include/gtk-2.0/gtk/gtkvruler.h \ + /usr/include/gtk-2.0/gtk/gtkvscale.h \ + /usr/include/gtk-2.0/gtk/gtkvseparator.h \ + /usr/include/libglade-2.0/glade/glade.h \ + /usr/include/libglade-2.0/glade/glade-init.h \ + /usr/include/libglade-2.0/glade/glade-xml.h \ + /usr/local/include/veejay/libvevo.h /usr/local/include/veejay/vevo.h \ + ../src/vj-api.h + +../config.h: + +/usr/include/sys/types.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/usr/include/bits/types.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/sys/stat.h: + +/usr/include/bits/stat.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/local/include/veejay/vjmem.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/xlocale.h: + +/usr/include/alloca.h: + +/usr/local/include/veejay/vj-msg.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stdarg.h: + +/usr/include/alsa/asoundlib.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/string.h: + +/usr/include/fcntl.h: + +/usr/include/bits/fcntl.h: + +/usr/include/bits/uio.h: + +/usr/include/assert.h: + +/usr/include/sys/poll.h: + +/usr/include/bits/poll.h: + +/usr/include/errno.h: + +/usr/include/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/asm/errno.h: + +/usr/include/asm-i386/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/alsa/asoundef.h: + +/usr/include/alsa/version.h: + +/usr/include/alsa/global.h: + +/usr/include/alsa/input.h: + +/usr/include/alsa/output.h: + +/usr/include/alsa/error.h: + +/usr/include/alsa/conf.h: + +/usr/include/alsa/pcm.h: + +/usr/include/alsa/rawmidi.h: + +/usr/include/alsa/timer.h: + +/usr/include/alsa/hwdep.h: + +/usr/include/alsa/control.h: + +/usr/include/alsa/mixer.h: + +/usr/include/alsa/seq_event.h: + +/usr/include/alsa/seq.h: + +/usr/include/alsa/seqmid.h: + +/usr/include/alsa/seq_midi_event.h: + +/usr/include/alsa/conv.h: + +/usr/include/alsa/instr.h: + +/usr/include/gtk-2.0/gtk/gtk.h: + +/usr/include/gtk-2.0/gdk/gdk.h: + +/usr/include/gtk-2.0/gdk/gdkcairo.h: + +/usr/include/gtk-2.0/gdk/gdkcolor.h: + +/usr/include/cairo/cairo.h: + +/usr/include/cairo/cairo-features.h: + +/usr/include/cairo/cairo-deprecated.h: + +/usr/include/gtk-2.0/gdk/gdktypes.h: + +/usr/include/glib-2.0/glib.h: + +/usr/include/glib-2.0/glib/galloca.h: + +/usr/include/glib-2.0/glib/gtypes.h: + +/usr/lib/glib-2.0/include/glibconfig.h: + +/usr/include/glib-2.0/glib/gmacros.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/bits/xopen_lim.h: + +/usr/lib/gcc/i486-linux-gnu/4.1.3/include/float.h: + +/usr/include/glib-2.0/glib/garray.h: + +/usr/include/glib-2.0/glib/gasyncqueue.h: + +/usr/include/glib-2.0/glib/gthread.h: + +/usr/include/glib-2.0/glib/gerror.h: + +/usr/include/glib-2.0/glib/gquark.h: + +/usr/include/glib-2.0/glib/gutils.h: + +/usr/include/glib-2.0/glib/gatomic.h: + +/usr/include/glib-2.0/glib/gbacktrace.h: + +/usr/include/glib-2.0/glib/gbase64.h: + +/usr/include/glib-2.0/glib/gbookmarkfile.h: + +/usr/include/glib-2.0/glib/gcache.h: + +/usr/include/glib-2.0/glib/glist.h: + +/usr/include/glib-2.0/glib/gmem.h: + +/usr/include/glib-2.0/glib/gslice.h: + +/usr/include/glib-2.0/glib/gcompletion.h: + +/usr/include/glib-2.0/glib/gconvert.h: + +/usr/include/glib-2.0/glib/gdataset.h: + +/usr/include/glib-2.0/glib/gdate.h: + +/usr/include/glib-2.0/glib/gdir.h: + +/usr/include/glib-2.0/glib/gfileutils.h: + +/usr/include/glib-2.0/glib/ghash.h: + +/usr/include/glib-2.0/glib/ghook.h: + +/usr/include/glib-2.0/glib/giochannel.h: + +/usr/include/glib-2.0/glib/gmain.h: + +/usr/include/glib-2.0/glib/gslist.h: + +/usr/include/glib-2.0/glib/gstring.h: + +/usr/include/glib-2.0/glib/gunicode.h: + +/usr/include/glib-2.0/glib/gkeyfile.h: + +/usr/include/glib-2.0/glib/gmappedfile.h: + +/usr/include/glib-2.0/glib/gmarkup.h: + +/usr/include/glib-2.0/glib/gmessages.h: + +/usr/include/glib-2.0/glib/gnode.h: + +/usr/include/glib-2.0/glib/goption.h: + +/usr/include/glib-2.0/glib/gpattern.h: + +/usr/include/glib-2.0/glib/gprimes.h: + +/usr/include/glib-2.0/glib/gqsort.h: + +/usr/include/glib-2.0/glib/gqueue.h: + +/usr/include/glib-2.0/glib/grand.h: + +/usr/include/glib-2.0/glib/grel.h: + +/usr/include/glib-2.0/glib/gregex.h: + +/usr/include/glib-2.0/glib/gscanner.h: + +/usr/include/glib-2.0/glib/gsequence.h: + +/usr/include/glib-2.0/glib/gshell.h: + +/usr/include/glib-2.0/glib/gspawn.h: + +/usr/include/glib-2.0/glib/gstrfuncs.h: + +/usr/include/glib-2.0/glib/gthreadpool.h: + +/usr/include/glib-2.0/glib/gtimer.h: + +/usr/include/glib-2.0/glib/gtree.h: + +/usr/include/pango-1.0/pango/pango.h: + +/usr/include/pango-1.0/pango/pango-attributes.h: + +/usr/include/pango-1.0/pango/pango-font.h: + +/usr/include/pango-1.0/pango/pango-coverage.h: + +/usr/include/pango-1.0/pango/pango-types.h: + +/usr/include/glib-2.0/glib-object.h: + +/usr/include/glib-2.0/gobject/gboxed.h: + +/usr/include/glib-2.0/gobject/gtype.h: + +/usr/include/glib-2.0/gobject/genums.h: + +/usr/include/glib-2.0/gobject/gobject.h: + +/usr/include/glib-2.0/gobject/gvalue.h: + +/usr/include/glib-2.0/gobject/gparam.h: + +/usr/include/glib-2.0/gobject/gclosure.h: + +/usr/include/glib-2.0/gobject/gsignal.h: + +/usr/include/glib-2.0/gobject/gmarshal.h: + +/usr/include/glib-2.0/gobject/gparamspecs.h: + +/usr/include/glib-2.0/gobject/gsourceclosure.h: + +/usr/include/glib-2.0/gobject/gtypemodule.h: + +/usr/include/glib-2.0/gobject/gtypeplugin.h: + +/usr/include/glib-2.0/gobject/gvaluearray.h: + +/usr/include/glib-2.0/gobject/gvaluetypes.h: + +/usr/include/pango-1.0/pango/pango-gravity.h: + +/usr/include/pango-1.0/pango/pango-matrix.h: + +/usr/include/pango-1.0/pango/pango-script.h: + +/usr/include/pango-1.0/pango/pango-language.h: + +/usr/include/pango-1.0/pango/pango-break.h: + +/usr/include/pango-1.0/pango/pango-item.h: + +/usr/include/pango-1.0/pango/pango-context.h: + +/usr/include/pango-1.0/pango/pango-fontmap.h: + +/usr/include/pango-1.0/pango/pango-fontset.h: + +/usr/include/pango-1.0/pango/pango-engine.h: + +/usr/include/pango-1.0/pango/pango-glyph.h: + +/usr/include/pango-1.0/pango/pango-enum-types.h: + +/usr/include/pango-1.0/pango/pango-features.h: + +/usr/include/pango-1.0/pango/pango-glyph-item.h: + +/usr/include/pango-1.0/pango/pango-layout.h: + +/usr/include/pango-1.0/pango/pango-tabs.h: + +/usr/include/pango-1.0/pango/pango-renderer.h: + +/usr/include/pango-1.0/pango/pango-utils.h: + +/usr/lib/gtk-2.0/include/gdkconfig.h: + +/usr/include/gtk-2.0/gdk/gdkpixbuf.h: + +/usr/include/gtk-2.0/gdk/gdkrgb.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-transform.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-io.h: + +/usr/include/glib-2.0/gmodule.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h: + +/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h: + +/usr/include/pango-1.0/pango/pangocairo.h: + +/usr/include/gtk-2.0/gdk/gdkcursor.h: + +/usr/include/gtk-2.0/gdk/gdkdisplay.h: + +/usr/include/gtk-2.0/gdk/gdkevents.h: + +/usr/include/gtk-2.0/gdk/gdkdnd.h: + +/usr/include/gtk-2.0/gdk/gdkinput.h: + +/usr/include/gtk-2.0/gdk/gdkdrawable.h: + +/usr/include/gtk-2.0/gdk/gdkgc.h: + +/usr/include/gtk-2.0/gdk/gdkenumtypes.h: + +/usr/include/gtk-2.0/gdk/gdkfont.h: + +/usr/include/gtk-2.0/gdk/gdkimage.h: + +/usr/include/gtk-2.0/gdk/gdkkeys.h: + +/usr/include/gtk-2.0/gdk/gdkdisplaymanager.h: + +/usr/include/gtk-2.0/gdk/gdkpango.h: + +/usr/include/gtk-2.0/gdk/gdkpixmap.h: + +/usr/include/gtk-2.0/gdk/gdkproperty.h: + +/usr/include/gtk-2.0/gdk/gdkregion.h: + +/usr/include/gtk-2.0/gdk/gdkscreen.h: + +/usr/include/gtk-2.0/gdk/gdkselection.h: + +/usr/include/gtk-2.0/gdk/gdkspawn.h: + +/usr/include/gtk-2.0/gdk/gdkvisual.h: + +/usr/include/gtk-2.0/gdk/gdkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaboutdialog.h: + +/usr/include/gtk-2.0/gtk/gtkdialog.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkaccelgroup.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkbin.h: + +/usr/include/gtk-2.0/gtk/gtkcontainer.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkobject.h: + +/usr/include/gtk-2.0/gtk/gtktypeutils.h: + +/usr/include/gtk-2.0/gtk/gtktypebuiltins.h: + +/usr/include/gtk-2.0/gtk/gtkdebug.h: + +/usr/include/gtk-2.0/gtk/gtkadjustment.h: + +/usr/include/gtk-2.0/gtk/gtkstyle.h: + +/usr/include/gtk-2.0/gtk/gtksettings.h: + +/usr/include/gtk-2.0/gtk/gtkrc.h: + +/usr/include/atk-1.0/atk/atkobject.h: + +/usr/include/atk-1.0/atk/atkstate.h: + +/usr/include/atk-1.0/atk/atkrelationtype.h: + +/usr/include/gtk-2.0/gtk/gtkaccellabel.h: + +/usr/include/gtk-2.0/gtk/gtklabel.h: + +/usr/include/gtk-2.0/gtk/gtkmisc.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtkmenushell.h: + +/usr/include/gtk-2.0/gtk/gtkaccelmap.h: + +/usr/include/gtk-2.0/gtk/gtkaccessible.h: + +/usr/include/atk-1.0/atk/atk.h: + +/usr/include/atk-1.0/atk/atkaction.h: + +/usr/include/atk-1.0/atk/atkcomponent.h: + +/usr/include/atk-1.0/atk/atkutil.h: + +/usr/include/atk-1.0/atk/atkdocument.h: + +/usr/include/atk-1.0/atk/atkeditabletext.h: + +/usr/include/atk-1.0/atk/atktext.h: + +/usr/include/atk-1.0/atk/atkgobjectaccessible.h: + +/usr/include/atk-1.0/atk/atkhyperlink.h: + +/usr/include/atk-1.0/atk/atkhyperlinkimpl.h: + +/usr/include/atk-1.0/atk/atkhypertext.h: + +/usr/include/atk-1.0/atk/atkimage.h: + +/usr/include/atk-1.0/atk/atknoopobject.h: + +/usr/include/atk-1.0/atk/atknoopobjectfactory.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkregistry.h: + +/usr/include/atk-1.0/atk/atkobjectfactory.h: + +/usr/include/atk-1.0/atk/atkrelation.h: + +/usr/include/atk-1.0/atk/atkrelationset.h: + +/usr/include/atk-1.0/atk/atkselection.h: + +/usr/include/atk-1.0/atk/atkstateset.h: + +/usr/include/atk-1.0/atk/atkstreamablecontent.h: + +/usr/include/atk-1.0/atk/atktable.h: + +/usr/include/atk-1.0/atk/atkmisc.h: + +/usr/include/atk-1.0/atk/atkvalue.h: + +/usr/include/gtk-2.0/gtk/gtkaction.h: + +/usr/include/gtk-2.0/gtk/gtkactiongroup.h: + +/usr/include/gtk-2.0/gtk/gtkitemfactory.h: + +/usr/include/gtk-2.0/gtk/gtkalignment.h: + +/usr/include/gtk-2.0/gtk/gtkarrow.h: + +/usr/include/gtk-2.0/gtk/gtkaspectframe.h: + +/usr/include/gtk-2.0/gtk/gtkframe.h: + +/usr/include/gtk-2.0/gtk/gtkassistant.h: + +/usr/include/gtk-2.0/gtk/gtkbbox.h: + +/usr/include/gtk-2.0/gtk/gtkbox.h: + +/usr/include/gtk-2.0/gtk/gtkbindings.h: + +/usr/include/gtk-2.0/gtk/gtkbuildable.h: + +/usr/include/gtk-2.0/gtk/gtkbuilder.h: + +/usr/include/gtk-2.0/gtk/gtkbutton.h: + +/usr/include/gtk-2.0/gtk/gtkimage.h: + +/usr/include/gtk-2.0/gtk/gtkcalendar.h: + +/usr/include/gtk-2.0/gtk/gtksignal.h: + +/usr/include/gtk-2.0/gtk/gtkmarshal.h: + +/usr/include/gtk-2.0/gtk/gtkcelllayout.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderer.h: + +/usr/include/gtk-2.0/gtk/gtkcelleditable.h: + +/usr/include/gtk-2.0/gtk/gtktreeviewcolumn.h: + +/usr/include/gtk-2.0/gtk/gtktreemodel.h: + +/usr/include/gtk-2.0/gtk/gtktreesortable.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendereraccel.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderercombo.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertext.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererprogress.h: + +/usr/include/gtk-2.0/gtk/gtkcellrendererspin.h: + +/usr/include/gtk-2.0/gtk/gtkcellrenderertoggle.h: + +/usr/include/gtk-2.0/gtk/gtkcellview.h: + +/usr/include/gtk-2.0/gtk/gtkcheckbutton.h: + +/usr/include/gtk-2.0/gtk/gtktogglebutton.h: + +/usr/include/gtk-2.0/gtk/gtkcheckmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkitem.h: + +/usr/include/gtk-2.0/gtk/gtkclipboard.h: + +/usr/include/gtk-2.0/gtk/gtkselection.h: + +/usr/include/gtk-2.0/gtk/gtktextiter.h: + +/usr/include/gtk-2.0/gtk/gtktexttag.h: + +/usr/include/gtk-2.0/gtk/gtktextchild.h: + +/usr/include/gtk-2.0/gtk/gtkclist.h: + +/usr/include/gtk-2.0/gtk/gtkhscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkrange.h: + +/usr/include/gtk-2.0/gtk/gtkvscrollbar.h: + +/usr/include/gtk-2.0/gtk/gtkcolorbutton.h: + +/usr/include/gtk-2.0/gtk/gtkcolorsel.h: + +/usr/include/gtk-2.0/gtk/gtkvbox.h: + +/usr/include/gtk-2.0/gtk/gtkcolorseldialog.h: + +/usr/include/gtk-2.0/gtk/gtkcombo.h: + +/usr/include/gtk-2.0/gtk/gtkhbox.h: + +/usr/include/gtk-2.0/gtk/gtkcombobox.h: + +/usr/include/gtk-2.0/gtk/gtktreeview.h: + +/usr/include/gtk-2.0/gtk/gtkdnd.h: + +/usr/include/gtk-2.0/gtk/gtkentry.h: + +/usr/include/gtk-2.0/gtk/gtkeditable.h: + +/usr/include/gtk-2.0/gtk/gtkimcontext.h: + +/usr/include/gtk-2.0/gtk/gtkentrycompletion.h: + +/usr/include/gtk-2.0/gtk/gtkliststore.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelfilter.h: + +/usr/include/gtk-2.0/gtk/gtkcomboboxentry.h: + +/usr/include/gtk-2.0/gtk/gtkctree.h: + +/usr/include/gtk-2.0/gtk/gtkcurve.h: + +/usr/include/gtk-2.0/gtk/gtkdrawingarea.h: + +/usr/include/gtk-2.0/gtk/gtkeventbox.h: + +/usr/include/gtk-2.0/gtk/gtkexpander.h: + +/usr/include/gtk-2.0/gtk/gtkfilesel.h: + +/usr/include/gtk-2.0/gtk/gtkfixed.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilefilter.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooser.h: + +/usr/include/gtk-2.0/gtk/gtkfilechooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkfontbutton.h: + +/usr/include/gtk-2.0/gtk/gtkfontsel.h: + +/usr/include/gtk-2.0/gtk/gtkgamma.h: + +/usr/include/gtk-2.0/gtk/gtkgc.h: + +/usr/include/gtk-2.0/gtk/gtkhandlebox.h: + +/usr/include/gtk-2.0/gtk/gtkhbbox.h: + +/usr/include/gtk-2.0/gtk/gtkhpaned.h: + +/usr/include/gtk-2.0/gtk/gtkpaned.h: + +/usr/include/gtk-2.0/gtk/gtkhruler.h: + +/usr/include/gtk-2.0/gtk/gtkruler.h: + +/usr/include/gtk-2.0/gtk/gtkhscale.h: + +/usr/include/gtk-2.0/gtk/gtkscale.h: + +/usr/include/gtk-2.0/gtk/gtkhseparator.h: + +/usr/include/gtk-2.0/gtk/gtkseparator.h: + +/usr/include/gtk-2.0/gtk/gtkiconfactory.h: + +/usr/include/gtk-2.0/gtk/gtkicontheme.h: + +/usr/include/gtk-2.0/gtk/gtkiconview.h: + +/usr/include/gtk-2.0/gtk/gtktooltip.h: + +/usr/include/gtk-2.0/gtk/gtkwidget.h: + +/usr/include/gtk-2.0/gtk/gtkwindow.h: + +/usr/include/gtk-2.0/gtk/gtkimagemenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkimcontextsimple.h: + +/usr/include/gtk-2.0/gtk/gtkimmulticontext.h: + +/usr/include/gtk-2.0/gtk/gtkinputdialog.h: + +/usr/include/gtk-2.0/gtk/gtkinvisible.h: + +/usr/include/gtk-2.0/gtk/gtklayout.h: + +/usr/include/gtk-2.0/gtk/gtklinkbutton.h: + +/usr/include/gtk-2.0/gtk/gtklist.h: + +/usr/include/gtk-2.0/gtk/gtklistitem.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkmenubar.h: + +/usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkmenu.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktooltips.h: + +/usr/include/gtk-2.0/gtk/gtkmessagedialog.h: + +/usr/include/gtk-2.0/gtk/gtkmodules.h: + +/usr/include/gtk-2.0/gtk/gtknotebook.h: + +/usr/include/gtk-2.0/gtk/gtkoldeditable.h: + +/usr/include/gtk-2.0/gtk/gtkoptionmenu.h: + +/usr/include/gtk-2.0/gtk/gtkpixmap.h: + +/usr/include/gtk-2.0/gtk/gtkplug.h: + +/usr/include/gtk-2.0/gtk/gtksocket.h: + +/usr/include/gtk-2.0/gtk/gtkpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperation.h: + +/usr/include/gtk-2.0/gtk/gtkmain.h: + +/usr/include/gtk-2.0/gtk/gtkenums.h: + +/usr/include/gtk-2.0/gtk/gtkpagesetup.h: + +/usr/include/gtk-2.0/gtk/gtkpapersize.h: + +/usr/include/gtk-2.0/gtk/gtkprintsettings.h: + +/usr/include/gtk-2.0/gtk/gtkprintcontext.h: + +/usr/include/gtk-2.0/gtk/gtkprintoperationpreview.h: + +/usr/include/gtk-2.0/gtk/gtkprogress.h: + +/usr/include/gtk-2.0/gtk/gtkprogressbar.h: + +/usr/include/gtk-2.0/gtk/gtkradioaction.h: + +/usr/include/gtk-2.0/gtk/gtktoggleaction.h: + +/usr/include/gtk-2.0/gtk/gtkradiobutton.h: + +/usr/include/gtk-2.0/gtk/gtkradiomenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkradiotoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtkrecentaction.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentmanager.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserdialog.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooser.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchoosermenu.h: + +/usr/include/gtk-2.0/gtk/gtkrecentchooserwidget.h: + +/usr/include/gtk-2.0/gtk/gtkrecentfilter.h: + +/usr/include/gtk-2.0/gtk/gtkscalebutton.h: + +/usr/include/gtk-2.0/gtk/gtkscrolledwindow.h: + +/usr/include/gtk-2.0/gtk/gtkviewport.h: + +/usr/include/gtk-2.0/gtk/gtkseparatormenuitem.h: + +/usr/include/gtk-2.0/gtk/gtkseparatortoolitem.h: + +/usr/include/gtk-2.0/gtk/gtksizegroup.h: + +/usr/include/gtk-2.0/gtk/gtkspinbutton.h: + +/usr/include/gtk-2.0/gtk/gtkstatusbar.h: + +/usr/include/gtk-2.0/gtk/gtkstatusicon.h: + +/usr/include/gtk-2.0/gtk/gtkstock.h: + +/usr/include/gtk-2.0/gtk/gtktable.h: + +/usr/include/gtk-2.0/gtk/gtktearoffmenuitem.h: + +/usr/include/gtk-2.0/gtk/gtktext.h: + +/usr/include/gtk-2.0/gtk/gtktextbuffer.h: + +/usr/include/gtk-2.0/gtk/gtktexttagtable.h: + +/usr/include/gtk-2.0/gtk/gtktextmark.h: + +/usr/include/gtk-2.0/gtk/gtktextbufferrichtext.h: + +/usr/include/gtk-2.0/gtk/gtktextview.h: + +/usr/include/gtk-2.0/gtk/gtktipsquery.h: + +/usr/include/gtk-2.0/gtk/gtktoggletoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolbar.h: + +/usr/include/gtk-2.0/gtk/gtktoolbutton.h: + +/usr/include/gtk-2.0/gtk/gtktoolitem.h: + +/usr/include/gtk-2.0/gtk/gtktree.h: + +/usr/include/gtk-2.0/gtk/gtktreednd.h: + +/usr/include/gtk-2.0/gtk/gtktreeitem.h: + +/usr/include/gtk-2.0/gtk/gtktreemodelsort.h: + +/usr/include/gtk-2.0/gtk/gtktreeselection.h: + +/usr/include/gtk-2.0/gtk/gtktreestore.h: + +/usr/include/gtk-2.0/gtk/gtkuimanager.h: + +/usr/include/gtk-2.0/gtk/gtkvbbox.h: + +/usr/include/gtk-2.0/gtk/gtkversion.h: + +/usr/include/gtk-2.0/gtk/gtkvolumebutton.h: + +/usr/include/gtk-2.0/gtk/gtkvpaned.h: + +/usr/include/gtk-2.0/gtk/gtkvruler.h: + +/usr/include/gtk-2.0/gtk/gtkvscale.h: + +/usr/include/gtk-2.0/gtk/gtkvseparator.h: + +/usr/include/libglade-2.0/glade/glade.h: + +/usr/include/libglade-2.0/glade/glade-init.h: + +/usr/include/libglade-2.0/glade/glade-xml.h: + +/usr/local/include/veejay/libvevo.h: + +/usr/local/include/veejay/vevo.h: + +../src/vj-api.h: diff --git a/veejay-client/src/Makefile b/veejay-client/src/Makefile new file mode 100644 index 00000000..d90bcfa4 --- /dev/null +++ b/veejay-client/src/Makefile @@ -0,0 +1,594 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# src/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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. + + + + +pkgdatadir = $(datadir)/gveejay +pkglibdir = $(libdir)/gveejay +pkgincludedir = $(includedir)/gveejay +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 = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +target_triplet = i686-pc-linux-gnu +bin_PROGRAMS = $(am__EXEEXT_1) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__EXEEXT_1 = reloaded$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_reloaded_OBJECTS = gtkcolorsel.$(OBJEXT) gtkknob.$(OBJEXT) \ + cellrendererspin.$(OBJEXT) gtktimeselection.$(OBJEXT) \ + vj-midi.$(OBJEXT) curve.$(OBJEXT) utils.$(OBJEXT) \ + tracksources.$(OBJEXT) gveejay.$(OBJEXT) keyboard.$(OBJEXT) \ + sequence.$(OBJEXT) multitrack.$(OBJEXT) vj-api.$(OBJEXT) +reloaded_OBJECTS = $(am_reloaded_OBJECTS) +reloaded_LDADD = $(LDADD) +reloaded_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(reloaded_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(reloaded_SOURCES) +DIST_SOURCES = $(reloaded_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run aclocal-1.10 +ALSA_LIBS = -lasound +ALTIVEC_CFLAGS = +AMTAR = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run autoconf +AUTOHEADER = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run autoheader +AUTOMAKE = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCAS = gcc +CCASDEPMODE = depmode=gcc3 +CCASFLAGS = +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -DSTRICT_CHECKING -Wall -Wunused -march=nocona -mtune=nocona +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -march=nocona -mtune=nocona -g -O2 +CYGPATH_W = echo +DEBUGLIBS = +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F77 = +FFLAGS = +FFMPEG_AVCODEC_CFLAGS = -I/usr/include/ffmpeg +FFMPEG_AVCODEC_LIBS = -lavcodec -ltheora -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg +FFMPEG_SWSCALER_CFLAGS = -I/usr/include/swscale -I/usr/include/ffmpeg +FFMPEG_SWSCALER_LIBS = -lswscale -lavutil +GLADE_CFLAGS = -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +GLADE_LIBS = -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +GLIB_LIBS = -lglib-2.0 +GREP = /bin/grep +GTKCAIRO_CFLAGS = -I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include +GTKCAIRO_LIBS = -L/usr/local/lib -lgtkcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +GTK_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LEX = flex +LEXLIB = -lfl +LEX_OUTPUT_ROOT = lex.yy +LIBGETOPT_LIB = +LIBM_LIBS = -lm +LIBOBJS = +LIBS = -ldl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +LTLIBOBJS = +LT_AGE = 0 +LT_CURRENT = 0 +LT_RELEASE = 1.2 +LT_REVISION = 0 +MAINT = # +MAKEINFO = ${SHELL} /home/control/resynced/veejay-1.1/veejay-client/missing --run makeinfo +MJPEGTOOLS_CFLAGS = -I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex +MJPEGTOOLS_LIBS = -lmjpegutils +MKDIR_P = /bin/mkdir -p +OBJEXT = o +OP_CFLAGS = +PACKAGE = gveejay +PACKAGE_BUGREPORT = veejay-users@lists.sourceforge.net +PACKAGE_NAME = gveejay +PACKAGE_STRING = gveejay 1.2 +PACKAGE_TARNAME = gveejay +PACKAGE_VERSION = 1.2 +PATH_SEPARATOR = : +PIXBUF_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +PIXBUF_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +PKG_CONFIG = /usr/bin/pkg-config +PROGRAM_NOPIC = -fno-PIC +PTHREAD_LIBS = -lpthread +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VEEJAY_CFLAGS = -I/usr/local/include/veejay +VEEJAY_LIBS = -L/usr/local/lib -lveejay +VERSION = 1.2 +XMKMF = +X_CFLAGS = +X_EXTRA_LIBS = +X_LIBS = +X_PRE_LIBS = -lSM -lICE +YACC = bison -y +YFLAGS = +YUVCFLAGS = -fif-conversion +abs_builddir = /home/control/resynced/veejay-1.1/veejay-client/src +abs_srcdir = /home/control/resynced/veejay-1.1/veejay-client/src +abs_top_builddir = /home/control/resynced/veejay-1.1/veejay-client +abs_top_srcdir = /home/control/resynced/veejay-1.1/veejay-client +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +gveejay_datadir = ${datarootdir}/gveejay +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/control/resynced/veejay-1.1/veejay-client/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target = i686-pc-linux-gnu +target_alias = +target_cpu = i686 +target_os = linux-gnu +target_vendor = pc +top_builddir = .. +top_srcdir = .. +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src $(VEEJAY_CFLAGS ) $(GTK_CFLAGS) \ + $(MJPEGTOOLS_CFLAGS) $(GLIB_CFLAGS) $(GLADE_CFLAGS) $(GTKCAIRO_CFLAGS) -DGNOMELOCALEDIR=\""$(datadir)/locale"\" -DGVEEJAY_DATADIR=\""$(gveejay_datadir)"\" + +GVEEJAY_BIN = reloaded +reloaded_SOURCES = widgets/gtkcolorsel.c widgets/gtkknob.c widgets/cellrendererspin.c widgets/gtktimeselection.c vj-midi.c curve.c utils.c tracksources.c gveejay.c keyboard.c sequence.c multitrack.c vj-api.c ${gveejay_headers} +reloaded_LDFLAGS = $(VEEJAY_LIBS) $(MJPEGTOOLS_LIBS) $(GTK_LIBS) $(GLIB_LIBS)\ +$(GLADE_LIBS) $(GTKCAIRO_LIBS) $(FFMPEG_AVCODEC_LIBS) $(FFMPEG_SWSCALER_LIBS) $(ALSA_LIBS) -lgthread-2.0 -export-dynamic + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + 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 +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +reloaded$(EXEEXT): $(reloaded_OBJECTS) $(reloaded_DEPENDENCIES) + @rm -f reloaded$(EXEEXT) + $(reloaded_LINK) $(reloaded_OBJECTS) $(reloaded_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/cellrendererspin.Po +include ./$(DEPDIR)/curve.Po +include ./$(DEPDIR)/gtkcolorsel.Po +include ./$(DEPDIR)/gtkknob.Po +include ./$(DEPDIR)/gtktimeselection.Po +include ./$(DEPDIR)/gveejay.Po +include ./$(DEPDIR)/keyboard.Po +include ./$(DEPDIR)/multitrack.Po +include ./$(DEPDIR)/sequence.Po +include ./$(DEPDIR)/tracksources.Po +include ./$(DEPDIR)/utils.Po +include ./$(DEPDIR)/vj-api.Po +include ./$(DEPDIR)/vj-midi.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +gtkcolorsel.o: widgets/gtkcolorsel.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkcolorsel.o -MD -MP -MF $(DEPDIR)/gtkcolorsel.Tpo -c -o gtkcolorsel.o `test -f 'widgets/gtkcolorsel.c' || echo '$(srcdir)/'`widgets/gtkcolorsel.c + mv -f $(DEPDIR)/gtkcolorsel.Tpo $(DEPDIR)/gtkcolorsel.Po +# source='widgets/gtkcolorsel.c' object='gtkcolorsel.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtkcolorsel.o `test -f 'widgets/gtkcolorsel.c' || echo '$(srcdir)/'`widgets/gtkcolorsel.c + +gtkcolorsel.obj: widgets/gtkcolorsel.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkcolorsel.obj -MD -MP -MF $(DEPDIR)/gtkcolorsel.Tpo -c -o gtkcolorsel.obj `if test -f 'widgets/gtkcolorsel.c'; then $(CYGPATH_W) 'widgets/gtkcolorsel.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtkcolorsel.c'; fi` + mv -f $(DEPDIR)/gtkcolorsel.Tpo $(DEPDIR)/gtkcolorsel.Po +# source='widgets/gtkcolorsel.c' object='gtkcolorsel.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtkcolorsel.obj `if test -f 'widgets/gtkcolorsel.c'; then $(CYGPATH_W) 'widgets/gtkcolorsel.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtkcolorsel.c'; fi` + +gtkknob.o: widgets/gtkknob.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkknob.o -MD -MP -MF $(DEPDIR)/gtkknob.Tpo -c -o gtkknob.o `test -f 'widgets/gtkknob.c' || echo '$(srcdir)/'`widgets/gtkknob.c + mv -f $(DEPDIR)/gtkknob.Tpo $(DEPDIR)/gtkknob.Po +# source='widgets/gtkknob.c' object='gtkknob.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtkknob.o `test -f 'widgets/gtkknob.c' || echo '$(srcdir)/'`widgets/gtkknob.c + +gtkknob.obj: widgets/gtkknob.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkknob.obj -MD -MP -MF $(DEPDIR)/gtkknob.Tpo -c -o gtkknob.obj `if test -f 'widgets/gtkknob.c'; then $(CYGPATH_W) 'widgets/gtkknob.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtkknob.c'; fi` + mv -f $(DEPDIR)/gtkknob.Tpo $(DEPDIR)/gtkknob.Po +# source='widgets/gtkknob.c' object='gtkknob.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtkknob.obj `if test -f 'widgets/gtkknob.c'; then $(CYGPATH_W) 'widgets/gtkknob.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtkknob.c'; fi` + +cellrendererspin.o: widgets/cellrendererspin.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cellrendererspin.o -MD -MP -MF $(DEPDIR)/cellrendererspin.Tpo -c -o cellrendererspin.o `test -f 'widgets/cellrendererspin.c' || echo '$(srcdir)/'`widgets/cellrendererspin.c + mv -f $(DEPDIR)/cellrendererspin.Tpo $(DEPDIR)/cellrendererspin.Po +# source='widgets/cellrendererspin.c' object='cellrendererspin.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cellrendererspin.o `test -f 'widgets/cellrendererspin.c' || echo '$(srcdir)/'`widgets/cellrendererspin.c + +cellrendererspin.obj: widgets/cellrendererspin.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cellrendererspin.obj -MD -MP -MF $(DEPDIR)/cellrendererspin.Tpo -c -o cellrendererspin.obj `if test -f 'widgets/cellrendererspin.c'; then $(CYGPATH_W) 'widgets/cellrendererspin.c'; else $(CYGPATH_W) '$(srcdir)/widgets/cellrendererspin.c'; fi` + mv -f $(DEPDIR)/cellrendererspin.Tpo $(DEPDIR)/cellrendererspin.Po +# source='widgets/cellrendererspin.c' object='cellrendererspin.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cellrendererspin.obj `if test -f 'widgets/cellrendererspin.c'; then $(CYGPATH_W) 'widgets/cellrendererspin.c'; else $(CYGPATH_W) '$(srcdir)/widgets/cellrendererspin.c'; fi` + +gtktimeselection.o: widgets/gtktimeselection.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtktimeselection.o -MD -MP -MF $(DEPDIR)/gtktimeselection.Tpo -c -o gtktimeselection.o `test -f 'widgets/gtktimeselection.c' || echo '$(srcdir)/'`widgets/gtktimeselection.c + mv -f $(DEPDIR)/gtktimeselection.Tpo $(DEPDIR)/gtktimeselection.Po +# source='widgets/gtktimeselection.c' object='gtktimeselection.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtktimeselection.o `test -f 'widgets/gtktimeselection.c' || echo '$(srcdir)/'`widgets/gtktimeselection.c + +gtktimeselection.obj: widgets/gtktimeselection.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtktimeselection.obj -MD -MP -MF $(DEPDIR)/gtktimeselection.Tpo -c -o gtktimeselection.obj `if test -f 'widgets/gtktimeselection.c'; then $(CYGPATH_W) 'widgets/gtktimeselection.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtktimeselection.c'; fi` + mv -f $(DEPDIR)/gtktimeselection.Tpo $(DEPDIR)/gtktimeselection.Po +# source='widgets/gtktimeselection.c' object='gtktimeselection.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtktimeselection.obj `if test -f 'widgets/gtktimeselection.c'; then $(CYGPATH_W) 'widgets/gtktimeselection.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtktimeselection.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-client/src/Makefile.am b/veejay-client/src/Makefile.am new file mode 100644 index 00000000..0c96a64d --- /dev/null +++ b/veejay-client/src/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src $(VEEJAY_CFLAGS ) $(GTK_CFLAGS) \ + $(MJPEGTOOLS_CFLAGS) $(GLIB_CFLAGS) $(GLADE_CFLAGS) $(GTKCAIRO_CFLAGS) -DGNOMELOCALEDIR=\""$(datadir)/locale"\" -DGVEEJAY_DATADIR=\""$(gveejay_datadir)"\" + +GVEEJAY_BIN=reloaded +bin_PROGRAMS = $(GVEEJAY_BIN) +reloaded_SOURCES = widgets/gtkcolorsel.c widgets/gtkknob.c widgets/cellrendererspin.c widgets/gtktimeselection.c vj-midi.c curve.c utils.c tracksources.c gveejay.c keyboard.c sequence.c multitrack.c vj-api.c ${gveejay_headers} + +reloaded_LDFLAGS = $(VEEJAY_LIBS) $(MJPEGTOOLS_LIBS) $(GTK_LIBS) $(GLIB_LIBS)\ +$(GLADE_LIBS) $(GTKCAIRO_LIBS) $(FFMPEG_AVCODEC_LIBS) $(FFMPEG_SWSCALER_LIBS) $(ALSA_LIBS) -lgthread-2.0 -export-dynamic + diff --git a/veejay-client/src/Makefile.in b/veejay-client/src/Makefile.in new file mode 100644 index 00000000..08491760 --- /dev/null +++ b/veejay-client/src/Makefile.in @@ -0,0 +1,594 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = $(am__EXEEXT_1) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__EXEEXT_1 = reloaded$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_reloaded_OBJECTS = gtkcolorsel.$(OBJEXT) gtkknob.$(OBJEXT) \ + cellrendererspin.$(OBJEXT) gtktimeselection.$(OBJEXT) \ + vj-midi.$(OBJEXT) curve.$(OBJEXT) utils.$(OBJEXT) \ + tracksources.$(OBJEXT) gveejay.$(OBJEXT) keyboard.$(OBJEXT) \ + sequence.$(OBJEXT) multitrack.$(OBJEXT) vj-api.$(OBJEXT) +reloaded_OBJECTS = $(am_reloaded_OBJECTS) +reloaded_LDADD = $(LDADD) +reloaded_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(reloaded_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(reloaded_SOURCES) +DIST_SOURCES = $(reloaded_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_LIBS = @ALSA_LIBS@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +GLADE_CFLAGS = @GLADE_CFLAGS@ +GLADE_LIBS = @GLADE_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GREP = @GREP@ +GTKCAIRO_CFLAGS = @GTKCAIRO_CFLAGS@ +GTKCAIRO_LIBS = @GTKCAIRO_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VEEJAY_CFLAGS = @VEEJAY_CFLAGS@ +VEEJAY_LIBS = @VEEJAY_LIBS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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@ +gveejay_datadir = @gveejay_datadir@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src $(VEEJAY_CFLAGS ) $(GTK_CFLAGS) \ + $(MJPEGTOOLS_CFLAGS) $(GLIB_CFLAGS) $(GLADE_CFLAGS) $(GTKCAIRO_CFLAGS) -DGNOMELOCALEDIR=\""$(datadir)/locale"\" -DGVEEJAY_DATADIR=\""$(gveejay_datadir)"\" + +GVEEJAY_BIN = reloaded +reloaded_SOURCES = widgets/gtkcolorsel.c widgets/gtkknob.c widgets/cellrendererspin.c widgets/gtktimeselection.c vj-midi.c curve.c utils.c tracksources.c gveejay.c keyboard.c sequence.c multitrack.c vj-api.c ${gveejay_headers} +reloaded_LDFLAGS = $(VEEJAY_LIBS) $(MJPEGTOOLS_LIBS) $(GTK_LIBS) $(GLIB_LIBS)\ +$(GLADE_LIBS) $(GTKCAIRO_LIBS) $(FFMPEG_AVCODEC_LIBS) $(FFMPEG_SWSCALER_LIBS) $(ALSA_LIBS) -lgthread-2.0 -export-dynamic + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +reloaded$(EXEEXT): $(reloaded_OBJECTS) $(reloaded_DEPENDENCIES) + @rm -f reloaded$(EXEEXT) + $(reloaded_LINK) $(reloaded_OBJECTS) $(reloaded_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cellrendererspin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcolorsel.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkknob.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktimeselection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gveejay.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multitrack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sequence.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracksources.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-api.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-midi.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +gtkcolorsel.o: widgets/gtkcolorsel.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkcolorsel.o -MD -MP -MF $(DEPDIR)/gtkcolorsel.Tpo -c -o gtkcolorsel.o `test -f 'widgets/gtkcolorsel.c' || echo '$(srcdir)/'`widgets/gtkcolorsel.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gtkcolorsel.Tpo $(DEPDIR)/gtkcolorsel.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='widgets/gtkcolorsel.c' object='gtkcolorsel.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 gtkcolorsel.o `test -f 'widgets/gtkcolorsel.c' || echo '$(srcdir)/'`widgets/gtkcolorsel.c + +gtkcolorsel.obj: widgets/gtkcolorsel.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkcolorsel.obj -MD -MP -MF $(DEPDIR)/gtkcolorsel.Tpo -c -o gtkcolorsel.obj `if test -f 'widgets/gtkcolorsel.c'; then $(CYGPATH_W) 'widgets/gtkcolorsel.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtkcolorsel.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gtkcolorsel.Tpo $(DEPDIR)/gtkcolorsel.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='widgets/gtkcolorsel.c' object='gtkcolorsel.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 gtkcolorsel.obj `if test -f 'widgets/gtkcolorsel.c'; then $(CYGPATH_W) 'widgets/gtkcolorsel.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtkcolorsel.c'; fi` + +gtkknob.o: widgets/gtkknob.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkknob.o -MD -MP -MF $(DEPDIR)/gtkknob.Tpo -c -o gtkknob.o `test -f 'widgets/gtkknob.c' || echo '$(srcdir)/'`widgets/gtkknob.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gtkknob.Tpo $(DEPDIR)/gtkknob.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='widgets/gtkknob.c' object='gtkknob.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 gtkknob.o `test -f 'widgets/gtkknob.c' || echo '$(srcdir)/'`widgets/gtkknob.c + +gtkknob.obj: widgets/gtkknob.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtkknob.obj -MD -MP -MF $(DEPDIR)/gtkknob.Tpo -c -o gtkknob.obj `if test -f 'widgets/gtkknob.c'; then $(CYGPATH_W) 'widgets/gtkknob.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtkknob.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gtkknob.Tpo $(DEPDIR)/gtkknob.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='widgets/gtkknob.c' object='gtkknob.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 gtkknob.obj `if test -f 'widgets/gtkknob.c'; then $(CYGPATH_W) 'widgets/gtkknob.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtkknob.c'; fi` + +cellrendererspin.o: widgets/cellrendererspin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cellrendererspin.o -MD -MP -MF $(DEPDIR)/cellrendererspin.Tpo -c -o cellrendererspin.o `test -f 'widgets/cellrendererspin.c' || echo '$(srcdir)/'`widgets/cellrendererspin.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cellrendererspin.Tpo $(DEPDIR)/cellrendererspin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='widgets/cellrendererspin.c' object='cellrendererspin.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 cellrendererspin.o `test -f 'widgets/cellrendererspin.c' || echo '$(srcdir)/'`widgets/cellrendererspin.c + +cellrendererspin.obj: widgets/cellrendererspin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cellrendererspin.obj -MD -MP -MF $(DEPDIR)/cellrendererspin.Tpo -c -o cellrendererspin.obj `if test -f 'widgets/cellrendererspin.c'; then $(CYGPATH_W) 'widgets/cellrendererspin.c'; else $(CYGPATH_W) '$(srcdir)/widgets/cellrendererspin.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cellrendererspin.Tpo $(DEPDIR)/cellrendererspin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='widgets/cellrendererspin.c' object='cellrendererspin.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 cellrendererspin.obj `if test -f 'widgets/cellrendererspin.c'; then $(CYGPATH_W) 'widgets/cellrendererspin.c'; else $(CYGPATH_W) '$(srcdir)/widgets/cellrendererspin.c'; fi` + +gtktimeselection.o: widgets/gtktimeselection.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtktimeselection.o -MD -MP -MF $(DEPDIR)/gtktimeselection.Tpo -c -o gtktimeselection.o `test -f 'widgets/gtktimeselection.c' || echo '$(srcdir)/'`widgets/gtktimeselection.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gtktimeselection.Tpo $(DEPDIR)/gtktimeselection.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='widgets/gtktimeselection.c' object='gtktimeselection.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 gtktimeselection.o `test -f 'widgets/gtktimeselection.c' || echo '$(srcdir)/'`widgets/gtktimeselection.c + +gtktimeselection.obj: widgets/gtktimeselection.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtktimeselection.obj -MD -MP -MF $(DEPDIR)/gtktimeselection.Tpo -c -o gtktimeselection.obj `if test -f 'widgets/gtktimeselection.c'; then $(CYGPATH_W) 'widgets/gtktimeselection.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtktimeselection.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gtktimeselection.Tpo $(DEPDIR)/gtktimeselection.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='widgets/gtktimeselection.c' object='gtktimeselection.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 gtktimeselection.obj `if test -f 'widgets/gtktimeselection.c'; then $(CYGPATH_W) 'widgets/gtktimeselection.c'; else $(CYGPATH_W) '$(srcdir)/widgets/gtktimeselection.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-client/src/callback.c b/veejay-client/src/callback.c new file mode 100644 index 00000000..85e94499 --- /dev/null +++ b/veejay-client/src/callback.c @@ -0,0 +1,3685 @@ +/* gveejay - Linux VeeJay - GVeejay GTK+-2/Glade User Interface + * (C) 2002-2005 Niels Elburg + * (C) 2006 Matthijs van Henten + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +static int config_file_status = 0; +static gchar *config_file = NULL; +static int srt_locked_ = 0; +static int srt_seq_ = 0; + +static int bg_[4]; +static int fg_[4]; +static int ln_[4]; + +static int sample_calctime(); + +static void change_box_color_rgb( GtkWidget *box, int r, int g, int b,int a, int fill ); + +void text_defaults() +{ + bg_[0] = 255; bg_[1] = 255; bg_[2] = 255; bg_[3] = 0; + fg_[0] = 0; fg_[1] = 0; fg_[2] = 0; fg_[3] = 0; + ln_[0] = 200; ln_[1] = 255; ln_[1] = 255; ln_[3] = 0; + srt_seq_ = 0; +} + +void on_no_caching_clicked( GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_NO_CACHING ); +} + +void on_report_a_bug1_activate(GtkWidget *w, gpointer user_data ) +{ + reportbug(); +} + +void on_button_085_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims(VIMS_VIDEO_SKIP_SECOND); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_SKIP_SECOND ); +} +void on_button_086_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims(VIMS_VIDEO_PREV_SECOND ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_PREV_SECOND ); + +} +void on_button_080_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims(VIMS_VIDEO_PLAY_FORWARD); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_PLAY_FORWARD ); + +} +void on_button_081_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims(VIMS_VIDEO_PLAY_BACKWARD); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_PLAY_BACKWARD ); +} +void on_button_082_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_VIDEO_PLAY_STOP ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_PLAY_STOP ); +} +void on_button_083_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_VIDEO_SKIP_FRAME ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_SKIP_FRAME ); +} +void on_button_084_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_VIDEO_PREV_FRAME ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_PREV_FRAME ); +} +void on_button_087_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_VIDEO_GOTO_START ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_GOTO_START ); +} +void on_button_088_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_VIDEO_GOTO_END); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_VIDEO_GOTO_END ); +} + +void on_videobar_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + gdouble slider_val = GTK_ADJUSTMENT(GTK_RANGE(widget)->adjustment)->value; + gint val = 0; + switch(info->status_tokens[PLAY_MODE]) + { + case MODE_PLAIN: + val = slider_val * info->status_tokens[TOTAL_FRAMES]; + break; + case MODE_SAMPLE: + val = slider_val * (info->status_tokens[SAMPLE_END] - info->status_tokens[SAMPLE_START]); + val += info->status_tokens[SAMPLE_START]; + break; + default: + return; + } + multi_vims( VIMS_VIDEO_SET_FRAME, "%d", val ); + + vj_midi_learning_vims_simple( info->midi, "videobar", VIMS_VIDEO_SET_FRAME ); + } +} + +void on_button_001_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_SET_PLAIN_MODE ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_SET_PLAIN_MODE ); +} + +void on_button_252_clicked( GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_DEBUG_LEVEL ); + if(is_button_toggled( "button_252" )) + vims_verbosity = 1; + else + vims_verbosity = 0; + vj_msg(VEEJAY_MSG_INFO, "%s debug information", + vims_verbosity ? "Displaying" : "Not displaying" ); +} + +void on_button_251_clicked( GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_BEZERK ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_BEZERK ); + vj_msg(VEEJAY_MSG_INFO, "Bezerk mode toggled"); +} + +void on_entry_samplename_button_clicked( GtkWidget *widget, gpointer user_data ) +{ + gchar *title = get_text( "entry_samplename" ); + multi_vims( VIMS_SAMPLE_SET_DESCRIPTION, "%d %s", 0,title ); + + //@ dont reload sample, print info to samplebank + int i,j; + for( i= 0; i < NUM_BANKS; i ++ ) + { + for( j = 0; j < NUM_SAMPLES_PER_PAGE ; j ++ ) + { + if( (info->sample_banks[i]->slot[j]->sample_id == + info->status_tokens[CURRENT_ID]) ) + { + gtk_frame_set_label( GTK_FRAME( info->sample_banks[i]->gui_slot[j]->frame ) , title ); + return; + } + } + } +} + +void on_button_054_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *ext = get_text( "screenshotformat" ); + if(ext) + { + gchar filename[100]; + sprintf(filename, "frame-%d.%s", info->status_tokens[FRAME_NUM] + 1 , ext); + gint w = get_nums("screenshot_width"); + gint h = get_nums("screenshot_height"); + multi_vims( VIMS_SCREENSHOT,"%d %d %s",w,h,filename ); + vj_msg(VEEJAY_MSG_INFO, "Requested screenshot '%s' of frame %d", + filename, info->status_tokens[FRAME_NUM] + 1 ); + } +} +void on_button_200_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_EFFECT_SET_BG ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_EFFECT_SET_BG ); + vj_msg(VEEJAY_MSG_INFO, + "Requested background mask of frame %d", + info->status_tokens[FRAME_NUM] + 1 ); +} +void on_button_5_4_clicked(GtkWidget *widget, gpointer user_data) +{ + if( is_button_toggled("button_5_4") ) + { + single_vims( VIMS_AUDIO_ENABLE ); + vj_msg(VEEJAY_MSG_INFO, "Audio is enabled"); + vj_midi_learning_vims_simple(info->midi, NULL, VIMS_AUDIO_ENABLE ); + } + else + { + single_vims( VIMS_AUDIO_DISABLE ); + vj_msg(VEEJAY_MSG_INFO, "Audio is disabled"); + vj_midi_learning_vims_simple(info->midi, NULL, VIMS_AUDIO_DISABLE ); + } + +} +void on_button_samplestart_clicked(GtkWidget *widget, gpointer user_data) +{ + info->sample[0] = info->status_tokens[FRAME_NUM]; + vj_msg(VEEJAY_MSG_INFO, "New sample startings position is %d", + info->sample[0] ); +} +void on_button_sampleend_clicked(GtkWidget *widget, gpointer user_data) +{ + info->sample[1] = info->status_tokens[FRAME_NUM]; + multi_vims( VIMS_SAMPLE_NEW, "%d %d", info->sample[0],info->sample[1]); + vj_msg(VEEJAY_MSG_INFO, "New sample from EditList %d - %d", + info->sample[0], info->sample[1]); + gveejay_new_slot(MODE_SAMPLE); +} + +void on_button_veejay_clicked(GtkWidget *widget, gpointer user_data) +{ +#ifdef STRICT_CHECKING + assert( info->watch.state == STATE_WAIT_FOR_USER ); +#endif + info->watch.state = STATE_CONNECT; +} +void on_button_sendvims_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *text = get_text("vimsmessage"); + if(strncasecmp( text, "600:;",5 ) == 0) + veejay_quit(); + vj_msg(VEEJAY_MSG_INFO, "User defined VIMS message sent '%s'",text ); + msg_vims( text ); +} +void on_vimsmessage_activate(GtkWidget *widget, gpointer user_data) +{ + msg_vims( get_text( "vimsmessage") ); + vj_midi_learning_vims( info->midi, NULL, get_text("vimsmessage"),0); + vj_msg(VEEJAY_MSG_INFO, "User defined VIMS message sent '%s'", get_text("vimsmessage")); +} + +void on_button_fadedur_value_changed(GtkWidget *widget, gpointer user_data) +{ + +} + +void on_button_fadeout_clicked(GtkWidget *w, gpointer user_data) +{ + gint num = (gint)get_numd( "button_fadedur"); + gchar *timenow = format_time( num, info->el.fps ); + multi_vims( VIMS_CHAIN_FADE_OUT, "0 %d", num ); + vj_midi_learning_vims_complex( info->midi, "button_fadedur", VIMS_CHAIN_FADE_OUT, 0,2 ); + vj_msg(VEEJAY_MSG_INFO, "Fade out duration %s (frames %d)", + timenow, + num ); + if(timenow) g_free(timenow); +} + +void on_button_fadein_clicked(GtkWidget *w, gpointer user_data) +{ + gint num = (gint)get_numd( "button_fadedur"); + gchar *timenow = format_time( num, info->el.fps ); + multi_vims( VIMS_CHAIN_FADE_IN, "0 %d", num ); + vj_midi_learning_vims_complex( info->midi, "button_fadedur", VIMS_CHAIN_FADE_IN, 0,2 ); + + vj_msg(VEEJAY_MSG_INFO, "Fade in duration %s (frames %d)", + timenow, + num ); + if(timenow) g_free(timenow); + +} + +void on_manualopacity_value_changed(GtkWidget *w, gpointer user_data) +{ + if(info->status_lock) + return; + + gdouble val = GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value; + + if( is_button_toggled( "loglinear" )) + { + double v = val; + if( v > 0.0 ) + v = 255.0/v; + if( v > 0.0 ) + v = log( val / 0.01 ) / log( 1.0 / 0.01 ); + val = 255.0 * v; + } + + multi_vims( VIMS_CHAIN_MANUAL_FADE, "0 %d", + (int)(val)); + + vj_midi_learning_vims_complex( info->midi, "loglinear", VIMS_CHAIN_FADE_IN, 0,1 ); + + vj_msg(VEEJAY_MSG_INFO, "FX Opacity set to %1.2f", val ); +} + +static void el_selection_update() +{ + gchar *text = format_selection_time(info->selection[0], info->selection[1]); + update_label_str( "label_el_selection", text ); + vj_msg( VEEJAY_MSG_INFO, "Updated EditList selection %d - %d Timecode: %s", + info->selection[0], info->selection[1], text ); + g_free(text); +} + +void on_button_el_selstart_value_changed(GtkWidget *w, gpointer user_data) +{ + info->selection[0] = get_nums("button_el_selstart"); + if( info->selection[0] > info->selection[1]) + update_spin_value( "button_el_selend", info->selection[0]); + gchar *text = format_time( info->selection[0], info->el.fps ); + update_label_str( "label_el_startpos", text); + g_free(text); + el_selection_update(); +} + +void on_button_el_selend_value_changed(GtkWidget *w, gpointer user_data) +{ + info->selection[1] = get_nums( "button_el_selend" ); + if(info->selection[1] < info->selection[0]) + update_spin_value( "button_el_selstart", info->selection[1]); + gchar *text = format_time( info->selection[1], info->el.fps); + update_label_str( "label_el_endpos", text); + g_free(text); + el_selection_update(); +} + +static gboolean verify_selection() +{ + if( (info->selection[1] - info->selection[0] ) <= 0) + { + vj_msg(VEEJAY_MSG_ERROR, "Invalid EditList selection %d - %d", + info->selection[0], info->selection[1]); + return FALSE; + } + return TRUE; +} + +void on_button_el_cut_clicked(GtkWidget *w, gpointer *user_data) +{ + if(verify_selection()) + { multi_vims( VIMS_EDITLIST_CUT, "%d %d", + info->selection[0], info->selection[1]); + gchar *time1 = format_time( info->selection[0], info->el.fps ); + gchar *time2 = format_time( info->selection[1], info->el.fps ); + vj_msg(VEEJAY_MSG_INFO, "Cut %s - %s from EditList to buffer", + time1, time2 ); + g_free(time1); + g_free(time2); + info->uc.reload_hint[HINT_EL] = 1; + } +} +void on_button_el_del_clicked(GtkWidget *w, gpointer *user_data) +{ + if(verify_selection()) + { + multi_vims( VIMS_EDITLIST_DEL, "%d %d", + info->selection[0], info->selection[1]); + gchar *time1 = format_time( info->selection[0],info->el.fps ); + gchar *time2 = format_time( info->selection[1],info->el.fps ); + vj_msg(VEEJAY_MSG_INFO, "Delete %s - %s from EditList", + time1, time2 ); + g_free(time1); + g_free(time2); + update_spin_value( "button_el_selstart", 0 ); + update_spin_value( "button_el_selend", 0); + } +} +void on_button_el_crop_clicked(GtkWidget *w, gpointer *user_data) +{ + if(verify_selection()) + { + multi_vims( VIMS_EDITLIST_CROP, "%d %d", + info->selection[0], info->selection[1]); + gchar *total = format_time( info->status_tokens[TOTAL_FRAMES],info->el.fps ); + gchar *time2 = format_time( info->selection[1],info->el.fps ); + gchar *time1 = format_time( info->selection[0],info->el.fps ); + vj_msg(VEEJAY_MSG_INFO, "Delete 00:00:00 - %s and %s - %s from EditList", + time1, time2, total ); + g_free(time1); + g_free(time2); + g_free(total); + + } +} +void on_button_el_copy_clicked(GtkWidget *w, gpointer *user_data) +{ + if(verify_selection()) + { + multi_vims( VIMS_EDITLIST_COPY, "%d %d", + info->selection[0], info->selection[1] ); + gchar *time1 = format_time( info->selection[0],info->el.fps ); + gchar *time2 = format_time( info->selection[1],info->el.fps ); + vj_msg(VEEJAY_MSG_INFO, "Copy %s - %s to buffer", + time1,time2); + g_free(time1); + g_free(time2); + } +} + +void on_button_el_newclip_clicked(GtkWidget *w, gpointer *user) +{ + if(verify_selection()) + { + multi_vims( VIMS_SAMPLE_NEW, "%d %d", + info->selection[0], info->selection[1] ); + vj_msg(VEEJAY_MSG_INFO, "New sample from EditList %d - %d" , + info->selection[0], info->selection[1] ); + gveejay_new_slot(MODE_SAMPLE); + } + + +} + +void on_button_el_pasteat_clicked(GtkWidget *w, gpointer *user_data) +{ + gint val = get_nums( "button_el_selpaste" ); + info->selection[2] = val; + multi_vims( VIMS_EDITLIST_PASTE_AT, "%d", + info->selection[2]); + gchar *time1 = format_time( info->selection[2],info->el.fps ); + vj_msg(VEEJAY_MSG_INFO, "Paste contents from buffer to frame %d (timecode %s)", + info->selection[2], time1); + g_free(time1); + info->uc.reload_hint[HINT_EL] = 1; + +} +void on_button_el_save_clicked(GtkWidget *w, gpointer *user_data) +{ + gchar *filename = dialog_save_file( "Save EditList" ); + if(filename) + { + multi_vims( VIMS_EDITLIST_SAVE, "%s %d %d", + filename, 0, info->el.num_frames ); + vj_msg(VEEJAY_MSG_INFO, "Saved EditList to %s", filename); + g_free(filename); + } +} +void on_button_el_savesel_clicked(GtkWidget *w, gpointer *user_data) +{ + gchar *filename = dialog_save_file( "Save EditList Selection" ); + if(filename) + { + gint start = get_nums( "button_el_selstart" ); + gint end = get_nums( "button_el_selend" ); + multi_vims( VIMS_EDITLIST_SAVE, "%s %d %d", + filename, start, end ); + vj_msg(VEEJAY_MSG_INFO,"Save EditList selection to %s", filename); + g_free(filename); + } +} + +void on_button_el_add_clicked(GtkWidget *w, gpointer *user_data) +{ + gchar *filename = dialog_open_file( "Append videofile to EditList",0 ); + if(filename) + { + multi_vims( VIMS_EDITLIST_ADD, "%s", + filename ); + vj_msg(VEEJAY_MSG_INFO, "Try to add file '%s' to EditList", filename); + g_free(filename); + } +} +void on_button_el_addsample_clicked(GtkWidget *w, gpointer *user_data) +{ + gchar *filename = dialog_open_file( "Append videofile (and create sample)",0); + if( !filename ) + return; + + int sample_id = 0; + int result_len = 0; + multi_vims( VIMS_EDITLIST_ADD_SAMPLE, "%d %s", 0, filename ); + + gchar *result = recv_vims( 3, &result_len ); + if( result <= 0||result == NULL ) + { + gveejay_popup_err( "Error" , "Unable to load video file. Please check Veejay's console to find out why."); + } + else + { + sscanf( result, "%5d", &sample_id ); + + if(sample_id <= 0 ) + gveejay_popup_err( "Error", "Unable to load video file. Please check Veejay's console to find out why."); + else + vj_msg(VEEJAY_MSG_INFO, "Created new sample %d from file %s", sample_id, filename); + g_free(result); + } + g_free(filename ); +} +void on_button_el_delfile_clicked(GtkWidget *w, gpointer *user_data) +{ + int frame = _el_ref_start_frame( info->uc.selected_el_entry ); + int first_frame = frame; + int last_frame = _el_ref_end_frame( info->uc.selected_el_entry ); + multi_vims( VIMS_EDITLIST_DEL, "%d %d", first_frame, last_frame ); + gchar *time1 = format_time( first_frame,info->el.fps ); + gchar *time2 = format_time( last_frame,info->el.fps ); + vj_msg(VEEJAY_MSG_INFO, "Delete %s - %s", + time1,time2); + g_free(time1); + g_free(time2); +} +void on_button_fx_clearchain_clicked(GtkWidget *w, gpointer user_data) +{ + multi_vims( VIMS_CHAIN_CLEAR, "%d",0); + info->uc.reload_hint[HINT_CHAIN] = 1; + info->uc.reload_hint[HINT_ENTRY] = 1; + vj_midi_learning_vims_msg( info->midi, NULL, VIMS_CHAIN_CLEAR,0 ); + vj_msg(VEEJAY_MSG_INFO, "Clear FX Chain"); +} + +void on_button_entry_toggle_clicked(GtkWidget *w, gpointer user_data) +{ + if(!info->status_lock) + { + gint val = is_button_toggled( "button_entry_toggle" ); + int vims_id = VIMS_CHAIN_ENTRY_SET_VIDEO_OFF; + if(val) + vims_id = VIMS_CHAIN_ENTRY_SET_VIDEO_ON; + multi_vims( vims_id,"%d %d", 0, info->uc.selected_chain_entry ); + + vj_midi_learning_vims_msg2( info->midi, NULL, vims_id, 0, info->uc.selected_chain_entry ); + vj_msg(VEEJAY_MSG_INFO, "Chain Entry %d is %s", + info->uc.selected_chain_entry, + (val ? "Enabled" : "Disabled" )); + info->uc.reload_hint[HINT_ENTRY] = 1; + } +} + +void on_button_fx_entry_value_changed(GtkWidget *w, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_CHAIN_SET_ENTRY, "%d", + (gint) gtk_spin_button_get_value( GTK_SPIN_BUTTON(w)) + ); + vj_midi_learning_vims_spin( info->midi, "fx_entry", VIMS_CHAIN_SET_ENTRY ); + } +} + +void on_button_fx_del_clicked(GtkWidget *w, gpointer user_data) +{ + multi_vims( VIMS_CHAIN_ENTRY_CLEAR, "%d %d", 0, + info->uc.selected_chain_entry ); + info->uc.reload_hint[HINT_ENTRY] = 1; + info->uc.reload_hint[HINT_CHAIN] = 1; + vj_midi_learning_vims_msg2( info->midi, NULL, VIMS_CHAIN_ENTRY_CLEAR, 0, info->uc.selected_chain_entry ); + vj_msg(VEEJAY_MSG_INFO, "Clear Effect from Entry %d", + info->uc.selected_chain_entry); +} + +#define slider_changed( arg_num, value ) \ +{\ +if(!info->status_lock && !info->parameter_lock)\ + {\ +info->parameter_lock = 1;\ +multi_vims( VIMS_CHAIN_ENTRY_SET_ARG_VAL, "%d %d %d %d", 0, info->uc.selected_chain_entry,arg_num, value );\ +vj_midi_learning_vims_fx( info->midi, arg_num, VIMS_CHAIN_ENTRY_SET_ARG_VAL, 0,info->uc.selected_chain_entry, arg_num,1 );\ +if(info->uc.selected_rgbkey) update_rgbkey_from_slider(); \ +info->parameter_lock = 0;\ +}\ +} + +#define param_changed( arg_num, fraction, name ) \ +{\ +if(!info->status_lock && !info->parameter_lock)\ +{\ +info->parameter_lock = 1;\ +multi_vims( VIMS_CHAIN_ENTRY_SET_ARG_VAL, "%d %d %d %d", 0, info->uc.selected_chain_entry,arg_num, (get_slider_val(name) + fraction) );\ +update_slider_value( name, (get_slider_val(name) + fraction), 0 );\ +vj_midi_learning_vims_fx( info->midi, arg_num, VIMS_CHAIN_ENTRY_SET_ARG_VAL, 0, info->uc.selected_chain_entry,arg_num,2 );\ +if(info->uc.selected_rgbkey) update_rgbkey_from_slider(); \ +info->parameter_lock = 0;\ +}\ +} + + +#define kf_changed( arg_num ) \ +{\ +if(!info->status_lock && arg_num != info->uc.selected_parameter_id)\ +{\ +vj_kf_select_parameter(arg_num);\ +}\ +} + +void on_slider_p0_value_changed(GtkWidget *w, gpointer user_data) +{ + slider_changed( 0, (gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value ); +} +void on_slider_p1_value_changed(GtkWidget *w, gpointer user_data) +{ + slider_changed( 1, (gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value ); +} +void on_slider_p2_value_changed(GtkWidget *w, gpointer user_data) +{ + slider_changed( 2, (gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value ); +} + +void on_slider_p3_value_changed(GtkWidget *w, gpointer user_data) +{ + slider_changed( 3, (gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value ); +} +void on_slider_p4_value_changed(GtkWidget *w, gpointer user_data) +{ + slider_changed( 4, (gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value ); +} + +void on_slider_p5_value_changed(GtkWidget *w, gpointer user_data) +{ + slider_changed( 5, (gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value ); +} +void on_slider_p6_value_changed(GtkWidget *w, gpointer user_data) +{ + slider_changed( 6, (gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value ); +} + +void on_slider_p7_value_changed(GtkWidget *w, gpointer user_data) +{ + slider_changed( 7, (gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value ); +} + +void on_inc_p0_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 0, 1 , "slider_p0" ); +} +void on_dec_p0_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 0, -1, "slider_p0"); +} +void on_inc_p1_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 1, 1 , "slider_p1" ); +} +void on_dec_p1_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 1, -1, "slider_p1"); + +} +void on_inc_p2_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 2, 1 , "slider_p2" ); +} +void on_dec_p2_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 2, -1, "slider_p2"); +} +void on_inc_p3_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 3, 1 , "slider_p3" ); +} + void on_dec_p3_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 3, -1, "slider_p3"); +} +void on_inc_p4_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed(4, 1 , "slider_p4" ); +} +void on_dec_p4_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 4, -1, "slider_p4"); +} + +void on_inc_p5_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed(5, 1 , "slider_p5" ); +} +void on_dec_p5_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 5, -1, "slider_p5"); +} + +void on_inc_p6_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed(6, 1 , "slider_p6" ); +} +void on_dec_p6_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 6, -1, "slider_p6"); +} + +void on_inc_p7_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed(7, 1 , "slider_p7" ); +} +void on_dec_p7_clicked(GtkWidget *w, gpointer user_data) +{ + param_changed( 7, -1, "slider_p7"); +} + + + +void on_button_stoplaunch_clicked(GtkWidget *widget, gpointer user_data) +{ + if( info->watch.state == STATE_PLAYING) + { + info->watch.state = STATE_DISCONNECT; + } +} + +void on_button_sample_play_clicked(GtkWidget *widget, gpointer user_data) +{ + if(info->selection_slot) + { + multi_vims( VIMS_SET_MODE_AND_GO , "%d %d" , + info->selection_slot->sample_type, + info->selection_slot->sample_id ); + + vj_midi_learning_vims_msg2( info->midi, NULL, VIMS_SET_MODE_AND_GO, info->selection_slot->sample_type, + info->selection_slot->sample_id ); + } +} +void on_button_sample_del_clicked(GtkWidget *widget, gpointer user_data) +{ + if( info->selection_slot ) + remove_sample_from_slot(); +} +void on_button_samplelist_load_clicked(GtkWidget *widget, gpointer user_data) +{ + gint erase_all = 0; + if(info->status_tokens[TOTAL_SLOTS] > 0 ) + { + if(prompt_dialog("Load samplelist", + "Loading a samplelist will delete any existing samples" ) == GTK_RESPONSE_REJECT) + return; + else + erase_all = 1; + } + + gchar *filename = dialog_open_file( "Open samplelist",1); + if(filename) + { + if(erase_all) + { + single_vims( VIMS_SET_PLAIN_MODE ); + single_vims( VIMS_SAMPLE_DEL_ALL ); + } + multi_vims( VIMS_SAMPLE_LOAD_SAMPLELIST, "%s", filename ); + g_free(filename ); + } +} +void on_button_samplelist_save_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *filename = dialog_save_file( "Save samplelist"); + if(filename) + { + multi_vims( VIMS_SAMPLE_SAVE_SAMPLELIST, "%s", filename ); + vj_msg(VEEJAY_MSG_INFO, "Saved samples to %s", filename); + g_free(filename); + } +} + +void on_spin_samplestart_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + gint value = (gint) gtk_spin_button_get_value( GTK_SPIN_BUTTON(widget) ); + gchar *time1 = format_time(value,info->el.fps); + multi_vims(VIMS_SAMPLE_SET_START, "%d %d",0, value ); + vj_msg(VEEJAY_MSG_INFO, "Set sample's starting position to %d (timecode %s)", + value, time1); + g_free(time1); + } +} + +void on_spin_sampleend_value_changed( GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + gint value = (gint) gtk_spin_button_get_value( GTK_SPIN_BUTTON(widget) ); + gchar *time1 = format_time(value,info->el.fps); + + multi_vims(VIMS_SAMPLE_SET_END, "%d %d", 0, value ); + vj_msg(VEEJAY_MSG_INFO, "Set sample's ending position to %d (timecode %s)", + value, time1); + g_free(time1); + + } +} + +void on_speed_slider_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + gint value = (gint) get_slider_val( "speed_slider" ); + // value *= info->play_direction; + multi_vims( VIMS_VIDEO_SET_SPEED, "%d", value ); + vj_msg(VEEJAY_MSG_INFO, "Change video playback speed to %d", + value ); + vj_midi_learning_vims_simple( info->midi, "speed_slider", VIMS_VIDEO_SET_SPEED ); + } +} + +void on_spin_samplespeed_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + gint value = (gint) gtk_spin_button_get_value( GTK_SPIN_BUTTON(widget) ); + value *= info->play_direction; + multi_vims( VIMS_SAMPLE_SET_SPEED, "%d %d",0, value ); + vj_midi_learning_vims_spin( info->midi, "samplespeed", VIMS_SAMPLE_SET_SPEED ); + vj_msg(VEEJAY_MSG_INFO, "Change video playback speed to %d", + value ); + } +} + +void on_v4l_brightness_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_STREAM_SET_BRIGHTNESS, "%d %d", + info->selected_slot->sample_id, + (gint) (GTK_ADJUSTMENT(GTK_RANGE(widget)->adjustment)->value * 65535.0) ); + vj_midi_learning_vims_complex( info->midi, "v4l_brightness", VIMS_STREAM_SET_BRIGHTNESS, info->selected_slot->sample_id, + 1 ); + } +} + +void on_v4l_contrast_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_STREAM_SET_CONTRAST, "%d %d", + info->selected_slot->sample_id, + (gint) (GTK_ADJUSTMENT(GTK_RANGE(widget)->adjustment)->value * 65535.0 ) ); + vj_midi_learning_vims_complex( info->midi, "v4l_contrast", VIMS_STREAM_SET_CONTRAST, info->selected_slot->sample_id, + 1 ); + + } +} + +void on_v4l_hue_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_STREAM_SET_HUE, "%d %d", + info->selected_slot->sample_id, + (gint) (GTK_ADJUSTMENT(GTK_RANGE(widget)->adjustment)->value * 65535.0 ) ); + vj_midi_learning_vims_complex( info->midi, "v4l_hue", VIMS_STREAM_SET_HUE, info->selected_slot->sample_id, + 1 ); + + } +} + +void on_v4l_white_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_STREAM_SET_WHITE, "%d %d", + info->selected_slot->sample_id, + (gint) (GTK_ADJUSTMENT(GTK_RANGE(widget)->adjustment)->value * 65535.0 ) ); + vj_midi_learning_vims_complex( info->midi, "v4l_white", VIMS_STREAM_SET_WHITE, info->selected_slot->sample_id, + 1 ); + + } +} + +void on_v4l_color_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_STREAM_SET_COLOR, "%d %d", + info->selected_slot->sample_id, + (gint) (GTK_ADJUSTMENT(GTK_RANGE(widget)->adjustment)->value * 65535.0) ); + vj_midi_learning_vims_complex( info->midi, "v4l_color", VIMS_STREAM_SET_COLOR, info->selected_slot->sample_id, + 1 ); + + } +} +void on_v4l_saturation_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_STREAM_SET_SATURATION, "%d %d", + info->selected_slot->sample_id, + (gint) (GTK_ADJUSTMENT(GTK_RANGE(widget)->adjustment)->value * 65535.0) ); + vj_midi_learning_vims_complex( info->midi, "v4l_saturation", VIMS_STREAM_SET_SATURATION, info->selected_slot->sample_id, + 1 ); + + } +} +#ifndef HAVE_GTK2_6 +static gchar *my_gtk_combo_box_get_active_text(GtkComboBox *combo ) +{ + GtkTreeIter _iter = { 0 }; + gchar *_format = NULL; + GtkTreeModel *_model=NULL; + g_return_val_if_fail( GTK_IS_COMBO_BOX(combo),NULL); + _model = gtk_combo_box_get_model(combo); +g_return_val_if_fail( GTK_IS_LIST_STORE(_model),NULL); + if(gtk_combo_box_get_active_iter(combo,&_iter)) + gtk_tree_model_get(_model, &_iter,0,&_format,-1); + return _format; +} +#define gtk_combo_box_get_active_text( combo ) my_gtk_combo_box_get_active_text(combo) +#endif + +void on_seq_rec_stop_clicked( GtkWidget *w, gpointer data ) +{ + single_vims( VIMS_SAMPLE_REC_STOP ); +} + +void on_rec_seq_start_clicked( GtkWidget *w, gpointer data ) +{ + GtkComboBox *combo = GTK_COMBO_BOX( GTK_WIDGET(glade_xml_get_widget(info->main_window,"combo_samplecodec"))); + gchar *gformat = (gchar*)gtk_combo_box_get_active_text(combo) ; + gchar *format = gformat; + if(format != NULL && strlen(format) > 2) + { + multi_vims( VIMS_RECORD_DATAFORMAT,"%s", + format ); + } + else + { + format = NULL; + } + + multi_vims( VIMS_SAMPLE_REC_START, + "%d %d", + 0, + 0 ); + + vj_midi_learning_vims_msg2( info->midi, NULL, VIMS_SAMPLE_REC_START, 0, 0 ); +} + +void on_stream_recordstart_clicked(GtkWidget *widget, gpointer user_data) +{ + + gint nframes = get_nums( "spin_streamduration"); + gint autoplay = is_button_toggled("button_stream_autoplay"); + GtkComboBox *combo = GTK_COMBO_BOX( GTK_WIDGET(glade_xml_get_widget(info->main_window,"combo_streamcodec"))); + gchar *gformat = (gchar*)gtk_combo_box_get_active_text(combo) ; + gchar *format = gformat; + if(format != NULL && strlen(format) > 2) + { + multi_vims( VIMS_RECORD_DATAFORMAT,"%s", + format ); + } + else + { + format = NULL; + } + + multi_vims( VIMS_STREAM_REC_START, + "%d %d", + nframes, + autoplay ); + vj_midi_learning_vims_msg2( info->midi, NULL, VIMS_STREAM_REC_START, nframes, autoplay ); + + gchar *time1 = format_time( nframes,info->el.fps ); + if(format) + vj_msg(VEEJAY_MSG_INFO, "Record in %s, duration: %s",format, time1); + else + vj_msg(VEEJAY_MSG_INFO, "Recording in default format (MJPEG) , duration: %s", time1); + + g_free(time1); + g_free(format); +} + +void on_stream_recordstop_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_STREAM_REC_STOP ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_STREAM_REC_STOP ); + vj_msg(VEEJAY_MSG_INFO, "Stream record stop"); +} + +void on_spin_streamduration_value_changed(GtkWidget *widget , gpointer user_data) +{ + gint n_frames = get_nums( "spin_streamduration" ); + gchar *time = format_time(n_frames,info->el.fps); + update_label_str( "label_streamrecord_duration", time ); + g_free(time); +} + + +void on_button_sample_recordstart_clicked(GtkWidget *widget, gpointer user_data) +{ + + gint autoplay = is_button_toggled("button_sample_autoplay"); + GtkComboBox *combo = GTK_COMBO_BOX( GTK_WIDGET(glade_xml_get_widget(info->main_window,"combo_samplecodec"))); + + gchar *format = (gchar*) gtk_combo_box_get_active_text(combo); + gint n_frames = 0; + + gint dur_val = get_nums( "spin_sampleduration" ); + if( is_button_toggled( "sample_mulloop" ) ) + { + int base = sample_calctime(); + n_frames = base * dur_val; + n_frames = 0; + } + else + { + n_frames = dur_val; + } + + gsize br=0; gsize bw=0; + gchar *utftext = (gchar*) get_text( "entry_samplename"); + gchar *text = (utftext != NULL ? g_locale_from_utf8( utftext, -1, &br, &bw,NULL) : NULL); + if(text != NULL) + { + int i = 0; + while( text[i] != '\0' ) + { + if( !isalnum( text[i] )) + { + error_dialog("Error", "Only alpha numeric characters are allowed"); + if( text) free(text); + return; + } + i++; + } + multi_vims( VIMS_SAMPLE_SET_DESCRIPTION, "%d %s", 0, text ); + g_free(text); + } + + if(format != NULL) + { + multi_vims( VIMS_RECORD_DATAFORMAT,"%s", + format ); + } + multi_vims( VIMS_SAMPLE_REC_START, + "%d %d", + n_frames, + autoplay ); + + vj_midi_learning_vims_msg2( info->midi, NULL, VIMS_SAMPLE_REC_START, n_frames, autoplay ); + + gchar *time1 = format_time(n_frames,info->el.fps); + vj_msg(VEEJAY_MSG_INFO,"Record duration: %s", + time1); + g_free(time1); + + g_free(format); +} + +void on_button_sample_recordstop_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_SAMPLE_REC_STOP ); + vj_midi_learning_vims_simple( info->midi, NULL, VIMS_SAMPLE_REC_STOP ); + vj_msg(VEEJAY_MSG_INFO, "Sample record stop"); +} + +static int sample_calctime() +{ + int n_frames = info->status_tokens[SAMPLE_END] - info->status_tokens[SAMPLE_START]; + if( info->status_tokens[SAMPLE_LOOP] == 2 ) + n_frames *= 2; + if( info->status_tokens[FRAME_DUP] > 0 ) + n_frames *= info->status_tokens[FRAME_DUP]; + return n_frames; +} + +void on_spin_sampleduration_value_changed(GtkWidget *widget , gpointer user_data) +{ + // get num and display label_samplerecord_duration + gint n_frames = sample_calctime(); + if( is_button_toggled( "sample_mulloop" )) + n_frames *= get_nums( "spin_sampleduration" ); + else + n_frames = get_nums( "spin_sampleduration" ); + gchar *time = format_time( n_frames,info->el.fps ); + update_label_str( "label_samplerecord_duration", time ); + g_free(time); +} + +void on_sample_mulloop_clicked(GtkWidget *w, gpointer user_data) +{ + gint n_frames = sample_calctime(); + if( is_button_toggled( "sample_mulloop" )) + n_frames *= get_nums( "spin_sampleduration"); + gchar *time = format_time( n_frames,info->el.fps ); + update_label_str( "label_samplerecord_duration", time ); + g_free(time); +} + +void on_sample_mulframes_clicked(GtkWidget *w, gpointer user_data) +{ + gint n_frames = get_nums( "spin_sampleduration" ); + gchar *time = format_time( n_frames,info->el.fps ); + update_label_str( "label_samplerecord_duration", time ); + g_free(time); +} + +void on_spin_mudplay_value_changed(GtkWidget *widget, gpointer user_data) +{ +} +void on_check_samplefx_clicked(GtkWidget *widget , gpointer user_data) +{ + if(!info->status_lock) + { + int vims_id = VIMS_SAMPLE_CHAIN_DISABLE; + + if( is_button_toggled( "check_samplefx" ) ) + vims_id = VIMS_SAMPLE_CHAIN_ENABLE; + multi_vims( vims_id, "%d", 0 ); + + vj_midi_learning_vims_msg( info->midi, NULL, vims_id, 0 ); + } +} +void on_check_streamfx_clicked(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + int vims_id = VIMS_STREAM_CHAIN_DISABLE; + if( is_button_toggled( "check_streamfx")) + vims_id = VIMS_STREAM_CHAIN_ENABLE; + multi_vims( VIMS_STREAM_CHAIN_DISABLE, "%d", 0 ); + vj_midi_learning_vims_msg( info->midi, NULL, vims_id, 0 ); + } +} + +void on_loop_none_clicked(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_SAMPLE_SET_LOOPTYPE, + "%d %d", 0, 0 ); + vj_midi_learning_vims_msg2(info->midi,NULL,VIMS_SAMPLE_SET_LOOPTYPE,0,0 ); + } +} + +void on_loop_normal_clicked(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_SAMPLE_SET_LOOPTYPE, + "%d %d", 0, 1 ); + vj_midi_learning_vims_msg2(info->midi,NULL,VIMS_SAMPLE_SET_LOOPTYPE,0,1 ); + } +} +void on_loop_random_clicked(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + multi_vims( VIMS_SAMPLE_SET_LOOPTYPE, + "%d %d", 0,3 ); + vj_midi_learning_vims_msg2(info->midi,NULL,VIMS_SAMPLE_SET_LOOPTYPE,0,3 ); + + } +} + +void on_loop_pingpong_clicked(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { multi_vims( VIMS_SAMPLE_SET_LOOPTYPE, + "%d %d", 0,2 ); + vj_midi_learning_vims_msg2(info->midi,NULL,VIMS_SAMPLE_SET_LOOPTYPE,0,2 ); + + } +} +/* +void on_check_marker_bind_clicked(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + timeline_set_bind( info->tl, is_button_toggled("check_marker_bind")); +}*/ + +void on_button_clearmarker_clicked(GtkWidget *widget, gpointer user_data) +{ + multi_vims( VIMS_SAMPLE_CLEAR_MARKER, "%d", 0 ); + vj_midi_learning_vims_msg( info->midi, NULL, VIMS_SAMPLE_CLEAR_MARKER, 0 ); + gchar *dur = format_time( 0,info->el.fps ); + update_label_str( "label_markerduration", dur ); + g_free(dur); +} + + +void on_check_audio_mute_clicked(GtkWidget *widget, gpointer user_data) +{ +} +void on_button_samplelist_open_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *filename = dialog_open_file("Load samplelist",1); + if( filename ) + { + multi_vims( VIMS_SAMPLE_LOAD_SAMPLELIST, "%s", filename ); + vj_msg(VEEJAY_MSG_INFO, "Try to load sample list %s", filename); + g_free(filename); + } +} +void on_veejay_expander_activate(GtkWidget *exp, gpointer user_data) +{ +} +void on_veejay_ctrl_expander_activate(GtkWidget *exp, gpointer user_data) +{ + gint width= 0; + gint height = 0; + + GtkWindow *window = GTK_WINDOW( glade_xml_get_widget_( info->main_window, "gveejay_window")); + + gtk_window_get_size( window, &width, &height ); + + if(!gtk_expander_get_expanded(GTK_EXPANDER(exp))) + { + gtk_widget_set_size_request( + glade_xml_get_widget_(info->main_window, "veejaypanel" ), + width, + 400 ); + + gtk_window_resize( window, width, 600 ); + + } + else + { + gtk_widget_set_size_request( + glade_xml_get_widget_(info->main_window, "veejaypanel" ), + width, + 0 ); + gtk_window_resize( window, width, 100 ); + } +} + +void on_button_el_takestart_clicked(GtkWidget *widget, gpointer user_data) +{ + update_spin_value( "button_el_selstart", + info->status_tokens[FRAME_NUM] ); + vj_msg(VEEJAY_MSG_INFO, "Set current frame %d as editlist starting position", + info->status_tokens[FRAME_NUM]); +} +void on_button_el_takeend_clicked(GtkWidget *widget, gpointer user_data) +{ + update_spin_value ("button_el_selend", + info->status_tokens[FRAME_NUM] ); + vj_msg(VEEJAY_MSG_INFO, "Set current frame %d as editlist ending position", + info->status_tokens[FRAME_NUM]); +} +void on_button_el_paste_clicked(GtkWidget *widget, gpointer user_data) +{ + multi_vims( VIMS_EDITLIST_PASTE_AT, "%d", + info->status_tokens[FRAME_NUM] ); + gchar *time1 = format_time( info->status_tokens[FRAME_NUM],info->el.fps ); + vj_msg(VEEJAY_MSG_INFO, "Paste contents of buffer at Frame %d (Tiemcode %s)", + info->status_tokens[FRAME_NUM], time1); + g_free(time1); +} +void on_new_colorstream_clicked(GtkWidget *widget, gpointer user_data) +{ + GdkColor current_color; + GtkWidget *colorsel = glade_xml_get_widget(info->main_window, + "colorselection" ); + gtk_color_selection_get_current_color( + GTK_COLOR_SELECTION( colorsel ), + ¤t_color ); + + // scale to 0 - 255 + gint red = current_color.red / 256.0; +gint green = current_color.green / 256.0; + gint blue = current_color.blue / 256.0; + multi_vims( VIMS_STREAM_NEW_COLOR, "%d %d %d", + red,green,blue ); + + gveejay_new_slot(MODE_STREAM); +} + +#define atom_aspect_ratio(name,type) {\ +info->uc.priout_lock=1;\ +gint value = (type == 0 ? resize_primary_ratio_x() : resize_primary_ratio_y() );\ +update_spin_value(name, value);\ +info->uc.priout_lock=0;\ +} +void on_priout_width_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock && !info->uc.priout_lock) + if( is_button_toggled( "priout_ratio" )) + atom_aspect_ratio( "priout_height", 1 ); +} +void on_priout_height_value_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock && !info->uc.priout_lock) + if( is_button_toggled( "priout_ratio" )) + atom_aspect_ratio( "priout_width", 0 ); +} +void on_priout_apply_clicked(GtkWidget *widget, gpointer user_data) +{ + gint width = get_nums( "priout_width" ); + gint height = get_nums( "priout_height" ); + gint x = get_nums("priout_x" ); + gint y = get_nums("priout_y" ); + + if( width > 0 && height > 0 ) + { + multi_vims( VIMS_RESIZE_SDL_SCREEN, "%d %d %d %d", + width,height,x , y ); + vj_msg(VEEJAY_MSG_INFO, "Resize Video Window to %dx%d", width,height); + } + +} + + +void on_vims_take_clicked(GtkWidget *widget, gpointer user_data) +{ + single_vims( VIMS_BUNDLE_CAPTURE ); + info->uc.reload_hint[HINT_BUNDLES] = 1; + vj_msg(VEEJAY_MSG_INFO, "Create a new bundle from FX Chain. See View -> VIMS Bundles"); +} +void on_button_key_detach_clicked(GtkWidget *widget, gpointer user) +{ + int key_val = info->uc.pressed_key; + int key_mod = info->uc.pressed_mod; + + if( key_val > 0 ) + { + multi_vims( + VIMS_BUNDLE_ATTACH_KEY, + "1 %d %d %s", + key_val, key_mod, "dummy" ); + info->uc.reload_hint[HINT_BUNDLES] = 1; + char *strmod = sdlmod_by_id( key_mod ); + char *strkey = sdlkey_by_id( key_val); + if(key_mod) + vj_msg(VEEJAY_MSG_INFO, "Key binding %s + %s released",strmod,strkey); + else + vj_msg(VEEJAY_MSG_INFO, "Key binding %s released", strkey ); + } +} + +void on_vims_key_clicked( GtkWidget *widget, gpointer user_data) +{ + char which_vims[128]; + sprintf(which_vims, "Press a key to bind VIMS %03d", + info->uc.selected_vims_entry ); + + int n = prompt_keydialog( + which_vims, + "Key combination" ); + + if( n == GTK_RESPONSE_ACCEPT ) + { + int event_id = info->uc.selected_vims_entry; + int key_val = info->uc.pressed_key; + int mod = info->uc.pressed_mod; + char *buf = info->uc.selected_vims_args; + + if( event_id > 0 && key_val > 0 ) + { + multi_vims( + VIMS_BUNDLE_ATTACH_KEY, + "%d %d %d %s", + event_id, key_val, mod, buf ? buf : "dummy" ); + info->uc.reload_hint[HINT_BUNDLES] = 1; + char *strmod = sdlmod_by_id( mod ); + if(strmod) + vj_msg(VEEJAY_MSG_INFO, "VIMS %d attached to key combination %s + %s", + event_id, strmod, sdlkey_by_id( key_val)); + else + vj_msg(VEEJAY_MSG_INFO, "VIMS %d attached to key %s", + event_id, sdlkey_by_id(key_val) ); + } + } +} + + +void on_button_vimsupdate_clicked(GtkWidget *widget, gpointer user_data) +{ + if(count_textview_buffer( "vimsview" ) > 0 ) + { + gchar *buf = get_textview_buffer( "vimsview" ); + + if( info->uc.selected_vims_type == 0 ) + { + multi_vims( VIMS_BUNDLE_ADD, "%d %s", + info->uc.selected_vims_entry, buf ); + } + else + { + multi_vims( + VIMS_BUNDLE_ATTACH_KEY, + "2 %d %d %s", + info->uc.selected_vims_accel[1], + info->uc.selected_vims_accel[0], + info->uc.selected_vims_args ); + } + info->uc.reload_hint[HINT_BUNDLES] = 1; + } + +} + +void on_vims_clear_clicked(GtkWidget *widget, gpointer user_data) +{ + clear_textview_buffer( "vimsview" ); +} + +void on_vims_delete_clicked(GtkWidget *widget, gpointer user_data) +{ + if( info->uc.selected_vims_entry >= VIMS_BUNDLE_START && + info->uc.selected_vims_entry < VIMS_BUNDLE_END ) + { + multi_vims( VIMS_BUNDLE_DEL, "%d", info->uc.selected_vims_entry ); + info->uc.reload_hint[HINT_BUNDLES] = 1; + vj_msg(VEEJAY_MSG_INFO, "Delete bundle %d from VIMS event list", + info->uc.selected_vims_entry ); + } + else + { + vj_msg(VEEJAY_MSG_ERROR, "VIMS %d is not a bundle.", info->uc.selected_vims_entry ); + } +} + +void on_button_saveactionfile_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *filename = dialog_save_file( "Save Bundles"); + if(filename) + { + multi_vims( VIMS_BUNDLE_SAVE, "%d %s",0, filename ); + vj_msg(VEEJAY_MSG_INFO, "Save Bundles and Keybindings to %s", filename ); + g_free(filename); + } +} + +void on_button_loadconfigfile_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *filename = dialog_open_file( "Load liveset / configfile",2); + + if(!filename) + return; + + if( info->run_state == RUN_STATE_REMOTE ) + { + multi_vims( VIMS_BUNDLE_FILE, "%s", filename ); + } + else + { + if(config_file) + g_free(config_file); + config_file = g_strdup( filename ); + config_file_status = 1; + vj_msg(VEEJAY_MSG_INFO, "You can launch Veejay now"); + } +} + +void on_button_saveconfigfile_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *filename = dialog_save_file( "Save liveset / configfile"); + if(filename) + { + multi_vims( VIMS_BUNDLE_SAVE, "%d %s", 1, filename ); + g_free(filename); + } +} + + +void on_button_newbundle_clicked(GtkWidget *widget, gpointer user_data) +{ + if(count_textview_buffer( "vimsview" ) > 0 ) + { + gchar *buf = get_textview_buffer( "vimsview" ); + multi_vims( VIMS_BUNDLE_ADD, "%d %s", 0, buf ); + info->uc.reload_hint[HINT_BUNDLES] = 1; + vj_msg(VEEJAY_MSG_INFO, "If your VIMS document was valid,you'll find it in the list."); + } + else + { + vj_msg(VEEJAY_MSG_ERROR, "VIMS document is empty, type text first."); + } +} + +void on_button_openactionfile_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *filename = dialog_open_file( "Load Bundles",2 ); + if(filename) + { + multi_vims( VIMS_BUNDLE_FILE, "%s", filename ); + g_free( filename ); + info->uc.reload_hint[HINT_BUNDLES] = 1; + vj_msg(VEEJAY_MSG_INFO ,"Tried to load '%s'",filename); + } +} + +void on_button_browse_clicked(GtkWidget *widget, gpointer user_data) +{ + // open file browser for launcher + gchar *filename = dialog_open_file( "Open Videofile or EditList",0 ); + if(filename) + { + put_text( "entry_filename", filename ); + g_free(filename); + } +} + +void on_button_clipcopy_clicked(GtkWidget *widget, gpointer user_data) +{ + if(info->selection_slot) + { + multi_vims( VIMS_SAMPLE_COPY , "%d", + info->selected_slot->sample_id ); + gveejay_new_slot(MODE_SAMPLE); + } +} + +void on_check_priout_fullscreen_clicked( + GtkWidget *widget, gpointer user_data) +{ + gint on = 0; + if(is_button_toggled( "check_priout_fullscreen" ) ) + on = 1; + multi_vims ( VIMS_FULLSCREEN, "%d", on ); +} + + +void on_inputstream_button_clicked(GtkWidget *widget, gpointer user_data) +{ + gint mcast = is_button_toggled( "inputstream_networktype" ); + gchar *remote_ = get_text( "inputstream_remote" ); + gint port = get_nums( "inputstream_portnum" ); + + gsize bw = 0; + gsize br = 0; + + if(!remote_) + { + error_dialog("Error", "Not a valid hostname. Try 'localhost' or '127.0.0.1'"); + GtkWidget *dialog = glade_xml_get_widget_( info->main_window, "inputstream_window" ); + gtk_widget_hide( dialog ); + return; + } + + gchar *remote = g_locale_from_utf8( + remote_ , -1, &br, &bw, NULL ); + + if( !remote || strlen(remote) <= 1 ) + { + GtkWidget *dialog = glade_xml_get_widget_( info->main_window, "inputstream_window" ); + gtk_widget_hide( dialog ); + error_dialog("Error", "Not a valid hostname. Try 'localhost' or '127.0.0.1'"); + return; + } + + remote[strlen(remote)] = '\0'; + + if(bw == 0 || br == 0 || port <= 0 ) + { + GtkWidget *dialog = glade_xml_get_widget_( info->main_window, "inputstream_window" ); + gtk_widget_hide( dialog ); + error_dialog("Error", "You must enter a valid remote address and/or port number"); + return; + } + + + if(mcast) + multi_vims( VIMS_STREAM_NEW_MCAST,"%d %s", port, remote ); + else + multi_vims( VIMS_STREAM_NEW_UNICAST, "%d %s", port, remote ); + + + gveejay_new_slot(MODE_STREAM); + + if(remote) g_free(remote); + + GtkWidget *dialog = glade_xml_get_widget_( info->main_window, "inputstream_window" ); + gtk_widget_hide( dialog ); + +} + +void on_inputstream_filebrowse_clicked(GtkWidget *w, gpointer user_data) +{ + gchar *filename = dialog_open_file( "Open new input stream",3 ); + if(filename) + { + put_text( "inputstream_filename", filename ); + g_free(filename); + } +} +/* +void on_inputstream_file_button_clicked(GtkWidget *w, gpointer user_data) +{ + gint use_y4m = is_button_toggled( "inputstream_filey4m" ); + gint use_ffmpeg = is_button_toggled( "inputstream_fileffmpeg"); + gint use_pic = is_button_toggled( "inputstream_filepixbuf"); + + + gchar *file = get_text( "inputstream_filename" ); + gint br = 0; + gint bw = 0; + gchar *filename = g_locale_from_utf8( file, -1, &br , &bw, NULL ); + if( br == 0 || bw == 0 ) + { + error_dialog("Error", "Please enter a filename"); + return; + } + if(use_y4m) + multi_vims( VIMS_STREAM_NEW_Y4M, "%s", filename ); + if(use_ffmpeg) + multi_vims( VIMS_STREAM_NEW_AVFORMAT, "%s", filename ); +#ifdef USE_GDK_PIXBUF + if(use_pic) + multi_vims( VIMS_STREAM_NEW_PICTURE, "%s", filename); +#endif + + gveejay_new_slot(MODE_STREAM); + + if(filename) g_free( filename ); +}*/ + +void on_samplerand_toggled(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + int arg = is_button_toggled( "freestyle" ); + int start = is_button_toggled( "samplerand" ); + + int vims_id = VIMS_SAMPLE_RAND_START; + if( start == 0 ) + vims_id = VIMS_SAMPLE_RAND_STOP; + + if( vims_id == VIMS_SAMPLE_RAND_START ) + { + multi_vims( vims_id,"%d", arg ); + vj_midi_learning_vims_msg( info->midi,NULL, vims_id, arg ); + } + else + { + single_vims( vims_id ); + vj_midi_learning_vims_simple(info->midi, NULL, vims_id ); + } + + vj_msg(VEEJAY_MSG_INFO, "You should restart the sample randomizer now."); + + } +} + + + +/* + * Handler to open the veejay_connection-dialog via menu + */ +void on_openConnection_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + if(!info->status_lock) + { + GtkWidget *veejay_conncection_window = glade_xml_get_widget(info->main_window, "veejay_connection"); + gtk_widget_show(veejay_conncection_window); + } +} + + +/* + * Handler to close the veejay_connection-dialog + */ +void on_veejay_connection_close (GtkDialog *dialog, + gpointer user_data) +{ + if( info->watch.state == STATE_PLAYING) + { + info->watch.state = STATE_DISCONNECT; + + GtkWidget *w = glade_xml_get_widget_(info->main_window, "veejay_connection" ); + gtk_widget_show( w ); + } + else + gveejay_quit(NULL,NULL); +} + + +/* + * Handler to show the video_settings-dialog via menu + */ +void on_VideoSettings_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + if(!info->status_lock) + { + GtkWidget *veejay_settings_window = glade_xml_get_widget(info->main_window, "video_options"); + gtk_widget_show(veejay_settings_window); + } +} + + + +/* + * Handler to close the video_settings-dialog + */ +void on_video_options_close (GtkDialog *dialog, + gpointer user_data) +{ + if(!info->status_lock) + { + GtkWidget *veejay_settings_window = glade_xml_get_widget(info->main_window, "video_options"); + gtk_widget_hide(veejay_settings_window); + } +} + + +/* + * Handler to apply the settings of the video_settings-dialog + */ +void on_video_options_apply_clicked (GtkButton *button, + gpointer user_data) +{ + gint width = get_nums( "priout_width" ); + gint height = get_nums( "priout_height" ); + gint x = get_nums("priout_x" ); + gint y = get_nums("priout_y" ); + + if( width > 0 && height > 0 ) + { + multi_vims( VIMS_RESIZE_SDL_SCREEN, "%d %d %d %d", + width,height,x , y ); + vj_msg(VEEJAY_MSG_INFO, "Resize Video Window to %dx%d", width,height); + } +} + +/* + * Handler to show the VIMS_Bundles-dialog + */ +void on_vims_bundles_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + if(!info->status_lock) + { + GtkWidget *vims_bundles_window = glade_xml_get_widget(info->main_window, "vims_bundles"); + gtk_widget_show(vims_bundles_window); + } +} + + +/* + * Handler to close the VIMS_Bundles-dialog + */ +void on_vims_bundles_close (GtkDialog *dialog, + gpointer user_data) +{ + if(!info->status_lock) + { + GtkWidget *vims_bundles_window = glade_xml_get_widget(info->main_window, "vims_bundles"); + gtk_widget_hide(vims_bundles_window); + } +} + +/* Menu entries */ +void on_quit1_activate( GtkWidget *w, gpointer user_data ) +{ + gveejay_quit(NULL,NULL); +} +/* depending on the state, we either load an action file or a sample list !*/ +void on_open2_activate( GtkWidget *w, gpointer user_data) +{ + gchar *filename = NULL; + switch( info->watch.state ) + { + case STATE_STOPPED: + filename = dialog_open_file( "Open Action file / Liveset",2 ); + if(filename) + { + if(config_file) + g_free(config_file); + config_file = g_strdup( filename ); + config_file_status = 1; + g_free(filename); + } + break; + case STATE_PLAYING: + filename = dialog_open_file( "Open Samplelist ",1); + if(filename) + { + single_vims( VIMS_SET_PLAIN_MODE ); + single_vims( VIMS_SAMPLE_DEL_ALL ); + multi_vims( VIMS_SAMPLE_LOAD_SAMPLELIST, "%s", filename); + g_free(filename); + } + break; + default: + vj_msg(VEEJAY_MSG_INFO, "Invalid state !"); + break; + } +} +void on_save1_activate( GtkWidget *w, gpointer user_data ) +{ + if(info->watch.state == STATE_PLAYING) + on_button_samplelist_save_clicked( NULL, NULL ); + else + vj_msg(VEEJAY_MSG_ERROR, "Nothing to save (start or connect to veejay first)"); +} +void on_about1_activate(GtkWidget *widget, gpointer user_data) +{ + about_dialog(); +} +void on_new_input_stream1_activate(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *dialog = glade_xml_get_widget_( info->main_window, "inputdialog" ); + gtk_dialog_run( GTK_DIALOG( dialog )); + gtk_widget_hide( dialog ); +} + +void on_istream_cancel_clicked(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *dialog = glade_xml_get_widget_( info->main_window, "inputdialog" ); + gtk_widget_hide( dialog ); +} + +void on_curve_togglerun_toggled(GtkWidget *widget , gpointer user_data) +{ +} + +void on_stream_length_value_changed( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + multi_vims( VIMS_STREAM_SET_LENGTH, "%d", get_nums("stream_length") ); +} + +int on_curve_buttontime_clicked() +{ + return 1; +} + + +void on_framerate_inc_clicked( GtkWidget *w, gpointer data ) +{ + double cur = get_slider_val( "framerate" ); + cur += 1.0; + update_slider_value( "framerate", (int) cur, 0 ); +} + +void on_framerate_dec_clicked( GtkWidget *w, gpointer data ) +{ + double cur = get_slider_val( "framerate" ); + cur -= 1.0; + update_slider_value( "framerate", (int) cur, 0 ); +} + + +void on_frameratenormal_clicked( GtkWidget *w, gpointer data ) +{ + update_slider_value( "framerate", (int) info->el.fps,0 ); +} + +void on_framerate_value_changed( GtkWidget *w, gpointer data ) +{ + gdouble slider_val = GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value; + int value = (int)(100.0 * slider_val); + multi_vims( VIMS_FRAMERATE, "%d", value ); + vj_midi_learning_vims_simple( info->midi, "framerate", VIMS_FRAMERATE ); +} + +void on_sync_correction_clicked( GtkWidget *w, gpointer data ) +{ + int status = is_button_toggled( "sync_correction" ); + + multi_vims( VIMS_SYNC_CORRECTION, "%d", status ); + vj_midi_learning_vims_msg( info->midi, NULL, VIMS_SYNC_CORRECTION, status ); +} + +void on_curve_buttonstore_clicked(GtkWidget *widget, gpointer user_data ) +{ + int i = info->uc.selected_chain_entry; + int j = info->uc.selected_parameter_id; + int id = info->uc.entry_tokens[ENTRY_FXID]; + + int end = get_nums( "curve_spinend" ); + int start = get_nums( "curve_spinstart" ); + + + if( (end - start) <= 0 || id <= 0 ) + { + if( id <= 0 ) + vj_msg(VEEJAY_MSG_INFO, "No FX set on entry %d",i); + else + vj_msg(VEEJAY_MSG_INFO, "Length of animation is 0"); + return; + } + + GtkWidget *curve = glade_xml_get_widget_( info->main_window, "curve"); + + int type = 0; + if( is_button_toggled( "curve_typelinear" ) ) { + type = GTK_CURVE_TYPE_LINEAR; + } else if ( is_button_toggled( "curve_typespline" ) ) { + type = GTK_CURVE_TYPE_SPLINE; + } else if ( is_button_toggled( "curve_typefreehand" ) ) { + type = GTK_CURVE_TYPE_FREE; + } + + int len = end - start; + float *data = (float*) vj_calloc(sizeof(float) * len ); + int *values = (int*) vj_calloc(sizeof(int) * len ); + unsigned char *kf = (unsigned char*) vj_calloc( (len*4)+25); + int min=0,max=0; + + _effect_get_minmax( id, &min,&max,j ); + + int k; + + get_points_from_curve( curve, len, data ); + for( k = 0 ; k < len ; k++ ) + values[k] = ( (int) ( data[k] * max )); + + int total_len = 25 + (4 * len); + sprintf( (char*)kf, "key%02d%02d%08d%08d%02d",i,j,start,end,type ); + unsigned char *ptr = kf + 25; + for( k = 0; k < len; k ++ ) + { + unsigned char *p = ptr + (k*4); + p[0] = values[k] & 0xff; + p[1] = (values[k] >> 8) & 0xff; + p[2] = (values[k] >> 16) & 0xff; + p[3] = (values[k] >> 24) & 0xff; + } + + free(values); + free(data); + + vj_client_send_bufX( info->client, V_CMD, kf,total_len ); + free(kf); + + vj_msg( VEEJAY_MSG_INFO, "Saved new animation for parameter %d on entry %d, start at frame %d and end at frame %d",j,i,start,end ); + + +} + +void on_curve_buttonclear_clicked(GtkWidget *widget, gpointer user_data) +{ + gint id = info->status_tokens[ENTRY_FXID]; + if( id < 0 ) + id = 0; + int i = info->uc.selected_chain_entry; + GtkWidget *curve = glade_xml_get_widget_( info->main_window, "curve"); + reset_curve( curve ); + + multi_vims( VIMS_SAMPLE_KF_RESET, "%d", i ); +} + +void on_curve_typelinear_toggled(GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("curve_typelinear")) + { + sample_slot_t *s = info->selected_slot; + if(!s) + return; + GtkWidget *curve = glade_xml_get_widget_( info->main_window, "curve"); + set_points_in_curve( GTK_CURVE_TYPE_LINEAR, curve ); + } +} +void on_curve_typespline_toggled(GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("curve_typespline")) + { + sample_slot_t *s = info->selected_slot; + if(!s) + return; + GtkWidget *curve = glade_xml_get_widget_( info->main_window, "curve"); + set_points_in_curve( GTK_CURVE_TYPE_SPLINE, curve ); + } +} +void on_curve_typefreehand_toggled(GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + if( is_button_toggled("curve_typefreehand")) + { + sample_slot_t *s = info->selected_slot; + if(!s) + return; + GtkWidget *curve = glade_xml_get_widget_( info->main_window, "curve"); + set_points_in_curve( GTK_CURVE_TYPE_FREE, curve ); + } + +} + +void on_curve_toggleentry_toggled( GtkWidget *widget, gpointer user_data) +{ + int k = is_button_toggled( "curve_toggleentry" ); + GtkTreeModel *model = gtk_tree_view_get_model( GTK_TREE_VIEW(glade_xml_get_widget_( + info->main_window, "tree_chain") )); + + gtk_tree_model_foreach( + model, + chain_update_row, (gpointer*) info ); + + info->uc.reload_hint[HINT_ENTRY] = 1; + if(info->status_lock) + return; + + int i = info->uc.selected_chain_entry; + multi_vims( VIMS_SAMPLE_KF_STATUS, "%d %d", i, k ); +} + +void on_kf_p0_toggled( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + if(is_button_toggled("kf_p0")) + kf_changed( 0 ); +} +void on_kf_p1_toggled( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("kf_p1")) + kf_changed( 1 ); +} +void on_kf_p2_toggled( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("kf_p2")) + kf_changed( 2 ); +} +void on_kf_p3_toggled( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("kf_p3")) + kf_changed( 3 ); +} +void on_kf_p4_toggled( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("kf_p4")) + kf_changed( 4 ); +} +void on_kf_p5_toggled( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("kf_p5")) + kf_changed( 5 ); +} +void on_kf_p6_toggled( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("kf_p6")) + kf_changed( 6 ); +} +void on_kf_p7_toggled( GtkWidget *widget, gpointer user_data) +{ + if(info->status_lock) + return; + + if( is_button_toggled("kf_p7")) + kf_changed( 7 ); +} + +void on_curve_toggleglobal_toggled(GtkWidget *widget, gpointer user_data) +{ +} +void on_button_videobook_clicked(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *n = glade_xml_get_widget_( info->main_window, "videobook" ); + // set page 1 from notebook panels + gint page = gtk_notebook_get_current_page( GTK_NOTEBOOK(n) ); + if(page == 1 ) + gtk_notebook_prev_page(GTK_NOTEBOOK(n) ); + if(info->selected_slot) + { + /* Only if we are not playing it */ + if(info->status_tokens[PLAY_MODE] != + info->selected_slot->sample_type && + info->status_tokens[CURRENT_ID] != + info->selected_slot->sample_id ) + multi_vims( VIMS_SET_MODE_AND_GO, "%d %d", + info->selected_slot->sample_type, + info->selected_slot->sample_id ); + vj_midi_learning_vims_msg2( info->midi, NULL, VIMS_SET_MODE_AND_GO, + info->selected_slot->sample_type, + info->selected_slot->sample_id ); + } +} + +void on_samplepage_clicked(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *n = glade_xml_get_widget_( info->main_window, "panels" ); + + gint page = gtk_notebook_get_current_page( GTK_NOTEBOOK(n) ); + + gint page_needed = 2; + + switch( info->status_tokens[PLAY_MODE] ) + { + case MODE_SAMPLE: + page_needed =0 ; break; + case MODE_STREAM: + page_needed = 1; break; + case MODE_PLAIN: + page_needed = 2; break; + default: + break; + } + + if( page_needed != page ) + gtk_notebook_set_page( + GTK_NOTEBOOK(n), + page_needed ); +} + +void on_timeline_cleared(GtkWidget *widget, gpointer user_data) +{ + multi_vims( VIMS_SAMPLE_CLEAR_MARKER, "%d", 0 ); + vj_midi_learning_vims_msg( info->midi, NULL, VIMS_SAMPLE_CLEAR_MARKER, 0 ); +} + +void on_timeline_bind_toggled( GtkWidget *widget, gpointer user_data) +{ +// gboolean toggled = timeline_get_bind( TIMELINE_SELECTION(widget)) ; +// set_toggle_button( "check_marker_bind", (toggled ? 1 :0) ); +} + +void on_timeline_value_changed( GtkWidget *widget, gpointer user_data ) +{ + if(!info->status_lock) + { + gdouble pos = timeline_get_pos( TIMELINE_SELECTION(widget) ); + multi_vims( VIMS_VIDEO_SET_FRAME, "%d", (gint)pos ); + } +} + +void on_timeline_out_point_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + + gdouble pos1 = timeline_get_in_point( TIMELINE_SELECTION(widget) ); + gdouble pos2 = timeline_get_out_point( TIMELINE_SELECTION(widget) ); + pos1 *= info->status_tokens[TOTAL_FRAMES]; + pos2 *= info->status_tokens[TOTAL_FRAMES]; + if(pos2 > pos1 ) + { + multi_vims( VIMS_SAMPLE_SET_MARKER , "%d %d %d", 0,(gint) pos1, (gint) pos2 ); + gchar *dur = format_time( pos2 - pos1,info->el.fps ); + update_label_str( "label_markerduration", dur ); + g_free(dur); + } + else + vj_msg(VEEJAY_MSG_INFO, "Set Out point after In point !"); + + + } +} + +void on_timeline_in_point_changed(GtkWidget *widget, gpointer user_data) +{ + if(!info->status_lock) + { + gdouble pos1 = timeline_get_in_point( TIMELINE_SELECTION(widget) ); + gdouble pos2 = timeline_get_out_point( TIMELINE_SELECTION(widget) ); + pos1 *= info->status_tokens[TOTAL_FRAMES]; + pos2 *= info->status_tokens[TOTAL_FRAMES]; + if(pos1 < pos2 ) + { + multi_vims( VIMS_SAMPLE_SET_MARKER , "%d %d %d", 0, (gint) pos1, (gint) pos2 ); + gchar *dur = format_time( pos2 - pos1,info->el.fps ); + update_label_str( "label_markerduration", dur ); + g_free(dur); + } + else + vj_msg(VEEJAY_MSG_INFO,"Set In Point before Out Point !"); + } +} + +void on_sampleadd_clicked(GtkWidget *widget, gpointer user_data) +{ + gchar *filename = dialog_open_file( "Add videofile as new sample",0 ); + if(filename) + { + int sample_id = 0; // new sample + int result_len = 0; + multi_vims( VIMS_EDITLIST_ADD_SAMPLE, "%d %s", 0, filename ); + + gchar *result = recv_vims( 3, &result_len ); + if( result <= 0||result == NULL ) + { + gveejay_popup_err( "Error", "Cannot open video file. Please check Veejay's console to find out why"); + } + else + { + sscanf( result, "%5d", &sample_id ); + if(sample_id <= 0) + gveejay_popup_err( "Error", "Cannot open video file. Please check Veejay's console to find out why"); + else + vj_msg(VEEJAY_MSG_INFO, "Created new sample %d from file %s", sample_id, filename); + g_free(result); + } + g_free(filename ); + } +} + +void on_streamnew_clicked(GtkWidget *widget, gpointer user_data) +{ + // inputstream_window + GtkWidget *w = glade_xml_get_widget(info->main_window, "inputstream_window"); + scan_devices( "tree_v4ldevices" ); + gtk_widget_show(w); + +} + +void on_inputstream_close_clicked(GtkWidget *w, gpointer user_data) +{ + GtkWidget *wid = glade_xml_get_widget(info->main_window, "inputstream_window"); + gtk_widget_hide(wid); +} + +void on_button_sdlclose_clicked(GtkWidget *w, gpointer user_data) +{ + multi_vims( VIMS_RESIZE_SDL_SCREEN, "%d %d %d %d", + 0,0,0,0 ); + +} + + +void on_quicklaunch_clicked(GtkWidget *widget, gpointer user_data) +{ + if( info->watch.state == STATE_STOPPED ) + { + vj_fork_or_connect_veejay( config_file ); + // GtkWidget *w = glade_xml_get_widget(info->main_window, "veejay_connection"); + // gtk_widget_show(w); + } +} + +static void _update_vs() +{ + if( info->config.norm == 0 ) + { + update_spin_value( "vs_size0", 720 ); + update_spin_value( "vs_size1", 576 ); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON( glade_xml_get_widget_( info->main_window, "vs_fps" ) ), 25.0 ); + } + else + { + update_spin_value( "vs_size0", 720 ); + update_spin_value( "vs_size1", 480 ); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON( glade_xml_get_widget_( info->main_window, "vs_fps" ) ), 29.97 ); + } + set_toggle_button( "vs_custom", 0 ); +} + +void on_vs_pal_toggled( GtkWidget *w, gpointer user_data ) +{ + info->config.norm = is_button_toggled( "vs_pal" ) ? 0 : 1; + _update_vs(); +} +void on_vs_ntsc_toggled( GtkWidget *w , gpointer user_data) +{ + info->config.norm = is_button_toggled( "vs_ntsc" ) ? 1 :0; + _update_vs(); +} +void on_vs_custom_toggled( GtkWidget *w, gpointer user_data) +{ + if(is_button_toggled( "vs_custom" )) + enable_widget( "vs_frame"); + else + disable_widget( "vs_frame"); +} + +static void _rgroup_audio(void) +{ + if(is_button_toggled( "vs_noaudio")) + info->config.audio_rate = 0; + else + { + if(is_button_toggled("vs_audio44") ) + info->config.audio_rate = 48000; + else + info->config.audio_rate = 44000; + } +} + +void on_vs_audio48_toggled(GtkWidget *w, gpointer user_data) +{ + _rgroup_audio(); +} + +void on_vs_audio44_toggled(GtkWidget *w, gpointer user_data) +{ + _rgroup_audio(); +} +void on_vs_noaudio_toggled(GtkWidget *w, gpointer user_data) +{ + _rgroup_audio(); +} +void on_vs_avsync_toggled(GtkWidget *w, gpointer user_data) +{ + info->config.sync = is_button_toggled( "vs_avsync" ); +} +void on_vs_avtimer_toggled(GtkWidget *w, gpointer user_data) +{ + info->config.timer = is_button_toggled( "vs_avtimer" ); +} +void on_vs_deinter_toggled(GtkWidget *w, gpointer user_data) +{ + info->config.deinter = is_button_toggled( "vs_deinter" ); +} +void on_vs_yuv420_toggled( GtkWidget *w , gpointer user_data) +{ + if( is_button_toggled( "vs_yuv420" )) + info->config.pixel_format = 0; +} +void on_vs_yuv422_toggled( GtkWidget *w, gpointer user_data) +{ + if( is_button_toggled("vs_yuv422") ) + info->config.pixel_format = 1; +} +void on_vs_sample0_toggled( GtkWidget *w , gpointer user_data) +{ + if( is_button_toggled("vs_sample0")) + info->config.sampling = 1; +} +void on_vs_sample1_toggled( GtkWidget *w, gpointer user_data) +{ + if( is_button_toggled("vs_sample1")) + info->config.sampling = 0; +} +void on_vs_size0_value_changed(GtkWidget *w, gpointer user_data) +{ + info->config.w = get_nums( "vs_size0"); +} +void on_vs_size1_value_changed(GtkWidget *w, gpointer user_data) +{ + info->config.h = get_nums( "vs_size1"); +} +void on_vs_fps_value_changed(GtkWidget *w, gpointer user_data) +{ + info->config.fps = get_numd( "vs_fps"); +} +void on_vs_close_clicked( GtkWidget *w, gpointer user_data) +{ + GtkWidget *vs = glade_xml_get_widget(info->main_window, "vs"); + gtk_widget_hide(vs); +} + +void on_vs_mcastosc_toggle_toggled( GtkWidget *w, gpointer user_data) +{ + info->config.osc = is_button_toggled( "vs_mcastosc_toggle" ); + if(info->config.osc) + { + if(info->config.mcast_osc) + g_free( info->config.mcast_osc ); + info->config.mcast_osc = get_text( "vs_mcastvims" ); + } + +} +void on_vs_mcastvims_toggle_toggled(GtkWidget *w, gpointer user_data) +{ + info->config.vims = is_button_toggled( "vs_mcastvims_toggle" ); + if(info->config.vims) + { + if(info->config.mcast_vims) + g_free( info->config.mcast_vims ); + info->config.mcast_vims = get_text( "vs_mcastvims" ); + } +} + +void on_vs_mcastosc_changed( GtkWidget *w, gpointer user_data) +{ +// if(info->config.mcast_osc) +// g_free(info->config.mcast_osc); +// info->config.mcast_osc = get_text( "vs_mcastosc" ); +} +void on_vs_mcastvims_changed( GtkWidget *w, gpointer user_data) +{ +// if(info->config.mcast_vims) +// g_free(info->config.mcast_vims); +// info->config.mcast_vims = get_text( "vs_mcastvims" ); +} + +void on_inputstream_window_delete_event(GtkWidget *w, gpointer user_data) +{ + GtkWidget *vs = glade_xml_get_widget(info->main_window, "inputstream_window"); + gtk_widget_hide(vs); +} + +void on_vs_delete_event( GtkWidget *w, gpointer user_data) +{ + GtkWidget *vs = glade_xml_get_widget(info->main_window, "vs"); + gtk_widget_hide(vs); +} +void on_configure1_activate( GtkWidget *w, gpointer user_data) +{ + GtkWidget *vs = glade_xml_get_widget(info->main_window, "vs"); +/* load options from config */ + + update_spin_value( "vs_size0", info->config.w ); + update_spin_value( "vs_size1", info->config.h ); + update_spin_value( "vs_fps", info->config.fps ); + + set_toggle_button( "vs_avsync", info->config.sync ); + set_toggle_button( "vs_avtimer", info->config.timer ); + set_toggle_button( "vs_deinter", info->config.deinter ); + if(info->config.pixel_format == 0) + set_toggle_button( "vs_yuv420", 1 ); + else + set_toggle_button( "vs_yuv422", 1 ); + + if(info->config.sampling == 1 ) + set_toggle_button( "vs_sample0", 1 ); + else + set_toggle_button( "vs_sample1", 1 ); + if(info->config.norm == 0 && info->config.w == 720 && info->config.h == 576 ) + set_toggle_button( "vs_pal", 1 ); + else + { + if(info->config.norm == 1 && info->config.w == 720 && info->config.h == 480 ) + set_toggle_button( "vs_ntsc", 1 ); + else + set_toggle_button( "vs_custom", 1 ); + } + + if( is_button_toggled( "vs_custom" )) + enable_widget( "vs_frame" ); + else + disable_widget( "vs_frame" ); + + if( info->config.audio_rate == 0 ) + set_toggle_button( "vs_noaudio" , 1 ); + else + { + if( info->config.audio_rate == 44000 ) + set_toggle_button( "vs_audio44" , 1 ); + else + set_toggle_button( "vs_audio48", 1 ); + } + + /* set osc , vims mcast */ + if(info->config.mcast_osc) + put_text( "vs_mcastosc", info->config.mcast_osc ); + if(info->config.mcast_vims) + put_text( "vs_mcastvims", info->config.mcast_vims ); + set_toggle_button( "vs_mcastosc_toggle", info->config.osc ); + set_toggle_button( "vs_mcastvims_toggle", info->config.vims ); + + gtk_widget_show(vs); +} + +void on_quit_veejay1_activate( GtkWidget *w, gpointer user_data) +{ + veejay_quit(); +} + +void on_curve_spinend_value_changed(GtkWidget *w, gpointer user_data) +{ + int end_pos = get_nums( "curve_spinend" ); + gchar *end_time = format_time( + end_pos,info->el.fps ); + update_label_str( "curve_endtime", end_time ); + g_free(end_time); +} + +void on_curve_spinstart_value_changed(GtkWidget *w, gpointer user_data) +{ + int start_pos = get_nums( "curve_spinstart" ); + + gchar *start_time = format_time( + start_pos,info->el.fps ); + update_label_str( "curve_endtime", start_time ); + g_free(start_time); +} + +void on_veejayevent_enter_notify_event(GtkWidget *w, gpointer user_data) +{ + info->key_now = TRUE; +} +void on_veejayevent_leave_notify_event(GtkWidget *w , gpointer user_data) +{ + info->key_now = FALSE; +} + +void on_spin_framedelay_value_changed(GtkWidget *w, gpointer user_data) +{ + if( info->status_lock ) + return; + + multi_vims(VIMS_VIDEO_SET_SLOW, "%d", get_nums("spin_framedelay")); + + vj_midi_learning_vims_spin( info->midi, "framedelay", VIMS_VIDEO_SET_SLOW ); +} + +void on_mixing_effects_toggled(GtkWidget *w, gpointer user_data) +{ + GtkWidget *n = glade_xml_get_widget_( info->main_window, "effectspanel" ); + gint page = gtk_notebook_get_current_page( GTK_NOTEBOOK(n) ); + if(page == 1) + gtk_notebook_prev_page( GTK_NOTEBOOK(n) ); + +} + +void on_image_effects_toggled(GtkWidget *w, gpointer user_data) +{ + GtkWidget *n = glade_xml_get_widget_( info->main_window, "effectspanel" ); + gint page = gtk_notebook_get_current_page( GTK_NOTEBOOK(n) ); + if(page == 0) + gtk_notebook_next_page( GTK_NOTEBOOK(n) ); + +} + +void on_console1_activate(GtkWidget *w, gpointer user_data) +{ + GtkWidget *n = glade_xml_get_widget_( info->main_window, "panels" ); + gint page = gtk_notebook_get_current_page( GTK_NOTEBOOK( n ) ); + + if( page == MODE_PLAIN ) + gtk_notebook_set_page( GTK_NOTEBOOK(n), + info->status_tokens[PLAY_MODE] ); + else + gtk_notebook_set_page( GTK_NOTEBOOK(n), + MODE_PLAIN ); +} + +gboolean on_entry_hostname_focus_in_event( GtkWidget *w, gpointer user_data) +{ + update_label_str( "runlabel", "Connect"); + return FALSE; +} + +gboolean on_entry_hostname_focus_out_event( GtkWidget *w, gpointer user_data) +{ +// update_label_str( "runlabel", "Run" ); + return FALSE; +} + + +gboolean on_entry_filename_focus_in_event( GtkWidget *w, gpointer user_data) +{ +// update_label_str( "runlabel", "Run" ); + return FALSE; +} + +void on_previewbw_toggled( GtkWidget *w , gpointer user_data) +{ + single_vims( VIMS_PREVIEW_BW ); + vj_midi_learning_vims_simple(info->midi,NULL,VIMS_PREVIEW_BW); +} + +void on_previewtoggle_toggled(GtkWidget *w, gpointer user_data) +{ + if(!info->preview_locked) + { + multitrack_toggle_preview( info->mt, -1, is_button_toggled("previewtoggle"), + glade_xml_get_widget(info->main_window, "imageA") ); + } + else { + multitrack_toggle_preview( info->mt, -1, 1, glade_xml_get_widget(info->main_window,"imageA")); //@ enable + } + setup_samplebank( NUM_SAMPLES_PER_COL, NUM_SAMPLES_PER_ROW ); +} + +void on_previewspeed_value_changed( GtkWidget *widget, gpointer user_data) +{ +} + +void on_previewscale_value_changed( GtkWidget *widget, gpointer user_data) +{ +} + +void on_preview_width_value_changed( GtkWidget *w, gpointer user_data) +{ +} +void on_preview_height_value_changed( GtkWidget *w, gpointer user_data) +{ +} + +void on_mt_new_activate( GtkWidget *w, gpointer user_data) +{ + multitrack_add_track( info->mt ); +} + +void on_mt_delete_activate( GtkWidget *w, gpointer user_data) +{ + multitrack_close_track( info->mt ); +} + + + +void on_mt_sync_start_clicked( GtkWidget *w, gpointer user_data) +{ + multitrack_sync_start( info->mt ); +} + +void on_mt_sync_stop_clicked( GtkWidget *w , gpointer user_data) +{ + multitrack_sync_simple_cmd( info->mt, VIMS_VIDEO_PLAY_STOP,0 ); +} +void on_mt_sync_play_clicked( GtkWidget *w, gpointer user_data) +{ + multitrack_sync_simple_cmd( info->mt, VIMS_VIDEO_PLAY_FORWARD,0 ); +} +void on_mt_sync_backward_clicked( GtkWidget *w, gpointer user_data) +{ + multitrack_sync_simple_cmd( info->mt, VIMS_VIDEO_PLAY_BACKWARD,0); +} +void on_mt_sync_gotostart_clicked( GtkWidget *w, gpointer user_data) +{ + multitrack_sync_simple_cmd( info->mt, VIMS_VIDEO_GOTO_START,0 ); +} +void on_mt_sync_gotoend_clicked( GtkWidget *w, gpointer user_data) +{ + multitrack_sync_simple_cmd( info->mt, VIMS_VIDEO_GOTO_END,0 ); +} +void on_mt_sync_decspeed_clicked( GtkWidget *w, gpointer user_data) +{ + int n = info->status_tokens[SAMPLE_SPEED]; + if( n < 0 ) n += 1; + if( n > 0 ) n -= 1; + multitrack_sync_simple_cmd2( info->mt, VIMS_VIDEO_SET_SPEED, n ); + +} +void on_mt_sync_incspeed_clicked( GtkWidget *w, gpointer user_data) +{ + int n = info->status_tokens[SAMPLE_SPEED]; + if( n < 0 ) n -= 1; + if( n > 0 ) n += 1; + multitrack_sync_simple_cmd2( info->mt, VIMS_VIDEO_SET_SPEED, n ); +} +void on_mt_sync_prev_clicked( GtkWidget *w , gpointer user_data) +{ + multitrack_sync_simple_cmd( info->mt, VIMS_VIDEO_PREV_FRAME ,0 ); +} +void on_mt_sync_next_clicked( GtkWidget *w, gpointer user_data) +{ + multitrack_sync_simple_cmd( info->mt, VIMS_VIDEO_SKIP_FRAME, 0 ); +} + +void on_delete1_activate(GtkWidget *w, gpointer user_data) +{ +} +void on_new_source1_activate( GtkWidget *w , gpointer data ) +{ +} +void on_add_file1_activate(GtkWidget *w, gpointer user_data) +{ +} +void on_colorselection_color_changed( GtkWidget *w, gpointer user_data) +{ +} +static +gchar *get_clipboard_fx_buffer() +{ + int len = 0; + int p[16]; + int i; + for(i=0; i <16;i++) + p[i] = 0; + multi_vims( VIMS_CHAIN_GET_ENTRY, "%d %d", 0, + info->uc.selected_chain_entry ); + + gchar *answer = recv_vims(3,&len); + if(len <= 0 || answer == NULL ) + { + gveejay_popup_err( "Error", "Nothing in FX clipboard"); + + if(answer) g_free(answer); + return NULL; + } + + i = sscanf( answer, "%d %d %d %d %d %d %d %d %d %d %d", + &p[0], //fx id + &p[1], //2 video + &p[2], //n params + &p[3], //p0 + &p[4], //p1 + &p[5], //p2 + &p[6], //p3 + &p[7],//p4 + &p[8],//p5 + &p[9],//p6 + &p[10] //p7 + ); + + char preset[512]; + sprintf(preset, "%d", p[0]); + for(i=0; i < p[2] ;i++) + { + char tmp[10]; + sprintf(tmp, " %d", p[3+i] ); + strcat( preset,tmp); + } + g_free(answer); + return strdup(preset); +} + +static gchar* last_fx_buf = NULL; +void on_button_fx_cut_clicked( GtkWidget *w, gpointer user_data) +{ + if(last_fx_buf) + free(last_fx_buf); + + last_fx_buf = get_clipboard_fx_buffer(); + + on_button_fx_del_clicked( NULL,NULL ); +} + +void on_button_fx_paste_clicked( GtkWidget *w, gpointer user_data) +{ + int i = info->uc.selected_chain_entry; + sample_slot_t *s = info->selected_slot; + + if( last_fx_buf && s) + { + char msg[256]; + sprintf( msg, "%03d:%d %d %s;", + VIMS_CHAIN_ENTRY_SET_PRESET, + s->sample_id, + i, + last_fx_buf ); + msg_vims(msg); + info->uc.reload_hint[HINT_ENTRY]=1; + } + + +} +void on_button_fx_copy_clicked(GtkWidget *w, gpointer user_data) +{ + if(last_fx_buf) + free(last_fx_buf); + + last_fx_buf = get_clipboard_fx_buffer(); +} +void on_copy1_activate( GtkWidget *w, gpointer user_data) +{ +} +void on_new_color1_activate(GtkWidget *w , gpointer user_data) +{ +} +void on_delete2_activate( GtkWidget *w, gpointer user_data) +{ +} +void +on_spin_samplebank_select_value_changed + (GtkSpinButton *spinbutton, + gpointer user_data) +{ + GtkNotebook *samplebank = GTK_NOTEBOOK( info->sample_bank_pad ); + + gint max_page = gtk_notebook_get_n_pages(samplebank); + + gint page = gtk_spin_button_get_value_as_int(spinbutton); + + if(page >= max_page){ /* @mvh I know this is not pretty but why make it difficult */ + page = 0; + gtk_spin_button_set_value(spinbutton, page); + }//if + gtk_notebook_set_current_page(samplebank, page); +} +void +on_button_samplebank_prev_clicked (GtkButton *button, + gpointer user_data) +{ + GtkNotebook *samplebank = GTK_NOTEBOOK( info->sample_bank_pad ); + gtk_notebook_prev_page(samplebank); +} + + +void +on_button_samplebank_next_clicked (GtkButton *button, + gpointer user_data) +{ + GtkNotebook *samplebank = GTK_NOTEBOOK( info->sample_bank_pad ); + gtk_notebook_next_page(samplebank); +} + +void +on_vims_messenger_rewind_clicked( GtkButton *togglebutton, gpointer user_data) +{ + info->vims_line = 0; +} + +void +on_vims_messenger_clear_clicked( GtkButton *togglebutton, gpointer user_data) +{ + clear_textview_buffer( "vims_messenger_textview"); +} + +void +on_vims_messenger_single_clicked( void ) +{ + GtkTextView *t= GTK_TEXT_VIEW(GTK_WIDGET( + glade_xml_get_widget( + info->main_window, + "vims_messenger_textview")) + ); + + GtkTextBuffer* buffer = gtk_text_view_get_buffer(t); + int lc = gtk_text_buffer_get_line_count(buffer); + + if(info->vims_line > lc ) + info->vims_line = 0; + + while(info->vims_line < lc ) + { + GtkTextIter start, end; + gtk_text_buffer_get_iter_at_line(buffer, &start, info->vims_line); + + end = start; + + gtk_text_iter_forward_sentence_end(&end); + gchar *str = gtk_text_buffer_get_text (buffer, &start, &end, TRUE); + + info->vims_line++; + + if(str[0] != '+') + { + vj_msg(VEEJAY_MSG_INFO, "User defined VIMS message sent '%s'",str ); + msg_vims( str ); + break; + } + } +} + +static void srt_load_subtitle(int sid) +{ + gint len = 0; + gint seq_id = 0; + gint tc1l=0; + gint tc2l=0; + char tc1[20]; + char tc2[20]; + char tmp[1000]; + gint tlen=0; + gint ln[4]; + gint fg[4]; + gint bg[4]; + gint use_bg = 0; + gint outline = 0; + gint size = 0; + gint font = 0; + gint x =0; + gint y = 0; + + multi_vims( VIMS_SRT_INFO, "%d", sid ); + gchar *text = recv_vims( 6,&len ); + veejay_memset(tmp,0,sizeof(tmp)); + veejay_memset(tc1,0,sizeof(tc1)); + veejay_memset(tc2,0,sizeof(tc2)); + + clear_textview_buffer( "textview_text" ); + int s1=0,s2=0; + int n = 0; + if(text && len > 0 ) + { + sscanf( text,"%5d%9d%9d%2d", &seq_id ,&s1,&s2,&tc1l ); + strncpy( tc1, text+7+18,tc1l ); + sscanf( text+7+18+tc1l,"%2d", &tc2l ); + strncpy( tc2, text+7+18+tc1l + 2, tc2l ); + sscanf( text+7+18+tc1l+2+tc2l, "%3d", &tlen ); + strncpy( tmp, text + 7 + 18 + tc1l + 2 + tc2l + 3, tlen ); + n = sscanf( text+7+18 + tc1l+2+tc2l+3+tlen,"%04d%04d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d", + &x,&y, &font, &size, &bg[0],&bg[1],&bg[2],&fg[0],&fg[1],&fg[2],&use_bg,&outline,&ln[0],&ln[1], + &ln[2],&bg[3],&fg[3],&ln[3] ); +#ifdef STRICT_CHECKING + assert( n == 18 ); +#endif + } + + srt_locked_ = 1; + + update_spin_range( "spin_text_start",0, get_total_frames(),s1); + update_spin_range( "spin_text_end",0, get_total_frames(),s2); + + set_textview_buffer( "textview_text", tmp ); + + update_spin_value( "spin_text_start" ,s1); + update_spin_value( "spin_text_end", s2 ); + + change_box_color_rgb( + glade_xml_get_widget(info->main_window, "boxbg" ), + bg[0],bg[1],bg[2],bg[3], (is_button_toggled( "textcolorbg" ) ? 1 : 0 ) ); + + change_box_color_rgb( + glade_xml_get_widget(info->main_window, "boxtext" ), + fg[0],fg[1],fg[2],fg[3], (is_button_toggled( "textcolorfg" ) ? 1: 0) ); + + + change_box_color_rgb( + glade_xml_get_widget( info->main_window, "boxln" ), + ln[0],ln[1],ln[2],ln[3], (is_button_toggled( "textcolorln" ) ? 1: 0) ); + + memcpy( bg_, bg, sizeof(bg_)); + memcpy( fg_, fg, sizeof(fg_)); + memcpy( ln_, ln, sizeof(ln_)); + + set_toggle_button( "use_bg", use_bg ); + set_toggle_button( "use_outline", outline); + update_spin_value( "spin_text_size", size ); + update_spin_value( "spin_text_x", x ); + update_spin_value( "spin_text_y", y ); + + if(is_button_toggled( "textcolorfg") ) + { + update_slider_value( "textcolorred", fg_[0],0 ); + update_slider_value( "textcolorblue",fg_[2],0 ); + update_slider_value( "textcolorgreen",fg_[1],0); + update_slider_value( "textcoloralpha", fg_[3],0); + } + else if( is_button_toggled( "textcolorbg") ) + { + update_slider_value( "textcolorred", bg_[0],0 ); + update_slider_value( "textcolorblue",bg_[2],0 ); + update_slider_value( "textcolorgreen",bg_[1],0); + update_slider_value( "textcoloralpha",bg_[3],0); + } + else if ( is_button_toggled( "textcolorln" )) + { + update_slider_value( "textcolorred", ln_[0],0 ); + update_slider_value( "textcolorblue",ln_[2],0 ); + update_slider_value( "textcolorgreen",ln_[1],0); + update_slider_value( "textcoloralpha", ln_[3],0); + } + GtkWidget *combo = glade_xml_get_widget( info->main_window, "combobox_fonts" ); + gtk_combo_box_set_active( GTK_COMBO_BOX( combo ), font ); + + +// glade_xml_get_widget( info->main_window, "combobox_textsrt" ); +// gtk_combo_box_set_active( GTK_COMBO_BOX( combo ), seq_id-1 ); + + + srt_locked_ = 0; + + if(text) free(text); +} + +void on_button_text_new_clicked( GtkWidget *w, gpointer data ) +{ + gint x = get_nums( "spin_text_x" ); + gint y = get_nums( "spin_text_y" ); + gint s1 = 0; + gint s2 = 0; + if( info->status_tokens[PLAY_MODE] == MODE_SAMPLE ) + { + s1 = info->status_tokens[SAMPLE_START]; + s2 = info->status_tokens[SAMPLE_END]; + } + else + { + s1 = 0; + s2 = get_nums("stream_length"); + } + + gchar *text = strdup(" "); + + multi_vims( VIMS_SRT_ADD, "%d %d %d %d %d %s", + 0,s1,s2,x,y,text ); + + int tmp = 0; + gchar *new_srt_id = recv_vims( 5, &tmp ); + int id = 0; + if(new_srt_id && tmp > 0) + { + sscanf( new_srt_id, "%d", &id ); + if(id > 0 ) + srt_seq_ = id; + } + if( new_srt_id ) + free(new_srt_id); + + free(text); + if( id > 0 ) + info->uc.reload_hint[HINT_HISTORY] = 1; +} + +void on_button_text_del_clicked( GtkWidget *w, gpointer data ) +{ + multi_vims( VIMS_SRT_DEL, "%d", srt_seq_ ); + info->uc.reload_hint[HINT_HISTORY] = 1; +} + +void on_spin_text_start_value_changed( GtkWidget *w, gpointer data ) +{ + gint start = get_nums( "spin_text_end"); + char *text = format_time( start, info->el.fps ); + update_label_str( "labeltextstart", text ); + free(text); +} + +void on_spin_text_end_value_changed( GtkWidget *w, gpointer data ) +{ + gint end = get_nums( "spin_text_end" ); + char *text = format_time( end, info->el.fps ); + update_label_str( "labeltextend", text ); + free(text); +} +void on_spin_text_x_value_changed( GtkWidget *w, gpointer data ) +{ + if( srt_locked_) + return; + + gint x = get_nums( "spin_text_x" ); + gint y = get_nums( "spin_text_y"); + multi_vims( VIMS_FONT_POS,"%d %d", x,y ); +} +void on_spin_text_y_value_changed( GtkWidget *w, gpointer data ) +{ + if( srt_locked_) + return; + + gint x = get_nums( "spin_text_x" ); + gint y = get_nums( "spin_text_y"); + multi_vims( VIMS_FONT_POS,"%d %d", x,y ); +} +void on_button_srt_save_clicked( GtkWidget *w, gpointer data ) +{ + gchar *filename = dialog_save_file("Save SRT file"); + if( filename ) + { + multi_vims( VIMS_SRT_SAVE, "%s", filename ); + g_free(filename); + } +} +void on_button_srt_load_clicked( GtkWidget *w, gpointer data ) +{ + gchar *filename = dialog_open_file("Load SRT file",4); + if( filename ) + { + multi_vims( VIMS_SRT_LOAD, "%s", filename ); + g_free(filename); + } +} + + +void on_combobox_fonts_changed( GtkWidget *w, gpointer data ) +{ + if(srt_locked_) + return; + gint font = gtk_combo_box_get_active( GTK_COMBO_BOX( w ) ); + gint size = get_nums( "spin_text_size" ); + + multi_vims( VIMS_FONT_SIZE_FONT, "%d %d", font , size ); +} +void on_spin_text_size_value_changed( GtkWidget *w, gpointer data ) +{ + if( srt_locked_) + return; + GtkWidget *ww = glade_xml_get_widget( info->main_window, + "combobox_fonts" ); + gint font = gtk_combo_box_get_active( GTK_COMBO_BOX( ww ) ); + gint size = get_nums( "spin_text_size" ); + + multi_vims( VIMS_FONT_SIZE_FONT, "%d %d", font , size ); +} + +void on_button_text_update_clicked(GtkWidget *w, gpointer data) +{ + gint s1 = get_nums( "spin_text_start" ); + gint s2 = get_nums( "spin_text_end" ); + gchar *text = get_textview_buffer( "textview_text" ); + if(text) + multi_vims( VIMS_SRT_UPDATE, "%d %d %d %s", srt_seq_, s1,s2,text ); +} + +static void change_box_color_rgb( GtkWidget *box, int r, int g, int b,int a, int fill ) +{ + GdkGC *gc = gdk_gc_new( box->window ); + GdkColor col; + + memset( &col,0, sizeof( GdkColor ) ); + col.red = 255.0 * r; + col.green = 255.0 * g; + col.blue = 255.0 * b; + + if(fill) + { + update_slider_value( "textcolorred", r ,0); + update_slider_value( "textcolorgreen",g,0 ); + update_slider_value( "textcolorblue",b,0); + update_slider_value( "textcoloralpha",a,0); + } + gdk_color_alloc( gtk_widget_get_colormap( box ), &col ); + + gdk_gc_set_foreground( gc, &col ); + + gdk_draw_rectangle( + box->window, + gc, + TRUE, + 0, + 0, + 24, + 24 ); + + gdk_gc_unref( gc ); +} + +void on_combobox_textsrt_changed( GtkWidget *w, gpointer data) +{ + if(info->status_lock) + return; + + gchar *k = gtk_combo_box_get_active_text( GTK_COMBO_BOX(w) ); + int sid = atoi(k); + if( sid > 0) + { + multi_vims( VIMS_SRT_SELECT, "%d", sid ); + srt_seq_ = sid; + srt_load_subtitle(sid); + } +} + + +static void change_box_color( GtkWidget *box, double val, int plane, int fill ) +{ + GdkGC *gc = gdk_gc_new( box->window ); + GdkColor col; + + memset( &col,0, sizeof( GdkColor ) ); + double v = (1.0 / 255.0) * val; + + int r = get_slider_val( "textcolorred" ); + int b = get_slider_val( "textcolorgreen" ); + int g = get_slider_val( "textcolorblue" ); + int a = get_slider_val("textcoloralpha" ); + + if(plane==0) + { + col.red = 65535.0 * v; + switch(fill) + { + case 0: fg_[0] = r; break; + case 1: bg_[0] = r; break; + case 2: ln_[0] = r; break; + } + } + if(plane==1) + { + col.green = 65535 * v; + switch(fill) + { + case 0: fg_[1] = g; break; + case 1: bg_[1] = g; break; + case 2: ln_[1] = g; break; + } + } + if(plane==2) + { + col.blue = 65535 * v; + switch(fill) + { + case 0: fg_[2] = b; break; + case 1: bg_[2] = b; break; + case 2: ln_[2] = b; break; + } + + } + if(plane==-1) + { + col.red = 255.0 * r; + col.green = 255.0 * g; + col.blue = 255.0 * b; + switch(fill) + { + case 0: fg_[0] = r; fg_[1] = g; fg_[2] = b; fg_[3] = a; break; + case 1: bg_[0] = r; bg_[1] = g; bg_[2] = b; bg_[3] = a; break; + case 2: ln_[0] = r; ln_[1] = g; ln_[2] = b; ln_[3] = a; break; + } + + } + + + gdk_color_alloc( gtk_widget_get_colormap( box ), &col ); + + gdk_gc_set_foreground( gc, &col ); + + gdk_draw_rectangle( + box->window, + gc, + TRUE, + 0, + 0, + 24, + 24 ); + + gdk_gc_unref( gc ); +} + +static void colbox( const char *name1,const char *name2, int plane ) +{ + int fg = is_button_toggled("textcolorfg"); + int bg = is_button_toggled("textcolorbg"); + int ln = is_button_toggled("textcolorln"); + + int v = get_slider_val( name2 ); + change_box_color( + glade_xml_get_widget( info->main_window,name1 ) , + v, + plane, + -1 ); //green + + if(fg) + change_box_color( + glade_xml_get_widget( info->main_window, "boxtext" ), + 0.0, + -1, + 0 ); + if(bg) + change_box_color( + glade_xml_get_widget( info->main_window, "boxbg" ), + 0.0, + -1, + 1 ); + + if(ln) + change_box_color( + glade_xml_get_widget( info->main_window, "boxln" ), + 0.0, + -1, + 2 ); + +} + +void on_textcoloralpha_value_changed(GtkWidget *w, gpointer data ) +{ + if(info->status_lock || srt_locked_) + return; + + int fg = is_button_toggled("textcolorfg"); + int bg = is_button_toggled("textcolorbg"); + int ln = is_button_toggled("textcolorln"); + gint r = get_slider_val( "textcolorred" ); + gint g = get_slider_val( "textcolorgreen" ); + gint b = get_slider_val( "textcolorblue" ); + gint a = get_slider_val( "textcoloralpha" ); + + int m = 0; + if( fg ) + { + fg_[3] = a; + m = 1; + } + if( bg ) + { + bg_[3] = a; + m = 2; + } + if( ln ) + { + ln_[3] = a; + m = 3; + } + + multi_vims( VIMS_FONT_COL, "%d %d %d %d %d", r,g,b,a, m ); +} + +void on_textcolorred_value_changed(GtkWidget *w , gpointer data ) +{ + colbox( "boxred", "textcolorred", 0 ); +} + + +void on_textcolorgreen_value_changed(GtkWidget *w , gpointer data ) +{ + colbox( "boxgreen", "textcolorgreen", 1 ); +} + +void on_textcolorblue_value_changed(GtkWidget *w , gpointer data ) +{ + colbox( "boxblue", "textcolorblue", 2 ); +} + +void on_textcolorfg_toggled( GtkWidget *w, gpointer data ) +{ + if( is_button_toggled( "textcolorfg" ) ) + { + update_slider_value( "textcolorred", fg_[0],0 ); + update_slider_value( "textcolorgreen", fg_[1],0 ); + update_slider_value( "textcolorblue", fg_[2],0); + update_slider_value( "textcoloralpha", fg_[3],0); + } +} +void on_textcolorbg_toggled( GtkWidget *w, gpointer data ) +{ + if( is_button_toggled( "textcolorbg" ) ) + { + update_slider_value( "textcolorred", bg_[0],0 ); + update_slider_value( "textcolorgreen", bg_[1],0 ); + update_slider_value( "textcolorblue", bg_[2],0); + update_slider_value( "textcoloralpha", bg_[3],0); + } +} +void on_textcolorln_toggled( GtkWidget *w, gpointer data ) +{ + if( is_button_toggled( "textcolorln" ) ) + { + update_slider_value( "textcolorred", ln_[0],0 ); + update_slider_value( "textcolorgreen", ln_[1],0 ); + update_slider_value( "textcolorblue", ln_[2],0); + update_slider_value( "textcoloralpha", ln_[3],0); + } +} + +void on_use_bg_toggled( GtkWidget *w , gpointer data) +{ + if(srt_locked_ || info->status_lock) + return; + + multi_vims( VIMS_FONT_COL, "%d %d %d %d %d", + is_button_toggled("use_outline"), + is_button_toggled("use_bg"), + 0, + 0, + 0 ); +} + +void on_use_outline_toggled( GtkWidget *w, gpointer data) +{ + if(srt_locked_ || info->status_lock) + return; + + multi_vims( VIMS_FONT_COL, "%d %d %d %d %d", + is_button_toggled("use_outline"), + is_button_toggled("use_bg"), + 0, + 0, + 0 ); + +} + +void on_buttonfg_clicked( GtkWidget *w, gpointer data ) +{ + gint r = get_slider_val( "textcolorred" ); + gint g = get_slider_val( "textcolorgreen" ); + gint b = get_slider_val( "textcolorblue" ); + gint a = get_slider_val( "textcoloralpha"); + fg_[0] = r; + fg_[1] = g; + fg_[2] = b; + fg_[3] = a; + + multi_vims( VIMS_FONT_COL, "%d %d %d %d %d", r,g,b,a, 1 ); +} +void on_buttonbg_clicked( GtkWidget *w, gpointer data ) +{ + gint r = get_slider_val( "textcolorred" ); + gint g = get_slider_val( "textcolorgreen" ); + gint b = get_slider_val( "textcolorblue" ); + gint a = get_slider_val( "textcoloralpha" ); + + bg_[0] = r; + bg_[1] = g; + bg_[2] = b; + bg_[3] = a; + + multi_vims( VIMS_FONT_COL, "%d %d %d %d %d", r,g,b,a, 2 ); +} +void on_buttonln_clicked( GtkWidget *w, gpointer data ) +{ + gint r = get_slider_val( "textcolorred" ); + gint g = get_slider_val( "textcolorgreen" ); + gint b = get_slider_val( "textcolorblue" ); + gint a = get_slider_val( "textcoloralpha" ); + + ln_[0] = r; + ln_[1] = g; + ln_[2] = b; + ln_[3] = a; + + multi_vims( VIMS_FONT_COL, "%d %d %d %d %d", r,g,b,a, 3 ); +} + +gboolean boxfg_expose_event(GtkWidget *w, + GdkEventExpose *event, gpointer data ) +{ + gdk_window_clear_area( w->window, + event->area.x, event->area.y, + event->area.width,event->area.height ); + + + GdkGC *gc = gdk_gc_new( w->window ); + GdkColor col; + + memset( &col,0, sizeof( GdkColor ) ); + col.red = 255.0 * fg_[0]; + col.green = 255.0 * fg_[1]; + col.blue = 255.0 * fg_[2]; + + gdk_color_alloc( gtk_widget_get_colormap( w ), &col ); + + gdk_gc_set_foreground( gc, &col ); + + gdk_draw_rectangle( + w->window, + gc, + TRUE, + 0, + 0, + 24, + 24 ); + + gdk_gc_unref( gc ); + + return TRUE; +} + +gboolean boxbg_expose_event(GtkWidget *w, + GdkEventExpose *event, gpointer data ) +{ + gdk_window_clear_area( w->window, + event->area.x, event->area.y, + event->area.width,event->area.height ); + + + GdkGC *gc = gdk_gc_new( w->window ); + GdkColor col; + + memset( &col,0, sizeof( GdkColor ) ); + col.red = 255.0 * bg_[0]; + col.green = 255.0 * bg_[1]; + col.blue = 255.0 * bg_[2]; + + gdk_color_alloc( gtk_widget_get_colormap( w ), &col ); + + gdk_gc_set_foreground( gc, &col ); + + gdk_draw_rectangle( + w->window, + gc, + TRUE, + 0, + 0, + 24, + 24 ); + + gdk_gc_unref( gc ); + + return TRUE; +} + +gboolean boxln_expose_event(GtkWidget *w, + GdkEventExpose *event, gpointer data ) +{ + gdk_window_clear_area( w->window, + event->area.x, event->area.y, + event->area.width,event->area.height ); + + + GdkGC *gc = gdk_gc_new( w->window ); + GdkColor col; + + memset( &col,0, sizeof( GdkColor ) ); + col.red = 255.0 * ln_[0]; + col.green = 255.0 * ln_[1]; + col.blue = 255.0 * ln_[2]; + + gdk_color_alloc( gtk_widget_get_colormap( w ), &col ); + + gdk_gc_set_foreground( gc, &col ); + + gdk_draw_rectangle( + w->window, + gc, + TRUE, + 0, + 0, + 24, + 24 ); + + gdk_gc_unref( gc ); + + return TRUE; +} + +gboolean boxred_expose_event(GtkWidget *w, + GdkEventExpose *event, gpointer data ) +{ + gdk_window_clear_area( w->window, + event->area.x, event->area.y, + event->area.width,event->area.height ); + + + GdkGC *gc = gdk_gc_new( w->window ); + GdkColor col; + + memset( &col,0, sizeof( GdkColor ) ); + col.red = 255 * get_slider_val( "textcolorred" ); + + gdk_color_alloc( gtk_widget_get_colormap( w ), &col ); + + gdk_gc_set_foreground( gc, &col ); + + gdk_draw_rectangle( + w->window, + gc, + TRUE, + 0, + 0, + 24, + 24 ); + + gdk_gc_unref( gc ); + + return TRUE; +} + + +gboolean boxgreen_expose_event(GtkWidget *w, + GdkEventExpose *event, gpointer data ) +{ + gdk_window_clear_area( w->window, + event->area.x, event->area.y, + event->area.width,event->area.height ); + + + GdkGC *gc = gdk_gc_new( w->window ); + GdkColor col; + + memset( &col,0, sizeof( GdkColor ) ); + col.green = 255 * get_slider_val( "textcolorgreen" ); + + gdk_color_alloc( gtk_widget_get_colormap( w ), &col ); + + gdk_gc_set_foreground( gc, &col ); + + gdk_draw_rectangle( + w->window, + gc, + TRUE, + 0, + 0, + 24, + 24 ); + + gdk_gc_unref( gc ); + + return TRUE; +} +gboolean boxblue_expose_event(GtkWidget *w, + GdkEventExpose *event, gpointer data ) +{ + gdk_window_clear_area( w->window, + event->area.x, event->area.y, + event->area.width,event->area.height ); + + + GdkGC *gc = gdk_gc_new( w->window ); + GdkColor col; + + memset( &col,0, sizeof( GdkColor ) ); + col.blue = 255 * get_slider_val( "textcolorblue" ); + + gdk_color_alloc( gtk_widget_get_colormap( w ), &col ); + + gdk_gc_set_foreground( gc, &col ); + + gdk_draw_rectangle( + w->window, + gc, + TRUE, + 0, + 0, + 24, + 24 ); + + gdk_gc_unref( gc ); + + return TRUE; +} + + +void on_osdbutton_clicked(GtkWidget *w, gpointer data ) +{ + single_vims(VIMS_OSD); +} + +void on_seqactive_toggled( GtkWidget *w, gpointer data ) +{ + if(info->status_lock) + return; + multi_vims( VIMS_SEQUENCE_STATUS, "%d" , is_button_toggled("seqactive" ) ? 1 : 0 ); + vj_midi_learning_vims_msg(info->midi,NULL, VIMS_SEQUENCE_STATUS, is_button_toggled("seqactive")); +} +void on_bq_button_clicked( GtkWidget *w, gpointer data ) +{ + info->quality = 2; + multitrack_set_quality( info->mt, 2 ); + if(!is_button_toggled( "previewtoggle" )) + set_toggle_button( "previewtoggle", 1 ); +} + +void on_hqbutton_clicked( GtkWidget *w, gpointer data ) +{ + info->quality = 1; + multitrack_set_quality( info->mt, 1 ); + if(!is_button_toggled( "previewtoggle" )) + set_toggle_button( "previewtoggle", 1 ); + +} +void on_lqbutton_clicked( GtkWidget *w, gpointer data ) +{ + info->quality = 0; + multitrack_set_quality( info->mt, 0 ); + if(!is_button_toggled( "previewtoggle" )) + set_toggle_button( "previewtoggle", 1 ); + +} +void on_uq_button_clicked( GtkWidget *w, gpointer data ) +{ + info->quality = 3; + multitrack_set_quality( info->mt, 3 ); + if(!is_button_toggled( "previewtoggle" )) + set_toggle_button( "previewtoggle", 1 ); + +} + +void on_record_vp_clicked( GtkWidget *w, gpointer data ) +{ + single_vims( VIMS_RECVIEWPORT ); +} + +void on_macroplay_toggled( GtkWidget *w, gpointer data ) +{ + if(info->status_lock) + return; + if( is_button_toggled( "macroplay" )) + { + multi_vims( VIMS_MACRO, "%d %d", 2,1 ); + vj_midi_learning_vims_msg2( info->midi,NULL,VIMS_MACRO,2,1 ); + } +} + +void on_macrorecord_toggled( GtkWidget *w, gpointer data ) +{ + if(info->status_lock) + return; + if( is_button_toggled( "macrorecord")) + { + multi_vims( VIMS_MACRO, "%d %d", 1, 1 ); + vj_midi_learning_vims_msg2( info->midi,NULL,VIMS_MACRO,1,1 ); + } +} + +void on_macrostop_toggled( GtkWidget *w, gpointer data ) +{ + if(info->status_lock) + return; + if( is_button_toggled( "macrostop")) + { + multi_vims( VIMS_MACRO, "%d %d", 0 , 1 ); + vj_midi_learning_vims_msg2( info->midi,NULL,VIMS_MACRO,0,1 ); + } +} + +void on_macroclear_clicked( GtkWidget *w, gpointer data ) +{ + if(info->status_lock) + return; + + multi_vims( VIMS_MACRO, "%d %d", 0, 0 ); + vj_midi_learning_vims_msg2( info->midi,NULL, VIMS_MACRO, 0, 0); +} + +void on_midilearn_toggled( GtkWidget *w, gpointer data ) +{ + vj_midi_learn( info->midi); +} + +void on_midievent_toggled( GtkWidget *w, gpointer data ) +{ + vj_midi_play( info->midi ); +} + + +void on_load_midi_layout1_activate( GtkWidget *w , gpointer data ) +{ + gchar *filename = dialog_open_file( "Select MIDI configuration file to load",0); + if( filename ) + vj_midi_load( info->midi, filename ); +} +void on_save_midi_layout1_activate( GtkWidget *w, gpointer data ) +{ + gchar *filename = dialog_save_file( "Save MIDI configuration to file"); + if(filename) + vj_midi_save( info->midi, filename ); +} + diff --git a/veejay-client/src/common.h b/veejay-client/src/common.h new file mode 100644 index 00000000..954a806a --- /dev/null +++ b/veejay-client/src/common.h @@ -0,0 +1,59 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef GVRCOMMON_H +#define GVRCOMMON_H +#define STATUS_BYTES 150 +#define STATUS_TOKENS 23 +#define VEEJAY_CODENAME VERSION +/* Status bytes */ + +#define ELAPSED_TIME 0 +#define PLAY_MODE 2 +#define CURRENT_ID 3 +#define SAMPLE_FX 4 +#define SAMPLE_START 5 +#define SAMPLE_END 6 +#define SAMPLE_SPEED 7 +#define SAMPLE_LOOP 8 +#define SAMPLE_MARKER_START 13 +#define STREAM_TYPE 13 +#define SAMPLE_MARKER_END 14 +#define FRAME_NUM 1 +#define TOTAL_FRAMES 6 +#define TOTAL_SLOTS 16 +#define TOTAL_MEM 17 +#define SEQ_ACT 18 +#define SEQ_CUR 19 +#define CHAIN_FADE 20 +#define FRAME_DUP 21 +#define MACRO 22 +#define CURRENT_ENTRY 15 +#define MODE_PLAIN 2 +#define MODE_SAMPLE 0 +#define MODE_PATTERN 3 +#define MODE_STREAM 1 +#define STREAM_COL_R 5 +#define STREAM_COL_G 6 +#define STREAM_COL_B 7 + +#define STREAM_RECORDED 11 +#define STREAM_DURATION 10 +#define STREAM_RECORDING 9 + +#endif diff --git a/veejay-client/src/curve.c b/veejay-client/src/curve.c new file mode 100644 index 00000000..6252d324 --- /dev/null +++ b/veejay-client/src/curve.c @@ -0,0 +1,96 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include +#include "curve.h" +#ifdef STRICT_CHECKING +#include +#endif +void get_points_from_curve( GtkWidget *curve, int len, float *vec ) +{ + gtk_curve_get_vector( GTK_CURVE(curve), len, vec ); +} + +void reset_curve( GtkWidget *curve ) +{ + gtk_curve_reset(GTK_CURVE(curve)); + gtk_curve_set_range( GTK_CURVE(curve), 0.0, 1.0, 0.0, 1.0 ); +} + +void set_points_in_curve( int type, GtkWidget *curve) +{ + gtk_curve_set_curve_type( GTK_CURVE(curve), type ); +} + +int set_points_in_curve_ext( GtkWidget *curve, unsigned char *blob, int id, int fx_entry, int *lo, int *hi, int *curve_type) +{ + int parameter_id = 0; + int start = 0, end =0,type=0; + int entry = 0; + int n = sscanf( (char*) blob, "key%2d%2d%8d%8d%2d", &entry, ¶meter_id, &start, &end,&type ); + int len = end - start; + int i; + int min = 0, max = 0; +#ifdef STRICT_CHECKING + assert( fx_entry == entry ); +#endif + + if( len <= 0 ) + return -1; + + if(n != 5 ) + { + veejay_msg(0, "Error parsing KF headeR"); + return -1; + } + + _effect_get_minmax(id, &min, &max, parameter_id ); + + + unsigned char *in = blob + 25; + float *vec = (float*) vj_calloc(sizeof(float) * len ); + for(i = start ; i < end; i ++ ) + { + unsigned char *ptr = in + (i * 4); + int value = + ( ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24) ); + + + float top = 1.0 / (float) max; + float val = (float)value * top; + + vec[i] = val; + } + + gtk_curve_set_vector( GTK_CURVE( curve ), len, vec ); + gtk_curve_set_curve_type( GTK_CURVE(curve), type ); + + *lo = start; + *hi = end; + *curve_type = type; + + free(vec); + + return parameter_id; +} diff --git a/veejay-client/src/curve.h b/veejay-client/src/curve.h new file mode 100644 index 00000000..f0ed161c --- /dev/null +++ b/veejay-client/src/curve.h @@ -0,0 +1,34 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef VJCURVE_H +#define VJCURVE_H +#include +#include +#include +#define MAX_PARAMETERS 8 +#define MAX_CHAIN_LEN 20 + + +int set_points_in_curve_ext( GtkWidget *curve, unsigned char *blob, int id, int fx_entry, int *lo, int *hi, int *ct); +void set_points_in_curve( int type, GtkWidget *curve); +void reset_curve( GtkWidget *curve ); +void get_points_from_curve( GtkWidget *curve, int len, float *v ); + +#endif diff --git a/veejay-client/src/gveejay.c b/veejay-client/src/gveejay.c new file mode 100644 index 00000000..0cd00852 --- /dev/null +++ b/veejay-client/src/gveejay.c @@ -0,0 +1,262 @@ +/* gveejay - Linux VeeJay - GVeejay GTK+-2/Glade User Interface + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +static int port_num = 3490; +static char hostname[255]; +static int gveejay_theme = 1; +static int verbosity = 0; +static int timer = 6; +static int col = 0; +static int row = 0; +static int n_tracks = 3; +static int launcher = 0; +static int pw = 176; +static int ph = 144; +static int preview = 0; // off +static int use_threads = 0; +static struct +{ + char *file; +} skins[] = { + { "gveejay.reloaded.glade" }, + { NULL } +}; + +extern void reloaded_launcher( char *h, int p ); + +static void usage(char *progname) +{ + printf( "Usage: %s \n",progname); + printf( "where options are:\n"); + printf( "-h\t\tVeejay host to connect to (defaults to localhost) \n"); + printf( "-p\t\tVeejay port to connect to (defaults to 3490) \n"); + printf( "-t\t\tDont load gveejay's GTK theme\n"); + printf( "-n\t\tDont use colored text\n"); + printf( "-v\t\tBe extra verbose (usefull for debugging)\n"); + printf( "-s\t\tSet bank resolution (row X columns)\n"); + printf( "-P\t\tStart with preview enabled (1=1/1,2=1/2,3=1/4,4=1/8)\n"); + printf( "-X\t\tSet number of tracks\n"); + printf( "\n\n"); + exit(-1); +} +static int set_option( const char *name, char *value ) +{ + int err = 0; + if( strcmp(name, "h") == 0 || strcmp(name, "hostname") == 0 ) + { + strcpy( hostname, optarg ); + launcher ++; + } + else if( strcmp(name, "p") == 0 || strcmp(name ,"port") == 0 ) + { + if(sscanf( optarg, "%d", &port_num )) + launcher++; + } + else if (strcmp(name, "n") == 0 ) + { + veejay_set_colors(0); + } + else if (strcmp(name, "X") == 0 ) + { + n_tracks = atoi(optarg); + } + else if( strcmp(name, "t") == 0 || strcmp(name, "no-theme") == 0) + { + gveejay_theme = 0; + } + else if( strcmp(name, "v") == 0 || strcmp(name, "verbose") == 0) + { + verbosity = 1; + } + else if( strcmp(name, "t") == 0 || strcmp(name, "timeout") == 0) + { + timer = atoi(optarg); + } + else if (strcmp(name, "s") == 0 || strcmp(name, "size") == 0) + { + if(sscanf( (char*) optarg, "%dx%d", + &row, &col ) != 2 ) + { + fprintf(stderr, "--size parameter requires NxN argument"); + err++; + } + } + else if (strcmp(name, "q") == 0 ) + { + fprintf(stdout, "%s", get_gveejay_dir()); + exit(0); + } + else if (strcmp(name, "P" ) == 0 || strcmp(name, "preview" ) == 0 ) + { + preview = atoi(optarg); + if(preview <= 0 || preview > 4 ) + { + fprintf(stderr, "--preview [0-4]\n"); + err++; + } + } + else + err++; + return err; +} +static volatile gulong g_trap_free_size = 0; +static struct timeval time_last_; + +static char **cargv = NULL; + + +gboolean gveejay_idle(gpointer data) +{ + if(gveejay_running()) + { + int sync = 0; + if( is_alive(&sync) == FALSE ) { + //@ restart reloaded + veejay_msg(VEEJAY_MSG_WARNING, + "No connection with veejay, attempting restart."); + reloaded_restart(); + } + if( sync ) { + if( gveejay_time_to_sync( get_ui_info() ) ) + { + if(veejay_update_multitrack( get_ui_info() )) + update_gveejay(); + } + } + } + + if( gveejay_restart() ) + { + //@ reinvoke + if( execvp( cargv[0], cargv ) == -1 ) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to restart"); + } + + return TRUE; +} + +static void clone_args( char *argv[], int argc ) +{ + int i = 0; + if( argc <= 0 ) + return; + + cargv = (char**) malloc(sizeof(char*) * (argc+1) ); + memset( cargv, 0, sizeof(char*) * (argc+1)); + for( i = 0; i < argc ; i ++ ) + cargv[i] = strdup( argv[i] ); + +} + +int main(int argc, char *argv[]) { + char option[2]; + int n; + int err=0; + + if(!argc) usage(argv[0]); + + clone_args( argv, argc ); + + // default host to connect to + sprintf(hostname, "127.0.0.1"); + + while( ( n = getopt( argc, argv, "s:h:p:tnvHf:X:P:q")) != EOF ) + { + sprintf(option, "%c", n ); + err += set_option( option, optarg); + if(err) usage(argv[0]); + } + if( optind > argc ) + err ++; + + if( err ) usage(argv[0]); +/* + if( !g_thread_supported() ) + { + veejay_msg(2, "Initializing GDK threads"); + g_thread_init(NULL); + gdk_threads_init(); // Called to initialize internal mutex "gdk_threads_mutex". + }*/ + + gtk_init( NULL,NULL ); + glade_init(); + +// g_mem_set_vtable( glib_mem_profiler_table ); + + vj_mem_init(); + + vevo_strict_init(); + + find_user_themes(gveejay_theme); + + vj_gui_set_debug_level( verbosity , n_tracks,pw,ph); + vj_gui_set_timeout(timer); + set_skin( 0 ); + + default_bank_values( &col, &row ); + gui_load_theme(); + vj_gui_init( skins[0].file, launcher, hostname, port_num, use_threads ); + vj_gui_style_setup(); + +//struct sched_param schp; +//memset( &schp, 0, sizeof( schp )); +//schp.sched_priority = sched_get_priority_min(SCHED_RR ); +//if( sched_setscheduler( 0, SCHED_FIFO, &schp ) == 0 ) +// veejay_msg(VEEJAY_MSG_INFO, "Reloaded running with low priority"); + + if( preview ) + { + veejay_msg(VEEJAY_MSG_INFO, "Starting with preview enabled"); + gveejay_preview(preview); + } + if( launcher ) + { + reloaded_launcher( hostname, port_num ); + } + + memset( &time_last_, 0, sizeof(struct timeval)); + + while(gveejay_running()) { + gveejay_idle(NULL); + while( gtk_events_pending() ) + gtk_main_iteration(); + + } + + + return 0; +} + + diff --git a/veejay-client/src/keyboard.c b/veejay-client/src/keyboard.c new file mode 100644 index 00000000..93f602fc --- /dev/null +++ b/veejay-client/src/keyboard.c @@ -0,0 +1,330 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include "keyboard.h" +static struct +{ + const int sdl_mod; + const int gdk_mod; + const gchar *title; +} modifier_translation_table_t[] = +{ + { 0, 0, " " }, + { 0, 16, " " }, + { 3, 1, "shift" }, + { 3, 17, "shift" }, + { 1, 8, "alt" }, + { 1, 24, "alt" }, + { 1, 44, "alt" }, + { 2, 4, "ctrl" }, + { 2, 20, "ctrl" }, + { 0, 0, NULL }, +}; +/* fixme: introduce keyboard mapping functionality + 1. attach VIMS events/VIMS BUNDLES to keys (with arguments) + 2. save/load VIMS keyboard mapping +*/ +static struct +{ + const int gdk_sym; // GDK key + const int sdl_sym; // SDL key + const gchar *title; // plain text +} key_translation_table_t[] = +{ + +{ GDK_space, SDLK_SPACE, "Space" }, +{ GDK_exclam, SDLK_EXCLAIM, "Exclaim" }, +{ GDK_quotedbl, SDLK_QUOTEDBL, "Double quote" }, +{ GDK_numbersign, SDLK_HASH, "Hash" }, +{ GDK_dollar, SDLK_DOLLAR, "Dollar" }, +{ GDK_percent, SDLK_PAUSE, "Percent" }, +{ GDK_parenleft, SDLK_LEFTPAREN, "Leftparen" }, +{ GDK_parenright, SDLK_RIGHTPAREN, "Rightparen" }, +{ GDK_asciicircum,SDLK_CARET, "Caret" }, +{ GDK_ampersand, SDLK_AMPERSAND, "Ampersand" }, +{ GDK_underscore, SDLK_UNDERSCORE, "Underscore" }, +{ GDK_braceright, 123, "Rightbrace" }, +{ GDK_braceleft, 125, "Leftbrace" }, +{ GDK_grave, SDLK_BACKQUOTE, "Aphostrophe" }, +{ GDK_asciitilde, 126, "Tilde" }, +{ GDK_asterisk, SDLK_ASTERISK, "Asterisk" }, +{ GDK_plus, SDLK_PLUS, "Plus" }, +{ GDK_comma, SDLK_COMMA, "Comma" }, +{ GDK_minus, SDLK_MINUS, "Minus" }, +{ GDK_period, SDLK_PERIOD, "Period" }, +{ GDK_slash, SDLK_SLASH, "Slash" }, +{ GDK_Home, SDLK_HOME, "Home" }, +{ GDK_End, SDLK_END, "End" }, +{ GDK_Page_Up, SDLK_PAGEUP, "PageUp" }, +{ GDK_Page_Down, SDLK_PAGEDOWN, "PageDown" }, +{ GDK_Insert, SDLK_INSERT, "Insert" }, +{ GDK_Up, SDLK_UP, "Up" }, +{ GDK_Down, SDLK_DOWN, "Down" }, +{ GDK_Left, SDLK_LEFT, "Left" }, +{ GDK_Right, SDLK_RIGHT, "Right" }, +{ GDK_Tab, SDLK_TAB, "TAB" }, +{ GDK_BackSpace, SDLK_BACKSPACE, "Backspace" }, +{ GDK_Escape, SDLK_ESCAPE, "Escape" }, +{ GDK_Delete, SDLK_DELETE, "Delete" }, +{ GDK_F1, SDLK_F1, "F1" }, +{ GDK_F2, SDLK_F2, "F2" }, +{ GDK_F3, SDLK_F3, "F3" }, +{ GDK_F4, SDLK_F4, "F4" }, +{ GDK_F5, SDLK_F5, "F5" }, +{ GDK_F6, SDLK_F6, "F6" }, +{ GDK_F7, SDLK_F7, "F7" }, +{ GDK_F8, SDLK_F8, "F8" }, +{ GDK_F9, SDLK_F9, "F9" }, +{ GDK_F10, SDLK_F10, "F10" }, +{ GDK_F11, SDLK_F11, "F11" }, +{ GDK_F12, SDLK_F12, "F12" }, +{ GDK_EuroSign, SDLK_EURO, "Euro" }, +{ GDK_KP_0, SDLK_KP0, "keypad 0" }, +{ GDK_KP_1, SDLK_KP1, "keypad 1" }, +{ GDK_KP_2, SDLK_KP2, "keypad 2" }, +{ GDK_KP_3, SDLK_KP3, "keypad 3" }, +{ GDK_KP_4, SDLK_KP4, "keypad 4" }, +{ GDK_KP_5, SDLK_KP5, "keypad 5" }, +{ GDK_KP_6, SDLK_KP6, "keypad 6" }, +{ GDK_KP_7, SDLK_KP7, "keypad 7" }, +{ GDK_KP_8, SDLK_KP8, "keypad 8" }, +{ GDK_KP_9, SDLK_KP9, "keypad 9" }, +{ GDK_KP_Divide, SDLK_KP_DIVIDE, "keypad /" }, +{ GDK_KP_Multiply,SDLK_KP_MULTIPLY, "keypad *" }, +{ GDK_KP_Subtract,SDLK_KP_MINUS, "keypad -" }, +{ GDK_KP_Add, SDLK_KP_PLUS, "keypad +" }, +{ GDK_KP_Equal, SDLK_KP_EQUALS, "keypad =" }, +{ GDK_KP_Enter, SDLK_KP_ENTER, "keypad ENTER" }, +{ GDK_ISO_Enter, SDLK_RETURN, "ENTER" }, +{ GDK_3270_Enter, SDLK_RETURN, "ENTER" }, + +/* GDK_KP doesnt word on all systems ... */ +{ 0xff9f, SDLK_KP0, "keypad 0" }, +{ 0xff9c, SDLK_KP1, "keypad 1" }, +{ 0xff99, SDLK_KP2, "keypad 2" }, +{ 0xff9b, SDLK_KP3, "keypad 3" }, +{ 0xff96, SDLK_KP4, "keypad 4" }, +{ 0xff9d, SDLK_KP5, "keypad 5" }, +{ 0xff98, SDLK_KP6, "keypad 6" }, +{ 0xff95, SDLK_KP7, "keypad 7" }, +{ 0xff97, SDLK_KP8, "keypad 8" }, +{ 0xff9a, SDLK_KP9, "keypad 9" }, +{ 0xff9f, SDLK_KP_PERIOD, "keypad ." }, + + +{ GDK_0, SDLK_0, "0" }, +{ GDK_1, SDLK_1, "1" }, +{ GDK_2, SDLK_2, "2" }, +{ GDK_3, SDLK_3, "3" }, +{ GDK_4, SDLK_4, "4" }, +{ GDK_5, SDLK_5, "5" }, +{ GDK_6, SDLK_6, "6" }, +{ GDK_7, SDLK_7, "7" }, +{ GDK_8, SDLK_8, "8" }, +{ GDK_9, SDLK_9, "9" }, +{ GDK_colon, SDLK_COLON, "colon" }, +{ GDK_semicolon, SDLK_SEMICOLON, "semicolon" }, +{ GDK_less, SDLK_LESS, "less" }, +{ GDK_equal, SDLK_EQUALS, "equals" }, +{ GDK_greater, SDLK_GREATER, "greater" }, +{ GDK_question, SDLK_QUESTION, "question" }, +{ GDK_at, SDLK_AT, "at" }, +{ GDK_bracketleft,SDLK_LEFTBRACKET, "left bracket" }, +{ GDK_backslash, SDLK_BACKSLASH, "backslash" }, +{ GDK_bracketright,SDLK_RIGHTBRACKET, "right bracket" }, +{ GDK_underscore, SDLK_UNDERSCORE, "underscore" }, +{ GDK_A, SDLK_a, "A" }, +{ GDK_B, SDLK_b, "B" }, +{ GDK_C, SDLK_c, "C" }, +{ GDK_D, SDLK_d, "D" }, +{ GDK_E, SDLK_e, "E" }, +{ GDK_F, SDLK_f, "F" }, +{ GDK_G, SDLK_g, "G" }, +{ GDK_H, SDLK_h, "H" }, +{ GDK_I, SDLK_i, "I" }, +{ GDK_J, SDLK_j, "J" }, +{ GDK_K, SDLK_k, "K" }, +{ GDK_L, SDLK_l, "L" }, +{ GDK_M, SDLK_m, "M" }, +{ GDK_N, SDLK_n, "N" }, +{ GDK_O, SDLK_o, "O" }, +{ GDK_P, SDLK_p, "P" }, +{ GDK_Q, SDLK_q, "Q" }, +{ GDK_R, SDLK_r, "R" }, +{ GDK_S, SDLK_s, "S" }, +{ GDK_T, SDLK_t, "T" }, +{ GDK_U, SDLK_u, "U" }, +{ GDK_V, SDLK_v, "V" }, +{ GDK_W, SDLK_w, "W" }, +{ GDK_X, SDLK_y, "Y" }, +{ GDK_Z, SDLK_z, "Z" }, +{ GDK_a, SDLK_a, "a" }, +{ GDK_b, SDLK_b, "b" }, +{ GDK_c, SDLK_c, "c" }, +{ GDK_d, SDLK_d, "d" }, +{ GDK_e, SDLK_e, "e" }, +{ GDK_f, SDLK_f, "f" }, +{ GDK_g, SDLK_g, "g" }, +{ GDK_h, SDLK_h, "h" }, +{ GDK_i, SDLK_i, "i" }, +{ GDK_j, SDLK_j, "j" }, +{ GDK_k, SDLK_k, "k" }, +{ GDK_l, SDLK_l, "l" }, +{ GDK_m, SDLK_m, "m" }, +{ GDK_n, SDLK_n, "n" }, +{ GDK_o, SDLK_o, "o" }, +{ GDK_p, SDLK_p, "p" }, +{ GDK_q, SDLK_q, "q" }, +{ GDK_r, SDLK_r, "r" }, +{ GDK_s, SDLK_s, "s" }, +{ GDK_t, SDLK_t, "t" }, +{ GDK_u, SDLK_u, "u" }, +{ GDK_v, SDLK_v, "v" }, +{ GDK_w, SDLK_w, "w" }, +{ GDK_x, SDLK_x, "x" }, +{ GDK_y, SDLK_y, "y" }, +{ GDK_z, SDLK_z, "z" }, +{ 0, 0, NULL }, + +}; + + +int sdl2gdk_key(int sdl_key) +{ + return 0; +} + +int gdk2sdl_key(int gdk_key) +{ + int i; + for ( i = 0; key_translation_table_t[i].title != NULL ; i ++ ) + { + if( gdk_key == key_translation_table_t[i].gdk_sym ) + return key_translation_table_t[i].sdl_sym; + } + return 0; +} + +int gdk2sdl_mod( int gdk_mod ) +{ + int i; + for ( i = 0; modifier_translation_table_t[i].title != NULL ; i ++ ) + { + if( gdk_mod == modifier_translation_table_t[i].gdk_mod ) + return modifier_translation_table_t[i].sdl_mod; + } + return 0; +} + +int sdlmod_by_name( gchar *name ) +{ + int i; + if(!name) + return 0; + + for ( i = 0; modifier_translation_table_t[i].title != NULL ; i ++ ) + { + if( g_utf8_collate(name, + modifier_translation_table_t[i].title) == 0) + return modifier_translation_table_t[i].sdl_mod; + } + + return 0; +} + +int sdlkey_by_name( gchar *name ) +{ + int i; + if(!name) + return 0; + for ( i = 0; key_translation_table_t[i].title != NULL ; i ++ ) + { + if( g_utf8_collate(name, + key_translation_table_t[i].title) == 0) + return key_translation_table_t[i].sdl_sym; + } + return 0; +} + +gchar *sdlkey_by_id( int sdl_key ) +{ + int i; + gchar *ret = NULL; + for ( i = 0; key_translation_table_t[i].title != NULL ; i ++ ) + { + if( sdl_key == key_translation_table_t[i].sdl_sym ) + return (gchar*)key_translation_table_t[i].title; + } + return ret; +} + +gchar *sdlmod_by_id( int sdl_mod ) +{ + int i; + gchar *ret = NULL; + for ( i = 0; modifier_translation_table_t[i].title != NULL ; i ++ ) + { + if( sdl_mod == modifier_translation_table_t[i].sdl_mod ) + return (gchar*)modifier_translation_table_t[i].title; + } + return ret; +} +gchar *gdkmod_by_id( int gdk_mod ) +{ + int i; + for( i = 0; modifier_translation_table_t[i].title != NULL ; i ++ ) + { + if( gdk_mod == modifier_translation_table_t[i].gdk_mod || + gdk_mod & modifier_translation_table_t[i].gdk_mod ) + return (gchar*)modifier_translation_table_t[i].title; + } + return NULL; +} + +gchar *gdkkey_by_id( int gdk_key ) +{ + int i; + for( i = 0; key_translation_table_t[i].title != NULL ; i ++ ) + { + if( gdk_key == key_translation_table_t[i].gdk_sym ) + return (gchar*)key_translation_table_t[i].title; + } + return NULL; +} + +static void key_func(gboolean pressed, guint16 unicode, guint16 keymod) +{ + + +} +/* +Key snooper functions are called before normal event delivery. +They can be used to implement custom key event handling. +grab_widget: the widget to which the event will be delivered. +event: the key event. +func_data: the func_data supplied to gtk_key_snooper_install(). +Returns: TRUE to stop further processing of event, FALSE to continue. +*/ + +gboolean key_snooper(GtkWidget *w, GdkEventKey *event, gpointer user_data) +{ + return FALSE; +} +// gtk_key_snooper_install diff --git a/veejay-client/src/keyboard.h b/veejay-client/src/keyboard.h new file mode 100644 index 00000000..287c595c --- /dev/null +++ b/veejay-client/src/keyboard.h @@ -0,0 +1,41 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef GDKSDL +#define GDKSDL + +#include +#include +#include +#include + +int sdl2gdk_key( int sdl_key ); +int gdk2sdl_key( int gdk_key ); +int gdk2sdl_mod( int gdk_mod ); +gchar *sdlkey_by_id( int sdl_key ); +gchar *sdlmod_by_id( int sdk_mod ); +gchar *gdkkey_by_id( int gdk_key ); +gchar *gdkmod_by_id(int gdkmod); +int sdlmod_by_name( gchar *name ); +int sdlkey_by_name( gchar *name ); +int gdk2sdl_mod( int gdk_mod ); + +gboolean key_snooper(GtkWidget *w, GdkEventKey *event, gpointer user_data); + +#endif diff --git a/veejay-client/src/multitrack.c b/veejay-client/src/multitrack.c new file mode 100644 index 00000000..34575f67 --- /dev/null +++ b/veejay-client/src/multitrack.c @@ -0,0 +1,1107 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2006 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sequence.h" +#include "tracksources.h" + +#define SEQ_BUTTON_CLOSE 0 +#define SEQ_BUTTON_RULE 1 + +#ifdef STRICT_CHECKING +#include +#endif +#include +#include +#include +#include + +#define __MAX_TRACKS 64 +typedef struct +{ + GtkWidget *event_box; + GtkWidget *frame; + GtkWidget *main_vbox; + GtkWidget *panel; + GtkWidget *hbox; + GtkWidget *area; + GtkWidget *sub_frame; + GtkWidget *sub_hbox; + GtkWidget *toggle; + GtkWidget *buttons[8]; + GtkWidget *icons[8]; + GtkWidget *button_box; + GtkWidget *timeline_; + GtkWidget *labels_[4]; + GtkWidget *sliders_[4]; + GtkWidget *button_box2; + GtkWidget *buttons2[8]; + void *tracks; + gint dim[2]; + int num; + int status_lock; + void *backlink; + int status_cache[32]; + int history[4][32]; +} sequence_view_t; + +typedef struct +{ + sequence_view_t **view; + void *preview; + GtkWidget *main_window; + GtkWidget *main_box; + GtkWidget *status_bar; + GtkWidget *scroll; + void *data; + int selected; + int sensitive; + float fps; + float aspect_ratio; + int width; + int height; + int master_track; + GdkPixbuf *logo; + GtkWidget *preview_toggle; + int pw; + int ph; +} multitracker_t; + +static volatile int MAX_TRACKS = 4; +static void *parent__ = NULL; + +static int mt_new_connection_dialog(multitracker_t *mt, char *hostname,int len, int *port_num); +static void add_buttons( sequence_view_t *p, sequence_view_t *seqv , GtkWidget *w); +static void add_buttons2( sequence_view_t *p, sequence_view_t *seqv , GtkWidget *w); +static sequence_view_t *new_sequence_view( void *vp, int num ); +static void update_pos( void *data, gint total, gint current ); +static gboolean seqv_mouse_press_event ( GtkWidget *w, GdkEventButton *event, gpointer user_data); + + +extern GdkPixbuf *vj_gdk_pixbuf_scale_simple( GdkPixbuf *src, int dw, int dh, GdkInterpType inter_type ); + + +static void gtk_image_set_from_pixbuf__( GtkImage *w, GdkPixbuf *p, const char *f, int l ) +{ + gtk_image_set_from_pixbuf(w, p); +} + + +static void gtk_widget_set_sensitive__( GtkWidget *w, gboolean state, const char *f, int l ) +{ +#ifdef STRICT_CHECKING + if( !GTK_IS_WIDGET(w) ) + veejay_msg(0, "Invalid widget '%s', %d", f, l ); + assert( GTK_IS_WIDGET(w) ); +#endif + gtk_widget_set_sensitive(w, state ); +} + +#ifdef STRICT_CHECKING +#define gtk_image_set_from_pixbuf_(w,p) gtk_image_set_from_pixbuf__( w,p, __FUNCTION__,__LINE__ ); +#define gtk_widget_set_sensitive_( w,p ) gtk_widget_set_sensitive__( w,p,__FUNCTION__,__LINE__ ) +#else +#define gtk_image_set_from_pixbuf_(w,p) gtk_image_set_from_pixbuf(w,p) +#define gtk_widget_set_sensitive_( w,p ) gtk_widget_set_sensitive(w,p) +#endif +static void status_print(multitracker_t *mt, const char format[], ... ) +{ + char buf[1024]; + va_list args; + va_start(args,format); + vsnprintf( buf,sizeof(buf), format, args ); + gsize nr,nw; + gchar *text = g_locale_to_utf8( buf, -1, &nr, &nw, NULL ); + text[strlen(text)-1] = '\0'; + gtk_statusbar_push( GTK_STATUSBAR(mt->status_bar), 0, text); + g_free(text); + va_end(args); +} + +static GdkPixbuf *load_logo_image(int dw, int dh ) +{ + char path[1024]; + veejay_memset(path,0,sizeof(path)); + get_gd(path,NULL, "veejay-logo.png"); + return gdk_pixbuf_new_from_file( path,NULL ); +} + +int multitrack_get_sequence_view_id( void *data ) +{ + sequence_view_t *s = (sequence_view_t*) data; + return s->num; +} + +void multitrack_sync_start(void *data) +{ + multitracker_t *mt = (multitracker_t*)data; + gvr_queue_vims( mt->preview,-1,VIMS_VIDEO_PLAY_STOP ); + gvr_queue_vims( mt->preview,-1,VIMS_VIDEO_GOTO_START ); + gvr_queue_vims( mt->preview,-1,VIMS_VIDEO_PLAY_FORWARD ); +} + +void multitrack_sync_simple_cmd( void *data, int vims, int arg ) +{ + multitracker_t *mt = (multitracker_t*)data; + gvr_queue_vims(mt->preview,-1, vims); +} + +void multitrack_sync_simple_cmd2( void *data, int vims, int arg ) +{ + multitracker_t *mt = (multitracker_t*)data; + gvr_queue_mvims(mt->preview,-1, vims, arg); +} + + +static void seq_gotostart(GtkWidget *w, gpointer data ) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gvr_queue_vims( mt->preview, v->num ,VIMS_VIDEO_GOTO_START ); +} + +static void seq_reverse(GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gvr_queue_vims( mt->preview, v->num ,VIMS_VIDEO_PLAY_BACKWARD ); +} + +static void seq_pause(GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gvr_queue_vims( mt->preview, v->num ,VIMS_VIDEO_PLAY_STOP ); +} + +static void seq_play( GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gvr_queue_vims( mt->preview, v->num ,VIMS_VIDEO_PLAY_FORWARD ); +} + +static void seq_gotoend(GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gvr_queue_vims( mt->preview, v->num ,VIMS_VIDEO_GOTO_END ); +} + +static void seq_speeddown(GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gint n = v->status_cache[ SAMPLE_SPEED ]; + + if( n < 0 ) n += 1; + if( n > 0 ) n -= 1; + gvr_queue_mvims( mt->preview, v->num ,VIMS_VIDEO_SET_SPEED , n ); +} + +static void seq_speedup(GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gint n = v->status_cache[ SAMPLE_SPEED ]; + + if( n < 0 ) n -= 1; + if( n > 0 ) n += 1; + gvr_queue_mvims( mt->preview, v->num ,VIMS_VIDEO_SET_SPEED , n ); +} + +static void seq_prevframe(GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gvr_queue_vims( mt->preview, v->num ,VIMS_VIDEO_PREV_FRAME ); + +} + +static void seq_nextframe(GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = (multitracker_t*)v->backlink; + + gvr_queue_vims( mt->preview, v->num ,VIMS_VIDEO_SKIP_FRAME ); +} + +static void seq_speed( GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = v->backlink; + if(v->status_lock) + return; + gdouble value = GTK_ADJUSTMENT( GTK_RANGE(w)->adjustment )->value; + gint speed = (gint) value; + gvr_queue_mvims( mt->preview, v->num ,VIMS_VIDEO_SET_SPEED , speed ); +} + +static void seq_opacity( GtkWidget *w, gpointer data) +{ + sequence_view_t *v = (sequence_view_t*) data; + multitracker_t *mt = v->backlink; + + if(v->status_lock) + return; + + gdouble value = GTK_ADJUSTMENT( GTK_RANGE(w)->adjustment )->value; + gint opacity = (gint)( value * 255.0); + gvr_queue_mmvims( mt->preview, v->num ,VIMS_CHAIN_MANUAL_FADE, 0, opacity ); +} + + +static void update_pos( void *user_data, gint total, gint current ) +{ + sequence_view_t *v = (sequence_view_t*) user_data; + multitracker_t *mt = v->backlink; + if(v->status_lock) + return; + + gtk_adjustment_set_value( + GTK_ADJUSTMENT(GTK_RANGE(v->timeline_)->adjustment), 1.0 / (gdouble) total * current ); + + gchar *now = format_time( current , mt->fps); + gtk_label_set_text( GTK_LABEL(v->labels_[0]), now ); + g_free(now); +} + +static void update_speed( void *user_data, gint speed ) +{ + sequence_view_t *v = (sequence_view_t*) user_data; + if(v->status_lock) + return; + + gtk_adjustment_set_value( GTK_ADJUSTMENT( GTK_RANGE( v->sliders_[0] )->adjustment), (gdouble) speed ); +} + +#define FIRST_ROW_END 5 +static struct +{ + const char *name; + int vims_id; + const char *file; + void (*f)(); +} button_template_t[] = +{ + { "button_gotostart", VIMS_VIDEO_GOTO_START, "button_gotostart.png", seq_gotostart }, + { "button_reverse", VIMS_VIDEO_PLAY_BACKWARD, "button_reverse.png" , seq_reverse }, + { "button_pauseplay", VIMS_VIDEO_PLAY_STOP, "button_pause.png", seq_pause}, + { "button_play", VIMS_VIDEO_PLAY_FORWARD, "button_play.png", seq_play }, + { "button_gotoend", VIMS_VIDEO_GOTO_END, "button_gotoend.png",seq_gotoend }, + + { "button_speeddown", VIMS_VIDEO_SET_SPEED, "button_down.png", seq_speeddown }, + { "button_speedup", VIMS_VIDEO_SET_SPEED, "button_up.png", seq_speedup }, + { "button_prevframe", VIMS_VIDEO_PREV_FRAME, "button_prev.png", seq_prevframe }, + { "button_nextframe", VIMS_VIDEO_SKIP_FRAME, "button_skip.png", seq_nextframe }, + { NULL , 0 , NULL }, +}; + +static void add_buttons( sequence_view_t *p, sequence_view_t *seqv , GtkWidget *w) +{ + int i; + for( i = 0; i < FIRST_ROW_END;i ++ ) + { + char path[1024]; + veejay_memset(path,0,sizeof(path)); + get_gd(path,NULL, button_template_t[i].file ); + seqv->icons[i] = gtk_image_new_from_file( path ); + seqv->buttons[i] = gtk_button_new_with_label(" "); + gtk_widget_set_size_request( seqv->icons[i],24,20 ); + + gtk_button_set_image( GTK_BUTTON(seqv->buttons[i]), seqv->icons[i] ); + gtk_widget_set_size_request( seqv->buttons[i],24,20 ); + gtk_box_pack_start( GTK_BOX(w), seqv->buttons[i], TRUE,TRUE, 0 ); + g_signal_connect( G_OBJECT( seqv->buttons[i] ), "clicked", G_CALLBACK( button_template_t[i].f), + (gpointer)p ); + gtk_widget_show( seqv->buttons[i] ); + + } +} + +static void add_buttons2( sequence_view_t *p, sequence_view_t *seqv , GtkWidget *w) +{ + int i; + for( i = FIRST_ROW_END; button_template_t[i].name != NULL ;i ++ ) + { + char path[1024]; + veejay_memset(path,0,sizeof(path)); + get_gd(path,NULL, button_template_t[i].file ); + seqv->icons[i] = gtk_image_new_from_file( path ); + seqv->buttons2[i] = gtk_button_new_with_label(" "); + gtk_widget_set_size_request( seqv->icons[i],24,20 ); + + gtk_button_set_image( GTK_BUTTON(seqv->buttons2[i]), seqv->icons[i] ); + gtk_widget_set_size_request( seqv->buttons2[i],24,20 ); + gtk_box_pack_start( GTK_BOX(w), seqv->buttons2[i], TRUE,TRUE, 0 ); + g_signal_connect( G_OBJECT( seqv->buttons2[i] ), "clicked", G_CALLBACK( button_template_t[i].f), + (gpointer*)p ); + gtk_widget_show( seqv->buttons2[i] ); + + } +} + + + +static void playmode_sensitivity( sequence_view_t *p, gint pm ) +{ + int i; +#ifdef STRICT_CHECKING + assert( p != NULL ); +#endif + if( pm == MODE_STREAM || MODE_PLAIN || MODE_SAMPLE ) + { + if(p->toggle) + gtk_widget_set_sensitive_( GTK_WIDGET( p->toggle ), TRUE ); + gtk_widget_set_sensitive_( GTK_WIDGET( p->panel ), TRUE ); + + } + + if( pm == MODE_STREAM ) + { + gtk_widget_set_sensitive_( GTK_WIDGET( p->button_box2 ), FALSE ); + gtk_widget_set_sensitive_( GTK_WIDGET( p->button_box ), FALSE ); + gtk_widget_set_sensitive_( GTK_WIDGET( p->sliders_[0] ), FALSE ); + gtk_widget_set_sensitive_( GTK_WIDGET( p->timeline_ ), FALSE ); + gtk_widget_set_sensitive_( GTK_WIDGET( p->sliders_[1] ), TRUE ); + for( i = 0; i < FIRST_ROW_END;i ++ ) + { + gtk_widget_set_sensitive_( GTK_WIDGET( p->buttons[i] ), FALSE ); + + } + } + else + { + if( pm == MODE_SAMPLE || pm == MODE_PLAIN ) + { + gtk_widget_set_sensitive_( GTK_WIDGET( p->button_box2 ), TRUE ); + gtk_widget_set_sensitive_( GTK_WIDGET( p->button_box ), TRUE ); + gtk_widget_set_sensitive_( GTK_WIDGET( p->sliders_[0] ), TRUE ); + gtk_widget_set_sensitive_( GTK_WIDGET( p->timeline_ ), TRUE ); + for( i = 0; i < FIRST_ROW_END;i ++ ) + { + gtk_widget_set_sensitive_( GTK_WIDGET( p->buttons[i] ), TRUE ); + } + + } + if( pm == MODE_SAMPLE ) + gtk_widget_set_sensitive_( GTK_WIDGET( p->sliders_[1] ), TRUE ); + else + gtk_widget_set_sensitive_( GTK_WIDGET( p->sliders_[1] ), FALSE ); + } +} + + +static void update_widgets(int *status, sequence_view_t *p, int pm) +{ + multitracker_t *mt = (multitracker_t*) p->backlink; + int *h = p->history[pm]; + if( h[PLAY_MODE] != pm ) + playmode_sensitivity( p, pm ); + + if( pm == MODE_STREAM ) + { + update_pos( p, status[TOTAL_FRAMES], 0 ); + update_speed( p, 1 ); + } + else + if( pm == MODE_SAMPLE || pm == MODE_PLAIN ) + { + if( h[FRAME_NUM] != status[FRAME_NUM] ) + update_pos( p, status[TOTAL_FRAMES],status[FRAME_NUM] ); + if( h[SAMPLE_SPEED] != status[SAMPLE_SPEED] ) + update_speed( p, status[SAMPLE_SPEED] ); + } + + if( h[TOTAL_SLOTS] != status[TOTAL_SLOTS]) + { + gvr_need_track_list( mt->preview, p->num ); + update_track_view( MAX_TRACKS, get_track_tree( p->tracks ), (void*)p ); + } +} + + +int update_multitrack_widgets( void *data, int *array, int track ) +{ + multitracker_t *mt = (multitracker_t*) data; + sequence_view_t *p = mt->view[ track ]; + + p->status_lock = 1; + int pm = array[PLAY_MODE]; + int i; + for( i = 0; i < 20; i ++ ) + p->status_cache[i] = array[i]; + update_widgets(array, p, pm); + + int *his = p->history[ pm ]; + for( i = 0; i < 20; i ++ ) + his[i] = array[i]; + p->status_lock = 0; + return 1; +} + +static void sequence_preview_size(multitracker_t *mt, int track_num) +{ + float ratio = mt->width / (float)mt->height; + int w = 80; + int h = ( (int)( (float)w/ratio ))/16*16; + + if(!gvr_track_configure( mt->preview, track_num,w,h ) ) + { + veejay_msg(0, "Unable to configure preview %d x %d",w , h ); + } + +} + +static void sequence_preview_cb(GtkWidget *widget, gpointer user_data) +{ + sequence_view_t *v = (sequence_view_t*) user_data; + multitracker_t *mt = v->backlink; + int status = 0; + + if(v->status_lock) + return; + + if(v->num != mt->master_track ) + { + status = (gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget) ) == TRUE ? 1 : 0 ); + + gvr_track_toggle_preview( mt->preview, v->num,status ); + + sequence_preview_size( mt, v->num ); + + if( !status ) + gtk_image_clear( GTK_IMAGE(v->area ) ); + } +} + +static void sequence_set_current_frame(GtkWidget *w, gpointer user_data) +{ + + sequence_view_t *v = (sequence_view_t*) user_data; + multitracker_t *mt = v->backlink; + if(v->status_lock) + return; + + gdouble pos = GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value; + gint frame = pos * v->status_cache[TOTAL_FRAMES]; + + gvr_queue_mvims( mt->preview, v->num, VIMS_VIDEO_SET_FRAME, frame ); +} + +static sequence_view_t *new_sequence_view( void *vp, int num ) +{ + sequence_view_t *seqv = (sequence_view_t*) vj_calloc(sizeof(sequence_view_t)); + + seqv->num = num; + seqv->backlink = vp; + + seqv->event_box = gtk_event_box_new(); + gtk_event_box_set_visible_window( GTK_EVENT_BOX(seqv->event_box), TRUE ); + GTK_WIDGET_SET_FLAGS( seqv->event_box, GTK_CAN_FOCUS ); + + g_signal_connect( G_OBJECT( seqv->event_box ), + "button_press_event", + G_CALLBACK( seqv_mouse_press_event ), + (gpointer*) seqv ); + gtk_widget_show( GTK_WIDGET( seqv->event_box ) ); + + + gchar *track_title = g_new0( gchar, 20 ); + sprintf(track_title, "Track %d", num ); + seqv->frame = gtk_frame_new( track_title ); + g_free(track_title); + + gtk_container_set_border_width( GTK_CONTAINER( seqv->frame) , 1 ); + gtk_widget_show( GTK_WIDGET( seqv->frame ) ); + gtk_container_add( GTK_CONTAINER( seqv->event_box), seqv->frame ); + + seqv->main_vbox = gtk_vbox_new(FALSE,0); + gtk_container_add( GTK_CONTAINER( seqv->frame ), seqv->main_vbox ); + gtk_widget_show( GTK_WIDGET( seqv->main_vbox ) ); + + seqv->area = gtk_image_new(); + + + gtk_box_pack_start( GTK_BOX(seqv->main_vbox),GTK_WIDGET( seqv->area), FALSE,FALSE,0); + gtk_widget_set_size_request( seqv->area, 176,176 ); + seqv->panel = gtk_frame_new(NULL); + + if( num > 0 ) + { + seqv->toggle = gtk_toggle_button_new_with_label( "preview" ); + + gtk_toggle_button_set_active( + GTK_TOGGLE_BUTTON(seqv->toggle), FALSE ); + g_signal_connect( G_OBJECT( seqv->toggle ), "toggled", G_CALLBACK(sequence_preview_cb), + (gpointer)seqv ); + gtk_box_pack_start( GTK_BOX(seqv->main_vbox), seqv->toggle,FALSE,FALSE, 0 ); + + gtk_widget_set_sensitive_( GTK_WIDGET( seqv->toggle ), FALSE ); + + gtk_widget_show( seqv->toggle ); + } + + GtkWidget *vvbox = gtk_vbox_new(FALSE, 0); + seqv->button_box = gtk_hbox_new(FALSE,0); + gtk_box_pack_start( GTK_BOX(vvbox), seqv->button_box ,FALSE,FALSE, 0 ); + add_buttons( seqv,seqv,seqv->button_box ); + + gtk_widget_show( seqv->button_box ); + gtk_container_add( GTK_CONTAINER( seqv->main_vbox ), seqv->panel ); + + seqv->button_box2 = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start( GTK_BOX(vvbox), seqv->button_box2, FALSE,FALSE, 0 ); + add_buttons2( seqv,seqv,seqv->button_box2 ); + gtk_widget_show( seqv->button_box2 ); + gtk_container_add( GTK_CONTAINER( seqv->panel ), vvbox ); + gtk_widget_show(vvbox); + + GtkWidget *box = gtk_vbox_new(FALSE,0); + seqv->timeline_ = gtk_hscale_new_with_range( 0.0,1.0,0.1 ); + gtk_scale_set_draw_value( GTK_SCALE(seqv->timeline_), FALSE ); + gtk_widget_set_size_request( seqv->panel,180 ,180); + gtk_adjustment_set_value( + GTK_ADJUSTMENT(GTK_RANGE(seqv->timeline_)->adjustment), 0.0 ); + gtk_widget_show( seqv->panel ); + gtk_box_pack_start( GTK_BOX( box ), seqv->timeline_, FALSE,FALSE, 0 ); + gtk_box_pack_start( GTK_BOX( vvbox ), box , FALSE,FALSE,0); + gtk_widget_show(seqv->timeline_); + g_signal_connect( seqv->timeline_, "value_changed", + (GCallback) sequence_set_current_frame, (gpointer*) seqv ); + + GtkWidget *scroll = gtk_scrolled_window_new(NULL,NULL); + gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(scroll), GTK_SHADOW_ETCHED_IN ); + gtk_widget_set_size_request(scroll,30,70); + gtk_container_set_border_width(GTK_CONTAINER(scroll),0); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scroll),GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC ); + GtkWidget *vvvbox = gtk_hbox_new(FALSE,0); + seqv->tracks = create_track_view(seqv->num, MAX_TRACKS, (void*) seqv ); + gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( get_track_tree(seqv->tracks)) , FALSE ); + gtk_widget_set_size_request( get_track_tree(seqv->tracks),20,80 ); + gtk_widget_show(scroll); + + gtk_scrolled_window_add_with_viewport( + GTK_SCROLLED_WINDOW( scroll ), get_track_tree(seqv->tracks) ); + gtk_widget_show( get_track_tree(seqv->tracks)); + gtk_box_pack_start( GTK_BOX(vvvbox), scroll, TRUE,TRUE, 0); + + GtkWidget *hhbox = gtk_hbox_new(FALSE,0); + + seqv->sliders_[0] = gtk_vscale_new_with_range( -12.0,12.0,1.0 ); + seqv->sliders_[1] = gtk_vscale_new_with_range( 0.0, 1.0, 0.01 ); + + gtk_adjustment_set_value( + GTK_ADJUSTMENT(GTK_RANGE(seqv->sliders_[0])->adjustment), 1.0 ); + gtk_adjustment_set_value( + GTK_ADJUSTMENT(GTK_RANGE(seqv->sliders_[1])->adjustment), 0.0 ); + + + gtk_scale_set_digits( GTK_SCALE(seqv->sliders_[1]), 2 ); + g_signal_connect( G_OBJECT( seqv->sliders_[0] ), "value_changed", G_CALLBACK( seq_speed ), + (gpointer*)seqv ); + g_signal_connect( G_OBJECT( seqv->sliders_[1] ), "value_changed", G_CALLBACK( seq_opacity ), + (gpointer*)seqv ); + + gtk_box_pack_start( GTK_BOX( hhbox ), seqv->sliders_[0], TRUE, TRUE, 0 ); + gtk_box_pack_start( GTK_BOX( hhbox ), seqv->sliders_[1], TRUE, TRUE, 0 ); + gtk_widget_show( seqv->sliders_[0] ); + gtk_widget_show( seqv->sliders_[1] ); + gtk_box_pack_start( GTK_BOX(vvvbox), hhbox, TRUE,TRUE, 0 ); + gtk_widget_show( hhbox ); + gtk_container_add( GTK_CONTAINER( box ), vvvbox ); + gtk_widget_show( vvvbox ); + gtk_widget_show( box ); + + + GtkWidget *hbox = gtk_hbox_new(FALSE,0); + gtk_box_set_spacing( GTK_BOX(hbox), 10 ); + seqv->labels_[0] = gtk_label_new( "00:00:00:00" ); + seqv->labels_[1] = gtk_label_new( "00:00:00:00" ); + gtk_box_pack_start( GTK_BOX( hbox ), seqv->labels_[0], FALSE, FALSE, 0 ); + gtk_box_pack_start( GTK_BOX( hbox ), seqv->labels_[1], FALSE, FALSE, 0 ); + gtk_widget_show( seqv->labels_[0] ); + gtk_widget_show( seqv->labels_[1] ); + gtk_box_pack_start( GTK_BOX(seqv->main_vbox), hbox, FALSE,FALSE, 0 ); + gtk_widget_show( hbox ); + + + gtk_widget_set_sensitive_(GTK_WIDGET(seqv->panel), FALSE ); + + gtk_widget_show( GTK_WIDGET( seqv->area ) ); + + return seqv; +} + + +static int vt__[16]; +static int vt___ = 0; +void *multitrack_sync( void * mt ) +{ + multitracker_t *m = (multitracker_t*) mt; + sync_info *s = gvr_sync( m->preview ); + if(!s) + return NULL; + + if(!vt___) + { + veejay_memset(vt__,0,sizeof(vt__)); + vt___ = 1; + } + + int i; + for( i =0; i < MAX_TRACKS ;i ++ ) + { + if(!vt__[i] && s->status_list[i] == NULL ) + { + //gtk_widget_set_sensitive_(GTK_WIDGET(m->view[i]), FALSE ); + vt__[i] = 1; + } + else if( s->status_list[i] && vt__[i] ) + { + //gtk_widget_set_sensitive_(GTK_WIDGET(m->view[i]), TRUE ); + vt__[i] = 0; + } + } + s->master = m->master_track; + return (void*)s; +} + +static int mt_new_connection_dialog(multitracker_t *mt, char *hostname,int len, int *port_num) +{ + GtkWidget *dialog = gtk_dialog_new_with_buttons( + "Connect to a Veejay", + GTK_WINDOW( mt->main_window ), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_REJECT, + GTK_STOCK_OK, + GTK_RESPONSE_ACCEPT, + NULL ); + + + GtkWidget *text_entry = gtk_entry_new(); + gtk_entry_set_text( GTK_ENTRY(text_entry), "localhost" ); + gtk_editable_set_editable( GTK_EDITABLE(text_entry), TRUE ); + gtk_dialog_set_default_response( GTK_DIALOG(dialog), GTK_RESPONSE_REJECT ); + gtk_window_set_resizable( GTK_WINDOW( dialog ), FALSE ); + + gint base = 3490; + + gint p = (1000 * (mt->selected)) + base; + + GtkObject *adj = gtk_adjustment_new( p,1024,65535,5,10,0); + GtkWidget *num_entry = gtk_spin_button_new( GTK_ADJUSTMENT(adj), 5.0, 0 ); + + GtkWidget *text_label = gtk_label_new( "Hostname" ); + GtkWidget *num_label = gtk_label_new( "Port" ); + g_signal_connect( G_OBJECT(dialog), "response", + G_CALLBACK( gtk_widget_hide ), G_OBJECT( dialog ) ); + + GtkWidget *vbox = gtk_vbox_new( FALSE, 4 ); + gtk_container_add( GTK_CONTAINER( vbox ), text_label ); + gtk_container_add( GTK_CONTAINER( vbox ), text_entry ); + gtk_container_add( GTK_CONTAINER( vbox ), num_label ); + gtk_container_add( GTK_CONTAINER( vbox ), num_entry ); + gtk_container_add( GTK_CONTAINER( GTK_DIALOG(dialog)->vbox), vbox ); + gtk_widget_show_all( dialog ); + + gint res = gtk_dialog_run( GTK_DIALOG(dialog) ); + + if( res == GTK_RESPONSE_ACCEPT ) + { + const gchar *host = gtk_entry_get_text( GTK_ENTRY( text_entry ) ); + gint port = gtk_spin_button_get_value( GTK_SPIN_BUTTON(num_entry )); + strncpy( hostname, host, len ); + *port_num = port; + } + + gtk_widget_destroy( dialog ); + + return res; +} + +void multitrack_resize( void *m , int w, int h ) +{ + multitracker_t *mt = (multitracker_t*) m; +// gtk_widget_set_size_request( mt->scroll, w, h ); +} + +void *multitrack_new( + void (*f)(int,char*,int), + int (*g)(GdkPixbuf *, GdkPixbuf *, GtkImage *), + GtkWidget *win, + GtkWidget *box, + GtkWidget *msg, + GtkWidget *preview_toggle, + gint max_w, + gint max_h, + GtkWidget *main_preview_area, + void *infog, + int threads) +{ + multitracker_t *mt = NULL; + + mt = (multitracker_t*) vj_calloc(sizeof(multitracker_t)); + mt->view = (sequence_view_t**) vj_calloc(sizeof(sequence_view_t*) * MAX_TRACKS ); + mt->preview = NULL; + mt->main_window = win; + mt->main_box = box; + mt->status_bar = msg; + mt->logo = load_logo_image(vj_get_preview_box_w(), vj_get_preview_box_h()); + mt->preview_toggle = preview_toggle; + mt->scroll = gtk_scrolled_window_new(NULL,NULL); +// gtk_widget_set_size_request(mt->scroll,300, 300); + gtk_container_set_border_width(GTK_CONTAINER(mt->scroll),1); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(mt->scroll),GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS ); + GtkWidget *table = gtk_table_new( 1, MAX_TRACKS, FALSE ); + gtk_box_pack_start( GTK_BOX( mt->main_box ), mt->scroll , TRUE,TRUE, 0 ); + gtk_widget_show(mt->scroll); + + int c = 0; + for( c = 0; c < MAX_TRACKS; c ++ ) + { + mt->view[c] = new_sequence_view( mt, c ); + gtk_table_attach_defaults( GTK_TABLE(table), mt->view[c]->event_box, c, c+1, 0, 1 ); + } + + gtk_scrolled_window_add_with_viewport( + GTK_SCROLLED_WINDOW( mt->scroll ), table ); + + gtk_widget_show(table); + + mt->master_track = 0; + + mt->preview = gvr_preview_init( MAX_TRACKS, threads ); + + parent__ = infog; + + return (void*) mt; +} + + +int multitrack_add_track( void *data ) +{ + multitracker_t *mt = (multitracker_t*) data; + int res = 0; + char *hostname = vj_calloc( 100 ); + int port_num = 0; + + if( mt_new_connection_dialog( mt, hostname, 100, &port_num ) == GTK_RESPONSE_ACCEPT ) + { + int track = 0; + + if( gvr_track_connect( mt->preview, hostname, port_num, &track ) ) + { + status_print( mt, "Connection established with veejay runnning on %s port %d", + hostname, port_num ); + if( gveejay_user_preview() ) + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(mt->view[track]->toggle), TRUE ); + gtk_widget_set_sensitive_(GTK_WIDGET(mt->view[track]->panel), TRUE ); + gtk_widget_set_sensitive_(GTK_WIDGET(mt->view[track]->toggle), TRUE ); + + res = 1; + } + else + { + status_print( mt, "Unable to open connection with %s : %d", hostname, port_num ); + } + } + + free( hostname ); + + return res; +} + +void multitrack_close_track( void *data ) +{ + multitracker_t *mt = (multitracker_t*) data; + + if( mt->selected > 0 && mt->selected < MAX_TRACKS ) + { + gvr_track_disconnect( mt->preview, mt->selected ); + mt->view[mt->selected]->status_lock = 1; + gtk_toggle_button_set_active( + GTK_TOGGLE_BUTTON(mt->view[mt->selected]->toggle), FALSE ); + gtk_widget_set_sensitive_(GTK_WIDGET(mt->view[mt->selected]->panel), FALSE ); + gtk_widget_set_sensitive_(GTK_WIDGET(mt->view[mt->selected]->toggle), FALSE ); + gtk_image_clear( GTK_IMAGE(mt->view[mt->selected]->area ) ); + mt->view[mt->selected]->status_lock = 0; + + } + +} + +int multrack_audoadd( void *data, char *hostname, int port_num ) +{ + multitracker_t *mt = (multitracker_t*) data; + + int track = 0; + + if(!gvr_track_connect( mt->preview, hostname, port_num, &track ) ) + { + if(!gvr_track_already_open( mt->preview, hostname,port_num)) + return -1; + } + + if(mt->pw > 0 && mt->ph > 0 ) + { + //sequence_preview_size( mt, mt->master_track ); + + /* configure master preview size */ + if(!gvr_track_configure( mt->preview, track, mt->pw,mt->ph) ) + { + veejay_msg(0, "Unable to configure preview %d x %d",mt->pw , mt->ph ); + } + + + int preview = gvr_get_preview_status( mt->preview, mt->master_track ); + + /* set status of preview toggle button in trackview */ + if( track == 0 ) + { + // mt->view[track]->status_lock=1; + // gtk_toggle_button_set_active( + // GTK_TOGGLE_BUTTON( mt->preview_toggle), (preview ? TRUE: FALSE ) ); + // mt->view[track]->status_lock=0; + } + else + { + mt->view[track]->status_lock=1; + gtk_toggle_button_set_active( + GTK_TOGGLE_BUTTON( mt->view[track]->toggle ), (preview ? TRUE: FALSE ) ); + mt->view[track]->status_lock=0; + + } + } + + mt->master_track = track; + gvr_set_master( mt->preview, track ); + + gtk_widget_set_sensitive_(GTK_WIDGET(mt->view[track]->panel), TRUE ); + + + return track; +} + +int multitrack_locked( void *data) +{ + multitracker_t *mt = (multitracker_t*) data; + + return mt->view[mt->master_track]->status_lock; +} + +#define RUP8(num)(num/8*8) + +void multitrack_configure( void *data, float fps, int video_width, int video_height, int *box_w, int *box_h ) +{ + multitracker_t *mt = (multitracker_t*) data; + mt->fps = fps; + mt->width = video_width; + mt->height = video_height; + float r = (float)mt->width / (float) mt->height; + mt->aspect_ratio = r; + + if( mt->height > 300 ) { + mt->height = 288; + mt->width = (int) ( (float) mt->height * r ); + } + if( mt->width > 360 ) { + mt->width = 352; + mt->height = mt->width / r; + } + + mt->width = RUP8(mt->width); + mt->height = RUP8(mt->height); + + *box_w = mt->width; + *box_h = mt->height; + + veejay_msg(VEEJAY_MSG_DEBUG, "Multitrack %d x %d, %2.2f, ratio %f", mt->width,mt->height,mt->fps,r); +} + +void multitrack_set_quality( void *data , int quality ) +{ + multitracker_t *mt = (multitracker_t*) data; + + int w = 0; + int h = 0; + + switch( quality ) + { + case 1: + w = mt->width; + h = (float) w / mt->aspect_ratio; + break; + case 0: + w = mt->width >> 1; + h = (float)w / mt->aspect_ratio; + break; + case 2: + w = mt->width >> 2; + h = (float)w/ mt->aspect_ratio; + break; + case 3: + w = mt->width >> 3; + h = (float)w / mt->aspect_ratio; + break; + } + + if( w > 16 && h > 16 ) + { + w = RUP8(w); + h = RUP8(h); + } + else + { + w = RUP8(mt->width); + h = RUP8(mt->height); + } + + veejay_msg(VEEJAY_MSG_DEBUG, + "Preview image dimensions set to %d x %d",w,h); + + if(!gvr_track_configure( mt->preview, mt->master_track,w,h ) ) + { + veejay_msg(0, "Unable to configure preview %d x %d",w , h ); + } + + mt->pw = w; + mt->ph = h; +} + +void multitrack_set_logo(void *data , GtkWidget *img) +{ + multitracker_t *mt = (multitracker_t*) data; + gtk_image_set_from_pixbuf_( GTK_IMAGE(img), mt->logo ); +} + +void multitrack_toggle_preview( void *data, int track_id, int status, GtkWidget *img ) +{ + multitracker_t *mt = (multitracker_t*) data; + if(track_id == -1 ) + { + gvr_track_toggle_preview( mt->preview, mt->master_track, status ); + veejay_msg(2, "VeejayGrabber: master preview %s", (status ? "enabled" : "disabled") ); + } +} + +void multitrack_release_track(void *data, int id, int release_this ) +{ + multitracker_t *mt = (multitracker_t*) data; + int stream_id = 0; + + //release this: track um + + stream_id = gvr_get_stream_id( mt->preview, release_this ); + if(stream_id > 0) + gvr_queue_mvims( mt->preview, id, VIMS_STREAM_DELETE,stream_id ); +} + +void multitrack_bind_track( void *data, int id, int bind_this ) +{ + multitracker_t *mt = (multitracker_t*) data; + + if( bind_this < 0 || bind_this > MAX_TRACKS ) + return; + + if( id < 0 || id > MAX_TRACKS ) + return; + + char *host = gvr_track_get_hostname( mt->preview, bind_this ); + int port = gvr_track_get_portnum ( mt->preview, bind_this ); + + if( host != NULL && port > 0 ) + gvr_queue_cxvims( mt->preview, id, VIMS_STREAM_NEW_UNICAST, port, (unsigned char*)host ); +} + +void multitrack_update_sequence_image( void *data , int track, GdkPixbuf *img ) +{ + multitracker_t *mt = (multitracker_t*) data; + + float ratio = mt->width / (float) mt->height; + int w = 160; + int h = ((int) (float )w / ratio )/16 *16; + + GdkPixbuf *scaled = vj_gdk_pixbuf_scale_simple( img, w, h, GDK_INTERP_BILINEAR ); + gtk_image_set_from_pixbuf( GTK_IMAGE(mt->view[track]->area), scaled); + + gdk_pixbuf_unref( scaled ); +} + + +static gboolean seqv_mouse_press_event ( GtkWidget *w, GdkEventButton *event, gpointer user_data) +{ + sequence_view_t *v = (sequence_view_t*) user_data; + multitracker_t *mt = v->backlink; + + if(event->type == GDK_2BUTTON_PRESS) + { + if( !gvr_track_test( mt->preview , v->num ) ) + return FALSE; + + mt->selected = v->num; + + vj_gui_disable(); + + // hostname, port_num from gvr + char *host = gvr_track_get_hostname( mt->preview, v->num ); + int port = gvr_track_get_portnum ( mt->preview, v->num ); + + if(!host || port <= 0 ) + { + vj_gui_enable(); + return FALSE; + } + + vj_gui_cb( 0, host, port ); + vj_gui_enable(); + } + + if( event->type == GDK_BUTTON_PRESS ) + { + mt->selected = v->num; + } + + return FALSE; +} + + + + + diff --git a/veejay-client/src/multitrack.h b/veejay-client/src/multitrack.h new file mode 100644 index 00000000..1072b5b0 --- /dev/null +++ b/veejay-client/src/multitrack.h @@ -0,0 +1,55 @@ +#ifndef MTRACK_H +#define MTRACK_H + +void *multitrack_new( + void (*f)(int,char*,int), + int (*g)(GdkPixbuf *, GdkPixbuf *, GtkImage *), + GtkWidget *win, + GtkWidget *box, + GtkWidget *msg, + GtkWidget *button, + gint max_w, + gint max_h, + GtkWidget *main_preview_area, + void *gui, + int threads); + + +void multitrack_set_logo(void *data , GtkWidget *img); + +int multitrack_add_track( void *data ); + +void multitrack_close_track( void *data ); + +int multrack_audoadd( void *data, char *hostname, int port_num ); + +void multitrack_release_track(void *data, int id, int release_this ); + +void multitrack_bind_track( void *data, int id, int bind_this ); + +void multitrack_sync_simple_cmd2( void *data, int vims, int arg ); + + +void *multitrack_sync( void * mt ); + +void multitrack_configure( void *data, float fps, int video_width, int video_height, int *bw, int *bh ); + + +void multitrack_update_sequence_image( void *data , int track, GdkPixbuf *img ); + +int update_multitrack_widgets( void *data, int *array, int track ); + +int multitrack_locked( void *data); + +void multitrack_toggle_preview( void *data, int track_id, int status, GtkWidget *img ); + +void multitrack_set_quality( void *data , int quality ); + +void multitrack_sync_start(void *data); + +void multitrack_sync_simple_cmd( void *data, int vims, int arg ); + +void multitrack_resize( void *m , int w, int h ); + +#endif + diff --git a/veejay-client/src/reloaded b/veejay-client/src/reloaded new file mode 100755 index 00000000..078e5311 Binary files /dev/null and b/veejay-client/src/reloaded differ diff --git a/veejay-client/src/sequence.c b/veejay-client/src/sequence.c new file mode 100644 index 00000000..59e42376 --- /dev/null +++ b/veejay-client/src/sequence.c @@ -0,0 +1,1040 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2006 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include AVUTIL_INC +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif +extern void reloaded_schedule_restart(); +typedef struct +{ + uint8_t *image_data[16]; + uint8_t *status_tokens[16]; + int widths[16]; + int heights[16]; + int active_list[16]; + int frame_list[16]; +} track_sync_t; + +typedef struct +{ + char *hostname; + int port_num; + vj_client *fd; + uint8_t *data_buffer; + uint8_t *tmp_buffer; + uint8_t *status_buffer; + int track_list[16]; + int track_items; //shared + int status_tokens[32]; //shared + int active; + int have_frame; + int grey_scale; + int preview; + int width; + int height; + int need_track_list; + unsigned char *queue[16]; + int n_queued; + int bw; + int is_master; +} veejay_track_t; + +typedef struct +{ + void *lzo; + veejay_track_t **tracks; + int n_tracks; + int state; + track_sync_t *track_sync; +#ifdef STRICT_CHECKING + int locked; + char **locklist[256]; +#endif +} veejay_preview_t; + +static int sendvims( veejay_track_t *v, int vims_id, const char format[], ... ); +static int recvvims( veejay_track_t *v, gint header_len, gint *payload, guchar *buffer ); +static int veejay_get_image_data(veejay_preview_t *vp, veejay_track_t *v ); +static int track_find( veejay_preview_t *vp ); +static int veejay_process_status( veejay_preview_t *vp, veejay_track_t *v ); +static int gvr_preview_process_image( veejay_preview_t *vp, veejay_track_t *v ); +static int track_exists( veejay_preview_t *vp, const char *hostname, int port_num, int *at ); +static int gvr_preview_process_status( veejay_preview_t *vp, veejay_track_t *v ); + +static GStaticRecMutex mutex_ = G_STATIC_REC_MUTEX_INIT; + +static float get_ratio(int w, int h) +{ + return ( (float) w / (float) h); +} + + + +void *gvr_preview_init(int max_tracks, int use_threads) +{ + veejay_preview_t *vp = (veejay_preview_t*) vj_calloc(sizeof( veejay_preview_t )); + GError *err = NULL; + //vp->mutex = g_mutex_new(); + vp->tracks = (veejay_track_t**) vj_calloc(sizeof( veejay_track_t*) * max_tracks ); + vp->track_sync = (track_sync_t*) vj_calloc(sizeof( track_sync_t )); + int i; + for( i = 0; i < max_tracks; i++ ) + vp->track_sync->status_tokens[i] = (int*) vj_calloc(sizeof(int) * 32); + + vp->n_tracks = max_tracks; + + yuv_init_lib(); + + return (void*) vp; +} + +static void gvr_close_connection( veejay_track_t *v ) +{ + if(v) + { + veejay_msg(VEEJAY_MSG_WARNING, "Stopping VeejayGrabber to %s:%d", + v->hostname,v->port_num ); + vj_client_close(v->fd); + vj_client_free(v->fd); + if(v->hostname) free(v->hostname); + if(v->status_buffer) free(v->status_buffer); + if(v->data_buffer) free(v->data_buffer); + if(v->tmp_buffer) free(v->tmp_buffer); + + free(v); + v= NULL; + } +} + +static int sendvims( veejay_track_t *v, int vims_id, const char format[], ... ) +{ + gchar block[255]; + gchar tmp[255]; + va_list args; + gint n; + if( format == NULL ) + { + g_snprintf( block, sizeof(block)-1, "%03d:;", vims_id ); + n = vj_client_send( v->fd, V_CMD, block ); + if( n <= 0 ) { + if( n == -1 && v->is_master ) + reloaded_schedule_restart(); + return 0; + } + return n; + } + + va_start( args, format ); + vsnprintf( tmp, sizeof(tmp)-1, format, args ); + g_snprintf( block,sizeof(block)-1, "%03d:%s;", vims_id, tmp ); + va_end( args ); + + n = vj_client_send( v->fd, V_CMD, block ); + if( n <= 0 ) { + if( n == -1 && v->is_master ) + reloaded_schedule_restart(); + } + return n; +} + +static int recvvims( veejay_track_t *v, gint header_len, gint *payload, guchar *buffer ) +{ + gint tmp_len = header_len + 1; + unsigned char *tmp = vj_calloc( tmp_len ); + gint len = 0; + gint n = vj_client_read( v->fd, V_CMD, tmp, header_len ); + + if( n<= 0 ) + { + if( n == -1 && v->is_master) + reloaded_schedule_restart(); + veejay_msg(0,"Reading header of %d bytes: %d", header_len,n ); + free(tmp); + return 0; + } + + if( sscanf( (char*)tmp, "%6d%1d", &len,&(v->grey_scale) )<=0) + { + veejay_msg(0, "Can't parse header (datastream polluted)"); + free(tmp); + return 0; + } + + if( len <= 0 ) + { + free(tmp); + veejay_msg(0, "Frame is empty"); + return 0; + } + + gint bw = 0; + gint bytes_read = len; + unsigned char *buf_ptr = buffer; + + *payload = 0; + + while( bw < len ) + { + n = vj_client_read( v->fd, V_CMD, buf_ptr, bytes_read ); + if ( n <= 0 ) + { + if( n == -1 && v->is_master ) + reloaded_schedule_restart(); + veejay_msg(0, "Received %d out of %d bytes", bw,len); + free(tmp); + return 0; + } + bw += n; + + bytes_read -= n; + buf_ptr += bw; + } + *payload = bw; + + free(tmp); + return 1; +} + + +static unsigned char *vims_track_list( veejay_track_t *v, int slen, int *bytes_written ) +{ + unsigned char message[10]; + int tmp_len = slen + 1; + unsigned char *tmp = vj_calloc( tmp_len ); + + sprintf(message, "%03d:;", VIMS_TRACK_LIST ); + int ret = vj_client_send( v->fd, V_CMD, message ); + if( ret <= 0) + { + if( ret == -1 && v->is_master ) + reloaded_schedule_restart(); + free(tmp); + return NULL; + } + + ret = vj_client_read( v->fd, V_CMD, tmp, slen ); + if( ret <= 0 ) + { + + if( ret == -1 && v->is_master ) + reloaded_schedule_restart(); + free(tmp); + return NULL; + } + + int len = 0; + sscanf( (char*) tmp, "%d", &len ); + unsigned char *result = NULL; + + if( len <= 0 || slen <= 0) + { + free(tmp); + return result; + } + + result = (unsigned char*) vj_calloc(sizeof( unsigned char) * (len + 1) ); + int bytes_left = len; + *bytes_written = 0; + + while( bytes_left > 0) + { + int n = vj_client_read( v->fd, V_CMD, result + (*bytes_written), bytes_left ); + if( n <= 0 ) + { + if( n == -1 && v->is_master ) + reloaded_schedule_restart(); + bytes_left = 0; + } + if( n > 0 ) + { + *bytes_written +=n; + bytes_left -= n; + } + } + free(tmp); + return result; +} + + +static int veejay_process_status( veejay_preview_t *vp, veejay_track_t *v ) +{ + unsigned char status_len[6]; + veejay_memset( status_len, 0, sizeof(status_len) ); + gint n = vj_client_read( v->fd, V_STATUS, status_len, 5 ); + if( n <= 0 && v->is_master ) + reloaded_schedule_restart(); + + if( status_len[0] == 'V' ) + { + gint bytes = 0; + sscanf( status_len + 1, "%03d", &bytes ); + if( bytes > 0 ) + { + veejay_memset( v->status_buffer,0, sizeof(v->status_buffer)); + n = vj_client_read( v->fd, V_STATUS, v->status_buffer, bytes ); + if( n <= 0 ) + { + if( n == -1 && v->is_master ) + reloaded_schedule_restart(); + veejay_msg(0, "Status message corrupted."); + return 0; + } + int k = -1; + while( (k = vj_client_poll( v->fd, V_STATUS )) ) // is there a more recent message? + { + veejay_memset( status_len, 0, sizeof( status_len ) ); + n = vj_client_read(v->fd, V_STATUS, status_len, 5 ); + if( n == -1 && v->is_master ) + reloaded_schedule_restart(); + sscanf( status_len+1, "%03d", &bytes ); + if(bytes > 0 ) + { + n = vj_client_read( v->fd, V_STATUS, v->status_buffer, bytes ); + if( n <= 0 ) { + if( n == -1 && v->is_master ) + reloaded_schedule_restart(); + + break; + } + } + } + if( k == -1 && v->is_master ) + reloaded_schedule_restart(); + veejay_memset( v->status_tokens,0, sizeof(sizeof(int) * 32)); + status_to_arr( v->status_buffer, v->status_tokens ); + return 1; + } + } + else + { + while( ( n = vj_client_poll( v->fd, V_STATUS ))) + { + char trashcan[100]; + int k = vj_client_read( v->fd, V_STATUS, trashcan,sizeof(trashcan)); + if( k == -1 && v->is_master ) + reloaded_schedule_restart(); + if( k <= 0 ) + break; + } + if( n == -1 && v->is_master ) + reloaded_schedule_restart(); + } + return 1; +} +extern int is_button_toggled(const char *name); +#define RUP8(num)(((num)+8)&~8) + +static int veejay_get_image_data(veejay_preview_t *vp, veejay_track_t *v ) +{ + if(!v->have_frame && (v->width <= 0 || v->height <= 0) ) + return 1; + gint res = sendvims( v, VIMS_RGB24_IMAGE, "%d %d", v->width,v->height ); + if( res <= 0 ) + { + v->have_frame = 0; + return 0; + } + gint bw = 0; + + res = recvvims( v, 7, &bw, v->data_buffer ); + if( res <= 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Can't get a preview image"); + v->have_frame = 0; + return 0; + } + + int expected_len = (v->width * v->height) + (v->width*v->height/2); + + if( bw != (v->width * v->height) && bw != expected_len ) + { +//@ try to fallback to a different resolution + veejay_msg(VEEJAY_MSG_WARNING, "Corrupted image. Should be %dx%d but have %d bytes %s", + v->width,v->height,abs(bw - expected_len),( (bw-expected_len<0)? "too few" : "too many") ); + v->have_frame = 0; +#ifdef STRICT_CHECKING + assert(0); +#endif + return 0; + } + + uint8_t *in = v->data_buffer; + uint8_t *out = v->tmp_buffer; +#ifdef STRICT_CHECKING + if( v->grey_scale ) + assert( bw == (v->width * v->height)); + else + assert( bw == ( (v->width*v->height) + (v->width*v->height)/2 ) ); +#endif + v->bw = 0; + + VJFrame *src1 = NULL; + if( v->grey_scale == 0 ) + src1 = yuv_yuv_template( in, in + (v->width * v->height), + in + (v->width * v->height) + (v->width*v->height)/4 , + v->width,v->height, PIX_FMT_YUV420P ); + else + src1 = yuv_yuv_template( in, in, in, v->width,v->height, PIX_FMT_GRAY8 ); + VJFrame *dst1 = NULL; + + dst1 = yuv_rgb_template( out, v->width,v->height, PIX_FMT_BGR24 ); + + yuv_convert_any_ac( src1, dst1, src1->format, dst1->format ); + v->have_frame = 1; + + free(src1); + free(dst1); + + return bw; +} + + +static int gvr_preview_process_status( veejay_preview_t *vp, veejay_track_t *v ) +{ + if(!v) + return 0; + int tmp1 = 0; + tmp1 = vj_client_poll( v->fd , V_STATUS ); + if(tmp1) + { + int k = veejay_process_status( vp, v ); + if( k == -1 && v->is_master) + reloaded_schedule_restart(); + } + else if( tmp1 == -1 ) + { + if(v->is_master) + reloaded_schedule_restart(); + else + gvr_close_connection(v); + } + return 0; +} + +static int gvr_preview_process_image( veejay_preview_t *vp, veejay_track_t *v ) +{ + if( veejay_get_image_data( vp, v ) == 0 ) + return 0; + return 1; +} + +void gvr_set_master(void *data, int master_track ) +{ + veejay_preview_t *vp = (veejay_preview_t*) data; + int i; + for( i = 0; i < vp->n_tracks; i ++ ) + if( vp->tracks[i] ) + vp->tracks[i]->is_master = 0; + vp->tracks[master_track]->is_master = 1; +} + +static int track_exists( veejay_preview_t *vp, const char *hostname, int port_num, int *at_track ) +{ + int i; + + for( i = 0; i < vp->n_tracks ; i++ ) + { + if( vp->tracks[i] ) + { + veejay_track_t *v = vp->tracks[i]; + if( strcasecmp( hostname, v->hostname ) == 0 && v->port_num == port_num ) + { + if( at_track ) + *at_track = i; + return 1; + } + } + } + return 0; +} + +int gvr_track_test( void *preview, int track_id ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + if( track_id < 0 || track_id > vp->n_tracks ) + return 0; + return (vp->tracks[track_id] ? 1:0); +} + +static int track_find( veejay_preview_t *vp ) +{ + int i; + int res = -1; + for( i = 0;i < vp->n_tracks ;i ++ ) + { + if( !vp->tracks[i] ) + { + res = i; + break; + } + } + return res; +} + +char* gvr_track_get_hostname( void *preview , int num ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + + if( vp->tracks[num] ) + return vp->tracks[num]->hostname; + return NULL; +} + +int gvr_track_get_portnum( void *preview, int num) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + + if( vp->tracks[num] ) + return vp->tracks[num]->port_num; + return 0; +} + +int gvr_track_already_open( void *preview, const char *hostname, + int port ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + + if(track_exists( vp, hostname, port, NULL ) ) + return 1; + return 0; +} + +int gvr_track_connect( void *preview, const char *hostname, int port_num, int *new_track ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + int track_num = track_find( vp ); + + if(track_num == -1) + { + vj_msg(0, "All tracks used."); + return 0; + } + if(track_exists( vp, hostname, port_num, new_track ) ) + { + vj_msg(VEEJAY_MSG_WARNING, "Veejay '%s':%d already in track %d", hostname, port_num, *new_track ); + return 0; + } + vj_client *fd = vj_client_alloc(0,0,0); + if(!vj_client_connect( fd, hostname, NULL, port_num ) ) + { + vj_msg(VEEJAY_MSG_ERROR, "Unable to connect to %s:%d", hostname, port_num ); + vj_client_free( fd ); + return 0; + } + + veejay_track_t *vt = (veejay_track_t*) vj_calloc( sizeof(veejay_track_t)); + vt->hostname = strdup(hostname); + vt->port_num = port_num; + vt->active = 1; + vt->fd = fd; + vt->preview = is_button_toggled( "previewtoggle" ); + + vt->status_buffer = (uint8_t*) vj_calloc(sizeof(uint8_t) * 256); + vt->data_buffer = (uint8_t*) vj_calloc(sizeof(uint8_t) * 512 * 512 * 3 ); + vt->tmp_buffer = (uint8_t*) vj_calloc(sizeof(uint8_t) * 512 * 512 * 3 ); + + *new_track = track_num; + + vp->tracks[ track_num ] = vt; + vp->track_sync->active_list[ track_num ] = 1; + return 1; +} + + +static void gvr_single_queue_vims( veejay_track_t *v, int vims_id ) +{ + char message[10]; + + sprintf(message, "%03d:;", vims_id ); + + if( v->n_queued < 16 ) + { + v->queue[ v->n_queued ] = strdup( message ); + v->n_queued ++; + } +} + +static void gvr_multi_queue_vims( veejay_track_t *v, int vims_id, int val ) +{ + char message[10]; + + sprintf(message, "%03d:%d;", vims_id,val ); + + if( v->n_queued < 16 ) + { + v->queue[ v->n_queued ] = strdup( message ); + v->n_queued ++; + } +} +static void gvr_multivx_queue_vims( veejay_track_t *v, int vims_id, int val1,unsigned char *val2 ) +{ + char message[300]; + + sprintf(message, "%03d:%d %s;", vims_id,val1,val2 ); + + if( v->n_queued < 16 ) + { + v->queue[ v->n_queued ] = strdup( message ); + v->n_queued ++; + } +} + +static void gvr_multiv_queue_vims( veejay_track_t *v, int vims_id, int val1,int val2 ) +{ + char message[10]; + + sprintf(message, "%03d:%d %d;", vims_id,val1,val2 ); + + if( v->n_queued < 16 ) + { + v->queue[ v->n_queued ] = strdup( message ); + v->n_queued ++; + } +} +void gvr_queue_cxvims( void *preview, int track_id, int vims_id, int val1,unsigned char *val2 ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + int i; + + if( track_id == -1 ) + { + for( i = 0; i < vp->n_tracks; i ++ ) + if( vp->tracks[i] && vp->tracks[i]->active ) + gvr_multivx_queue_vims( vp->tracks[i], vims_id,val1,val2 ); + } + else + { + if( vp->tracks[track_id] && vp->tracks[track_id]->active) + gvr_multivx_queue_vims( vp->tracks[track_id], vims_id,val1,val2 ); + } +} + +void gvr_queue_vims( void *preview, int track_id, int vims_id ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + int i; + + if( track_id == -1 ) + { + for( i = 0; i < vp->n_tracks; i ++ ) + if( vp->tracks[i] && vp->tracks[i]->active ) + gvr_single_queue_vims( vp->tracks[i], vims_id ); + } + else + { + if( vp->tracks[track_id] && vp->tracks[track_id]->active) + gvr_single_queue_vims( vp->tracks[track_id], vims_id ); + } +} + +void gvr_queue_mvims( void *preview, int track_id, int vims_id, int val ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + int i; + + if( track_id == -1 ) + { + for( i = 0; i < vp->n_tracks ; i ++ ) + if( vp->tracks[i] && vp->tracks[i]->active ) + gvr_multi_queue_vims( vp->tracks[i], vims_id,val ); + } + else + { + if( vp->tracks[track_id] && vp->tracks[track_id]->active ) + gvr_multi_queue_vims( vp->tracks[track_id], vims_id,val ); + } +} + +void gvr_need_track_list( void *preview, int track_id ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + veejay_track_t *v = vp->tracks[track_id]; + if(v) + v->need_track_list = 1; +} + +void gvr_queue_mmvims( void *preview, int track_id, int vims_id, int val1,int val2 ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + int i; + + if( track_id == -1 ) + { + for( i = 0; i < vp->n_tracks; i ++ ) + if( vp->tracks[i] && vp->tracks[i]->active ) + gvr_multiv_queue_vims( vp->tracks[i], vims_id,val1,val2 ); + } + else + { + if( vp->tracks[track_id] && vp->tracks[track_id]->active) + gvr_multiv_queue_vims( vp->tracks[track_id], vims_id,val1,val2 ); + } +} + +void gvr_track_disconnect( void *preview, int track_num ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + + veejay_track_t *v = vp->tracks[ track_num ]; + if(v) + gvr_close_connection( v ); + vp->tracks[ track_num ] = NULL; + vp->track_sync->active_list[ track_num ] = 0; + +} + +int gvr_track_configure( void *preview, int track_num, int w, int h ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + if( vp->tracks[track_num] ) + { + vp->tracks[ track_num ]->width = w; + vp->tracks[ track_num ]->height = h; + } + + veejay_msg(VEEJAY_MSG_INFO, "VeejayGrabber to %s:%d started on Track %d in %dx%d", + vp->tracks[ track_num ]->hostname, + vp->tracks[ track_num ]->port_num, + track_num, + w,h); + + vp->track_sync->widths[track_num] = w; + vp->track_sync->heights[track_num] = h; + + return 1; +} + +int gvr_get_preview_status( void *preview, int track_num ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + if(!vp->tracks[track_num] ) + return 0; + return vp->tracks[track_num]->preview; +} + + +int gvr_track_toggle_preview( void *preview, int track_num, int status ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + vp->tracks[ track_num ]->preview = status; + + vj_msg(VEEJAY_MSG_INFO, "VeejayGrabber to %s:%d on Track %d %s", + vp->tracks[ track_num ]->hostname, + vp->tracks[ track_num ]->port_num, + track_num, + (status ? "starts loading images" : "stops loading images") ); + return status; +} + + + +static GdkPixbuf **gvr_grab_images(void *preview) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + GdkPixbuf **list = (GdkPixbuf**) vj_calloc( sizeof(GdkPixbuf*) * vp->n_tracks ); + if(!list) + return NULL; + + int i; + + for( i = 0; i < vp->n_tracks; i ++ ) + { + if( vp->tracks[i] && vp->tracks[i]->active && vp->track_sync->widths[i] > 0) + { +#ifdef STRICT_CHECKING + assert( vp->track_sync->widths[i] > 0 ); + assert( vp->track_sync->heights[i] > 0 ); +#endif + veejay_track_t *v = vp->tracks[i]; +//@FIXME HERE + list[i] =gdk_pixbuf_new_from_data(vp->tracks[i]->tmp_buffer,GDK_COLORSPACE_RGB,FALSE, + 8,vp->tracks[i]->width,vp->tracks[i]->height, + vp->tracks[i]->width*3,NULL,NULL ); + + } + } + + return list; +} + +static int *int_dup( int *status ) +{ + int *res = (int*) vj_calloc( sizeof(int) * 32 ); + int i; + for(i =0; i < 32 ; i ++ ) + res[i] = status[i]; + return res; +} + +static int **gvr_grab_stati( void *preview ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + int **list = (int**) vj_calloc( sizeof(int*) * vp->n_tracks ); + if(!list) + return NULL; + + int i; + + for( i = 0; i < vp->n_tracks; i ++ ) + if( vp->tracks[i] && vp->tracks[i]->active) + list[i] = int_dup( vp->tracks[i]->status_tokens ); + return list; +} + +static int *gvr_grab_widths( void *preview ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + int *list = (int**) vj_calloc( sizeof(int) * vp->n_tracks ); + if(!list) + return NULL; + + int i; + for( i = 0; i < vp->n_tracks; i ++ ) + if( vp->tracks[i] && vp->tracks[i]->active ) + list[i] = vp->track_sync->widths[i]; + + return list; +} +static int *gvr_grab_heights( void *preview ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + int *list = (GdkPixbuf**) vj_calloc( sizeof(int) * vp->n_tracks ); + if(!list) + return NULL; + + int i; + for( i = 0; i < vp->n_tracks; i ++ ) + if( vp->tracks[i] && vp->tracks[i]->active ) + list[i] = vp->track_sync->widths[i]; + + return list; +} + +sync_info *gvr_sync( void *preview ) +{ + veejay_preview_t *vp = (veejay_preview_t*) preview; + sync_info *s = (sync_info*) vj_calloc(sizeof(sync_info)); + + gvr_veejay_grabber_step( preview ); + + s->status_list = gvr_grab_stati( preview ); + s->tracks = vp->n_tracks; + s->widths = gvr_grab_widths( preview ); + s->heights = gvr_grab_heights( preview); + s->img_list = gvr_grab_images( preview ); + + return s; +} + + +static void gvr_parse_track_list( veejay_preview_t *vp, veejay_track_t *v, unsigned char *tmp, int len ) +{ + int i = 0; + int items = 0; + unsigned char *ptr = tmp; + + unsigned char **z = vj_calloc( sizeof( unsigned char * ) * vp->n_tracks ); + + while( i < len ) + { + int k = 0; + unsigned char k_str[4]; + strncpy( (char*) k_str,(char*) ptr, 3 ); + if( k > 0 ) + { + ptr += 3; + z[items] = strndup( (char*) ptr, k ); + items ++; + ptr += k; + } + i += ( 3 + k ); + } + + if( items > 0 ) + { + for( i = 0; i < items ; i ++ ) + { + int k; + int in_track = -1; + for( k = 0; k < vp->n_tracks ; k ++ ) + { + veejay_track_t *t = vp->tracks[k]; + if(t) + { + char hostname[255]; + int port = 0; + int stream_id = 0; + veejay_memset(hostname,0,255 ); + if( sscanf( (char*) z[i], "%s %d %d", hostname, &port, &stream_id )) + { + if( strcasecmp( hostname, t->hostname ) == 0 && + port == t->port_num ) + in_track = k; + } + } + } + + v->track_list[i] = in_track; + + free( z[i] ); + } + v->track_items = items; + } + + free( z ); +} + +int gvr_get_stream_id( void *data, int id ) +{ + veejay_preview_t *vp = (veejay_preview_t*) data; + + veejay_track_t *v = vp->tracks[id]; + + if(v) + return v->track_list[id]; + return 0; +} + +static void gvr_parse_queue( veejay_track_t *v ) +{ + int i; + + for( i = 0; i < v->n_queued ; i ++ ) + { + if( vj_client_send( v->fd, V_CMD, v->queue[i] ) == -1 && + v->is_master ) + reloaded_schedule_restart(); + free( v->queue[i] ); + v->queue[i] = NULL; + } + v->n_queued = 0; +} +static int gvr_veejay( veejay_preview_t *vp , veejay_track_t *v, int track_num ) +{ + int score = 0; + if( v->need_track_list || v->n_queued > 0 ) + { + if( v->need_track_list ) + { + int bw = 0; + unsigned char *tmp = vims_track_list( v, 5, &bw ); + gvr_parse_track_list( vp, v, tmp, bw ); + v->need_track_list = 0; + } + if( v->n_queued > 0 ) + { + gvr_parse_queue( v ); + } + score ++; + } + + if( v->preview ) + { + if( gvr_preview_process_image( vp,v )) + score++; + else + { + v->preview = 0; + vj_client_close(v->fd); + int ok = vj_client_connect( v->fd, v->hostname, NULL, v->port_num ); + if( ok <= 0 ) + { + veejay_msg(0, "VeejayGrabber: Unable to reconnect to %s, Destroying Track %d", + (v->hostname ? v->hostname : ""), + track_num ); + vj_client_free(v->fd); + if(v->hostname) free(v->hostname); + if(v->status_buffer) free(v->status_buffer); + if(v->data_buffer) free(v->data_buffer); + if(v->tmp_buffer) free(v->tmp_buffer); + free(v); + vp->tracks[track_num] = NULL; + if( v->is_master ) + reloaded_schedule_restart(); + } + else + { + v->preview = is_button_toggled( "previewtoggle"); + v->active = 1; + vj_msg(VEEJAY_MSG_WARNING, "VeejayGrabber: connected with %s:%d on Track %d %d x %d", + v->hostname, v->port_num, track_num, v->width,v->height); + } + } + + } + + return score; +} +#define MS_TO_NANO(a) (a *= 1000000) +static void net_delay(long nsec ) +{ + struct timespec ts; + ts.tv_sec = 0; + ts.tv_nsec = MS_TO_NANO( nsec); + nanosleep( &ts, NULL ); +} + +void gvr_veejay_grabber_step( void *data ) +{ + veejay_preview_t *vp = (veejay_preview_t*) data; + int i; + + int ac = 1; + int try_picture = 0; + + for( i = 0; i < vp->n_tracks ; i ++ ) + { + if( vp->tracks[i] && vp->tracks[i]->active) { + if(gvr_preview_process_status( vp, vp->tracks[i] )) + { + if( gvr_get_preview_status( vp, i ) ) + try_picture ++; + } + } + } + + long ttw = 0; + for( i = 0; i < vp->n_tracks ; i ++ ) + { + if( vp->tracks[i] && vp->tracks[i]->active) + { + if( vp->tracks[i] ) + ttw += gvr_veejay( vp, vp->tracks[i],i ); + } + } + +} + + diff --git a/veejay-client/src/sequence.h b/veejay-client/src/sequence.h new file mode 100644 index 00000000..2b1ea559 --- /dev/null +++ b/veejay-client/src/sequence.h @@ -0,0 +1,63 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2006 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef PREVIEWH +#define PREVIEWH +typedef struct +{ + int tracks; + int master; + int *widths; + int *heights; + int **status_list; + GdkPixbuf **img_list; +} sync_info; + +void *gvr_preview_init(int max_tracks, int use_thread); +int gvr_track_connect( void *preview, const char *hostname, int port_num, int *track_num ); +void gvr_track_disconnect( void *preview, int track_num ); +int gvr_track_configure( void *preview, int track_num, int w, int h); +int gvr_track_toggle_preview( void *preview, int track_num, int status ); +void gvr_need_track_list( void *preview, int track_id ); + +int gvr_get_stream_id( void *data, int id ); +void gvr_set_master( void *preview, int master_track ); +//format and queue vims messages from extern + +void gvr_queue_mmvims( void *preview, int track_id, int vims_id, int val1,int val2 ); +void gvr_queue_mvims( void *preview, int track_id, int vims_id, int val ); +void gvr_queue_vims( void *preview, int track_id, int vims_id ); + +void gvr_queue_cxvims( void *preview, int track_id, int vims_id, int val1,unsigned char *val2 ); + +int gvr_track_already_open( void *preview, const char *hostname, int port ); + +int gvr_get_preview_status( void *preview, int track_num ); + +char* gvr_track_get_hostname( void *preview , int num ); + +int gvr_track_get_portnum( void *preview, int num); + +int gvr_track_test( void *preview, int track_id ); + +sync_info *gvr_sync( void *preview ); + +#endif + + diff --git a/veejay-client/src/tracksources.c b/veejay-client/src/tracksources.c new file mode 100644 index 00000000..cb01dd80 --- /dev/null +++ b/veejay-client/src/tracksources.c @@ -0,0 +1,199 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +extern void veejay_release_track(int id, int release_this); +extern void veejay_bind_track( int id, int bind_this ); +extern int multitrack_get_sequence_view_id( void *data ); +extern gchar *_utf8str( const char *c_str ); + +typedef struct +{ + int track_id; + GtkWidget *view; +} track_view_t; + +static void cell_data_func( + GtkTreeViewColumn *col, GtkCellRenderer *renderer, + GtkTreeModel *model, GtkTreeIter *iter, + gpointer user_data) +{ + gint state; + gtk_tree_model_get(model, iter, 1, &state, -1 ); + + if(state==1) + g_object_set(renderer, "active", TRUE, NULL ); + else + g_object_set(renderer, "active", FALSE, NULL ); + g_object_set( renderer, "activatable", TRUE, NULL ); +} + +static void cell_toggled_callback( GtkCellRenderer *cell, gchar *path_string, gpointer user_data ) +{ + track_view_t *v = (track_view_t*) user_data; + GtkWidget *view = v->view; + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); + GtkTreePath *path = gtk_tree_path_new_from_string( path_string ); + GtkTreeIter iter; + + gtk_tree_model_get_iter( model, &iter, path ); + gchar *data = NULL; + gtk_tree_model_get( model, &iter,0, &data, -1 ); + + int id_data = -1; // invalid + char junk[32]; + if(sscanf( data, "%s %d", junk,&id_data ) == 2 ) + { + if( gtk_cell_renderer_toggle_get_active( GTK_CELL_RENDERER_TOGGLE( cell) ) ) + { + veejay_release_track( v->track_id, id_data); + } + else + { + veejay_bind_track( v->track_id, id_data ); + } + g_free(data); + } + gtk_tree_path_free( path ); +} + +extern int *sequence_get_track_status(void *priv ); + +void update_track_view( int n_tracks, GtkWidget *widget, void *user_data ) +{ + GtkTreeView *view = GTK_TREE_VIEW(widget); + GtkTreeModel *model = gtk_tree_view_get_model( view ); + GtkListStore *store = GTK_LIST_STORE( model ); + GtkTreeIter iter; + + gtk_list_store_clear( GTK_LIST_STORE( model ) ); + + int i; + int id = multitrack_get_sequence_view_id( user_data ); + for( i = 0; i < n_tracks; i ++ ) + { + if(id != i) + { + char name[12]; + sprintf(name,"Track %d", i); + gchar *uname = _utf8str( name ); + gtk_list_store_append( store, &iter ); + gtk_list_store_set( + store, &iter, + 0, uname, + 1, 0, + -1 ); + g_free( uname ); + } + } + + + gtk_tree_view_set_model( GTK_TREE_VIEW( widget ), model ); + +} + +GtkWidget *get_track_tree( void *data) +{ + track_view_t *t = (track_view_t*) data; + return t->view; +} + +void *create_track_view(int track_id, int ref_tracks, void *user_data) +{ + GtkCellRenderer *renderer, *wrenderer; + GtkTreeModel *model; + GtkWidget *view; + view = gtk_tree_view_new(); + renderer = gtk_cell_renderer_text_new(); + wrenderer = gtk_cell_renderer_toggle_new(); + + track_view_t *my_view = (track_view_t*) vj_calloc(sizeof(track_view_t)); + + gtk_cell_renderer_toggle_set_active( GTK_CELL_RENDERER_TOGGLE(wrenderer) , FALSE ); + + gtk_tree_view_insert_column_with_attributes( + GTK_TREE_VIEW( view ), + -1, + "T", + renderer, + "text", + 0, + NULL ); + gtk_tree_view_insert_column_with_attributes( + GTK_TREE_VIEW( view ), + -1, + "-", + wrenderer, + "activatable", + 1, + NULL); + +// GtkWidget *col = gtk_tree_view_get_column( GTK_TREE_VIEW(view) , 0 ); + GtkTreeViewColumn *col = gtk_tree_view_get_column( GTK_TREE_VIEW(view),0); + gtk_tree_view_column_set_fixed_width( col , 20 ); + + col = gtk_tree_view_get_column( GTK_TREE_VIEW( view ), 1 ); + gtk_tree_view_column_set_clickable( col , TRUE ); + gtk_tree_view_column_set_fixed_width( col , 10 ); + + gtk_tree_view_column_set_cell_data_func( col, + wrenderer, cell_data_func, NULL,NULL); + + /* build model */ + GtkListStore *store; + GtkTreeIter iter; + + store = gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_INT ); + int i; + for( i = 0; i < ref_tracks ; i ++ ) + { + if( i != track_id ) + { + char str[16]; + sprintf(str,"Track %d",i); + gchar *ustr = _utf8str( str ); + gtk_list_store_append( store, &iter ); + gtk_list_store_set( store, &iter, + 0, ustr, + 1, 0, + -1); + g_free(ustr); + } + } + + GtkTreeSelection *selection; + selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) ); + gtk_tree_selection_set_mode( selection, GTK_SELECTION_NONE ); + my_view->track_id = track_id; + my_view->view = view; + + g_assert( GTK_IS_TREE_VIEW( view ) ); + + model = GTK_TREE_MODEL( store ); + gtk_tree_view_set_model ( GTK_TREE_VIEW( view ), model ); + g_signal_connect( wrenderer, "toggled", + (GCallback) cell_toggled_callback, (gpointer*) my_view); + + + g_object_unref( model ); + + return (void*) my_view; +} diff --git a/veejay-client/src/tracksources.h b/veejay-client/src/tracksources.h new file mode 100644 index 00000000..b742fb5a --- /dev/null +++ b/veejay-client/src/tracksources.h @@ -0,0 +1,28 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef TRACCKSOURCES_H +#define TRACCKSOURCES_H + +GtkWidget *get_track_tree( void *data); + +void *create_track_view( int id, int ref, void *data ); + +void update_track_view( int n_tracks, GtkWidget *widget, void *user_data ); +#endif diff --git a/veejay-client/src/utils.c b/veejay-client/src/utils.c new file mode 100644 index 00000000..2896db12 --- /dev/null +++ b/veejay-client/src/utils.c @@ -0,0 +1,69 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include + +int status_to_arr( char *status, int *array ) +{ + int n = sscanf(status, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + array + 0, + array + 1, + array + 2, + array + 3, + array + 4, + array + 5, + array + 6, + array + 7, + array + 8, + array + 9, + array + 10, + array + 11, + array + 12, + array + 13, + array + 14, + array + 15, + array + 16, + array + 17, + array + 18, + array + 19, + array + 20, + array + 21, + array + 22 ); + return n; +} + +char *format_time(int pos, float fps) +{ + MPEG_timecode_t tc; + veejay_memset(&tc, 0,sizeof(MPEG_timecode_t)); + char *tmp = (char*) vj_malloc( 20 ); + y4m_ratio_t ratio = mpeg_conform_framerate( fps ); + int n = mpeg_framerate_code( ratio ); + + mpeg_timecode(&tc, pos, n, fps ); + + snprintf(tmp, 20, "%2d:%2.2d:%2.2d:%2.2d", + tc.h, tc.m, tc.s, tc.f ); + return tmp; +} + diff --git a/veejay-client/src/utils.h b/veejay-client/src/utils.h new file mode 100644 index 00000000..d4790f41 --- /dev/null +++ b/veejay-client/src/utils.h @@ -0,0 +1,25 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef GVRUTILS +#define GVRUTILS +int status_to_arr( char *status, int *array ); +char *format_time( int pos , float fps); +#endif + diff --git a/veejay-client/src/vj-api.c b/veejay-client/src/vj-api.c new file mode 100644 index 00000000..169113e1 --- /dev/null +++ b/veejay-client/src/vj-api.c @@ -0,0 +1,7528 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2004 Niels Elburg + * with contributions by Thomas Rheinhold (2005) + * (initial sampledeck representation in GTK) + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * If you are reading this code , you are insane. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include AVUTIL_INC +#include +#include +#include +#include +//if gtk2_6 is not defined, 2.4 is assumed. +#ifdef GTK_CHECK_VERSION +#if GTK_MINOR_VERSION >= 6 + #define HAVE_GTK2_6 1 +#endif +#if GTK_MINOR_VERSION >= 8 + #define HAVE_GTK2_8 1 +#endif +#endif +#ifdef STRICT_CHECKING +#include +#endif + + +static int TIMEOUT_SECONDS = 0; + +/* Stream type identifiers */ + +void vj_gui_set_timeout(int timer) +{ + TIMEOUT_SECONDS = timer; +} + +enum +{ + STREAM_NO_STREAM = 0, + STREAM_RED = 9, + STREAM_GREEN = 8, + STREAM_YELLOW = 7, + STREAM_BLUE = 6, + STREAM_WHITE = 4, + STREAM_VIDEO4LINUX = 2, + STREAM_DV1394 = 17, + STREAM_NETWORK = 13, + STREAM_MCAST = 14, + STREAM_YUV4MPEG = 1, + STREAM_AVFORMAT = 12, + STREAM_PICTURE = 5 +}; + +enum +{ + COLUMN_INT = 0, + COLUMN_STRING0, + COLUMN_STRINGA , + COLUMN_STRINGB, + COLUMN_STRINGC, + N_COLUMNS +}; +enum +{ + ENTRY_FXID = 0, + ENTRY_ISVIDEO = 1, + ENTRY_NUM_PARAMETERS = 2, + ENTRY_P0 = 3, + ENTRY_P1 = 4, + ENTRY_P2 = 5, + ENTRY_P3 = 6, + ENTRY_P4 = 7, + ENTRY_P5 = 8, + ENTRY_P6 = 9, + ENTRY_P7 = 10, + ENTRY_UNUSED = 11, + ENTRY_FXSTATUS = 12, + ENTRY_UNUSED2 = 13, + ENTRY_SOURCE = 14, + ENTRY_CHANNEL = 15 +}; + +enum +{ + SL_ID = 0, + SL_DESCR = 1, + SL_TIMECODE = 2 +}; + +enum +{ + HINT_CHAIN = 0, + HINT_EL = 1, + HINT_MIXLIST = 2, + HINT_SAMPLELIST = 3, + HINT_ENTRY = 4, + HINT_SAMPLE = 5, + HINT_SLIST = 6, + HINT_V4L = 7, + HINT_RECORDING = 8, + HINT_RGBSOLID = 9, + HINT_BUNDLES = 10, + HINT_HISTORY = 11, + HINT_MARKER = 12, + HINT_KF = 13, + HINT_SEQ_ACT = 14, + HINT_SEQ_CUR = 15, + NUM_HINTS = 16 +}; + +enum +{ + PAGE_CONSOLE =0, + PAGE_FX = 3, + PAGE_EL = 1, + PAGE_SAMPLEEDIT = 2, +}; + +typedef struct +{ + int channel; + int dev; +} stream_templ_t; + +enum +{ + V4L_DEVICE=0, + DV1394_DEVICE=1, +}; + +typedef struct +{ + int selected_chain_entry; + int selected_el_entry; + int selected_vims_entry; + int selected_vims_accel[2]; + int render_record; + int entry_tokens[21]; + int iterator; + int selected_effect_id; + int reload_hint[NUM_HINTS]; + gboolean reload_force_avoid; + int playmode; + int sample_rec_duration; + int streams[4096]; + int recording[2]; + int selected_mix_sample_id; + int selected_mix_stream_id; + int selected_rgbkey; + int priout_lock; + int pressed_key; + int pressed_mod; + int keysnoop; + int randplayer; + int expected_slots; + stream_templ_t strtmpl[2]; // v4l, dv1394 + int selected_parameter_id; // current kf + int selected_vims_type; + char *selected_vims_args; +} veejay_user_ctrl_t; + +typedef struct +{ + float fps; + float ratio; + int num_files; + int *offsets; + int num_frames; + int width; + int height; +} veejay_el_t; + +enum +{ + RUN_STATE_LOCAL = 1, + RUN_STATE_REMOTE = 2, +}; + +typedef struct +{ + gint event_id; + gint params; + gchar *format; + gchar *descr; + gchar *args; +} vims_t; + +typedef struct +{ + gint keyval; + gint state; + gchar *args; + gchar *vims; + gint event_id; +} vims_keys_t; + +static int user_preview = 0; +static int NUM_BANKS = 35; +static int NUM_SAMPLES_PER_PAGE = 12; +static int NUM_SAMPLES_PER_COL = 2; +static int NUM_SAMPLES_PER_ROW = 6; + +#define MOD_OFFSET 200 +#define SEQUENCE_LENGTH 1024 +#define MEM_SLOT_SIZE 32 + +static vims_t vj_event_list[VIMS_MAX]; +static vims_keys_t vims_keys_list[VIMS_MAX]; +static int vims_verbosity = 0; +#define livido_port_t vevo_port_t + +static vevo_port_t *fx_list_ = NULL; + +typedef struct +{ + GtkWidget *title; + GtkWidget *timecode; + GtkWidget *hotkey; +// GtkWidget *edit_button; + GtkTooltips *tips; + GtkWidget *image; + GtkWidget *frame; + GtkWidget *event_box; + GtkWidget *main_vbox; + GtkWidget *upper_hbox; + GtkWidget *upper_vbox; +} sample_gui_slot_t; + +typedef struct +{ + gint w; + gint h; + gdouble fps; + gint pixel_format; + gint sampling; + gint audio_rate; + gint norm; + gint sync; + gint timer; + gint deinter; + gchar *mcast_osc; + gchar *mcast_vims; + gint osc; + gint vims; +} config_settings_t; + +typedef struct +{ + GtkWidget *frame; + GtkWidget *image; + GtkWidget *event_box; + GtkWidget *main_vbox; + GdkPixbuf *pixbuf_ref; + gint sample_id; + gint sample_type; +} sequence_gui_slot_t; + +typedef struct +{ + gint slot_number; + gint sample_id; + gint sample_type; + gchar *title; + gchar *timecode; + gint refresh_image; + GdkPixbuf *pixbuf; + guchar *rawdata; +} sample_slot_t; + +typedef struct +{ + gint seq_start; + gint seq_end; + gint w; + gint h; + sequence_gui_slot_t **gui_slot; + sample_slot_t *selected; + gint envelope_size; +} sequence_envelope; + +typedef struct +{ + sample_slot_t *sample; +} sequence_slot_t; + + +typedef struct +{ + gint bank_number; + gint page_num; + sample_slot_t **slot; + sample_gui_slot_t **gui_slot; +} sample_bank_t; + +typedef struct +{ + char *hostname; + int port_num; + int state; // IDLE, PLAYING, RECONNECT, STOPPED + struct timeval p_time; + int w_state; // watchdog state + int w_delay; +} watchdog_t; + +typedef struct +{ + GladeXML *main_window; + vj_client *client; + int status_tokens[32]; /* current status tokens */ + int *history_tokens[4]; /* list last known status tokens */ + int status_passed; + int status_lock; + int slider_lock; + int parameter_lock; + int entry_lock; + int sample[2]; + int selection[3]; + gint status_pipe; + int sensitive; + int launch_sensitive; + struct timeval alarm; + struct timeval timer; +// GIOChannel *channel; + GdkColormap *color_map; + gint connecting; +// gint logging; + gint streamrecording; + gint samplerecording; +// gint cpumeter; + gint cachemeter; + gint image_w; + gint image_h; + veejay_el_t el; + veejay_user_ctrl_t uc; + GList *effect_info; + GList *devlist; + GList *chalist; + GList *editlist; + GList *elref; + long window_id; + int run_state; + int play_direction; + int load_image_slot; + GtkWidget *sample_bank_pad; + GtkWidget *quick_select; + GtkWidget *sample_sequencer; + sample_bank_t **sample_banks; + sample_slot_t *selected_slot; + sample_slot_t *selection_slot; + sample_gui_slot_t *selected_gui_slot; + sample_gui_slot_t *selection_gui_slot; + sequence_envelope *sequence_view; + sequence_envelope *sequencer_view; + int sequence_playing; + gint current_sequence_slot; +// GtkKnob *audiovolume_knob; +// GtkKnob *speed_knob; + int image_dimensions[2]; +// guchar *rawdata; + int prev_mode; + GtkWidget *tl; + config_settings_t config; + int status_frame; + int key_id; + GdkColor *fg_; + gboolean key_now; + void *mt; + watchdog_t watch; + int vims_line; + int quality; + int preview_locked; + void *midi; + struct timeval time_last; +} vj_gui_t; + +enum +{ + STATE_STOPPED = 0, + STATE_RECONNECT = 1, + STATE_PLAYING = 2, + STATE_CONNECT = 3, + STATE_DISCONNECT = 4, + STATE_BUSY = 5, + STATE_LOADING = 6, + STATE_WAIT_FOR_USER = 7, + STATE_QUIT = 8, +}; + +enum +{ + FXC_ID = 0, + FXC_FXID = 1, + FXC_FXSTATUS = 2, + FXC_KF =3, + FXC_N_COLS, +}; + +enum +{ + V4L_NUM=0, + V4L_NAME=1, + V4L_SPINBOX=2, + V4L_LOCATION=3, +}; + +enum +{ + VIMS_ID=0, + VIMS_DESCR=1, + VIMS_KEY=2, + VIMS_MOD=3, + VIMS_PARAMS=4, + VIMS_FORMAT=5, + VIMS_CONTENTS=6, +}; + +#define MAX_PATH_LEN 1024 +#define VEEJAY_MSG_OUTPUT 4 + +static vj_gui_t *info = NULL; +void reloaded_restart(); +void *get_ui_info() { return (void*) info; } +void reloaded_schedule_restart(); +/* global pointer to the sample-bank */ + +/* global pointer to the effects-source-list */ +static GtkWidget *effect_sources_tree = NULL; +static GtkListStore *effect_sources_store = NULL; +static GtkTreeModel *effect_sources_model = NULL; +static int num_tracks_ = 0; +static int default_preview_width_ = 176; +static int default_preview_height_ = 144; +/* global pointer to the editlist-tree */ +static GtkWidget *editlist_tree = NULL; +static GtkListStore *editlist_store = NULL; +static GtkTreeModel *editlist_model = NULL; +//void gtk_configure_window_cb( GtkWidget *w, GdkEventConfigure *ev, gpointer data ); +static int get_slider_val(const char *name); +void vj_msg(int type, const char format[], ...); +//static void vj_msg_detail(int type, const char format[], ...); +void msg_vims(char *message); +static void multi_vims(int id, const char format[],...); +static void single_vims(int id); +static gdouble get_numd(const char *name); +static void vj_kf_select_parameter(int id); +static int get_nums(const char *name); +static gchar *get_text(const char *name); +static void put_text(const char *name, char *text); +static void set_toggle_button(const char *name, int status); +static void update_slider_gvalue(const char *name, gdouble value ); +static void update_slider_value(const char *name, gint value, gint scale); +static void update_slider_range(const char *name, gint min, gint max, gint value, gint scaled); +//static void update_knob_range( GtkWidget *w, gdouble min, gdouble max, gdouble value, gint scaled ); +static void update_spin_range(const char *name, gint min, gint max, gint val); +static void update_spin_incr(const char *name, gdouble step, gdouble page); +//static void update_knob_value(GtkWidget *w, gdouble value, gdouble scale ); +static void update_spin_value(const char *name, gint value); +static void update_label_i(const char *name, int num, int prefix); +static void update_label_f(const char *name, float val); +static void update_label_str(const char *name, gchar *text); +static void update_globalinfo(int *his, int p, int k); +static gint load_parameter_info(); +static void load_v4l_info(); +static void reload_editlist_contents(); +static void load_effectchain_info(); +static void load_effectlist_info(); +static void load_sequence_list(); +static void load_samplelist_info(gboolean with_reset_slotselection); +static void load_editlist_info(); +static void disable_widget( const char *name ); +static void enable_widget(const char *name ); +static void setup_tree_spin_column(const char *tree_name, int type, const char *title); +static void setup_tree_text_column( const char *tree_name, int type, const char *title, int expand ); +static void setup_tree_pixmap_column( const char *tree_name, int type, const char *title ); +gchar *_utf8str( const char *c_str ); +static gchar *recv_vims(int len, int *bytes_written); +static GdkPixbuf * update_pixmap_kf( int status ); +static GdkPixbuf * update_pixmap_entry( int status ); +static gboolean +chain_update_row(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, + gpointer data); +int resize_primary_ratio_y(); +int resize_primary_ratio_x(); +static void update_rgbkey(); +static int count_textview_buffer(const char *name); +static void clear_textview_buffer(const char *name); +static void init_recorder(int total_frames, gint mode); +static void reload_bundles(); +static void update_rgbkey_from_slider(); +static gchar *get_textview_buffer(const char *name); +static void create_slot(gint bank_nr, gint slot_nr, gint w, gint h); +static void setup_samplebank(gint c, gint r); +static int add_sample_to_sample_banks( int bank_page,sample_slot_t *slot ); +static void update_sample_slot_data(int bank_num, int slot_num, int id, gint sample_type, gchar *title, gchar *timecode); +static gboolean on_slot_activated_by_key (GtkWidget *widget, GdkEventKey *event, gpointer user_data); +static gboolean on_slot_activated_by_mouse (GtkWidget *widget, GdkEventButton *event, gpointer user_data); +static sample_slot_t *vj_gui_get_sample_info(gint which_one, gint mode ); +static void add_sample_to_effect_sources_list(gint id, gint type, gchar *title, gchar *timecode); +static void set_activation_of_slot_in_samplebank(gboolean activate); +int gveejay_new_slot(int stream); +static int bank_exists( int bank_page, int slot_num ); +static int find_bank_by_sample(int sample_id, int sample_type, int *slot ); +static int add_bank( gint bank_num ); +static void set_selection_of_slot_in_samplebank(gboolean active); +static void remove_sample_from_slot(); +static void create_ref_slots(int envelope_size); +static void create_sequencer_slots(int n ); +//void setup_knobs(); +void free_samplebank(void); +void reset_samplebank(void); +int verify_bank_capacity(int *bank_page_, int *slot_, int sample_id, int sample_type ); +static void widget_get_rect_in_screen (GtkWidget *widget, GdkRectangle *r); +static void update_curve_widget(const char *name); +static void update_curve_accessibility(const char *name); +static void reset_tree(const char *name); +static void reload_srt(); +static void reload_fontlist(); +static void indicate_sequence( gboolean active, sequence_gui_slot_t *slot ); +static void set_textview_buffer(const char *name, gchar *utf8text); +void interrupt_cb(); +//static gboolean update_log(gpointer data); + + + +static struct +{ + const char *name; +} capt_card_set[] = +{ + { "v4l_expander" }, + { "v4l_brightness" }, + { "v4l_contrast" }, + { "v4l_hue" }, + { "v4l_saturation" }, + { "v4l_color" }, + { "v4l_white" }, + { NULL }, +}; + +static uint32_t preview_box_w_ = 352; +static uint32_t preview_box_h_ = 288; + +static void *bankport_ = NULL; + +int vj_get_preview_box_w() +{ + return preview_box_w_; +} + +int vj_get_preview_box_h() +{ + return preview_box_h_; +} + +static void gtk_image_set_from_pixbuf__( GtkImage *w, GdkPixbuf *p, const char *f, int l ) +{ +#ifdef STRICT_CHECKING + assert( GTK_IS_IMAGE(w) ); +#endif + gtk_image_set_from_pixbuf(w, p); +} + +static void gtk_widget_set_sensitive___( GtkWidget *w, gboolean state, const char *f, int l ) +{ +#ifdef STRICT_CHECKING + assert( GTK_IS_WIDGET(w) ); +#endif + gtk_widget_set_sensitive(w, state ); +} + +static void select_slot_(int pm, const char *f, int line); +static void select_slot__(int pm); + +#ifdef STRICT_CHECKING +#define gtk_widget_set_sensitive_( w,p ) gtk_widget_set_sensitive___( w,p,__FUNCTION__,__LINE__ ) +#define gtk_image_set_from_pixbuf_(w,p) gtk_image_set_from_pixbuf__( w,p, __FUNCTION__,__LINE__ ) +#define select_slot(a) select_slot_(a,__FUNCTION__,__LINE__ ) +#else +#define gtk_widget_set_sensitive_( w,p ) gtk_widget_set_sensitive( w,p ) +#define gtk_image_set_from_pixbuf_(w,p) gtk_image_set_from_pixbuf( w,p ) +#define select_slot(a) select_slot__(a) +#endif + +static struct +{ + const char *name; +} gwidgets[] = { + {"sample_panel"}, + {"stream_panel"}, + {"frame_fxtree"}, + {"frame_fxtree2"}, + {"frame_fxtree3"}, + {"frame_fxtree4"}, + {"button_sendvims"}, + {"button_087"}, + {"button_086"}, + {"button_081"}, + {"button_082"}, + {"button_080"}, + {"button_085"}, + {"button_084"}, + {"button_083"}, + {"button_084"}, + {"button_088"}, + {"button_samplestart"}, + {"button_sampleend"}, + {"button_fadeout"}, + {"button_fadein"}, + {"button_5_4"}, + {"button_200"}, + {"button_001"}, + {"button_252"}, + {"button_251"}, + {"button_054"}, + {"new_colorstream"}, + {"manualopacity"}, + {"button_fadedur"}, + {"vimsmessage"}, + {"button_clipcopy"}, + {"button_sample_play"}, + {"button_samplelist_open"}, + {"button_samplelist_save"}, + {"button_sample_del"}, + {"samplerand"}, + {"freestyle"}, + {"expander10"}, // edl + {"colorselection"}, + {"loglinear"}, + {"streamnew"}, + {"sampleadd"}, + {"samplepage"}, + {"rgbkey"}, + {"tree_sources"}, + {NULL} +}; +static struct +{ + const char *name; +} videowidgets[] = { + {"button_sendvims"}, + {"button_087"}, + {"button_086"}, + {"button_081"}, + {"button_082"}, + {"button_080"}, + {"button_085"}, + {"button_084"}, + {"button_083"}, + {"button_084"}, + {"button_088"}, + {"button_samplestart"}, + {"button_sampleend"}, + {NULL} +}; + +static struct +{ + const char *name; +} plainwidgets[] = +{ + {"manualopacity"}, + {"loglinear"}, + {"frame_fxtree"}, + {"frame_fxtree2"}, + {"frame_fxtree3"}, + {"frame_fxtree4"}, + {"rgbkey"}, + {"tree_sources"}, + {NULL} +}; + +enum +{ + TC_SAMPLE_L = 0, + TC_SAMPLE_F = 1, + TC_SAMPLE_S = 2, + TC_SAMPLE_M = 3, + TC_SAMPLE_H = 4, + TC_STREAM_F = 5, + TC_STREAM_M = 6, + TC_STREAM_H = 7 +}; + +static sample_slot_t *find_slot_by_sample( int sample_id , int sample_type ); +static sample_gui_slot_t *find_gui_slot_by_sample( int sample_id , int sample_type ); + +gchar *_utf8str(const char *c_str) +{ + gsize bytes_read = 0; + gsize bytes_written = 0; + GError *error = NULL; + if(!c_str) + return NULL; + char *result = (char*) g_locale_to_utf8( c_str, -1, &bytes_read, &bytes_written, &error ); + + if(error) + { + g_free(error); + if( result ) + g_free(result); + result = NULL; + } + + return result; +} + +GdkColor *widget_get_fg(GtkWidget *w ) +{ + if(!w) + return NULL; + GdkColor *c = (GdkColor*)vj_calloc(sizeof(GdkColor)); + GtkStyle *s = gtk_widget_get_style( w); + c->red = s->fg[0].red; + c->green = s->fg[0].green; + c->blue = s->fg[0].blue; + return c; +} + +GtkWidget *glade_xml_get_widget_( GladeXML *m, const char *name ) +{ + GtkWidget *widget = glade_xml_get_widget( m , name ); + if(!widget) + { + veejay_msg(0,"Missing widget: %s ",__FUNCTION__,name); + return NULL; + } +#ifdef STRICT_CHECKING + assert( widget != NULL ); +#endif + return widget; +} + +static void scan_devices( const char *name) +{ + GtkWidget *tree = glade_xml_get_widget_(info->main_window,name); + GtkListStore *store; + GtkTreeIter iter; + + reset_tree(name); + gint len = 0; + single_vims( VIMS_DEVICE_LIST ); + gchar *text = recv_vims(6,&len); + if(len <= 0|| !text ) + { + veejay_msg(VEEJAY_MSG_WARNING, "No capture devices found on veejay server"); + return; + } + GtkTreeModel *model = gtk_tree_view_get_model + (GTK_TREE_VIEW(tree)); + + store = GTK_LIST_STORE(model); + + gint offset =0; + gint i = 0; + gchar *ptr = text + offset; + while( offset < len ) + { + char tmp[4]; + + gchar *name = NULL; + gdouble gchannel = 1.0; + gchar *loca = NULL; + + gint name_len=0; + gint loc_len=0; + + strncpy(tmp,ptr+offset,3); + tmp[3] = '\0'; + offset += 3; + name_len = atoi( tmp ); + if(name_len <= 0 ) + { + veejay_msg(0, "Reading name of capture device: '%s'",ptr+offset ); + return; + } + name = strndup( ptr + offset, name_len ); + offset += name_len; + strncpy( tmp, ptr + offset, 3 ); + tmp[3] = '\0'; + offset += 3; + + loc_len = atoi( tmp ); + if( loc_len <= 0 ) + { + veejay_msg(0, "Reading location of capture device"); + return; + } + loca = strndup( ptr + offset, loc_len ); + offset += loc_len; + gchar *thename = _utf8str( name ); + gchar *theloca = _utf8str( loca ); + + gtk_list_store_append( store, &iter); + gtk_list_store_set( + store, &iter, + V4L_NUM, i, + V4L_NAME, thename, + V4L_SPINBOX, gchannel, + V4L_LOCATION, theloca, + -1); + + g_free(thename); + g_free(theloca); + + free(loca); + free(name); + i ++; + } + free(text); + + gtk_tree_view_set_model(GTK_TREE_VIEW(tree), model ); +} + +void on_devicelist_row_activated(GtkTreeView *treeview, + GtkTreePath *path, + GtkTreeViewColumn *col, + gpointer user_data) +{ + GtkTreeModel *model; + GtkTreeIter iter; + + model = gtk_tree_view_get_model(treeview); + if(gtk_tree_model_get_iter(model,&iter,path)) + { + gint channel = info->uc.strtmpl[0].channel; + gint num = info->uc.strtmpl[0].dev; + + multi_vims( VIMS_STREAM_NEW_V4L,"%d %d", + channel, + num + ); + gveejay_new_slot(MODE_STREAM); + + } +} + +gboolean device_selection_func( GtkTreeSelection *sel, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer userdata ) +{ + GtkTreeIter iter; + GValue val = { 0, }; + if( gtk_tree_model_get_iter( model, &iter, path ) ) + { + gint num = 0; + gtk_tree_model_get(model, &iter, V4L_NUM,&num, -1 ); + if(! path_currently_selected ) + { + gtk_tree_model_get_value(model, &iter, V4L_SPINBOX, &val); + info->uc.strtmpl[0].dev = num; + info->uc.strtmpl[0].channel = (int) g_value_get_float(&val); + } + } + return TRUE; +} + +static void setup_v4l_devices() +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "tree_v4ldevices"); + GtkListStore *store = gtk_list_store_new( 4, G_TYPE_INT, G_TYPE_STRING, G_TYPE_FLOAT, + G_TYPE_STRING ); + + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + GtkTreeSelection *sel = gtk_tree_view_get_selection( GTK_TREE_VIEW( tree ) ); + gtk_tree_selection_set_mode( sel, GTK_SELECTION_SINGLE ); + gtk_tree_selection_set_select_function( sel, device_selection_func, NULL,NULL ); + +// gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(tree), TRUE ); + + g_object_unref( G_OBJECT( store )); + setup_tree_text_column( "tree_v4ldevices", V4L_NUM, "#",0 ); + setup_tree_text_column( "tree_v4ldevices", V4L_NAME, "Device Name",1); + setup_tree_spin_column( "tree_v4ldevices", V4L_SPINBOX, "Channel"); + setup_tree_text_column( "tree_v4ldevices", V4L_LOCATION, "Location",0); + + g_signal_connect( tree, "row-activated", + (GCallback) on_devicelist_row_activated, NULL ); + + + + + //scan_devices( "tree_v4ldevices" ); + + +} + + + +static gchar* format_selection_time(int start, int end); + +typedef struct +{ + int id; + int nl; + long n1; + long n2; + int tf; +} el_ref; + +typedef struct +{ + int pos; + char *filename; + char *fourcc; + int num_frames; +} el_constr; + +typedef struct { + int defaults[10]; + int min[10]; + int max[10]; + char description[150]; + int id; + int is_video; + int num_arg; + int has_rgb; +} effect_constr; + +int _effect_get_mix(int effect_id) +{ + int n = g_list_length(info->effect_info); + int i; + if(effect_id < 0) return -1; + for(i=0; i <= n; i++) + { + effect_constr *ec = g_list_nth_data( info->effect_info, i ); + if(ec != NULL) + { + if(ec->id == effect_id) return ec->is_video; + } + } + return 0; +} + +int _effect_get_rgb(int effect_id) +{ + int n = g_list_length(info->effect_info); + int i; + if(effect_id < 0) return -1; + for(i=0; i <= n; i++) + { + effect_constr *ec = g_list_nth_data( info->effect_info, i ); + if(ec != NULL) + { + if(ec->id == effect_id) return ec->has_rgb; + } + } + return 0; + +} + +int _effect_get_np(int effect_id) +{ + int n = g_list_length(info->effect_info); + int i; + if(effect_id < 0) return -1; + for(i=0; i <= n; i++) + { + effect_constr *ec = g_list_nth_data( info->effect_info, i ); + if(ec != NULL) + { + if(ec->id == effect_id) return ec->num_arg; + } + } + return 0; +} + +int _effect_get_minmax( int effect_id, int *min, int *max, int index ) +{ + int n = g_list_length(info->effect_info); + int i; + if(effect_id < 0) return 0; + for(i=0; i <= n; i++) + { + effect_constr *ec = g_list_nth_data( info->effect_info, i ); + if(ec != NULL) + { + if(ec->id == effect_id) + { + if( index > ec->num_arg ) + return 0; + *min = ec->min[index]; + *max = ec->max[index]; + return 1; + } + } + } + return 0; + +} + + +char *_effect_get_description(int effect_id) +{ + int n = g_list_length( info->effect_info ); + int i; + for(i = 0;i <= n ; i++) + { + effect_constr *ec = g_list_nth_data(info->effect_info, i); + if(ec != NULL) + { + if(effect_id == ec->id ) + return ec->description; + } + } + return ""; +} + +el_constr *_el_entry_new( int pos, char *file, int nf , char *fourcc) +{ + el_constr *el = g_new( el_constr , 1 ); + el->filename = strdup( file ); + el->num_frames = nf; + el->pos = pos; + el->fourcc = strdup(fourcc); + return el; +} + +void _el_entry_free( el_constr *entry ) +{ + if(entry) + { + if(entry->filename) free(entry->filename); + if(entry->fourcc) free(entry->fourcc); + free(entry); + } +} + +void _el_entry_reset( ) +{ + if(info->editlist != NULL) + { + int n = g_list_length( info->editlist ); + int i; + for( i = 0; i <= n ; i ++) + _el_entry_free( g_list_nth_data( info->editlist, i ) ); + g_list_free(info->editlist); + info->editlist=NULL; + } +} + +int _el_get_nframes( int pos ) +{ + int n = g_list_length( info->editlist ); + int i; + for( i = 0; i <= n ; i ++) + { + el_constr *el = g_list_nth_data( info->editlist, i ); + if(!el) return 0; + if(el->pos == pos) + return el->num_frames; + } + return 0; +} + +el_ref *_el_ref_new( int row_num,int nl, long n1, long n2, int tf) +{ + el_ref *el = vj_malloc(sizeof(el_ref)); + el->id = row_num; + el->nl = nl; + el->n1 = n1; + el->n2 = n2; + el->tf = tf; + return el; +} + +void _el_ref_free( el_ref *entry ) +{ + if(entry) free(entry); +} + +void _el_ref_reset() +{ + if(info->elref != NULL) + { + int n = g_list_length( info->elref ); + int i; + for(i = 0; i < n; i ++ ) + { + el_ref *edl = g_list_nth_data(info->elref, i ); + if(edl) + free(edl); + } + g_list_free(info->elref); + info->elref = NULL; + } +} + +int _el_ref_end_frame( int row_num ) +{ + int n = g_list_length( info->elref ); + int i; + for ( i = 0 ; i <= n; i ++ ) + { + el_ref *el = g_list_nth_data( info->elref, i ); + if(el->id == row_num ) + { +// int offset = info->el.offsets[ el->nl ]; +// return (offset + el->n1 + el->n2 ); + return (el->tf + el->n2 - el->n1); + } + } + return 0; +} +int _el_ref_start_frame( int row_num ) +{ + int n = g_list_length( info->elref ); + int i; + for ( i = 0 ; i <= n; i ++ ) + { + el_ref *el = g_list_nth_data( info->elref, i ); + if(el->id == row_num ) + { +// int offset = info->el.offsets[ el->nl ]; +// return (offset + el->n1 ); +// printf("Start pos of row %d : %d = n1, %d = n2, %d = tf\n", +// row_num,el->n1,el->n2, el->tf ); + return (el->tf); + } + } + return 0; +} + + +char *_el_get_fourcc( int pos ) +{ + int n = g_list_length( info->editlist ); + int i; + for( i = 0; i <= n; i ++ ) + { + el_constr *el = g_list_nth_data( info->editlist, i ); + if(el->pos == pos) + return el->fourcc; + } + return NULL; +} + + +char *_el_get_filename( int pos ) +{ + int n = g_list_length( info->editlist ); + int i; + for( i = 0; i <= n; i ++ ) + { + el_constr *el = g_list_nth_data( info->editlist, i ); + if(el->pos == pos) + return el->filename; + } + return NULL; +} + +effect_constr* _effect_new( char *effect_line ) +{ + effect_constr *ec; + int descr_len = 0; + int p; + int tokens = 0; + char len[4]; + //char line[100]; + int offset = 0; + + veejay_memset(len,0,sizeof(len)); + + if(!effect_line) return NULL; + + strncpy(len, effect_line, 3); + sscanf(len, "%03d", &descr_len); + if(descr_len <= 0) return NULL; + + ec = g_new( effect_constr, 1); + veejay_memset(ec->description,0,sizeof(ec->description)); + strncpy( ec->description, effect_line+3, descr_len ); + tokens = sscanf(effect_line+(descr_len+3), "%03d%1d%1d%02d", &(ec->id),&(ec->is_video), + &(ec->has_rgb), &(ec->num_arg)); + offset = descr_len + 10; + for(p=0; p < ec->num_arg; p++) + { + sscanf(effect_line+offset,"%06d%06d%06d", + &(ec->min[p]), &(ec->max[p]),&(ec->defaults[p]) ); + offset+=18; + } + return ec; +} + +void _effect_free( effect_constr *effect ) +{ + if(effect) + { + free(effect); + } + +} +void _effect_reset(void) +{ + if( info->effect_info != NULL) + { + int n = g_list_length(info->effect_info); + int i; + for( i = 0; i <=n ; i ++ ) + _effect_free( g_list_nth_data( info->effect_info , i ) ); + g_list_free( info->effect_info ); + info->effect_info = NULL; + } +} + +static gchar *get_relative_path(char *path) +{ + return _utf8str( basename( path )); +} + +gchar *dialog_save_file(const char *title ) +{ + GtkWidget *parent_window = glade_xml_get_widget_( + info->main_window, "gveejay_window" ); + GtkWidget *dialog = + gtk_file_chooser_dialog_new( title, + GTK_WINDOW(parent_window), + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, + NULL); +#ifdef HAVE_GTK2_8 + gtk_file_chooser_set_do_overwrite_confirmation( GTK_FILE_CHOOSER(dialog), TRUE ); +#endif + gtk_file_chooser_set_filename( GTK_FILE_CHOOSER(dialog), "veejay-samplelist.sl" ); + + if( gtk_dialog_run( GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) + { + gchar *file = gtk_file_chooser_get_filename( + GTK_FILE_CHOOSER(dialog) ); + + gtk_widget_destroy(dialog); + return file; + } + + gtk_widget_destroy(dialog); + return NULL; +} + +static void clear_progress_bar( const char *name, gdouble val ) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(w), val ); +} + +static struct +{ + const char *descr; + const char *filter; +} content_file_filters[] = { + { "AVI Files (*.avi)", "*.avi", }, + { "Digital Video Files (*.dv)", "*.dv" }, + { "Edit Decision List Files (*.edl)", "*.edl" }, + { "PNG (Portable Network Graphics) (*.png)", "*.png" }, + { "JPG (Joint Photographic Experts Group) (*.jpg)", "*.jpg" }, + { NULL, NULL }, + +}; + +static void add_file_filters(GtkWidget *dialog, int type ) +{ + GtkFileFilter *filter = NULL; + + if(type == 0 ) + { + int i; + for( i = 0; content_file_filters[i].descr != NULL ; i ++ ) + { + filter = gtk_file_filter_new(); + gtk_file_filter_set_name( filter, content_file_filters[i].descr); + gtk_file_filter_add_pattern( filter, content_file_filters[i].filter); + gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(dialog), filter ); + } + } + if(type == 1 ) + { + filter = gtk_file_filter_new(); + gtk_file_filter_set_name( filter, "Sample List Files (*.sl)"); + gtk_file_filter_add_pattern( filter, "*.sl"); + gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(dialog), filter); + } + if(type == 2 ) + { + filter = gtk_file_filter_new(); + gtk_file_filter_set_name( filter, "Action Files (*.xml)"); + gtk_file_filter_add_pattern( filter, "*.xml"); + gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(dialog), filter); + } + if(type == 3 ) + { + //ffmpeg + } + + filter = gtk_file_filter_new(); + gtk_file_filter_set_name( filter, "All Files (*.*)"); + gtk_file_filter_add_pattern( filter, "*"); + gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(dialog), filter); +} + + +gchar *dialog_open_file(const char *title, int type) +{ + static gchar *_file_path = NULL; + + + GtkWidget *parent_window = glade_xml_get_widget_( + info->main_window, "gveejay_window" ); + GtkWidget *dialog = + gtk_file_chooser_dialog_new( title, + GTK_WINDOW(parent_window), + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + + add_file_filters(dialog, type ); + gchar *file = NULL; + if( _file_path ) + { + gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(dialog), _file_path); + g_free(_file_path); + _file_path = NULL; + } + + if( gtk_dialog_run( GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) + { + file = gtk_file_chooser_get_filename( + GTK_FILE_CHOOSER(dialog) ); + _file_path = gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER(dialog)); + } + gtk_widget_destroy(GTK_WIDGET(dialog)); + return file; +} + +static char * produce_os_str() +{ + char os_str[512]; + char cpu_type[32]; + char *simd = vj_calloc( 128 ); +#ifdef ARCH_X86 + sprintf(cpu_type,"x86"); +#endif +#ifdef ARCH_X86_64 + sprintf(cpu_type, "x86-64"); +#endif +#ifdef ARCH_PPC + sprintf(cpu_type, "ppc"); +#endif +#ifdef ARCH_MIPS + sprintf(cpu_type, "mips"); +#endif +#ifdef HAVE_ASM_MMX + strcat( simd, "MMX "); +#endif +#ifdef HAVE_ASM_MMX2 + strcat( simd, "MMX2 "); +#endif +#ifdef HAVE_ASM_SSE + strcat( simd, "SSE " ); +#endif +#ifdef HAVE_ASM_SSE2 + strcat( simd, "SSE2" ); +#endif +#ifdef HAVE_ASM_CMOV + strcat( simd, "cmov" ); +#endif +#ifdef HAVE_ASM_3DNOW + strcat( simd, "3DNow"); +#endif +#ifdef ARCH_PPC +#ifdef HAVE_ALTIVEC + strcat( simd, "altivec"); +#else + strcat( simd, "no optimizations"); +#endif +#endif +#ifdef ARCH_MIPS + strcat( simd, "no optimizations"); +#endif + sprintf(os_str,"Arch: %s with %s", + cpu_type, simd ); + + return strdup( os_str ); +} + +void about_dialog() +{ + const gchar *artists[] = { + "Matthijs v. Henten (glade, pixmaps) ", + "Dursun Koca (V-logo)", + NULL + }; + + const gchar *authors[] = { + "Developed by:", + "Matthijs v. Henten ", + "Dursun Koca", + "Niels Elburg ", + "\n", + "Contributions by:", + "Thomas Reinhold ", + "Toni ", + NULL + }; + + const gchar *web = { + "http://www.veejayhq.net | http://veejay.dyne.org" + }; + + char blob[1024]; + char *os_str = produce_os_str(); + sprintf(blob, "Veejay - A visual instrument and realtime video sampler for GNU/Linux\n%s", os_str ); + free(os_str); + + const gchar *license = + { + "This program is Free Software; You can redistribute it and/or modify\n" \ + "under the terms of the GNU General Public License as published by\n" \ + "the Free Software Foundation; either version 2, or (at your option)\n"\ + "any later version.\n\n"\ + "This program is distributed in the hope it will be useful,\n"\ + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"\ + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"\ + "See the GNU General Public License for more details.\n\n"\ + "For more information , see also: http://www.gnu.org\n" + }; + +#ifdef HAVE_GTK2_6 + char path[MAX_PATH_LEN]; + veejay_memset( path,0, sizeof(path)); + get_gd( path, NULL, "veejay-logo.png" ); + GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file + ( path, NULL ); + GtkWidget *about = g_object_new( + GTK_TYPE_ABOUT_DIALOG, + "program_name", "reloaded", + "name", "reloaded", + "version", VERSION, + "copyright", "(C) 2004 - 2008 N. Elburg et all.", + "comments", "The graphical interface for Veejay", + "website", web, + "authors", authors, + "artists", artists, + "comments", blob, + "license", license, + "logo", pixbuf, NULL ); + g_object_unref(pixbuf); + + g_signal_connect( about , "response", G_CALLBACK( gtk_widget_destroy),NULL); + gtk_window_present( GTK_WINDOW( about ) ); +#endif + +} + +gboolean dialogkey_snooper( GtkWidget *w, GdkEventKey *event, gpointer user_data) +{ + GtkWidget *entry = (GtkWidget*) user_data; + + if( !gtk_widget_is_focus( entry ) ) + { + return FALSE; + } + if(event->type == GDK_KEY_PRESS) + { + gchar tmp[100]; + info->uc.pressed_key = gdk2sdl_key( event->keyval ); + info->uc.pressed_mod = gdk2sdl_mod( event->state ); + gchar *text = gdkkey_by_id( event->keyval ); + gchar *mod = gdkmod_by_id( event->state ); + + if( text ) + { + if(!mod || strncmp(mod, " ", 1 ) == 0 ) + sprintf(tmp, "%s", text ); + else + sprintf(tmp, "%s + %s", mod,text); + + gchar *utf8_text = _utf8str( tmp ); + gtk_entry_set_text( GTK_ENTRY(entry), utf8_text); + g_free(utf8_text); + } + } + + return FALSE; +} + +gboolean key_handler( GtkWidget *w, GdkEventKey *event, gpointer user_data) +{ + if(!info->key_now) + return FALSE; + + if(event->type != GDK_KEY_PRESS) + return FALSE; + + int gdk_keyval = gdk2sdl_key( event->keyval ); + int gdk_state = gdk2sdl_mod( event->state ); + + if( gdk_keyval >= 0 && gdk_state >= 0 ) + { + char *message = vims_keys_list[(gdk_state * MOD_OFFSET)+gdk_keyval].vims; + if(message) + msg_vims(message); + } + return FALSE; +} + +static int check_format_string( char *args, char *format ) +{ + if(!format || !args ) + return 0; + char dirty[128]; + int n = sscanf( args, format, &dirty,&dirty, &dirty,&dirty, &dirty,&dirty, &dirty,&dirty, &dirty,&dirty ); + return n; +} + +int +prompt_keydialog(const char *title, char *msg) +{ + if(!info->uc.selected_vims_entry ) + return 0; + info->uc.pressed_mod = 0; + info->uc.pressed_key = 0; + + char pixmap[1024]; + veejay_memset(pixmap,0,sizeof(pixmap)); + get_gd( pixmap, NULL, "icon_keybind.png"); + + GtkWidget *mainw = glade_xml_get_widget_(info->main_window, "gveejay_window"); + GtkWidget *dialog = gtk_dialog_new_with_buttons( title, + GTK_WINDOW( mainw ), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_REJECT, + GTK_STOCK_OK, + GTK_RESPONSE_ACCEPT, + NULL); + + GtkWidget *keyentry = gtk_entry_new(); + gtk_entry_set_text( GTK_ENTRY(keyentry), ""); + gtk_editable_set_editable( GTK_EDITABLE(keyentry), FALSE ); + gtk_dialog_set_default_response( GTK_DIALOG(dialog), GTK_RESPONSE_REJECT ); + gtk_window_set_resizable( GTK_WINDOW(dialog), FALSE ); + + g_signal_connect( G_OBJECT(dialog), "response", + G_CALLBACK( gtk_widget_hide ), G_OBJECT(dialog ) ); + + GtkWidget *hbox1 = gtk_hbox_new( FALSE, 12 ); + gtk_container_set_border_width( GTK_CONTAINER( hbox1 ), 6 ); + GtkWidget *hbox2 = gtk_hbox_new( FALSE, 12 ); + gtk_container_set_border_width( GTK_CONTAINER( hbox2 ), 6 ); + + GtkWidget *icon = gtk_image_new_from_file( pixmap ); + + GtkWidget *label = gtk_label_new( msg ); + gtk_container_add( GTK_CONTAINER( hbox1 ), icon ); + gtk_container_add( GTK_CONTAINER( hbox1 ), label ); + gtk_container_add( GTK_CONTAINER( hbox1 ), keyentry ); + + GtkWidget *pentry = NULL; + + if(vj_event_list[ info->uc.selected_vims_entry ].params) + { + //@ put in default args + char *arg_str = vj_event_list[ info->uc.selected_vims_entry ].args; + pentry = gtk_entry_new(); + GtkWidget *arglabel = gtk_label_new("Arguments:"); + + if(arg_str) + gtk_entry_set_text( GTK_ENTRY(pentry), arg_str ); + gtk_editable_set_editable( GTK_EDITABLE(pentry), TRUE ); + gtk_container_add( GTK_CONTAINER(hbox1), arglabel ); + gtk_container_add( GTK_CONTAINER(hbox1), pentry ); + } + + if( info->uc.selected_vims_entry ) + { + char tmp[100]; + char *str_mod = sdlmod_by_id( info->uc.pressed_mod ); + char *str_key = sdlkey_by_id( info->uc.pressed_key ); + int key_combo_ok = 0; + + if(str_mod && str_key ) { + snprintf(tmp,100,"VIMS %d : %s + %s", + info->uc.selected_vims_entry, str_mod, str_key ); + key_combo_ok = 1; + } else if ( str_key ) { + snprintf(tmp, 100,"VIMS %d: %s", info->uc.selected_vims_entry,str_key); + key_combo_ok = 1; + } + + if( key_combo_ok ) + { + gtk_entry_set_text( GTK_ENTRY(keyentry), tmp ); + } + } + + + gtk_container_add( GTK_CONTAINER( GTK_DIALOG( dialog )->vbox ), hbox1 ); + gtk_container_add( GTK_CONTAINER( GTK_DIALOG( dialog )->vbox ), hbox2 ); + + gtk_widget_show_all( dialog ); + + int id = gtk_key_snooper_install( dialogkey_snooper, keyentry); + int n = gtk_dialog_run(GTK_DIALOG(dialog)); + + gtk_key_snooper_remove( id ); + + if(pentry) + { + gchar *args = (gchar*) gtk_entry_get_text( GTK_ENTRY(pentry)); + int np = check_format_string( args, vj_event_list[ info->uc.selected_vims_entry ].format ); + + if( np == vj_event_list[ info->uc.selected_vims_entry ].params ) + { + if(info->uc.selected_vims_args ) + free(info->uc.selected_vims_args ); + + info->uc.selected_vims_args = strdup( args ); + } + } + + gtk_widget_destroy(dialog); + + + return n; +} + +void +message_dialog( const char *title, char *msg ) +{ + GtkWidget *mainw = glade_xml_get_widget_(info->main_window, "gveejay_window"); + GtkWidget *dialog = gtk_dialog_new_with_buttons( title, + GTK_WINDOW( mainw ), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_OK, + GTK_RESPONSE_NONE, + NULL); + GtkWidget *label = gtk_label_new( msg ); + g_signal_connect_swapped( dialog, "response", + G_CALLBACK(gtk_widget_destroy),dialog); + gtk_container_add( GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), + label ); + gtk_widget_show_all(dialog); +} + + +int +prompt_dialog(const char *title, char *msg) +{ + GtkWidget *mainw = glade_xml_get_widget_(info->main_window, "gveejay_window"); + GtkWidget *dialog = gtk_dialog_new_with_buttons( title, + GTK_WINDOW( mainw ), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_NO, + GTK_RESPONSE_REJECT, + GTK_STOCK_YES, + GTK_RESPONSE_ACCEPT, + NULL); + gtk_dialog_set_default_response( GTK_DIALOG(dialog), GTK_RESPONSE_REJECT ); + gtk_window_set_resizable( GTK_WINDOW(dialog), FALSE ); + g_signal_connect( G_OBJECT(dialog), "response", + G_CALLBACK( gtk_widget_hide ), G_OBJECT(dialog ) ); + GtkWidget *hbox1 = gtk_hbox_new( FALSE, 12 ); + gtk_container_set_border_width( GTK_CONTAINER( hbox1 ), 6 ); + GtkWidget *icon = gtk_image_new_from_stock( GTK_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_DIALOG ); + GtkWidget *label = gtk_label_new( msg ); + gtk_container_add( GTK_CONTAINER( hbox1 ), icon ); + gtk_container_add( GTK_CONTAINER( hbox1 ), label ); + gtk_container_add( GTK_CONTAINER( GTK_DIALOG( dialog )->vbox ), hbox1 ); + gtk_widget_show_all( dialog ); + + int n = gtk_dialog_run(GTK_DIALOG(dialog)); + + gtk_widget_destroy(dialog); + + return n; +} + + +int +error_dialog(const char *title, char *msg) +{ + GtkWidget *mainw = glade_xml_get_widget_(info->main_window, "gveejay_window"); + GtkWidget *dialog = gtk_dialog_new_with_buttons( title, + GTK_WINDOW( mainw ), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_OK, + GTK_RESPONSE_OK, + NULL); + gtk_dialog_set_default_response( GTK_DIALOG(dialog), GTK_RESPONSE_OK ); + gtk_window_set_resizable( GTK_WINDOW(dialog), FALSE ); + g_signal_connect( G_OBJECT(dialog), "response", + G_CALLBACK( gtk_widget_hide ), G_OBJECT(dialog ) ); + GtkWidget *hbox1 = gtk_hbox_new( FALSE, 12 ); + gtk_container_set_border_width( GTK_CONTAINER( hbox1 ), 6 ); + GtkWidget *icon = gtk_image_new_from_stock( GTK_STOCK_DIALOG_ERROR, + GTK_ICON_SIZE_DIALOG ); + GtkWidget *label = gtk_label_new( msg ); + gtk_container_add( GTK_CONTAINER( hbox1 ), icon ); + gtk_container_add( GTK_CONTAINER( hbox1 ), label ); + gtk_container_add( GTK_CONTAINER( GTK_DIALOG( dialog )->vbox ), hbox1 ); + gtk_widget_show_all( dialog ); + + int n = gtk_dialog_run(GTK_DIALOG(dialog)); + + gtk_widget_destroy(dialog); + + return n; +} + +void veejay_quit( ) +{ + if( prompt_dialog("Quit veejay", "Close Veejay ? All unsaved work will be lost." ) + == GTK_RESPONSE_REJECT ) + return; + single_vims( 600 ); + +// clear_progress_bar( "cpumeter",0.0 ); + clear_progress_bar( "connecting",0.0 ); + clear_progress_bar( "samplerecord_progress",0.0 ); + clear_progress_bar( "streamrecord_progress",0.0 ); + clear_progress_bar( "seq_rec_progress",0.0); + exit(0); +} + +static int running_g_ = 1; +static int restart_ = 0; + +int gveejay_restart() +{ + return restart_; +} + +gboolean gveejay_running() +{ + if(!running_g_) + return FALSE; + return TRUE; +} + +gboolean gveejay_quit( GtkWidget *widget, gpointer user_data) +{ + if(!running_g_) + return FALSE; + + if( info->watch.state == STATE_PLAYING) + { + if( prompt_dialog("Quit gveejay", "Are you sure?" ) == GTK_RESPONSE_REJECT) + return TRUE; + } + + running_g_ = 0; + info->watch.state == STATE_QUIT; + + return FALSE; +} + +/* Free the slot */ +static void free_slot( sample_slot_t *slot ) +{ + if(slot) + { + if(slot->title) free(slot->title); + if(slot->timecode) free(slot->timecode); + free(slot); + } + slot = NULL; +} + +/* Allocate some memory and create a temporary slot */ +sample_slot_t *create_temporary_slot( gint slot_id, gint id, gint type, gchar *title, gchar *timecode ) +{ + sample_slot_t *slot = (sample_slot_t*) vj_calloc(sizeof(sample_slot_t)); + if(id>0) + { + slot->sample_id = id; + slot->sample_type = type; + slot->timecode = strdup(timecode); + slot->title = strdup(title); + slot->slot_number = slot_id; + } + return slot; +} + +int is_current_track(char *host, int port ) +{ + char *remote = get_text( "entry_hostname" ); + int num = get_nums( "button_portnum" ); + if( strncasecmp( remote, host, strlen(host)) == 0 && port == num ) + return 1; + return 0; +} + +static void gveejay_error_slot( int mode ) +{ + char message[255]; + sprintf(message, "Failed to create a new slot. Make sure to check the properties of the %s you are trying to load", + (mode == MODE_SAMPLE ? "sample" : (mode==MODE_STREAM ? "stream" : "sample/stream"))); + message_dialog( "Error", message ); +} + +/* Create a new slot in the sample bank, This function is called by + all VIMS commands that create a new stream or a new sample */ +int gveejay_new_slot(int mode) +{ + int id = 0; + int result_len = 0; + gchar *result = recv_vims( 3, &result_len ); + + if(result_len <= 0 ) + { + gveejay_error_slot( mode ); + return 0; + } + + sscanf( result, "%d", &id ); + + free(result); + + if( id <= 0 ) + { + gveejay_error_slot( mode ); + return 0; + } + else + { + vj_msg(VEEJAY_MSG_INFO, "Created new %s %d", (mode == MODE_SAMPLE ? "Sample" : "Stream"), id); + + int poke_slot = 0; + int bank_page = 0; + if(verify_bank_capacity( &bank_page, &poke_slot, id, mode )) + { + sample_slot_t *tmp_slot = vj_gui_get_sample_info(id, mode ); + if(tmp_slot) + { + tmp_slot->slot_number = poke_slot; + add_sample_to_sample_banks( bank_page, tmp_slot ); + free_slot( tmp_slot ); + info->uc.expected_slots ++; + return id; + } + } + else + { + message_dialog( "Error", "Samplebank is full"); + return 0; + } + } + + return id; +} + +void gveejay_popup_err( const char *type, char *msg ) +{ + message_dialog( type, msg ); +} + + +#include "callback.c" +enum +{ + COLOR_RED=0, + COLOR_BLUE=1, + COLOR_GREEN=2, + COLOR_BLACK=3, + COLOR_NUM +}; + +void vj_msg(int type, const char format[], ...) +{ + if( type == VEEJAY_MSG_DEBUG && vims_verbosity == 0 ) + return; + + char tmp[1024]; + char buf[1024]; + char prefix[20]; + va_list args; + + va_start( args,format ); + vsnprintf( tmp, sizeof(tmp), format, args ); + + switch(type) + { + case 2: sprintf(prefix,"Info : ");break; + case 1: sprintf(prefix,"Warning: ");break; + case 0: sprintf(prefix,"Error : ");break; + case 3: + sprintf(prefix,"Debug : ");break; + case 4: + sprintf(prefix, " ");break; + } + + snprintf(buf, sizeof(buf), "%s %s\n",prefix,tmp ); + gsize nr,nw; + gchar *text = g_locale_to_utf8( buf, -1, &nr, &nw, NULL); + text[strlen(text)-1] = '\0'; + + GtkWidget *sb = glade_xml_get_widget_( info->main_window, "statusbar"); + gtk_statusbar_push( GTK_STATUSBAR(sb),0, text ); + + g_free( text ); + va_end(args); +} + +void msg_vims(char *message) +{ + if(!info->client) + return; + int n = vj_client_send(info->client, V_CMD, message); + if( n <= 0 ) + reloaded_schedule_restart(); +} + +int get_loop_value() +{ + if( is_button_toggled( "loop_none" ) ) + { + return 0; + } + else + { + if( is_button_toggled( "loop_normal" )) + return 1; + else + if( is_button_toggled( "loop_pingpong" )) + return 2; + else if (is_button_toggled("loop_random")) + return 3; + } + return 1; +} + +static void multi_vims(int id, const char format[],...) +{ + char block[1024]; + char tmp[1024]; + va_list args; + if(!info->client) + return; + va_start(args, format); + vsnprintf(tmp, sizeof(tmp)-1, format, args ); + snprintf(block, sizeof(block)-1, "%03d:%s;",id,tmp); + va_end(args); + + if(vj_client_send( info->client, V_CMD, block)<=0 ) + reloaded_schedule_restart(); + +} + +static void single_vims(int id) +{ + char block[10]; + if(!info->client) + return; + sprintf(block, "%03d:;",id); + if(vj_client_send( info->client, V_CMD, block )<=0) + reloaded_schedule_restart(); +} + +static gchar *recv_vims(int slen, int *bytes_written) +{ + int tmp_len = slen+1; + char tmp[tmp_len]; + veejay_memset(tmp,0,sizeof(tmp)); + int ret = vj_client_read( info->client, V_CMD, tmp, slen ); + if( ret == -1 ) + reloaded_schedule_restart(); + int len = 0; + sscanf( tmp, "%d", &len ); + gchar *result = NULL; + if( ret <= 0 || len <= 0 || slen <= 0) + return result; + result = (gchar*) vj_calloc(sizeof(gchar) * (len + 1) ); + + *bytes_written = vj_client_read( info->client, V_CMD, result, len ); + if( *bytes_written == -1 ) + reloaded_schedule_restart(); + return result; +} + +static gdouble get_numd(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name); + if(!w) return 0; + return (gdouble) gtk_spin_button_get_value( GTK_SPIN_BUTTON( w ) ); +} + +static int get_slider_val(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + if(!w) return 0; + return ((gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value); +} + +static void vj_kf_select_parameter(int num) +{ + sample_slot_t *s = info->selected_slot; + if(!s) return; + + info->uc.selected_parameter_id = num; + + GtkWidget *curve = glade_xml_get_widget_(info->main_window, "curve"); + + reset_curve( curve ); + + update_curve_accessibility("curve"); + update_curve_widget("curve"); + + char name[20]; + sprintf(name, "P%d", info->uc.selected_parameter_id); + update_label_str( "curve_parameter", name ); +} + +static void vj_kf_refresh() +{ + GtkWidget *curve = glade_xml_get_widget_(info->main_window, "curve"); + + + reset_curve( curve ); + + update_curve_accessibility("curve"); + update_curve_widget("curve"); + char name[20]; + sprintf(name, "P%d", info->uc.selected_parameter_id); + update_label_str( "curve_parameter", name ); + +} + +static void update_curve_widget(const char *name) +{ + GtkWidget *curve = glade_xml_get_widget_( info->main_window,name); + sample_slot_t *s = info->selected_slot; + if(!s ) return; + int i = info->uc.selected_chain_entry; /* chain entry */ + int id = info->uc.entry_tokens[ENTRY_FXID]; + int blen = 0; + int lo = 0, hi = 0, curve_type=0; + int p = -1; + multi_vims( VIMS_SAMPLE_KF_GET, "%d %d",i,info->uc.selected_parameter_id ); + + unsigned char *blob = (unsigned char*) recv_vims( 8, &blen ); + if( blob && blen > 0 ) + { + p = set_points_in_curve_ext( curve, blob,id,i, &lo,&hi, &curve_type ); + if( p >= 0 ) + { + char but[25]; + sprintf(but, "kf_p%d", p); + set_toggle_button( but, 1 ); + info->uc.selected_parameter_id = p; + switch( curve_type ) + { + case GTK_CURVE_TYPE_LINEAR: set_toggle_button( "curve_typelinear", 1 ); break; + case GTK_CURVE_TYPE_SPLINE: set_toggle_button( "curve_typespline", 1 ); break; + case GTK_CURVE_TYPE_FREE: set_toggle_button( "curve_typefree",1 ); break; + default: + break; + } + } + } + + if( lo == hi && hi == 0 ) + { + if( info->status_tokens[PLAY_MODE] == MODE_SAMPLE ) + { + lo = info->status_tokens[SAMPLE_START]; + hi = info->status_tokens[SAMPLE_END]; + } + else + { + lo = 0; + hi = get_nums("stream_length"); + } + } + + update_spin_range( "curve_spinstart", lo, hi, lo ); + update_spin_range( "curve_spinend", lo, hi, hi ); + + + if(blob) free(blob); +} + +static void update_curve_accessibility(const char *name) +{ + sample_slot_t *s = info->selected_slot; + if(!s ) return; + + if( info->status_tokens[PLAY_MODE] == MODE_PLAIN ) + { + disable_widget( "frame_fxtree3" ); + } + else + { + enable_widget( "frame_fxtree3" ); + } +} + +static int get_nums(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name); + if(!w) return 0; + return (int) gtk_spin_button_get_value( GTK_SPIN_BUTTON( w ) ); +} + +static int count_textview_buffer(const char *name) +{ + GtkWidget *view = glade_xml_get_widget_( info->main_window, name ); + if(view) + { + GtkTextBuffer *tb = NULL; + tb = gtk_text_view_get_buffer( GTK_TEXT_VIEW(view) ); + return gtk_text_buffer_get_char_count( tb ); + } + return 0; +} + +static void clear_textview_buffer(const char *name) +{ + GtkWidget *view = glade_xml_get_widget_( info->main_window, name ); + if(view) + { + GtkTextBuffer *tb = NULL; + tb = gtk_text_view_get_buffer( GTK_TEXT_VIEW(view) ); + GtkTextIter iter1,iter2; + gtk_text_buffer_get_start_iter( tb, &iter1 ); + gtk_text_buffer_get_end_iter( tb, &iter2 ); + gtk_text_buffer_delete( tb, &iter1, &iter2 ); + } +} + +static gchar *get_textview_buffer(const char *name) +{ + GtkWidget *view = glade_xml_get_widget_( info->main_window,name ); + if(view) + { + GtkTextBuffer *tb = NULL; + tb = gtk_text_view_get_buffer( GTK_TEXT_VIEW(view) ); + GtkTextIter iter1,iter2; + + gtk_text_buffer_get_start_iter(tb, &iter1); + gtk_text_buffer_get_end_iter( tb, &iter2); + gchar *res = gtk_text_buffer_get_text( tb, &iter1,&iter2 , TRUE ); + return res; + } + return NULL; +} + +static void set_textview_buffer(const char *name, gchar *utf8text) +{ + GtkWidget *view = glade_xml_get_widget_( info->main_window, name ); + if(view) + { + GtkTextBuffer *tb = gtk_text_view_get_buffer( + GTK_TEXT_VIEW(view) ); + gtk_text_buffer_set_text( tb, utf8text, -1 ); + } +} + +static gchar *get_text(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_(info->main_window, name ); + if(!w) return NULL; + return (gchar*) gtk_entry_get_text( GTK_ENTRY(w)); +} + +static void put_text(const char *name, char *text) +{ + GtkWidget *w = glade_xml_get_widget_(info->main_window, name ); + if(w) + { + gchar *utf8_text = _utf8str( text ); + gtk_entry_set_text( GTK_ENTRY(w), utf8_text ); + g_free(utf8_text); + } +} + +int is_button_toggled(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name); + if(!w) return 0; + if( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(w) ) == TRUE ) + return 1; + return 0; +} +static void set_toggle_button(const char *name, int status) +{ + GtkWidget *w = glade_xml_get_widget_(info->main_window, name ); + if(w) + { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), (status==1 ? TRUE: FALSE)); + } +} + + +static void update_slider_gvalue(const char *name, gdouble value) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + if(!w) + return; + gtk_adjustment_set_value( + GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment), value ); +} + +static void update_slider_value(const char *name, gint value, gint scale) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + if(!w) + return; + gdouble gvalue; + if(scale) + gvalue = (gdouble) value / (gdouble) scale; + else + gvalue = (gdouble) value; + + gtk_adjustment_set_value( + GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment), gvalue ); +} +/* +static void update_knob_value(GtkWidget *w, gdouble value, gdouble scale) +{ + GtkAdjustment *adj = gtk_knob_get_adjustment(GTK_KNOB(w)); + gdouble gvalue; + + if(scale) gvalue = (gdouble) value / (gdouble) scale; + else gvalue = (gdouble) value; + + gtk_adjustment_set_value(adj, gvalue ); +}*/ + +/* +static void update_knob_range(GtkWidget *w, gdouble min, gdouble max, gdouble value, gint scaled) +{ + GtkAdjustment *adj = gtk_knob_get_adjustment(GTK_KNOB(w)); + + if(!scaled) + { + adj->lower = min; + adj->upper = max; + adj->value = value; + } + else + { + gdouble gmin =0.0; + gdouble gmax =100.0; + gdouble gval = gmax / value; + adj->lower = gmin; + adj->upper = gmax; + adj->value = gval; + } +}*/ +static void update_spin_incr( const char *name, gdouble step, gdouble page ) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + if(!w) return; + gtk_spin_button_set_increments(GTK_SPIN_BUTTON(w),step,page ); +} + +static void update_spin_range(const char *name, gint min, gint max, gint val) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + if(!w) return; + + gtk_spin_button_set_range( GTK_SPIN_BUTTON(w), (gdouble)min, (gdouble) max ); + gtk_spin_button_set_value( GTK_SPIN_BUTTON(w), (gdouble)val); +} +/*static int get_mins(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + if(!w) return 0; + GtkAdjustment *adj = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(w) ); + return (int) adj->lower; +} + + +static int get_maxs(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + if(!w) return 0; + GtkAdjustment *adj = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(w) ); + return (int) adj->upper; +}*/ + +static void update_spin_value(const char *name, gint value ) +{ + GtkWidget *w = glade_xml_get_widget_(info->main_window, name ); + if(!w) return; + gtk_spin_button_set_value( GTK_SPIN_BUTTON(w), (gdouble) value ); +} + +static void update_slider_range(const char *name, gint min, gint max, gint value, gint scaled) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, name ); + if(!w) return; + GtkRange *range = GTK_RANGE(w); + if(!scaled) + { + gtk_range_set_range(range, (gdouble) min, (gdouble) max ); + gtk_range_set_value(range, value ); + } + else + { + gdouble gmin =0.0; + gdouble gmax =100.0; + gdouble gval = gmax / value; + gtk_range_set_range(range, gmin, gmax); + gtk_range_set_value(range, gval ); + } + + gtk_range_set_adjustment(range, GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment ) ); +} + +static void update_label_i(const char *name, int num, int prefix) +{ + GtkWidget *label = glade_xml_get_widget_( + info->main_window, name); + if(!label) return; + char str[20]; + if(prefix) + g_snprintf( str,20, "%09d", num ); + else + g_snprintf( str,20, "%d", num ); + gchar *utf8_value = _utf8str( str ); + gtk_label_set_text( GTK_LABEL(label), utf8_value); + g_free( utf8_value ); +} +static void update_label_f(const char *name, float val ) +{ + GtkWidget *label = glade_xml_get_widget_( + info->main_window, name); + if(!label) return; + char value[10]; + snprintf( value, sizeof(value)-1, "%2.2f", val ); + + gchar *utf8_value = _utf8str( value ); + gtk_label_set_text( GTK_LABEL(label), utf8_value ); + g_free(utf8_value); +} +static void update_label_str(const char *name, gchar *text) +{ + GtkWidget *label = glade_xml_get_widget_( + info->main_window, name); + if(!label ||!text) return; + gchar *utf8_text = _utf8str( text ); + if(!utf8_text) return; + gtk_label_set_text( GTK_LABEL(label), utf8_text); + g_free(utf8_text); +} + +static void selection_get_paths(GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer data) +{ + GSList **paths = data; + + *paths = g_slist_prepend(*paths, gtk_tree_path_copy(path)); +} + + +GSList *gui_tree_selection_get_paths(GtkTreeView *view) +{ + GtkTreeSelection *sel; + GSList *paths; + + /* get paths of selected rows */ + paths = NULL; + sel = gtk_tree_view_get_selection(view); + gtk_tree_selection_selected_foreach(sel, selection_get_paths, &paths); + + return paths; +} + +static void update_colorselection() +{ + GtkWidget *colorsel = glade_xml_get_widget_( info->main_window, + "colorselection"); + GdkColor color; + + color.red = 255 * info->status_tokens[STREAM_COL_R]; + color.green = 255 * info->status_tokens[STREAM_COL_G]; + color.blue = 255 * info->status_tokens[STREAM_COL_B]; + + gtk_color_selection_set_current_color( + GTK_COLOR_SELECTION( colorsel ), + &color ); +} + +int resize_primary_ratio_y() +{ + float ratio = (float)info->el.width / (float)info->el.height; + float result = (float) get_nums( "priout_width" ) / ratio; + return (int) result; +} + +int resize_primary_ratio_x() +{ + float ratio = (float)info->el.height / (float)info->el.width; + float result = (float) get_nums( "priout_height" ) / ratio; + return (int) result; +} + +static void update_rgbkey() +{ + if(!info->entry_lock) + { + info->entry_lock =1; + GtkWidget *colorsel = glade_xml_get_widget_( info->main_window, + "rgbkey"); + GdkColor color; + /* update from entry tokens (delivered by GET_CHAIN_ENTRY */ + int *p = &(info->uc.entry_tokens[0]); + /* 0 = effect_id, 1 = has second input, 2 = num parameters, + 3 = p0 , 4 = p1, 5 = p2, 6 = p3 ... */ + + + color.red = 255 * p[3]; + color.green = 255 * p[4]; + color.blue = 255 * p[5]; + + gtk_color_selection_set_current_color( + GTK_COLOR_SELECTION( colorsel ), + &color ); + info->entry_lock = 0; + } +} + +static void update_rgbkey_from_slider() +{ + if(!info->entry_lock) + { + GtkWidget *colorsel = glade_xml_get_widget_( info->main_window, + "rgbkey"); + info->entry_lock = 1; + GdkColor color; + + color.red = 255 * ( get_slider_val( "slider_p1" ) ); + color.green = 255 * ( get_slider_val( "slider_p2" ) ); + color.blue = 255 * ( get_slider_val( "slider_p3" ) ); + + gtk_color_selection_set_current_color( + GTK_COLOR_SELECTION( colorsel ), + &color ); + info->entry_lock = 0; + } +} + +static void v4l_expander_toggle(int mode) +{ + // we can set the expanded of the ABC expander + GtkWidget *exp = glade_xml_get_widget_( + info->main_window, "v4l_expander"); + GtkExpander *e = GTK_EXPANDER(exp); + gtk_expander_set_expanded( e ,(mode==0 ? FALSE : TRUE) ); +} + +int update_gveejay() +{ + return vj_midi_handle_events( info->midi ); +} + +static GdkPixbuf *update_pixmap_kf( int status ) +{ + char path[MAX_PATH_LEN]; + char filename[MAX_PATH_LEN]; + veejay_memset( filename, 0,sizeof(filename)); + + sprintf(filename, "fx_entry_%s.png", ( status == 1 ? "on" : "off" )); + get_gd(path,NULL, filename); + + GError *error = NULL; + GdkPixbuf *toggle = gdk_pixbuf_new_from_file( path , &error); + if(error) + return NULL; + return toggle; +} +static GdkPixbuf *update_pixmap_entry( int status ) +{ + char path[MAX_PATH_LEN]; + char filename[MAX_PATH_LEN]; + veejay_memset( filename,0,sizeof(filename)); + + sprintf(filename, "fx_entry_%s.png", ( status == 1 ? "on" : "off" )); + get_gd(path,NULL, filename); + + GError *error = NULL; + GdkPixbuf *icon = gdk_pixbuf_new_from_file(path, &error); + if(error) + return 0; + return icon; +} + +static gboolean +chain_update_row(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, + gpointer data) +{ + + vj_gui_t *gui = (vj_gui_t*) data; + if(!gui->selected_slot) + return FALSE; + int entry = info->uc.selected_chain_entry; + gint gentry = 0; + gtk_tree_model_get (model, iter, + FXC_ID, &gentry, -1); + + if(gentry == entry) + { + int effect_id = gui->uc.entry_tokens[ ENTRY_FXID ]; + if( effect_id <= 0 ) + { + gtk_list_store_set( GTK_LIST_STORE(model),iter, FXC_ID, entry, -1 ); + } + else + { + gchar *descr = _utf8str( _effect_get_description( effect_id )); + int on = gui->uc.entry_tokens[16]; + GdkPixbuf *toggle = update_pixmap_entry( gui->uc.entry_tokens[ENTRY_FXSTATUS] ); + GdkPixbuf *kf_toggle = update_pixmap_kf( on ); + gtk_list_store_set( GTK_LIST_STORE(model),iter, + FXC_ID, entry, + FXC_FXID, descr, + FXC_FXSTATUS, toggle, + FXC_KF, kf_toggle, -1 ); + g_free(descr); + g_object_unref( kf_toggle ); + g_object_unref( toggle ); + } + } + + return FALSE; +} + +/* Cut from global_info() + This function updates the sample/stream editor if the current playing stream/sample + matches with the selected sample slot */ + +static void update_record_tab(int pm) +{ + if(pm == MODE_STREAM) + { + update_spin_value( "spin_streamduration" , 1 ); + gint n_frames = get_nums( "spin_streamduration" ); + gchar *time = format_time(n_frames, info->el.fps); + update_label_str( "label_streamrecord_duration", time ); + g_free(time); + } + if(pm == MODE_SAMPLE) + { + update_spin_value( "spin_sampleduration", 1 ); + // combo_samplecodec + gint n_frames = sample_calctime(); + gchar *time = format_time( n_frames,info->el.fps ); + update_label_str( "label_samplerecord_duration", time ); + g_free(time); + } +} + +static void update_current_slot(int *history, int pm, int last_pm) +{ + gint update = 0; + + if( pm != info->prev_mode || info->status_tokens[PLAY_MODE] != history[PLAY_MODE] || info->status_tokens[CURRENT_ID] != history[CURRENT_ID] ) + { + int k; + info->uc.reload_hint[HINT_ENTRY] = 1; + info->uc.reload_hint[HINT_CHAIN] = 1; + info->uc.reload_hint[HINT_KF] = 1; + update = 1; + update_record_tab( pm ); + + if( info->status_tokens[STREAM_TYPE] == STREAM_WHITE ) + { + enable_widget( "colorselection" ); + } + else + { + disable_widget( "colorselection" ); + } + + if( info->status_tokens[STREAM_TYPE] == STREAM_VIDEO4LINUX ) + { + info->uc.reload_hint[HINT_V4L] = 1; + for(k = 1; capt_card_set[k].name != NULL; k ++ ) + enable_widget( capt_card_set[k].name ); + v4l_expander_toggle(1); + } + else + { /* not v4l, disable capt card */ + for(k = 1; capt_card_set[k].name != NULL ; k ++ ) + disable_widget( capt_card_set[k].name ); + + v4l_expander_toggle(0); + } + + info->uc.reload_hint[HINT_HISTORY] = 1; + + put_text( "entry_samplename", "" ); + } + if( info->status_tokens[CURRENT_ENTRY] != history[CURRENT_ENTRY] || + info->uc.reload_hint[HINT_ENTRY] == 1 ) + { + info->uc.selected_chain_entry = info->status_tokens[CURRENT_ENTRY]; + if(info->uc.selected_chain_entry < 0 || info->uc.selected_chain_entry > 19 ) + info->uc.selected_chain_entry = 0; + info->uc.reload_hint[HINT_ENTRY] = 1; + load_parameter_info(); + info->uc.reload_hint[HINT_KF] = 1; + } + + /* Actions for stream */ + if( pm != last_pm && pm == MODE_STREAM ) + { + /* Is a solid color stream */ + if( info->status_tokens[STREAM_TYPE] == STREAM_WHITE ) + { + if( ( history[STREAM_COL_R] != info->status_tokens[STREAM_COL_R] ) || + ( history[STREAM_COL_G] != info->status_tokens[STREAM_COL_G] ) || + ( history[STREAM_COL_B] != info->status_tokens[STREAM_COL_B] ) ) + { + info->uc.reload_hint[HINT_RGBSOLID] = 1; + } + + } + + update_label_str( "label_currentsource", "Stream" ); + gchar *time = format_time( info->status_frame,info->el.fps ); + update_label_str( "label_curtime", time ); + g_free(time); + } + + /* Actions for sample */ + if(last_pm != pm || pm == MODE_SAMPLE ) + { + /* Update label and video slider*/ + update_label_i( "label_sampleposition", + info->status_tokens[FRAME_NUM] - info->status_tokens[SAMPLE_START] , 1); + + + int marker_go = 0; + /* Update marker bounds */ + if( (history[SAMPLE_MARKER_START] != info->status_tokens[SAMPLE_MARKER_START]) ) + { + update = 1; + gint nm = info->status_tokens[SAMPLE_MARKER_START]; + if(nm >= 0) + { + gdouble in = (1.0 / (gdouble)info->status_tokens[TOTAL_FRAMES]) * nm; + timeline_set_in_point( info->tl, in ); + marker_go = 1; + } + else + { + if(pm == MODE_SAMPLE) + { + timeline_set_in_point( info->tl, 0.0 ); + marker_go = 1; + } + } + gchar *dur = format_time( info->status_tokens[SAMPLE_MARKER_END] - info->status_tokens[SAMPLE_MARKER_START], + info->el.fps ); + update_label_str( "label_markerduration", dur ); + g_free(dur); + } + + if( (history[SAMPLE_MARKER_END] != info->status_tokens[SAMPLE_MARKER_END]) ) + { + gint nm = info->status_tokens[SAMPLE_MARKER_END]; + if(nm > 0 ) + { + gdouble out = (1.0/ (gdouble)info->status_tokens[TOTAL_FRAMES]) * nm; + + timeline_set_out_point( info->tl, out ); + marker_go = 1; + } + else + { + if(pm == MODE_SAMPLE) + { + timeline_set_out_point(info->tl, 1.0 ); + marker_go = 1; + } + } + update = 1; + } + + if( (history[SAMPLE_START] != info->status_tokens[SAMPLE_START] )) + { + update_spin_value( "spin_samplestart", info->status_tokens[SAMPLE_START] ); + update = 1; + } + if( (history[SAMPLE_END] != info->status_tokens[SAMPLE_END] )) + { + update_spin_value( "spin_sampleend", info->status_tokens[SAMPLE_END]); + update = 1; + } + + if( marker_go ) + { + info->uc.reload_hint[HINT_MARKER] = 1; + } + + if( history[SAMPLE_LOOP] != info->status_tokens[SAMPLE_LOOP]) + { + switch( info->status_tokens[SAMPLE_LOOP] ) + { + case 0: + set_toggle_button( "loop_none", 1 ); + break; + case 1: + set_toggle_button( "loop_normal", 1 ); + break; + case 2: + set_toggle_button("loop_pingpong", 1 ); + break; + case 3: + set_toggle_button("loop_random", 1 ); + break; + } + } + + gint speed = 1; + + + if( history[SAMPLE_SPEED] != info->status_tokens[SAMPLE_SPEED] ) + { + speed = info->status_tokens[SAMPLE_SPEED]; + update_slider_value( "speed_slider", speed, 0 ); + + if( speed < 0 ) info->play_direction = -1; else info->play_direction = 1; + if( speed < 0 ) speed *= -1; + update_spin_value( "spin_samplespeed", speed); + } + + if( history[FRAME_DUP] != info->status_tokens[FRAME_DUP] ) + { + update_spin_value( "spin_framedelay", info->status_tokens[FRAME_DUP]); + } + + + if(update) + { + speed = info->status_tokens[SAMPLE_SPEED]; + if(speed < 0 ) info->play_direction = -1; else info->play_direction = 1; + + gint len = info->status_tokens[SAMPLE_END] - info->status_tokens[SAMPLE_START]; + + int speed = info->status_tokens[SAMPLE_SPEED]; + if(speed < 0 ) info->play_direction = -1; else info->play_direction = 1; + if(speed < 0 ) speed *= -1; + + update_spin_range( "spin_samplespeed", 0, len, speed ); + + gchar *time = format_selection_time( 0, len ); + g_free(time); + + update_label_str( "label_currentsource", "Sample"); + + update_spin_value( "spin_samplestart", info->status_tokens[SAMPLE_START]); + update_spin_value( "spin_sampleend", info->status_tokens[SAMPLE_END]); + + gint n_frames = sample_calctime(); + + timeline_set_length( info->tl, + (gdouble) n_frames , info->status_tokens[FRAME_NUM]- info->status_tokens[SAMPLE_START] ); + + + update_spin_range( "spin_text_start", 0, n_frames ,0); + update_spin_range( "spin_text_end", 0, n_frames,n_frames ); + + info->uc.reload_hint[HINT_KF] = 1; + } + } + + + if( pm == MODE_SAMPLE|| pm == MODE_STREAM ) + if( history[CHAIN_FADE] != info->status_tokens[CHAIN_FADE] ) + { + double val = (double) info->status_tokens[CHAIN_FADE]; + update_slider_value( "manualopacity", val,0 ); + } + +} + + +static void +on_vims_messenger (void) +{ + GtkTextIter start, end; + GtkTextBuffer* buffer; + GtkTextView* t= NULL; + gchar *str = NULL; + static int wait = 0; + t = + GTK_TEXT_VIEW(GTK_WIDGET(glade_xml_get_widget(info->main_window,"vims_messenger_textview"))); + + buffer = gtk_text_view_get_buffer(t); + + if(info->vims_line >= gtk_text_buffer_get_line_count(buffer)){ + info->vims_line = 0; + if(!is_button_toggled( "vims_messenger_loop")) + { + set_toggle_button( "vims_messenger_play", 0 ); + return; + } + } + + if(is_button_toggled( "vims_messenger_play" )){ + if(wait){ + wait--; + } + else{ + gtk_text_buffer_get_iter_at_line(buffer, &start, info->vims_line); + end = start; + + gtk_text_iter_forward_sentence_end(&end); + str = gtk_text_buffer_get_text (buffer, &start, &end, TRUE); + + if(str[0] == '+'){ + str[0] = ' '; + g_strstrip(str); + wait = atoi(str); + } + else{ + vj_msg(VEEJAY_MSG_INFO, "User defined VIMS message sent '%s'",str ); + msg_vims( str ); + printf("\nSent VIMS: %s", str); + } + info->vims_line++; + } + } +} + +static int total_frames_ = 0; + +int get_total_frames() +{ + return total_frames_; +} +/* +static char *bugbuffer_ = NULL; +static int bugoffset_ = 0; + +gboolean capture_data (GIOChannel *source, GIOCondition condition, gpointer data ) +{ + int fd = g_io_channel_unix_get_fd( source ); + GIOStatus ret; + GError *err = NULL; + gchar *msg; + gsize len; + + if (condition & G_IO_HUP) + g_error ("Read end of pipe died!\n"); + + ret = g_io_channel_read_line (source, &msg, &len, NULL, &err); + if (ret == G_IO_STATUS_ERROR) + g_error ("Error reading: %s\n", err->message); + + memcpy( bugbuffer_ + (sizeof(char) * bugoffset_) , msg , len ); + + bugoffset_ += len; + + g_free (msg); + return TRUE; +} +*/ +void reportbug() +{ + char l[3] = { 'e','n', '\0'}; + char *home = getenv("HOME"); + char *lang = getenv("LANG"); + char URL[1024]; + + if(lang) { + l[0] = lang[0]; + l[1] = lang[1]; + } +/* char veejay_homedir[1024]; + char body[1024]; + char subj[100]; + gchar **argv = (gchar**) malloc ( sizeof(gchar*) * 5 ); + int i; + argv[0] = malloc( sizeof(char) * 100 ); + memset( argv[0], 0, sizeof(char) * 100 ); + argv[2] = NULL; + +// snprintf(subj,sizeof(subj),"reloaded %s has a problem", VERSION); + snprintf(veejay_homedir, sizeof(veejay_homedir),"%s/.veejay/", home ); + sprintf(argv[0], "%s/report_problem.sh" ,veejay_homedir); + argv[1] = strdup( veejay_homedir ); + + if( bugoffset_ > 0 ) { + free(bugbuffer_); + bugoffset_= 0; + bugbuffer_ = NULL; + } + +// GError error = NULL; + gint stdout_pipe = 0; + gint pid =0; + gboolean ret = g_spawn_async_with_pipes( + NULL, + argv, + NULL, + G_SPAWN_LEAVE_DESCRIPTORS_OPEN & G_SPAWN_STDERR_TO_DEV_NULL, + NULL, + NULL, + &pid, + NULL, + &stdout_pipe, + NULL, + NULL ); + if( !ret ) { + veejay_msg(0, "Error executing bug report tool"); + return; + } + + GIOChannel *chan = g_io_channel_unix_new( stdout_pipe ); + bugbuffer_ = (char*) malloc(sizeof(char) * 32000 ); + memset(bugbuffer_, 0, sizeof(char) * 32000); + guint retb = g_io_add_watch( chan, G_IO_IN, capture_data, NULL ); +*/ +// if( prompt_dialog("Report a problem", "" ) +// == GTK_RESPONSE_ACCEPT ) + snprintf(URL , sizeof(URL), + "firefox http://groups.google.com/group/veejay-discussion/post?hl=%s",l ); + + printf(URL); + + system(URL); +} + + +static void reset_tree(const char *name) +{ + GtkWidget *tree_widget = glade_xml_get_widget_( info->main_window,name ); + GtkTreeModel *tree_model = gtk_tree_view_get_model( GTK_TREE_VIEW(tree_widget) ); + + gtk_list_store_clear( GTK_LIST_STORE( tree_model ) ); + +} + + +// load effect controls + +gboolean + view_entry_selection_func (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer userdata) + { + GtkTreeIter iter; + if (gtk_tree_model_get_iter(model, &iter, path)) + { + gint name = 0; + + gtk_tree_model_get(model, &iter, FXC_ID, &name, -1); + if (!path_currently_selected && name != info->uc.selected_chain_entry) + { + multi_vims( VIMS_CHAIN_SET_ENTRY, "%d", name ); + vj_midi_learning_vims_msg( info->midi, NULL, VIMS_CHAIN_SET_ENTRY, info->uc.selected_chain_entry ); + } + } + + return TRUE; /* allow selection state to change */ + } + +gboolean + view_sources_selection_func (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer userdata) + { + GtkTreeIter iter; + if (gtk_tree_model_get_iter(model, &iter, path)) + { + gchar *name = NULL; + + gtk_tree_model_get(model, &iter, FXC_ID, &name, -1); + + if (!path_currently_selected) + { + gint id = 0; + sscanf(name+1, "[ %d]", &id); + if(name[0] == 'S') + { + info->uc.selected_mix_sample_id = id; + info->uc.selected_mix_stream_id = 0; + } + else + { + info->uc.selected_mix_sample_id = 0; + info->uc.selected_mix_stream_id = id; + } + } + + if(name) g_free(name); + } + + return TRUE; /* allow selection state to change */ + } + + +static void +cell_data_func_dev (GtkTreeViewColumn *col, + GtkCellRenderer *cell, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer data) +{ + gchar buf[32]; + GValue val = {0, }; + gtk_tree_model_get_value(model, iter, V4L_SPINBOX, &val); + g_snprintf(buf, sizeof(buf), "%.0f",g_value_get_float(&val)); + g_object_set(cell, "text", buf, NULL); +} + +static void +on_dev_edited (GtkCellRendererText *celltext, + const gchar *string_path, + const gchar *new_text, + gpointer data) +{ + GtkTreeModel *model = GTK_TREE_MODEL(data); + GtkTreeIter iter; + gfloat oldval = 0.0; + gfloat newval = 0.0; + + gtk_tree_model_get_iter_from_string(model, &iter, string_path); + + gtk_tree_model_get(model, &iter, V4L_SPINBOX, &oldval, -1); + if (sscanf(new_text, "%f", &newval) != 1) + g_warning("in %s: problem converting string '%s' into float.\n", __FUNCTION__, new_text); + + gtk_list_store_set(GTK_LIST_STORE(model), &iter, V4L_SPINBOX, newval, -1); + +} + + +static void setup_tree_spin_column( const char *tree_name, int type, const char *title) +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, tree_name ); + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + renderer = gui_cell_renderer_spin_new(0.0, 3.0 , 1.0, 1.0, 1.0, 1.0, 0.0); + column = gtk_tree_view_column_new(); + gtk_tree_view_column_set_title(column, title ); + gtk_tree_view_column_pack_start(column, renderer, TRUE); + gtk_tree_view_column_set_cell_data_func( column, renderer, + cell_data_func_dev, NULL,NULL ); + gtk_tree_view_append_column( GTK_TREE_VIEW(tree), column); + g_object_set(renderer, "editable", TRUE, NULL); + + GtkTreeModel *model = gtk_tree_view_get_model( GTK_TREE_VIEW(tree )); + g_signal_connect(renderer, "edited", G_CALLBACK(on_dev_edited), model ); + +} + +static void setup_tree_text_column( const char *tree_name, int type, const char *title,int len ) +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, tree_name ); + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes( title, renderer, "text", type, NULL ); + gtk_tree_view_append_column( GTK_TREE_VIEW( tree ), column ); + + if(len) + { + gtk_tree_view_column_set_min_width( column, 220); + } +} + +static void setup_tree_pixmap_column( const char *tree_name, int type, const char *title ) +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, tree_name ); + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + + renderer = gtk_cell_renderer_pixbuf_new(); + column = gtk_tree_view_column_new_with_attributes( title, renderer, "pixbuf", type, NULL ); + gtk_tree_view_append_column( GTK_TREE_VIEW( tree ), column ); +} + + + +static void setup_effectchain_info( void ) +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "tree_chain"); + GtkListStore *store = gtk_list_store_new( 4, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_PIXBUF,GDK_TYPE_PIXBUF ); + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + g_object_unref( G_OBJECT( store )); + + setup_tree_text_column( "tree_chain", FXC_ID, "#",0 ); + setup_tree_text_column( "tree_chain", FXC_FXID, "Effect",1 ); + setup_tree_pixmap_column( "tree_chain", FXC_FXSTATUS, "Run"); // todo: could be checkbox!! + setup_tree_pixmap_column( "tree_chain", FXC_KF , "Anim" ); // parameter interpolation on/off per entry + GtkTreeSelection *selection; + + tree = glade_xml_get_widget_( info->main_window, "tree_chain"); + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + gtk_tree_selection_set_select_function(selection, view_entry_selection_func, NULL, NULL); +} + + + +static void load_v4l_info() +{ + int values[6]; + int len = 0; + multi_vims( VIMS_STREAM_GET_V4L, "%d", (info->selected_slot == NULL ? 0 : info->selected_slot->sample_id )); + gchar *answer = recv_vims(3, &len); + if(len > 0 ) + { + int res = sscanf( answer, "%05d%05d%05d%05d%05d%05d", + &values[0],&values[1],&values[2],&values[3],&values[4],&values[5]); + if(res == 6) + { + int i; + for(i = 1; i < 7; i ++ ) + { + update_slider_gvalue( capt_card_set[i].name, (gdouble)values[i-1]/65535.0 ); + } + } + g_free(answer); + } +} + +static gint load_parameter_info() +{ + int *st = &(info->uc.entry_tokens[0]); + int len = 0; + int p[20]; + int i; + + veejay_memset( p, 0, sizeof(p)); + + multi_vims( VIMS_CHAIN_GET_ENTRY, "%d %d", 0, + info->uc.selected_chain_entry ); + + gchar *answer = recv_vims(3,&len); + if(len <= 0 || answer == NULL ) + { + if(answer) g_free(answer); + for( i = 0; i < 16; i ++ ) + st[i] = 0; + if(info->uc.selected_rgbkey ) + disable_widget("rgbkey"); + return 0; + } + int res = sscanf( answer, + "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + p+0,p+1,p+2,p+3,p+4,p+5,p+6,p+7,p+8,p+9,p+10, + p+11,p+12,p+13,p+14,p+15, p + 16, p+17,p+18,p+19); + + if( res <= 0 ) + { + for( i = 0; i < 20; i ++ ) + st[i] = 0; + return 0; + } + + info->uc.selected_rgbkey = _effect_get_rgb( p[0] ); + if(info->uc.selected_rgbkey) + { + enable_widget( "rgbkey"); + update_rgbkey(); + } + else + { + disable_widget( "rgbkey"); + info->uc.selected_rgbkey = 0; + } + + for( i = 0; i < 20; i ++ ) + st[i] = p[i]; + + set_toggle_button( "curve_toggleentry", p[16] ); + + if(info->status_tokens[PLAY_MODE] == MODE_SAMPLE ) + { + update_spin_range( "curve_spinstart", + info->status_tokens[SAMPLE_START], + info->status_tokens[SAMPLE_END], p[17] ); + update_spin_range( "curve_spinend", info->status_tokens[SAMPLE_START], + info->status_tokens[SAMPLE_END] ,p[18] ); + } + else + { + int nl = get_nums("stream_length") + 1 ; + update_spin_range( "curve_spinstart", 0, nl, p[17] ); + update_spin_range( "curve_spinend", 0,nl, p[18] ); + } + + switch( p[19] ) + { + case GTK_CURVE_TYPE_LINEAR: set_toggle_button( "curve_typelinear", 1 ); break; + case GTK_CURVE_TYPE_SPLINE: set_toggle_button( "curve_typespline", 1 ); break; + case GTK_CURVE_TYPE_FREE: set_toggle_button( "curve_typefree",1 ); break; + default: + break; + } + + + g_free(answer); + + return 1; +} + + +// load effect chain +static void load_effectchain_info() +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "tree_chain"); + GtkListStore *store; + + GtkTreeIter iter; + gint offset=0; + + gint fxlen = 0; + multi_vims( VIMS_CHAIN_LIST,"%d",0 ); + gchar *fxtext = recv_vims(3,&fxlen); + + reset_tree( "tree_chain" ); + + GtkTreeModel *model = gtk_tree_view_get_model( GTK_TREE_VIEW(tree )); + store = GTK_LIST_STORE(model); + + if(fxlen <= 0 ) + { + int i; + for( i = 0; i < 20; i ++ ) + { + gtk_list_store_append(store,&iter); + gtk_list_store_set(store,&iter, FXC_ID, i ,-1); + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + } + return; + } + + if(fxlen == 5 ) + offset = fxlen; + + gint last_index =0; + + while( offset < fxlen ) + { + gchar toggle[4]; + gchar kf_toggle[4]; + guint arr[6]; + veejay_memset(toggle,0,4); + veejay_memset(kf_toggle,0,4); + veejay_memset(arr,0,sizeof(arr)); + char line[12]; + veejay_memset(line,0,sizeof(line)); + strncpy( line, fxtext + offset, 8 ); + sscanf( line, "%02d%03d%1d%1d%1d", + &arr[0],&arr[1],&arr[2],&arr[3],&arr[4]); + + char *name = _effect_get_description( arr[1] ); + sprintf(toggle,"%s", + arr[3] == 1 ? "on" : "off" ); + + while( last_index < arr[0] ) + { + gtk_list_store_append( store, &iter ); + gtk_list_store_set( store, &iter, FXC_ID, last_index,-1); + last_index ++; + } + + if( last_index == arr[0]) + { + gchar *utf8_name = _utf8str( name ); + int on = info->uc.entry_tokens[16]; + gtk_list_store_append( store, &iter ); + GdkPixbuf *toggle = update_pixmap_entry( arr[3] ); + GdkPixbuf *kf_toggle = update_pixmap_kf( on ); + gtk_list_store_set( store, &iter, + FXC_ID, arr[0], + FXC_FXID, utf8_name, + FXC_FXSTATUS, toggle, + FXC_KF, kf_toggle, -1 ); + last_index ++; + g_free(utf8_name); + g_object_unref( toggle ); + g_object_unref( kf_toggle ); + } + offset += 8; + } + while( last_index < 20 ) + { + gtk_list_store_append( store, &iter ); + gtk_list_store_set( store, &iter, + FXC_ID, last_index , -1 ); + last_index ++; + } + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + g_free(fxtext); +} + +enum +{ +// FX_ID = 0, + FX_STRING = 0, + FX_NUM, +}; + +gboolean + view_fx_selection_func (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer userdata) + { + GtkTreeIter iter; + + if (gtk_tree_model_get_iter(model, &iter, path)) + { + // gint name; + gchar *name = NULL; + gtk_tree_model_get(model, &iter, FX_STRING, &name, -1); + + if (!path_currently_selected) + { + int value = 0; + vevo_property_get( fx_list_, name, 0, &value ); + if(value) info->uc.selected_effect_id = value; + } + g_free(name); + + } + + return TRUE; /* allow selection state to change */ + } +void +on_effectmixlist_row_activated(GtkTreeView *treeview, + GtkTreePath *path, + GtkTreeViewColumn *col, + gpointer user_data) +{ + GtkTreeModel *model; + GtkTreeIter iter; + model = gtk_tree_view_get_model(treeview); + if(gtk_tree_model_get_iter(model,&iter,path)) + { + gint gid =0; + gchar *name = NULL; + gtk_tree_model_get(model,&iter, FX_STRING, &name, -1); // FX_ID + + if(vevo_property_get( fx_list_, name, 0,&gid ) == 0 ) + { + multi_vims(VIMS_CHAIN_ENTRY_SET_EFFECT, "%d %d %d", + 0, info->uc.selected_chain_entry,gid ); + info->uc.reload_hint[HINT_ENTRY] = 1; + + char trip[100]; + snprintf(trip,sizeof(trip), "%03d:%d %d %d;", VIMS_CHAIN_ENTRY_SET_EFFECT,0,info->uc.selected_chain_entry, gid ); + vj_midi_learning_vims( info->midi, NULL, trip, 0 ); + } + g_free(name); + } +} +void +on_effectlist_row_activated(GtkTreeView *treeview, + GtkTreePath *path, + GtkTreeViewColumn *col, + gpointer user_data) +{ + GtkTreeModel *model; + GtkTreeIter iter; + model = gtk_tree_view_get_model(treeview); + + if(gtk_tree_model_get_iter(model,&iter,path)) + { + gint gid =0; + gchar *name = NULL; + gtk_tree_model_get(model,&iter, FX_STRING, &name, -1); + + if(vevo_property_get( fx_list_, name, 0, &gid ) == 0 ) + { + multi_vims(VIMS_CHAIN_ENTRY_SET_EFFECT, "%d %d %d", + 0, info->uc.selected_chain_entry,gid ); + info->uc.reload_hint[HINT_ENTRY] = 1; + char trip[100]; + snprintf(trip,sizeof(trip), "%03d:%d %d %d;", VIMS_CHAIN_ENTRY_SET_EFFECT,0,info->uc.selected_chain_entry, gid ); + vj_midi_learning_vims( info->midi, NULL, trip, 0 ); + + } + g_free(name); + } + +} +gint +sort_iter_compare_func( GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, + gpointer userdata) +{ + gint sortcol = GPOINTER_TO_INT(userdata); + gint ret = 0; + + if(sortcol == FX_STRING) + { + gchar *name1=NULL; + gchar *name2=NULL; + gtk_tree_model_get(model,a, FX_STRING, &name1, -1 ); + gtk_tree_model_get(model,b, FX_STRING, &name2, -1 ); + if( name1 == NULL || name2 == NULL ) + { + if( name1==NULL && name2==NULL) + { + return 0; + } + ret = (name1 == NULL) ? -1 : 1; + } + else + { + ret = g_utf8_collate(name1,name2); + } + if(name1) g_free(name1); + if(name2) g_free(name2); + } + return ret; +} + + + +gint +sort_vims_func( GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, + gpointer userdata) +{ + gint sortcol = GPOINTER_TO_INT(userdata); + gint ret = 0; + + if(sortcol == VIMS_ID) + { + gchar *name1 = NULL; + gchar *name2 = NULL; + + gtk_tree_model_get(model,a, VIMS_ID, &name1, -1 ); + gtk_tree_model_get(model,b, VIMS_ID, &name2, -1 ); + if( name1 == NULL || name2 == NULL ) + { + if( name1==NULL && name2== NULL) + { + return 0; + } + ret = (name1==NULL) ? -1 : 1; + } + else + { + ret = g_utf8_collate(name1,name2); + } + if(name1) g_free(name1); + if(name2) g_free(name2); + } + return ret; +} + +// load effectlist from veejay +void setup_effectlist_info() +{ + int i; + GtkWidget *trees[2]; + trees[0] = glade_xml_get_widget_( info->main_window, "tree_effectlist"); + trees[1] = glade_xml_get_widget_( info->main_window, "tree_effectmixlist"); + GtkListStore *stores[2]; + stores[0] = gtk_list_store_new( 1, G_TYPE_STRING ); + stores[1] = gtk_list_store_new( 1, G_TYPE_STRING ); + + + fx_list_ = (vevo_port_t*) vpn( 200 ); + + for(i = 0; i < 2; i ++ ) + { + GtkTreeSortable *sortable = GTK_TREE_SORTABLE(stores[i]); + gtk_tree_sortable_set_sort_func( + sortable, FX_STRING, sort_iter_compare_func, + GINT_TO_POINTER(FX_STRING),NULL); + + gtk_tree_sortable_set_sort_column_id( + sortable, FX_STRING, GTK_SORT_ASCENDING); + + gtk_tree_view_set_headers_visible( GTK_TREE_VIEW(trees[i]), FALSE ); + + gtk_tree_view_set_model( GTK_TREE_VIEW(trees[i]), GTK_TREE_MODEL(stores[i])); + g_object_unref( G_OBJECT( stores[i] )); + } + + + setup_tree_text_column( "tree_effectlist", FX_STRING, "Effect",0 ); + + setup_tree_text_column( "tree_effectmixlist", FX_STRING, "Effect",0 ); + + g_signal_connect( trees[0], "row-activated", + (GCallback) on_effectlist_row_activated, NULL ); + + g_signal_connect( trees[1] ,"row-activated", + (GCallback) on_effectmixlist_row_activated, NULL ); + + GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(trees[0])); + gtk_tree_selection_set_select_function(selection, view_fx_selection_func, NULL, NULL); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + + selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(trees[1] )); + gtk_tree_selection_set_select_function( selection, view_fx_selection_func, NULL,NULL ); + gtk_tree_selection_set_mode( selection, GTK_SELECTION_SINGLE ); + +} + + +void +on_effectlist_sources_row_activated(GtkTreeView *treeview, + GtkTreePath *path, + GtkTreeViewColumn *col, + gpointer user_data) +{ + GtkTreeModel *model; + GtkTreeIter iter; + model = gtk_tree_view_get_model(treeview); + + + if(gtk_tree_model_get_iter(model,&iter,path)) + { + gchar *idstr = NULL; + gtk_tree_model_get(model,&iter, SL_ID, &idstr, -1); + gint id = 0; + if( sscanf( idstr+1, "[ %d]", &id ) ) + { + // set source / channel + multi_vims( VIMS_CHAIN_ENTRY_SET_SOURCE_CHANNEL, + "%d %d %d %d", + 0, + info->uc.selected_chain_entry, + ( idstr[0] == 'T' ? 1 : 0 ), + id ); + vj_msg(VEEJAY_MSG_INFO, "Set source channel to %d, %d", info->uc.selected_chain_entry,id ); + + + char trip[100]; + snprintf(trip, sizeof(trip), "%03d:%d %d %d %d",VIMS_CHAIN_ENTRY_SET_SOURCE_CHANNEL, + 0, + info->uc.selected_chain_entry, + ( idstr[0] == 'T' ? 1 : 0 ), + id ); + vj_midi_learning_vims( info->midi, NULL, trip, 0 ); + } + if(idstr) g_free(idstr); + } +} + +/* Return a bank page and slot number to place sample in */ + +int verify_bank_capacity(int *bank_page_, int *slot_, int sample_id, int sample_type ) +{ + int poke_slot = 0; + int bank_page = find_bank_by_sample( sample_id, sample_type, &poke_slot ); + + if(bank_page == -1) + return 0; + + if( !bank_exists(bank_page, poke_slot)) + add_bank( bank_page ); + + *bank_page_ = bank_page; + *slot_ = poke_slot; + + return 1; +} + + +void setup_samplelist_info() +{ + effect_sources_tree = glade_xml_get_widget_( info->main_window, "tree_sources"); + effect_sources_store = gtk_list_store_new( 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING ); + + gtk_tree_view_set_headers_visible( GTK_TREE_VIEW(effect_sources_tree), FALSE ); + + gtk_tree_view_set_model( GTK_TREE_VIEW(effect_sources_tree), GTK_TREE_MODEL(effect_sources_store)); + g_object_unref( G_OBJECT( effect_sources_store )); + effect_sources_model = gtk_tree_view_get_model( GTK_TREE_VIEW(effect_sources_tree )); + effect_sources_store = GTK_LIST_STORE(effect_sources_model); + + setup_tree_text_column( "tree_sources", SL_ID, "Id",0 ); + setup_tree_text_column( "tree_sources", SL_TIMECODE, "Length" ,0); + + GtkTreeSelection *selection; + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(effect_sources_tree)); + gtk_tree_selection_set_select_function(selection, view_sources_selection_func, NULL, NULL); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + + g_signal_connect( effect_sources_tree, "row-activated", (GCallback) on_effectlist_sources_row_activated, (gpointer*)"tree_sources"); +} + + +void load_effectlist_info() +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "tree_effectlist"); + GtkWidget *tree2 = glade_xml_get_widget_( info->main_window, "tree_effectmixlist"); + GtkListStore *store,*store2; + + GtkTreeIter iter; + gint i,offset=0; + + + gint fxlen = 0; + single_vims( VIMS_EFFECT_LIST ); + gchar *fxtext = recv_vims(5,&fxlen); + _effect_reset(); + reset_tree( "tree_effectlist"); + GtkTreeModel *model = gtk_tree_view_get_model( GTK_TREE_VIEW(tree )); + store = GTK_LIST_STORE(model); + + GtkTreeModel *model2 = gtk_tree_view_get_model( GTK_TREE_VIEW(tree2)); + store2 = GTK_LIST_STORE(model2); + while( offset < fxlen ) + { + char tmp_len[4]; + veejay_memset(tmp_len,0,sizeof(tmp_len)); + strncpy(tmp_len, fxtext + offset, 3 ); + int len = atoi(tmp_len); + offset += 3; + if(len > 0) + { + effect_constr *ec; + char line[255]; + veejay_memset( line,0,sizeof(line)); + strncpy( line, fxtext + offset, len ); + ec = _effect_new(line); + if(ec) info->effect_info = g_list_append( info->effect_info, ec ); + } + offset += len; + } + + fxlen = g_list_length( info->effect_info ); + for( i = 0; i < fxlen; i ++) + { + + effect_constr *ec = g_list_nth_data( info->effect_info, i ); + gchar *name = _utf8str( _effect_get_description( ec->id ) ); + if( name != NULL) + { + if( _effect_get_mix(ec->id) > 0 ) + { + gtk_list_store_append( store2, &iter ); + gtk_list_store_set( store2, &iter, FX_STRING, name, -1 ); + vevo_property_set( fx_list_, name, LIVIDO_ATOM_TYPE_INT, 1, &(ec->id)); + } + else + { + gtk_list_store_append( store, &iter ); + gtk_list_store_set( store, &iter, FX_STRING, name, -1 ); + vevo_property_set( fx_list_, name, LIVIDO_ATOM_TYPE_INT, 1, &(ec->id)); + } + + } + g_free(name); + } + + + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + gtk_tree_view_set_model( GTK_TREE_VIEW(tree2), GTK_TREE_MODEL(store2)); + g_free(fxtext); + +} + +static void select_slot__( int pm ) +{ + int *history = info->history_tokens[ pm ]; +#ifdef STRICT_CHECKING + assert( history != NULL ); +#endif + int poke_slot = 0; + int bank_page = 0; + + if( pm == MODE_SAMPLE || pm == MODE_STREAM ) + { + int b = 0; int p = 0; + /* falsify activation */ + if(info->status_tokens[CURRENT_ID] > 0) + { + if(verify_bank_capacity( &b, &p, info->status_tokens[CURRENT_ID], + info->status_tokens[PLAY_MODE] )) + { + if( info->selected_slot ) { + if ( info->selected_slot->sample_type != pm || info->selected_slot->sample_id != + info->status_tokens[CURRENT_ID] ) { + set_activation_of_slot_in_samplebank(FALSE); + } + } + info->selected_slot = info->sample_banks[b]->slot[p]; + info->selected_gui_slot = info->sample_banks[b]->gui_slot[p]; + set_activation_of_slot_in_samplebank(TRUE); + } + /*bank_page = find_bank_by_sample( info->status_tokens[CURRENT_ID], pm, &poke_slot ); + + info->selected_slot= info->sample_banks[bank_page]->slot[poke_slot]; + info->selected_gui_slot= info->sample_banks[bank_page]->gui_slot[poke_slot];*/ + + } + } + else { + set_activation_of_slot_in_samplebank(FALSE); + info->selected_slot = NULL; + info->selected_gui_slot = NULL; + } +} + +static void select_slot_(int pm, const char *f, int line) +{ + select_slot__(pm); +} + +static void load_sequence_list() +{ + single_vims( VIMS_SEQUENCE_LIST ); + gint len = 0; + gchar *text = recv_vims( 6, &len ); + if( len <= 0 || text == NULL ) + return; + + int playing=0; + int size =0; + int active=0; + + sscanf( text, "%04d%04d%4d",&playing,&size,&active ); + int nlen = len - 12; + int offset = 0; + int id = 0; + gchar *in = text + 12; + while( offset < nlen ) + { + int sample_id = 0; + char seqtext[32]; + sscanf( in + offset, "%04d", &sample_id ); + offset += 4; + if( sample_id > 0 ) + { + sprintf(seqtext, "%d",sample_id); + gtk_label_set_text( + GTK_LABEL(info->sequencer_view->gui_slot[id]->image), + seqtext ); + } + else + { + gtk_label_set_text( + GTK_LABEL(info->sequencer_view->gui_slot[id]->image), + NULL ); + } + + id ++; + } + g_free(text); + +} + +static void load_samplelist_info(gboolean with_reset_slotselection) +{ + gint offset=0; + int has_samples = 0; + int has_streams = 0; + int n_slots = 0; + reset_tree( "tree_sources" ); + + if( with_reset_slotselection ) + reset_samplebank(); + multi_vims( VIMS_SAMPLE_LIST,"%d", 0 ); + gint fxlen = 0; + gchar *fxtext = recv_vims(5,&fxlen); + if(fxlen > 0 && fxtext != NULL) + { + has_samples = 1; + while( offset < fxlen ) + { + char tmp_len[4]; + veejay_memset(tmp_len,0,sizeof(tmp_len)); + strncpy(tmp_len, fxtext + offset, 3 ); + int len = atoi(tmp_len); + offset += 3; + if(len > 0) + { + char line[300]; + char descr[255]; + veejay_memset( line,0,sizeof(line)); + veejay_memset( descr,0,sizeof(descr)); + strncpy( line, fxtext + offset, len ); + + int values[4]; + sscanf( line, "%05d%09d%09d%03d%s", + &values[0], &values[1], &values[2], &values[3], + descr ); + gchar *title = _utf8str( descr ); + gchar *timecode = format_selection_time( 0,(values[2]-values[1]) ); + + int int_id = values[0]; + int poke_slot= 0; int bank_page = 0; + verify_bank_capacity( &bank_page , &poke_slot, int_id, 0); + if(bank_page >= 0 ) + { + if( info->sample_banks[bank_page]->slot[poke_slot]->sample_id <= 0 ) + { + sample_slot_t *tmp_slot = create_temporary_slot(poke_slot,int_id,0, title,timecode ); + add_sample_to_sample_banks(bank_page, tmp_slot ); + free_slot(tmp_slot); + n_slots ++; + } + else + { + update_sample_slot_data( bank_page, poke_slot, int_id,0,title,timecode); + } + } + if( info->status_tokens[CURRENT_ID] == values[0] && info->status_tokens[PLAY_MODE] == 0 ) + put_text( "entry_samplename", title ); + g_free(timecode); + g_free(title); + } + offset += len; + } + offset = 0; + } + + if( fxtext ) g_free(fxtext); + fxlen = 0; + + multi_vims( VIMS_STREAM_LIST,"%d",0 ); + fxtext = recv_vims(5, &fxlen); + if( fxlen > 0 && fxtext != NULL) + { + has_streams = 1; + while( offset < fxlen ) + { + char tmp_len[4]; + veejay_memset(tmp_len,0,sizeof(tmp_len)); + strncpy(tmp_len, fxtext + offset, 3 ); + + int len = atoi(tmp_len); + offset += 3; + if(len > 0) + { + char line[300]; + char source[255]; + char descr[255]; + veejay_memset(line,0,sizeof(line)); + veejay_memset(descr,0,sizeof(descr)); + strncpy( line, fxtext + offset, len ); + + int values[10]; + + veejay_memset(values,0, sizeof(values)); + + sscanf( line, "%05d%02d%03d%03d%03d%03d%03d%03d", + &values[0], &values[1], &values[2], + &values[3], &values[4], &values[5], + &values[6], &values[7] + ); + strncpy( descr, line + 22, values[6] ); + switch( values[1] ) + { + case STREAM_VIDEO4LINUX :sprintf(source,"unicap %d",values[0]);break; + case STREAM_WHITE :sprintf(source,"solid %d",values[0]); + break; + case STREAM_MCAST :sprintf(source,"multicast %d",values[0]);break; + case STREAM_NETWORK :sprintf(source,"unicast %d",values[0]);break; + case STREAM_YUV4MPEG :sprintf(source,"y4n %d",values[0]);break; + case STREAM_DV1394 :sprintf(source,"dv1394 %d",values[0]);break; + case STREAM_PICTURE :sprintf(source,"image %d",values[0]);break; + default: + sprintf(source,"??? %d", values[0]); + } + gchar *gsource = _utf8str( descr ); + gchar *gtype = _utf8str( source ); + + int bank_page = 0; int poke_slot = 0; + int full = verify_bank_capacity( &bank_page , &poke_slot, values[0], 1); + if(bank_page >= 0) + { + if( info->sample_banks[bank_page]->slot[poke_slot] <= 0 ) + { + sample_slot_t *tmp_slot = create_temporary_slot(poke_slot,values[0],1, gtype,gsource ); + add_sample_to_sample_banks(bank_page, tmp_slot ); n_slots ++; + free_slot(tmp_slot); + } + else + { + update_sample_slot_data( bank_page, poke_slot, values[0],1,gsource,gtype); + } + } + g_free(gsource); + g_free(gtype); + } + offset += len; + } + + } + + if(fxtext) g_free(fxtext); +} + +gboolean + view_el_selection_func (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer userdata) + { + GtkTreeIter iter; + + if (gtk_tree_model_get_iter(model, &iter, path)) + { + gint num = 0; + + gtk_tree_model_get(model, &iter, COLUMN_INT, &num, -1); + + if (!path_currently_selected) + { + info->uc.selected_el_entry = num; + gint frame_num =0; + frame_num = _el_ref_start_frame( num ); + update_spin_value( "button_el_selstart", + frame_num); + update_spin_value( "button_el_selend", + _el_ref_end_frame( num ) ); + } + + } + return TRUE; /* allow selection state to change */ + } + +void +on_vims_row_activated(GtkTreeView *treeview, + GtkTreePath *path, + GtkTreeViewColumn *col, + gpointer user_data) +{ + GtkTreeModel *model; + GtkTreeIter iter; + model = gtk_tree_view_get_model(treeview); + if(gtk_tree_model_get_iter(model,&iter,path)) + { + gchar *vimsid = NULL; + gint event_id =0; + gtk_tree_model_get(model,&iter, VIMS_ID, &vimsid, -1); + + if(sscanf( vimsid, "%d", &event_id )) + { + if(event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END) + { + multi_vims( VIMS_BUNDLE, "%d", event_id ); + info->uc.reload_hint[HINT_CHAIN] = 1; + } + else + { + gchar *args = NULL; + gchar *format = NULL; + gtk_tree_model_get(model,&iter, VIMS_FORMAT, &format, -1); + gtk_tree_model_get(model,&iter, VIMS_CONTENTS, &args, -1 ); + + if( event_id == VIMS_QUIT ) + { + if( prompt_dialog("Stop Veejay", "Are you sure ? (All unsaved work will be lost)" ) == + GTK_RESPONSE_REJECT ) + return; + } + if( (format == NULL||args==NULL) || (strlen(format) <= 0) ) + single_vims( event_id ); + else + { + if( args != NULL && strlen(args) > 0 ) + { + char msg[100]; + sprintf(msg, "%03d:%s;", event_id, args ); + msg_vims(msg); + } + } + } + } + if( vimsid ) g_free( vimsid ); + } +} + +gboolean + view_vims_selection_func (GtkTreeSelection *selection, + GtkTreeModel *model, + GtkTreePath *path, + gboolean path_currently_selected, + gpointer userdata) + { + GtkTreeIter iter; + if (gtk_tree_model_get_iter(model, &iter, path)) + { + gchar *vimsid = NULL; + gint event_id = 0; + gchar *text = NULL; + gint n_params = 0; + gtk_tree_model_get(model, &iter, VIMS_ID, &vimsid, -1); + gtk_tree_model_get(model, &iter, VIMS_CONTENTS, &text, -1 ); + gtk_tree_model_get(model, &iter, VIMS_PARAMS, &n_params, -1); + int k=0; + int m=0; + gchar *key = NULL; + gchar *mod = NULL; + + gtk_tree_model_get(model,&iter, VIMS_KEY, &key, -1); + gtk_tree_model_get(model,&iter, VIMS_MOD, &mod, -1); + + if(sscanf( vimsid, "%d", &event_id )) + { + k = sdlkey_by_name( key ); + m = sdlmod_by_name( mod ); + + info->uc.selected_vims_entry = event_id; + + if( event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END ) + info->uc.selected_vims_type = 0; + else + info->uc.selected_vims_type = 1; + + if(info->uc.selected_vims_args ) + free(info->uc.selected_vims_args); + info->uc.selected_vims_args = NULL; + + if( n_params > 0 && text ) + info->uc.selected_vims_args = strdup( text ); + + info->uc.selected_vims_accel[0] = m; + info->uc.selected_vims_accel[1] = k; + + clear_textview_buffer( "vimsview" ); + if( info->uc.selected_vims_type == 1 && text) + set_textview_buffer( "vimsview", text ); + } + if(vimsid) g_free( vimsid ); + if(text) g_free( text ); + if(key) g_free( key ); + if(mod) g_free( mod ); + } + + return TRUE; /* allow selection state to change */ + } + +void +on_editlist_row_activated(GtkTreeView *treeview, + GtkTreePath *path, + GtkTreeViewColumn *col, + gpointer user_data) +{ + GtkTreeModel *model; + GtkTreeIter iter; + + model = gtk_tree_view_get_model(treeview); + if(gtk_tree_model_get_iter(model,&iter,path)) + { + gint num = 0; + gtk_tree_model_get(model,&iter, COLUMN_INT, &num, -1); + gint frame_num = _el_ref_start_frame( num ); + + multi_vims( VIMS_VIDEO_SET_FRAME, "%d", (int) frame_num ); + } +} + +void +on_stream_color_changed(GtkColorSelection *colorsel, gpointer user_data) +{ + if(!info->status_lock && info->selected_slot) + { + GdkColor current_color; + GtkWidget *colorsel = glade_xml_get_widget_(info->main_window, + "colorselection" ); + gtk_color_selection_get_current_color( + GTK_COLOR_SELECTION( colorsel ), + ¤t_color ); + + gint red = current_color.red / 256.0; + gint green = current_color.green / 256.0; + gint blue = current_color.blue / 256.0; + + multi_vims( VIMS_STREAM_COLOR, "%d %d %d %d", + info->selected_slot->sample_id, + red, + green, + blue + ); + } + +} + + + +static void setup_colorselection() +{ + GtkWidget *sel = glade_xml_get_widget_(info->main_window, "colorselection"); + g_signal_connect( sel, "color-changed", + (GCallback) on_stream_color_changed, NULL ); + +} + +void +on_rgbkey_color_changed(GtkColorSelection *colorsel, gpointer user_data) +{ + if(!info->entry_lock) + { + GdkColor current_color; + GtkWidget *colorsel = glade_xml_get_widget_(info->main_window, + "rgbkey" ); + gtk_color_selection_get_current_color( + GTK_COLOR_SELECTION( colorsel ), + ¤t_color ); + + // scale to 0 - 255 + gint red = current_color.red / 256.0; + gint green = current_color.green / 256.0; + gint blue = current_color.blue / 256.0; + + multi_vims( + VIMS_CHAIN_ENTRY_SET_ARG_VAL, "%d %d %d %d", + 0, info->uc.selected_chain_entry, 1, red ); + multi_vims( + VIMS_CHAIN_ENTRY_SET_ARG_VAL, "%d %d %d %d", + 0, info->uc.selected_chain_entry, 2, green ); + multi_vims( + VIMS_CHAIN_ENTRY_SET_ARG_VAL, "%d %d %d %d", + 0, info->uc.selected_chain_entry, 3, blue ); + + info->parameter_lock = 1; + update_slider_value( + "slider_p1", red, 0 ); + update_slider_value( + "slider_p2", green, 0 ); + update_slider_value( + "slider_p3", blue, 0 ); + + info->parameter_lock = 0; + } +} + + +static void setup_rgbkey() +{ + GtkWidget *sel = glade_xml_get_widget_(info->main_window, "rgbkey"); + g_signal_connect( sel, "color-changed", + (GCallback) on_rgbkey_color_changed, NULL ); + +} + +static void setup_vimslist() +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "tree_vims"); + GtkListStore *store = gtk_list_store_new( 2,G_TYPE_STRING, G_TYPE_STRING); + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + g_object_unref( G_OBJECT( store )); + + setup_tree_text_column( "tree_vims", VIMS_ID, "VIMS ID",0); + setup_tree_text_column( "tree_vims", VIMS_DESCR, "Description",0 ); + + GtkTreeSortable *sortable = GTK_TREE_SORTABLE(store); + + gtk_tree_sortable_set_sort_func( + sortable, VIMS_ID, sort_vims_func, + GINT_TO_POINTER(VIMS_ID),NULL); + + gtk_tree_sortable_set_sort_column_id( + sortable, VIMS_ID, GTK_SORT_ASCENDING); +} + + +static void setup_bundles() +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "tree_bundles"); + GtkListStore *store = gtk_list_store_new( 7,G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING ,G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING); + + gtk_widget_set_size_request( tree, 300, -1 ); + + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + GtkTreeSortable *sortable = GTK_TREE_SORTABLE(store); + + gtk_tree_sortable_set_sort_func( + sortable, VIMS_ID, sort_vims_func, + GINT_TO_POINTER(VIMS_ID),NULL); + + gtk_tree_sortable_set_sort_column_id( + sortable, VIMS_ID, GTK_SORT_ASCENDING); + + g_object_unref( G_OBJECT( store )); + + setup_tree_text_column( "tree_bundles", VIMS_ID, "VIMS",0); + setup_tree_text_column( "tree_bundles", VIMS_DESCR, "Description",0 ); + setup_tree_text_column( "tree_bundles", VIMS_KEY, "Key",0); + setup_tree_text_column( "tree_bundles", VIMS_MOD, "Mod",0); + setup_tree_text_column( "tree_bundles", VIMS_PARAMS, "Max args",0); + setup_tree_text_column( "tree_bundles", VIMS_FORMAT, "Format",0 ); + g_signal_connect( tree, "row-activated", + (GCallback) on_vims_row_activated, NULL ); + + GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); + gtk_tree_selection_set_select_function(selection, view_vims_selection_func, NULL, NULL); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + + GtkWidget *tv = glade_xml_get_widget_( info->main_window, "vimsview" ); + gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW(tv), GTK_WRAP_WORD_CHAR ); +} + +static void setup_editlist_info() +{ + editlist_tree = glade_xml_get_widget_( info->main_window, "editlisttree"); + editlist_store = gtk_list_store_new( 5,G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING ,G_TYPE_STRING); + gtk_tree_view_set_model( GTK_TREE_VIEW(editlist_tree), GTK_TREE_MODEL(editlist_store)); + g_object_unref( G_OBJECT( editlist_store )); + editlist_model = gtk_tree_view_get_model( GTK_TREE_VIEW(editlist_tree )); + editlist_store = GTK_LIST_STORE(editlist_model); + + setup_tree_text_column( "editlisttree", COLUMN_INT, "#",0); + setup_tree_text_column( "editlisttree", COLUMN_STRING0, "Timecode",0 ); + setup_tree_text_column( "editlisttree", COLUMN_STRINGA, "Filename",0); + setup_tree_text_column( "editlisttree", COLUMN_STRINGB, "Duration",0); + setup_tree_text_column( "editlisttree", COLUMN_STRINGC, "FOURCC",0); + + g_signal_connect( editlist_tree, "row-activated", + (GCallback) on_editlist_row_activated, NULL ); + + GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(editlist_tree)); + gtk_tree_selection_set_select_function(selection, view_el_selection_func, NULL, NULL); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); +} + +static void reload_keys() +{ + gint len = 0; + single_vims( VIMS_KEYLIST ); + gchar *text = recv_vims( 6, &len ); + gint offset = 0; + + if( len == 0 || text == NULL ) + return; + + gint k,index; + for( k = 0; k < VIMS_MAX ; k ++ ) + { + vims_keys_t *p = &vims_keys_list[k]; + if(p->vims) + free(p->vims); + p->keyval = 0; + p->state = 0; + p->event_id = 0; + p->vims = NULL; + } + + char *ptr = text; + + while( offset < len ) + { + int val[6]; + veejay_memset(val,0,sizeof(val)); + int n = sscanf( ptr + offset, "%04d%03d%03d%03d", &val[0],&val[1],&val[2],&val[3]); + if( n != 4 ) + { + free(text); + return; + } + + offset += 13; + char *message = strndup( ptr + offset , val[3] ); + + offset += val[3]; + + + index = (val[1] * MOD_OFFSET) + val[2]; + + vims_keys_list[ index ].keyval = val[2]; + vims_keys_list[ index ].state = val[1]; + vims_keys_list[ index ].event_id = val[0]; + vims_keys_list[ index ].vims = message; + } + free(text); +} + + +static void reload_bundles() +{ + reload_keys(); + + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "tree_bundles"); + GtkListStore *store; + GtkTreeIter iter; + + gint len = 0; + single_vims( VIMS_BUNDLE_LIST ); + gchar *eltext = recv_vims(6,&len); // msg len + gint offset = 0; + + reset_tree("tree_bundles"); + + if(len == 0 || eltext == NULL ) + { +#ifdef STRICT_CHECKING + assert(eltext != NULL && len > 0); +#endif + return; + } + + GtkTreeModel *model = gtk_tree_view_get_model( GTK_TREE_VIEW(tree )); + store = GTK_LIST_STORE(model); + + char *ptr = eltext; + + while( offset < len ) + { + char *message = NULL; + char *format = NULL; + char *args = NULL; + int val[6]; + + veejay_memset(val,0,sizeof(val)); + + int n = sscanf( ptr + offset, "%04d%03d%03d%04d", &val[0],&val[1],&val[2],&val[3]); + + offset += 14; + + message = strndup( ptr + offset , val[3] ); + offset += val[3]; + + n = sscanf( ptr + offset, "%03d%03d", &val[4], &val[5] ); + + offset += 6; + + if(val[4]) // format string + { + format = strndup( ptr + offset, val[4] ); + offset += val[4]; + } + + if(val[5]) // argument string + { + args = strndup( ptr + offset, val[5] ); + offset += val[5]; + } + + gchar *g_descr = NULL; + gchar *g_format = NULL; + gchar *g_content = NULL; + gchar *g_keyname = sdlkey_by_id( val[1] ); + gchar *g_keymod = sdlmod_by_id( val[2] ); + gchar *g_vims[5]; + + sprintf( (char*) g_vims, "%03d", val[0] ); + + if( val[0] >= VIMS_BUNDLE_START && val[0] < VIMS_BUNDLE_END ) + { + g_content = _utf8str( message ); + } + else + { + g_descr = _utf8str( message ); + if( format ) + g_format = _utf8str( format ); + if( args ) + { + g_content = _utf8str( args ); + //@ set default VIMS argument: + if(vj_event_list[val[0]].args ) + { + free(vj_event_list[val[0]].args ); + vj_event_list[val[0]].args = NULL; + } + vj_event_list[ val[0] ].args = strdup( args ); + } + + } + + gtk_list_store_append( store, &iter ); + gtk_list_store_set(store, &iter, + VIMS_ID, g_vims, + VIMS_DESCR, g_descr, + VIMS_KEY, g_keyname, + VIMS_MOD, g_keymod, + VIMS_PARAMS, vj_event_list[ val[0] ].params, + VIMS_FORMAT, g_format, + VIMS_CONTENTS, g_content, + -1 ); + + if(message) free(message); + if(format) free(format); + if(args) free(args); + + + if( g_descr ) g_free(g_descr ); + if( g_format ) g_free(g_format ); + if( g_content) g_free(g_content ); + + } + /* entry, start frame, end frame */ + + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + + g_free( eltext ); + +} + +static void reload_vimslist() +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "tree_vims"); + GtkListStore *store; + GtkTreeIter iter; + + gint len = 0; + single_vims( VIMS_VIMS_LIST ); + gchar *eltext = recv_vims(5,&len); // msg len + gint offset = 0; + reset_tree("tree_vims"); + + if(len == 0 || eltext == NULL ) + { +#ifdef STRICT_CHECKING + assert(eltext != NULL && len > 0); +#endif + return; + } + + GtkTreeModel *model = gtk_tree_view_get_model( GTK_TREE_VIEW(tree )); + store = GTK_LIST_STORE(model); + + while( offset < len ) + { + char *format = NULL; + char *descr = NULL; + char *line = strndup( eltext + offset, + 14 ); + int val[4]; + sscanf( line, "%04d%02d%03d%03d", + &val[0],&val[1],&val[2],&val[3]); + + char vimsid[5]; + + offset += 12; + if(val[2] > 0) + { + format = strndup( eltext + offset, val[2] ); + offset += val[2]; + } + + if(val[3] > 0 ) + { + descr = strndup( eltext + offset, val[3] ); + offset += val[3]; + } + + + gchar *g_format = (format == NULL ? NULL :_utf8str( format )); + gchar *g_descr = (descr == NULL ? NULL :_utf8str( descr )); + + if(vj_event_list[val[0]].format ) + free(vj_event_list[val[0]].format); + if(vj_event_list[val[0]].descr ) + free(vj_event_list[val[0]].descr); + + gtk_list_store_append( store, &iter ); + + vj_event_list[ val[0] ].event_id = val[0]; + vj_event_list[ val[0] ].params = val[1]; + vj_event_list[ val[0] ].format = (format == NULL ? NULL :_utf8str( format )); + vj_event_list[ val[0] ].descr = (descr == NULL ? NULL : _utf8str( descr )); + + sprintf(vimsid, "%03d", val[0] ); + gtk_list_store_set( store, &iter, + VIMS_ID, vimsid, + VIMS_DESCR, g_descr,-1 ); + + + if(g_format) g_free(g_format); + if(g_descr) g_free(g_descr); + + if(format) free(format); + if(descr) free(descr); + + free( line ); + } + + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + g_free( eltext ); + +} +static void remove_all (GtkComboBox *combo_box) +{ + GtkTreeModel* model = gtk_combo_box_get_model (combo_box); + gtk_list_store_clear (GTK_LIST_STORE(model)); +} + +static char *tokenize_on_space( char *q ) +{ + int n = 0; + char *r = NULL; + char *p = q; + while( *p != '\0' && !isblank( *p ) && *p != ' ' && *p != 20) + { + *p++; + n++; + } + if( n <= 0 ) + return NULL; + r = vj_calloc( n+1 ); + strncpy( r, q, n ); + return r; +} + +static int have_srt_ = 0; +static void init_srt_editor() +{ + reload_fontlist(); + update_spin_range( "spin_text_x", 0, info->el.width-1 , 0 ); + update_spin_range( "spin_text_y", 0, info->el.height-1, 0 ); + update_spin_range( "spin_text_size", 10, 500, 40 ); + update_spin_range( "spin_text_start", 0, total_frames_, 0 ); +} + + +static void reload_fontlist() +{ + GtkWidget *box = glade_xml_get_widget( info->main_window, "combobox_fonts"); + remove_all( GTK_COMBO_BOX( box ) ); + single_vims( VIMS_FONT_LIST ); + gint len = 0; + gchar *srts = recv_vims(6,&len ); + gint i = 0; + gchar *p = srts; + + while( i < len ) + { + char tmp[4]; + veejay_memset(tmp,0,sizeof(tmp)); + strncpy(tmp, p, 3 ); + int slen = atoi(tmp); + p += 3; + gchar *seq_str = strndup( p, slen ); + gtk_combo_box_append_text( GTK_COMBO_BOX(box), seq_str ); + p += slen; + free(seq_str); + i += (slen + 3); + } + free(srts); +} + +static void reload_srt() +{ + if(!have_srt_) + { + init_srt_editor(); + have_srt_ = 1; + } + + GtkWidget *box = glade_xml_get_widget( info->main_window, "combobox_textsrt"); + remove_all( GTK_COMBO_BOX( box ) ); + + clear_textview_buffer( "textview_text"); + + single_vims( VIMS_SRT_LIST ); + gint i=0, len = 0; + + gchar *srts = recv_vims(6,&len ); + if( srts == NULL || len <= 0 ) + { + disable_widget( "SRTframe" ); + return; + } + + gchar *p = srts; + gchar *token = NULL; + + if(len > 0 ) + enable_widget( "SRTframe"); + + while( i < len ) + { + token = tokenize_on_space( p ); + if(!token) + break; + if(token) + { + gtk_combo_box_append_text( GTK_COMBO_BOX(box),token ); + i += strlen(token) + 1; + free(token); + } + else + i++; + p = srts + i; + } + free(srts); +} +void _edl_reset(void) +{ + if( info->elref != NULL) + { + int n = g_list_length(info->elref); + int i; + for( i = 0; i <=n ; i ++ ) + { + void *ptr = g_list_nth_data( info->elref , i ); + if(ptr) + free(ptr); + } + g_list_free( info->elref ); + } +} + +static void reload_editlist_contents() +{ + GtkWidget *tree = glade_xml_get_widget_( info->main_window, "editlisttree"); + GtkListStore *store; + GtkTreeIter iter; + + gint i; + gint len = 0; + single_vims( VIMS_EDITLIST_LIST ); + gchar *eltext = recv_vims(6,&len); // msg len + gint offset = 0; + gint num_files=0; + reset_tree("editlisttree"); + _el_ref_reset(); + _el_entry_reset(); + _edl_reset(); + + if( eltext == NULL || len < 0 ) + { + return; + } + char str_nf[4]; + + strncpy( str_nf, eltext , sizeof(str_nf)); + sscanf( str_nf, "%04d", &num_files ); + + offset += 4; + int n = 0; + el_constr *el; + + for( i = 0; i < num_files ; i ++ ) + { + int itmp =0; + char *tmp1 = (char*) strndup( eltext+offset, 4 ); + int line_len = 0; + char fourcc[4]; + veejay_memset(fourcc,0,sizeof(fourcc)); + n = sscanf( tmp1, "%04d", &line_len ); // line len + if(line_len>0) + { + offset += 4; + char *line = (char*)strndup( eltext + offset, line_len ); + offset += line_len; + char *tmp = (char*) strndup( line, 3 ); + sscanf(tmp, "%03d",&itmp ); + char *file = strndup( line + 3, itmp ); + free(tmp); + tmp = (char*) strndup( line + 3 + itmp, 16 ); + int a,b,c; + int n = sscanf(tmp, "%04d%010d%02d", &a,&b,&c); + free(tmp); + if( n == 3 ) + { + strncpy(fourcc, line + 3 + itmp + 16, c ); + el = _el_entry_new( i, file, b, fourcc ); + info->editlist = g_list_append( info->editlist, el ); + } + free(line); + free(file); + } + free(tmp1); + } + GtkTreeModel *model = gtk_tree_view_get_model( GTK_TREE_VIEW(tree )); + store = GTK_LIST_STORE(model); + + int total_frames = 0; // running total of frames + int row_num = 0; + while( offset < len ) + { + char *tmp = (char*)strndup( eltext + offset, (3*16) ); + offset += (3*16); + long nl=0, n1=0,n2=0; + + sscanf( tmp, "%016ld%016ld%016ld", + &nl,&n1,&n2 ); + + if(nl < 0 || nl >= num_files) + { + printf("exceed max files\n"); + return; + } + int file_len = _el_get_nframes( nl ); + if(file_len <= 0) + { + row_num++; + continue; + } + if(n1 < 0 ) + n1 = 0; + if(n2 >= file_len) + n2 = file_len; + + if(n2 <= n1 ) + { + row_num++; + continue; + } + + info->elref = g_list_append( info->elref, _el_ref_new( row_num,(int) nl,n1,n2,total_frames ) ) ; + char *tmpname = _el_get_filename(nl); + gchar *fname = get_relative_path(tmpname); + gchar *timecode = format_selection_time( n1,n2 ); + gchar *gfourcc = _utf8str( _el_get_fourcc(nl) ); + gchar *timeline = format_selection_time( 0, total_frames ); + + gtk_list_store_append( store, &iter ); + gtk_list_store_set( store, &iter, + COLUMN_INT, (guint) row_num, + COLUMN_STRING0, timeline, + COLUMN_STRINGA, fname, + COLUMN_STRINGB, timecode, + COLUMN_STRINGC, gfourcc,-1 ); + + g_free(timecode); + g_free(gfourcc); + g_free(fname); + g_free(timeline); + free(tmp); + + total_frames = total_frames + (n2-n1) + 1; + row_num ++; + } + + gtk_tree_view_set_model( GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + + g_free( eltext ); + +} + +// execute after el change: +static void load_editlist_info() +{ + char norm; + float fps; + int values[10]; + long rate = 0; + long dum[2]; + veejay_memset(values, 0, sizeof(values)); + single_vims( VIMS_VIDEO_INFORMATION ); + int len = 0; + gchar *res = recv_vims(3,&len); + if( len <= 0 || res==NULL) + { +#ifdef STRICT_CHECKING + assert(len > 0 && res != NULL); +#endif + return; + } + sscanf( res, "%d %d %d %c %f %d %d %ld %d %ld %ld %d", + &values[0], &values[1], &values[2], &norm,&fps, + &values[4], &values[5], &rate, &values[7], + &dum[0], &dum[1], &values[8]); + char tmp[15]; + snprintf( tmp, sizeof(tmp)-1, "%dx%d", values[0],values[1]); + + info->el.width = values[0]; + info->el.height = values[1]; + info->el.num_frames = dum[1]; + update_label_str( "label_el_wh", tmp ); + snprintf( tmp, sizeof(tmp)-1, "%s", + (norm == 'p' ? "PAL" : "NTSC" ) ); + update_label_str( "label_el_norm", tmp); + update_label_f( "label_el_fps", fps ); + + update_spin_value( "screenshot_width", info->el.width ); + update_spin_value( "screenshot_height", info->el.height ); + + info->el.fps = fps; + info->el.num_files = dum[0]; + snprintf( tmp, sizeof(tmp)-1, "%s", + ( values[2] == 0 ? "progressive" : (values[2] == 1 ? "top first" : "bottom first" ) ) ); + update_label_str( "label_el_inter", tmp ); + update_label_i( "label_el_arate", (int)rate, 0); + update_label_i( "label_el_achans", values[7], 0); + update_label_i( "label_el_abits", values[5], 0); + + if( rate == 0 ) + { + enable_widget( "vjframerate" ); + } + else + { + disable_widget( "vjframerate"); + } + + + info->el.ratio = (float)info->el.width / (float) info->el.height; + + if( values[4] == 0 ) + { + disable_widget( "button_5_4" ); + } + else + { + set_toggle_button( "button_5_4", values[8]); + enable_widget( "button_5_4" ); + } + + + g_free(res); +} + +static void disable_widget(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_(info->main_window,name); +#ifdef STRICT_CHECKING + if(!w) veejay_msg(VEEJAY_MSG_ERROR, "Cant find widget '%s'", name ); + assert( w!= NULL ); +#endif + if(!w) return ; + gtk_widget_set_sensitive_( GTK_WIDGET(w), FALSE ); +} + +static void enable_widget(const char *name) +{ + GtkWidget *w = glade_xml_get_widget_(info->main_window,name); +#ifdef STRICT_CHECKING + if(!w) veejay_msg(VEEJAY_MSG_ERROR, "Cant find widget '%s'", name ); + assert( w!= NULL ); +#endif + if(!w) return; + gtk_widget_set_sensitive_( GTK_WIDGET(w), TRUE ); +} +static gchar *format_selection_time(int start, int end) +{ + MPEG_timecode_t tc; + veejay_memset( &tc, 0,sizeof(tc)); + if( (end-start) <= 0) + veejay_memset( &tc, 0, sizeof(tc)); + else + mpeg_timecode( &tc, (end-start), mpeg_framerate_code( + mpeg_conform_framerate( info->el.fps ) ), info->el.fps ); + + gchar *tmp = g_new( gchar, 20); + snprintf( tmp, 20, "%2d:%2.2d:%2.2d:%2.2d", + tc.h, tc.m, tc.s, tc.f ); + return tmp; +} + +static gboolean update_cpumeter_timeout( gpointer data ) +{ + gdouble ms = (gdouble)info->status_tokens[ELAPSED_TIME]; + gdouble fs = (gdouble)get_slider_val( "framerate" ); + + + gdouble lim = (1.0f/fs)*1000.0; + char text[65]; + if( ms < lim ) + sprintf(text, "Running realtime" ); + else + sprintf(text, "%2.2f FPS", ( 1.0 / ms ) * 1000.0 ); + update_label_str( "cpumeter", text ); + + return TRUE; +} +static gboolean update_cachemeter_timeout( gpointer data ) +{ + char text[32]; + gint v = info->status_tokens[TOTAL_MEM]; + sprintf(text,"%d MB cached",v); + update_label_str( "cachemeter", text ); + + return TRUE; +} + +static gboolean update_sample_record_timeout(gpointer data) +{ + if( info->uc.playmode == MODE_SAMPLE ) + { + GtkWidget *w; + if( is_button_toggled("seqactive" ) ) + { + w = glade_xml_get_widget_( info->main_window, + "rec_seq_progress" ); + } + else + { + w = glade_xml_get_widget_( info->main_window, + "samplerecord_progress" ); + + } + gdouble tf = info->status_tokens[STREAM_DURATION]; + gdouble cf = info->status_tokens[STREAM_RECORDED]; + + gdouble fraction = cf / tf; + + if(!info->status_tokens[STREAM_RECORDING] ) + { + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(w), 0.0); + info->samplerecording = 0; + info->uc.recording[MODE_SAMPLE] = 0; + if(info->uc.render_record) + { + info->uc.render_record = 0; // render list has private edl + } + else + { + info->uc.reload_hint[HINT_EL] = 1; + } + return FALSE; + } + else + { + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(w), + fraction ); + } + } + return TRUE; +} +static gboolean update_stream_record_timeout(gpointer data) +{ + GtkWidget *w = glade_xml_get_widget_( info->main_window, + "streamrecord_progress" ); + if( info->uc.playmode == MODE_STREAM ) + { + gdouble tf = info->status_tokens[STREAM_DURATION]; + gdouble cf = info->status_tokens[STREAM_RECORDED]; + + gdouble fraction = cf / tf; + if(!info->status_tokens[STREAM_RECORDING] ) + { + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(w), 0.0); + info->streamrecording = 0; + info->uc.recording[MODE_STREAM] = 0; + info->uc.reload_hint[HINT_EL] = 1; // recording finished, reload edl + return FALSE; + } + else + gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(w), + fraction ); + + } + return TRUE; +} + +static void init_recorder(int total_frames, gint mode) +{ + if(mode == MODE_STREAM) + { + info->streamrecording = g_timeout_add(300, update_stream_record_timeout, (gpointer*) info ); + } + if(mode == MODE_SAMPLE) + { + info->samplerecording = g_timeout_add(300, update_sample_record_timeout, (gpointer*) info ); + } + info->uc.recording[mode] = 1; +} + +static char theme_path[1024]; +static char glade_path[1024]; +static char theme_file[1024]; +static char theme_dir[1024]; +static int use_default_theme_ = 0; +static char **theme_list = NULL; +GtkSettings *theme_settings = NULL; +static int select_f(const struct dirent *d ) +{ + if ((strcmp(d->d_name, ".") == 0) || + (strcmp(d->d_name, "..") == 0)) + return 0; + return 1; +} + +static void set_default_theme() +{ + sprintf( theme_path, "%s", GVEEJAY_DATADIR); + sprintf( theme_file, "%s/gveejay.rc", GVEEJAY_DATADIR ); + use_default_theme_ = 1; +} + +void find_user_themes(int theme) +{ + char *home = getenv("HOME"); + char data[1024]; + char location[1024]; + char path[1024]; + veejay_memset( theme_path, 0, sizeof(theme_path)); + veejay_memset( theme_file, 0, sizeof(theme_file)); + + theme_settings = gtk_settings_get_default(); + snprintf( glade_path, sizeof(glade_path), "%s/gveejay.reloaded.glade",GVEEJAY_DATADIR); + + + if(!home) + { + if(theme) set_default_theme(); + return; + } + + if(!theme) + { + veejay_msg(VEEJAY_MSG_INFO,"Not loading veejay themes"); + return; + } + snprintf( path, sizeof(path),"%s/.veejay/theme/theme.config", home ); + + int sloppy = open( path,O_RDONLY ); + if( sloppy < 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Theme config '%s' not found, creating default.", path ); + veejay_msg(VEEJAY_MSG_WARNING, "Please setup symbolic links from %s/theme/", GVEEJAY_DATADIR ); + veejay_msg(VEEJAY_MSG_WARNING, " to %s/.veejay/theme/",home); + veejay_msg(VEEJAY_MSG_WARNING, "and set the name of the theme in theme.config" ); + set_default_theme(); + int wd= open( path, O_WRONLY ); + if(wd) + { + char text[7] = "Default"; + write(wd,text, sizeof(text)); + close(wd); + } + return; + } + + veejay_memset(data,0,sizeof(data)); + veejay_memset(location,0,sizeof(location)); + char *dst = location; + + if( read( sloppy, data, sizeof(data) ) > 0 ) + { + int str_len = strlen( data ); + int i; + for( i = 0; i < str_len ; i ++ ) + { + if( data[i] == '\0' || data[i] == '\n' ) break; + *dst = data[i]; + *dst++; + } + } + close( sloppy ); + + if( strcmp( location, "Default" ) == 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "Using default theme."); + set_default_theme(); + } + else + { + snprintf(theme_path, sizeof(theme_path), "%s/.veejay/theme/%s", home, location ); + snprintf(theme_file, sizeof(theme_file), "%s/gveejay.rc", theme_path ); + use_default_theme_ = 0; + veejay_msg(VEEJAY_MSG_INFO, "\tRC-style '%s'", theme_file ); + veejay_msg(VEEJAY_MSG_INFO, "\tTheme location: '%s'", theme_path); + } + + struct dirent **files = NULL; + struct stat sbuf; + snprintf(theme_dir,sizeof(theme_dir), "%s/.veejay/theme/", home ); + + veejay_memset( &sbuf,0,sizeof(struct stat)); + + int n_files = scandir( theme_dir, &files, select_f, alphasort ); + if( n_files <= 0 ) + { + veejay_msg(0, "No themes found in %s", theme_dir ); + return; + } + + theme_list = (char**) vj_calloc(sizeof(char*) * (n_files+2) ); + int i,k=0; + for( i = 0; i < n_files; i ++ ) + { + char *name = files[i]->d_name; + if( name && strcmp(name, "Default" ) != 0) + { + snprintf(location, sizeof(location), "%s/%s", theme_dir, name ); + veejay_memset( &sbuf,0, sizeof(struct stat )); + if( lstat( location, &sbuf ) == 0 ) + { + if( S_ISLNK( sbuf.st_mode )) + { + veejay_memset( &sbuf,0,sizeof(struct stat)); + stat(location, &sbuf); + } + if( S_ISDIR( sbuf.st_mode )) + { + //@ test for gveejay.rc + struct stat inf; + gchar *test_file = g_strdup_printf( "%s/%s/gveejay.rc",theme_dir,name ); + if( stat( test_file, &inf) == 0 && (S_ISREG(inf.st_mode) || S_ISLNK( inf.st_mode))) + { + theme_list[k] = strdup( name ); + k++; + } + else + { + veejay_msg(VEEJAY_MSG_WARNING, "%s/%s does not contain a gveejay.rc file", theme_dir,name); + } + g_free(test_file); + } + } + } + } + + if( k == 0 ) + { + free(theme_list); + theme_list = NULL; + return; + } + + theme_list[ k ] = strdup("Default"); + for( k = 0; theme_list[k] != NULL ; k ++ ) + veejay_msg(VEEJAY_MSG_INFO, "Added Theme #%d %s", k, theme_list[k]); +// veejay_msg(VEEJAY_MSG_INFO, "Loading %s", theme_file ); + + +} + +void gui_load_theme() +{ + gtk_rc_parse( theme_file ); +} + +char *get_glade_path() +{ + return glade_path; +} + +char *get_gveejay_dir() +{ + return GVEEJAY_DATADIR; +} + +void get_gd(char *buf, char *suf, const char *filename) +{ + const char *dir = GVEEJAY_DATADIR; + + if(filename !=NULL && suf != NULL) + sprintf(buf, "%s/%s/%s",dir,suf, filename ); + if(filename !=NULL && suf==NULL) + sprintf(buf, "%s/%s", dir, filename); + if(filename == NULL && suf != NULL) + sprintf(buf, "%s/%s/" , dir, suf); +} + +GdkPixbuf *vj_gdk_pixbuf_scale_simple( GdkPixbuf *src, int dw, int dh, GdkInterpType inter_type ) +{ +#ifdef STRICT_CHECKING + assert( GDK_IS_PIXBUF(src)); +#endif + return gdk_pixbuf_scale_simple( src,dw,dh,inter_type ); +/* + GdkPixbuf *res = gdk_pixbuf_new( GDK_COLORSPACE_RGB, FALSE, 8, dw, dh ); +#ifdef STRICT_CHECKING + assert( GDK_IS_PIXBUF( res ) ); +#endif + uint8_t *res_out = gdk_pixbuf_get_pixels( res ); + uint8_t *src_in = gdk_pixbuf_get_pixels( src ); + uint32_t src_w = gdk_pixbuf_get_width( src ); + uint32_t src_h = gdk_pixbuf_get_height( src ); + int dst_w = gdk_pixbuf_get_width( res ); + int dst_h = gdk_pixbuf_get_height( res ); + VJFrame *src1 = yuv_rgb_template( src_in, src_w, src_h, PIX_FMT_BGR24 ); + VJFrame *dst1 = yuv_rgb_template( res_out, dst_w, dst_h, PIX_FMT_BGR24 ); + + veejay_msg(0, "%s: %dx%d -> %dx%d", __FUNCTION__, src_w,src_h,dst_w,dst_h ); + + yuv_convert_any_ac( src1,dst1, src1->format, dst1->format ); + + free(src1); + free(dst1); + + return res;*/ +} + + +int gveejay_time_to_sync( vj_gui_t *ui ) +{ + struct timeval time_now; + gettimeofday( &time_now, 0 ); + + double diff = time_now.tv_sec - ui->time_last.tv_sec + + (time_now.tv_usec - ui->time_last.tv_usec ) * 1.e-6; + float fps = 0.0; + + struct timespec nsecsleep; + if ( ui->watch.state == STATE_PLAYING ) + { + fps = ui->el.fps; + float spvf = 1.0 / fps; + if( diff > spvf ) { + ui->time_last.tv_sec = time_now.tv_sec; + ui->time_last.tv_usec = time_now.tv_usec; + return 1; + } + int usec = 0; + int uspf = (int)(1000000.0 / fps); + usec = time_now.tv_usec - ui->time_last.tv_usec; + if( usec < 0 ) + usec += 1000000; + if( time_now.tv_sec > ui->time_last.tv_sec + 1 ) + usec = 1000000; + if( (uspf - usec) < (1000000 / 100)) + return 0; + nsecsleep.tv_nsec = (uspf - usec - 1000000 / 100 ) * 1000; + nsecsleep.tv_sec = 0; + nanosleep( &nsecsleep, NULL ); + return 0; + } else if ( ui->watch.state == STATE_STOPPED ) + { + reloaded_restart(); + } + nsecsleep.tv_nsec = 1000000; + nsecsleep.tv_sec = 0; + nanosleep( &nsecsleep, NULL ); + return 0; +} + +int veejay_update_multitrack( void *data ) +{ + vj_gui_t *gui = (vj_gui_t*) data; + sync_info *s = multitrack_sync( gui->mt ); + + GtkWidget *maintrack = glade_xml_get_widget( info->main_window, "imageA"); + int i; + GtkWidget *ww = glade_xml_get_widget_( info->main_window, "vjdeck" ); + int deckpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(ww)); + + if( s->status_list[ s->master ] != NULL) + { + int tmp = 0; + for ( i = 0; i < 32; i ++ ) + { + tmp += s->status_list[s->master][i]; + info->status_tokens[i] = s->status_list[s->master][i]; + } + if( tmp == 0 ) + { + free(s->status_list); + free(s->img_list ); + free(s->widths); + free(s->heights); + free(s); + return 0; + } + info->status_lock = 1; + info->uc.playmode = gui->status_tokens[ PLAY_MODE ]; + update_gui(); + info->prev_mode = gui->status_tokens[ PLAY_MODE ]; + gui->status_lock = 0; + + int pm = info->status_tokens[PLAY_MODE]; + +#ifdef STRICT_CHECKING + assert( pm >= 0 && pm < 4 ); +#endif + + int *history = info->history_tokens[pm]; + int i; + + for( i = 0; i < STATUS_TOKENS; i ++ ) + history[i] = info->status_tokens[i]; + } + + for( i = 0; i < s->tracks ; i ++ ) + { + if( s->status_list[i] ) + { + update_multitrack_widgets( info->mt, s->status_list[i], i ); + + free(s->status_list[i]); + } + if( s->img_list[i] ) + { + if( i == s->master ) + { +#ifdef STRICT_CHECKING + assert( s->widths[i] > 0 ); + assert( s->heights[i] > 0 ); + assert( GDK_IS_PIXBUF( s->img_list[i] ) ); +#endif + // GdkPixbuf *result = vj_gdk_pixbuf_scale_simple( s->img_list[i],352,288, GDK_INTERP_NEAREST ); + // gtk_image_set_from_pixbuf_( GTK_IMAGE( maintrack ), result ); + // gdk_pixbuf_unref(result); + + // GdkPixbuf *result = vj_gdk_pixbuf_scale_simple( s->img_list[i],352,288, 0 ); + // gtk_image_set_from_pixbuf_( GTK_IMAGE( maintrack ), result ); + // gdk_pixbuf_unref(result); + + if( gdk_pixbuf_get_height(s->img_list[i]) >= 255 || + gdk_pixbuf_get_width(s->img_list[i]) >= 320 ) + gtk_image_set_from_pixbuf_( GTK_IMAGE( maintrack ), s->img_list[i] ); + else { + GdkPixbuf *result = vj_gdk_pixbuf_scale_simple( s->img_list[i],352,288, GDK_INTERP_NEAREST ); + gtk_image_set_from_pixbuf_( GTK_IMAGE( maintrack ), result ); + gdk_pixbuf_unref(result); + + } + + + vj_img_cb( s->img_list[i] ); + } + // } + /* else + { + GdkPixbuf *result = vj_gdk_pixbuf_scale_simple( s->img_list[i],preview_box_w_,preview_box_h_, 0 ); + gtk_image_set_from_pixbuf_( GTK_IMAGE( maintrack ), result ); + gdk_pixbuf_unref(result); + }*/ + // vj_img_cb( s->img_list[i] ); + + if(deckpage == 2) + multitrack_update_sequence_image( gui->mt, i, s->img_list[i] ); + + gdk_pixbuf_unref( s->img_list[i] ); + } else { + if( i == s->master ) { + multitrack_set_logo( gui->mt, maintrack ); + } + } + } + free(s->status_list); + free(s->img_list ); + free(s->widths); + free(s->heights); + free(s); + return 1; +} + +static void update_status_accessibility(int old_pm, int new_pm) +{ + int i; + + if( new_pm == MODE_STREAM ) + { + enable_widget("stream_panel"); + disable_widget("sample_panel"); + for(i=0; videowidgets[i].name != NULL; i++) + disable_widget( videowidgets[i].name); + disable_widget( "speed_slider" ); + } + else + { + for(i=0; videowidgets[i].name != NULL; i++) + enable_widget( videowidgets[i].name); + enable_widget( "speed_slider" ); + } + + if( new_pm == MODE_SAMPLE ) + { + enable_widget("sample_panel"); + disable_widget("stream_panel"); + enable_widget( "samplerand" ); + enable_widget( "freestyle" ); + } + else + { + disable_widget( "samplerand" ); + disable_widget( "freestyle" ); + } + + if( new_pm == MODE_PLAIN) + { + enable_widget( "button_samplestart" ); + enable_widget( "button_sampleend" ); + } + else + { + disable_widget( "button_samplestart"); + disable_widget( "button_sampleend" ); + } + + if( new_pm == MODE_PLAIN) + for( i = 0; plainwidgets[i].name != NULL ;i++ ) + disable_widget( plainwidgets[i].name ); + else + for( i = 0; plainwidgets[i].name != NULL ; i ++ ) + enable_widget( plainwidgets[i].name ); +} + +static void update_globalinfo(int *history, int pm, int last_pm) +{ + int i; + + if( last_pm != pm ) + update_status_accessibility( last_pm, pm); + + if( info->status_tokens[MACRO] != history[MACRO] ) + { + switch(info->status_tokens[MACRO]) + { + case 1: + set_toggle_button( "macrorecord",1); break; + case 2: + set_toggle_button( "macroplay",1 ); break; + default: + set_toggle_button( "macrostop",1); break; + } + + } + + if( info->status_tokens[CURRENT_ID] != history[CURRENT_ID] || last_pm != pm ) + { + // slot changed + if( pm == MODE_SAMPLE || pm == MODE_STREAM ) + { + info->uc.reload_hint[HINT_ENTRY] = 1; + info->uc.reload_hint[HINT_CHAIN] = 1; + } + + if( pm != MODE_STREAM ) + info->uc.reload_hint[HINT_EL] = 1; + if( pm != MODE_PLAIN ) + info->uc.reload_hint[HINT_KF] = 1; + + if( pm == MODE_SAMPLE ) + timeline_set_selection( info->tl, TRUE ); + else + timeline_set_selection( info->tl, FALSE ); + + select_slot( info->status_tokens[PLAY_MODE] ); + + on_samplepage_clicked(NULL,NULL); +#ifdef STRICT_CHECKING + if( pm != MODE_PLAIN ) + assert( info->selected_slot != NULL ); +#endif + } + + if( info->status_tokens[TOTAL_SLOTS] != + history[TOTAL_SLOTS] + || info->status_tokens[TOTAL_SLOTS] != info->uc.expected_slots ) + { + info->uc.reload_hint[HINT_SLIST] = 1; + } + + if( info->status_tokens[SEQ_ACT] != history[SEQ_ACT] ) + { + info->uc.reload_hint[HINT_SEQ_ACT] = 1; + + if(info->status_tokens[SEQ_ACT]== 0 ) + set_toggle_button( "seqactive" , 0 ); + else + set_toggle_button( "seqactive", 1 ); + } + if( info->status_tokens[SEQ_CUR] != history[SEQ_CUR] ) + { + int in = info->status_tokens[SEQ_CUR]; + if(info->sequence_playing >= 0) + indicate_sequence( FALSE, info->sequencer_view->gui_slot[ info->sequence_playing ] ); + info->sequence_playing = in; + indicate_sequence( TRUE, info->sequencer_view->gui_slot[ info->sequence_playing ] ); + } + + + total_frames_ = (pm == MODE_STREAM ? info->status_tokens[SAMPLE_MARKER_END] : info->status_tokens[TOTAL_FRAMES] ); + gint history_frames_ = (pm == MODE_STREAM ? history[SAMPLE_MARKER_END] : history[TOTAL_FRAMES] ); + gint current_frame_ = info->status_tokens[FRAME_NUM]; + + if( total_frames_ != history_frames_ || total_frames_ != (int) timeline_get_length(TIMELINE_SELECTION(info->tl))) + { + gchar *time = format_time( total_frames_, info->el.fps ); + if( pm == MODE_STREAM ) + { + update_spin_value( "stream_length", info->status_tokens[SAMPLE_MARKER_END] ); + update_label_str( "stream_length_label", time ); + } + update_spin_range("button_fadedur", 0, total_frames_, 0 ); + update_label_i( "label_totframes", total_frames_, 1 ); + if( pm == MODE_PLAIN ) + { + for( i = 0; i < 3; i ++) + if(info->selection[i] > total_frames_ ) info->selection[i] = total_frames_; + update_spin_range( + "button_el_selstart", 0, total_frames_, info->selection[0]); + update_spin_range( + "button_el_selend", 0, total_frames_, info->selection[1]); + update_spin_range( + "button_el_selpaste", 0, total_frames_, info->selection[2]); + } + + update_label_i( "label_totframes", total_frames_, 1 ); + update_label_str( "label_totaltime", time ); + if(pm == MODE_SAMPLE) + update_label_str( "label_samplelength", time ); + else + update_label_str( "label_samplelength", "0:00:00:00" ); + + + timeline_set_length( info->tl, + (gdouble) total_frames_ , current_frame_); + + if( pm != MODE_STREAM ) + info->uc.reload_hint[HINT_EL] = 1; + + g_free(time); + } + + info->status_frame = info->status_tokens[FRAME_NUM]; + timeline_set_pos( info->tl, (gdouble) info->status_frame ); + gchar *current_time_ = format_time( info->status_frame,info->el.fps ); + update_label_i( "label_curframe", info->status_frame ,1 ); + update_label_str( "label_curtime", current_time_ ); + g_free(current_time_); + + if( pm == MODE_SAMPLE ) + update_label_i( "label_samplepos", + info->status_frame , 1); + else + update_label_i( "label_samplepos" , 0 , 1 ); + + if( history[CURRENT_ID] != info->status_tokens[CURRENT_ID] ) + { + if(pm == MODE_SAMPLE || pm == MODE_STREAM) + update_label_i( "label_currentid", info->status_tokens[CURRENT_ID] ,0); + } + + if( history[STREAM_RECORDING] != info->status_tokens[STREAM_RECORDING] ) + { + if(pm == MODE_SAMPLE || pm == MODE_STREAM) + { + if( history[CURRENT_ID] == info->status_tokens[CURRENT_ID] ) + info->uc.reload_hint[HINT_RECORDING] = 1; + if( info->status_tokens[STREAM_RECORDING]) + vj_msg(VEEJAY_MSG_INFO, "Veejay is recording"); + else + vj_msg(VEEJAY_MSG_INFO, "Recording has stopped"); + } + } + + if( pm == MODE_PLAIN ) + { + if( history[SAMPLE_SPEED] != info->status_tokens[SAMPLE_SPEED] ) + { + int plainspeed = info->status_tokens[SAMPLE_SPEED]; + + update_slider_value( "speed_slider", plainspeed, 0); + if( plainspeed < 0 ) + info->play_direction = -1; + else + info->play_direction = 1; + if( plainspeed < 0 ) plainspeed *= -1; + } + } + + update_current_slot(history, pm, last_pm); + +// info->uc.playmode = pm; +} + + +static void process_reload_hints(int *history, int pm) +{ + int *entry_tokens = &(info->uc.entry_tokens[0]); + + if( pm == MODE_STREAM ) + { + if(info->uc.reload_hint[HINT_V4L]) + load_v4l_info(); + + if( info->uc.reload_hint[HINT_RGBSOLID]) + update_colorselection(); + + } + + if( info->uc.reload_hint[HINT_EL] ) + { + load_editlist_info(); + reload_editlist_contents(); + } + update_spin_range( + "spin_samplestart", 0, info->el.num_frames, info->status_tokens[SAMPLE_START] ); + update_spin_range( + "spin_sampleend", 0, info->el.num_frames , info->status_tokens[SAMPLE_END] ); + + if( info->uc.reload_hint[HINT_SLIST] ) + { + load_samplelist_info(FALSE); + info->uc.expected_slots = info->status_tokens[TOTAL_SLOTS]; + } + + if( info->uc.reload_hint[HINT_SEQ_ACT] == 1 ) + { + load_sequence_list(); + } + + + if( info->uc.reload_hint[HINT_RECORDING] == 1 && pm != MODE_PLAIN) + { + if(info->status_tokens[STREAM_RECORDING]) + { + if(!info->uc.recording[pm]) init_recorder( info->status_tokens[STREAM_DURATION], pm ); + } + } + + if(info->uc.reload_hint[HINT_BUNDLES] == 1 ) + reload_bundles(); + + if( info->selected_slot && info->selected_slot->sample_id == info->status_tokens[CURRENT_ID] && + info->selected_slot->sample_type == 0 && pm == MODE_PLAIN) + { + if( history[SAMPLE_FX] != info->status_tokens[SAMPLE_FX]) + { + //also for stream (index is equivalent) + if(pm == MODE_SAMPLE) + set_toggle_button( "check_samplefx", + info->status_tokens[SAMPLE_FX]); + if(pm == MODE_STREAM) + set_toggle_button( "check_streamfx", + info->status_tokens[SAMPLE_FX]); + } + } + if( info->uc.reload_hint[HINT_CHAIN] == 1 && pm != MODE_PLAIN) + { + load_effectchain_info(); + } + + + info->parameter_lock = 1; + if(info->uc.reload_hint[HINT_ENTRY] == 1 && pm != MODE_PLAIN) + { + char slider_name[10]; + char button_name[10]; + gint np = 0; + gint i; + /* update effect description */ + info->uc.reload_hint[HINT_KF] = 1; + if( entry_tokens[ENTRY_FXID] == 0) + { + put_text( "entry_effectname" ,"" ); + disable_widget( "frame_fxtree2" ); + disable_widget( "frame_fxtree4" ); + disable_widget( "tree_sources"); + disable_widget( "rgbkey"); + } + else + { + put_text( "entry_effectname", _effect_get_description( entry_tokens[ENTRY_FXID] )); + enable_widget( "frame_fxtree2"); + enable_widget( "frame_fxtree4"); + enable_widget( "tree_sources"); + enable_widget( "rgbkey" ); + set_toggle_button( "button_entry_toggle", entry_tokens[ENTRY_FXSTATUS] ); + np = _effect_get_np( entry_tokens[ENTRY_FXID] ); + for( i = 0; i < np ; i ++ ) + { + sprintf(slider_name, "slider_p%d",i); + enable_widget( slider_name ); + sprintf(button_name, "inc_p%d", i); + enable_widget( button_name ); + sprintf(button_name, "dec_p%d", i ); + enable_widget( button_name ); + gint min,max,value; + value = entry_tokens[3 + i]; + if( _effect_get_minmax( entry_tokens[ENTRY_FXID], &min,&max, i )) + { + update_slider_range( slider_name,min,max, value, 0); + } + sprintf(button_name, "kf_p%d", i ); + enable_widget( button_name ); + } + } + update_spin_value( "button_fx_entry", info->uc.selected_chain_entry); + + for( i = np; i < 8 ; i ++ ) + { + sprintf(slider_name, "slider_p%d",i); + gint min = 0, max = 1, value = 0; + update_slider_range( slider_name, min,max, value, 0 ); + disable_widget( slider_name ); + sprintf( button_name, "inc_p%d", i); + disable_widget( button_name ); + sprintf( button_name, "dec_p%d", i); + disable_widget( button_name ); + sprintf( button_name, "kf_p%d", i ); + disable_widget( button_name ); + } + GtkTreeModel *model = gtk_tree_view_get_model( GTK_TREE_VIEW(glade_xml_get_widget_( + info->main_window, "tree_chain") )); + + gtk_tree_model_foreach( + model, + chain_update_row, (gpointer*) info ); + } + info->parameter_lock = 0; + + /* Curve needs update (start/end changed, effect id changed */ + if ( info->uc.reload_hint[HINT_KF] ) + vj_kf_refresh(); + + if( info->uc.reload_hint[HINT_HISTORY] ) + reload_srt(); + + veejay_memset( info->uc.reload_hint, 0, sizeof(info->uc.reload_hint )); +} +void update_gui() +{ + int pm = info->status_tokens[PLAY_MODE]; + int last_pm = info->prev_mode; + + int *history = NULL; + int llast_pm = -1; + + + if( last_pm >= 0 ) + { + history = info->history_tokens[ last_pm ]; + llast_pm = history[PLAY_MODE]; + } else { + return; + } + + if( info->uc.randplayer && pm != last_pm ) + { + info->uc.randplayer = 0; + set_toggle_button( "samplerand", 0 ); + } + + if( pm == MODE_PATTERN && last_pm != pm) + { + if(!info->uc.randplayer ) + { + info->uc.randplayer = 1; + enable_widget( "freestyle" ); + enable_widget( "samplerand" ); + set_toggle_button( "samplerand", 1 ); + } + info->status_tokens[PLAY_MODE] = MODE_SAMPLE; + pm = MODE_SAMPLE; + } + + update_globalinfo(history, pm, last_pm); + + process_reload_hints(history, pm); + on_vims_messenger(); + + update_cpumeter_timeout(NULL); + update_cachemeter_timeout(NULL); + +} + +void vj_fork_or_connect_veejay(char *configfile) +{ + char *files = get_text( "entry_filename" ); + int port = get_nums( "button_portnum" ); + gchar **args; + int n_args = 0; + char port_str[15]; + char config[512]; + char tmp[20]; + int i = 0; + + int arglen = vims_verbosity ? 15 :14 ; + arglen += (info->config.deinter); + arglen += (info->config.osc); + arglen += (info->config.vims); + args = g_new ( gchar *, arglen ); + + args[0] = g_strdup("veejay"); + + sprintf(port_str, "-p%d", port); + args[1] = g_strdup( port_str ); + + if(configfile) + sprintf(config, "-l%s", configfile); + + if( config_file_status == 0 ) + { + if(files == NULL || strlen(files)<= 0) + args[2] = g_strdup("-d"); + else + args[2] = g_strdup(files); + } + else + { + printf("FIXME: Cant guess port num / hostname yet !\n"); + args[2] = g_strdup( config ); + } + + args[3] = g_strdup( "-O5" ); + sprintf(tmp, "-W%d", info->config.w ); + args[4] = g_strdup( tmp ); + sprintf(tmp, "-H%d", info->config.h ); + args[5] = g_strdup( tmp ); + sprintf(tmp, "-R%g", info->config.fps ); + args[6] = g_strdup( tmp ); + sprintf(tmp, "-N%d", info->config.norm ); + args[7] = g_strdup( tmp ); + sprintf(tmp, "-Y%d", info->config.pixel_format ); + args[8] = g_strdup( tmp ); + sprintf(tmp, "-m%d", info->config.sampling ); + args[9] = g_strdup( tmp ); + sprintf(tmp, "-c%d", info->config.sync ); + args[10] = g_strdup( tmp ); + sprintf(tmp, "-t%d", info->config.timer == 0 ? 0 : 2); + args[11] = g_strdup( tmp ); + sprintf(tmp, "-r%d", info->config.audio_rate ); + args[12] = g_strdup( tmp ); + args[13] = NULL; + int k=13; + while( k <= (arglen-1)) + args[k++] = NULL; + + if( vims_verbosity ) + args[13] = g_strdup( "-v" ); + + if( info->config.deinter ) + { + if(args[13]==NULL) + args[13] = g_strdup( "-I"); + else args[14] = g_strdup( "-I" ); + } + if( info->config.osc) + { + gchar osc_token[20]; + sprintf(osc_token , "-M %s", info->config.mcast_osc ); + int f = 13; + while(args[f] != NULL ) f ++; + args[f] = g_strdup( osc_token ); + } + if( info->config.vims) + { + gchar vims_token[20]; + sprintf(vims_token, "-V %s", info->config.mcast_vims ); + int f = 13; + while(args[f] != NULL) f++; + args[f] = g_strdup( vims_token ); + } + if( info->watch.state == STATE_STOPPED) + { + info->watch.state = STATE_CONNECT; + info->run_state = RUN_STATE_REMOTE; + } + + for( i = 0; i < n_args; i ++) + g_free(args[i]); +} + +void vj_gui_free() +{ + if(info) + { + int i; + if(info->client) + vj_client_free(info->client); + + for( i = 0; i < 4; i ++ ) + { + if(info->history_tokens[i]) + free(info->history_tokens[i]); + } + free(info); + } + info = NULL; + + vevo_port_free( fx_list_ ); + vevo_port_free( bankport_ ); +} + +void vj_gui_style_setup() +{ + if(!info) return; + info->color_map = gdk_colormap_get_system(); +} + +void vj_gui_theme_setup(int default_theme) +{ + gtk_rc_parse(theme_file); +} + +void +send_refresh_signal(void) +{ + GdkEventClient event; + event.type = GDK_CLIENT_EVENT; + event.send_event = TRUE; + event.window = NULL; + event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE); + event.data_format = 8; + gdk_event_send_clientmessage_toall((GdkEvent *)&event); +} + +gint +gui_client_event_signal(GtkWidget *widget, GdkEventClient *event, + void *data) +{ + static GdkAtom atom_rcfiles = GDK_NONE; + if(!atom_rcfiles) + atom_rcfiles = gdk_atom_intern("_GTK_READ_RCFILES", FALSE); + + if(event->message_type == atom_rcfiles) + { + gtk_rc_parse( theme_file ); + + gtk_widget_reset_rc_styles( + glade_xml_get_widget_(info->main_window, "gveejay_window") ); + + gtk_rc_reparse_all(); + + veejay_msg(VEEJAY_MSG_WARNING, + "Loaded GTK theme %s (catched _GTK_READ_RCFILES)", theme_file ); + veejay_msg(VEEJAY_MSG_INFO, + "If the new theme is using an engine that modifies the internal structure"); + veejay_msg(VEEJAY_MSG_INFO, + "of the widgets, there is no way for me to undo those changes and display"); + veejay_msg(VEEJAY_MSG_INFO, + "%s correctly", theme_file ); + return TRUE; + } + return FALSE; +} + +void vj_gui_set_debug_level(int level, int preview_p, int pw, int ph ) +{ + veejay_set_debug_level( level ); + + vims_verbosity = level; + num_tracks_ = preview_p; + default_preview_width_ = pw; + default_preview_height_ = ph; +} +int vj_gui_get_preview_priority(void) +{ + return 1; +} + +void default_bank_values(int *col, int *row ) +{ + if( *col == 0 && *row == 0 ) + { + NUM_SAMPLES_PER_COL = 5; + NUM_SAMPLES_PER_ROW = 4; + } + else + { + NUM_SAMPLES_PER_ROW = *col; + NUM_SAMPLES_PER_COL = *row; + } + NUM_SAMPLES_PER_PAGE = NUM_SAMPLES_PER_COL * NUM_SAMPLES_PER_ROW; + NUM_BANKS = (4096 / NUM_SAMPLES_PER_PAGE ); +} + +void set_skin(int skin) +{ + timeline_theme_colors( skin ? 1: 0 ); +} + +int vj_gui_sleep_time( void ) +{ + float f = (float) info->status_tokens[ELAPSED_TIME]; + float t = info->el.fps; + + if( t <= 0.0 || t>= 200.0 ) + t = 25.0; + float n = (1.0 / t) * 1000.0f; + + if( f < n ) + return (int)( n - f ); + return (int) n; +} + +int vj_img_cb(GdkPixbuf *img ) +{ + int i; + if( !info->selected_slot || !info->selected_gui_slot ) + { +//DM + return 0; + } + int sample_id = info->status_tokens[ CURRENT_ID ]; + int sample_type = info->status_tokens[ PLAY_MODE ]; + + if( info->selected_slot->sample_type != sample_type || info->selected_slot->sample_id != + sample_id ) { + return 0; + } + if( sample_type == MODE_SAMPLE || sample_type == MODE_STREAM ) + { + sample_slot_t *slot = find_slot_by_sample( sample_id, sample_type ); + sample_gui_slot_t *gui_slot = find_gui_slot_by_sample( sample_id, sample_type ); + + if( slot && gui_slot ) + { + slot->pixbuf = vj_gdk_pixbuf_scale_simple(img, + info->image_dimensions[0],info->image_dimensions[1], GDK_INTERP_NEAREST); + gtk_image_set_from_pixbuf_( GTK_IMAGE( gui_slot->image ), slot->pixbuf ); + gdk_pixbuf_unref( slot->pixbuf ); + } + + } + + for( i = 0; i < info->sequence_view->envelope_size; i ++ ) + { + sequence_gui_slot_t *g = info->sequence_view->gui_slot[i]; + sample_slot_t *s = info->selected_slot; + if(g->sample_id == info->selected_slot->sample_id && g->sample_type == info->selected_slot->sample_type && s->pixbuf) + { + g->pixbuf_ref = vj_gdk_pixbuf_scale_simple( + img, + info->sequence_view->w, + info->sequence_view->h, + GDK_INTERP_NEAREST ); + + gtk_image_set_from_pixbuf_( GTK_IMAGE( g->image ), g->pixbuf_ref ); + + gdk_pixbuf_unref( g->pixbuf_ref ); + + } + } + + return 1; +} + +void vj_gui_cb(int state, char *hostname, int port_num) +{ + info->watch.state = STATE_RECONNECT; + put_text( "entry_hostname", hostname ); + update_spin_value( "button_portnum", port_num ); +} + +void vj_gui_setup_defaults( vj_gui_t *gui ) +{ + gui->config.w = 352; + gui->config.h = 288; + gui->config.fps = 25.0; + gui->config.sampling = 1; + gui->config.pixel_format = 1; + gui->config.sync = 1; + gui->config.timer = 1; + gui->config.deinter = 1; + gui->config.norm = 0; + gui->config.audio_rate = 0; + gui->config.osc = 0; + gui->config.vims = 0; + gui->config.mcast_osc = g_strdup( "224.0.0.32" ); + gui->config.mcast_vims = g_strdup( "224.0.0.33" ); +} + +static void theme_response( gchar *string ) +{ + char theme_config[1024]; + snprintf(theme_config,sizeof(theme_config), "%stheme.config", theme_dir ); + snprintf(theme_file,sizeof(theme_file), "%s/%s/gveejay.rc", theme_dir, string ); + int fd = open( theme_config , O_WRONLY | O_CREAT | O_TRUNC); + if(fd > 0) + { + write( fd, string, strlen(string)); + close(fd); + vj_msg(VEEJAY_MSG_INFO, "Restart GveejayReloaded for changes to take effect"); + if( prompt_dialog("Restart GveejayReloaded", "For changes to take effect, you should restart now" ) == GTK_RESPONSE_ACCEPT) + { + info->watch.w_state = STATE_DISCONNECT; + running_g_ = 0; + restart_ = 1; + } + } + else + { + vj_msg(VEEJAY_MSG_ERROR, "Unable to write to %s", theme_config ); + } + +} +static void reloaded_sighandler(int x) +{ + veejay_msg(VEEJAY_MSG_WARNING, "Caught signal %x", x); + switch( x ) { + case SIGINT: + //@ quit dialog; + break; + case SIGQUIT: + case SIGTERM: + case SIGKILL: + case SIGSEGV: + break; + case SIGPIPE: + reloaded_schedule_restart(); + break; + } + veejay_msg(VEEJAY_MSG_WARNING, "Stopping reloaded"); + exit(0); +} + +void register_signals() +{ + signal( SIGTERM, reloaded_sighandler ); + signal( SIGINT, reloaded_sighandler ); + signal( SIGHUP , reloaded_sighandler ); + signal( SIGPIPE, reloaded_sighandler ); + signal( SIGQUIT, reloaded_sighandler ); + signal( SIGSEGV, reloaded_sighandler ); +} + +void vj_gui_init(char *glade_file, int launcher, char *hostname, int port_num, int use_threads) +{ + int i; + + vj_gui_t *gui = (vj_gui_t*)vj_calloc(sizeof(vj_gui_t)); + if(!gui) + { + return; + } + + veejay_memset( gui->status_tokens, 0, STATUS_TOKENS ); + veejay_memset( gui->sample, 0, 2 ); + veejay_memset( gui->selection, 0, 3 ); + veejay_memset( &(gui->uc), 0, sizeof(veejay_user_ctrl_t)); + veejay_memset( gui->uc.entry_tokens,0, sizeof(int) * 21); + gui->prev_mode = -1; + veejay_memset( &(gui->el), 0, sizeof(veejay_el_t)); + gui->sample_banks = (sample_bank_t**) vj_calloc(sizeof(sample_bank_t*) * NUM_BANKS ); + + for( i = 0 ; i < 4; i ++ ) + { + gui->history_tokens[i] = (int*) vj_calloc(sizeof(int) * (STATUS_TOKENS+1)); + } + + gui->uc.reload_force_avoid = FALSE; + + veejay_memset( vj_event_list, 0, sizeof(vj_event_list)); + + gui->client = NULL; + gui->main_window = glade_xml_new(glade_path,NULL,NULL); + if(!gui->main_window) + { + free(gui); + } + info = gui; + + glade_xml_signal_autoconnect( gui->main_window ); + GtkWidget *frame = glade_xml_get_widget_( info->main_window, "markerframe" ); + info->tl = timeline_new(); + gtk_widget_set_size_request(frame, 200,14 ); + + g_signal_connect( info->tl, "pos_changed", + (GCallback) on_timeline_value_changed, NULL ); + g_signal_connect( info->tl, "in_point_changed", + (GCallback) on_timeline_in_point_changed, NULL ); + g_signal_connect( info->tl, "out_point_changed", + (GCallback) on_timeline_out_point_changed, NULL ); + g_signal_connect( info->tl, "bind_toggled", + (GCallback) on_timeline_bind_toggled, NULL ); + g_signal_connect( info->tl, "cleared", + (GCallback) on_timeline_cleared, NULL ); + + + bankport_ = vpn( VEVO_ANONYMOUS_PORT ); + + gtk_widget_show(frame); + gtk_container_add( GTK_CONTAINER(frame), info->tl ); + gtk_widget_show(info->tl); + + + GtkWidget *mainw = glade_xml_get_widget_(info->main_window,"gveejay_window" ); + + gtk_label_set_text( GTK_LABEL(glade_xml_get_widget_(info->main_window, "build_revision")), VEEJAY_CODENAME ); + + g_signal_connect_after( GTK_OBJECT(mainw), "client_event", + GTK_SIGNAL_FUNC( G_CALLBACK(gui_client_event_signal) ), NULL ); + + g_signal_connect( GTK_OBJECT(mainw), "destroy", + G_CALLBACK( gveejay_quit ), + NULL ); + g_signal_connect( GTK_OBJECT(mainw), "delete-event", + G_CALLBACK( gveejay_quit ), + NULL ); + + GtkWidget *box = glade_xml_get_widget_( info->main_window, "sample_bank_hbox" ); + info->sample_bank_pad = gtk_notebook_new(); + gtk_notebook_set_tab_pos( GTK_NOTEBOOK(info->sample_bank_pad), GTK_POS_BOTTOM ); + gtk_notebook_set_show_tabs( GTK_NOTEBOOK( info->sample_bank_pad ), FALSE ); + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET(info->sample_bank_pad), TRUE, TRUE, 0); + setup_samplebank( NUM_SAMPLES_PER_COL, NUM_SAMPLES_PER_ROW ); + + create_ref_slots( 12 ); + create_sequencer_slots( 10 ); + + veejay_memset( vj_event_list, 0, sizeof( vj_event_list )); + veejay_memset( vims_keys_list, 0, sizeof( vims_keys_list) ); + + gtk_widget_show( info->sample_bank_pad ); + + info->elref = NULL; + info->effect_info = NULL; + info->devlist = NULL; + info->chalist = NULL; + info->editlist = NULL; + + vj_gui_setup_defaults(gui); + setup_vimslist(); + setup_effectchain_info(); + setup_effectlist_info(); + setup_editlist_info(); + setup_samplelist_info(); + setup_v4l_devices(); + setup_colorselection(); + setup_rgbkey(); + setup_bundles(); + + text_defaults(); + + GtkWidget *fgb = glade_xml_get_widget( + info->main_window, "boxtext" ); + GtkWidget *bgb = glade_xml_get_widget( + info->main_window, "boxbg" ); + GtkWidget *rb = glade_xml_get_widget( + info->main_window, "boxred" ); + GtkWidget *gb = glade_xml_get_widget( + info->main_window, "boxgreen" ); + GtkWidget *bb = glade_xml_get_widget( + info->main_window, "boxblue" ); + GtkWidget *lnb = glade_xml_get_widget( + info->main_window,"boxln" ); + g_signal_connect( G_OBJECT( bgb ), "expose_event", + G_CALLBACK( boxbg_expose_event ), NULL); + g_signal_connect( G_OBJECT( fgb ), "expose_event", + G_CALLBACK( boxfg_expose_event ), NULL); + g_signal_connect( G_OBJECT( lnb ), "expose_event", + G_CALLBACK( boxln_expose_event ), NULL); + g_signal_connect( G_OBJECT( rb ), "expose_event", + G_CALLBACK( boxred_expose_event ), NULL); + g_signal_connect( G_OBJECT( gb ), "expose_event", + G_CALLBACK( boxgreen_expose_event ), NULL); + g_signal_connect( G_OBJECT( bb ), "expose_event", + G_CALLBACK( boxblue_expose_event ), NULL); + + + set_toggle_button( "button_252", vims_verbosity ); + + + int pw = default_preview_width_; + int ph = default_preview_height_; + + GtkWidget *img_wid = glade_xml_get_widget_( info->main_window, "imageA"); + + gui->mt = multitrack_new( + (void(*)(int,char*,int)) vj_gui_cb, + NULL, + glade_xml_get_widget_( info->main_window, "gveejay_window" ), + glade_xml_get_widget_( info->main_window, "mt_box" ), + glade_xml_get_widget_( info->main_window, "statusbar") , + glade_xml_get_widget_( info->main_window, "previewtoggle"), + pw, + ph, + img_wid, + (void*) gui, + use_threads); + + if( theme_list ) + { + GtkWidget *menu = gtk_menu_new(); + for( i = 0; theme_list[i] != NULL ; i ++ ) + { + GtkWidget *mi = gtk_menu_item_new_with_label( theme_list[i] ); + gtk_menu_shell_append( GTK_MENU_SHELL( menu ), mi ); + + g_signal_connect_swapped( G_OBJECT(mi), "activate", G_CALLBACK(theme_response), + (gpointer) g_strdup( theme_list[i] )); + + gtk_widget_show( mi ); + } + + GtkWidget *root_menu = gtk_menu_item_new_with_label( "Themes" ); + gtk_menu_item_set_submenu( GTK_MENU_ITEM( root_menu ), menu ); + + GtkWidget *menu_bar = glade_xml_get_widget_(info->main_window, "menubar1"); + gtk_menu_shell_append( GTK_MENU_SHELL(menu_bar), root_menu); + + gtk_widget_show( root_menu ); + + } + veejay_memset( &info->watch, 0, sizeof(watchdog_t)); + info->watch.state = STATE_WAIT_FOR_USER; // + veejay_memset(&(info->watch.p_time),0,sizeof(struct timeval)); + info->midi = vj_midi_new( info->main_window ); + gettimeofday( &(info->time_last) , 0 ); +} + +void vj_gui_preview(void) +{ + //FIXME: cleanup + gint w = info->el.width; + gint h = info->el.height; + + update_spin_value( "priout_width", w ); + update_spin_value( "priout_height", h ); + + if( w > 352 ) + w = 352; + if( h > 288 ) + h = 288; + + update_spin_range( "preview_width", 16, w, + (info->run_state == RUN_STATE_REMOTE ? (default_preview_width_==0 ? w/4: default_preview_width_) : w ) ); + update_spin_range( "preview_height", 16, h, + (info->run_state == RUN_STATE_REMOTE ? (default_preview_height_ == 0 ? h/4 : default_preview_height_) : h ) ); + + update_spin_incr( "preview_width", 16, 0 ); + update_spin_incr( "preview_height", 16, 0 ); + update_spin_incr( "priout_width", 16,0 ); + update_spin_incr( "priout_height", 16, 0 ); + + info->image_w = w; + info->image_h = h; + + GdkRectangle result; + widget_get_rect_in_screen( + glade_xml_get_widget_(info->main_window, "quickselect"), + &result + ); + gdouble ratio = (gdouble) h / (gdouble) w; + + gint image_width = 32; + gint image_height = 32 *ratio; + + info->sequence_view->w = image_width; + info->sequence_view->h = image_height; + gtk_widget_set_size_request(info->quick_select, image_width, image_height ); +} + +void gveejay_preview( int p ) +{ + user_preview = p; +} + +int gveejay_user_preview() +{ + return user_preview; +} + +int vj_gui_reconnect(char *hostname,char *group_name, int port_num) +{ + if(!hostname && !group_name ) + { + veejay_msg(0,"Invalid host/group name given"); + return 0; + } + + if(info->client ) + { + error_dialog("Warning", "You should disconnect first"); + return 0; + } + + if(!info->client) + { + info->client = vj_client_alloc(0,0,0); + if(!info->client) + { + return 0; + } + } + +// gveejay_status_lock( info ); + + if(!vj_client_connect( info->client, hostname, group_name, port_num ) ) + { + if(info->client) + vj_client_free(info->client); + info->client = NULL; + return 0; + } + + vj_msg(VEEJAY_MSG_INFO, "New connection with Veejay running on %s port %d", + (group_name == NULL ? hostname : group_name), port_num ); + + veejay_msg(VEEJAY_MSG_INFO, "Connection established with %s:%d (Track 0)",hostname,port_num); + + int k = 0; + for( k = 0; k < 4; k ++ ) + veejay_memset( info->history_tokens[k] , 0, (sizeof(int) * STATUS_TOKENS) ); + + veejay_memset( info->status_tokens, 0, sizeof(int) * STATUS_TOKENS ); + + load_editlist_info(); + + update_slider_value( "framerate", info->el.fps, 0 ); + + veejay_memset( vims_keys_list, 0 , sizeof(vims_keys_list)); + veejay_memset( vj_event_list, 0, sizeof( vj_event_list)); + + load_effectlist_info(); + reload_vimslist(); + reload_editlist_contents(); + reload_bundles(); + + GtkWidget *w = glade_xml_get_widget_(info->main_window, "gveejay_window" ); + gtk_widget_show( w ); + + + int speed = info->status_tokens[SAMPLE_SPEED]; + if( speed < 0 ) + info->play_direction = -1; else info->play_direction=1; + if( speed < 0 ) speed *= -1; + + update_spin_range( "spin_framedelay", 1, 13, 0); + update_slider_range( "speed_slider", -13,13,speed,0); + update_label_str( "label_hostnamex", (hostname == NULL ? group_name: hostname ) ); + update_label_i( "label_portx",port_num,0); + + + multitrack_configure( info->mt, + info->el.fps, info->el.width, info->el.height, &preview_box_w_, &preview_box_h_ ); + + vj_gui_preview(); + + info->uc.reload_hint[HINT_SLIST] = 1; + info->uc.reload_hint[HINT_CHAIN] = 1; + info->uc.reload_hint[HINT_ENTRY] = 1; + info->uc.reload_hint[HINT_SEQ_ACT] = 1; + info->uc.reload_hint[HINT_HISTORY] = 1; + +// gveejay_status_unlock( info ); + + return 1; +} + +static void veejay_stop_connecting(vj_gui_t *gui) +{ + GtkWidget *veejay_conncection_window; + + if(!gui->sensitive) + vj_gui_enable(); + + info->launch_sensitive = 0; + + veejay_conncection_window = glade_xml_get_widget(info->main_window, "veejay_connection"); + gtk_widget_hide(veejay_conncection_window); + GtkWidget *mw = glade_xml_get_widget_(info->main_window,"gveejay_window" ); + + gtk_widget_show( mw ); +} + +void reloaded_launcher(char *hostname, int port_num) +{ + info->watch.state = STATE_RECONNECT; + put_text( "entry_hostname", hostname ); + update_spin_value( "button_portnum", port_num ); +} + + + +void reloaded_schedule_restart() +{ + info->watch.state = STATE_STOPPED; +} + +void reloaded_restart() +{ +#ifdef STRICT_CHECKING + assert( info->watch.state == STATE_STOPPED ); +#endif + GtkWidget *cd = glade_xml_get_widget_(info->main_window, "veejay_connection" ); + GtkWidget *mw = glade_xml_get_widget_(info->main_window,"gveejay_window" ); + + // disable and hide mainwindow + if(info->sensitive) + vj_gui_disable(); + gtk_widget_hide( mw ); + + //@ bring up the launcher window + gtk_widget_show( cd ); +// info->watch.state = STATE_CONNECT; + info->watch.state = STATE_WAIT_FOR_USER; + info->launch_sensitive = TRUE; + + veejay_msg(VEEJAY_MSG_INFO, "Ready to make a connection to a veejay server"); +} + +gboolean is_alive( int *do_sync ) +{ + void *data = info; + vj_gui_t *gui = (vj_gui_t*) data; + + if( gui->watch.state == STATE_PLAYING ) + { + *do_sync = 1; + return TRUE; + } + + if( gui->watch.state == STATE_RECONNECT ) + { + vj_gui_disconnect(); + gui->watch.state = STATE_CONNECT; + } + + if(gui->watch.state == STATE_DISCONNECT ) + { + gui->watch.state = STATE_STOPPED; + vj_gui_disconnect(); + return FALSE; + } + + if( gui->watch.state == STATE_STOPPED ) + { + if(info->client) + vj_gui_disconnect(); + // return FALSE; + } + + if( gui->watch.state == STATE_QUIT ) + { + if(info->client) vj_gui_disconnect(); + return FALSE; + } + + if( gui->watch.state == STATE_CONNECT ) + { + char *remote; + int port; + remote = get_text( "entry_hostname" ); + port = get_nums( "button_portnum" ); + + veejay_msg(VEEJAY_MSG_INFO, "Connecting to %s: %d", remote,port ); + if(!vj_gui_reconnect( remote, NULL, port )) + { + reloaded_schedule_restart(); + } + else + { + info->watch.state = STATE_PLAYING; + info->key_id = gtk_key_snooper_install( key_handler , NULL); + multrack_audoadd( info->mt, remote, port ); + *do_sync = 1; + // if(user_preview==0) + // multitrack_set_quality( info->mt, 2 ); + // else + // { + if( user_preview ) { + info->preview_locked = 1; + multitrack_set_quality( info->mt, user_preview ); + set_toggle_button( "previewtoggle", 1 ); + info->preview_locked = 0; + } + veejay_stop_connecting(gui); + } + } + + if( gui->watch.state == STATE_WAIT_FOR_USER ) + { + *do_sync = 0; + } + + return TRUE; +} + + +void vj_gui_disconnect() +{ + if(info->key_id) + gtk_key_snooper_remove( info->key_id ); + free_samplebank(); + + if(info->client) + { + vj_client_close(info->client); + vj_client_free(info->client); + info->client = NULL; + } + /* reset all trees */ + reset_tree("tree_effectlist"); + reset_tree("tree_effectmixlist"); + reset_tree("tree_chain"); + reset_tree("tree_sources"); + reset_tree("editlisttree"); + + reloaded_schedule_restart(); +} + +void vj_gui_disable() +{ + + int i = 0; + + while( gwidgets[i].name != NULL ) + { + disable_widget( gwidgets[i].name ); + i++; + } + + info->sensitive = 0; +} + + + +void vj_gui_enable() +{ + int i =0; + while( gwidgets[i].name != NULL) + { + enable_widget( gwidgets[i].name ); + i++; + } + + enable_widget( "speed_slider"); + info->sensitive = 1; +} + +sample_slot_t *vj_gui_get_sample_info(gint which_one, gint mode ) +{ + sample_slot_t *tmp_slot = (sample_slot_t*) vj_calloc(sizeof(sample_slot_t)); + + multi_vims( VIMS_SAMPLE_INFO, "%d %d", which_one, mode ); + + gint sample_info_len = 0; + gchar *sample_info = recv_vims( 5, &sample_info_len); + gint descr_len = 0; + gchar *p = sample_info; + + if(sample_info_len <= 0 ) + { + if(sample_info) g_free(sample_info); + if(tmp_slot) free(tmp_slot); + return NULL; + } + + sscanf(sample_info, "%d",&descr_len ); + sample_info += 3; + tmp_slot->title = g_strndup( sample_info, descr_len ); + sample_info += descr_len; + + gint timecode_len = 0; + sscanf( sample_info,"%d", &timecode_len ); + sample_info += 3; + tmp_slot->timecode = g_strndup( sample_info, timecode_len ); + sample_info += timecode_len; + + tmp_slot->sample_id = which_one; + tmp_slot->sample_type = mode; + + if(p) g_free(p); + + return tmp_slot; +} + + +static void +widget_get_rect_in_screen (GtkWidget *widget, GdkRectangle *r) +{ +//GdkRectangle extents; +//GdkWindow *window; +//window = GDK_WINDOW(gtk_widget_get_parent_window(widget)); /* getting parent window */ +//gdk_window_get_root_origin(window, &x,&y); /* parent's left-top screen coordinates */ +//gdk_drawable_get_size(window, &w,&h); /* parent's width and height */ +//gdk_window_get_frame_extents(window, &extents); /* parent's extents (including decorations) */ +//r->x = x + (extents.width-w)/2 + widget->allocation.x; /* calculating x (assuming: left border size == right border size) */ +//r->y = y + (extents.height-h)-(extents.width-w)/2 + widget->allocation.y; /* calculating y (assuming: left border size == right border size == bottom border size) */ +r->x = 0; +r->y = 0; +r->width = widget->allocation.width; +r->height = widget->allocation.height; +} + + +/* -------------------------------------------------------------------------------------------------------------------------- + * Function that creates the sample-bank initially, just add the widget to the GUI and create references for the + * sample_banks-structure so that the widgets are easiely accessable + * The GUI componenets are in sample_bank[i]->gui_slot[j] + * + -------------------------------------------------------------------------------------------------------------------------- */ + +int power_of_2(int x) +{ + int p = 1; + while( p < x ) + p <<= 1; + return p; +} + +/* Add a page to the notebook and initialize slots */ +static int add_bank( gint bank_num ) +{ + gchar str_label[5]; + gchar frame_label[20]; + sprintf(str_label, "%d", bank_num ); + sprintf(frame_label, "Samples %d to %d", + (bank_num * NUM_SAMPLES_PER_PAGE), (bank_num * NUM_SAMPLES_PER_PAGE) + NUM_SAMPLES_PER_PAGE ); + + setup_samplebank( NUM_SAMPLES_PER_COL, NUM_SAMPLES_PER_ROW ); + + info->sample_banks[bank_num] = (sample_bank_t*) vj_calloc(sizeof(sample_bank_t)); + info->sample_banks[bank_num]->bank_number = bank_num; + sample_slot_t **slot = (sample_slot_t**) vj_calloc(sizeof(sample_slot_t*) * NUM_SAMPLES_PER_PAGE); + sample_gui_slot_t **gui_slot = (sample_gui_slot_t**) vj_calloc(sizeof(sample_gui_slot_t*) * NUM_SAMPLES_PER_PAGE ); + + int j; + for(j = 0;j < NUM_SAMPLES_PER_PAGE; j ++ ) + { + slot[j] = (sample_slot_t*) vj_calloc(sizeof(sample_slot_t) ); + gui_slot[j] = (sample_gui_slot_t*) vj_calloc(sizeof(sample_gui_slot_t)); + slot[j]->rawdata = (guchar*) vj_calloc(sizeof(guchar) * 3 * 128 * 128 ); + slot[j]->slot_number = j; + slot[j]->sample_id = -1; + slot[j]->sample_type = -1; + } + + info->sample_banks[bank_num]->slot = slot; + info->sample_banks[bank_num]->gui_slot = gui_slot; + + GtkWidget *sb = info->sample_bank_pad; + GtkWidget *frame = gtk_frame_new(frame_label); + GtkWidget *label = gtk_label_new( str_label ); + + gtk_container_set_border_width( GTK_CONTAINER( frame), 0 ); + + gtk_widget_show(frame); + info->sample_banks[bank_num]->page_num = gtk_notebook_append_page(GTK_NOTEBOOK(info->sample_bank_pad), frame, label); + + GtkWidget *table = gtk_table_new( NUM_SAMPLES_PER_COL, NUM_SAMPLES_PER_ROW, TRUE ); + gtk_container_add( GTK_CONTAINER(frame), table ); + gtk_widget_show(table); + gtk_widget_show(sb ); + + + gint col, row; + for( col = 0; col < NUM_SAMPLES_PER_COL; col ++ ) + { + for( row = 0; row < NUM_SAMPLES_PER_ROW; row ++ ) + { + int slot_nr = col * NUM_SAMPLES_PER_ROW + row; + if(slot_nr < NUM_SAMPLES_PER_PAGE) + { + create_slot( bank_num, slot_nr ,info->image_dimensions[0], info->image_dimensions[1]); + sample_gui_slot_t *gui_slot = info->sample_banks[bank_num]->gui_slot[slot_nr]; + gtk_table_attach_defaults ( GTK_TABLE(table), gui_slot->event_box, row, row+1, col, col+1); + } + } + } + + + if(!info->fg_) + { + info->fg_ = widget_get_fg( GTK_WIDGET(info->sample_banks[bank_num]->gui_slot[0]->frame) ); + } + return bank_num; +} + + +void reset_samplebank(void) +{ + info->selection_slot = NULL; + info->selection_gui_slot = NULL; + info->selected_slot = NULL; + info->selected_gui_slot = NULL; + int i,j; + for( i = 0; i < NUM_BANKS; i ++ ) + { + if(info->sample_banks[i]) + { + /* free memory in use */ + for(j = 0; j < NUM_SAMPLES_PER_PAGE ; j ++ ) + { + sample_slot_t *slot = info->sample_banks[i]->slot[j]; + if(slot->sample_id) + { + if(slot->title) free(slot->title); + if(slot->timecode) free(slot->timecode); + if(slot->pixbuf) gdk_pixbuf_unref( slot->pixbuf ); + slot->title = NULL; + slot->timecode = NULL; + slot->sample_id = 0; + slot->sample_type = 0; + slot->pixbuf = NULL; + } + update_sample_slot_data( i,j, slot->sample_id,slot->sample_type,slot->title,slot->timecode); + } + } + } +} + +void free_samplebank(void) +{ + int i,j; + while( gtk_notebook_get_n_pages(GTK_NOTEBOOK(info->sample_bank_pad) ) > 0 ) + gtk_notebook_remove_page( GTK_NOTEBOOK(info->sample_bank_pad), -1 ); + + + info->selection_slot = NULL; + info->selection_gui_slot = NULL; + info->selected_slot = NULL; + info->selected_gui_slot = NULL; + + for( i = 0; i < NUM_BANKS; i ++ ) + { + + if(info->sample_banks[i]) + { + /* free memory in use */ + for(j = 0; j < NUM_SAMPLES_PER_PAGE ; j ++ ) + { + sample_slot_t *slot = info->sample_banks[i]->slot[j]; + sample_gui_slot_t *gslot = info->sample_banks[i]->gui_slot[j]; + if(slot->title) free(slot->title); + if(slot->timecode) free(slot->timecode); + if(slot->pixbuf) gdk_pixbuf_unref(slot->pixbuf); + if(slot->rawdata) free(slot->rawdata); + free(slot); + free(gslot); + info->sample_banks[i]->slot[j] = NULL; + info->sample_banks[i]->gui_slot[j] = NULL; + } + free(info->sample_banks[i]); + info->sample_banks[i] = NULL; + + } + } + veejay_memset( info->sample_banks, 0, sizeof(sample_bank_t*) * NUM_BANKS ); +} +#define RUP8(num)(((num)+8)&~8) + +void setup_samplebank(gint num_cols, gint num_rows) +{ + GdkRectangle result; + if(info->el.width > 0 && info->el.height > 0 ) + { + widget_get_rect_in_screen( + info->sample_bank_pad, + &result + ); + result.width -= ( num_rows * 16); + result.height -= ( num_cols * 16); + gint image_width = result.width / num_rows; + gint image_height = result.height / num_cols; + float ratio = (float) info->el.height / (float) info->el.width; + image_height = image_width * ratio; + info->image_dimensions[0] = image_width/8*8; + info->image_dimensions[1] = image_height/8*8; + } + else + { + info->image_dimensions[0] = 0 ; + info->image_dimensions[1] = 0; + } +} + +/* -------------------------------------------------------------------------------------------------------------------------- + * Function that resets the visualized sample-informations of the samplebanks, it does this by going through all + * slots that allready used and resets them (which means cleaning the shown infos as well as set them free for further use) + * with_selection should be TRUE when the actual selection of a sample-bank-slot should also be reseted + * (what is for instance necessary when vj reconnected) + -------------------------------------------------------------------------------------------------------------------------- */ + +static int bank_exists( int bank_page, int slot_num ) +{ + + if(!info->sample_banks[bank_page]) + return 0; + return 1; +} + +static sample_slot_t *find_slot_by_sample( int sample_id , int sample_type ) +{ + char key[32]; + sprintf(key, "S%04d%02d",sample_id, sample_type ); + + void *slot = NULL; + vevo_property_get( bankport_, key, 0,&slot ); + if(!slot) + return NULL; + return (sample_slot_t*) slot; +} +static sample_gui_slot_t *find_gui_slot_by_sample( int sample_id , int sample_type ) +{ + char key[32]; + sprintf(key, "G%04d%02d",sample_id, sample_type ); + + void *slot = NULL; + vevo_property_get( bankport_, key, 0,&slot ); + if(!slot) + return NULL; + return (sample_gui_slot_t*) slot; +} + +static int find_bank_by_sample(int sample_id, int sample_type, int *slot ) +{ + int i; + + /* See if ID is somewhere in the samplebank */ + for( i = 0; i < NUM_BANKS; i ++ ) + { + int j; + if(info->sample_banks[i]) + for( j = 0; j < NUM_SAMPLES_PER_PAGE; j ++ ) + { + if(info->sample_banks[i]->slot[j]->sample_id == sample_id && + info->sample_banks[i]->slot[j]->sample_type == sample_type ) + { + *slot = j; + return i; + } + } + } + + /* Fall back to suggest a bank number to add the new id */ + for( i = 0; i < NUM_BANKS; i ++ ) + { + if(!info->sample_banks[i]) /* First slot in bank */ + { + *slot = 0; + return i; + } + else + { + int j; /* Scan for available slots in this bank page */ + for( j = 0; j < NUM_SAMPLES_PER_PAGE; j ++ ) + { + if( info->sample_banks[i]->slot[j]->sample_id <= 0 ) + { + *slot = j; + return i; + } + } + } + } + *slot = -1; + return -1; +} + +static int find_bank(int page_nr) +{ + int i = 0; + for ( i = 0 ; i < NUM_BANKS; i ++ ) + if( info->sample_banks[i] && info->sample_banks[i]->page_num == page_nr ) + { + return info->sample_banks[i]->bank_number; + } + return -1; +} + +static void set_activation_of_cache_slot_in_samplebank( sequence_gui_slot_t *gui_slot, gboolean activate) +{ + if (activate) + { + gtk_frame_set_shadow_type(GTK_FRAME(gui_slot->frame),GTK_SHADOW_IN); + } + else { + gtk_frame_set_shadow_type(GTK_FRAME(gui_slot->frame),GTK_SHADOW_ETCHED_IN); + } +} + +static gboolean on_sequencerslot_activated_by_mouse(GtkWidget *widget, GdkEventButton *event, gpointer user_data) +{ + gint slot_nr = GPOINTER_TO_INT(user_data); + + if( event->type == GDK_BUTTON_PRESS && (event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK ) + { + multi_vims( VIMS_SEQUENCE_DEL, "%d", slot_nr ); + gtk_label_set_text( GTK_LABEL(info->sequencer_view->gui_slot[slot_nr]->image), + NULL ); + } + else + if(event->type == GDK_BUTTON_PRESS) + { + int id = info->status_tokens[CURRENT_ID]; + if( info->selection_slot ) + id = info->selection_slot->sample_id; + multi_vims( VIMS_SEQUENCE_ADD, "%d %d", slot_nr, id ); + info->uc.reload_hint[HINT_SEQ_ACT] = 1; + } + return FALSE; +} + +static gboolean on_cacheslot_activated_by_mouse (GtkWidget *widget, GdkEventButton *event, gpointer user_data) +{ + gint slot_nr = -1; + if(info->status_tokens[PLAY_MODE] == MODE_PLAIN ) + return FALSE; + + slot_nr =GPOINTER_TO_INT( user_data ); + set_activation_of_cache_slot_in_samplebank( info->sequence_view->gui_slot[slot_nr], FALSE ); + + if( event->type == GDK_BUTTON_PRESS && (event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK ) + { + info->current_sequence_slot = slot_nr; + sample_slot_t *s = info->selected_slot; + sequence_gui_slot_t *g = info->sequence_view->gui_slot[slot_nr]; +#ifdef STRICT_CHECKING + assert( s != NULL ); + assert( g != NULL ); +#endif + g->sample_id = s->sample_id; + g->sample_type = s->sample_type; + vj_msg(VEEJAY_MSG_INFO, "Placed %s %d in Memory slot %d", + (g->sample_type == 0 ? "Sample" : "Stream" ), g->sample_id, slot_nr ); + } + else + if(event->type == GDK_BUTTON_PRESS) + { + sequence_gui_slot_t *g = info->sequence_view->gui_slot[slot_nr]; + if(g->sample_id <= 0) + { + vj_msg(VEEJAY_MSG_ERROR, "Memory slot %d empty, put with SHIFT + mouse button1",slot_nr); + return FALSE; + + } + multi_vims(VIMS_SET_MODE_AND_GO, "%d %d", g->sample_type, g->sample_id ); + vj_midi_learning_vims_msg2( info->midi, NULL, VIMS_SET_MODE_AND_GO, g->sample_type,g->sample_id ); + } + return FALSE; +} + + + +static void create_sequencer_slots(int envelope_size) +{ + GtkWidget *vbox = glade_xml_get_widget_ (info->main_window, "SampleSequencerBox"); + info->sample_sequencer = gtk_frame_new(NULL); + gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET(info->sample_sequencer), TRUE, TRUE, 0); + gtk_widget_show(info->sample_sequencer); + + info->sequencer_view = (sequence_envelope*) vj_calloc(sizeof(sequence_envelope) ); + info->sequencer_view->gui_slot = (sequence_gui_slot_t**) vj_calloc(sizeof(sequence_gui_slot_t*) * ( envelope_size * envelope_size + 1 ) ); + + GtkWidget *table = gtk_table_new( envelope_size, envelope_size, TRUE ); + + gtk_container_add( GTK_CONTAINER(info->sample_sequencer), table ); + gtk_widget_show(table); + + gint col=0; + gint row=0; + for( col = 0; col < envelope_size; col ++ ) + for( row = 0; row < envelope_size; row ++ ) + { + sequence_gui_slot_t *gui_slot = (sequence_gui_slot_t*)vj_calloc(sizeof(sequence_gui_slot_t)); + info->sequencer_view->gui_slot[row+(col * envelope_size)] = gui_slot; + + gui_slot->event_box = gtk_event_box_new(); + gtk_event_box_set_visible_window(GTK_EVENT_BOX(gui_slot->event_box), TRUE); + GTK_WIDGET_SET_FLAGS(gui_slot->event_box,GTK_CAN_FOCUS); + + g_signal_connect( G_OBJECT(gui_slot->event_box), + "button_press_event", + G_CALLBACK(on_sequencerslot_activated_by_mouse), //@@@@ + (gpointer)row+(col * envelope_size ) + ); + gtk_widget_show(GTK_WIDGET(gui_slot->event_box)); + + gui_slot->frame = gtk_frame_new(NULL); + gtk_container_set_border_width (GTK_CONTAINER(gui_slot->frame),2); + gtk_frame_set_shadow_type(GTK_FRAME( gui_slot->frame), GTK_SHADOW_IN ); + gtk_widget_show(GTK_WIDGET(gui_slot->frame)); + gtk_container_add (GTK_CONTAINER (gui_slot->event_box), gui_slot->frame); + + /* the slot main container */ + gui_slot->main_vbox = gtk_vbox_new(FALSE,0); + gtk_container_add (GTK_CONTAINER (gui_slot->frame), gui_slot->main_vbox); + gtk_widget_show( GTK_WIDGET(gui_slot->main_vbox) ); + + gui_slot->image = gtk_label_new(NULL); + gtk_box_pack_start (GTK_BOX (gui_slot->main_vbox), GTK_WIDGET(gui_slot->image), TRUE, TRUE, 0); + + gtk_widget_show( gui_slot->image); + + gtk_table_attach_defaults ( GTK_TABLE(table), gui_slot->event_box, row, row+1, col, col+1); + + } + info->sequencer_view->envelope_size = envelope_size; +} + + +static void create_ref_slots(int envelope_size) +{ + gchar frame_label[50]; + GtkWidget *vbox = glade_xml_get_widget_ (info->main_window, "quickselect"); + info->quick_select = gtk_frame_new(NULL); + gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET(info->quick_select), TRUE, TRUE, 0); + gtk_widget_show(info->quick_select); + info->sequence_view = (sequence_envelope*) vj_calloc(sizeof(sequence_envelope) ); + info->sequence_view->gui_slot = (sequence_gui_slot_t**) vj_calloc(sizeof(sequence_gui_slot_t*) * envelope_size ); + sprintf(frame_label, "Last played" ); + GtkWidget *table = gtk_table_new( 1, envelope_size, TRUE ); + gtk_container_add( GTK_CONTAINER(info->quick_select), table ); + gtk_widget_show(table); + + gint col=0; + gint row=0; + for( row = 0; row < envelope_size; row ++ ) + { + sequence_gui_slot_t *gui_slot = (sequence_gui_slot_t*)vj_calloc(sizeof(sequence_gui_slot_t)); + info->sequence_view->gui_slot[row] = gui_slot; + gui_slot->event_box = gtk_event_box_new(); + gtk_event_box_set_visible_window(GTK_EVENT_BOX(gui_slot->event_box), TRUE); + GTK_WIDGET_SET_FLAGS(gui_slot->event_box,GTK_CAN_FOCUS); + /* Right mouse button is popup menu, click = play */ + g_signal_connect( G_OBJECT(gui_slot->event_box), + "button_press_event", + G_CALLBACK(on_cacheslot_activated_by_mouse), + (gpointer)row + ); + gtk_widget_show(GTK_WIDGET(gui_slot->event_box)); + /* the surrounding frame for each slot */ + gui_slot->frame = gtk_frame_new(NULL); + gtk_container_set_border_width (GTK_CONTAINER(gui_slot->frame),1); + gtk_widget_show(GTK_WIDGET(gui_slot->frame)); + gtk_container_add (GTK_CONTAINER (gui_slot->event_box), gui_slot->frame); + + /* the slot main container */ + gui_slot->main_vbox = gtk_vbox_new(FALSE,0); + gtk_container_add (GTK_CONTAINER (gui_slot->frame), gui_slot->main_vbox); + gtk_widget_show( GTK_WIDGET(gui_slot->main_vbox) ); + + /* The sample's image */ + gui_slot->image = gtk_image_new(); + gtk_box_pack_start (GTK_BOX (gui_slot->main_vbox), GTK_WIDGET(gui_slot->image), TRUE, TRUE, 0); + gtk_widget_set_size_request( gui_slot->image, info->sequence_view->w,info->sequence_view->h ); + gtk_widget_show( GTK_WIDGET(gui_slot->image)); + + gtk_table_attach_defaults ( GTK_TABLE(table), gui_slot->event_box, row, row+1, col, col+1); + + + + } + info->sequence_view->envelope_size = envelope_size; +} + +static void create_slot(gint bank_nr, gint slot_nr, gint w, gint h) +{ + gchar hotkey[3]; + + sample_bank_t **sample_banks = info->sample_banks; + sample_gui_slot_t *gui_slot = sample_banks[bank_nr]->gui_slot[slot_nr]; + + // to reach clicks on the following GUI-Elements of one slot, they are packed into an event_box + gui_slot->event_box = gtk_event_box_new(); + gtk_event_box_set_visible_window(GTK_EVENT_BOX(gui_slot->event_box), TRUE); + + + GTK_WIDGET_SET_FLAGS(gui_slot->event_box,GTK_CAN_FOCUS); + g_signal_connect( G_OBJECT(gui_slot->event_box), + "button_press_event", + G_CALLBACK(on_slot_activated_by_mouse), + (gpointer)slot_nr + ); + g_signal_connect( G_OBJECT(gui_slot->event_box), + "key_press_event", + G_CALLBACK(on_slot_activated_by_key), + (gpointer)slot_nr + ); + gtk_widget_show(GTK_WIDGET(gui_slot->event_box)); + /* the surrounding frame for each slot */ + gui_slot->frame = gtk_frame_new(NULL); + + gtk_container_set_border_width (GTK_CONTAINER(gui_slot->frame),0); + gtk_widget_show(GTK_WIDGET(gui_slot->frame)); + gtk_container_add (GTK_CONTAINER (gui_slot->event_box), GTK_WIDGET(gui_slot->frame)); + + + /* the slot main container */ + gui_slot->main_vbox = gtk_vbox_new(FALSE,0); + gtk_container_add (GTK_CONTAINER (gui_slot->frame), gui_slot->main_vbox); + gtk_widget_show( GTK_WIDGET(gui_slot->main_vbox) ); + + + gui_slot->image = gtk_image_new(); +// gui_slot->image = gtk_drawing_area_new(); + gtk_box_pack_start (GTK_BOX (gui_slot->main_vbox), GTK_WIDGET(gui_slot->image), TRUE, TRUE, 0); +// gtk_widget_show(GTK_WIDGET(gui_slot->image)); + gtk_widget_set_size_request( gui_slot->image, info->image_dimensions[0],info->image_dimensions[1] ); +/* g_signal_connect( gui_slot->image, "expose_event", + G_CALLBACK(image_expose_event), + (gpointer) info->sample_banks[bank_nr]->slot[slot_nr]->slot_number ); +*/ gtk_widget_show( GTK_WIDGET(gui_slot->image)); + + /* the upper container for all slot-informations */ + gui_slot->upper_hbox = gtk_hbox_new(FALSE,0); + gtk_box_pack_start (GTK_BOX (gui_slot->main_vbox), gui_slot->upper_hbox, FALSE, TRUE, 0); + gtk_widget_show(GTK_WIDGET(gui_slot->upper_hbox)); + + + if( sample_banks[bank_nr]->slot[slot_nr]->sample_type >= 0 ) + { + /* the hotkey that is assigned to this slot */ + sprintf(hotkey, "F-%d", (slot_nr+1)); + gui_slot->hotkey = gtk_label_new(hotkey); + } + else + { + gui_slot->hotkey = gtk_label_new(""); + } + gtk_misc_set_alignment(GTK_MISC(gui_slot->hotkey), 0.0, 0.0); + gtk_misc_set_padding (GTK_MISC(gui_slot->hotkey), 0, 0); + gtk_box_pack_start (GTK_BOX (gui_slot->upper_hbox), GTK_WIDGET(gui_slot->hotkey), FALSE, FALSE, 0); + gtk_widget_show(GTK_WIDGET(gui_slot->hotkey)); + gui_slot->upper_vbox = gtk_vbox_new(FALSE,0); + gtk_box_pack_start (GTK_BOX (gui_slot->upper_hbox), gui_slot->upper_vbox, TRUE, TRUE, 0); + gtk_widget_show(GTK_WIDGET(gui_slot->upper_vbox)); + gui_slot->title = gtk_label_new(""); + + gui_slot->timecode = gtk_label_new(""); + gtk_misc_set_alignment(GTK_MISC(gui_slot->timecode), 0.0, 0.0); + gtk_misc_set_padding (GTK_MISC(gui_slot->timecode), 0,0 ); + gtk_box_pack_start (GTK_BOX (gui_slot->upper_vbox), GTK_WIDGET(gui_slot->timecode), FALSE, FALSE, 0); + gtk_widget_show(GTK_WIDGET(gui_slot->timecode)); + +} + + +/* -------------------------------------------------------------------------------------------------------------------------- + * Handler of mouse clicks on the GUI-elements of one slot + * single-click activates the slot and the loaded sample (if there is one) + * double-click or tripple-click activates it and plays it immediatelly + -------------------------------------------------------------------------------------------------------------------------- */ +static gboolean on_slot_activated_by_mouse (GtkWidget *widget, GdkEventButton *event, gpointer user_data) +{ + gint bank_nr = -1; + gint slot_nr = -1; + + bank_nr = find_bank( gtk_notebook_get_current_page(GTK_NOTEBOOK(info->sample_bank_pad))); + if(bank_nr < 0 ) + return FALSE; + +// slot_nr = (gint *)user_data; + slot_nr = GPOINTER_TO_INT(user_data); + sample_bank_t **sample_banks = info->sample_banks; + + /* Dont select slot if nothing is there */ + if( info->sample_banks[ bank_nr ]->slot[ slot_nr ]->sample_id <= 0 ) + return FALSE; + + if( event->type == GDK_2BUTTON_PRESS ) + { + sample_slot_t *s = sample_banks[bank_nr]->slot[slot_nr]; + multi_vims( VIMS_SET_MODE_AND_GO, "%d %d", s->sample_type, s->sample_id); + vj_midi_learning_vims_msg2( info->midi, NULL, VIMS_SET_MODE_AND_GO, s->sample_type, s->sample_id ); + } + else if(event->type == GDK_BUTTON_PRESS ) + { + if(info->selection_slot) + set_selection_of_slot_in_samplebank(FALSE); + info->selection_slot = sample_banks[bank_nr]->slot[slot_nr]; + info->selection_gui_slot = sample_banks[bank_nr]->gui_slot[slot_nr]; + set_selection_of_slot_in_samplebank(TRUE ); + + } +// redraw bank page? + return FALSE; + +} +/* -------------------------------------------------------------------------------------------------------------------------- + * Handler of key presses on the GUI-elements of one slot + -------------------------------------------------------------------------------------------------------------------------- */ +static gboolean on_slot_activated_by_key (GtkWidget *widget, GdkEventKey *event, gpointer user_data) +{ + // test + printf("%s\n","press"); + return FALSE; +} + + +static void indicate_sequence( gboolean active, sequence_gui_slot_t *slot ) +{ + if(!active) + gtk_frame_set_shadow_type( GTK_FRAME(slot->frame), GTK_SHADOW_IN ); + else + gtk_frame_set_shadow_type( GTK_FRAME(slot->frame), GTK_SHADOW_OUT ); +} + +/* -------------------------------------------------------------------------------------------------------------------------- + * Function that handles to select/activate a special slot in the samplebank + -------------------------------------------------------------------------------------------------------------------------- */ +static void set_activation_of_slot_in_samplebank( gboolean activate) +{ + if(!info->selected_gui_slot || !info->selected_slot ) + return; + GdkColor color; + color.red = info->fg_->red; + color.green = info->fg_->green; + color.blue = info->fg_->blue; + + if(info->selected_slot->sample_id <= 0 ) + { + gtk_frame_set_shadow_type( GTK_FRAME(info->selected_gui_slot->frame), GTK_SHADOW_ETCHED_IN ); + } + else + { + if (activate) + { + color.green = 0xffff; + color.red = 0; + color.blue =0; + gtk_frame_set_shadow_type(GTK_FRAME(info->selected_gui_slot->frame),GTK_SHADOW_IN); + gtk_widget_grab_focus(GTK_WIDGET(info->selected_gui_slot->frame)); + } + else + { + gtk_frame_set_shadow_type(GTK_FRAME(info->selected_gui_slot->frame),GTK_SHADOW_ETCHED_IN); + } + } + + gtk_widget_modify_fg ( GTK_WIDGET(info->selected_gui_slot->timecode), + GTK_STATE_NORMAL, &color ); +} + +static void set_selection_of_slot_in_samplebank(gboolean active) +{ + if(!info->selection_slot) + return; + if(info->selection_slot->sample_id <= 0 ) + return; + GdkColor color; + color.red = info->fg_->red; + color.green = info->fg_->green; + color.blue = info->fg_->blue; + if(active) + { + color.blue = 0xffff; + color.green = 0; + color.red =0; + } + + if(info->selected_slot == info->selection_slot) + { + color.green = 0xffff; + color.red = 0; + color.blue = 0; + } +// gtk_widget_modify_fg ( GTK_WIDGET(info->selection_gui_slot->title), +// GTK_STATE_NORMAL, &color ); + gtk_widget_modify_fg ( GTK_WIDGET(info->selection_gui_slot->timecode), + GTK_STATE_NORMAL, &color ); +// gtk_widget_modify_fg ( gtk_frame_get_label_widget( info->selection_gui_slot->frame ), +// GTK_STATE_NORMAL, &color ); + +} + +static int add_sample_to_sample_banks(int bank_page,sample_slot_t *slot) +{ + int bp = 0; int s = 0; + + if(verify_bank_capacity( &bp, &s, slot->sample_id, slot->sample_type )) + update_sample_slot_data( bp, s, slot->sample_id,slot->sample_type,slot->title,slot->timecode); + + + return 1; +} + + +/* -------------------------------------------------------------------------------------------------------------------------- + * Removes a selected sample from the specific sample-bank-slot and update the free_slots-GList as well as + -------------------------------------------------------------------------------------------------------------------------- */ + +static void remove_sample_from_slot() +{ + gint bank_nr = -1; + gint slot_nr = -1; + + bank_nr = find_bank( gtk_notebook_get_current_page( + GTK_NOTEBOOK( info->sample_bank_pad ) ) ); + if(bank_nr < 0 ) + return; + if(!info->selection_slot) + return; + + slot_nr = info->selection_slot->slot_number; + + if( info->selection_slot->sample_id == info->status_tokens[CURRENT_ID] && + info->selection_slot->sample_type == info->status_tokens[PLAY_MODE] ) + { + gchar error_msg[100]; + sprintf(error_msg, "Cannot delete %s %d while playing", + (info->selection_slot->sample_type == MODE_SAMPLE ? "Sample" : "Stream" ), + info->selection_slot->sample_id ); + message_dialog( "Error while deleting", error_msg ); + + return; + } + + multi_vims( (info->selection_slot->sample_type == 0 ? VIMS_SAMPLE_DEL : + VIMS_STREAM_DELETE ), + "%d", + info->selection_slot->sample_id ); + gint id_len = 0; + gint deleted_sample = 0; + gchar *deleted_id = recv_vims( 3, &id_len ); + sscanf( deleted_id, "%d", &deleted_sample ); + if( deleted_sample ) + { + // decrement history of delete type + int *his = info->history_tokens[ (info->status_tokens[PLAY_MODE]) ]; + + his[TOTAL_SLOTS] = his[TOTAL_SLOTS] - 1; + + update_sample_slot_data( bank_nr, slot_nr, 0, -1, NULL, NULL); + + set_selection_of_slot_in_samplebank( FALSE ); + info->selection_gui_slot = NULL; + info->selection_slot = NULL; + } +} + + +/* -------------------------------------------------------------------------------------------------------------------------- + * Function adds the given infos to the list of effect-sources + -------------------------------------------------------------------------------------------------------------------------- */ +static void add_sample_to_effect_sources_list(gint id, gint type, gchar *title, gchar *timecode) +{ + gchar id_string[512]; + GtkTreeIter iter; + + if (type == STREAM_NO_STREAM) + sprintf( id_string, "S[%4d] %s", id, title); + else sprintf( id_string, "T[%4d]", id); + + gtk_list_store_append( effect_sources_store, &iter ); + gtk_list_store_set( effect_sources_store, &iter, SL_ID, id_string, SL_DESCR, title, SL_TIMECODE , timecode,-1 ); + +} + +/* + Update a slot, either set from function arguments or clear it + */ +static void update_sample_slot_data(int page_num, int slot_num, int sample_id, gint sample_type, gchar *title, gchar *timecode) +{ + sample_slot_t *slot = info->sample_banks[page_num]->slot[slot_num]; + sample_gui_slot_t *gui_slot = info->sample_banks[page_num]->gui_slot[slot_num]; + + if(slot->timecode) free(slot->timecode); + if(slot->title) free(slot->title); + + slot->sample_id = sample_id; + slot->sample_type = sample_type; + slot->timecode = timecode == NULL ? strdup("") : strdup( timecode ); + slot->title = title == NULL ? strdup("") : strdup( title ); + + if( sample_id ) + { + char sample_key[32]; + sprintf(sample_key, "S%04d%02d", sample_id, sample_type ); + vevo_property_set( bankport_, sample_key, VEVO_ATOM_TYPE_VOIDPTR,1, &slot ); + sprintf(sample_key, "G%04d%02d", sample_id, sample_type ); + vevo_property_set( bankport_, sample_key, VEVO_ATOM_TYPE_VOIDPTR,1,&gui_slot); + add_sample_to_effect_sources_list(sample_id, sample_type, title, timecode); + } + + if(gui_slot) + { +// if(gui_slot->title) +// gtk_label_set_text( GTK_LABEL( gui_slot->title ), slot->title ); + if(gui_slot->timecode) + gtk_label_set_text( GTK_LABEL( gui_slot->timecode ), slot->timecode ); + + if(sample_id > 0 ) + { + gchar frame_title[20]; + sprintf(frame_title, "%s", slot->title ); + gtk_frame_set_label( GTK_FRAME(gui_slot->frame),frame_title ); + } + else + { + gtk_frame_set_label(GTK_FRAME(gui_slot->frame), NULL ); + } + } + + if( sample_id == 0 ) + { + if(slot->pixbuf) + { + gdk_pixbuf_unref( slot->pixbuf ); + slot->pixbuf = NULL; + } + } + +} + +void veejay_release_track(int id, int release_this) +{ + multitrack_release_track( info->mt, id, release_this ); +} + +void veejay_bind_track( int id, int bind_this ) +{ + multitrack_bind_track(info->mt, id, bind_this ); +} diff --git a/veejay-client/src/vj-api.h b/veejay-client/src/vj-api.h new file mode 100644 index 00000000..45521f46 --- /dev/null +++ b/veejay-client/src/vj-api.h @@ -0,0 +1,58 @@ +/* gveejay - Linux VeeJay - GVeejay GTK+-2/Glade User Interface + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef VJAPI_H +#define VJAPI_H +int veejay_tick(); +void *get_ui_info(); +void vj_gui_init(char *glade_file, int launcher, char *hostname, int port_num, int threads); +int vj_gui_reconnect( char *host, char *group, int port); +void vj_gui_free(); +void vj_fork_or_connect_veejay(); +void vj_gui_enable(void); +void vj_gui_disable(void); +void vj_gui_disconnect(void); +void vj_gui_set_debug_level(int level, int preview_p, int pw, int ph); +void get_gd(char *buf, char *suf, const char *filename); +void vj_gui_theme_setup(int default_theme); +void vj_gui_set_timeout(int timer); +void set_skin(int skin); +void default_bank_values(int *col, int *row ); +void vj_gui_style_setup(); +gboolean gveejay_running(); +gboolean is_alive( int *sync ); +int vj_gui_sleep_time( void ); +int get_total_frames(); +int vj_img_cb(GdkPixbuf *img ); +int vj_get_preview_box_w(); +int vj_get_preview_box_h(); +int _effect_get_minmax( int effect_id, int *min, int *max, int index ); +void vj_gui_cb(int state, char *hostname, int port_num); +void gveejay_preview(int p); +int is_button_toggled(const char *name); +gchar *_utf8str( const char *c_str ); +void find_user_themes(); +int gveejay_user_preview(); +char *get_glade_path(); +char *get_gveejay_dir(); +int gveejay_restart(); +int gveejay_update(); +int update_gveejay(); +int veejay_update_multitrack( void *data ); +#endif diff --git a/veejay-client/src/vj-midi.c b/veejay-client/src/vj-midi.c new file mode 100644 index 00000000..cbbdf4ec --- /dev/null +++ b/veejay-client/src/vj-midi.c @@ -0,0 +1,504 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2007 Niels Elburg + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +extern GtkWidget *glade_xml_get_widget_( GladeXML *m, const char *name ); +extern void msg_vims(char *message); +extern void vj_msg(int type, const char format[], ...); +extern int prompt_dialog(const char *title, char *msg); +static int vj_midi_events(void *vv ); + +typedef struct +{ + snd_seq_t *sequencer; + void *vims; + struct pollfd *pfd; + int npfd; + int learn; + int learn_event[4]; + int active; + void *mw; +} vmidi_t; + +typedef struct +{ + int extra; + char *widget; + char *msg; +} dvims_t; + + +void vj_midi_learn( void *vv ) +{ + vmidi_t *v = (vmidi_t*) vv; + if(!v->active) return; + v->learn = 1; + vj_msg(VEEJAY_MSG_INFO, "Learning MIDI commands. Touch a midi key and then click a widget"); +} + +void vj_midi_play(void *vv ) +{ + vmidi_t *v = (vmidi_t*) vv; + if(!v->active) return; + + v->learn = 0; + int a = vj_midi_events(vv); + char msg[100]; + snprintf(msg,sizeof(msg), "MIDI listener active, %d events registered", a ); + vj_msg(VEEJAY_MSG_INFO, "%s",msg); +} +static int vj_midi_events(void *vv ) +{ + vmidi_t *v = (vmidi_t*)vv; + char **items = vevo_list_properties(v->vims); + if(!items) return 0; + + int i; + int len = 0; + for( i = 0; items[i] != NULL ; i ++ ) + { + len ++; + free(items[i]); + } + free(items); + return len; +} +static void vj_midi_reset( void *vv ) +{ + vmidi_t *v = (vmidi_t*)vv; + char **items = vevo_list_properties(v->vims); + if(!items) return; + + int i; + for( i = 0; items[i] != NULL ; i ++ ) + { + dvims_t *d = NULL; + if( vevo_property_get( v->vims, items[i],0,&d ) == VEVO_NO_ERROR ) + { + if(d->msg) free(d->msg); + if(d->widget) free(d->widget); + free(d); + } + free(items[i]); + } + free(items); + + vevo_port_free(v->vims); + v->vims = vpn(VEVO_ANONYMOUS_PORT); +} + +void vj_midi_load(void *vv, const char *filename) +{ + vmidi_t *v = (vmidi_t*) vv; + if(!v->active) return; + + int a = vj_midi_events(vv); + if( a > 0 ) + { + char warn[200]; + snprintf(warn,sizeof(warn), "There are %d MIDI event known, loading from file will overwrite any existing events. Continue ?", a ); + if( prompt_dialog( "MIDI", warn ) == GTK_RESPONSE_REJECT ) + return; + + } + + int fd = open( filename, O_RDONLY ); + if(!fd) + { + vj_msg(VEEJAY_MSG_ERROR, "Unable to open file '%s': %s", filename, strerror(errno)); + return; + } + struct stat t; + if( fstat( fd, &t) != 0 ) + { + vj_msg(VEEJAY_MSG_ERROR,"Unable to load %s: %s", filename, strerror(errno)); + return; + } + else + { + if( !S_ISREG( t.st_mode ) && !S_ISLNK(t.st_mode) ) + { + vj_msg(VEEJAY_MSG_ERROR, "File '%s' is not a regular file or symbolic link. Refusing to load it.", + filename ); + return; + } + } + + char *buf = (char*) vj_calloc( 128000 ); + int done = 0; + uint32_t count = 0; + if (read( fd, buf, 128000 ) > 0 ) + { + int len = strlen( buf ); + int j,k=0; + + char value[1024]; + veejay_memset(value,0,sizeof(value)); + + for( j = 0; j < len; j ++ ) + { + if( buf[j] == '\0' ) break; + if( buf[j] == '\n' ) + { + char key[32]; + char widget[100]; + char message[512]; + int extra = 0; + if(sscanf( value, "%s %d %s \"%[^\"]", key, &extra, widget, message ) == 4 ) + { + veejay_memset( value,0,sizeof(value)); + k = 0; + dvims_t *d = (dvims_t*) vj_calloc(sizeof(dvims_t)); + dvims_t *cur = NULL; + d->extra = extra; + d->widget = NULL; + if( strncasecmp( widget, "none", 4 ) !=0 ) + d->widget = strdup(widget); + d->msg = strdup(message); + if( vevo_property_get( v->vims, key, 0, &cur ) == VEVO_NO_ERROR ) + { + if(cur->widget) free(cur->widget); + if(cur->msg) free(cur->msg); + free(cur); + } + int error = vevo_property_set( v->vims, key, 1, VEVO_ATOM_TYPE_VOIDPTR, &d); + veejay_memset( key,0,sizeof(key)); + veejay_memset( widget,0,sizeof(widget)); + veejay_memset( message,0,sizeof(message)); + count ++; + } + + } + if( buf[j] != '\n' && buf[j] != '\0' ) + value[k++] = buf[j]; + + } + + } + free(buf); + vj_msg(VEEJAY_MSG_INFO, "Loaded %d MIDI events from %s", count ,filename); +} + +void vj_midi_save(void *vv, const char *filename) +{ + vmidi_t *v = (vmidi_t*) vv; + if(!v->active) return; + + int fd = open( filename, O_TRUNC|O_CREAT|O_WRONLY ); + if(!fd) + { + vj_msg(VEEJAY_MSG_ERROR, "Unable to save MIDI settings to %s",filename); + return; + } + + char **items = vevo_list_properties( v->vims ); + int i; + if( items == NULL ) + { + vj_msg(VEEJAY_MSG_ERROR, "No MIDI events learned yet"); + return; + } + uint32_t count = 0; + for( i =0 ; items[i] != NULL ;i ++ ) + { + char tmp[512]; + dvims_t *d = NULL; + if( vevo_property_get( v->vims, items[i], 0, &d ) == VEVO_NO_ERROR ) + { + snprintf(tmp, 512, "%s %d %s \"%s\"\n", + items[i], + d->extra, + (d->widget == NULL ? "none" : d->widget ), + d->msg ); + write( fd, tmp, strlen( tmp )); + count ++; + } + free(items[i]); + } + free(items); + close(fd); + + vj_msg(VEEJAY_MSG_INFO, "Wrote %d MIDI events to %s", count, filename ); +} + +void vj_midi_learning_vims( void *vv, char *widget, char *msg, int extra ) +{ + vmidi_t *v = (vmidi_t*) vv; + if(!v->active) return; + + if( !v->learn ) + return; + dvims_t *d = (dvims_t*) vj_malloc(sizeof(dvims_t)); + d->extra = extra; + d->msg = (msg == NULL ? NULL : strdup(msg)); + d->widget = (widget == NULL ? NULL : strdup(widget)); + char key[32]; + snprintf(key,sizeof(key), "%03d%03d", v->learn_event[0],v->learn_event[1] ); + + dvims_t *cur = NULL; + if( vevo_property_get( v->vims, key, 0, &cur ) == VEVO_NO_ERROR ) + { + if( cur->widget ) free(cur->widget ); + if( cur->msg ) free(cur->msg); + free(cur); + } + int error = vevo_property_set( v->vims, key, 1, VEVO_ATOM_TYPE_VOIDPTR, &d ); + if( error != VEVO_NO_ERROR ) + return; + vj_msg( VEEJAY_MSG_INFO, + "Midi %x: %x ,%x learned", v->learn_event[0],v->learn_event[1],v->learn_event[2]); +} + +void vj_midi_learning_vims_simple( void *vv, char *widget, int id ) +{ + char message[100]; + if( widget == NULL ) + snprintf(message,sizeof(message), "%03d:;", id ); + else + snprintf(message,sizeof(message), "%03d:", id ); + vj_midi_learning_vims( vv, widget, message, (widget == NULL ? 0 : 1 ) ); +} + +void vj_midi_learning_vims_spin( void *vv, char *widget, int id ) +{ + char message[100]; + if( widget == NULL ) + snprintf(message,sizeof(message), "%03d:;", id ); + else + snprintf(message,sizeof(message), "%03d:", id ); + vj_midi_learning_vims( vv, widget, message, (widget == NULL ? 0 : 2) ); +} + + +void vj_midi_learning_vims_complex( void *vv, char *widget, int id, int first , int extra) +{ + char message[100]; + snprintf( message, sizeof(message), "%03d:%d",id, first ); + + vj_midi_learning_vims( vv, widget, message, extra ); +} + +void vj_midi_learning_vims_msg( void *vv, char *widget, int id, int arg ) +{ + char message[100]; + snprintf(message, sizeof(message), "%03d:%d;",id, arg ); + + vj_midi_learning_vims( vv, widget, message, 0 ); +} + +void vj_midi_learning_vims_msg2(void *vv, char *widget, int id, int arg, int b ) +{ + char message[100]; + snprintf(message,sizeof(message), "%03d:%d %d;", id, arg,b ); + vj_midi_learning_vims( vv, widget, message, 0 ); +} + +void vj_midi_learning_vims_fx( void *vv, int widget, int id, int a, int b, int c, int extra ) +{ + char message[100]; + char wid[100]; + snprintf(message,sizeof(message), "%03d:%d %d %d", id, a,b,c ); + snprintf(wid, sizeof(wid),"slider_p%d", widget ); + vj_midi_learning_vims( vv, wid, message, extra ); +} + +static void queue_vims_event( vmidi_t *v, int *data ) +{ + char key[32]; + + if( v->learn ) + { + veejay_memcpy( v->learn_event, data, sizeof(v->learn_event )); + vj_msg(VEEJAY_MSG_INFO, "MIDI %x:%x,%x -> ?", v->learn_event[0],v->learn_event[1], + v->learn_event[2]); + return; + } + + snprintf(key,sizeof(key), "%03d%03d", data[0],data[1] ); + + dvims_t *d = NULL; + int error = vevo_property_get( v->vims, key, 0, &d); + if( error == VEVO_NO_ERROR ) + { + if( d->extra ) + { //@ argument is dynamic + double min = 0.0; + double max = 0.0; + double tmp = 0.0; + double val = 0.0; + switch(d->extra) + { + case 1: //slider + { + GtkAdjustment *a = gtk_range_get_adjustment( GTK_RANGE( + glade_xml_get_widget_( v->mw, d->widget ) ) ); + min = a->lower; + max = a->upper; + } + break; + case 2: //spinbox + gtk_spin_button_get_range( GTK_SPIN_BUTTON( + glade_xml_get_widget_( v->mw, d->widget)), &min, &max); + + break; + } + + if( data[0] == SND_SEQ_EVENT_PITCHBEND ) + { + tmp = 16384.0 / max; + val = data[2] + 8192; + if( val > 0 ) + val = val / tmp; + } + else if( data[0] == SND_SEQ_EVENT_CONTROLLER || data[0] == SND_SEQ_EVENT_KEYPRESS ) + { + tmp = 127.0 / max; + val = data[2]; + if( val > 0 ) + val = val / tmp; + } else { + return; + } + + char vims_msg[255]; + snprintf(vims_msg,sizeof(vims_msg), "%s %d;", d->msg, (int) val ); + msg_vims( vims_msg ); + vj_msg(VEEJAY_MSG_INFO, "MIDI %x:%x, %x -> vims %s", data[0], data[1],data[2], vims_msg); + } + else + { + msg_vims( d->msg ); + vj_msg(VEEJAY_MSG_INFO, "MIDI %x: %x,%x -> vims %s", data[0],data[1],data[2], d->msg); + } + } + else + { + vj_msg(VEEJAY_MSG_ERROR, "No vims event for MIDI %x:%x,%x found", + data[0],data[1],data[2]); + } +} + +static void vj_midi_action( vmidi_t *v ) +{ + snd_seq_event_t *ev; + int data[4] = { 0,0,0,0}; + snd_seq_event_input( v->sequencer, &ev ); + + data[0] = ev->type; + + switch( ev->type ) + { + /* controller: channel <0-N>, */ + case SND_SEQ_EVENT_CONTROLLER: + data[1] = ev->data.control.channel; + data[2] = ev->data.control.value; + break; + case SND_SEQ_EVENT_PITCHBEND: + data[1] = ev->data.control.channel; + data[2] = ev->data.control.value; + break; + case SND_SEQ_EVENT_NOTEON: + data[2] = ev->data.control.channel; + data[1] = ev->data.note.note; + break; + case SND_SEQ_EVENT_NOTEOFF: + data[2] = ev->data.control.channel; + data[1] = ev->data.note.note; + break; + case SND_SEQ_EVENT_KEYPRESS: + data[1] = ev->data.control.channel; + data[2] = ev->data.note.velocity; + break; + default: + break; + } + + queue_vims_event( v, data ); + + snd_seq_free_event( ev ); +} + +int vj_midi_handle_events(void *vv) +{ + vmidi_t *v = (vmidi_t*) vv; + if(!v->active) return 0; + + if( poll( v->pfd, v->npfd, 0 ) > 0 ) + { + //@ snd_event_input_pending doesnt work + // while( snd_seq_event_input_pending( v->sequencer, 0 ) > 0 ) + vj_midi_action( v ); + return 1; + } + return 0; +} + + +void *vj_midi_new(void *mw) +{ + vmidi_t *v = (vmidi_t*) vj_calloc(sizeof(vmidi_t)); + int portid = 0; + + if( snd_seq_open( &(v->sequencer), "hw", SND_SEQ_OPEN_DUPLEX, 0 ) < 0 ) + { + veejay_msg(0, "Error opening ALSA sequencer"); + return v; + } + + snd_seq_set_client_name( v->sequencer, "Veejay" ); + + if( (portid = snd_seq_create_simple_port( v->sequencer, "Veejay", + SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE , + SND_SEQ_PORT_TYPE_APPLICATION )) < 0 ) + { + veejay_msg(0, "Error creating sequencer port"); + + return v; + } + + v->npfd = snd_seq_poll_descriptors_count( v->sequencer, POLLIN ); + if( v->npfd <= 0 ) + { + veejay_msg(0,"Unable to poll in from sequencer"); + return v; + } + v->pfd = (struct pollfd *) vj_calloc( v->npfd * sizeof( struct pollfd )); + v->mw = mw; + v->learn = 0; + v->vims = vpn(VEVO_ANONYMOUS_PORT); + v->active = 1; + snd_seq_poll_descriptors( v->sequencer, v->pfd, v->npfd, POLLIN ); + + veejay_msg(VEEJAY_MSG_INFO, "MIDI listener active"); + + return (void*) v; +} + + diff --git a/veejay-client/src/vmidi.h b/veejay-client/src/vmidi.h new file mode 100644 index 00000000..aa63c935 --- /dev/null +++ b/veejay-client/src/vmidi.h @@ -0,0 +1,41 @@ +/* Gveejay Reloaded - graphical interface for VeeJay + * (C) 2002-2007 Niels Elburg + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VMIDI_H +#define VMIDI_H + +void *vj_midi_new(void *mw); + +int vj_midi_handle_events(void *vv); + +void vj_midi_play(void *vv ); + +void vj_midi_learn( void *vv ); + +void vj_midi_load(void *vv, const char *filename); + +void vj_midi_save(void *vv, const char *filename); + + +void vj_midi_learning_vims( void *vv, char *widget, char *msg, int extra ); +void vj_midi_learning_vims_simple( void *vv, char *widget, int id ); +void vj_midi_learning_vims_complex( void *vv, char *widget, int id, int first , int extra ); +void vj_midi_learning_vims_fx( void *vv, int widget, int id, int a, int b, int c, int extra ); +void vj_midi_learning_vims_msg2(void *vv, char *widget, int id, int arg, int b ); +void vj_midi_learning_vims_msg( void *vv, char *widget, int id, int arg ); +void vj_midi_learning_vims_spin( void *vv, char *widget, int id ); +#endif diff --git a/veejay-client/src/widgets/cellrendererspin.c b/veejay-client/src/widgets/cellrendererspin.c new file mode 100644 index 00000000..e4635222 --- /dev/null +++ b/veejay-client/src/widgets/cellrendererspin.c @@ -0,0 +1,358 @@ +/*************************************************************************** + cellrendererspin.c + ------------------ + begin : Tue Oct 21 2003 + copyright : (C) 2003 by Tim-Philipp Mller + email : t.i.m at orange dot net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 is a dirty 15-minute hack that tries to + * make editable cells with spin buttons instead + * of the text entry widget. + * + * Modify how you please. At the moment you need + * to hook up your own cell data function to make + * sure that the number of digits is the same in + * editing mode as it is in non-editing mode. + * + * The parameters passed to _new() should probably + * be properties, and probably we don't need most + * of them anyway. Also, it would be good if there + * was a better method to ensure that the number + * of digits is the same without this. + * + * Maybe one should just rip out the whole _render + * stuff from GtkCellRendererText and make a + * whole new specialised GtkCellRenderFloat + * or something. + * + * If anyone ever completes this code to sth useful, + * or achieves sth similar in another way, or has + * any comments on it, please drop me a mail. + */ + +#include "cellrendererspin.h" +#include +#include +#include + +#define GUI_CELL_RENDERER_SPIN_PATH "gui-cell-renderer-spin-path" +#define GUI_CELL_RENDERER_SPIN_INFO "gui-cell-renderer-spin-info" + +/* Some boring function declarations: GObject type system stuff */ + +static void gui_cell_renderer_spin_init (GuiCellRendererSpin *cellspin); + +static void gui_cell_renderer_spin_class_init (GuiCellRendererSpinClass *klass); + +static void gui_cell_renderer_spin_finalize (GObject *gobject); + + +static gpointer parent_class; + + +static GtkCellEditable *gui_cell_renderer_spin_start_editing (GtkCellRenderer *cell, + GdkEvent *event, + GtkWidget *widget, + const gchar *path, + GdkRectangle *background_area, + GdkRectangle *cell_area, + GtkCellRendererState flags); + +struct _GCRSpinInfo +{ + gulong focus_out_id; +}; + +typedef struct _GCRSpinInfo GCRSpinInfo; + +/*************************************************************************** + * + * gui_cell_renderer_spin_get_type + * + * Here we register our type with the GObject type system if we + * haven't done so yet. Everything else is done in the callbacks. + * + ***************************************************************************/ + +GType +gui_cell_renderer_spin_get_type (void) +{ + static GType cell_spin_type = 0; + + if (cell_spin_type) + return cell_spin_type; + + if (1) + { + static const GTypeInfo cell_spin_info = + { + sizeof (GuiCellRendererSpinClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gui_cell_renderer_spin_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GuiCellRendererSpin), + 0, /* n_preallocs */ + (GInstanceInitFunc) gui_cell_renderer_spin_init, + }; + + /* Derive from GtkCellRenderer */ + cell_spin_type = g_type_register_static (GTK_TYPE_CELL_RENDERER_TEXT, + "GuiCellRendererSpin", + &cell_spin_info, + 0); + } + + return cell_spin_type; +} + +/*************************************************************************** + * + * gui_cell_renderer_spin_init + * + * Set some default properties of the parent (GtkCellRendererText). + * + ***************************************************************************/ + +static void +gui_cell_renderer_spin_init (GuiCellRendererSpin *cellrendererspin) +{ + return; +} + + +/*************************************************************************** + * + * gui_cell_renderer_spin_class_init: + * + ***************************************************************************/ + +static void +gui_cell_renderer_spin_class_init (GuiCellRendererSpinClass *klass) +{ + GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); + + parent_class = g_type_class_peek_parent (klass); + object_class->finalize = gui_cell_renderer_spin_finalize; + + /* Override the cell renderer's edit-related methods */ + cell_class->start_editing = gui_cell_renderer_spin_start_editing; +} + + +/*************************************************************************** + * + * gui_cell_renderer_spin_finalize: free any resources here + * + ***************************************************************************/ + +static void +gui_cell_renderer_spin_finalize (GObject *object) +{ +/* + GuiCellRendererSpin *cellrendererspin = GUI_CELL_RENDERER_SPIN(object); +*/ + + /* Free any dynamically allocated resources here */ + + + /* chain up to parent class to make sure + * they release all their memory as well */ + + (* G_OBJECT_CLASS (parent_class)->finalize) (object); +} + + +/*************************************************************************** + * + * gui_cell_renderer_spin_new + * + * return a new cell renderer instance + * (all the parameters should really be properties) + * + * Not sure which of all these values are really + * relevant for the spin button - needs checking! + * + ***************************************************************************/ + +GtkCellRenderer * +gui_cell_renderer_spin_new (gdouble lower, + gdouble upper, + gdouble step_inc, + gdouble page_inc, + gdouble page_size, + gdouble climb_rate, + guint digits) +{ + GtkCellRenderer *cell; + GuiCellRendererSpin *spincell; + + cell = g_object_new(GUI_TYPE_CELL_RENDERER_SPIN, NULL); + + spincell = GUI_CELL_RENDERER_SPIN(cell); + + spincell->lower = lower; + spincell->upper = upper; + spincell->step_inc = step_inc; + spincell->page_inc = page_inc; + spincell->page_size = page_size; + spincell->climb_rate = climb_rate; + spincell->digits = digits; + + return cell; +} + + +/*************************************************************************** + * + * gui_cell_renderer_spin_editing_done + * + ***************************************************************************/ + +static void +gui_cell_renderer_spin_editing_done (GtkCellEditable *spinbutton, + gpointer data) +{ + const gchar *path; + const gchar *new_text; + GCRSpinInfo *info; + + info = g_object_get_data (G_OBJECT (data), GUI_CELL_RENDERER_SPIN_INFO); + + if (info->focus_out_id > 0) + { + g_signal_handler_disconnect (spinbutton, info->focus_out_id); + info->focus_out_id = 0; + } + + if (GTK_ENTRY(spinbutton)->editing_canceled) + return; + + path = g_object_get_data (G_OBJECT (spinbutton), GUI_CELL_RENDERER_SPIN_PATH); + new_text = gtk_entry_get_text (GTK_ENTRY(spinbutton)); + + g_signal_emit_by_name(data, "edited", path, new_text); +} + + +/*************************************************************************** + * + * gui_cell_renderer_spin_focus_out_event + * + ***************************************************************************/ + +static gboolean +gui_cell_renderer_spin_focus_out_event (GtkWidget *spinbutton, + GdkEvent *event, + gpointer data) +{ + gui_cell_renderer_spin_editing_done (GTK_CELL_EDITABLE (spinbutton), data); + + /* entry needs focus-out-event */ + return FALSE; +} + +/*************************************************************************** + * + * gui_cell_renderer_spin_start_editing + * + ***************************************************************************/ + +static gboolean +onButtonPress (GtkWidget *spinbutton, GdkEventButton *bevent, gpointer data) +{ + if ((bevent->button == 1 && bevent->type == GDK_2BUTTON_PRESS) || bevent->type == GDK_3BUTTON_PRESS) + { + g_print ("double or triple click caught and ignored.\n"); + return TRUE; /* don't invoke other handlers */ + } + + return FALSE; +} + + +/*************************************************************************** + * + * gui_cell_renderer_spin_start_editing + * + ***************************************************************************/ + +static GtkCellEditable * +gui_cell_renderer_spin_start_editing (GtkCellRenderer *cell, + GdkEvent *event, + GtkWidget *widget, + const gchar *path, + GdkRectangle *background_area, + GdkRectangle *cell_area, + GtkCellRendererState flags) +{ + GtkCellRendererText *celltext; + GuiCellRendererSpin *spincell; + GtkAdjustment *adj; + GtkWidget *spinbutton; + GCRSpinInfo *info; + gdouble curval = 0.0; + + celltext = GTK_CELL_RENDERER_TEXT(cell); + spincell = GUI_CELL_RENDERER_SPIN(cell); + + /* If the cell isn't editable we return NULL. */ + if (celltext->editable == FALSE) + return NULL; + + spinbutton = g_object_new (GTK_TYPE_SPIN_BUTTON, "has_frame", FALSE, "numeric", TRUE, NULL); + + /* dirty */ + if (celltext->text) + curval = atof(celltext->text); + + adj = GTK_ADJUSTMENT(gtk_adjustment_new(curval, + spincell->lower, + spincell->upper, + spincell->step_inc, + spincell->page_inc, + spincell->page_size)); + + gtk_spin_button_configure(GTK_SPIN_BUTTON(spinbutton), adj, spincell->climb_rate, spincell->digits); + + g_object_set_data_full (G_OBJECT(spinbutton), GUI_CELL_RENDERER_SPIN_PATH, g_strdup (path), g_free); + + gtk_editable_select_region (GTK_EDITABLE (spinbutton), 0, -1); + + gtk_widget_show (spinbutton); + + g_signal_connect (spinbutton, "editing_done", + G_CALLBACK (gui_cell_renderer_spin_editing_done), + celltext); + + /* hack trying to catch the quite annoying effect + * a double click has while editing */ + + g_signal_connect (spinbutton, "button_press_event", + G_CALLBACK (onButtonPress), + NULL); + + info = g_new0(GCRSpinInfo, 1); + + info->focus_out_id = g_signal_connect (spinbutton, "focus_out_event", + G_CALLBACK (gui_cell_renderer_spin_focus_out_event), + celltext); + + g_object_set_data_full (G_OBJECT (cell), GUI_CELL_RENDERER_SPIN_INFO, info, g_free); + + return GTK_CELL_EDITABLE (spinbutton); +} diff --git a/veejay-client/src/widgets/cellrendererspin.h b/veejay-client/src/widgets/cellrendererspin.h new file mode 100644 index 00000000..89f6aa74 --- /dev/null +++ b/veejay-client/src/widgets/cellrendererspin.h @@ -0,0 +1,68 @@ +/*************************************************************************** + cellrendererspin.h + ------------------ + begin : Tue Oct 21 2003 + copyright : (C) 2003 by Tim-Philipp Mller + email : t.i.m at orange dot net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef _cellrendererspin_h_included_ +#define _cellrendererspin_h_included_ + +#include + +/* Some boilerplate GObject type check and type cast macros */ + +#define GUI_TYPE_CELL_RENDERER_SPIN (gui_cell_renderer_spin_get_type()) +#define GUI_CELL_RENDERER_SPIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GUI_TYPE_CELL_RENDERER_SPIN, GuiCellRendererSpin)) +#define GUI_CELL_RENDERER_SPIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GUI_TYPE_CELL_RENDERER_SPIN, GuiCellRendererSpinClass)) +#define GUI_IS_CELL_RENDERER_SPIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GUI_TYPE_CELL_RENDERER_SPIN)) +#define GUI_IS_CELL_RENDERER_SPIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GUI_TYPE_CELL_RENDERER_SPIN)) +#define GUI_CELL_RENDERER_SPIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GUI_TYPE_CELL_RENDERER_SPIN, GuiCellRendererSpinClass)) + + + +typedef struct _GuiCellRendererSpin GuiCellRendererSpin; +typedef struct _GuiCellRendererSpinClass GuiCellRendererSpinClass; + + +struct _GuiCellRendererSpin +{ + GtkCellRendererText parent; + + gdouble lower; + gdouble upper; + gdouble step_inc; + gdouble page_inc; + gdouble page_size; + gdouble climb_rate; + guint digits; +}; + +struct _GuiCellRendererSpinClass +{ + GtkCellRendererTextClass parent_class; +}; + +GType gui_cell_renderer_spin_get_type (void); + +GtkCellRenderer *gui_cell_renderer_spin_new (gdouble lower, + gdouble upper, + gdouble step_inc, + gdouble page_inc, + gdouble page_size, + gdouble climb_rate, + guint digits); + + +#endif /* _spinbar_renderer_h_included_ */ + diff --git a/veejay-client/src/widgets/gtkcolorsel.c b/veejay-client/src/widgets/gtkcolorsel.c new file mode 100644 index 00000000..73e1d9f5 --- /dev/null +++ b/veejay-client/src/widgets/gtkcolorsel.c @@ -0,0 +1,2873 @@ +/* GTK - The GIMP Toolkit + * Copyright (C) 2000 Red Hat, Inc. + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * Modified by the GTK+ Team and others 1997-2001. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gtkcolorsel.h" +#include "gtkhsv.h" + +#ifdef GDK_WINDOWING_X11 +#include +#include +#elif defined GDK_WINDOWING_WIN32 +#define WIN32_LEAN_AND_MEAN +#include +#endif + +/* Number of elements in the custom palatte */ +#define GTK_CUSTOM_PALETTE_WIDTH 5 +#define GTK_CUSTOM_PALETTE_HEIGHT 4 + +/* Conversion between 0->1 double and and guint16. See + * scale_round() below for more general conversions + */ +#define SCALE(i) (i / 65535.) +#define UNSCALE(d) ((guint16)(d * 65535 + 0.5)) + + +enum { + COLOR_CHANGED, + LAST_SIGNAL +}; + +enum { + PROP_0, + PROP_HAS_PALETTE, + PROP_HAS_OPACITY_CONTROL, + PROP_CURRENT_COLOR, + PROP_CURRENT_ALPHA +}; + +enum { + COLORSEL_RED = 0, + COLORSEL_GREEN = 1, + COLORSEL_BLUE = 2, + COLORSEL_OPACITY = 3, + COLORSEL_HUE, + COLORSEL_SATURATION, + COLORSEL_VALUE, + COLORSEL_NUM_CHANNELS +}; + +typedef struct _ColorSelectionPrivate ColorSelectionPrivate; + +struct _ColorSelectionPrivate +{ + guint has_opacity : 1; + guint has_palette : 1; + guint changing : 1; + guint default_set : 1; + guint default_alpha_set : 1; + + gdouble color[COLORSEL_NUM_CHANNELS]; + gdouble old_color[COLORSEL_NUM_CHANNELS]; + + GtkWidget *triangle_colorsel; + GtkWidget *hue_spinbutton; + GtkWidget *sat_spinbutton; + GtkWidget *val_spinbutton; + GtkWidget *red_spinbutton; + GtkWidget *green_spinbutton; + GtkWidget *blue_spinbutton; + GtkWidget *opacity_slider; + GtkWidget *opacity_label; + GtkWidget *opacity_entry; + GtkWidget *palette_frame; + GtkWidget *hex_entry; + + /* The Palette code */ + GtkWidget *custom_palette [GTK_CUSTOM_PALETTE_WIDTH][GTK_CUSTOM_PALETTE_HEIGHT]; + + /* The color_sample stuff */ + GtkWidget *sample_area; + GtkWidget *old_sample; + GtkWidget *cur_sample; + GtkWidget *colorsel; + + /* Tooltips group */ + GtkTooltips *tooltips; + + /* Window for grabbing on */ + GtkWidget *dropper_grab_widget; + + /* Connection to settings */ + gulong settings_connection; +}; + + +static void gtk_color_selection_init (GtkColorSelection *colorsel); +static void gtk_color_selection_class_init (GtkColorSelectionClass *klass); +static void gtk_color_selection_destroy (GtkObject *object); +static void gtk_color_selection_finalize (GObject *object); +static void update_color (GtkColorSelection *colorsel); +static void gtk_color_selection_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void gtk_color_selection_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); + +static void gtk_color_selection_realize (GtkWidget *widget); +static void gtk_color_selection_unrealize (GtkWidget *widget); +static void gtk_color_selection_show_all (GtkWidget *widget); + +static void gtk_color_selection_set_palette_color (GtkColorSelection *colorsel, + gint index, + GdkColor *color); +static GdkGC *get_focus_gc (GtkWidget *drawing_area, + gint *focus_width); +static void default_noscreen_change_palette_func (const GdkColor *colors, + gint n_colors); +static void default_change_palette_func (GdkScreen *screen, + const GdkColor *colors, + gint n_colors); +static void make_control_relations (AtkObject *atk_obj, + GtkWidget *widget); +static void make_all_relations (AtkObject *atk_obj, + ColorSelectionPrivate *priv); + +static gpointer parent_class = NULL; +static guint color_selection_signals[LAST_SIGNAL] = { 0 }; + +static const gchar default_colors[] = "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"; + +static GtkColorSelectionChangePaletteFunc noscreen_change_palette_hook = default_noscreen_change_palette_func; +static GtkColorSelectionChangePaletteWithScreenFunc change_palette_hook = default_change_palette_func; + +/* The cursor for the dropper */ +#define DROPPER_WIDTH 17 +#define DROPPER_HEIGHT 17 +#define DROPPER_X_HOT 2 +#define DROPPER_Y_HOT 16 + + +static const guchar dropper_bits[] = { + 0xff, 0x8f, 0x01, 0xff, 0x77, 0x01, 0xff, 0xfb, 0x00, 0xff, 0xf8, 0x00, + 0x7f, 0xff, 0x00, 0xff, 0x7e, 0x01, 0xff, 0x9d, 0x01, 0xff, 0xd8, 0x01, + 0x7f, 0xd4, 0x01, 0x3f, 0xee, 0x01, 0x1f, 0xff, 0x01, 0x8f, 0xff, 0x01, + 0xc7, 0xff, 0x01, 0xe3, 0xff, 0x01, 0xf3, 0xff, 0x01, 0xfd, 0xff, 0x01, + 0xff, 0xff, 0x01, }; + +static const guchar dropper_mask[] = { + 0x00, 0x70, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x01, 0x00, 0xff, 0x01, + 0x80, 0xff, 0x01, 0x00, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x80, 0x3f, 0x00, + 0xc0, 0x3f, 0x00, 0xe0, 0x13, 0x00, 0xf0, 0x01, 0x00, 0xf8, 0x00, 0x00, + 0x7c, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x0d, 0x00, 0x00, + 0x02, 0x00, 0x00, }; + + +/* + * + * The Sample Color + * + */ +#define SAMPLE_WIDTH 64 +#define SAMPLE_HEIGHT 28 + +static void color_sample_draw_sample (GtkColorSelection *colorsel, int which); +static void color_sample_draw_samples (GtkColorSelection *colorsel); + +static void +set_color_internal (GtkColorSelection *colorsel, + gdouble *color) +{ + ColorSelectionPrivate *priv; + gint i; + + priv = colorsel->private_data; + priv->changing = TRUE; + priv->color[COLORSEL_RED] = color[0]; + priv->color[COLORSEL_GREEN] = color[1]; + priv->color[COLORSEL_BLUE] = color[2]; + priv->color[COLORSEL_OPACITY] = color[3]; + gtk_rgb_to_hsv (priv->color[COLORSEL_RED], + priv->color[COLORSEL_GREEN], + priv->color[COLORSEL_BLUE], + &priv->color[COLORSEL_HUE], + &priv->color[COLORSEL_SATURATION], + &priv->color[COLORSEL_VALUE]); + if (priv->default_set == FALSE) + { + for (i = 0; i < COLORSEL_NUM_CHANNELS; i++) + priv->old_color[i] = priv->color[i]; + } + priv->default_set = TRUE; + priv->default_alpha_set = TRUE; + update_color (colorsel); +} + +static void +set_color_icon (GdkDragContext *context, + gdouble *colors) +{ + GdkPixbuf *pixbuf; + guint32 pixel; + + pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, + 8, 48, 32); + + pixel = (((UNSCALE (colors[COLORSEL_RED]) & 0xff00) << 16) | + ((UNSCALE (colors[COLORSEL_GREEN]) & 0xff00) << 8) | + ((UNSCALE (colors[COLORSEL_BLUE]) & 0xff00))); + + gdk_pixbuf_fill (pixbuf, pixel); + + gtk_drag_set_icon_pixbuf (context, pixbuf, -2, -2); + g_object_unref (pixbuf); +} + +static void +color_sample_drag_begin (GtkWidget *widget, + GdkDragContext *context, + gpointer data) +{ + GtkColorSelection *colorsel = data; + ColorSelectionPrivate *priv; + gdouble *colsrc; + + priv = colorsel->private_data; + + if (widget == priv->old_sample) + colsrc = priv->old_color; + else + colsrc = priv->color; + + set_color_icon (context, colsrc); +} + +static void +color_sample_drag_end (GtkWidget *widget, + GdkDragContext *context, + gpointer data) +{ + g_object_set_data (G_OBJECT (widget), "gtk-color-selection-drag-window", NULL); +} + +static void +color_sample_drop_handle (GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *selection_data, + guint info, + guint time, + gpointer data) +{ + GtkColorSelection *colorsel = data; + ColorSelectionPrivate *priv; + guint16 *vals; + gdouble color[4]; + priv = colorsel->private_data; + + /* This is currently a guint16 array of the format: + * R + * G + * B + * opacity + */ + + if (selection_data->length < 0) + return; + + /* We accept drops with the wrong format, since the KDE color + * chooser incorrectly drops application/x-color with format 8. + */ + if (selection_data->length != 8) + { + g_warning ("Received invalid color data\n"); + return; + } + + vals = (guint16 *)selection_data->data; + + if (widget == priv->cur_sample) + { + color[0] = (gdouble)vals[0] / 0xffff; + color[1] = (gdouble)vals[1] / 0xffff; + color[2] = (gdouble)vals[2] / 0xffff; + color[3] = (gdouble)vals[3] / 0xffff; + + set_color_internal (colorsel, color); + } +} + +static void +color_sample_drag_handle (GtkWidget *widget, + GdkDragContext *context, + GtkSelectionData *selection_data, + guint info, + guint time, + gpointer data) +{ + GtkColorSelection *colorsel = data; + ColorSelectionPrivate *priv; + guint16 vals[4]; + gdouble *colsrc; + + priv = colorsel->private_data; + + if (widget == priv->old_sample) + colsrc = priv->old_color; + else + colsrc = priv->color; + + vals[0] = colsrc[COLORSEL_RED] * 0xffff; + vals[1] = colsrc[COLORSEL_GREEN] * 0xffff; + vals[2] = colsrc[COLORSEL_BLUE] * 0xffff; + vals[3] = priv->has_opacity ? colsrc[COLORSEL_OPACITY] * 0xffff : 0xffff; + + gtk_selection_data_set (selection_data, + gdk_atom_intern ("application/x-color", FALSE), + 16, (guchar *)vals, 8); +} + +/* which = 0 means draw old sample, which = 1 means draw new */ +static void +color_sample_draw_sample (GtkColorSelection *colorsel, int which) +{ + GtkWidget *da; + gint x, y, i, wid, heig, f, n, goff; + guchar c[3 * 2], cc[3 * 4], *cp = c; + gdouble o; + guchar *buf; + ColorSelectionPrivate *priv; + + g_return_if_fail (colorsel != NULL); + priv = colorsel->private_data; + + g_return_if_fail (priv->sample_area != NULL); + if (!GTK_WIDGET_DRAWABLE (priv->sample_area)) + return; + + if (which == 0) + { + da = priv->old_sample; + for (n = 0, i = COLORSEL_RED; n < 3; n++, i++) + c[n] = (guchar) (UNSCALE (priv->old_color[i]) >> 8); + goff = 0; + } + else + { + da = priv->cur_sample; + for (n = 0, i = COLORSEL_RED; n < 3; n++, i++) + c[n] = (guchar) (UNSCALE (priv->color[i]) >> 8); + goff = priv->old_sample->allocation.width % 32; + } + + wid = da->allocation.width; + heig = da->allocation.height; + + buf = g_new (guchar, 3 * wid * heig); + +#if 0 + i = COLORSEL_RED; + for (n = 0; n < 3; n++) + { + c[n] = (guchar) (255.0 * priv->old_color[i]); + c[n + 3] = (guchar) (255.0 * priv->color[i++]); + } +#endif + + if (priv->has_opacity) + { + o = (which) ? priv->color[COLORSEL_OPACITY] : priv->old_color[COLORSEL_OPACITY]; + + for (n = 0; n < 3; n++) + { + cc[n] = (guchar) ((1.0 - o) * 192 + (o * (gdouble) c[n])); + cc[n + 3] = (guchar) ((1.0 - o) * 128 + (o * (gdouble) c[n])); + } + cp = cc; + } + + i = 0; + for (y = 0; y < heig; y++) + { + for (x = 0; x < wid; x++) + { + if (priv->has_opacity) + f = 3 * ((((goff + x) % 32) < 16) ^ ((y % 32) < 16)); + else + f = 0; + + for (n = 0; n < 3; n++) + buf[i++] = cp[n + f]; + } + } + + gdk_draw_rgb_image (da->window, + da->style->black_gc, + 0, 0, + wid, heig, + GDK_RGB_DITHER_NORMAL, + buf, + 3*wid); + + + g_free (buf); +} + + +static void +color_sample_draw_samples (GtkColorSelection *colorsel) +{ + color_sample_draw_sample (colorsel, 0); + color_sample_draw_sample (colorsel, 1); +} + +static gboolean +color_old_sample_expose (GtkWidget *da, + GdkEventExpose *event, + GtkColorSelection *colorsel) +{ + color_sample_draw_sample (colorsel, 0); + return FALSE; +} + + +static gboolean +color_cur_sample_expose (GtkWidget *da, + GdkEventExpose *event, + GtkColorSelection *colorsel) +{ + color_sample_draw_sample (colorsel, 1); + return FALSE; +} + +static void +color_sample_setup_dnd (GtkColorSelection *colorsel, GtkWidget *sample) +{ + static const GtkTargetEntry targets[] = { + { "application/x-color", 0 } + }; + ColorSelectionPrivate *priv; + priv = colorsel->private_data; + + gtk_drag_source_set (sample, + GDK_BUTTON1_MASK | GDK_BUTTON3_MASK, + targets, 1, + GDK_ACTION_COPY | GDK_ACTION_MOVE); + + g_signal_connect (sample, + "drag_begin", + G_CALLBACK (color_sample_drag_begin), + colorsel); + if (sample == priv->cur_sample) + { + + gtk_drag_dest_set (sample, + GTK_DEST_DEFAULT_HIGHLIGHT | + GTK_DEST_DEFAULT_MOTION | + GTK_DEST_DEFAULT_DROP, + targets, 1, + GDK_ACTION_COPY); + + g_signal_connect (sample, + "drag_end", + G_CALLBACK (color_sample_drag_end), + colorsel); + } + + g_signal_connect (sample, + "drag_data_get", + G_CALLBACK (color_sample_drag_handle), + colorsel); + g_signal_connect (sample, + "drag_data_received", + G_CALLBACK (color_sample_drop_handle), + colorsel); + +} + + +static void +color_sample_new (GtkColorSelection *colorsel) +{ + ColorSelectionPrivate *priv; + + priv = colorsel->private_data; + + priv->sample_area = gtk_hbox_new (FALSE, 0); + priv->old_sample = gtk_drawing_area_new (); + priv->cur_sample = gtk_drawing_area_new (); + + /* We need enter/leave to do tooltips */ + gtk_widget_add_events (priv->old_sample, + GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); + gtk_widget_add_events (priv->cur_sample, + GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); + + gtk_box_pack_start (GTK_BOX (priv->sample_area), priv->old_sample, + TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (priv->sample_area), priv->cur_sample, + TRUE, TRUE, 0); + + g_signal_connect (priv->old_sample, "expose_event", + G_CALLBACK (color_old_sample_expose), + colorsel); + g_signal_connect (priv->cur_sample, "expose_event", + G_CALLBACK (color_cur_sample_expose), + colorsel); + + color_sample_setup_dnd (colorsel, priv->old_sample); + color_sample_setup_dnd (colorsel, priv->cur_sample); + + gtk_tooltips_set_tip (priv->tooltips, + priv->old_sample, + _("The previously-selected color, for comparison to the color you're selecting now. You can drag this color to a palette entry, or select this color as current by dragging it to the other color swatch alongside."), NULL); + + + gtk_tooltips_set_tip (priv->tooltips, + priv->cur_sample, + _("The color you've chosen. You can drag this color to a palette entry to save it for use in the future."), NULL); + + gtk_widget_show_all (priv->sample_area); +} + + +/* + * + * The palette area code + * + */ +#define CUSTOM_PALETTE_ENTRY_WIDTH 20 +#define CUSTOM_PALETTE_ENTRY_HEIGHT 20 + +static void +palette_get_color (GtkWidget *drawing_area, gdouble *color) +{ + gdouble *color_val; + + g_return_if_fail (color != NULL); + + color_val = g_object_get_data (G_OBJECT (drawing_area), "color_val"); + if (color_val == NULL) + { + /* Default to white for no good reason */ + color[0] = 1.0; + color[1] = 1.0; + color[2] = 1.0; + color[3] = 1.0; + return; + } + + color[0] = color_val[0]; + color[1] = color_val[1]; + color[2] = color_val[2]; + color[3] = 1.0; +} + +#define INTENSITY(r, g, b) ((r) * 0.30 + (g) * 0.59 + (b) * 0.11) +static void +palette_paint (GtkWidget *drawing_area, + GdkRectangle *area, + gpointer data) +{ + if (drawing_area->window == NULL) + return; + + gdk_draw_rectangle (drawing_area->window, + drawing_area->style->bg_gc[GTK_STATE_NORMAL], + TRUE, + area->x, area->y, area->width, area->height); + + if (GTK_WIDGET_HAS_FOCUS (drawing_area)) + { + gint focus_width; + GdkGC *gc = get_focus_gc (drawing_area, &focus_width); + gdk_draw_rectangle (drawing_area->window, + gc, FALSE, focus_width / 2, focus_width / 2, + drawing_area->allocation.width - focus_width, + drawing_area->allocation.height - focus_width); + g_object_unref (gc); + } +} + +static GdkGC * +get_focus_gc (GtkWidget *drawing_area, + gint *focus_width) +{ + GdkGC *gc = gdk_gc_new (drawing_area->window); + gdouble color[4]; + gint8 *dash_list; + + gtk_widget_style_get (drawing_area, + "focus-line-width", focus_width, + "focus-line-pattern", (gchar *)&dash_list, + NULL); + + palette_get_color (drawing_area, color); + + if (INTENSITY (color[0], color[1], color[2]) > 0.5) + gdk_gc_copy (gc, drawing_area->style->black_gc); + else + gdk_gc_copy (gc, drawing_area->style->white_gc); + + gdk_gc_set_line_attributes (gc, *focus_width, + dash_list[0] ? GDK_LINE_ON_OFF_DASH : GDK_LINE_SOLID, + GDK_CAP_BUTT, GDK_JOIN_MITER); + + if (dash_list[0]) + gdk_gc_set_dashes (gc, 0, dash_list, strlen ((char *)dash_list)); + + g_free (dash_list); + + return gc; +} + +static void +palette_drag_begin (GtkWidget *widget, + GdkDragContext *context, + gpointer data) +{ + gdouble colors[4]; + + palette_get_color (widget, colors); + set_color_icon (context, colors); +} + +static void +palette_drag_handle (GtkWidget *widget, + GdkDragContext *context, + GtkSelectionData *selection_data, + guint info, + guint time, + gpointer data) +{ + guint16 vals[4]; + gdouble colsrc[4]; + + palette_get_color (widget, colsrc); + + vals[0] = colsrc[COLORSEL_RED] * 0xffff; + vals[1] = colsrc[COLORSEL_GREEN] * 0xffff; + vals[2] = colsrc[COLORSEL_BLUE] * 0xffff; + vals[3] = 0xffff; + + gtk_selection_data_set (selection_data, + gdk_atom_intern ("application/x-color", FALSE), + 16, (guchar *)vals, 8); +} + +static void +palette_drag_end (GtkWidget *widget, + GdkDragContext *context, + gpointer data) +{ + g_object_set_data (G_OBJECT (widget), "gtk-color-selection-drag-window", NULL); +} + +static GdkColor * +get_current_colors (GtkColorSelection *colorsel) +{ + GtkSettings *settings; + GdkColor *colors = NULL; + gint n_colors = 0; + gchar *palette; + + settings = gtk_widget_get_settings (GTK_WIDGET (colorsel)); + g_object_get (settings, + "gtk-color-palette", &palette, + NULL); + + if (!gtk_color_selection_palette_from_string (palette, &colors, &n_colors)) + { + gtk_color_selection_palette_from_string (default_colors, &colors, &n_colors); + } + else + { + /* If there are less colors provided than the number of slots in the + * color selection, we fill in the rest from the defaults. + */ + if (n_colors < (GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT)) + { + GdkColor *tmp_colors = colors; + gint tmp_n_colors = n_colors; + + gtk_color_selection_palette_from_string (default_colors, &colors, &n_colors); + memcpy (colors, tmp_colors, sizeof (GdkColor) * tmp_n_colors); + + g_free (tmp_colors); + } + } + + g_assert (n_colors >= GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT); + g_free (palette); + + return colors; +} + +/* Changes the model color */ +static void +palette_change_color (GtkWidget *drawing_area, + GtkColorSelection *colorsel, + gdouble *color) +{ + gint x, y; + ColorSelectionPrivate *priv; + GdkColor gdk_color; + GdkColor *current_colors; + GdkScreen *screen; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + g_return_if_fail (GTK_IS_DRAWING_AREA (drawing_area)); + + priv = colorsel->private_data; + + gdk_color.red = UNSCALE (color[0]); + gdk_color.green = UNSCALE (color[1]); + gdk_color.blue = UNSCALE (color[2]); + + x = 0; + y = 0; /* Quiet GCC */ + while (x < GTK_CUSTOM_PALETTE_WIDTH) + { + y = 0; + while (y < GTK_CUSTOM_PALETTE_HEIGHT) + { + if (priv->custom_palette[x][y] == drawing_area) + goto out; + + ++y; + } + + ++x; + } + + out: + + g_assert (x < GTK_CUSTOM_PALETTE_WIDTH || y < GTK_CUSTOM_PALETTE_HEIGHT); + + current_colors = get_current_colors (colorsel); + current_colors[y * GTK_CUSTOM_PALETTE_WIDTH + x] = gdk_color; + + screen = gtk_widget_get_screen (GTK_WIDGET (colorsel)); + if (change_palette_hook != default_change_palette_func) + (* change_palette_hook) (screen, current_colors, + GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT); + else if (noscreen_change_palette_hook != default_noscreen_change_palette_func) + { + if (screen != gdk_screen_get_default ()) + g_warning ("gtk_color_selection_set_change_palette_hook used by widget is not on the default screen."); + (* noscreen_change_palette_hook) (current_colors, + GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT); + } + else + (* change_palette_hook) (screen, current_colors, + GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT); + + g_free (current_colors); +} + +/* Changes the view color */ +static void +palette_set_color (GtkWidget *drawing_area, + GtkColorSelection *colorsel, + gdouble *color) +{ + gdouble *new_color = g_new (double, 4); + GdkColor gdk_color; + + gdk_color.red = UNSCALE (color[0]); + gdk_color.green = UNSCALE (color[1]); + gdk_color.blue = UNSCALE (color[2]); + + gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &gdk_color); + + if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (drawing_area), "color_set")) == 0) + { + static const GtkTargetEntry targets[] = { + { "application/x-color", 0 } + }; + gtk_drag_source_set (drawing_area, + GDK_BUTTON1_MASK | GDK_BUTTON3_MASK, + targets, 1, + GDK_ACTION_COPY | GDK_ACTION_MOVE); + + g_signal_connect (drawing_area, + "drag_begin", + G_CALLBACK (palette_drag_begin), + colorsel); + g_signal_connect (drawing_area, + "drag_data_get", + G_CALLBACK (palette_drag_handle), + colorsel); + + g_object_set_data (G_OBJECT (drawing_area), "color_set", + GINT_TO_POINTER (1)); + } + + new_color[0] = color[0]; + new_color[1] = color[1]; + new_color[2] = color[2]; + new_color[3] = 1.0; + + g_object_set_data_full (G_OBJECT (drawing_area), "color_val", new_color, (GDestroyNotify)g_free); +} + +static gboolean +palette_expose (GtkWidget *drawing_area, + GdkEventExpose *event, + gpointer data) +{ + if (drawing_area->window == NULL) + return FALSE; + + palette_paint (drawing_area, &(event->area), data); + + return FALSE; +} + +static void +popup_position_func (GtkMenu *menu, + gint *x, + gint *y, + gboolean *push_in, + gpointer user_data) +{ + GtkWidget *widget; + GtkRequisition req; + gint root_x, root_y; + GdkScreen *screen; + + widget = GTK_WIDGET (user_data); + + g_return_if_fail (GTK_WIDGET_REALIZED (widget)); + + gdk_window_get_origin (widget->window, &root_x, &root_y); + + gtk_widget_size_request (GTK_WIDGET (menu), &req); + + /* Put corner of menu centered on color cell */ + *x = root_x + widget->allocation.width / 2; + *y = root_y + widget->allocation.height / 2; + + /* Ensure sanity */ + screen = gtk_widget_get_screen (widget); + *x = CLAMP (*x, 0, MAX (0, gdk_screen_get_width (screen) - req.width)); + *y = CLAMP (*y, 0, MAX (0, gdk_screen_get_height (screen) - req.height)); +} + +static void +save_color_selected (GtkWidget *menuitem, + gpointer data) +{ + GtkColorSelection *colorsel; + GtkWidget *drawing_area; + ColorSelectionPrivate *priv; + + drawing_area = GTK_WIDGET (data); + + colorsel = GTK_COLOR_SELECTION (g_object_get_data (G_OBJECT (drawing_area), + "gtk-color-sel")); + + priv = colorsel->private_data; + + palette_change_color (drawing_area, colorsel, priv->color); +} + +static void +do_popup (GtkColorSelection *colorsel, + GtkWidget *drawing_area, + guint32 timestamp) +{ + GtkWidget *menu; + GtkWidget *mi; + + g_object_set_data (G_OBJECT (drawing_area), + "gtk-color-sel", + colorsel); + + menu = gtk_menu_new (); + + mi = gtk_menu_item_new_with_mnemonic (_("_Save color here")); + + g_signal_connect (mi, "activate", + G_CALLBACK (save_color_selected), + drawing_area); + + gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi); + + gtk_widget_show_all (mi); + + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, + popup_position_func, drawing_area, + 3, timestamp); +} + + +static gboolean +palette_enter (GtkWidget *drawing_area, + GdkEventCrossing *event, + gpointer data) +{ + g_object_set_data (G_OBJECT (drawing_area), + "gtk-colorsel-have-pointer", + GUINT_TO_POINTER (TRUE)); + + return FALSE; +} + +static gboolean +palette_leave (GtkWidget *drawing_area, + GdkEventCrossing *event, + gpointer data) +{ + g_object_set_data (G_OBJECT (drawing_area), + "gtk-colorsel-have-pointer", + NULL); + + return FALSE; +} + +static gboolean +palette_press (GtkWidget *drawing_area, + GdkEventButton *event, + gpointer data) +{ + GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data); + + gtk_widget_grab_focus (drawing_area); + + if (event->button == 3 && + event->type == GDK_BUTTON_PRESS) + { + do_popup (colorsel, drawing_area, event->time); + return TRUE; + } + + return FALSE; +} + +static gboolean +palette_release (GtkWidget *drawing_area, + GdkEventButton *event, + gpointer data) +{ + GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data); + + gtk_widget_grab_focus (drawing_area); + + if (event->button == 1 && + g_object_get_data (G_OBJECT (drawing_area), + "gtk-colorsel-have-pointer") != NULL) + { + if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (drawing_area), "color_set")) != 0) + { + gdouble color[4]; + palette_get_color (drawing_area, color); + set_color_internal (colorsel, color); + } + } + + return FALSE; +} + +static void +palette_drop_handle (GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *selection_data, + guint info, + guint time, + gpointer data) +{ + GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data); + guint16 *vals; + gdouble color[4]; + + if (selection_data->length < 0) + return; + + /* We accept drops with the wrong format, since the KDE color + * chooser incorrectly drops application/x-color with format 8. + */ + if (selection_data->length != 8) + { + g_warning ("Received invalid color data\n"); + return; + } + + vals = (guint16 *)selection_data->data; + + color[0] = (gdouble)vals[0] / 0xffff; + color[1] = (gdouble)vals[1] / 0xffff; + color[2] = (gdouble)vals[2] / 0xffff; + color[3] = (gdouble)vals[3] / 0xffff; + palette_change_color (widget, colorsel, color); + set_color_internal (colorsel, color); +} + +static gint +palette_activate (GtkWidget *widget, + GdkEventKey *event, + gpointer data) +{ + /* should have a drawing area subclass with an activate signal */ + if ((event->keyval == GDK_space) || + (event->keyval == GDK_Return) || + (event->keyval == GDK_KP_Enter) || + (event->keyval == GDK_KP_Space)) + { + if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "color_set")) != 0) + { + gdouble color[4]; + palette_get_color (widget, color); + set_color_internal (GTK_COLOR_SELECTION (data), color); + } + return TRUE; + } + + return FALSE; +} + +static gboolean +palette_popup (GtkWidget *widget, + gpointer data) +{ + GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data); + + do_popup (colorsel, widget, GDK_CURRENT_TIME); + return TRUE; +} + + +static GtkWidget* +palette_new (GtkColorSelection *colorsel) +{ + GtkWidget *retval; + ColorSelectionPrivate *priv; + + static const GtkTargetEntry targets[] = { + { "application/x-color", 0 } + }; + + priv = colorsel->private_data; + + retval = gtk_drawing_area_new (); + + GTK_WIDGET_SET_FLAGS (retval, GTK_CAN_FOCUS); + + g_object_set_data (G_OBJECT (retval), "color_set", GINT_TO_POINTER (0)); + gtk_widget_set_events (retval, GDK_BUTTON_PRESS_MASK + | GDK_BUTTON_RELEASE_MASK + | GDK_EXPOSURE_MASK + | GDK_ENTER_NOTIFY_MASK + | GDK_LEAVE_NOTIFY_MASK); + + g_signal_connect (retval, "expose_event", + G_CALLBACK (palette_expose), colorsel); + g_signal_connect (retval, "button_press_event", + G_CALLBACK (palette_press), colorsel); + g_signal_connect (retval, "button_release_event", + G_CALLBACK (palette_release), colorsel); + g_signal_connect (retval, "enter_notify_event", + G_CALLBACK (palette_enter), colorsel); + g_signal_connect (retval, "leave_notify_event", + G_CALLBACK (palette_leave), colorsel); + g_signal_connect (retval, "key_press_event", + G_CALLBACK (palette_activate), colorsel); + g_signal_connect (retval, "popup_menu", + G_CALLBACK (palette_popup), colorsel); + + gtk_drag_dest_set (retval, + GTK_DEST_DEFAULT_HIGHLIGHT | + GTK_DEST_DEFAULT_MOTION | + GTK_DEST_DEFAULT_DROP, + targets, 1, + GDK_ACTION_COPY); + + g_signal_connect (retval, "drag_end", + G_CALLBACK (palette_drag_end), NULL); + g_signal_connect (retval, "drag_data_received", + G_CALLBACK (palette_drop_handle), colorsel); + + gtk_tooltips_set_tip (priv->tooltips, + retval, + _("Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select \"Save color here.\""), + NULL); + return retval; +} + + +/* + * + * The actual GtkColorSelection widget + * + */ + +static GdkCursor * +make_picker_cursor (GdkScreen *screen) +{ + GdkCursor *cursor; + GdkColor bg = { 0, 0xffff, 0xffff, 0xffff }; + GdkColor fg = { 0, 0x0000, 0x0000, 0x0000 }; + GdkWindow *window = gdk_screen_get_root_window (screen); + + GdkPixmap *pixmap = + gdk_bitmap_create_from_data (window, (gchar *) dropper_bits, + DROPPER_WIDTH, DROPPER_HEIGHT); + + GdkPixmap *mask = + gdk_bitmap_create_from_data (window, (gchar *) dropper_mask, + DROPPER_WIDTH, DROPPER_HEIGHT); + + cursor = gdk_cursor_new_from_pixmap (pixmap, mask, &fg, &bg, + DROPPER_X_HOT, DROPPER_Y_HOT); + + g_object_unref (pixmap); + g_object_unref (mask); + + return cursor; +} + +static void +grab_color_at_mouse (GdkScreen *screen, + gint x_root, + gint y_root, + gpointer data) +{ + GdkImage *image; + guint32 pixel; + GtkColorSelection *colorsel = data; + ColorSelectionPrivate *priv; + GdkColor color; + GdkColormap *colormap = gdk_screen_get_system_colormap (screen); + GdkWindow *root_window = gdk_screen_get_root_window (screen); + + priv = colorsel->private_data; + + image = gdk_drawable_get_image (root_window, x_root, y_root, 1, 1); + pixel = gdk_image_get_pixel (image, 0, 0); + g_object_unref (image); + + gdk_colormap_query_color (colormap, pixel, &color); + + priv->color[COLORSEL_RED] = SCALE (color.red); + priv->color[COLORSEL_GREEN] = SCALE (color.green); + priv->color[COLORSEL_BLUE] = SCALE (color.blue); + + gtk_rgb_to_hsv (priv->color[COLORSEL_RED], + priv->color[COLORSEL_GREEN], + priv->color[COLORSEL_BLUE], + &priv->color[COLORSEL_HUE], + &priv->color[COLORSEL_SATURATION], + &priv->color[COLORSEL_VALUE]); + + update_color (colorsel); +} + +static void +shutdown_eyedropper (GtkWidget *widget) +{ + GtkColorSelection *colorsel; + ColorSelectionPrivate *priv; + GdkDisplay *display = gtk_widget_get_display (widget); + guint32 time = gtk_get_current_event_time (); + + colorsel = GTK_COLOR_SELECTION (widget); + priv = colorsel->private_data; + + gdk_display_keyboard_ungrab (display, time); + gdk_display_pointer_ungrab (display, time); + gtk_grab_remove (priv->dropper_grab_widget); +} + +static void +mouse_motion (GtkWidget *invisible, + GdkEventMotion *event, + gpointer data) +{ + grab_color_at_mouse (gdk_event_get_screen ((GdkEvent *)event), + event->x_root, event->y_root, data); +} + +static gboolean +mouse_release (GtkWidget *invisible, + GdkEventButton *event, + gpointer data) +{ + GtkColorSelection *colorsel = data; + ColorSelectionPrivate *priv; + priv = colorsel->private_data; + + if (event->button != 1) + return FALSE; + + grab_color_at_mouse (gdk_event_get_screen ((GdkEvent *)event), + event->x_root, event->y_root, data); + + shutdown_eyedropper (GTK_WIDGET (data)); + + g_signal_handlers_disconnect_by_func (invisible, + mouse_motion, + data); + g_signal_handlers_disconnect_by_func (invisible, + mouse_release, + data); + + return TRUE; +} + +/* Helper Functions */ + +static gboolean mouse_press (GtkWidget *invisible, + GdkEventButton *event, + gpointer data); + +#define BIG_STEP 20 + +static gboolean +key_press (GtkWidget *invisible, + GdkEventKey *event, + gpointer data) +{ + GdkDisplay *display = gtk_widget_get_display (invisible); + guint state = event->state & gtk_accelerator_get_default_mod_mask (); + gint x, y; + gint dx, dy; + + dx = 0; + dy = 0; + + switch (event->keyval) + { + case GDK_space: + case GDK_Return: + case GDK_KP_Enter: + case GDK_KP_Space: + gdk_display_get_pointer (display, + NULL, &x, &y, NULL); + grab_color_at_mouse (gdk_event_get_screen ((GdkEvent *)event), + x, y, data); + /* fall through */ + + case GDK_Escape: + shutdown_eyedropper (data); + + g_signal_handlers_disconnect_by_func (invisible, + mouse_press, + data); + g_signal_handlers_disconnect_by_func (invisible, + key_press, + data); + + return TRUE; + +#if defined GDK_WINDOWING_X11 || defined GDK_WINDOWING_WIN32 + case GDK_Up: + case GDK_KP_Up: + dy = state == GDK_MOD1_MASK ? -BIG_STEP : -1; + break; + + case GDK_Down: + case GDK_KP_Down: + dy = state == GDK_MOD1_MASK ? BIG_STEP : 1; + break; + + case GDK_Left: + case GDK_KP_Left: + dx = state == GDK_MOD1_MASK ? -BIG_STEP : -1; + break; + + case GDK_Right: + case GDK_KP_Right: + dx = state == GDK_MOD1_MASK ? BIG_STEP : 1; + break; +#endif + + default: + return FALSE; + } + +#ifdef GDK_WINDOWING_X11 + XWarpPointer (gdk_x11_display_get_xdisplay (display), + None, None, 0, 0, 0, 0, dx, dy); +#elif defined GDK_WINDOWING_WIN32 + { + POINT point; + if (GetCursorPos (&point)) + SetCursorPos (point.x + dx, point.y + dy); + } +#endif + + return TRUE; + +} + +static gboolean +mouse_press (GtkWidget *invisible, + GdkEventButton *event, + gpointer data) +{ + GtkColorSelection *colorsel = data; + ColorSelectionPrivate *priv; + priv = colorsel->private_data; + + if (event->type == GDK_BUTTON_PRESS && + event->button == 1) + { + g_signal_connect (invisible, "motion_notify_event", + G_CALLBACK (mouse_motion), + data); + g_signal_connect (invisible, "button_release_event", + G_CALLBACK (mouse_release), + data); + g_signal_handlers_disconnect_by_func (invisible, + mouse_press, + data); + g_signal_handlers_disconnect_by_func (invisible, + key_press, + data); + return TRUE; + } + + return FALSE; +} + +/* when the button is clicked */ +static void +get_screen_color (GtkWidget *button) +{ + GtkColorSelection *colorsel = g_object_get_data (G_OBJECT (button), "COLORSEL"); + ColorSelectionPrivate *priv = colorsel->private_data; + GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (button)); + GdkCursor *picker_cursor; + GdkGrabStatus grab_status; + + if (priv->dropper_grab_widget == NULL) + { + priv->dropper_grab_widget = gtk_invisible_new_for_screen (screen); + + gtk_widget_add_events (priv->dropper_grab_widget, + GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK); + + gtk_widget_show (priv->dropper_grab_widget); + } + + if (gdk_keyboard_grab (priv->dropper_grab_widget->window, + FALSE, + gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS) + return; + + picker_cursor = make_picker_cursor (screen); + grab_status = gdk_pointer_grab (priv->dropper_grab_widget->window, + FALSE, + GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK, + NULL, + picker_cursor, + gtk_get_current_event_time ()); + gdk_cursor_unref (picker_cursor); + + if (grab_status != GDK_GRAB_SUCCESS) + { + gdk_display_keyboard_ungrab (gtk_widget_get_display (button), GDK_CURRENT_TIME); + return; + } + + gtk_grab_add (priv->dropper_grab_widget); + + g_signal_connect (priv->dropper_grab_widget, "button_press_event", + G_CALLBACK (mouse_press), colorsel); + g_signal_connect (priv->dropper_grab_widget, "key_press_event", + G_CALLBACK (key_press), colorsel); +} + +static void +hex_changed (GtkWidget *hex_entry, + gpointer data) +{ + GtkColorSelection *colorsel; + ColorSelectionPrivate *priv; + GdkColor color; + gchar *text; + + colorsel = GTK_COLOR_SELECTION (data); + priv = colorsel->private_data; + + if (priv->changing) + return; + + text = gtk_editable_get_chars (GTK_EDITABLE (priv->hex_entry), 0, -1); + if (gdk_color_parse (text, &color)) + { + priv->color[COLORSEL_RED] = CLAMP (color.red/65535.0, 0.0, 1.0); + priv->color[COLORSEL_GREEN] = CLAMP (color.green/65535.0, 0.0, 1.0); + priv->color[COLORSEL_BLUE] = CLAMP (color.blue/65535.0, 0.0, 1.0); + gtk_rgb_to_hsv (priv->color[COLORSEL_RED], + priv->color[COLORSEL_GREEN], + priv->color[COLORSEL_BLUE], + &priv->color[COLORSEL_HUE], + &priv->color[COLORSEL_SATURATION], + &priv->color[COLORSEL_VALUE]); + update_color (colorsel); + } + g_free (text); +} + +static gboolean +hex_focus_out (GtkWidget *hex_entry, + GdkEventFocus *event, + gpointer data) +{ + hex_changed (hex_entry, data); + + return FALSE; +} + +static void +hsv_changed (GtkWidget *hsv, + gpointer data) +{ + GtkColorSelection *colorsel; + ColorSelectionPrivate *priv; + + colorsel = GTK_COLOR_SELECTION (data); + priv = colorsel->private_data; + + if (priv->changing) + return; + + gtk_hsv_get_color (GTK_HSV (hsv), + &priv->color[COLORSEL_HUE], + &priv->color[COLORSEL_SATURATION], + &priv->color[COLORSEL_VALUE]); + gtk_hsv_to_rgb (priv->color[COLORSEL_HUE], + priv->color[COLORSEL_SATURATION], + priv->color[COLORSEL_VALUE], + &priv->color[COLORSEL_RED], + &priv->color[COLORSEL_GREEN], + &priv->color[COLORSEL_BLUE]); + update_color (colorsel); +} + +static void +adjustment_changed (GtkAdjustment *adjustment, + gpointer data) +{ + GtkColorSelection *colorsel; + ColorSelectionPrivate *priv; + + colorsel = GTK_COLOR_SELECTION (g_object_get_data (G_OBJECT (adjustment), "COLORSEL")); + priv = colorsel->private_data; + + if (priv->changing) + return; + + switch (GPOINTER_TO_INT (data)) + { + case COLORSEL_SATURATION: + case COLORSEL_VALUE: + priv->color[GPOINTER_TO_INT (data)] = adjustment->value / 100; + gtk_hsv_to_rgb (priv->color[COLORSEL_HUE], + priv->color[COLORSEL_SATURATION], + priv->color[COLORSEL_VALUE], + &priv->color[COLORSEL_RED], + &priv->color[COLORSEL_GREEN], + &priv->color[COLORSEL_BLUE]); + break; + case COLORSEL_HUE: + priv->color[GPOINTER_TO_INT (data)] = adjustment->value / 360; + gtk_hsv_to_rgb (priv->color[COLORSEL_HUE], + priv->color[COLORSEL_SATURATION], + priv->color[COLORSEL_VALUE], + &priv->color[COLORSEL_RED], + &priv->color[COLORSEL_GREEN], + &priv->color[COLORSEL_BLUE]); + break; + case COLORSEL_RED: + case COLORSEL_GREEN: + case COLORSEL_BLUE: + priv->color[GPOINTER_TO_INT (data)] = adjustment->value / 255; + + gtk_rgb_to_hsv (priv->color[COLORSEL_RED], + priv->color[COLORSEL_GREEN], + priv->color[COLORSEL_BLUE], + &priv->color[COLORSEL_HUE], + &priv->color[COLORSEL_SATURATION], + &priv->color[COLORSEL_VALUE]); + break; + default: + priv->color[GPOINTER_TO_INT (data)] = adjustment->value / 255; + break; + } + update_color (colorsel); +} + +static void +opacity_entry_changed (GtkWidget *opacity_entry, + gpointer data) +{ + GtkColorSelection *colorsel; + ColorSelectionPrivate *priv; + GtkAdjustment *adj; + gchar *text; + + colorsel = GTK_COLOR_SELECTION (data); + priv = colorsel->private_data; + + if (priv->changing) + return; + + text = gtk_editable_get_chars (GTK_EDITABLE (priv->opacity_entry), 0, -1); + adj = gtk_range_get_adjustment (GTK_RANGE (priv->opacity_slider)); + gtk_adjustment_set_value (adj, g_strtod (text, NULL)); + + update_color (colorsel); + + g_free (text); +} + +static void +make_label_spinbutton (GtkColorSelection *colorsel, + GtkWidget **spinbutton, + gchar *text, + GtkWidget *table, + gint i, + gint j, + gint channel_type, + const gchar *tooltip) +{ + GtkWidget *hbox; + GtkWidget *label; + GtkAdjustment *adjust; + ColorSelectionPrivate *priv = colorsel->private_data; + + if (channel_type == COLORSEL_HUE) + { + adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 360.0, 1.0, 1.0, 1.0)); + } + else if (channel_type == COLORSEL_SATURATION || + channel_type == COLORSEL_VALUE) + { + adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 100.0, 1.0, 1.0, 1.0)); + } + else + { + adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 255.0, 1.0, 1.0, 1.0)); + } + g_object_set_data (G_OBJECT (adjust), "COLORSEL", colorsel); + *spinbutton = gtk_spin_button_new (adjust, 10.0, 0); + gtk_widget_set_size_request(*spinbutton,42,-1); + + gtk_tooltips_set_tip (priv->tooltips, *spinbutton, tooltip, NULL); + + g_signal_connect (adjust, "value_changed", + G_CALLBACK (adjustment_changed), + GINT_TO_POINTER (channel_type)); + label = gtk_label_new_with_mnemonic (text); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), *spinbutton); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + + // create hbox with 2 placeholders and add the hbox to one table element + hbox = gtk_hbox_new(FALSE,1); + gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(label),FALSE,FALSE,0); + gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(*spinbutton),TRUE,TRUE,0); + gtk_table_attach(GTK_TABLE (table),hbox,i, i+1, j, j+1,GTK_FILL,GTK_FILL,0,0); +} + +static void +make_palette_frame (GtkColorSelection *colorsel, + GtkWidget *table, + gint i, + gint j) +{ + GtkWidget *frame; + ColorSelectionPrivate *priv; + + priv = colorsel->private_data; + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); + priv->custom_palette[i][j] = palette_new (colorsel); + gtk_widget_set_size_request (priv->custom_palette[i][j], CUSTOM_PALETTE_ENTRY_WIDTH, 0.75*CUSTOM_PALETTE_ENTRY_HEIGHT); + gtk_container_add (GTK_CONTAINER (frame), priv->custom_palette[i][j]); + gtk_table_attach_defaults(GTK_TABLE (table), frame, i, i+1, j, j+1); +} + +/* Set the palette entry [x][y] to be the currently selected one. */ +static void +set_selected_palette (GtkColorSelection *colorsel, int x, int y) +{ + ColorSelectionPrivate *priv = colorsel->private_data; + + gtk_widget_grab_focus (priv->custom_palette[x][y]); +} + +static double +scale_round (double val, double factor) +{ + val = floor (val * factor + 0.5); + val = MAX (val, 0); + val = MIN (val, factor); + return val; +} + +static void +update_color (GtkColorSelection *colorsel) +{ + ColorSelectionPrivate *priv = colorsel->private_data; + gchar entryval[12]; + gchar opacity_text[32]; + gchar *ptr; + + priv->changing = TRUE; + color_sample_draw_samples (colorsel); + + gtk_hsv_set_color (GTK_HSV (priv->triangle_colorsel), + priv->color[COLORSEL_HUE], + priv->color[COLORSEL_SATURATION], + priv->color[COLORSEL_VALUE]); + gtk_adjustment_set_value (gtk_spin_button_get_adjustment + (GTK_SPIN_BUTTON (priv->hue_spinbutton)), + scale_round (priv->color[COLORSEL_HUE], 360)); + gtk_adjustment_set_value (gtk_spin_button_get_adjustment + (GTK_SPIN_BUTTON (priv->sat_spinbutton)), + scale_round (priv->color[COLORSEL_SATURATION], 100)); + gtk_adjustment_set_value (gtk_spin_button_get_adjustment + (GTK_SPIN_BUTTON (priv->val_spinbutton)), + scale_round (priv->color[COLORSEL_VALUE], 100)); + gtk_adjustment_set_value (gtk_spin_button_get_adjustment + (GTK_SPIN_BUTTON (priv->red_spinbutton)), + scale_round (priv->color[COLORSEL_RED], 255)); + gtk_adjustment_set_value (gtk_spin_button_get_adjustment + (GTK_SPIN_BUTTON (priv->green_spinbutton)), + scale_round (priv->color[COLORSEL_GREEN], 255)); + gtk_adjustment_set_value (gtk_spin_button_get_adjustment + (GTK_SPIN_BUTTON (priv->blue_spinbutton)), + scale_round (priv->color[COLORSEL_BLUE], 255)); + gtk_adjustment_set_value (gtk_range_get_adjustment + (GTK_RANGE (priv->opacity_slider)), + scale_round (priv->color[COLORSEL_OPACITY], 255)); + + g_snprintf (opacity_text, 32, "%.0f", scale_round (priv->color[COLORSEL_OPACITY], 255)); + gtk_entry_set_text (GTK_ENTRY (priv->opacity_entry), opacity_text); + + g_snprintf (entryval, 11, "#%2X%2X%2X", + (guint) (scale_round (priv->color[COLORSEL_RED], 255)), + (guint) (scale_round (priv->color[COLORSEL_GREEN], 255)), + (guint) (scale_round (priv->color[COLORSEL_BLUE], 255))); + + for (ptr = entryval; *ptr; ptr++) + if (*ptr == ' ') + *ptr = '0'; + gtk_entry_set_text (GTK_ENTRY (priv->hex_entry), entryval); + priv->changing = FALSE; + + g_object_ref (colorsel); + + g_signal_emit (colorsel, color_selection_signals[COLOR_CHANGED], 0); + + g_object_freeze_notify (G_OBJECT (colorsel)); + g_object_notify (G_OBJECT (colorsel), "current_color"); + g_object_notify (G_OBJECT (colorsel), "current_alpha"); + g_object_thaw_notify (G_OBJECT (colorsel)); + + g_object_unref (colorsel); +} + +static void +update_palette (GtkColorSelection *colorsel) +{ + GdkColor *current_colors; + gint i, j; + + current_colors = get_current_colors (colorsel); + + for (i = 0; i < GTK_CUSTOM_PALETTE_HEIGHT; i++) + { + for (j = 0; j < GTK_CUSTOM_PALETTE_WIDTH; j++) + { + gint index; + + index = i * GTK_CUSTOM_PALETTE_WIDTH + j; + + gtk_color_selection_set_palette_color (colorsel, + index, + ¤t_colors[index]); + } + } + + g_free (current_colors); +} + +static void +palette_change_notify_instance (GObject *object, + GParamSpec *pspec, + gpointer data) +{ + update_palette (GTK_COLOR_SELECTION (data)); +} + +static void +default_noscreen_change_palette_func (const GdkColor *colors, + gint n_colors) +{ + default_change_palette_func (gdk_screen_get_default (), colors, n_colors); +} + +static void +default_change_palette_func (GdkScreen *screen, + const GdkColor *colors, + gint n_colors) +{ + gchar *str; + + str = gtk_color_selection_palette_to_string (colors, n_colors); + + gtk_settings_set_string_property (gtk_settings_get_for_screen (screen), + "gtk-color-palette", + str, + "gtk_color_selection_palette_to_string"); + + g_free (str); +} + +GType +gtk_color_selection_get_type (void) +{ + static GType color_selection_type = 0; + + if (!color_selection_type) + { + static const GTypeInfo color_selection_info = + { + sizeof (GtkColorSelectionClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_color_selection_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkColorSelection), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_color_selection_init, + }; + + color_selection_type = + g_type_register_static (GTK_TYPE_VBOX, "GtkColorSelection", + &color_selection_info, 0); + } + + return color_selection_type; +} + +static void +gtk_color_selection_class_init (GtkColorSelectionClass *klass) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + + gobject_class = G_OBJECT_CLASS (klass); + object_class = GTK_OBJECT_CLASS (klass); + widget_class = GTK_WIDGET_CLASS (klass); + + parent_class = g_type_class_peek_parent (klass); + + object_class->destroy = gtk_color_selection_destroy; + gobject_class->finalize = gtk_color_selection_finalize; + + gobject_class->set_property = gtk_color_selection_set_property; + gobject_class->get_property = gtk_color_selection_get_property; + + widget_class->realize = gtk_color_selection_realize; + widget_class->unrealize = gtk_color_selection_unrealize; + widget_class->show_all = gtk_color_selection_show_all; + + g_object_class_install_property (gobject_class, + PROP_HAS_OPACITY_CONTROL, + g_param_spec_boolean ("has_opacity_control", + P_("Has Opacity Control"), + P_("Whether the color selector should allow setting opacity"), + FALSE, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (gobject_class, + PROP_HAS_PALETTE, + g_param_spec_boolean ("has_palette", + P_("Has palette"), + P_("Whether a palette should be used"), + FALSE, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (gobject_class, + PROP_CURRENT_COLOR, + g_param_spec_boxed ("current_color", + P_("Current Color"), + P_("The current color"), + GDK_TYPE_COLOR, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (gobject_class, + PROP_CURRENT_ALPHA, + g_param_spec_uint ("current_alpha", + P_("Current Alpha"), + P_("The current opacity value (0 fully transparent, 65535 fully opaque)"), + 0, 65535, 65535, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + + color_selection_signals[COLOR_CHANGED] = + g_signal_new ("color_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (GtkColorSelectionClass, color_changed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + gtk_settings_install_property (g_param_spec_string ("gtk-color-palette", + P_("Custom palette"), + P_("Palette to use in the color selector"), + default_colors, + G_PARAM_READWRITE)); +} + +/* widget functions */ + +static void +gtk_color_selection_init (GtkColorSelection *colorsel) +{ + GtkWidget *top_hbox; + GtkWidget *top_right_vbox; + GtkWidget *palette_table, *table, *label, *hbox, *frame, *vbox, *button; + GtkWidget *opacity_hbox; + GtkWidget *colorhexname_hbox; + GtkAdjustment *adjust; + GtkWidget *picker_image; + gint i, j; + ColorSelectionPrivate *priv; + AtkObject *atk_obj; + + gtk_widget_push_composite_child (); + + priv = colorsel->private_data = g_new0 (ColorSelectionPrivate, 1); + priv->changing = FALSE; + priv->default_set = FALSE; + priv->default_alpha_set = FALSE; + + priv->tooltips = gtk_tooltips_new (); + g_object_ref (priv->tooltips); + gtk_object_sink (GTK_OBJECT (priv->tooltips)); + + gtk_box_set_spacing (GTK_BOX (colorsel), 4); + top_hbox = gtk_vbox_new (FALSE, 8); + gtk_box_pack_start (GTK_BOX (colorsel), top_hbox, FALSE, FALSE, 0); + + vbox = gtk_vbox_new (FALSE, 4); + priv->triangle_colorsel = gtk_hsv_new (); + g_signal_connect (priv->triangle_colorsel, "changed", + G_CALLBACK (hsv_changed), colorsel); + gtk_hsv_set_metrics (GTK_HSV (priv->triangle_colorsel), 145, 15); + gtk_box_pack_start (GTK_BOX (top_hbox), vbox, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), priv->triangle_colorsel, FALSE, FALSE, 0); + gtk_tooltips_set_tip (priv->tooltips, priv->triangle_colorsel, + _("Select the color you want from the outer ring. Select the darkness or lightness of that color using the inner triangle."), NULL); + + hbox = gtk_hbox_new (FALSE, 4); + gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + + frame = gtk_frame_new (NULL); + gtk_widget_set_size_request (frame, -1, 30); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); + color_sample_new (colorsel); + gtk_container_add (GTK_CONTAINER (frame), priv->sample_area); + gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); + + button = gtk_button_new (); + + gtk_widget_set_events (button, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); + g_object_set_data (G_OBJECT (button), "COLORSEL", colorsel); + g_signal_connect (button, "clicked", + G_CALLBACK (get_screen_color), NULL); + picker_image = gtk_image_new_from_stock (GTK_STOCK_COLOR_PICKER, GTK_ICON_SIZE_BUTTON); + gtk_container_add (GTK_CONTAINER (button), picker_image); + gtk_widget_show (GTK_WIDGET (picker_image)); + gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); + + gtk_tooltips_set_tip (priv->tooltips, + button, + _("Click the eyedropper, then click a color anywhere on your screen to select that color."), NULL); + + top_right_vbox = gtk_vbox_new (FALSE, 4); + gtk_box_pack_start (GTK_BOX (top_hbox), top_right_vbox, TRUE, TRUE, 0); + + table = gtk_table_new (6, 4, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), 4); + gtk_table_set_col_spacings (GTK_TABLE (table), 4); + gtk_box_pack_start (GTK_BOX (top_right_vbox), table, TRUE, TRUE, 0); + + make_label_spinbutton (colorsel, &priv->hue_spinbutton, _("H:"), table, 0, 0, COLORSEL_HUE, + _("Position on the color wheel.")); + gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (priv->hue_spinbutton), TRUE); + make_label_spinbutton (colorsel, &priv->sat_spinbutton, _("S:"), table, 1, 0, COLORSEL_SATURATION, + _("\"Deepness\" of the color.")); + make_label_spinbutton (colorsel, &priv->val_spinbutton, _("V:"), table, 2, 0, COLORSEL_VALUE, + _("Brightness of the color.")); + make_label_spinbutton (colorsel, &priv->red_spinbutton, _("R:"), table, 0, 1, COLORSEL_RED, + _("Amount of red light in the color.")); + make_label_spinbutton (colorsel, &priv->green_spinbutton, _("G:"), table, 1, 1, COLORSEL_GREEN, + _("Amount of green light in the color.")); + make_label_spinbutton (colorsel, &priv->blue_spinbutton, _("B:"), table, 2, 1, COLORSEL_BLUE, + _("Amount of blue light in the color.")); + + + opacity_hbox = gtk_hbox_new(FALSE,1); + priv->opacity_label = gtk_label_new_with_mnemonic (_("Opacity:")); + gtk_misc_set_alignment (GTK_MISC (priv->opacity_label), 1.0, 0.5); + gtk_box_pack_start(GTK_BOX(opacity_hbox),GTK_WIDGET(priv->opacity_label),FALSE,FALSE,0); + adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 255.0, 1.0, 1.0, 0.0)); + g_object_set_data (G_OBJECT (adjust), "COLORSEL", colorsel); + priv->opacity_slider = gtk_hscale_new (adjust); + gtk_tooltips_set_tip (priv->tooltips, + priv->opacity_slider, + _("Transparency of the color."), NULL); + gtk_label_set_mnemonic_widget (GTK_LABEL (priv->opacity_label), + priv->opacity_slider); + gtk_scale_set_draw_value (GTK_SCALE (priv->opacity_slider), FALSE); + g_signal_connect (adjust, "value_changed", + G_CALLBACK (adjustment_changed), + GINT_TO_POINTER (COLORSEL_OPACITY)); + gtk_box_pack_start(GTK_BOX(opacity_hbox),GTK_WIDGET(priv->opacity_slider),TRUE,TRUE,0); + priv->opacity_entry = gtk_entry_new (); + gtk_tooltips_set_tip (priv->tooltips, + priv->opacity_entry, + _("Transparency of the color."), NULL); + gtk_widget_set_size_request (priv->opacity_entry, 40, -1); + + g_signal_connect (priv->opacity_entry, "activate", + G_CALLBACK (opacity_entry_changed), colorsel); + gtk_box_pack_start(GTK_BOX(opacity_hbox),GTK_WIDGET(priv->opacity_entry),FALSE,FALSE,0); + gtk_table_attach(GTK_TABLE (table),opacity_hbox,0, 3, 2, 3,GTK_FILL,GTK_FILL,0,0); + + + colorhexname_hbox = gtk_hbox_new(FALSE,1); + label = gtk_label_new_with_mnemonic (_("Color Name:")); + gtk_box_pack_start(GTK_BOX(colorhexname_hbox),GTK_WIDGET(label),FALSE,FALSE,0); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + priv->hex_entry = gtk_entry_new (); + gtk_entry_set_text( GTK_ENTRY(priv->hex_entry),"#000000"); + + gtk_label_set_mnemonic_widget (GTK_LABEL (label), priv->hex_entry); + + g_signal_connect (priv->hex_entry, "activate", + G_CALLBACK (hex_changed), colorsel); + + g_signal_connect (priv->hex_entry, "focus_out_event", + G_CALLBACK (hex_focus_out), colorsel); + + gtk_tooltips_set_tip (priv->tooltips, + priv->hex_entry, + _("You can enter an HTML-style hexadecimal color value, or simply a color name such as 'orange' in this entry."), NULL); + + gtk_entry_set_width_chars (GTK_ENTRY (priv->hex_entry), 7); + gtk_table_set_col_spacing (GTK_TABLE (table), 3, 15); + gtk_box_pack_start(GTK_BOX(colorhexname_hbox),GTK_WIDGET(priv->hex_entry),TRUE,TRUE,0); + gtk_table_attach(GTK_TABLE (table),colorhexname_hbox,0, 3, 3, 4,GTK_FILL,GTK_FILL,0,0); + + palette_table = gtk_table_new (GTK_CUSTOM_PALETTE_HEIGHT, GTK_CUSTOM_PALETTE_WIDTH, TRUE); + gtk_table_set_row_spacings (GTK_TABLE (palette_table), 0); + gtk_table_set_col_spacings (GTK_TABLE (palette_table), 0); + for (i = 0; i < GTK_CUSTOM_PALETTE_WIDTH; i++) + { + for (j = 0; j < GTK_CUSTOM_PALETTE_HEIGHT; j++) + { + make_palette_frame (colorsel, palette_table, i, j); + } + } + set_selected_palette (colorsel, 0, 0); + priv->palette_frame = gtk_frame_new (NULL); + label = gtk_label_new_with_mnemonic (_("Palette")); + gtk_frame_set_label_widget (GTK_FRAME (priv->palette_frame), label); + + gtk_label_set_mnemonic_widget (GTK_LABEL (label), + priv->custom_palette[0][0]); + vbox = gtk_vbox_new (FALSE, 4); + gtk_container_add (GTK_CONTAINER (priv->palette_frame), vbox); + gtk_box_pack_start (GTK_BOX (vbox), palette_table, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 4); + gtk_table_attach(GTK_TABLE (table),priv->palette_frame,0, 3, 4, 5,GTK_FILL,GTK_FILL,0,0); + + gtk_widget_show_all (top_hbox); + + gtk_widget_hide( priv->palette_frame ); + gtk_widget_hide( colorhexname_hbox); + gtk_widget_hide( palette_table ); + gtk_widget_hide( vbox ); + gtk_widget_hide( label ); + gtk_widget_hide( opacity_hbox ); + gtk_widget_hide( top_right_vbox ); + gtk_widget_hide( hbox ); + if (priv->has_opacity == FALSE) + { + gtk_widget_hide (priv->opacity_label); + gtk_widget_hide (priv->opacity_slider); + gtk_widget_hide (priv->opacity_entry); + } + + if (priv->has_palette == FALSE) + { + gtk_widget_hide (priv->palette_frame); + } + + atk_obj = gtk_widget_get_accessible (priv->triangle_colorsel); + if (GTK_IS_ACCESSIBLE (atk_obj)) + { + atk_object_set_name (atk_obj, _("Color Wheel")); + atk_object_set_role (gtk_widget_get_accessible (GTK_WIDGET (colorsel)), ATK_ROLE_COLOR_CHOOSER); + make_all_relations (atk_obj, priv); + } + + gtk_widget_pop_composite_child (); +} + +static void +gtk_color_selection_destroy (GtkObject *object) +{ + GtkColorSelection *cselection = GTK_COLOR_SELECTION (object); + ColorSelectionPrivate *priv = cselection->private_data; + + if (priv->dropper_grab_widget) + { + gtk_widget_destroy (priv->dropper_grab_widget); + priv->dropper_grab_widget = NULL; + } + + if (priv->tooltips) + { + g_object_unref (priv->tooltips); + priv->tooltips = NULL; + } + + GTK_OBJECT_CLASS (parent_class)->destroy (object); +} + +static void +gtk_color_selection_finalize (GObject *object) +{ + GtkColorSelection *cselection = GTK_COLOR_SELECTION (object); + + if (cselection->private_data) + { + g_free (cselection->private_data); + cselection->private_data = NULL; + } + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gtk_color_selection_realize (GtkWidget *widget) +{ + GtkColorSelection *colorsel = GTK_COLOR_SELECTION (widget); + ColorSelectionPrivate *priv = colorsel->private_data; + GtkSettings *settings = gtk_widget_get_settings (widget); + + priv->settings_connection = g_signal_connect (settings, + "notify::gtk-color-palette", + G_CALLBACK (palette_change_notify_instance), + widget); + update_palette (colorsel); + + GTK_WIDGET_CLASS (parent_class)->realize (widget); +} + +static void +gtk_color_selection_unrealize (GtkWidget *widget) +{ + GtkColorSelection *colorsel = GTK_COLOR_SELECTION (widget); + ColorSelectionPrivate *priv = colorsel->private_data; + GtkSettings *settings = gtk_widget_get_settings (widget); + + g_signal_handler_disconnect (settings, priv->settings_connection); + + GTK_WIDGET_CLASS (parent_class)->unrealize (widget); +} + +/* We override show-all since we have internal widgets that + * shouldn't be shown when you call show_all(), like the + * palette and opacity sliders. + */ +static void +gtk_color_selection_show_all (GtkWidget *widget) +{ + gtk_widget_show (widget); +} + +/** + * gtk_color_selection_new: + * + * Creates a new GtkColorSelection. + * + * Return value: a new #GtkColorSelection + **/ +GtkWidget * +gtk_color_selection_new (void) +{ + GtkColorSelection *colorsel; + ColorSelectionPrivate *priv; + gdouble color[4]; + color[0] = 1.0; + color[1] = 1.0; + color[2] = 1.0; + color[3] = 1.0; + + colorsel = g_object_new (GTK_TYPE_COLOR_SELECTION, NULL); + priv = colorsel->private_data; + set_color_internal (colorsel, color); + gtk_color_selection_set_has_opacity_control (colorsel, TRUE); + + /* We want to make sure that default_set is FALSE */ + /* This way the user can still set it */ + priv->default_set = FALSE; + priv->default_alpha_set = FALSE; + priv->has_palette = 0; + priv->has_opacity=0; + return GTK_WIDGET (colorsel); +} + + +void +gtk_color_selection_set_update_policy (GtkColorSelection *colorsel, + GtkUpdateType policy) +{ + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); +} + +/** + * gtk_color_selection_get_has_opacity_control: + * @colorsel: a #GtkColorSelection. + * + * Determines whether the colorsel has an opacity control. + * + * Return value: %TRUE if the @colorsel has an opacity control. %FALSE if it does't. + **/ +gboolean +gtk_color_selection_get_has_opacity_control (GtkColorSelection *colorsel) +{ + ColorSelectionPrivate *priv; + + g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE); + + priv = colorsel->private_data; + + return priv->has_opacity; +} + +/** + * gtk_color_selection_set_has_opacity_control: + * @colorsel: a #GtkColorSelection. + * @has_opacity: %TRUE if @colorsel can set the opacity, %FALSE otherwise. + * + * Sets the @colorsel to use or not use opacity. + * + **/ +void +gtk_color_selection_set_has_opacity_control (GtkColorSelection *colorsel, + gboolean has_opacity) +{ + ColorSelectionPrivate *priv; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + + priv = colorsel->private_data; + has_opacity = has_opacity != FALSE; + + if (priv->has_opacity != has_opacity) + { + priv->has_opacity = has_opacity; + if (has_opacity) + { + gtk_widget_show (priv->opacity_slider); + gtk_widget_show (priv->opacity_label); + gtk_widget_show (priv->opacity_entry); + } + else + { + gtk_widget_hide (priv->opacity_slider); + gtk_widget_hide (priv->opacity_label); + gtk_widget_hide (priv->opacity_entry); + } + color_sample_draw_samples (colorsel); + + g_object_notify (G_OBJECT (colorsel), "has_opacity_control"); + } +} + +/** + * gtk_color_selection_get_has_palette: + * @colorsel: a #GtkColorSelection. + * + * Determines whether the color selector has a color palette. + * + * Return value: %TRUE if the selector has a palette. %FALSE if it hasn't. + **/ +gboolean +gtk_color_selection_get_has_palette (GtkColorSelection *colorsel) +{ + ColorSelectionPrivate *priv; + + g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE); + + priv = colorsel->private_data; + + return priv->has_palette; +} + +/** + * gtk_color_selection_set_has_palette: + * @colorsel: a #GtkColorSelection. + * @has_palette: %TRUE if palette is to be visible, %FALSE otherwise. + * + * Shows and hides the palette based upon the value of @has_palette. + * + **/ +void +gtk_color_selection_set_has_palette (GtkColorSelection *colorsel, + gboolean has_palette) +{ + ColorSelectionPrivate *priv; + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + + priv = colorsel->private_data; + has_palette = has_palette != FALSE; + + if (priv->has_palette != has_palette) + { + priv->has_palette = has_palette; + if (has_palette) + gtk_widget_show (priv->palette_frame); + else + gtk_widget_hide (priv->palette_frame); + + g_object_notify (G_OBJECT (colorsel), "has_palette"); + } +} + +/** + * gtk_color_selection_set_current_color: + * @colorsel: a #GtkColorSelection. + * @color: A #GdkColor to set the current color with. + * + * Sets the current color to be @color. The first time this is called, it will + * also set the original color to be @color too. + **/ +void +gtk_color_selection_set_current_color (GtkColorSelection *colorsel, + const GdkColor *color) +{ + ColorSelectionPrivate *priv; + gint i; + gboolean previous_changed; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + g_return_if_fail (color != NULL); + + priv = colorsel->private_data; + priv->changing = TRUE; + priv->color[COLORSEL_RED] = SCALE (color->red); + priv->color[COLORSEL_GREEN] = SCALE (color->green); + priv->color[COLORSEL_BLUE] = SCALE (color->blue); + gtk_rgb_to_hsv (priv->color[COLORSEL_RED], + priv->color[COLORSEL_GREEN], + priv->color[COLORSEL_BLUE], + &priv->color[COLORSEL_HUE], + &priv->color[COLORSEL_SATURATION], + &priv->color[COLORSEL_VALUE]); + if (priv->default_set == FALSE) + { + previous_changed = TRUE; + for (i = 0; i < COLORSEL_NUM_CHANNELS; i++) + priv->old_color[i] = priv->color[i]; + } + priv->default_set = TRUE; + update_color (colorsel); +} + +/** + * gtk_color_selection_set_current_alpha: + * @colorsel: a #GtkColorSelection. + * @alpha: an integer between 0 and 65535. + * + * Sets the current opacity to be @alpha. The first time this is called, it will + * also set the original opacity to be @alpha too. + **/ +void +gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel, + guint16 alpha) +{ + ColorSelectionPrivate *priv; + gint i; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + + priv = colorsel->private_data; + priv->changing = TRUE; + priv->color[COLORSEL_OPACITY] = SCALE (alpha); + if (priv->default_alpha_set == FALSE) + { + for (i = 0; i < COLORSEL_NUM_CHANNELS; i++) + priv->old_color[i] = priv->color[i]; + } + priv->default_alpha_set = TRUE; + update_color (colorsel); +} + +/** + * gtk_color_selection_set_color: + * @colorsel: a #GtkColorSelection. + * @color: an array of 4 doubles specifying the red, green, blue and opacity + * to set the current color to. + * + * Sets the current color to be @color. The first time this is called, it will + * also set the original color to be @color too. + * + * Deprecated: Use gtk_color_selection_set_current_color() instead. + **/ +void +gtk_color_selection_set_color (GtkColorSelection *colorsel, + gdouble *color) +{ + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + + set_color_internal (colorsel, color); +} + +/** + * gtk_color_selection_get_current_color: + * @colorsel: a #GtkColorSelection. + * @color: a #GdkColor to fill in with the current color. + * + * Sets @color to be the current color in the GtkColorSelection widget. + **/ +void +gtk_color_selection_get_current_color (GtkColorSelection *colorsel, + GdkColor *color) +{ + ColorSelectionPrivate *priv; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + g_return_if_fail (color != NULL); + + priv = colorsel->private_data; + color->red = UNSCALE (priv->color[COLORSEL_RED]); + color->green = UNSCALE (priv->color[COLORSEL_GREEN]); + color->blue = UNSCALE (priv->color[COLORSEL_BLUE]); +} + +/** + * gtk_color_selection_get_current_alpha: + * @colorsel: a #GtkColorSelection. + * + * Returns the current alpha value. + * + * Return value: an integer between 0 and 65535. + **/ +guint16 +gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel) +{ + ColorSelectionPrivate *priv; + + g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), 0); + + priv = colorsel->private_data; + return priv->has_opacity ? UNSCALE (priv->color[COLORSEL_OPACITY]) : 65535; +} + +/** + * gtk_color_selection_get_color: + * @colorsel: a #GtkColorSelection. + * @color: an array of 4 #gdouble to fill in with the current color. + * + * Sets @color to be the current color in the GtkColorSelection widget. + * + * This function is deprecated, use gtk_color_selection_get_current_color() instead. + **/ +void +gtk_color_selection_get_color (GtkColorSelection *colorsel, + gdouble *color) +{ + ColorSelectionPrivate *priv; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + + priv = colorsel->private_data; + color[0] = priv->color[COLORSEL_RED]; + color[1] = priv->color[COLORSEL_GREEN]; + color[2] = priv->color[COLORSEL_BLUE]; + color[3] = priv->has_opacity ? priv->color[COLORSEL_OPACITY] : 65535; +} + +/** + * gtk_color_selection_set_previous_color: + * @colorsel: a #GtkColorSelection. + * @color: a #GdkColor to set the previous color with. + * + * Sets the 'previous' color to be @color. This function should be called with + * some hesitations, as it might seem confusing to have that color change. + * Calling gtk_color_selection_set_current_color() will also set this color the first + * time it is called. + **/ +void +gtk_color_selection_set_previous_color (GtkColorSelection *colorsel, + const GdkColor *color) +{ + ColorSelectionPrivate *priv; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + g_return_if_fail (color != NULL); + + priv = colorsel->private_data; + priv->changing = TRUE; + priv->old_color[COLORSEL_RED] = SCALE (color->red); + priv->old_color[COLORSEL_GREEN] = SCALE (color->green); + priv->old_color[COLORSEL_BLUE] = SCALE (color->blue); + gtk_rgb_to_hsv (priv->old_color[COLORSEL_RED], + priv->old_color[COLORSEL_GREEN], + priv->old_color[COLORSEL_BLUE], + &priv->old_color[COLORSEL_HUE], + &priv->old_color[COLORSEL_SATURATION], + &priv->old_color[COLORSEL_VALUE]); + color_sample_draw_samples (colorsel); + priv->default_set = TRUE; + priv->changing = FALSE; +} + +/** + * gtk_color_selection_set_previous_alpha: + * @colorsel: a #GtkColorSelection. + * @alpha: an integer between 0 and 65535. + * + * Sets the 'previous' alpha to be @alpha. This function should be called with + * some hesitations, as it might seem confusing to have that alpha change. + **/ +void +gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel, + guint16 alpha) +{ + ColorSelectionPrivate *priv; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + + priv = colorsel->private_data; + priv->changing = TRUE; + priv->old_color[COLORSEL_OPACITY] = SCALE (alpha); + color_sample_draw_samples (colorsel); + priv->default_alpha_set = TRUE; + priv->changing = FALSE; +} + + +/** + * gtk_color_selection_get_previous_color: + * @colorsel: a #GtkColorSelection. + * @color: a #GdkColor to fill in with the original color value. + * + * Fills @color in with the original color value. + **/ +void +gtk_color_selection_get_previous_color (GtkColorSelection *colorsel, + GdkColor *color) +{ + ColorSelectionPrivate *priv; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + g_return_if_fail (color != NULL); + + priv = colorsel->private_data; + color->red = UNSCALE (priv->old_color[COLORSEL_RED]); + color->green = UNSCALE (priv->old_color[COLORSEL_GREEN]); + color->blue = UNSCALE (priv->old_color[COLORSEL_BLUE]); +} + +/** + * gtk_color_selection_get_previous_alpha: + * @colorsel: a #GtkColorSelection. + * + * Returns the previous alpha value. + * + * Return value: an integer between 0 and 65535. + **/ +guint16 +gtk_color_selection_get_previous_alpha (GtkColorSelection *colorsel) +{ + ColorSelectionPrivate *priv; + + g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), 0); + + priv = colorsel->private_data; + return priv->has_opacity ? UNSCALE (priv->old_color[COLORSEL_OPACITY]) : 65535; +} + +/** + * gtk_color_selection_set_palette_color: + * @colorsel: a #GtkColorSelection. + * @index: the color index of the palette. + * @color: A #GdkColor to set the palette with. + * + * Sets the palette located at @index to have @color as its color. + * + **/ +static void +gtk_color_selection_set_palette_color (GtkColorSelection *colorsel, + gint index, + GdkColor *color) +{ + ColorSelectionPrivate *priv; + gint x, y; + gdouble col[3]; + + g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); + g_return_if_fail (index >= 0 && index < GTK_CUSTOM_PALETTE_WIDTH*GTK_CUSTOM_PALETTE_HEIGHT); + + x = index % GTK_CUSTOM_PALETTE_WIDTH; + y = index / GTK_CUSTOM_PALETTE_WIDTH; + + priv = colorsel->private_data; + col[0] = SCALE (color->red); + col[1] = SCALE (color->green); + col[2] = SCALE (color->blue); + + palette_set_color (priv->custom_palette[x][y], colorsel, col); +} + +/** + * gtk_color_selection_is_adjusting: + * @colorsel: a #GtkColorSelection. + * + * Gets the current state of the @colorsel. + * + * Return value: %TRUE if the user is currently dragging a color around, and %FALSE + * if the selection has stopped. + **/ +gboolean +gtk_color_selection_is_adjusting (GtkColorSelection *colorsel) +{ + ColorSelectionPrivate *priv; + + g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE); + + priv = colorsel->private_data; + + return (gtk_hsv_is_adjusting (GTK_HSV (priv->triangle_colorsel))); +} + +static void +gtk_color_selection_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + GtkColorSelection *colorsel = GTK_COLOR_SELECTION (object); + + switch (prop_id) + { + case PROP_HAS_OPACITY_CONTROL: + gtk_color_selection_set_has_opacity_control (colorsel, + g_value_get_boolean (value)); + break; + case PROP_HAS_PALETTE: + gtk_color_selection_set_has_palette (colorsel, + g_value_get_boolean (value)); + break; + case PROP_CURRENT_COLOR: + gtk_color_selection_set_current_color (colorsel, g_value_get_boxed (value)); + break; + case PROP_CURRENT_ALPHA: + gtk_color_selection_set_current_alpha (colorsel, g_value_get_uint (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } + +} + +static void +gtk_color_selection_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + GtkColorSelection *colorsel = GTK_COLOR_SELECTION (object); + GdkColor color; + + switch (prop_id) + { + case PROP_HAS_OPACITY_CONTROL: + g_value_set_boolean (value, gtk_color_selection_get_has_opacity_control (colorsel)); + break; + case PROP_HAS_PALETTE: + g_value_set_boolean (value, gtk_color_selection_get_has_palette (colorsel)); + break; + case PROP_CURRENT_COLOR: + gtk_color_selection_get_current_color (colorsel, &color); + g_value_set_boxed (value, &color); + break; + case PROP_CURRENT_ALPHA: + g_value_set_uint (value, gtk_color_selection_get_current_alpha (colorsel)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + + +/** + * gtk_color_selection_palette_from_string: + * @str: a string encoding a color palette. + * @colors: return location for allocated array of #GdkColor. + * @n_colors: return location for length of array. + * + * Parses a color palette string; the string is a colon-separated + * list of color names readable by gdk_color_parse(). + * + * Return value: %TRUE if a palette was successfully parsed. + **/ +gboolean +gtk_color_selection_palette_from_string (const gchar *str, + GdkColor **colors, + gint *n_colors) +{ + GdkColor *retval; + gint count; + gchar *p; + gchar *start; + gchar *copy; + + count = 0; + retval = NULL; + copy = g_strdup (str); + + start = copy; + p = copy; + while (TRUE) + { + if (*p == ':' || *p == '\0') + { + gboolean done = TRUE; + + if (start == p) + { + goto failed; /* empty entry */ + } + + if (*p) + { + *p = '\0'; + done = FALSE; + } + + retval = g_renew (GdkColor, retval, count + 1); + if (!gdk_color_parse (start, retval + count)) + { + goto failed; + } + + ++count; + + if (done) + break; + else + start = p + 1; + } + + ++p; + } + + g_free (copy); + + if (colors) + *colors = retval; + else + g_free (retval); + + if (n_colors) + *n_colors = count; + + return TRUE; + + failed: + g_free (copy); + g_free (retval); + + if (colors) + *colors = NULL; + if (n_colors) + *n_colors = 0; + + return FALSE; +} + +/** + * gtk_color_selection_palette_to_string: + * @colors: an array of colors. + * @n_colors: length of the array. + * + * Encodes a palette as a string, useful for persistent storage. + * + * Return value: allocated string encoding the palette. + **/ +gchar* +gtk_color_selection_palette_to_string (const GdkColor *colors, + gint n_colors) +{ + gint i; + gchar **strs = NULL; + gchar *retval; + + if (n_colors == 0) + return g_strdup (""); + + strs = g_new0 (gchar*, n_colors + 1); + + i = 0; + while (i < n_colors) + { + gchar *ptr; + + strs[i] = + g_strdup_printf ("#%2X%2X%2X", + colors[i].red / 256, + colors[i].green / 256, + colors[i].blue / 256); + + for (ptr = strs[i]; *ptr; ptr++) + if (*ptr == ' ') + *ptr = '0'; + + ++i; + } + + retval = g_strjoinv (":", strs); + + g_strfreev (strs); + + return retval; +} + +/** + * gtk_color_selection_set_change_palette_hook: + * @func: a function to call when the custom palette needs saving. + * + * Installs a global function to be called whenever the user tries to + * modify the palette in a color selection. This function should save + * the new palette contents, and update the GtkSettings property + * "gtk-color-palette" so all GtkColorSelection widgets will be modified. + * + * Return value: the previous change palette hook (that was replaced). + * + * Deprecated: This function is deprecated in favor of + * gtk_color_selection_set_change_palette_with_screen_hook(), and does + * not work in multihead environments. + * + **/ +GtkColorSelectionChangePaletteFunc +gtk_color_selection_set_change_palette_hook (GtkColorSelectionChangePaletteFunc func) +{ + GtkColorSelectionChangePaletteFunc old; + + old = noscreen_change_palette_hook; + + noscreen_change_palette_hook = func; + + return old; +} + +/** + * gtk_color_selection_set_change_palette_with_screen_hook: + * @func: a function to call when the custom palette needs saving. + * + * Installs a global function to be called whenever the user tries to + * modify the palette in a color selection. This function should save + * the new palette contents, and update the GtkSettings property + * "gtk-color-palette" so all GtkColorSelection widgets will be modified. + * + * Return value: the previous change palette hook (that was replaced). + * + * Since: 2.2 + **/ +GtkColorSelectionChangePaletteWithScreenFunc +gtk_color_selection_set_change_palette_with_screen_hook (GtkColorSelectionChangePaletteWithScreenFunc func) +{ + GtkColorSelectionChangePaletteWithScreenFunc old; + + old = change_palette_hook; + + change_palette_hook = func; + + return old; +} + +static void +make_control_relations (AtkObject *atk_obj, + GtkWidget *widget) +{ + AtkObject *obj; + + obj = gtk_widget_get_accessible (widget); + atk_object_add_relationship (atk_obj, ATK_RELATION_CONTROLLED_BY, obj); + atk_object_add_relationship (obj, ATK_RELATION_CONTROLLER_FOR, atk_obj); +} + +static void +make_all_relations (AtkObject *atk_obj, + ColorSelectionPrivate *priv) +{ + make_control_relations (atk_obj, priv->hue_spinbutton); + make_control_relations (atk_obj, priv->sat_spinbutton); + make_control_relations (atk_obj, priv->val_spinbutton); + make_control_relations (atk_obj, priv->red_spinbutton); + make_control_relations (atk_obj, priv->green_spinbutton); + make_control_relations (atk_obj, priv->blue_spinbutton); +} diff --git a/veejay-client/src/widgets/gtkcolorsel.h b/veejay-client/src/widgets/gtkcolorsel.h new file mode 100644 index 00000000..bb46c826 --- /dev/null +++ b/veejay-client/src/widgets/gtkcolorsel.h @@ -0,0 +1,141 @@ +/* GTK - The GIMP Toolkit + * Copyright (C) 2000 Red Hat, Inc. + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ +#ifndef __GTK_COLOR_SELECTION_H__ +#define __GTK_COLOR_SELECTION_H__ + +// bad hack ... this parts are taken from different Header-Files of the gtk-sources +// that are normally needed for compiling the colorselection dialog +#define P_(String) (String) +#define _ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define GTK_TYPE_COLOR_SELECTION (gtk_color_selection_get_type ()) +#define GTK_COLOR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelection)) +#define GTK_COLOR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass)) +#define GTK_IS_COLOR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COLOR_SELECTION)) +#define GTK_IS_COLOR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION)) +#define GTK_COLOR_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass)) + + +typedef struct _GtkColorSelection GtkColorSelection; +typedef struct _GtkColorSelectionClass GtkColorSelectionClass; + + +typedef void (* GtkColorSelectionChangePaletteFunc) (const GdkColor *colors, + gint n_colors); +typedef void (* GtkColorSelectionChangePaletteWithScreenFunc) (GdkScreen *screen, + const GdkColor *colors, + gint n_colors); + +struct _GtkColorSelection +{ + GtkVBox parent_instance; + + /* < private_data > */ + gpointer private_data; +}; + +struct _GtkColorSelectionClass +{ + GtkVBoxClass parent_class; + + void (*color_changed) (GtkColorSelection *color_selection); + + /* Padding for future expansion */ + void (*_gtk_reserved1) (void); + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); +}; + + +/* ColorSelection */ + +GType gtk_color_selection_get_type (void) G_GNUC_CONST; +GtkWidget *gtk_color_selection_new (void); +gboolean gtk_color_selection_get_has_opacity_control (GtkColorSelection *colorsel); +void gtk_color_selection_set_has_opacity_control (GtkColorSelection *colorsel, + gboolean has_opacity); +gboolean gtk_color_selection_get_has_palette (GtkColorSelection *colorsel); +void gtk_color_selection_set_has_palette (GtkColorSelection *colorsel, + gboolean has_palette); + + +void gtk_color_selection_set_current_color (GtkColorSelection *colorsel, + const GdkColor *color); +void gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel, + guint16 alpha); +void gtk_color_selection_get_current_color (GtkColorSelection *colorsel, + GdkColor *color); +guint16 gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel); +void gtk_color_selection_set_previous_color (GtkColorSelection *colorsel, + const GdkColor *color); +void gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel, + guint16 alpha); +void gtk_color_selection_get_previous_color (GtkColorSelection *colorsel, + GdkColor *color); +guint16 gtk_color_selection_get_previous_alpha (GtkColorSelection *colorsel); + +gboolean gtk_color_selection_is_adjusting (GtkColorSelection *colorsel); + +gboolean gtk_color_selection_palette_from_string (const gchar *str, + GdkColor **colors, + gint *n_colors); +gchar* gtk_color_selection_palette_to_string (const GdkColor *colors, + gint n_colors); + +#ifndef GTK_DISABLE_DEPRECATED +#ifndef GDK_MULTIHEAD_SAFE +GtkColorSelectionChangePaletteFunc gtk_color_selection_set_change_palette_hook (GtkColorSelectionChangePaletteFunc func); +#endif +#endif + +GtkColorSelectionChangePaletteWithScreenFunc gtk_color_selection_set_change_palette_with_screen_hook (GtkColorSelectionChangePaletteWithScreenFunc func); + +#ifndef GTK_DISABLE_DEPRECATED +/* Deprecated calls: */ +void gtk_color_selection_set_color (GtkColorSelection *colorsel, + gdouble *color); +void gtk_color_selection_get_color (GtkColorSelection *colorsel, + gdouble *color); +void gtk_color_selection_set_update_policy (GtkColorSelection *colorsel, + GtkUpdateType policy); +#endif /* GTK_DISABLE_DEPRECATED */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* __GTK_COLOR_SELECTION_H__ */ diff --git a/veejay-client/src/widgets/gtkhsv.c b/veejay-client/src/widgets/gtkhsv.c new file mode 100644 index 00000000..cb73ecd8 --- /dev/null +++ b/veejay-client/src/widgets/gtkhsv.c @@ -0,0 +1,1779 @@ +/* HSV color selector for GTK+ + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Simon Budig (original code) + * Federico Mena-Quintero (cleanup for GTK+) + * Jonathan Blandford (cleanup for GTK+) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include "gtkalias.h" +#include "gtkhsv.h" +#include "gdk/gdkkeysyms.h" +#include "gtkbindings.h" +#include "gtkcontainer.h" +#include "gtkmarshalers.h" + +/* + * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +/* Default width/height */ +#define DEFAULT_SIZE 100 + +/* Default ring width */ +#define DEFAULT_RING_WIDTH 10 + + +/* Dragging modes */ +typedef enum { + DRAG_NONE, + DRAG_H, + DRAG_SV +} DragMode; + +/* Private part of the GtkHSV structure */ +typedef struct { + /* Color value */ + double h; + double s; + double v; + + /* Size and ring width */ + int size; + int ring_width; + + /* Window for capturing events */ + GdkWindow *window; + + /* GC for drawing */ + GdkGC *gc; + + /* Dragging mode */ + DragMode mode; + + guint focus_on_ring : 1; + +} HSVPrivate; + + + +/* Signal IDs */ + +enum { + CHANGED, + MOVE, + LAST_SIGNAL +}; + +static void gtk_hsv_class_init (GtkHSVClass *class); +static void gtk_hsv_init (GtkHSV *hsv); +static void gtk_hsv_destroy (GtkObject *object); +static void gtk_hsv_map (GtkWidget *widget); +static void gtk_hsv_unmap (GtkWidget *widget); +static void gtk_hsv_realize (GtkWidget *widget); +static void gtk_hsv_unrealize (GtkWidget *widget); +static void gtk_hsv_size_request (GtkWidget *widget, + GtkRequisition *requisition); +static void gtk_hsv_size_allocate (GtkWidget *widget, + GtkAllocation *allocation); +static gint gtk_hsv_button_press (GtkWidget *widget, + GdkEventButton *event); +static gint gtk_hsv_button_release (GtkWidget *widget, + GdkEventButton *event); +static gint gtk_hsv_motion (GtkWidget *widget, + GdkEventMotion *event); +static gint gtk_hsv_expose (GtkWidget *widget, + GdkEventExpose *event); +static gboolean gtk_hsv_focus (GtkWidget *widget, + GtkDirectionType direction); +static void gtk_hsv_move (GtkHSV *hsv, + GtkDirectionType dir); + +static guint hsv_signals[LAST_SIGNAL]; +static GtkWidgetClass *parent_class; + + +/** + * gtk_hsv_get_type: + * @void: + * + * Registers the &GtkHSV class if necessary, and returns the type ID associated + * to it. + * + * Return value: The type ID of the &GtkHSV class. + **/ +GType +gtk_hsv_get_type (void) +{ + static GType hsv_type = 0; + + if (!hsv_type) { + static const GTypeInfo hsv_info = { + sizeof (GtkHSVClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_hsv_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkHSV), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_hsv_init, + }; + + hsv_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkHSV", + &hsv_info, 0); + } + + return hsv_type; +} + +/* Class initialization function for the HSV color selector */ +static void +gtk_hsv_class_init (GtkHSVClass *class) +{ + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + GtkHSVClass *hsv_class; + GtkBindingSet *binding_set; + + object_class = (GtkObjectClass *) class; + widget_class = (GtkWidgetClass *) class; + hsv_class = GTK_HSV_CLASS (class); + + parent_class = g_type_class_peek_parent (class); + + object_class->destroy = gtk_hsv_destroy; + + widget_class->map = gtk_hsv_map; + widget_class->unmap = gtk_hsv_unmap; + widget_class->realize = gtk_hsv_realize; + widget_class->unrealize = gtk_hsv_unrealize; + widget_class->size_request = gtk_hsv_size_request; + widget_class->size_allocate = gtk_hsv_size_allocate; + widget_class->button_press_event = gtk_hsv_button_press; + widget_class->button_release_event = gtk_hsv_button_release; + widget_class->motion_notify_event = gtk_hsv_motion; + widget_class->expose_event = gtk_hsv_expose; + widget_class->focus = gtk_hsv_focus; + + hsv_class->move = gtk_hsv_move; + + hsv_signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (GtkHSVClass, changed), + NULL, NULL, + _gtk_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + hsv_signals[MOVE] = + g_signal_new ("move", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (GtkHSVClass, move), + NULL, NULL, + _gtk_marshal_VOID__ENUM, + G_TYPE_NONE, 1, + GTK_TYPE_DIRECTION_TYPE); + + binding_set = gtk_binding_set_by_class (class); + + gtk_binding_entry_add_signal (binding_set, GDK_Up, 0, + "move", 1, + G_TYPE_ENUM, GTK_DIR_UP); + gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0, + "move", 1, + G_TYPE_ENUM, GTK_DIR_UP); + + gtk_binding_entry_add_signal (binding_set, GDK_Down, 0, + "move", 1, + G_TYPE_ENUM, GTK_DIR_DOWN); + gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0, + "move", 1, + G_TYPE_ENUM, GTK_DIR_DOWN); + + + gtk_binding_entry_add_signal (binding_set, GDK_Right, 0, + "move", 1, + G_TYPE_ENUM, GTK_DIR_RIGHT); + gtk_binding_entry_add_signal (binding_set, GDK_KP_Right, 0, + "move", 1, + G_TYPE_ENUM, GTK_DIR_RIGHT); + + gtk_binding_entry_add_signal (binding_set, GDK_Left, 0, + "move", 1, + G_TYPE_ENUM, GTK_DIR_LEFT); + gtk_binding_entry_add_signal (binding_set, GDK_KP_Left, 0, + "move", 1, + G_TYPE_ENUM, GTK_DIR_LEFT); +} + +/* Object initialization function for the HSV color selector */ +static void +gtk_hsv_init (GtkHSV *hsv) +{ + HSVPrivate *priv; + + priv = g_new0 (HSVPrivate, 1); + hsv->priv = priv; + + GTK_WIDGET_SET_FLAGS (hsv, GTK_NO_WINDOW); + GTK_WIDGET_SET_FLAGS (hsv, GTK_CAN_FOCUS); + + priv->h = 0.0; + priv->s = 0.0; + priv->v = 0.0; + + priv->size = DEFAULT_SIZE; + priv->ring_width = DEFAULT_RING_WIDTH; +} + +/* Destroy handler for the HSV color selector */ +static void +gtk_hsv_destroy (GtkObject *object) +{ + GtkHSV *hsv; + + g_return_if_fail (GTK_IS_HSV (object)); + + hsv = GTK_HSV (object); + + if (hsv->priv) + { + g_free (hsv->priv); + hsv->priv = NULL; + } + + GTK_OBJECT_CLASS (parent_class)->destroy (object); +} + +/* Default signal handlers */ + + +/* Map handler for the HSV color selector */ + +static void +gtk_hsv_map (GtkWidget *widget) +{ + GtkHSV *hsv; + HSVPrivate *priv; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + GTK_WIDGET_CLASS (parent_class)->map (widget); + + gdk_window_show (priv->window); +} + +/* Unmap handler for the HSV color selector */ + +static void +gtk_hsv_unmap (GtkWidget *widget) +{ + GtkHSV *hsv; + HSVPrivate *priv; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + gdk_window_hide (priv->window); + + GTK_WIDGET_CLASS (parent_class)->unmap (widget); +} + +/* Realize handler for the HSV color selector */ +static void +gtk_hsv_realize (GtkWidget *widget) +{ + GtkHSV *hsv; + HSVPrivate *priv; + GdkWindowAttr attr; + int attr_mask; + GdkWindow *parent_window; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); + + /* Create window */ + + attr.window_type = GDK_WINDOW_CHILD; + attr.x = widget->allocation.x; + attr.y = widget->allocation.y; + attr.width = widget->allocation.width; + attr.height = widget->allocation.height; + attr.wclass = GDK_INPUT_ONLY; + attr.event_mask = gtk_widget_get_events (widget); + attr.event_mask |= (GDK_KEY_PRESS_MASK + | GDK_BUTTON_PRESS_MASK + | GDK_BUTTON_RELEASE_MASK + | GDK_POINTER_MOTION_MASK + | GDK_ENTER_NOTIFY_MASK + | GDK_LEAVE_NOTIFY_MASK); + + attr_mask = GDK_WA_X | GDK_WA_Y; + + parent_window = gtk_widget_get_parent_window (widget); + + widget->window = parent_window; + g_object_ref (widget->window); + + priv->window = gdk_window_new (parent_window, &attr, attr_mask); + gdk_window_set_user_data (priv->window, hsv); + + widget->style = gtk_style_attach (widget->style, widget->window); + + /* Create GC */ + + priv->gc = gdk_gc_new (parent_window); +} + +/* Unrealize handler for the HSV color selector */ +static void +gtk_hsv_unrealize (GtkWidget *widget) +{ + GtkHSV *hsv; + HSVPrivate *priv; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + gdk_window_set_user_data (priv->window, NULL); + gdk_window_destroy (priv->window); + priv->window = NULL; + + g_object_unref (priv->gc); + priv->gc = NULL; + + if (GTK_WIDGET_CLASS (parent_class)->unrealize) + GTK_WIDGET_CLASS (parent_class)->unrealize (widget); +} + +/* Size_request handler for the HSV color selector */ +static void +gtk_hsv_size_request (GtkWidget *widget, + GtkRequisition *requisition) +{ + GtkHSV *hsv = GTK_HSV (widget); + HSVPrivate *priv = hsv->priv; + gint focus_width; + gint focus_pad; + + gtk_widget_style_get (widget, + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, + NULL); + + requisition->width = priv->size + 2 * (focus_width + focus_pad); + requisition->height = priv->size + 2 * (focus_width + focus_pad); +} + +/* Size_allocate handler for the HSV color selector */ +static void +gtk_hsv_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) +{ + GtkHSV *hsv; + HSVPrivate *priv; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + widget->allocation = *allocation; + + if (GTK_WIDGET_REALIZED (widget)) + gdk_window_move_resize (priv->window, + allocation->x, + allocation->y, + allocation->width, + allocation->height); +} + + +/* Utility functions */ + +#define INTENSITY(r, g, b) ((r) * 0.30 + (g) * 0.59 + (b) * 0.11) + +/* Converts from HSV to RGB */ +static void +hsv_to_rgb (gdouble *h, + gdouble *s, + gdouble *v) +{ + gdouble hue, saturation, value; + gdouble f, p, q, t; + + if (*s == 0.0) + { + *h = *v; + *s = *v; + *v = *v; /* heh */ + } + else + { + hue = *h * 6.0; + saturation = *s; + value = *v; + + if (hue == 6.0) + hue = 0.0; + + f = hue - (int) hue; + p = value * (1.0 - saturation); + q = value * (1.0 - saturation * f); + t = value * (1.0 - saturation * (1.0 - f)); + + switch ((int) hue) + { + case 0: + *h = value; + *s = t; + *v = p; + break; + + case 1: + *h = q; + *s = value; + *v = p; + break; + + case 2: + *h = p; + *s = value; + *v = t; + break; + + case 3: + *h = p; + *s = q; + *v = value; + break; + + case 4: + *h = t; + *s = p; + *v = value; + break; + + case 5: + *h = value; + *s = p; + *v = q; + break; + + default: + g_assert_not_reached (); + } + } +} + +/* Converts from RGB to HSV */ +static void +rgb_to_hsv (gdouble *r, + gdouble *g, + gdouble *b) +{ + gdouble red, green, blue; + gdouble h, s, v; + gdouble min, max; + gdouble delta; + + red = *r; + green = *g; + blue = *b; + + h = 0.0; + + if (red > green) + { + if (red > blue) + max = red; + else + max = blue; + + if (green < blue) + min = green; + else + min = blue; + } + else + { + if (green > blue) + max = green; + else + max = blue; + + if (red < blue) + min = red; + else + min = blue; + } + + v = max; + + if (max != 0.0) + s = (max - min) / max; + else + s = 0.0; + + if (s == 0.0) + h = 0.0; + else + { + delta = max - min; + + if (red == max) + h = (green - blue) / delta; + else if (green == max) + h = 2 + (blue - red) / delta; + else if (blue == max) + h = 4 + (red - green) / delta; + + h /= 6.0; + + if (h < 0.0) + h += 1.0; + else if (h > 1.0) + h -= 1.0; + } + + *r = h; + *g = s; + *b = v; +} + +/* Computes the vertices of the saturation/value triangle */ +static void +compute_triangle (GtkHSV *hsv, + gint *hx, + gint *hy, + gint *sx, + gint *sy, + gint *vx, + gint *vy) +{ + HSVPrivate *priv; + gdouble center; + gdouble inner, outer; + gdouble angle; + + priv = hsv->priv; + + center = GTK_WIDGET (hsv)->requisition.width / 2.0; + outer = priv->size / 2.0; + inner = outer - priv->ring_width; + angle = priv->h * 2.0 * G_PI; + + *hx = floor (center + cos (angle) * inner + 0.5); + *hy = floor (center - sin (angle) * inner + 0.5); + *sx = floor (center + cos (angle + 2.0 * G_PI / 3.0) * inner + 0.5); + *sy = floor (center - sin (angle + 2.0 * G_PI / 3.0) * inner + 0.5); + *vx = floor (center + cos (angle + 4.0 * G_PI / 3.0) * inner + 0.5); + *vy = floor (center - sin (angle + 4.0 * G_PI / 3.0) * inner + 0.5); +} + +/* Computes whether a point is inside the hue ring */ +static gboolean +is_in_ring (GtkHSV *hsv, + gdouble x, + gdouble y) +{ + HSVPrivate *priv; + gdouble dx, dy, dist; + gdouble center, inner, outer; + + priv = hsv->priv; + + center = priv->size / 2.0; + outer = priv->size / 2.0; + inner = outer - priv->ring_width; + + dx = x - center; + dy = center - y; + dist = dx * dx + dy * dy; + + return (dist >= inner * inner && dist <= outer * outer); +} + +/* Computes a saturation/value pair based on the mouse coordinates */ +static void +compute_sv (GtkHSV *hsv, + gdouble x, + gdouble y, + gdouble *s, + gdouble *v) +{ + HSVPrivate *priv; + int ihx, ihy, isx, isy, ivx, ivy; + double hx, hy, sx, sy, vx, vy; + double center; + + priv = hsv->priv; + + compute_triangle (hsv, &ihx, &ihy, &isx, &isy, &ivx, &ivy); + center = GTK_WIDGET (hsv)->requisition.width / 2.0; + hx = ihx - center; + hy = center - ihy; + sx = isx - center; + sy = center - isy; + vx = ivx - center; + vy = center - ivy; + x -= center; + y = center - y; + + if (vx * (x - sx) + vy * (y - sy) < 0.0) + { + *s = 1.0; + *v = (((x - sx) * (hx - sx) + (y - sy) * (hy-sy)) + / ((hx - sx) * (hx - sx) + (hy - sy) * (hy - sy))); + + if (*v < 0.0) + *v = 0.0; + else if (*v > 1.0) + *v = 1.0; + } + else if (hx * (x - sx) + hy * (y - sy) < 0.0) + { + *s = 0.0; + *v = (((x - sx) * (vx - sx) + (y - sy) * (vy - sy)) + / ((vx - sx) * (vx - sx) + (vy - sy) * (vy - sy))); + + if (*v < 0.0) + *v = 0.0; + else if (*v > 1.0) + *v = 1.0; + } + else if (sx * (x - hx) + sy * (y - hy) < 0.0) + { + *v = 1.0; + *s = (((x - vx) * (hx - vx) + (y - vy) * (hy - vy)) / + ((hx - vx) * (hx - vx) + (hy - vy) * (hy - vy))); + + if (*s < 0.0) + *s = 0.0; + else if (*s > 1.0) + *s = 1.0; + } + else + { + *v = (((x - sx) * (hy - vy) - (y - sy) * (hx - vx)) + / ((vx - sx) * (hy - vy) - (vy - sy) * (hx - vx))); + + if (*v<= 0.0) + { + *v = 0.0; + *s = 0.0; + } + else + { + if (*v > 1.0) + *v = 1.0; + + if (fabs (hy - vy) < fabs (hx - vx)) + *s = (x - sx - *v * (vx - sx)) / (*v * (hx - vx)); + else + *s = (y - sy - *v * (vy - sy)) / (*v * (hy - vy)); + + if (*s < 0.0) + *s = 0.0; + else if (*s > 1.0) + *s = 1.0; + } + } +} + +/* Computes whether a point is inside the saturation/value triangle */ +static gboolean +is_in_triangle (GtkHSV *hsv, + gdouble x, + gdouble y) +{ + int hx, hy, sx, sy, vx, vy; + double det, s, v; + + compute_triangle (hsv, &hx, &hy, &sx, &sy, &vx, &vy); + + det = (vx - sx) * (hy - sy) - (vy - sy) * (hx - sx); + + s = ((x - sx) * (hy - sy) - (y - sy) * (hx - sx)) / det; + v = ((vx - sx) * (y - sy) - (vy - sy) * (x - sx)) / det; + + return (s >= 0.0 && v >= 0.0 && s + v <= 1.0); +} + +/* Computes a value based on the mouse coordinates */ +static double +compute_v (GtkHSV *hsv, + gdouble x, + gdouble y) +{ + HSVPrivate *priv; + double center; + double dx, dy; + double angle; + + priv = hsv->priv; + + center = GTK_WIDGET (hsv)->requisition.width / 2.0; + dx = x - center; + dy = center - y; + + angle = atan2 (dy, dx); + if (angle < 0.0) + angle += 2.0 * G_PI; + + return angle / (2.0 * G_PI); +} + +/* Event handlers */ + +static void +set_cross_grab (GtkHSV *hsv, + guint32 time) +{ + HSVPrivate *priv; + GdkCursor *cursor; + + priv = hsv->priv; + + cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (hsv)), + GDK_CROSSHAIR); + gdk_pointer_grab (priv->window, FALSE, + (GDK_POINTER_MOTION_MASK + | GDK_POINTER_MOTION_HINT_MASK + | GDK_BUTTON_RELEASE_MASK), + NULL, + cursor, + time); + gdk_cursor_unref (cursor); +} + +/* Button_press_event handler for the HSV color selector */ +static gint +gtk_hsv_button_press (GtkWidget *widget, + GdkEventButton *event) +{ + GtkHSV *hsv; + HSVPrivate *priv; + double x, y; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + if (priv->mode != DRAG_NONE || event->button != 1) + return FALSE; + + x = event->x; + y = event->y; + + if (is_in_ring (hsv, x, y)) + { + priv->mode = DRAG_H; + set_cross_grab (hsv, event->time); + + gtk_hsv_set_color (hsv, + compute_v (hsv, x, y), + priv->s, + priv->v); + + gtk_widget_grab_focus (widget); + priv->focus_on_ring = TRUE; + + return TRUE; + } + + if (is_in_triangle (hsv, x, y)) + { + gdouble s, v; + + priv->mode = DRAG_SV; + set_cross_grab (hsv, event->time); + + compute_sv (hsv, x, y, &s, &v); + gtk_hsv_set_color (hsv, priv->h, s, v); + + gtk_widget_grab_focus (widget); + priv->focus_on_ring = FALSE; + + return TRUE; + } + + return FALSE; +} + +/* Button_release_event handler for the HSV color selector */ +static gint +gtk_hsv_button_release (GtkWidget *widget, + GdkEventButton *event) +{ + GtkHSV *hsv; + HSVPrivate *priv; + DragMode mode; + gdouble x, y; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + if (priv->mode == DRAG_NONE || event->button != 1) + return FALSE; + + /* Set the drag mode to DRAG_NONE so that signal handlers for "catched" + * can see that this is the final color state. + */ + + mode = priv->mode; + priv->mode = DRAG_NONE; + + x = event->x; + y = event->y; + + if (mode == DRAG_H) + gtk_hsv_set_color (hsv, compute_v (hsv, x, y), priv->s, priv->v); + else if (mode == DRAG_SV) { + double s, v; + + compute_sv (hsv, x, y, &s, &v); + gtk_hsv_set_color (hsv, priv->h, s, v); + } else + g_assert_not_reached (); + + gdk_display_pointer_ungrab (gdk_drawable_get_display (event->window), + event->time); + return TRUE; +} + +/* Motion_notify_event handler for the HSV color selector */ +static gint +gtk_hsv_motion (GtkWidget *widget, + GdkEventMotion *event) +{ + GtkHSV *hsv; + HSVPrivate *priv; + double x, y; + gint ix, iy; + GdkModifierType mods; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + if (priv->mode == DRAG_NONE) + return FALSE; + + if (event->is_hint) + { + gdk_window_get_pointer (priv->window, &ix, &iy, &mods); + x = ix; + y = iy; + } + else + { + x = event->x; + y = event->y; + } + + if (priv->mode == DRAG_H) + { + gtk_hsv_set_color (hsv, compute_v (hsv, x, y), priv->s, priv->v); + return TRUE; + } + else if (priv->mode == DRAG_SV) + { + double s, v; + + compute_sv (hsv, x, y, &s, &v); + gtk_hsv_set_color (hsv, priv->h, s, v); + return TRUE; + } + + g_assert_not_reached (); + return FALSE; +} + + +/* Redrawing */ + +/* Paints the hue ring */ +static void +paint_ring (GtkHSV *hsv, + GdkDrawable *drawable, + gint x, + gint y, + gint width, + gint height) +{ + GtkWidget *widget = GTK_WIDGET (hsv); + HSVPrivate *priv; + int xx, yy; + gdouble dx, dy, dist; + gdouble center; + gdouble inner, outer; + guchar *buf, *p; + gdouble angle; + gdouble hue; + gdouble r, g, b; + GdkBitmap *mask; + GdkGC *gc; + GdkColor color; + gint focus_width; + gint focus_pad; + + gtk_widget_style_get (widget, + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, + NULL); + + priv = hsv->priv; + + center = widget->requisition.width / 2.0; + + outer = priv->size / 2.0; + inner = outer - priv->ring_width; + + /* Paint the ring */ + + buf = g_new (guchar, width * height * 3); + + for (yy = 0; yy < height; yy++) + { + p = buf + yy * width * 3; + + dy = -(yy + y - center); + + for (xx = 0; xx < width; xx++) + { + dx = xx + x - center; + + dist = dx * dx + dy * dy; + if (dist < ((inner-1) * (inner-1)) || dist > ((outer+1) * (outer+1))) + { + *p++ = 0; + *p++ = 0; + *p++ = 0; + continue; + } + + angle = atan2 (dy, dx); + if (angle < 0.0) + angle += 2.0 * G_PI; + + hue = angle / (2.0 * G_PI); + + r = hue; + g = 1.0; + b = 1.0; + hsv_to_rgb (&r, &g, &b); + + *p++ = floor (r * 255 + 0.5); + *p++ = floor (g * 255 + 0.5); + *p++ = floor (b * 255 + 0.5); + } + } + + /* Create clipping mask */ + + mask = gdk_pixmap_new (widget->window, width, height, 1); + + gc = gdk_gc_new (mask); + + color.pixel = 0; + gdk_gc_set_foreground (gc, &color); + gdk_draw_rectangle (mask, gc, TRUE, + 0, 0, width, height); + + + color.pixel = 1; + gdk_gc_set_foreground (gc, &color); + gdk_draw_arc (mask, gc, TRUE, + focus_width + focus_pad - x, + focus_width + focus_pad - y, + priv->size - 1, priv->size - 1, + 0, 360 * 64); + + color.pixel = 0; + gdk_gc_set_foreground (gc, &color); + gdk_draw_arc (mask, gc, TRUE, + focus_width + focus_pad - x + priv->ring_width - 1, + focus_width + focus_pad - y + priv->ring_width - 1, + priv->size - 2 * priv->ring_width + 1, priv->size - 2 * priv->ring_width + 1, + 0, 360 * 64); + + g_object_unref (gc); + + gdk_gc_set_clip_mask (priv->gc, mask); + gdk_gc_set_clip_origin (priv->gc, 0, 0); + + /* Draw ring */ + + gdk_draw_rgb_image_dithalign (drawable, priv->gc, 0, 0, width, height, + GDK_RGB_DITHER_MAX, + buf, + width * 3, + x, y); + + /* Draw value marker */ + + r = priv->h; + g = 1.0; + b = 1.0; + hsv_to_rgb (&r, &g, &b); + + if (INTENSITY (r, g, b) > 0.5) + { + color.red = 0x0000; + color.green = 0x0000; + color.blue = 0x0000; + } + else + { + color.red = 0xffff; + color.green = 0xffff; + color.blue = 0xffff; + } + + gdk_gc_set_rgb_fg_color (priv->gc, &color); + + gdk_draw_line (drawable, priv->gc, + -x + center, -y + center, + -x + center + cos (priv->h * 2.0 * G_PI) * center, + -y + center - sin (priv->h * 2.0 * G_PI) * center); + + gdk_gc_set_clip_mask (priv->gc, NULL); + g_object_unref (mask); + + g_free (buf); + + /* Draw ring outline */ +} + +/* Converts an HSV triplet to an integer RGB triplet */ +static void +get_color (gdouble h, + gdouble s, + gdouble v, + gint *r, + gint *g, + gint *b) +{ + hsv_to_rgb (&h, &s, &v); + + *r = floor (h * 255 + 0.5); + *g = floor (s * 255 + 0.5); + *b = floor (v * 255 + 0.5); +} + +#define SWAP(a, b, t) ((t) = (a), (a) = (b), (b) = (t)) + +#define LERP(a, b, v1, v2, i) (((v2) - (v1) != 0) \ + ? ((a) + ((b) - (a)) * ((i) - (v1)) / ((v2) - (v1))) \ + : (a)) + +/* Paints the HSV triangle */ +static void +paint_triangle (GtkHSV *hsv, + GdkDrawable *drawable, + gint x, + gint y, + gint width, + gint height) +{ + GtkWidget *widget = GTK_WIDGET (hsv); + HSVPrivate *priv; + gint hx, hy, sx, sy, vx, vy; /* HSV vertices */ + gint x1, y1, r1, g1, b1; /* First vertex in scanline order */ + gint x2, y2, r2, g2, b2; /* Second vertex */ + gint x3, y3, r3, g3, b3; /* Third vertex */ + gint t; + guchar *buf, *p; + gint xl, xr, rl, rr, gl, gr, bl, br; /* Scanline data */ + gint xx, yy; + GdkBitmap *mask; + GdkGC *gc; + GdkColor color; + GdkPoint points[3]; + gdouble r, g, b; + gchar *detail; + + priv = hsv->priv; + + /* Compute triangle's vertices */ + + compute_triangle (hsv, &hx, &hy, &sx, &sy, &vx, &vy); + + x1 = hx; + y1 = hy; + get_color (priv->h, 1.0, 1.0, &r1, &g1, &b1); + + x2 = sx; + y2 = sy; + get_color (priv->h, 1.0, 0.0, &r2, &g2, &b2); + + x3 = vx; + y3 = vy; + get_color (priv->h, 0.0, 1.0, &r3, &g3, &b3); + + if (y2 > y3) + { + SWAP (x2, x3, t); + SWAP (y2, y3, t); + SWAP (r2, r3, t); + SWAP (g2, g3, t); + SWAP (b2, b3, t); + } + + if (y1 > y3) + { + SWAP (x1, x3, t); + SWAP (y1, y3, t); + SWAP (r1, r3, t); + SWAP (g1, g3, t); + SWAP (b1, b3, t); + } + + if (y1 > y2) + { + SWAP (x1, x2, t); + SWAP (y1, y2, t); + SWAP (r1, r2, t); + SWAP (g1, g2, t); + SWAP (b1, b2, t); + } + + /* Shade the triangle */ + + buf = g_new (guchar, width * height * 3); + + for (yy = 0; yy < height; yy++) + { + p = buf + yy * width * 3; + + if (yy + y < y1 || yy + y > y3) + for (xx = 0; xx < width; xx++) + { + *p++ = 0; + *p++ = 0; + *p++ = 0; + } + else { + if (yy + y < y2) + { + xl = LERP (x1, x2, y1, y2, yy + y); + + rl = LERP (r1, r2, y1, y2, yy + y); + gl = LERP (g1, g2, y1, y2, yy + y); + bl = LERP (b1, b2, y1, y2, yy + y); + } + else + { + xl = LERP (x2, x3, y2, y3, yy + y); + + rl = LERP (r2, r3, y2, y3, yy + y); + gl = LERP (g2, g3, y2, y3, yy + y); + bl = LERP (b2, b3, y2, y3, yy + y); + } + + xr = LERP (x1, x3, y1, y3, yy + y); + + rr = LERP (r1, r3, y1, y3, yy + y); + gr = LERP (g1, g3, y1, y3, yy + y); + br = LERP (b1, b3, y1, y3, yy + y); + + if (xl > xr) + { + SWAP (xl, xr, t); + SWAP (rl, rr, t); + SWAP (gl, gr, t); + SWAP (bl, br, t); + } + + for (xx = 0; xx < width; xx++) + { + if (xx + x < xl || xx + x > xr) + { + *p++ = 0; + *p++ = 0; + *p++ = 0; + } + else + { + *p++ = LERP (rl, rr, xl, xr, xx + x); + *p++ = LERP (gl, gr, xl, xr, xx + x); + *p++ = LERP (bl, br, xl, xr, xx + x); + } + } + } + } + + /* Create clipping mask */ + + mask = gdk_pixmap_new (widget->window, width, height, 1); + + gc = gdk_gc_new (mask); + + color.pixel = 0; + gdk_gc_set_foreground (gc, &color); + gdk_draw_rectangle (mask, gc, TRUE, + 0, 0, width, height); + + color.pixel = 1; + gdk_gc_set_foreground (gc, &color); + + points[0].x = x1 - x; + points[0].y = y1 - y; + points[1].x = x2 - x; + points[1].y = y2 - y; + points[2].x = x3 - x; + points[2].y = y3 - y; + gdk_draw_polygon (mask, gc, TRUE, points, 3); + + g_object_unref (gc); + + gdk_gc_set_clip_mask (priv->gc, mask); + gdk_gc_set_clip_origin (priv->gc, 0, 0); + + /* Draw triangle */ + + gdk_draw_rgb_image_dithalign (drawable, priv->gc, 0, 0, width, height, + GDK_RGB_DITHER_MAX, + buf, + width * 3, + x, y); + + gdk_gc_set_clip_mask (priv->gc, NULL); + g_object_unref (mask); + + g_free (buf); + + /* Draw value marker */ + + xx = floor (sx + (vx - sx) * priv->v + (hx - vx) * priv->s * priv->v + 0.5) - x; + yy = floor (sy + (vy - sy) * priv->v + (hy - vy) * priv->s * priv->v + 0.5) - y; + + r = priv->h; + g = priv->s; + b = priv->v; + hsv_to_rgb (&r, &g, &b); + + if (INTENSITY (r, g, b) > 0.5) + { + detail = "colorwheel_light"; + color.red = 0x0000; + color.green = 0x0000; + color.blue = 0x0000; + } + else + { + detail = "colorwheel_dark"; + color.red = 0xffff; + color.green = 0xffff; + color.blue = 0xffff; + } + + gdk_gc_set_rgb_fg_color (priv->gc, &color); + +#define OUTER_RADIUS 4 +#define INNER_RADIUS 3 +#define FOCUS_RADIUS 6 + + gdk_draw_arc (drawable, priv->gc, FALSE, + xx - OUTER_RADIUS, yy - OUTER_RADIUS, + OUTER_RADIUS * 2, OUTER_RADIUS * 2, + 0, 360 * 64); + gdk_draw_arc (drawable, priv->gc, FALSE, + xx - INNER_RADIUS, yy - INNER_RADIUS, + INNER_RADIUS * 2, INNER_RADIUS * 2, + 0, 360 * 64); + + /* Draw focus outline */ + + if (GTK_WIDGET_HAS_FOCUS (hsv) && + !priv->focus_on_ring) + { + gint focus_width; + gint focus_pad; + + gtk_widget_style_get (widget, + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, + NULL); + + gtk_paint_focus (widget->style, drawable, + GTK_WIDGET_STATE (widget), + NULL, widget, detail, + xx - FOCUS_RADIUS - focus_width - focus_pad, + yy - FOCUS_RADIUS - focus_width - focus_pad, + 2 * (FOCUS_RADIUS + focus_width + focus_pad), + 2 * (FOCUS_RADIUS + focus_width + focus_pad)); + } + +} + +/* Paints the contents of the HSV color selector */ +static void +paint (GtkHSV *hsv, + GdkDrawable *drawable, + gint x, + gint y, + gint width, + gint height) +{ + paint_ring (hsv, drawable, x, y, width, height); + paint_triangle (hsv, drawable, x, y, width, height); +} + +/* Expose_event handler for the HSV color selector */ +static gint +gtk_hsv_expose (GtkWidget *widget, + GdkEventExpose *event) +{ + GtkHSV *hsv; + HSVPrivate *priv; + GdkRectangle rect, dest; + GdkPixmap *pixmap; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + if (!(GTK_WIDGET_DRAWABLE (widget) && event->window == widget->window)) + return FALSE; + + rect.x = widget->allocation.x; + rect.y = widget->allocation.y; + rect.width = widget->allocation.width; + rect.height = widget->allocation.height; + + if (!gdk_rectangle_intersect (&event->area, &rect, &dest)) + return FALSE; + + pixmap = gdk_pixmap_new (widget->window, dest.width, dest.height, + gtk_widget_get_visual (widget)->depth); + + rect = dest; + rect.x = 0; + rect.y = 0; + + gdk_draw_rectangle (pixmap, + widget->style->bg_gc[GTK_WIDGET_STATE (widget)], + TRUE, + 0, 0, dest.width, dest.height); + paint (hsv, pixmap, + dest.x - widget->allocation.x, dest.y - widget->allocation.y, + dest.width, dest.height); + + gdk_draw_drawable (widget->window, + priv->gc, + pixmap, + 0, 0, + dest.x, + dest.y, + event->area.width, event->area.height); + + if (GTK_WIDGET_HAS_FOCUS (hsv) && priv->focus_on_ring) + gtk_paint_focus (widget->style, widget->window, + GTK_WIDGET_STATE (widget), + &event->area, widget, NULL, + widget->allocation.x, + widget->allocation.y, + widget->allocation.width, + widget->allocation.height); + + g_object_unref (pixmap); + + return FALSE; +} + +static gboolean +gtk_hsv_focus (GtkWidget *widget, + GtkDirectionType dir) +{ + GtkHSV *hsv; + HSVPrivate *priv; + + hsv = GTK_HSV (widget); + priv = hsv->priv; + + if (!GTK_WIDGET_HAS_FOCUS (hsv)) + { + if (dir == GTK_DIR_TAB_BACKWARD) + priv->focus_on_ring = FALSE; + else + priv->focus_on_ring = TRUE; + + gtk_widget_grab_focus (GTK_WIDGET (hsv)); + return TRUE; + } + + switch (dir) + { + case GTK_DIR_UP: + if (priv->focus_on_ring) + return FALSE; + else + priv->focus_on_ring = TRUE; + break; + + case GTK_DIR_DOWN: + if (priv->focus_on_ring) + priv->focus_on_ring = FALSE; + else + return FALSE; + break; + + case GTK_DIR_LEFT: + case GTK_DIR_TAB_BACKWARD: + if (priv->focus_on_ring) + return FALSE; + else + priv->focus_on_ring = TRUE; + break; + + case GTK_DIR_RIGHT: + case GTK_DIR_TAB_FORWARD: + if (priv->focus_on_ring) + priv->focus_on_ring = FALSE; + else + return FALSE; + break; + } + + gtk_widget_queue_draw (GTK_WIDGET (hsv)); + + return TRUE; +} + +/** + * gtk_hsv_new: + * @void: + * + * Creates a new HSV color selector. + * + * Return value: A newly-created HSV color selector. + **/ +GtkWidget* +gtk_hsv_new (void) +{ + return g_object_new (GTK_TYPE_HSV, NULL); +} + +/** + * gtk_hsv_set_color: + * @hsv: An HSV color selector. + * @h: Hue. + * @s: Saturation. + * @v: Value. + * + * Sets the current color in an HSV color selector. Color component values must + * be in the [0.0, 1.0] range. + **/ +void +gtk_hsv_set_color (GtkHSV *hsv, + gdouble h, + gdouble s, + gdouble v) +{ + HSVPrivate *priv; + + g_return_if_fail (hsv != NULL); + g_return_if_fail (GTK_IS_HSV (hsv)); + g_return_if_fail (h >= 0.0 && h <= 1.0); + g_return_if_fail (s >= 0.0 && s <= 1.0); + g_return_if_fail (v >= 0.0 && v <= 1.0); + + priv = hsv->priv; + + priv->h = h; + priv->s = s; + priv->v = v; + + g_signal_emit (hsv, hsv_signals[CHANGED], 0); + + gtk_widget_queue_draw (GTK_WIDGET (hsv)); +} + +/** + * gtk_hsv_get_color: + * @hsv: An HSV color selector. + * @h: Return value for the hue. + * @s: Return value for the saturation. + * @v: Return value for the value. + * + * Queries the current color in an HSV color selector. Returned values will be + * in the [0.0, 1.0] range. + **/ +void +gtk_hsv_get_color (GtkHSV *hsv, double *h, double *s, double *v) +{ + HSVPrivate *priv; + + g_return_if_fail (GTK_IS_HSV (hsv)); + + priv = hsv->priv; + + if (h) + *h = priv->h; + + if (s) + *s = priv->s; + + if (v) + *v = priv->v; +} + +/** + * gtk_hsv_set_metrics: + * @hsv: An HSV color selector. + * @size: Diameter for the hue ring. + * @ring_width: Width of the hue ring. + * + * Sets the size and ring width of an HSV color selector. + **/ +void +gtk_hsv_set_metrics (GtkHSV *hsv, + gint size, + gint ring_width) +{ + HSVPrivate *priv; + int same_size; + + g_return_if_fail (GTK_IS_HSV (hsv)); + g_return_if_fail (size > 0); + g_return_if_fail (ring_width > 0); + g_return_if_fail (2 * ring_width + 1 <= size); + + priv = hsv->priv; + + same_size = (priv->size == size); + + priv->size = size; + priv->ring_width = ring_width; + + if (same_size) + gtk_widget_queue_draw (GTK_WIDGET (hsv)); + else + gtk_widget_queue_resize (GTK_WIDGET (hsv)); +} + +/** + * gtk_hsv_get_metrics: + * @hsv: An HSV color selector. + * @size: Return value for the diameter of the hue ring. + * @ring_width: Return value for the width of the hue ring. + * + * Queries the size and ring width of an HSV color selector. + **/ +void +gtk_hsv_get_metrics (GtkHSV *hsv, + gint *size, + gint *ring_width) +{ + HSVPrivate *priv; + + g_return_if_fail (GTK_IS_HSV (hsv)); + + priv = hsv->priv; + + if (size) + *size = priv->size; + + if (ring_width) + *ring_width = priv->ring_width; +} + +/** + * gtk_hsv_is_adjusting: + * @hsv: + * + * An HSV color selector can be said to be adjusting if multiple rapid changes + * are being made to its value, for example, when the user is adjusting the + * value with the mouse. This function queries whether the HSV color selector + * is being adjusted or not. + * + * Return value: TRUE if clients can ignore changes to the color value, since + * they may be transitory, or FALSE if they should consider the color value + * status to be final. + **/ +gboolean +gtk_hsv_is_adjusting (GtkHSV *hsv) +{ + HSVPrivate *priv; + + g_return_val_if_fail (GTK_IS_HSV (hsv), FALSE); + + priv = hsv->priv; + + return priv->mode != DRAG_NONE; +} + +/** + * gtk_hsv_to_rgb: + * @h: Hue. + * @s: Saturation. + * @v: Value. + * @r: Return value for the red component. + * @g: Return value for the green component. + * @b: Return value for the blue component. + * + * Converts a color from HSV space to RGB. Input values must be in the + * [0.0, 1.0] range; output values will be in the same range. + **/ +void +gtk_hsv_to_rgb (gdouble h, + gdouble s, + gdouble v, + gdouble *r, + gdouble *g, + gdouble *b) +{ + g_return_if_fail (h >= 0.0 && h <= 1.0); + g_return_if_fail (s >= 0.0 && s <= 1.0); + g_return_if_fail (v >= 0.0 && v <= 1.0); + + hsv_to_rgb (&h, &s, &v); + + if (r) + *r = h; + + if (g) + *g = s; + + if (b) + *b = v; +} + +/** + * gtk_hsv_to_rgb: + * @r: Red. + * @g: Green. + * @b: Blue. + * @h: Return value for the hue component. + * @s: Return value for the saturation component. + * @v: Return value for the value component. + * + * Converts a color from RGB space to HSV. Input values must be in the + * [0.0, 1.0] range; output values will be in the same range. + **/ +void +gtk_rgb_to_hsv (gdouble r, + gdouble g, + gdouble b, + gdouble *h, + gdouble *s, + gdouble *v) +{ + g_return_if_fail (r >= 0.0 && r <= 1.0); + g_return_if_fail (g >= 0.0 && g <= 1.0); + g_return_if_fail (b >= 0.0 && b <= 1.0); + + rgb_to_hsv (&r, &g, &b); + + if (h) + *h = r; + + if (s) + *s = g; + + if (v) + *v = b; +} + +static void +gtk_hsv_move (GtkHSV *hsv, + GtkDirectionType dir) +{ + HSVPrivate *priv; + gdouble hue, sat, val; + gint hx, hy, sx, sy, vx, vy; /* HSV vertices */ + gint x, y; /* position in triangle */ + + priv = hsv->priv; + + hue = priv->h; + sat = priv->s; + val = priv->v; + + compute_triangle (hsv, &hx, &hy, &sx, &sy, &vx, &vy); + + x = floor (sx + (vx - sx) * priv->v + (hx - vx) * priv->s * priv->v + 0.5); + y = floor (sy + (vy - sy) * priv->v + (hy - vy) * priv->s * priv->v + 0.5); + +#define HUE_DELTA 0.002 + switch (dir) + { + case GTK_DIR_UP: + if (priv->focus_on_ring) + hue += HUE_DELTA; + else + { + y -= 1; + compute_sv (hsv, x, y, &sat, &val); + } + break; + + case GTK_DIR_DOWN: + if (priv->focus_on_ring) + hue -= HUE_DELTA; + else + { + y += 1; + compute_sv (hsv, x, y, &sat, &val); + } + break; + + case GTK_DIR_LEFT: + if (priv->focus_on_ring) + hue += HUE_DELTA; + else + { + x -= 1; + compute_sv (hsv, x, y, &sat, &val); + } + break; + + case GTK_DIR_RIGHT: + if (priv->focus_on_ring) + hue -= HUE_DELTA + ; + else + { + x += 1; + compute_sv (hsv, x, y, &sat, &val); + } + break; + + default: + /* we don't care about the tab directions */ + break; + } + + /* Wrap */ + if (hue < 0.0) + hue = 1.0; + else if (hue > 1.0) + hue = 0.0; + + gtk_hsv_set_color (hsv, hue, sat, val); +} diff --git a/veejay-client/src/widgets/gtkhsv.h b/veejay-client/src/widgets/gtkhsv.h new file mode 100644 index 00000000..c8dac795 --- /dev/null +++ b/veejay-client/src/widgets/gtkhsv.h @@ -0,0 +1,108 @@ +/* HSV color selector for GTK+ + * + * Copyright (C) 1999 The Free Software Foundation + * + * Authors: Simon Budig (original code) + * Federico Mena-Quintero (cleanup for GTK+) + * Jonathan Blandford (cleanup for GTK+) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __GTK_HSV_H__ +#define __GTK_HSV_H__ + +/* + * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define GTK_TYPE_HSV (gtk_hsv_get_type ()) +#define GTK_HSV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HSV, GtkHSV)) +#define GTK_HSV_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSV, GtkHSVClass)) +#define GTK_IS_HSV(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HSV)) +#define GTK_IS_HSV_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSV)) +#define GTK_HSV_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HSV, GtkHSVClass)) + + +typedef struct _GtkHSV GtkHSV; +typedef struct _GtkHSVClass GtkHSVClass; + +struct _GtkHSV +{ + GtkWidget parent_instance; + + /* Private data */ + gpointer priv; +}; + +struct _GtkHSVClass +{ + GtkWidgetClass parent_class; + + /* Notification signals */ + + void (*changed) (GtkHSV *hsv); + + /* Keybindings */ + void (* move) (GtkHSV *hsv, + GtkDirectionType type); +}; + + +GType gtk_hsv_get_type (void) G_GNUC_CONST; +GtkWidget* gtk_hsv_new (void); +void gtk_hsv_set_color (GtkHSV *hsv, + double h, + double s, + double v); +void gtk_hsv_get_color (GtkHSV *hsv, + gdouble *h, + gdouble *s, + gdouble *v); +void gtk_hsv_set_metrics (GtkHSV *hsv, + gint size, + gint ring_width); +void gtk_hsv_get_metrics (GtkHSV *hsv, + gint *size, + gint *ring_width); +gboolean gtk_hsv_is_adjusting (GtkHSV *hsv); +void gtk_hsv_to_rgb (gdouble h, + gdouble s, + gdouble v, + gdouble *r, + gdouble *g, + gdouble *b); +void gtk_rgb_to_hsv (gdouble r, + gdouble g, + gdouble b, + gdouble *h, + gdouble *s, + gdouble *v); + + +#ifdef __cplusplus +} +#endif + +#endif /* __GTK_HSV_H__ */ diff --git a/veejay-client/src/widgets/gtkknob.c b/veejay-client/src/widgets/gtkknob.c new file mode 100644 index 00000000..406a6933 --- /dev/null +++ b/veejay-client/src/widgets/gtkknob.c @@ -0,0 +1,569 @@ +/* gAlan - Graphical Audio Language + * Copyright (C) 1999 Tony Garnock-Jones + * + * 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 + */ + +#include +#include +#include +#include + +#include +#include "gtkknob.h" + +#ifndef M_PI +# define M_PI 3.14159265358979323846 /* pi */ +#endif + +#define SCROLL_DELAY_LENGTH 300 +#define KNOB_SIZE 32 + +#define STATE_IDLE 0 +#define STATE_PRESSED 1 +#define STATE_DRAGGING 2 + + +/* Forward declarations */ + +static void gtk_knob_class_init(GtkKnobClass *klass); +static void gtk_knob_init(GtkKnob *knob); +static void gtk_knob_destroy(GtkObject *object); +static void gtk_knob_realize(GtkWidget *widget); +static void gtk_knob_size_request(GtkWidget *widget, GtkRequisition *requisition); +static void gtk_knob_size_allocate(GtkWidget *widget, GtkAllocation *allocation); +static gint gtk_knob_expose(GtkWidget *widget, GdkEventExpose *event); +static gint gtk_knob_button_press(GtkWidget *widget, GdkEventButton *event); +static gint gtk_knob_button_release(GtkWidget *widget, GdkEventButton *event); +static gint gtk_knob_motion_notify(GtkWidget *widget, GdkEventMotion *event); +static gint gtk_knob_timer(GtkKnob *knob); + +static void gtk_knob_update_mouse_update(GtkKnob *knob); +static void gtk_knob_update_mouse(GtkKnob *knob, gint x, gint y); +static void gtk_knob_update_mouse_abs(GtkKnob *knob, gint x, gint y); +static void gtk_knob_update(GtkKnob *knob); +static void gtk_knob_adjustment_changed(GtkAdjustment *adjustment, gpointer data); +static void gtk_knob_adjustment_value_changed(GtkAdjustment *adjustment, gpointer data); + +/* Local data */ + +static GtkWidgetClass *parent_class = NULL; +static GList *animation = NULL; + +static GList *get_anim_list( char *name ) { + + GError *err = NULL; + GdkPixbuf *animation; + GList *retval = NULL; + int x, w; + fprintf(stderr, "Load pixpbuf %s\n", name ); + animation = gdk_pixbuf_new_from_file( name, &err ); + w = gdk_pixbuf_get_width( animation ); + + for(x=0; xpath ); + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + + parent_class = gtk_type_class(gtk_widget_get_type()); + + object_class->destroy = gtk_knob_destroy; + + widget_class->realize = gtk_knob_realize; + widget_class->expose_event = gtk_knob_expose; + widget_class->size_request = gtk_knob_size_request; + widget_class->size_allocate = gtk_knob_size_allocate; + widget_class->button_press_event = gtk_knob_button_press; + widget_class->button_release_event = gtk_knob_button_release; + widget_class->motion_notify_event = gtk_knob_motion_notify; +} + +static void gtk_knob_init (GtkKnob *knob) { + knob->policy = GTK_UPDATE_CONTINUOUS; + knob->state = STATE_IDLE; + knob->saved_x = knob->saved_y = 0; + knob->timer = 0; + knob->pixbuf = NULL; + knob->anim_list = animation; + knob->old_value = 0.0; + knob->old_lower = 0.0; + knob->old_upper = 0.0; + knob->adjustment = NULL; +} + + + + + +GtkWidget *gtk_knob_new(GtkAdjustment *adjustment, const char *path) { + GtkKnob *knob; + + knob = gtk_type_new(gtk_knob_get_type()); + knob->path = g_strdup( path ); + + animation = get_anim_list( knob->path ); + + if (!adjustment) + adjustment = (GtkAdjustment*) gtk_adjustment_new(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); + + gtk_knob_set_adjustment(knob, adjustment); + + return GTK_WIDGET(knob); +} + +static void gtk_knob_destroy(GtkObject *object) { + GtkKnob *knob; + + g_return_if_fail(object != NULL); + g_return_if_fail(GTK_IS_KNOB(object)); + + knob = GTK_KNOB(object); + + if (knob->adjustment) { + gtk_object_unref(GTK_OBJECT(knob->adjustment)); + knob->adjustment = NULL; + } + + if (knob->pixbuf) { + gdk_pixbuf_unref(knob->pixbuf); + knob->pixbuf = NULL; + } + + if (GTK_OBJECT_CLASS(parent_class)->destroy) + (*GTK_OBJECT_CLASS(parent_class)->destroy)(object); +} + +GtkAdjustment* gtk_knob_get_adjustment(GtkKnob *knob) { + g_return_val_if_fail(knob != NULL, NULL); + g_return_val_if_fail(GTK_IS_KNOB(knob), NULL); + + return knob->adjustment; +} + +void gtk_knob_set_update_policy(GtkKnob *knob, GtkUpdateType policy) { + g_return_if_fail (knob != NULL); + g_return_if_fail (GTK_IS_KNOB (knob)); + + knob->policy = policy; +} + +void gtk_knob_set_adjustment(GtkKnob *knob, GtkAdjustment *adjustment) { + g_return_if_fail (knob != NULL); + g_return_if_fail (GTK_IS_KNOB (knob)); + + if (knob->adjustment) { + gtk_signal_disconnect_by_data(GTK_OBJECT(knob->adjustment), (gpointer)knob); + gtk_object_unref(GTK_OBJECT(knob->adjustment)); + } + + knob->adjustment = adjustment; + gtk_object_ref(GTK_OBJECT(knob->adjustment)); + gtk_object_sink(GTK_OBJECT( knob->adjustment ) ); + + gtk_signal_connect(GTK_OBJECT(adjustment), "changed", + GTK_SIGNAL_FUNC(gtk_knob_adjustment_changed), (gpointer) knob); + gtk_signal_connect(GTK_OBJECT(adjustment), "value_changed", + GTK_SIGNAL_FUNC(gtk_knob_adjustment_value_changed), (gpointer) knob); + + knob->old_value = adjustment->value; + knob->old_lower = adjustment->lower; + knob->old_upper = adjustment->upper; + + gtk_knob_update(knob); +} + +static void gtk_knob_realize(GtkWidget *widget) { + GtkKnob *knob; + GdkWindowAttr attributes; + gint attributes_mask; + + g_return_if_fail(widget != NULL); + g_return_if_fail(GTK_IS_KNOB(widget)); + + GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); + knob = GTK_KNOB(widget); + + attributes.x = widget->allocation.x; + attributes.y = widget->allocation.y; + attributes.width = widget->allocation.width; + attributes.height = widget->allocation.height; + attributes.wclass = GDK_INPUT_OUTPUT; + attributes.window_type = GDK_WINDOW_CHILD; + attributes.event_mask = + gtk_widget_get_events (widget) | + GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | + GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | + GDK_POINTER_MOTION_HINT_MASK; + attributes.visual = gtk_widget_get_visual(widget); + attributes.colormap = gtk_widget_get_colormap(widget); + + attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; + widget->window = gdk_window_new(widget->parent->window, &attributes, attributes_mask); + + widget->style = gtk_style_attach(widget->parent->style, widget->window); + + gdk_window_set_user_data(widget->window, widget); + + + gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); +} + +static void gtk_knob_size_request (GtkWidget *widget, GtkRequisition *requisition) { + requisition->width = KNOB_SIZE; + requisition->height = KNOB_SIZE; +} + +static void gtk_knob_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { + GtkKnob *knob; + + g_return_if_fail(widget != NULL); + g_return_if_fail(GTK_IS_KNOB(widget)); + g_return_if_fail(allocation != NULL); + + widget->allocation = *allocation; + knob = GTK_KNOB(widget); + + if (GTK_WIDGET_REALIZED(widget)) { + gdk_window_move_resize(widget->window, + allocation->x, allocation->y, + allocation->width, allocation->height); + } +} + +static gint gtk_knob_expose(GtkWidget *widget, GdkEventExpose *event) { + GtkKnob *knob; + gfloat dx, dy; + GList *framelist; + + g_return_val_if_fail(widget != NULL, FALSE); + g_return_val_if_fail(GTK_IS_KNOB(widget), FALSE); + g_return_val_if_fail(event != NULL, FALSE); + + if (event->count > 0) + return FALSE; + + knob = GTK_KNOB(widget); + + gdk_window_clear_area(widget->window, 0, 0, widget->allocation.width, widget->allocation.height); + + dx = knob->adjustment->value - knob->adjustment->lower; + dy = knob->adjustment->upper - knob->adjustment->lower; + framelist = knob->anim_list; + + if (dy != 0) { + GdkPixbuf *pixbuf; + + dx = MIN(MAX(dx / dy, 0), 1); + //dx = (1-dx) * (g_list_length( framelist )-0.5) * 0.75 + 0.125 * g_list_length( framelist ); + dx = (dx) * (g_list_length( framelist ) - 1 ); + + pixbuf = g_list_nth_data( framelist, (int) dx); + + gdk_pixbuf_render_to_drawable_alpha( pixbuf, widget->window, + 0, 0, 0, 0, gdk_pixbuf_get_width( pixbuf ), gdk_pixbuf_get_height( pixbuf ), GDK_PIXBUF_ALPHA_FULL, 0, 0,0,0 ); + } + + + + + return FALSE; +} + +static gint gtk_knob_button_press(GtkWidget *widget, GdkEventButton *event) { + GtkKnob *knob; + + g_return_val_if_fail(widget != NULL, FALSE); + g_return_val_if_fail(GTK_IS_KNOB(widget), FALSE); + g_return_val_if_fail(event != NULL, FALSE); + + knob = GTK_KNOB(widget); + + switch (knob->state) { + case STATE_IDLE: + switch (event->button) { +#if 0 + case 3: + gtk_knob_update_mouse_abs(knob, event->x, event->y); + /* FALL THROUGH */ +#endif + + case 1: + case 3: + gtk_grab_add(widget); + knob->state = STATE_PRESSED; + knob->saved_x = event->x; + knob->saved_y = event->y; + break; + + default: + break; + } + break; + + default: + break; + } + + return FALSE; +} + +static gint gtk_knob_button_release(GtkWidget *widget, GdkEventButton *event) { + GtkKnob *knob; + + g_return_val_if_fail(widget != NULL, FALSE); + g_return_val_if_fail(GTK_IS_KNOB(widget), FALSE); + g_return_val_if_fail(event != NULL, FALSE); + + knob = GTK_KNOB(widget); + + switch (knob->state) { + case STATE_PRESSED: + gtk_grab_remove(widget); + knob->state = STATE_IDLE; + + switch (event->button) { + case 1: + knob->adjustment->value -= knob->adjustment->page_increment; + gtk_signal_emit_by_name(GTK_OBJECT(knob->adjustment), "value_changed"); + break; + + case 3: + knob->adjustment->value += knob->adjustment->page_increment; + gtk_signal_emit_by_name(GTK_OBJECT(knob->adjustment), "value_changed"); + break; + + default: + break; + } + break; + + case STATE_DRAGGING: + gtk_grab_remove(widget); + knob->state = STATE_IDLE; + + if (knob->policy != GTK_UPDATE_CONTINUOUS && knob->old_value != knob->adjustment->value) + gtk_signal_emit_by_name(GTK_OBJECT(knob->adjustment), "value_changed"); + + break; + + default: + break; + } + + return FALSE; +} + +static gint gtk_knob_motion_notify(GtkWidget *widget, GdkEventMotion *event) { + GtkKnob *knob; + GdkModifierType mods; + gint x, y; + + g_return_val_if_fail(widget != NULL, FALSE); + g_return_val_if_fail(GTK_IS_KNOB(widget), FALSE); + g_return_val_if_fail(event != NULL, FALSE); + + knob = GTK_KNOB(widget); + + x = event->x; + y = event->y; + + if (event->is_hint || (event->window != widget->window)) + gdk_window_get_pointer(widget->window, &x, &y, &mods); + + switch (knob->state) { + case STATE_PRESSED: + knob->state = STATE_DRAGGING; + /* fall through */ + + case STATE_DRAGGING: + if (mods & GDK_BUTTON1_MASK) { + gtk_knob_update_mouse(knob, x, y); + return TRUE; + } else if (mods & GDK_BUTTON3_MASK) { + gtk_knob_update_mouse_abs(knob, x, y); + return TRUE; + } + break; + + default: + break; + } + + return FALSE; +} + +static gint gtk_knob_timer(GtkKnob *knob) { + g_return_val_if_fail(knob != NULL, FALSE); + g_return_val_if_fail(GTK_IS_KNOB(knob), FALSE); + + if (knob->policy == GTK_UPDATE_DELAYED) + gtk_signal_emit_by_name(GTK_OBJECT(knob->adjustment), "value_changed"); + + return FALSE; /* don't keep running this timer */ +} + +static void gtk_knob_update_mouse_update(GtkKnob *knob) { + if (knob->policy == GTK_UPDATE_CONTINUOUS) + gtk_signal_emit_by_name(GTK_OBJECT(knob->adjustment), "value_changed"); + else { + gtk_widget_draw(GTK_WIDGET(knob), NULL); + + if (knob->policy == GTK_UPDATE_DELAYED) { + if (knob->timer) + gtk_timeout_remove(knob->timer); + + knob->timer = gtk_timeout_add (SCROLL_DELAY_LENGTH, (GtkFunction) gtk_knob_timer, + (gpointer) knob); + } + } +} + +static void gtk_knob_update_mouse(GtkKnob *knob, gint x, gint y) { + gfloat old_value; + gfloat dv; + + g_return_if_fail(knob != NULL); + g_return_if_fail(GTK_IS_KNOB(knob)); + + old_value = knob->adjustment->value; + + dv = (knob->saved_y - y) * knob->adjustment->step_increment; + knob->saved_x = x; + knob->saved_y = y; + + knob->adjustment->value += dv; + + if (knob->adjustment->value != old_value) + gtk_knob_update_mouse_update(knob); +} + +static void gtk_knob_update_mouse_abs(GtkKnob *knob, gint x, gint y) { + gfloat old_value; + gdouble angle; + + g_return_if_fail(knob != NULL); + g_return_if_fail(GTK_IS_KNOB(knob)); + + old_value = knob->adjustment->value; + + x -= KNOB_SIZE>>1; + y -= KNOB_SIZE>>1; + y = -y; /* inverted cartesian graphics coordinate system */ + + angle = atan2(y, x) / M_PI; + if (angle < -0.5) + angle += 2; + + angle = -(2.0/3.0) * (angle - 1.25); /* map [1.25pi, -0.25pi] onto [0, 1] */ + angle *= knob->adjustment->upper - knob->adjustment->lower; + angle += knob->adjustment->lower; + + knob->adjustment->value = angle; + + if (knob->adjustment->value != old_value) + gtk_knob_update_mouse_update(knob); +} + +static void gtk_knob_update(GtkKnob *knob) { + gfloat new_value; + + g_return_if_fail(knob != NULL); + g_return_if_fail(GTK_IS_KNOB (knob)); + + new_value = knob->adjustment->value; + + if (new_value < knob->adjustment->lower) + new_value = knob->adjustment->lower; + + if (new_value > knob->adjustment->upper) + new_value = knob->adjustment->upper; + + if (new_value != knob->adjustment->value) { + knob->adjustment->value = new_value; + gtk_signal_emit_by_name(GTK_OBJECT(knob->adjustment), "value_changed"); + } + + gtk_widget_draw(GTK_WIDGET(knob), NULL); +} + +static void gtk_knob_adjustment_changed(GtkAdjustment *adjustment, gpointer data) { + GtkKnob *knob; + + g_return_if_fail(adjustment != NULL); + g_return_if_fail(data != NULL); + + knob = GTK_KNOB(data); + + if ((knob->old_value != adjustment->value) || + (knob->old_lower != adjustment->lower) || + (knob->old_upper != adjustment->upper)) { + gtk_knob_update (knob); + + knob->old_value = adjustment->value; + knob->old_lower = adjustment->lower; + knob->old_upper = adjustment->upper; + } +} + +static void gtk_knob_adjustment_value_changed (GtkAdjustment *adjustment, gpointer data) { + GtkKnob *knob; + + g_return_if_fail(adjustment != NULL); + g_return_if_fail(data != NULL); + + knob = GTK_KNOB(data); + + if (knob->old_value != adjustment->value) { + gtk_knob_update (knob); + + knob->old_value = adjustment->value; + } +} diff --git a/veejay-client/src/widgets/gtkknob.h b/veejay-client/src/widgets/gtkknob.h new file mode 100644 index 00000000..1c79b198 --- /dev/null +++ b/veejay-client/src/widgets/gtkknob.h @@ -0,0 +1,86 @@ +/* gAlan - Graphical Audio Language + * Copyright (C) 1999 Tony Garnock-Jones + * + * 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 + */ + +#ifndef __GTK_KNOB_H__ +#define __GTK_KNOB_H__ + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define PIXMAPDIRIFY(filename) \ + (SITE_PKGDATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S filename) + +#define GTK_KNOB(obj) GTK_CHECK_CAST(obj, gtk_knob_get_type(), GtkKnob) +#define GTK_KNOB_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, gtk_knob_get_type(), GtkKnobClass) +#define GTK_IS_KNOB(obj) GTK_CHECK_TYPE(obj, gtk_knob_get_type()) + +typedef struct _GtkKnob GtkKnob; +typedef struct _GtkKnobClass GtkKnobClass; + +struct _GtkKnob { + GtkWidget widget; + + /* update policy (GTK_UPDATE_[CONTINUOUS/DELAYED/DISCONTINUOUS]) */ + guint policy : 2; + + /* State of widget (to do with user interaction) */ + guint8 state; + gint saved_x, saved_y; + + /* ID of update timer, or 0 if none */ + guint32 timer; + + /* Pixmap for knob */ + GdkPixbuf *pixbuf; + /* Animation for knob... from animated gif */ + GList *anim_list; + + /* Old values from adjustment stored so we know when something changes */ + gfloat old_value; + gfloat old_lower; + gfloat old_upper; + + /* The adjustment object that stores the data for this knob */ + GtkAdjustment *adjustment; + char *path; +}; + +struct _GtkKnobClass +{ + GtkWidgetClass parent_class; +}; + +extern GtkWidget *gtk_knob_new(GtkAdjustment *adjustment, const char *path); +extern guint gtk_knob_get_type(void); + +extern GtkAdjustment *gtk_knob_get_adjustment(GtkKnob *knob); +extern void gtk_knob_set_update_policy(GtkKnob *knob, GtkUpdateType policy); + +extern void gtk_knob_set_adjustment(GtkKnob *knob, GtkAdjustment *adjustment); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/veejay-client/src/widgets/gtktimeselection.c b/veejay-client/src/widgets/gtktimeselection.c new file mode 100644 index 00000000..cdbda85a --- /dev/null +++ b/veejay-client/src/widgets/gtktimeselection.c @@ -0,0 +1,848 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + Implements a new slider type widget with selection markers + + */ + +#include +#include +#include +#include +#include + +#include "gtktimeselection.h" + +enum +{ + POS_CHANGED, + IN_CHANGED, + OUT_CHANGED, + BIND_CHANGED, + CLEAR_CHANGED, + SELECTION_CHANGED_SIGNAL, + LAST_SIGNAL +}; + +enum +{ + MIN = 1, + MAX = 2, + POS = 3, + LENGTH = 4, + IN_POINT = 5, + OUT_POINT = 6, + SEL = 7, + BIND = 8, + CLEARED = 9, +}; + +typedef enum { + MOUSE_OUTSIDE, + MOUSE_STEPPER, + MOUSE_SELECTION, + MOUSE_WIDGET /* inside widget but not in any of the above */ +} mouse_location; + + +/* Slider with 2 bars + + + +*/ + +typedef enum TimelineAction +{ + action_none = 0, + action_in_point, + action_out_point, + action_pos, + action_atomic, +} TimelineAction; + +#define POINT_IN_RECT(xcoord, ycoord, rect) \ + ((xcoord) >= (rect).x && \ + (xcoord) < ((rect).x + (rect).width) && \ + (ycoord) >= (rect).y && \ + (ycoord) < ((rect).y + (rect).height)) + +struct _TimelineSelection +{ + GtkCairo cr; + GtkWidget *widget; + gdouble min; + gdouble max; + gdouble value; + gdouble frame_num; + gdouble num_video_frames; + gdouble in; + gdouble out; + gboolean bind; + gint grab_button; + TimelineAction action; + mouse_location grab_location; + mouse_location current_location; + GdkRectangle stepper; + GdkRectangle selection; + gboolean has_stepper; + gboolean clear; + gdouble stepper_size; /* size of triangle */ + gdouble stepper_draw_size; + gdouble stepper_length; /* length from top to bottom */ + gint step_size; /* step frames 1,2,4,8,16, ... */ + gdouble frame_width; + gdouble frame_height; + gdouble font_line; + gboolean has_selection; /* use in/out points for selection */ + gdouble move_x; +}; + +static void get_property( GObject *object, + guint id, GValue *value , GParamSpec *pspec ); + +static void set_property (GObject *object, + guint id, GValue * value, GParamSpec *pspec); + +static gboolean event_press (GtkWidget *widget, GdkEventButton *bev, gpointer user_data); + +static gboolean event_release (GtkWidget *widget, GdkEventButton *bev, gpointer user_data); + +static gboolean event_motion (GtkWidget *widget, GdkEventMotion *mev, gpointer user_data); + +static void timeline_class_init( TimelineSelectionClass *class ); + +static void timeline_init(TimelineSelection *te ); + +static void paint(GtkWidget *widget, cairo_t *cr, gpointer user_data); + +static GObjectClass *parent_class = NULL; +static gint timeline_signals[LAST_SIGNAL] = { 0 }; + +struct _TimelineSelectionClass +{ + GtkCairoClass parent_class; + void (*pos_changed) (TimelineSelection *te); + void (*in_point_changed) (TimelineSelection *te); + void (*out_point_changed) (TimelineSelection *te); + void (*bind_toggled) (TimelineSelection *te); + void (*cleared) (TimelineSelection *te); +}; +static void set_property (GObject *object, + guint id, GValue *value, GParamSpec *pspec) +{ + TimelineSelection *te = TIMELINE_SELECTION(object); + switch(id) + { + case MIN: + if(te->min != g_value_get_double(value)) + { + te->min = g_value_get_double(value); + } + break; + case MAX: + if(te->max != g_value_get_double(value)) + { + te->min = g_value_get_double(value); + } + break; + case POS: + if(te->frame_num != g_value_get_double(value)) + { + te->frame_num = g_value_get_double(value); + } + break; + case LENGTH: + if(te->num_video_frames != g_value_get_double(value)) + { + te->num_video_frames = g_value_get_double(value); + } + break; + case IN_POINT: + if(te->in != g_value_get_double(value)) + { + te->in = g_value_get_double(value); + } + break; + case OUT_POINT: + if(te->out != g_value_get_double(value)) + { + te->out = g_value_get_double(value); + } + break; + case SEL: + if(te->has_selection != g_value_get_boolean(value)) + { + te->has_selection = g_value_get_boolean(value); + } + break; + case BIND: + if(te->bind != g_value_get_boolean(value)) + { + te->bind = g_value_get_boolean(value); + } + break; + case CLEARED: + if(te->clear != g_value_get_boolean(value)) + { + te->clear = g_value_get_boolean(value); + } + break; + default: + g_assert(FALSE); + break; + } + gtk_widget_queue_draw( GTK_WIDGET( te )); + +} + +static void get_property( GObject *object, + guint id, GValue *value , GParamSpec *pspec ) +{ + TimelineSelection *te = TIMELINE_SELECTION(object); + switch( id ) + { + case MIN: g_value_set_double( value, te->min );break; + case MAX: g_value_set_double( value, te->max );break; + case POS: g_value_set_double( value, te->frame_num ); break; + case LENGTH: g_value_set_double( value, te->num_video_frames ); break; + case IN_POINT: g_value_set_double( value, te->in ); break; + case OUT_POINT: g_value_set_double( value, te->out ); break; + case SEL: g_value_set_boolean(value, te->has_selection) ; break; + case BIND: g_value_set_boolean(value, te->bind ); break; + case CLEARED: g_value_set_boolean(value,te->clear );break; + } +} + +static void finalize (GObject *object) +{ + parent_class->finalize( object ); +} + +static void timeline_class_init( TimelineSelectionClass *class ) +{ + GObjectClass *gobject_class; + gobject_class = G_OBJECT_CLASS( class ); + parent_class = g_type_class_peek( GTK_TYPE_CAIRO ); + gobject_class->finalize = finalize; + gobject_class->get_property = get_property; + gobject_class->set_property = set_property; + + g_object_class_install_property( gobject_class, + MIN, + g_param_spec_double( "min", + "left", "left", 0.0, 1.0, 0.0, G_PARAM_READWRITE )); + + g_object_class_install_property( gobject_class, + MAX, + g_param_spec_double( "max", + "right", "right", 0.0, 1.0, 1.0, G_PARAM_READWRITE )); + + g_object_class_install_property( gobject_class, + POS, + g_param_spec_double( "pos", + "current position", "current position", 0.0,9999999.0, 0.0, + G_PARAM_READWRITE )); + + g_object_class_install_property( gobject_class, + LENGTH, + g_param_spec_double( "length", + "Length (in frames)", "Length (in frames) ",0.0,9999999.0, 1.0, + G_PARAM_READWRITE )); + + + g_object_class_install_property( gobject_class, + IN_POINT, + g_param_spec_double( "in", + "In point", "(in frames) ",0.0,1.0, 0.0, + G_PARAM_READWRITE )); + + + g_object_class_install_property( gobject_class, + OUT_POINT, + g_param_spec_double( "out", + "Out point", "(in frames) ",0.0,1.0, 1.0, + G_PARAM_READWRITE )); + + g_object_class_install_property( gobject_class, + SEL, + g_param_spec_boolean( "selection", + "Marker", "(in frames) ",FALSE, + G_PARAM_READWRITE )); + + g_object_class_install_property( gobject_class, + BIND, + g_param_spec_boolean( "bind", "Bind marker", "Bind In/Out points", FALSE, G_PARAM_READWRITE)); + + g_object_class_install_property( gobject_class, + CLEARED, + g_param_spec_boolean( "clear", "Clear marker", "Clear in/out points", FALSE, G_PARAM_READWRITE )); + + timeline_signals[ SELECTION_CHANGED_SIGNAL ] = + g_signal_new( "selection_changed", + G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_FIRST,0,NULL,NULL, + g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0 , NULL ); + + timeline_signals[ POS_CHANGED ] = + g_signal_new( "pos_changed", + G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET( TimelineSelectionClass, pos_changed ), + NULL,NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0, NULL); + + timeline_signals[ IN_CHANGED ] = + g_signal_new( "in_point_changed", + G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET( TimelineSelectionClass, in_point_changed ), + NULL,NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0, NULL); + + timeline_signals[ OUT_CHANGED ] = + g_signal_new( "out_point_changed", + G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET( TimelineSelectionClass, out_point_changed ), + NULL,NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0, NULL); + + timeline_signals[ CLEAR_CHANGED ] = + g_signal_new( "cleared", G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET( TimelineSelectionClass, cleared ), + NULL,NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0, NULL ); + + timeline_signals[ BIND_CHANGED ] = + g_signal_new( "bind_toggled", + G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET( TimelineSelectionClass, bind_toggled ), + NULL,NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0, NULL ); + +} + +static int default_theme_ = 1; + +void timeline_theme_colors( int inverse ) +{ + default_theme_ = inverse; +} + +static void timeline_init( TimelineSelection *te ) +{ + te->min = 0.0; + te->max = 0.0; + te->action = action_none; + te->in = 0.0; + te->out = 1.0; + te->num_video_frames = 1.0; + te->frame_num = 0.0; + te->grab_location = MOUSE_OUTSIDE; + te->current_location = MOUSE_OUTSIDE; + te->grab_button = 0; + te->has_stepper = TRUE; + te->has_selection = FALSE; + te->stepper_size = 16; // 8 x 8 pixels + te->stepper_draw_size = 12; + te->stepper_length = 0; + te->frame_height = 10; + te->font_line = 12; + te->move_x = 0; +} + +GType timeline_get_type(void) +{ + static GType gtype = 0; + if(!gtype) + { + static const GTypeInfo ginfo = { + sizeof( TimelineSelectionClass), + NULL, + NULL, + (GClassInitFunc) timeline_class_init, + NULL, + NULL, + sizeof(TimelineSelection), + 0, + (GInstanceInitFunc) timeline_init, + NULL + }; + gtype = g_type_register_static( GTK_TYPE_CAIRO, "Timeline", &ginfo, 0 ); + } + return gtype; +} + + + +gdouble timeline_get_in_point( TimelineSelection *te ) +{ + gdouble result = 0.0; + g_object_get( G_OBJECT(te), "in", &result, NULL ); + return result; +} + +gdouble timeline_get_out_point( TimelineSelection *te ) +{ + gdouble result = 0.0; + g_object_get( G_OBJECT(te), "out", &result, NULL ); + return result; +} + +gboolean timeline_get_selection( TimelineSelection *te ) +{ + gboolean result = FALSE; + g_object_get( G_OBJECT(te), "selection", &result, NULL ); + return result; +} + +gboolean timeline_get_bind( TimelineSelection *te ) +{ + gboolean result = FALSE; + g_object_get( G_OBJECT(te), "bind", &result, NULL ); + return result; +} + +void timeline_set_bind(GtkWidget *widget, gboolean active) +{ + TimelineSelection *te = TIMELINE_SELECTION(widget); + g_object_set( G_OBJECT(te), "bind", active, NULL ); + g_signal_emit( te->widget, timeline_signals[BIND_CHANGED], 0); +} + +void timeline_set_out_point( GtkWidget *widget, gdouble pos ) +{ + TimelineSelection *te = TIMELINE_SELECTION(widget); + if( pos < 0.0 ) pos = 0.0; else if (pos > 1.0 ) pos = 1.0; + g_object_set( G_OBJECT(te), "out", pos, NULL ); + g_signal_emit(te->widget, timeline_signals[OUT_CHANGED], 0); + gtk_widget_queue_draw( GTK_WIDGET(te->widget) ); +} + +void timeline_clear_points( GtkWidget *widget ) +{ + gboolean cleared = TRUE; + gdouble pos = 0.0; + gdouble pos2 = 1.0; + TimelineSelection *te = TIMELINE_SELECTION(widget); + g_object_set( G_OBJECT(te), "clear", cleared, NULL ); + g_object_set( G_OBJECT(te), "in", pos, NULL ); + g_object_set( G_OBJECT(te), "out", pos2, NULL ); + g_signal_emit(te->widget, timeline_signals[CLEAR_CHANGED], 0 ); + gtk_widget_queue_draw(GTK_WIDGET(te->widget) ); +} + +void timeline_set_in_point( GtkWidget *widget, gdouble pos ) +{ + TimelineSelection *te = TIMELINE_SELECTION(widget); + if( pos < 0.0 ) pos = 0.0; else if (pos > 1.0 ) pos = 1.0; + g_object_set( G_OBJECT(te), "in", pos, NULL ); + g_signal_emit(te->widget, timeline_signals[IN_CHANGED], 0); + gtk_widget_queue_draw( GTK_WIDGET(te->widget) ); +} + +void timeline_set_selection( GtkWidget *widget, gboolean active) +{ + TimelineSelection *te = TIMELINE_SELECTION(widget); + g_object_set( G_OBJECT(te), "selection", active, NULL ); + gtk_widget_queue_draw( GTK_WIDGET(te->widget) ); +} + +void timeline_set_length( GtkWidget *widget, gdouble length, gdouble pos) +{ + TimelineSelection *te = TIMELINE_SELECTION( widget ); + if( pos < 0.0 ) pos = 0.0; + g_object_set( G_OBJECT(te), "length", length, NULL ); + timeline_set_pos( GTK_WIDGET(te->widget), pos ); +} + +void timeline_set_pos( GtkWidget *widget,gdouble pos) +{ + TimelineSelection *te = TIMELINE_SELECTION( widget ); + if( pos < 0.0 ) pos = 0.0; + g_object_set( G_OBJECT(te), "pos", pos, NULL ); + g_signal_emit( te->widget, timeline_signals[POS_CHANGED], 0); + gtk_widget_queue_draw( GTK_WIDGET(te->widget) ); +} + +gdouble timeline_get_pos( TimelineSelection *te ) +{ + gdouble result = 0.0; + g_object_get( G_OBJECT(te), "pos", &result, NULL ); + return result; +} + +gdouble timeline_get_length( TimelineSelection *te ) +{ + gdouble result = 0.0; + g_object_get( G_OBJECT(te), "length", &result, NULL ); + return result; +} + +static void move_selection( GtkWidget *widget, gdouble x, gdouble width ) +{ + TimelineSelection *te = TIMELINE_SELECTION( widget ); + + gdouble dx3 = (0.5 * (te->out - te->in)) * width; + + gdouble dx1 = x - dx3; + gdouble dx2 = x + dx3; + + te->in = (1.0/width) * dx1; + te->out = (1.0/width ) * dx2; + + timeline_set_out_point(widget, te->out ); + timeline_set_in_point(widget, te->in ); + te->move_x = x; + +} + +static gboolean event_press(GtkWidget *widget, GdkEventButton *ev, gpointer user_data) +{ + TimelineSelection *te = TIMELINE_SELECTION( widget ); + gdouble width = widget->allocation.width; + + te->grab_button = ev->button; + te->current_location = MOUSE_WIDGET; + + if( ev->type == GDK_2BUTTON_PRESS && te->grab_button == 1 ) + { + timeline_clear_points( widget ); + return FALSE; + } + + if(te->grab_button == 1 && POINT_IN_RECT( ev->x, ev->y, te->stepper ) ) + { + if(te->has_stepper) + { + te->current_location = MOUSE_STEPPER; + te->action = action_pos; + } + return FALSE; + } + + if(te->grab_button == 1 && te->has_selection) + { + if( POINT_IN_RECT( ev->x, ev->y, te->selection ) && te->bind ) + { + te->current_location = MOUSE_SELECTION; + } + if(!te->bind) + { + gdouble val = (1.0 / width) * ev->x; + timeline_set_in_point( widget, val ); + } + } + else if(te->grab_button == 3 && te->has_selection ) + { + if( POINT_IN_RECT( ev->x, ev->y, te->selection ) && te->bind ) + { + te->current_location = MOUSE_SELECTION; + } + if(!te->bind) + { + gdouble val = (1.0/width) * ev->x; + timeline_set_out_point( widget, val ); + } + } + else if(te->grab_button == 2 && te->has_selection) + { + gint dx = ev->x; + gint dy = ev->y; + if( POINT_IN_RECT( dx, dy, te->selection ) ) + { + timeline_set_bind( widget, (te->bind ? FALSE: TRUE )); + te->move_x = (gdouble) ev->x; + } + } + + + gtk_widget_queue_draw( widget ); + + return FALSE; +} +static gboolean event_release (GtkWidget *widget, GdkEventButton *ev, gpointer user_data) +{ + TimelineSelection *te = TIMELINE_SELECTION (widget); + te->action = action_none; + te->current_location = MOUSE_WIDGET; +// te->grab_button = 0; +// te->move_x = 0; + return FALSE; +} + +static gboolean +event_motion (GtkWidget *widget, GdkEventMotion *ev, gpointer user_data) +{ + TimelineSelection *te = TIMELINE_SELECTION (widget); + gdouble width = (gdouble) widget->allocation.width; + gint x,y; + GdkModifierType state; + gdk_window_get_pointer( ev->window, &x,&y,&state ); + + + if( te->has_stepper && te->current_location == MOUSE_STEPPER && ev->state & GDK_BUTTON1_MASK) + { + gdouble rel_pos = ((gdouble)ev->x / width) * te->num_video_frames; + gdouble new_pos = (gdouble) ((gint) rel_pos ); + + timeline_set_pos( widget, new_pos ); + return FALSE; + } + + if( te->has_selection && te->current_location != MOUSE_STEPPER) + { + if(!te->bind) + { + gdouble gx = (1.0 / width) * x; + if(te->grab_button == 1 && ev->state & GDK_BUTTON1_MASK) + timeline_set_in_point(widget, gx ); + else if(te->grab_button == 3 && ev->state & GDK_BUTTON3_MASK) + timeline_set_out_point( widget, gx ); + } + } + + if(te->has_selection && te->bind && te->grab_button == 2 ) + move_selection( widget, x, width ); + + gtk_widget_queue_draw( widget ); + + return FALSE; +} +/* draw a rounded rectangle */ +void +cairo_rectangle_round (cairo_t * cr, + double x0, + double y0, double width, double height, double radius) +{ + double x1, y1; + + x1 = x0 + width; + y1 = y0 + height; + if (width <= 0.001 || height <= 0.001) + return; + if (width / 2 < radius) + { + if (height / 2 < radius) + { + cairo_move_to (cr, x0, (y0 + y1) / 2); + cairo_curve_to (cr, x0, y0, x0, y0, (x0 + x1) / 2, y0); + cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1) / 2); + cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0) / 2, y1); + cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1) / 2); + } + else + { + cairo_move_to (cr, x0, y0 + radius); + cairo_curve_to (cr, x0, y0, x0, y0, (x0 + x1) / 2, y0); + cairo_curve_to (cr, x1, y0, x1, y0, x1, y0 + radius); + cairo_line_to (cr, x1, y1 - radius); + cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0) / 2, y1); + cairo_curve_to (cr, x0, y1, x0, y1, x0, y1 - radius); + } + } + else +{ + if (height / 2 < radius) + { + cairo_move_to (cr, x0, (y0 + y1) / 2); + cairo_curve_to (cr, x0, y0, x0, y0, x0 + radius, y0); + cairo_line_to (cr, x1 - radius, y0); + cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1) / 2); + cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1); + cairo_line_to (cr, x0 + radius, y1); + cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1) / 2); + } + else + { + cairo_move_to (cr, x0, y0 + radius); + cairo_curve_to (cr, x0, y0, x0, y0, x0 + radius, y0); + cairo_line_to (cr, x1 - radius, y0); + cairo_curve_to (cr, x1, y0, x1, y0, x1, y0 + radius); + cairo_line_to (cr, x1, y1 - radius); + cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1); + cairo_line_to (cr, x0 + radius, y1); + cairo_curve_to (cr, x0, y1, x0, y1, x0, y1 - radius); + } + } + cairo_close_path (cr); +} + +static void paint (GtkWidget *widget, cairo_t * cr, gpointer user_data) +{ + TimelineSelection *te = TIMELINE_SELECTION( widget ); + double width = widget->allocation.width; + double height = widget->allocation.height; + + gdouble marker_width = width/ te->num_video_frames; +// gdouble marker_height = height / te->num_video_frames; + gdouble marker_height = te->frame_height; + + te->frame_width = marker_width; + + cairo_save(cr); + cairo_identity_matrix(cr); + +/* Draw frames*/ + /* Drawing many boxes cause CPU hog .. */ +/* + + cairo_set_source_rgba( cr, 0.0, 0.0, 0.0, 0.2 ); + for(i =0; i < te->num_video_frames; i ++ ) + { + double x1 = marker_width * i; + double x2 = x1 + frame_width; + cairo_rectangle_round(cr, x1, height - te->stepper_size, frame_width, marker_height, 4); + } + cairo_stroke(cr); */ + +// cairo_fill(cr); +/* Draw stepper */ + if( te->has_stepper ) + { + cairo_set_source_rgba( cr, 1.0,0.0,0.0,1.0); + double x1 = marker_width * te->frame_num; + te->stepper.x = x1 - 8; + te->stepper.y = 0; + te->stepper.width = te->stepper_size + 8; + te->stepper.height = te->stepper_size + 2; + + // cairo_set_line_width( cr, 0.16 ); + cairo_move_to( cr, x1 - te->stepper_draw_size, 0.0 * height ); + cairo_rel_line_to( cr, te->stepper_draw_size, te->stepper_draw_size ); + cairo_rel_line_to( cr, te->stepper_draw_size, -te->stepper_draw_size ); + cairo_rel_line_to( cr, -2.0 * te->stepper_draw_size, 0 ); + cairo_set_line_join( cr, CAIRO_LINE_JOIN_MITER); + cairo_move_to(cr, x1, te->stepper_draw_size ); + cairo_rel_line_to( cr, 0.0, te->stepper_length ); + cairo_stroke(cr); + //cairo_fill_preserve(cr); + if( te->grab_button == 1 && te->current_location == MOUSE_STEPPER ) + { + cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, + CAIRO_FONT_WEIGHT_BOLD ); + + cairo_move_to(cr, x1 + (te->stepper_size * 0.5),te->font_line ); + gchar text[40]; + sprintf(text, "%d", (gint)te->frame_num ); + cairo_text_path( cr, text ); + cairo_set_font_size( cr, 0.2 ); + double v = ( default_theme_ ? 1.0 : 0.0 ); + cairo_set_source_rgba( cr, v,v,v,0.7 ); + cairo_fill(cr); + } + //cairo_fill_preserve(cr); + } +/* Draw selection */ + if( te->has_selection ) + { + gdouble in = te->in * width; + gdouble out = te->out * width; + gdouble v = (default_theme_ ? 1.0: 0.0); + + /* If user is editing in_point */ + if( te->grab_button == 1 && te->current_location != MOUSE_STEPPER ) + { + gdouble f = te->in * te->num_video_frames; + cairo_set_source_rgba( cr, 0.0, v,v,0.3 ); + cairo_move_to( cr, in, 0.0 ); + cairo_rel_line_to( cr, 0.0 , te->stepper_length ); + cairo_stroke(cr); + + cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, + CAIRO_FONT_WEIGHT_BOLD ); + + cairo_move_to(cr, in , te->font_line ); + gchar text[40]; + sprintf(text, "%d",(gint) f ); + cairo_text_path( cr, text ); + cairo_set_font_size( cr, 0.2 ); + cairo_set_source_rgba( cr, v,v,v,0.7 ); + cairo_fill(cr); + + } + if( te->grab_button == 3 && te->current_location != MOUSE_STEPPER ) + { + gdouble f = te->out * te->num_video_frames; + cairo_set_source_rgba( cr, 0.0, v,v,0.3 ); + cairo_move_to( cr, out , 0.0 ); + cairo_rel_line_to( cr, 0.0 , te->stepper_length ); + cairo_stroke(cr); + + cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, + CAIRO_FONT_WEIGHT_BOLD ); + + cairo_move_to(cr, out ,te->font_line ); + gchar text[40]; + sprintf(text, "%d", (gint) f ); + cairo_text_path( cr, text ); + cairo_set_font_size( cr, 0.2 ); + cairo_set_source_rgba( cr, v,v,v,0.7 ); + cairo_fill(cr); + + } + + cairo_set_source_rgba( cr, v, v, v, 0.3 ); + cairo_rectangle_round(cr, in, + 0.095 * height, + (out - in), + marker_height, + 10); + te->selection.x = in; + te->selection.y = 0; + te->selection.width = out; + te->selection.height = te->font_line; + cairo_fill_preserve(cr); + } + cairo_restore(cr); +} + +GtkWidget *timeline_new(void) +{ + GtkWidget *widget = GTK_WIDGET( g_object_new( timeline_get_type(), NULL )); + TimelineSelection *te = TIMELINE_SELECTION( widget ); + + gtk_widget_set_size_request(widget, 200,16 ); + + gtk_widget_set_events( widget, + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK | + GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + GDK_BUTTON3_MOTION_MASK | GDK_2BUTTON_PRESS ); + + g_signal_connect( G_OBJECT(widget), "paint", G_CALLBACK(paint), NULL ); + g_signal_connect( G_OBJECT(widget), "motion_notify_event", + G_CALLBACK(event_motion), NULL ); + g_signal_connect( G_OBJECT(widget), "button_press_event", + G_CALLBACK(event_press), NULL ); + g_signal_connect( G_OBJECT(widget), "button_release_event", + G_CALLBACK(event_release), NULL ); + + te->widget = widget; + + return widget; +} diff --git a/veejay-client/src/widgets/gtktimeselection.h b/veejay-client/src/widgets/gtktimeselection.h new file mode 100644 index 00000000..4e6f3e33 --- /dev/null +++ b/veejay-client/src/widgets/gtktimeselection.h @@ -0,0 +1,68 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef GTKTIMESELECTION_H +#define GTKTIMESELECTION_H + +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +#define TIMELINE_SELECTION(obj) GTK_CHECK_CAST(obj, timeline_get_type(), TimelineSelection ) + +#define TIMELINE_SELECTION_CLASS(klass) GTK_CHECK_CLASS_CAST( klass, timeline_get_type(), TimelineSelectionClass ) + +#define IS_TIMELINE_SELECTION(obj) GTK_CHECK_TYPE( obj, timeline_get_type() ) + +typedef struct _TimelineSelection TimelineSelection; +typedef struct _TimelineSelectionClass TimelineSelectionClass; + +GtkType timeline_get_type (void); +GtkWidget* timeline_new (void); + +gdouble timeline_get_length (TimelineSelection *te); +gdouble timeline_get_pos (TimelineSelection *te); +gdouble timeline_get_in_point (TimelineSelection *te ); +gdouble timeline_get_out_point (TimelineSelection *te ); +gboolean timeline_get_selection (TimelineSelection *te ); +gboolean timeline_get_bind (TimelineSelection *te ); + +void timeline_set_pos (GtkWidget *widget, gdouble pos ); + +void timeline_set_in_point (GtkWidget *widget, gdouble pos); +void timeline_set_out_point (GtkWidget *widget, gdouble pos); + +void timeline_set_length (GtkWidget *widget, gdouble length, gdouble pos); + +void timeline_set_bind (GtkWidget *widget, gboolean active); + + +void timeline_clear_points( GtkWidget *widget ); + +void timeline_set_selection( GtkWidget *widget, gboolean active); +void timeline_theme_colors( int inverse ); + + +#ifdef __cplusplus +} +#endif +#endif diff --git a/veejay-client/stamp-h1 b/veejay-client/stamp-h1 new file mode 100644 index 00000000..4547fe1b --- /dev/null +++ b/veejay-client/stamp-h1 @@ -0,0 +1 @@ +timestamp for config.h diff --git a/veejay-server/AUTHORS b/veejay-server/AUTHORS new file mode 100644 index 00000000..d0d0ba5b --- /dev/null +++ b/veejay-server/AUTHORS @@ -0,0 +1,30 @@ + +veejay contributors: +==================== + + (in no particular order) + + Jeff Carpenter + David Denny + Daniel Jircik + Pilo Chambert + Matthijs van Henten + Dursun Koca + Peter de Man + Stefan Thieme + Andrew Wood + Kyle Davenport + Daniel Rohr + Rupert Reddington + Toni (from Germany) + Thomas Reinhold + Maciek Szczesniak + + +authors: +====================== + + Niels Elburg + + + diff --git a/veejay-server/COPYING b/veejay-server/COPYING new file mode 100644 index 00000000..223ede7d --- /dev/null +++ b/veejay-server/COPYING @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/veejay-server/ChangeLog b/veejay-server/ChangeLog new file mode 100644 index 00000000..41e9dec2 --- /dev/null +++ b/veejay-server/ChangeLog @@ -0,0 +1 @@ + diff --git a/veejay-server/INSTALL b/veejay-server/INSTALL new file mode 100644 index 00000000..5458714e --- /dev/null +++ b/veejay-server/INSTALL @@ -0,0 +1,234 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/veejay-server/Makefile.am b/veejay-server/Makefile.am new file mode 100644 index 00000000..b23fe468 --- /dev/null +++ b/veejay-server/Makefile.am @@ -0,0 +1,52 @@ +# Process with automake to produce Makefile.in + +SUBDIRS = aclib bio2jack libOSC libhash libvjmsg libvjmem +SUBDIRS += libvevo liblzo libgoom libvje libsample libvjnet libyuv libel libstream liblavjpeg libsamplerec +SUBDIRS += veejay +SUBDIRS += man + +EXTRA_DIST = \ + autogen.sh\ + depcomp \ + cpuinfo.sh \ + autogen.sh \ + gveejay-paths.sh.in + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = veejay.pc + +DISTCLEANFILES = \ + veejay-config.h \ + veejay.pc \ + confdefs.h \ + config.cache \ + config.status \ + config.log \ + gveejay-paths.h + +MAINTAINERCLEANFILES = \ + compile \ + depcomp \ + install-sh \ + missing \ + mkinstalldirs \ + Makefile.in \ + aclocal.m4 \ + config.guess \ + config.h.in \ + config.sub \ + configure \ + ltmain.sh \ + stamp-h.in + +## make rpms +rpm: Makefile + $(MAKE) dist + rpmbuild -ta --clean $(PACKAGE)-$(VERSION).tar.gz + +## make debs +deb: Makefile dist + -chmod -R +w $(PACKAGE)-$(VERSION) + rm -rf $(PACKAGE)-$(VERSION) + tar xzf $(PACKAGE)-$(VERSION).tar.gz + cd $(PACKAGE)-$(VERSION); dpkg-buildpackage -rfakeroot diff --git a/veejay-server/Makefile.in b/veejay-server/Makefile.in new file mode 100644 index 00000000..d8063e5d --- /dev/null +++ b/veejay-server/Makefile.in @@ -0,0 +1,777 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Process with automake to produce Makefile.in + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/veejay.pc.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh ltmain.sh missing ylwrap +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(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 = config.h +CONFIG_CLEAN_FILES = veejay.pc +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = aclib bio2jack libOSC libhash libvjmsg libvjmem libvevo \ + liblzo libgoom libvje libsample libvjnet libyuv libel \ + libstream liblavjpeg libsamplerec veejay man +EXTRA_DIST = \ + autogen.sh\ + depcomp \ + cpuinfo.sh \ + autogen.sh \ + gveejay-paths.sh.in + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = veejay.pc +DISTCLEANFILES = \ + veejay-config.h \ + veejay.pc \ + confdefs.h \ + config.cache \ + config.status \ + config.log \ + gveejay-paths.h + +MAINTAINERCLEANFILES = \ + compile \ + depcomp \ + install-sh \ + missing \ + mkinstalldirs \ + Makefile.in \ + aclocal.m4 \ + config.guess \ + config.h.in \ + config.sub \ + configure \ + ltmain.sh \ + stamp-h.in + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(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 config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +veejay.pc: $(top_builddir)/config.status $(srcdir)/veejay.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) 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; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-pkgconfigDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-pkgconfigDATA + + +rpm: Makefile + $(MAKE) dist + rpmbuild -ta --clean $(PACKAGE)-$(VERSION).tar.gz + +deb: Makefile dist + -chmod -R +w $(PACKAGE)-$(VERSION) + rm -rf $(PACKAGE)-$(VERSION) + tar xzf $(PACKAGE)-$(VERSION).tar.gz + cd $(PACKAGE)-$(VERSION); dpkg-buildpackage -rfakeroot +# 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/veejay-server/NEWS b/veejay-server/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/veejay-server/README b/veejay-server/README new file mode 100644 index 00000000..febbc635 --- /dev/null +++ b/veejay-server/README @@ -0,0 +1,196 @@ + + + + + 10x0 0x x10x0x10x0x10x 10x0x10x0x10x0 x0x1 x0x1 10x0 x0x1 + 0x10x0 0x0x x10x0x10x0x10x 10x0x10x0x10x0 x0x1 10x0x10x 10x0x1 10x0x1 +0x0x10 0x0x10 x10x 10x0 x0x1 10x0x10x x0x10x 10x0 +0x0x10x0 0x0x10 x10x0x10x0x1 10x0x10x0x10 x0x1 0x10 0x0 x10x0x10 + 0x10x0 x10x0x x10x0x10x0x10x 10x0x10x0x10 x0x1 0x10x0x10x0 x10x0x10 + 10x0x1 x0x10x x10x 10x0 x0x1 0x10x0x10x0 0x0x + x0x10x0x10x0x1 x10x 10x0 x10x x0x1 0x10x0x10x0x10 0x0x + x10x0x10x0 x10x0x10x0x10x 10x0x10x0x10x0 x10x 10x0 0x0x 0x10 0x0x + 0x0x10 x10x0x10x0x10x 10x0x10x0x10x0 0x010x0 0x0x 0x10 0x0x + + version 1.2 + + + ========================================= + + :: Veejay, a visual instrument for GNU :: + http://veejay.dyne.org + + + Veejay - a 'visual' instrument and realtime video sampler + +Veejay is a visual instrument and real-time video sampler. +It allows you to "play" the video like you would play a piano. +While playing, you can record the resulting video directly to disk (video sampling). + + + + FEATURE OVERVIEW + +General +------- + # Free Software (GNU GPL) (1) + # Servent architecture (2) + # Soft realtime (3) + # Frame accurate (4) + # Loop based editing (5) + # Native YUV processing + # Crash recovery + +Media +----- + # Codecs: MJPEG,MPNG, DV, YUV (raw) + # Containers: AVI , Quicktime, rawDV + # Devices: USB webcams, DV1394, TV capture cards, etc. + # Support for unlimited capture devices + # Support for Image files (PNG ,JPEG,TIFF,etc) + +Editing +------- + # 132 built-in FX , many unique and original FX filters + # FX chain (20 slots) + # All FX parameters can be animated. + # Mix up to two layers per FX slot + # Non destructive edit decision lists (cut/copy/paste/crop video) + # Simple text editor + # Sample editor + # Sequence editor + # Live disk recorder (sampling) + # Full deck save/restore + # Live clip loading + # Live sample sequencing + + + +Trickplay +--------- + # VIMS event recording/playback (6) + # Various looping modes including bounce looping + # Playback speed and direction + # Video scratching + # Change in-and out points of a sample (marker) + # Slow motion audio / video (7) + # Fast motion audio / video + # Dynamic framerate + # Random frame play + # Random sample play + # Access up to 4096 video samples instantly + +Output +------ + # Audio trough Jack (low latency audio server) (8) + # SDL and OpenGL video + # Headless + # YUV4MPEG streaming + # Network streaming (unicast and multicast) + # Preview rendering + +Interaction +----------- + # Programmable keyboard interface + # VIMS (tcp/ip) + # OSC (udp) + # PureData trough sendVIMS external + +Viewing +------- + # Full screen or windowed mode + # Perspective and foward projection (9) + + +Additional +---------- + # Support for FreeFrame plugins + # Support for Frei0r plugins + + + + + +(1) Free Software + A matter of liberty, not price. You should think of “free” as in free speech. + Free software is the matter of the users freedom to run, copy, distribute, study, change and improve the software. + +(2) A servent architecture is a peer-to-peer network mode with both functionalities of a + server and a client. The setup is designed so that each veejay-node can send and receive video, + allowing for the creation and maintenance of ad-hoc veejay-networks. + Reloaded , veejay's graphical interface, is a thin client and can be run from another computer + to track one or more veejay servers. + +(3) Soft realtime: A system is realtime if the correctness of the application not only depends on + the logical correctness but also upon the time at which it was performed. + Veejay tolerates such lateness and responds by dropping video frames. + You can instruct veejay to ignore the time aspect of the video and render all frames, effectivly + turning the server into a frame producer. + +(4) VIMS: Veejay Internal Message System. Control data is distributed via this message system, + each message consists of an 'event selector' with a list of arguments. VIMS is the lowest + level control interface available. The keyboard interface and OSC server are built on top of it. + Also all veejay clients communicate usings VIMS. + +(5) Loop based editing: Loops are (short) sections of video (up to any length) that are repeated + continuously. While playing, you can change the properties of the video sample, add filters to it + and record it on the fly to a new sample (which can be used instantly). + +(6) Frame accurate: In veejay, every frame is a key-frame (a whole image). + As a consequence, veejay has no support for video codecs that make use of difference frames. + +(7) In trickplay mode, veejay will always resample the audio analogous to varying the speed + of an analogue tape recorder . Halve the speed results in the pitch going down an octave. + Slow motion video is produced by linearly interpolating in-between frames and + faster motion is accomplished by skipping video frames or, if playing without audio, + by changing the framerate dynamically. + +(8) JACK: A low latency audio server that can connect a number of different applications to an audio device, + allowing them to share audio between themselves. + +(9) Perspective Viewing: You can define a quadrilateral to which the rendered image will be mapped. + This is usefull for setups where the image borders fall outside the projection screen area, or where + the projector/camera has a (wide) angle to the projection. + Last but not least, it can be used for on-body projection performances. + + + + + +Install +======= + +See file 'INSTALL' + +See doc/Howto_Compile.html +See doc/Howto_Compile_on_Ubuntu.html + +Documentation +============= + +See the directory 'doc' in this package, it contains usefull documentation. + + +Running +======= + +Start 1 or more Veejay servers: +$ veejay my-movie-A.avi +$ veejay -p 4490 my-movie-B.avi + +CONTACT / FEEDBACK & HELP +========================= + +http://veejayhq.net + + +BUG REPORTS / BLEEDING EDGE SOURCE CODE +======================================= + +Please use the ticket system ! + +http://veejay.dyne.org +http://veejayhq.net + +ENJOY! And let us know about your performances/installations with veejay! + diff --git a/veejay-server/aclib/Makefile.am b/veejay-server/aclib/Makefile.am new file mode 100644 index 00000000..ba35ab73 --- /dev/null +++ b/veejay-server/aclib/Makefile.am @@ -0,0 +1,20 @@ +# # Process this file with automake to produce Makefile.in. + +AM_CPPFLAGS = \ + $(PTHREAD_CFLAGS) \ + -I$(top_srcdir) + +noinst_LTLIBRARIES = libac.la + +libac_la_SOURCES = \ + accore.c \ + average.c \ + imgconvert.c \ + img_rgb_packed.c \ + img_yuv_mixed.c \ + img_yuv_packed.c \ + img_yuv_planar.c \ + img_yuv_rgb.c \ + memcpy.c \ + rescale.c + diff --git a/veejay-server/aclib/Makefile.in b/veejay-server/aclib/Makefile.in new file mode 100644 index 00000000..dfb149f6 --- /dev/null +++ b/veejay-server/aclib/Makefile.in @@ -0,0 +1,528 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# # Process this file with automake to produce Makefile.in. + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = aclib +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libac_la_LIBADD = +am_libac_la_OBJECTS = accore.lo average.lo imgconvert.lo \ + img_rgb_packed.lo img_yuv_mixed.lo img_yuv_packed.lo \ + img_yuv_planar.lo img_yuv_rgb.lo memcpy.lo rescale.lo +libac_la_OBJECTS = $(am_libac_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libac_la_SOURCES) +DIST_SOURCES = $(libac_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = \ + $(PTHREAD_CFLAGS) \ + -I$(top_srcdir) + +noinst_LTLIBRARIES = libac.la +libac_la_SOURCES = \ + accore.c \ + average.c \ + imgconvert.c \ + img_rgb_packed.c \ + img_yuv_mixed.c \ + img_yuv_packed.c \ + img_yuv_planar.c \ + img_yuv_rgb.c \ + memcpy.c \ + rescale.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu aclib/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu aclib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libac.la: $(libac_la_OBJECTS) $(libac_la_DEPENDENCIES) + $(LINK) $(libac_la_OBJECTS) $(libac_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/average.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_rgb_packed.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_yuv_mixed.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_yuv_packed.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_yuv_planar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_yuv_rgb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imgconvert.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rescale.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/aclib/ac.h b/veejay-server/aclib/ac.h new file mode 100644 index 00000000..d0bb1e0d --- /dev/null +++ b/veejay-server/aclib/ac.h @@ -0,0 +1,97 @@ +/* + * ac.h -- main aclib include + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#ifndef ACLIB_AC_H +#define ACLIB_AC_H + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +/*************************************************************************/ + +/* CPU acceleration support flags, for use with ac_init(): */ + +#define AC_IA32ASM 0x0001 /* x86-32: standard assembly (no MMX) */ +#define AC_AMD64ASM 0x0002 /* x86-64: standard assembly (no MMX) */ +#define AC_CMOVE 0x0004 /* x86: CMOVcc instruction */ +#define AC_MMX 0x0008 /* x86: MMX instructions */ +#define AC_MMXEXT 0x0010 /* x86: MMX extended instructions (AMD) */ +#define AC_3DNOW 0x0020 /* x86: 3DNow! instructions (AMD) */ +#define AC_3DNOWEXT 0x0040 /* x86: 3DNow! instructions (AMD) */ +#define AC_SSE 0x0080 /* x86: SSE instructions */ +#define AC_SSE2 0x0100 /* x86: SSE2 instructions */ +#define AC_SSE3 0x0200 /* x86: SSE3 instructions */ + +#define AC_NONE 0 /* No acceleration (vanilla C functions) */ +#define AC_ALL (~0) /* All available acceleration */ + + +/* Endianness flag: */ +#define AC_LITTLE_ENDIAN 1 +#define AC_BIG_ENDIAN 2 + +/*************************************************************************/ + +/* Library initialization function--MUST be called before any other aclib + * functions are used! `accel' selects the accelerations to enable: + * AC_NONE, AC_ALL, or a combination of the other AC_* flags above. The + * value will always be masked to the acceleration options available on the + * actual CPU, as returned by ac_cpuinfo(). Returns 1 on success, 0 on + * failure. This function can be called multiple times to change the set + * of acceleration features to be used. */ +extern int ac_init(int accel); + +/* Returns the set of acceleration features supported by this CPU. */ +extern int ac_cpuinfo(void); + +/* Returns the endianness of this CPU (AC_BIG_ENDIAN or AC_LITTLE_ENDIAN). */ +extern int ac_endian(void); + +/* Utility routine to convert a set of flags to a descriptive string. The + * string is stored in a static buffer overwritten each call. */ +extern const char *ac_flagstotext(int accel); + +/*************************************************************************/ + +/* Acceleration-enabled functions: */ + +/* Optimized memcpy(). The copy direction is guaranteed to be ascending + * (so ac_memcpy(ptr, ptr+1, size) will work). */ +extern void *ac_memcpy(void *dest, const void *src, size_t size); + +/* Average of two sets of data */ +extern void ac_average(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes); + +/* Weighted average of two sets of data (weight1+weight2 should be 65536) */ +extern void ac_rescale(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes, + uint32_t weight1, uint32_t weight2); + +/* Image format manipulation is available in aclib/imgconvert.h */ + +/*************************************************************************/ + +#endif /* ACLIB_AC_H */ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/ac_internal.h b/veejay-server/aclib/ac_internal.h new file mode 100644 index 00000000..67a9c59f --- /dev/null +++ b/veejay-server/aclib/ac_internal.h @@ -0,0 +1,42 @@ +/* + * ac_internal.h -- internal include file for aclib functions + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#ifndef ACLIB_AC_INTERNAL_H +#define ACLIB_AC_INTERNAL_H + + +/* Compiler hint that a condition is unlikely */ +#ifdef __GNUC__ +# define UNLIKELY(x) (__builtin_expect((x) != 0, 0)) +#else +# define UNLIKELY(x) (x) +#endif + +/* Are _all_ of the given acceleration flags (`test') available? */ +#define HAS_ACCEL(accel,test) (((accel) & (test)) == (test)) + +/* Initialization subfunctions */ +extern int ac_average_init(int accel); +extern int ac_imgconvert_init(int accel); +extern int ac_memcpy_init(int accel); +extern int ac_rescale_init(int accel); + + +#endif /* ACLIB_AC_INTERNAL_H */ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/accore.c b/veejay-server/aclib/accore.c new file mode 100644 index 00000000..2d7d14b5 --- /dev/null +++ b/veejay-server/aclib/accore.c @@ -0,0 +1,225 @@ +/* + * accore.c -- core aclib functions + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "ac_internal.h" +#include "imgconvert.h" + +#include +#include + +#if defined(ARCH_X86) || defined(ARCH_X86_64) +static int cpuinfo_x86(void); +#endif + +/*************************************************************************/ + +/* Library initialization function. Determines CPU features, then calls + * all initialization subfunctions with appropriate flags. Returns 1 on + * success, 0 on failure. This function can be called multiple times to + * change the set of acceleration features to be used. */ + +int ac_init(int accel) +{ + accel &= ac_cpuinfo(); + if (!ac_average_init(accel) + || !ac_imgconvert_init(accel) + || !ac_memcpy_init(accel) + || !ac_rescale_init(accel) + ) { + return 0; + } + return 1; +} + +/*************************************************************************/ + +/* Returns the set of acceleration features supported by this CPU. */ + +int ac_cpuinfo(void) +{ +#if defined(ARCH_X86) || defined(ARCH_X86_64) + return cpuinfo_x86(); +#else + return 0; +#endif +} + +/*************************************************************************/ + +/* Returns the endianness of this CPU (AC_BIG_ENDIAN or AC_LITTLE_ENDIAN). */ + +int ac_endian(void) +{ + volatile int test; + + test = 1; + if (*((uint8_t *)&test)) + return AC_LITTLE_ENDIAN; + else + return AC_BIG_ENDIAN; +} + +/*************************************************************************/ + +/* Utility routine to convert a set of flags to a descriptive string. The + * string is stored in a static buffer overwritten each call. `filter' + * selects whether to filter out flags not supported by the CPU. */ + +const char *ac_flagstotext(int accel) +{ + static char retbuf[1000]; + if (!accel) + return "none"; + snprintf(retbuf, sizeof(retbuf), "%s%s%s%s%s%s%s%s%s", + accel & AC_SSE3 ? " sse3" : "", + accel & AC_SSE2 ? " sse2" : "", + accel & AC_SSE ? " sse" : "", + accel & AC_3DNOWEXT ? " 3dnowext" : "", + accel & AC_3DNOW ? " 3dnow" : "", + accel & AC_MMXEXT ? " mmxext" : "", + accel & AC_MMX ? " mmx" : "", + accel & AC_CMOVE ? " cmove" : "", + accel & (AC_IA32ASM|AC_AMD64ASM) ? " asm" : ""); + return *retbuf ? retbuf+1 : retbuf; /* skip initial space */ +} + +/*************************************************************************/ +/*************************************************************************/ + +/* Private functions to return acceleration flags corresponding to available + * CPU features for various CPUs. Currently only x86 is supported. */ + +/*************************************************************************/ + +#if defined(ARCH_X86) || defined(ARCH_X86_64) + +#ifdef ARCH_X86_64 +# define EAX "%%rax" +# define EBX "%%rbx" +# define ESI "%%rsi" +# define PUSHF "pushfq" +# define POPF "popfq" +#else +# define EAX "%%eax" +# define EBX "%%ebx" +# define ESI "%%esi" +# define PUSHF "pushfl" +# define POPF "popfl" +#endif + +/* Macro to execute the CPUID instruction with EAX = func. Results are + * placed in ret_a (EAX), ret_b (EBX), ret_c (ECX), and ret_d (EDX), which + * must be lvalues. Note that we save and restore EBX (RBX on x86-64) + * because it is the PIC register. */ +#define CPUID(func,ret_a,ret_b,ret_c,ret_d) \ + asm("mov "EBX", "ESI"; cpuid; xchg "EBX", "ESI \ + : "=a" (ret_a), "=S" (ret_b), "=c" (ret_c), "=d" (ret_d) \ + : "a" (func)) + +/* Various CPUID flags. The second word of the macro name indicates the + * function (1: function 1, X1: function 0x80000001) and register (D: EDX) + * to which the value belongs. */ +#define CPUID_1D_CMOVE (1UL<<15) +#define CPUID_1D_MMX (1UL<<23) +#define CPUID_1D_SSE (1UL<<25) +#define CPUID_1D_SSE2 (1UL<<26) +#define CPUID_1C_SSE3 (1UL<< 0) +#define CPUID_X1D_AMD_MMXEXT (1UL<<22) /* AMD only */ +#define CPUID_X1D_AMD_3DNOW (1UL<<31) /* AMD only */ +#define CPUID_X1D_AMD_3DNOWEXT (1UL<<30) /* AMD only */ +#define CPUID_X1D_CYRIX_MMXEXT (1UL<<24) /* Cyrix only */ + +static int cpuinfo_x86(void) +{ + uint32_t eax, ebx, ecx, edx; + uint32_t cpuid_max, cpuid_ext_max; /* Maximum CPUID function numbers */ + char cpu_vendor[13]; /* 12-byte CPU vendor string + trailing null */ + uint32_t cpuid_1D, cpuid_1C, cpuid_X1D; + int accel; + + /* First see if the CPUID instruction is even available. We try to + * toggle bit 21 (ID) of the flags register; if the bit changes, then + * CPUID is available. */ + asm(PUSHF" \n\ + pop "EAX" \n\ + mov %%eax, %%edx \n\ + xor $0x200000, %%eax \n\ + push "EAX" \n\ + "POPF" \n\ + "PUSHF" \n\ + pop "EAX" \n\ + xor %%edx, %%eax" + : "=a" (eax) : : "edx"); + if (!eax) + return 0; + + /* Determine the maximum function number available, and save the vendor + * string */ + CPUID(0, cpuid_max, ebx, ecx, edx); + *((uint32_t *)(cpu_vendor )) = ebx; + *((uint32_t *)(cpu_vendor+4)) = edx; + *((uint32_t *)(cpu_vendor+8)) = ecx; + cpu_vendor[12] = 0; + cpuid_ext_max = 0; /* FIXME: how do early CPUs respond to 0x80000000? */ + CPUID(0x80000000, cpuid_ext_max, ebx, ecx, edx); + + /* Read available features */ + cpuid_1D = cpuid_1C = cpuid_X1D = 0; + if (cpuid_max >= 1) + CPUID(1, eax, ebx, cpuid_1C, cpuid_1D); + if (cpuid_ext_max >= 0x80000001) + CPUID(0x80000001, eax, ebx, ecx, cpuid_X1D); + + /* Convert to acceleration flags */ +#ifdef ARCH_X86_64 + accel = AC_AMD64ASM; /* but not IA32! (register size issues) */ +#else + accel = AC_IA32ASM; +#endif + if (cpuid_1D & CPUID_1D_CMOVE) + accel |= AC_CMOVE; + if (cpuid_1D & CPUID_1D_MMX) + accel |= AC_MMX; + if (cpuid_1D & CPUID_1D_SSE) + accel |= AC_SSE; + if (cpuid_1D & CPUID_1D_SSE2) + accel |= AC_SSE2; + if (cpuid_1C & CPUID_1C_SSE3) + accel |= AC_SSE3; + if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { + if (cpuid_X1D & CPUID_X1D_AMD_MMXEXT) + accel |= AC_MMXEXT; + if (cpuid_X1D & CPUID_X1D_AMD_3DNOW) + accel |= AC_3DNOW; + if (cpuid_X1D & CPUID_X1D_AMD_3DNOWEXT) + accel |= AC_3DNOWEXT; + } else if (strcmp(cpu_vendor, "CyrixInstead") == 0) { + if (cpuid_X1D & CPUID_X1D_CYRIX_MMXEXT) + accel |= AC_MMXEXT; + } + + /* And return */ + return accel; +} + +#endif /* ARCH_X86 || ARCH_X86_64 */ + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/average.c b/veejay-server/aclib/average.c new file mode 100644 index 00000000..517102e6 --- /dev/null +++ b/veejay-server/aclib/average.c @@ -0,0 +1,243 @@ +/* + * average.c -- average two sets of byte data + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "ac_internal.h" + +static void average(const uint8_t *, const uint8_t *, uint8_t *, int); +static void (*average_ptr)(const uint8_t *, const uint8_t *, uint8_t *, int) + = average; + +/*************************************************************************/ + +/* External interface */ + +void ac_average(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes) +{ + (*average_ptr)(src1, src2, dest, bytes); +} + +/*************************************************************************/ +/*************************************************************************/ + +/* Vanilla C version */ + +static void average(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes) +{ + int i; + for (i = 0; i < bytes; i++) + dest[i] = (src1[i]+src2[i]+1) / 2; +} + +/*************************************************************************/ + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) /* i.e. not x86_64 */ + +static void average_mmx(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes) +{ + if (bytes >= 8) { + asm("\ + pxor %%mm7, %%mm7 \n\ + movq %%mm7, %%mm6 \n\ + pcmpeqw %%mm5, %%mm5 \n\ + psubw %%mm5, %%mm6 # Put 0x0001*4 in MM6 \n\ + 0: \n\ + movq -8(%%esi,%%eax), %%mm0 \n\ + movq %%mm0, %%mm1 \n\ + punpcklbw %%mm7, %%mm0 \n\ + punpckhbw %%mm7, %%mm1 \n\ + movq -8(%%edx,%%eax), %%mm2 \n\ + movq %%mm2, %%mm3 \n\ + punpcklbw %%mm7, %%mm2 \n\ + punpckhbw %%mm7, %%mm3 \n\ + paddw %%mm2, %%mm0 \n\ + paddw %%mm6, %%mm0 \n\ + psrlw $1, %%mm0 \n\ + paddw %%mm3, %%mm1 \n\ + paddw %%mm6, %%mm1 \n\ + psrlw $1, %%mm1 \n\ + packuswb %%mm1, %%mm0 \n\ + movq %%mm0, -8(%%edi,%%eax) \n\ + subl $8, %%eax \n\ + jnz 0b \n\ + emms" + : /* no outputs */ + : "S" (src1), "d" (src2), "D" (dest), "a" (bytes & ~7)); + } + if (UNLIKELY(bytes & 7)) { + average(src1+(bytes & ~7), src2+(bytes & ~7), dest+(bytes & ~7), + bytes & 7); + } +} + +#endif /* HAVE_ASM_MMX && ARCH_X86 */ + +/*************************************************************************/ + +#if defined(HAVE_ASM_SSE) && defined(ARCH_X86) + +/* SSE has PAVGB */ + +static void average_sse(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes) +{ + if (bytes >= 8) { + asm("\ + testl $~0x1F, %%eax \n\ + jz 1f \n\ + 0: \n\ + movq -32(%%esi,%%eax), %%mm0 \n\ + movq -24(%%esi,%%eax), %%mm1 \n\ + movq -16(%%esi,%%eax), %%mm2 \n\ + movq -8(%%esi,%%eax), %%mm3 \n\ + movq -32(%%edx,%%eax), %%mm4 \n\ + pavgb %%mm4, %%mm0 \n\ + movq -24(%%edx,%%eax), %%mm5 \n\ + pavgb %%mm5, %%mm1 \n\ + movq -16(%%edx,%%eax), %%mm6 \n\ + pavgb %%mm6, %%mm2 \n\ + movq -8(%%edx,%%eax), %%mm7 \n\ + pavgb %%mm7, %%mm3 \n\ + movntq %%mm0, -32(%%edi,%%eax) \n\ + movntq %%mm1, -24(%%edi,%%eax) \n\ + movntq %%mm2, -16(%%edi,%%eax) \n\ + movntq %%mm3, -8(%%edi,%%eax) \n\ + subl $32, %%eax \n\ + testl $~0x1F, %%eax \n\ + jnz 0b \n\ + testl %%eax, %%eax \n\ + jz 2f \n\ + 1: \n\ + movq -8(%%esi,%%eax), %%mm0 \n\ + movq -8(%%edx,%%eax), %%mm1 \n\ + pavgb %%mm1, %%mm0 \n\ + movntq %%mm0, -8(%%edi,%%eax) \n\ + subl $8, %%eax \n\ + jnz 1b \n\ + 2: \n\ + emms \n\ + sfence" + : /* no outputs */ + : "S" (src1), "d" (src2), "D" (dest), "a" (bytes & ~7)); + } + if (UNLIKELY(bytes & 7)) { + average(src1+(bytes & ~7), src2+(bytes & ~7), dest+(bytes & ~7), + bytes & 7); + } +} + +#endif /* HAVE_ASM_SSE && ARCH_X86 */ + +/*************************************************************************/ + +#if defined(HAVE_ASM_SSE2) + +#if defined(ARCH_X86_64) +# define EAX "%%rax" +# define EDX "%%rdx" +# define ESI "%%rsi" +# define EDI "%%rdi" +#else +# define EAX "%%eax" +# define EDX "%%edx" +# define ESI "%%esi" +# define EDI "%%edi" +#endif + +static void average_sse2(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes) +{ + if (bytes >= 8) { + asm("\ + testl $~0x3F, %%eax \n\ + jz 1f \n\ + 0: \n\ + movdqu -64("ESI","EAX"), %%xmm0 \n\ + movdqu -48("ESI","EAX"), %%xmm1 \n\ + movdqu -32("ESI","EAX"), %%xmm2 \n\ + movdqu -16("ESI","EAX"), %%xmm3 \n\ + movdqu -64("EDX","EAX"), %%xmm4 \n\ + pavgb %%xmm4, %%xmm0 \n\ + movdqu -48("EDX","EAX"), %%xmm5 \n\ + pavgb %%xmm5, %%xmm1 \n\ + movdqu -32("EDX","EAX"), %%xmm6 \n\ + pavgb %%xmm6, %%xmm2 \n\ + movdqu -16("EDX","EAX"), %%xmm7 \n\ + pavgb %%xmm7, %%xmm3 \n\ + # Note that movntdq requires 16-byte alignment, which we're \n\ + # not guaranteed \n\ + movdqu %%xmm0, -64("EDI","EAX") \n\ + movdqu %%xmm1, -48("EDI","EAX") \n\ + movdqu %%xmm2, -32("EDI","EAX") \n\ + movdqu %%xmm3, -16("EDI","EAX") \n\ + subl $64, %%eax \n\ + testl $~0x3F, %%eax \n\ + jnz 0b \n\ + testl %%eax, %%eax \n\ + jz 2f \n\ + 1: \n\ + movq -8("ESI","EAX"), %%mm0 \n\ + movq -8("EDX","EAX"), %%mm1 \n\ + pavgb %%mm1, %%mm0 \n\ + movq %%mm0, -8("EDI","EAX") \n\ + subl $8, %%eax \n\ + jnz 1b \n\ + 2: \n\ + emms" + : /* no outputs */ + : "S" (src1), "d" (src2), "D" (dest), "a" (bytes & ~7)); + } + if (UNLIKELY(bytes & 7)) { + average(src1+(bytes & ~7), src2+(bytes & ~7), dest+(bytes & ~7), + bytes & 7); + } +} + +#endif /* HAVE_ASM_SSE2 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* Initialization routine. */ + +int ac_average_init(int accel) +{ + average_ptr = average; + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) + if (HAS_ACCEL(accel, AC_MMX)) + average_ptr = average_mmx; +#endif +#if defined(HAVE_ASM_SSE) && defined(ARCH_X86) + if (HAS_ACCEL(accel, AC_SSE)) + average_ptr = average_sse; +#endif +#if defined(HAVE_ASM_SSE2) + if (HAS_ACCEL(accel, AC_SSE2)) + average_ptr = average_sse2; +#endif + + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/img_internal.h b/veejay-server/aclib/img_internal.h new file mode 100644 index 00000000..153a2fb6 --- /dev/null +++ b/veejay-server/aclib/img_internal.h @@ -0,0 +1,40 @@ +/* + * img_internal.h - imgconvert internal use header + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#ifndef ACLIB_IMG_INTERNAL_H +#define ACLIB_IMG_INTERNAL_H + +/* Type of a conversion function */ +typedef int (*ConversionFunc)(uint8_t **src, uint8_t **dest, + int width, int height); + +/* Function to register a conversion */ +extern int register_conversion(ImageFormat srcfmt, ImageFormat destfmt, + ConversionFunc function); + +/* Initialization routines */ +extern int ac_imgconvert_init(int accel); +extern int ac_imgconvert_init_yuv_planar(int accel); +extern int ac_imgconvert_init_yuv_packed(int accel); +extern int ac_imgconvert_init_yuv_mixed(int accel); +extern int ac_imgconvert_init_yuv_rgb(int accel); +extern int ac_imgconvert_init_rgb_packed(int accel); + +#endif /* ACLIB_IMG_INTERNAL_H */ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/img_rgb_packed.c b/veejay-server/aclib/img_rgb_packed.c new file mode 100644 index 00000000..1c987130 --- /dev/null +++ b/veejay-server/aclib/img_rgb_packed.c @@ -0,0 +1,1105 @@ +/* + * img_rgb_packed.c - RGB packed image format conversion routines + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "imgconvert.h" +#include "img_internal.h" + +/*************************************************************************/ +/*************************************************************************/ + +/* Standard C implementations */ + +/*************************************************************************/ + +/* Identity transformations, all work when src==dest */ + +static int rgb_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height*3); + return 1; +} + +static int rgba_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height*4); + return 1; +} + +static int gray8_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + return 1; +} + +/*************************************************************************/ + +/* Conversions between various 32-bit formats, all usable when src==dest */ + +/* RGBA<->ABGR and ARGB<->BGRA: reverse byte order */ +static int rgba_swapall(uint8_t **src, uint8_t **dest, int width, int height) +{ + uint32_t *srcp = (uint32_t *)src[0]; + uint32_t *destp = (uint32_t *)dest[0]; + int i; + for (i = 0; i < width*height; i++) { + /* This shortcut works regardless of CPU endianness */ + destp[i] = srcp[i] >> 24 + | (srcp[i] & 0x00FF0000) >> 8 + | (srcp[i] & 0x0000FF00) << 8 + | srcp[i] << 24; + } + return 1; +} + +/* RGBA<->BGRA: swap bytes 0 and 2 */ +static int rgba_swap02(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + uint8_t tmp = src[0][i*4+2]; + dest[0][i*4+2] = src[0][i*4 ]; + dest[0][i*4 ] = tmp; + dest[0][i*4+1] = src[0][i*4+1]; + dest[0][i*4+3] = src[0][i*4+3]; + } + return 1; +} + +/* ARGB<->ABGR: swap bytes 1 and 3 */ +static int rgba_swap13(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + uint8_t tmp = src[0][i*4+3]; + dest[0][i*4+3] = src[0][i*4+1]; + dest[0][i*4+1] = tmp; + dest[0][i*4 ] = src[0][i*4 ]; + dest[0][i*4+2] = src[0][i*4+2]; + } + return 1; +} + +/* RGBA->ARGB and BGRA->ABGR: alpha moves from byte 3 to byte 0 */ +static int rgba_alpha30(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + uint8_t tmp = src[0][i*4+3]; + dest[0][i*4+3] = src[0][i*4+2]; + dest[0][i*4+2] = src[0][i*4+1]; + dest[0][i*4+1] = src[0][i*4 ]; + dest[0][i*4 ] = tmp; + } + return 1; +} + +/* ARGB->RGBA and ABGR->BGRA: alpha moves from byte 0 to byte 3 */ +static int rgba_alpha03(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + uint8_t tmp = src[0][i*4 ]; + dest[0][i*4 ] = src[0][i*4+1]; + dest[0][i*4+1] = src[0][i*4+2]; + dest[0][i*4+2] = src[0][i*4+3]; + dest[0][i*4+3] = tmp; + } + return 1; +} + +/*************************************************************************/ + +static int rgb24_bgr24(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*3 ] = src[0][i*3+2]; + dest[0][i*3+1] = src[0][i*3+1]; + dest[0][i*3+2] = src[0][i*3 ]; + } + return 1; +} + +static int rgb24_rgba32(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*4 ] = src[0][i*3 ]; + dest[0][i*4+1] = src[0][i*3+1]; + dest[0][i*4+2] = src[0][i*3+2]; + dest[0][i*4+3] = 0; + } + return 1; +} + +static int rgb24_abgr32(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*4 ] = 0; + dest[0][i*4+1] = src[0][i*3+2]; + dest[0][i*4+2] = src[0][i*3+1]; + dest[0][i*4+3] = src[0][i*3 ]; + } + return 1; +} + +static int rgb24_argb32(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*4 ] = 0; + dest[0][i*4+1] = src[0][i*3 ]; + dest[0][i*4+2] = src[0][i*3+1]; + dest[0][i*4+3] = src[0][i*3+2]; + } + return 1; +} + +static int rgb24_bgra32(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*4 ] = src[0][i*3+2]; + dest[0][i*4+1] = src[0][i*3+1]; + dest[0][i*4+2] = src[0][i*3 ]; + dest[0][i*4+3] = 0; + } + return 1; +} + +static int rgb24_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + /* Use the Y part of a YUV transformation, scaled to 0..255 */ + int r = src[0][i*3 ]; + int g = src[0][i*3+1]; + int b = src[0][i*3+2]; + dest[0][i] = (19595*r + 38470*g + 7471*b + 32768) >> 16; + } + return 1; +} + +static int bgr24_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + /* Use the Y part of a YUV transformation, scaled to 0..255 */ + int r = src[0][i*3+2]; + int g = src[0][i*3+1]; + int b = src[0][i*3 ]; + dest[0][i] = (19595*r + 38470*g + 7471*b + 32768) >> 16; + } + return 1; +} + +/*************************************************************************/ + +static int rgba32_rgb24(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*3 ] = src[0][i*4 ]; + dest[0][i*3+1] = src[0][i*4+1]; + dest[0][i*3+2] = src[0][i*4+2]; + } + return 1; +} + +static int bgra32_rgb24(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*3 ] = src[0][i*4+2]; + dest[0][i*3+1] = src[0][i*4+1]; + dest[0][i*3+2] = src[0][i*4 ]; + } + return 1; +} + +static int rgba32_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + /* Use the Y part of a YUV transformation, scaled to 0..255 */ + int r = src[0][i*4 ]; + int g = src[0][i*4+1]; + int b = src[0][i*4+2]; + dest[0][i] = (19595*r + 38470*g + 7471*b + 32768) >> 16; + } + return 1; +} + +static int bgra32_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + /* Use the Y part of a YUV transformation, scaled to 0..255 */ + int r = src[0][i*4+2]; + int g = src[0][i*4+1]; + int b = src[0][i*4 ]; + dest[0][i] = (19595*r + 38470*g + 7471*b + 32768) >> 16; + } + return 1; +} + +/*************************************************************************/ + +static int argb32_rgb24(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*3 ] = src[0][i*4+1]; + dest[0][i*3+1] = src[0][i*4+2]; + dest[0][i*3+2] = src[0][i*4+3]; + } + return 1; +} + +static int abgr32_rgb24(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*3 ] = src[0][i*4+3]; + dest[0][i*3+1] = src[0][i*4+2]; + dest[0][i*3+2] = src[0][i*4+1]; + } + return 1; +} + +static int argb32_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + /* Use the Y part of a YUV transformation, scaled to 0..255 */ + int r = src[0][i*4+1]; + int g = src[0][i*4+2]; + int b = src[0][i*4+3]; + dest[0][i] = (19595*r + 38470*g + 7471*b + 32768) >> 16; + } + return 1; +} + +static int abgr32_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + /* Use the Y part of a YUV transformation, scaled to 0..255 */ + int r = src[0][i*4+3]; + int g = src[0][i*4+2]; + int b = src[0][i*4+1]; + dest[0][i] = (19595*r + 38470*g + 7471*b + 32768) >> 16; + } + return 1; +} + +/*************************************************************************/ + +static int gray8_rgb24(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*3 ] = src[0][i]; + dest[0][i*3+1] = src[0][i]; + dest[0][i*3+2] = src[0][i]; + } + return 1; +} + +static int gray8_rgba32(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*4 ] = src[0][i]; + dest[0][i*4+1] = src[0][i]; + dest[0][i*4+2] = src[0][i]; + dest[0][i*4+3] = 0; + } + return 1; +} + +static int gray8_argb32(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*4 ] = 0; + dest[0][i*4+1] = src[0][i]; + dest[0][i*4+2] = src[0][i]; + dest[0][i*4+3] = src[0][i]; + } + return 1; +} + +/*************************************************************************/ +/*************************************************************************/ + +#if defined(ARCH_X86) || defined(ARCH_X86_64) + +#define DEFINE_MASK_DATA +#include "img_x86_common.h" + +/*************************************************************************/ + +/* Basic assembly routines */ + +/* RGBA<->ABGR and ARGB<->BGRA: reverse byte order */ +static int rgba_swapall_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_REV32_X86(width*height); + return 1; +} + +/* RGBA<->BGRA: swap bytes 0 and 2 */ +static int rgba_swap02_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_02_X86(width*height); + return 1; +} + +/* ARGB<->ABGR: swap bytes 1 and 3 */ +static int rgba_swap13_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_13_X86(width*height); + return 1; +} + +/* RGBA->ARGB and BGRA->ABGR: alpha moves from byte 3 to byte 0 */ +static int rgba_alpha30_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROL32_X86(width*height); + return 1; +} + +/* ARGB->RGBA and ABGR->BGRA: alpha moves from byte 0 to byte 3 */ +static int rgba_alpha03_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROR32_X86(width*height); + return 1; +} + +/*************************************************************************/ + +/* MMX routines */ + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) /* i.e. not x86_64 */ + +/* RGBA<->ABGR and ARGB<->BGRA: reverse byte order */ +static int rgba_swapall_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_REV32_MMX(width*height); + return 1; +} + +/* RGBA<->BGRA: swap bytes 0 and 2 */ +static int rgba_swap02_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_02_MMX(width*height); + return 1; +} + +/* ARGB<->ABGR: swap bytes 1 and 3 */ +static int rgba_swap13_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_13_MMX(width*height); + return 1; +} + +/* RGBA->ARGB and BGRA->ABGR: alpha moves from byte 3 to byte 0 */ +static int rgba_alpha30_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROL32_MMX(width*height); + return 1; +} + +/* ARGB->RGBA and ABGR->BGRA: alpha moves from byte 0 to byte 3 */ +static int rgba_alpha03_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROR32_MMX(width*height); + return 1; +} + +#endif /* HAVE_ASM_MMX && ARCH_X86 */ + +/*************************************************************************/ + +/* SSE2 routines */ + +#if defined(HAVE_ASM_SSE2) + +static const struct { uint32_t n[4]; } __attribute__((aligned(16))) rgb_bgr_data = {{ + 0xFF0000FF, 0x00FF0000, 0x0000FF00, 0x00000000 +}}; + +#define SHIFT_RBSWAP \ + "movdqa %%xmm6, %%xmm2 # XMM2: low bytes mask \n\ + pand %%xmm0, %%xmm2 # XMM2: R/B bytes \n\ + pshuflw $0xB1, %%xmm2, %%xmm2 # XMM2: swap R and B (low quad) \n\ + pand %%xmm7, %%xmm0 # XMM0: G bytes \n\ + pshufhw $0xB1, %%xmm2, %%xmm2 # XMM2: swap R and B (high quad)\n\ + por %%xmm2, %%xmm0 # XMM0: data now in BGRA32 \n" + +#define SHIFT_AFIRST \ + "pslldq $1, %%xmm0 # XMM0: move A first \n" + +#define SHIFT_ALAST \ + "psrldq $1, %%xmm0 # XMM0: move A last \n" + +#define RGB24TO32(ROFS,GOFS,BOFS,AOFS,SHIFT) \ + asm("pcmpeqd %%xmm5, %%xmm5 \n\ + movdqa %%xmm5, %%xmm6 \n\ + psrldq $13, %%xmm5 # XMM5: 24-bit mask \n\ + movdqa %%xmm6, %%xmm7 \n\ + psrlw $8, %%xmm6 # XMM6: low bytes mask \n\ + psllw $8, %%xmm7 # XMM7: high bytes mask \n"\ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "lea ("ECX","ECX",2),"EDX" \n\ + movb -3("ESI","EDX"), %%al \n\ + movb %%al, ("#ROFS"-4)("EDI","ECX",4) \n\ + movb -2("ESI","EDX"), %%al \n\ + movb %%al, ("#GOFS"-4)("EDI","ECX",4) \n\ + movb -1("ESI","EDX"), %%al \n\ + movb %%al, ("#BOFS"-4)("EDI","ECX",4) \n\ + movb $0, ("#AOFS"-4)("EDI","ECX",4)", \ + /* main_loop */ \ + "lea ("ECX","ECX",2),"EDX" \n\ + # We can't just movdqu, because we might run over the edge \n\ + movd -12("ESI","EDX"), %%xmm1 \n\ + movq -8("ESI","EDX"), %%xmm0 \n\ + pshufd $0xD3, %%xmm0, %%xmm0 # shift left by 4 bytes \n\ + por %%xmm1, %%xmm0 # XMM0: original RGB24 data \n\ + pshufd $0xF3, %%xmm5, %%xmm2 # XMM2: pixel 1 mask \n\ + movdqa %%xmm5, %%xmm1 # XMM1: pixel 0 mask \n\ + pshufd $0xCF, %%xmm5, %%xmm3 # XMM3: pixel 2 mask \n\ + pand %%xmm0, %%xmm1 # XMM1: pixel 0 \n\ + pslldq $1, %%xmm0 \n\ + pand %%xmm0, %%xmm2 # XMM2: pixel 1 \n\ + pshufd $0x3F, %%xmm5, %%xmm4 # XMM4: pixel 3 mask \n\ + por %%xmm2, %%xmm1 # XMM1: pixels 0 and 1 \n\ + pslldq $1, %%xmm0 \n\ + pand %%xmm0, %%xmm3 # XMM3: pixel 2 \n\ + por %%xmm3, %%xmm1 # XMM1: pixels 0, 1, and 2 \n\ + pslldq $1, %%xmm0 \n\ + pand %%xmm4, %%xmm0 # XMM0: pixel 3 \n\ + por %%xmm1, %%xmm0 # XMM0: RGBA32 data \n\ + "SHIFT" # shift bytes to target position\n\ + movdqu %%xmm0, -16("EDI","ECX",4)", \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), \ + "d" (&rgb_bgr_data), "m" (rgb_bgr_data) \ + : "eax"); + +#define RGB32TO24(ROFS,GOFS,BOFS,AOFS,SHIFT) \ + asm("pcmpeqd %%xmm5, %%xmm5 \n\ + movdqa %%xmm5, %%xmm6 \n\ + psrldq $13, %%xmm5 # 24-bit mask \n\ + movdqa %%xmm6, %%xmm7 \n\ + psrlw $8, %%xmm6 # low bytes mask \n\ + psllw $8, %%xmm7 # high bytes mask \n"\ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "lea ("ECX","ECX",2),"EDX" \n\ + movb ("#ROFS"-4)("ESI","ECX",4), %%al \n\ + movb %%al, -3("EDI","EDX") \n\ + movb ("#GOFS"-4)("ESI","ECX",4), %%al \n\ + movb %%al, -2("EDI","EDX") \n\ + movb ("#BOFS"-4)("ESI","ECX",4), %%al \n\ + movb %%al, -1("EDI","EDX")", \ + /* main_loop */ \ + "lea ("ECX","ECX",2),"EDX" \n\ + movdqu -16("ESI","ECX",4), %%xmm0 \n\ + "SHIFT" # shift source data to RGBA \n\ + pshufd $0xF3, %%xmm5, %%xmm1 # XMM1: pixel 1 mask \n\ + pshufd $0xCF, %%xmm5, %%xmm2 # XMM2: pixel 2 mask \n\ + pshufd $0x3F, %%xmm5, %%xmm3 # XMM3: pixel 3 mask \n\ + pand %%xmm0, %%xmm3 # XMM3: pixel 3 \n\ + psrldq $1, %%xmm3 \n\ + pand %%xmm0, %%xmm2 # XMM2: pixel 2 \n\ + por %%xmm3, %%xmm2 # XMM2: pixels 2 and 3 \n\ + psrldq $1, %%xmm2 \n\ + pand %%xmm0, %%xmm1 # XMM1: pixel 1 \n\ + pand %%xmm5, %%xmm0 # XMM0: pixel 0 \n\ + por %%xmm2, %%xmm1 # XMM1: pixels 1, 2, and 3 \n\ + psrldq $1, %%xmm1 \n\ + por %%xmm1, %%xmm0 # XMM0: RGB24 data \n\ + # We can't just movdqu, because we might run over the edge \n\ + movd %%xmm0, -12("EDI","EDX") # store low 4 bytes \n\ + pshufd $0xF9, %%xmm0, %%xmm0 # shift right 4 bytes \n\ + movq %%xmm0, -8("EDI","EDX") # store high 8 bytes \n",\ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), \ + "d" (&rgb_bgr_data), "m" (rgb_bgr_data) \ + : "eax"); + + +/* RGBA<->ABGR and ARGB<->BGRA: reverse byte order */ +static int rgba_swapall_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_REV32_SSE2(width*height); + return 1; +} + +/* RGBA<->BGRA: swap bytes 0 and 2 */ +static int rgba_swap02_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_02_SSE2(width*height); + return 1; +} + +/* ARGB<->ABGR: swap bytes 1 and 3 */ +static int rgba_swap13_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_13_SSE2(width*height); + return 1; +} + +/* RGBA->ARGB and BGRA->ABGR: alpha moves from byte 3 to byte 0 */ +static int rgba_alpha30_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROL32_SSE2(width*height); + return 1; +} + +/* ARGB->RGBA and ABGR->BGRA: alpha moves from byte 0 to byte 3 */ +static int rgba_alpha03_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROR32_SSE2(width*height); + return 1; +} + +/* RGB<->BGR */ +static int rgb24_bgr24_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa ("EDX"), %%xmm5 # byte 0 mask \n\ + pshufd $0xD2, %%xmm5, %%xmm6 # byte 1 mask \n\ + pshufd $0xC9, %%xmm5, %%xmm7 # byte 2 mask \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 4, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ + "lea ("ECX","ECX",2),"EDX" \n\ + movb -3("ESI","EDX"), %%al \n\ + movb -2("ESI","EDX"), %%ah \n\ + movb %%ah, -2("EDI","EDX") \n\ + movb -1("ESI","EDX"), %%ah \n\ + movb %%ah, -3("EDI","EDX") \n\ + movb %%al, -1("EDI","EDX")", + /* main_loop */ + "lea ("ECX","ECX",2),"EDX" \n\ + # We can't just movdqu, because we might run over the edge \n\ + movd -12("ESI","EDX"), %%xmm1 \n\ + movq -8("ESI","EDX"), %%xmm0 \n\ + pshufd $0xD3, %%xmm0, %%xmm0 # shift left by 4 bytes \n\ + por %%xmm1, %%xmm0 # XMM0: original data \n\ + movdqa %%xmm5, %%xmm2 \n\ + movdqa %%xmm6, %%xmm3 \n\ + movdqa %%xmm7, %%xmm4 \n\ + pand %%xmm0, %%xmm2 # XMM2: byte 0 \n\ + pslldq $2, %%xmm2 # shift to byte 2 position \n\ + pand %%xmm0, %%xmm3 # XMM3: byte 1 \n\ + pand %%xmm0, %%xmm4 # XMM4: byte 2 \n\ + psrldq $2, %%xmm4 # shift to byte 0 position \n\ + por %%xmm2, %%xmm3 \n\ + por %%xmm4, %%xmm3 # XMM3: reversed data \n\ + movd %%xmm3, -12("EDI","EDX") # avoid running over the edge \n\ + pshufd $0xF9, %%xmm3, %%xmm3 # shift right by 4 bytes \n\ + movq %%xmm3, -8("EDI","EDX")", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "d" (&rgb_bgr_data), "m" (rgb_bgr_data) + : "eax"); + return 1; +} + +/* RGB->RGBA */ +static int rgb24_rgba32_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + RGB24TO32(0,1,2,3, ""); + return 1; +} + +/* RGB->ABGR */ +static int rgb24_abgr32_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + RGB24TO32(3,2,1,0, SHIFT_RBSWAP SHIFT_AFIRST); + return 1; +} + +/* RGB->ARGB */ +static int rgb24_argb32_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + RGB24TO32(1,2,3,0, SHIFT_AFIRST); + return 1; +} + +/* RGB->BGRA */ +static int rgb24_bgra32_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + RGB24TO32(2,1,0,3, SHIFT_RBSWAP); + return 1; +} + +/* RGBA->RGB */ +static int rgba32_rgb24_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + RGB32TO24(0,1,2,3, ""); + return 1; +} + +/* ABGR->RGB */ +static int abgr32_rgb24_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + RGB32TO24(3,2,1,0, SHIFT_ALAST SHIFT_RBSWAP); + return 1; +} + +/* ARGB->RGB */ +static int argb32_rgb24_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + RGB32TO24(1,2,3,0, SHIFT_ALAST); + return 1; +} + +/* BGRA->RGB */ +static int bgra32_rgb24_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + RGB32TO24(2,1,0,3, SHIFT_RBSWAP); + return 1; +} + +/*************************************************************************/ + +#define R_GRAY 19595 +#define G_GRAY 38470 +#define B_GRAY 7471 +#define INIT_GRAY8 \ + "pxor %%xmm4, %%xmm4 # XMM4: all 0's \n\ + movl %3, %%eax \n\ + movd %%eax, %%xmm5 \n\ + pshuflw $0x00, %%xmm5, %%xmm5 \n\ + pshufd $0x00, %%xmm5, %%xmm5 # XMM5: R->gray constant \n\ + movl %4, %%eax \n\ + movd %%eax, %%xmm6 \n\ + pshuflw $0x00, %%xmm6, %%xmm6 \n\ + pshufd $0x00, %%xmm6, %%xmm6 # XMM6: G->gray constant \n\ + movl %5, %%eax \n\ + movd %%eax, %%xmm7 \n\ + pshuflw $0x00, %%xmm7, %%xmm7 \n\ + pshufd $0x00, %%xmm7, %%xmm7 # XMM7: B->gray constant \n\ + pcmpeqd %%xmm3, %%xmm3 \n\ + psllw $15, %%xmm3 \n\ + psrlw $8, %%xmm3 # XMM3: 0x0080*8 (for rounding) \n" +#define SINGLE_GRAY8(idx,ofsR,ofsG,ofsB) \ + "movzbl "#ofsR"("ESI","idx"), %%eax # retrieve red byte \n\ + imull %3, %%eax # multiply by red->gray factor \n\ + movzbl "#ofsG"("ESI","idx"), %%edx # retrieve green byte \n\ + imull %4, %%edx # multiply by green->gray factor\n\ + addl %%edx, %%eax # add to total \n\ + movzbl "#ofsB"("ESI","idx"), %%edx # retrieve blue byte \n\ + imull %5, %%edx # multiply by blue->gray factor \n\ + addl %%edx, %%eax # add to total \n\ + addl $0x8000, %%eax # round \n\ + shrl $16, %%eax # shift back down \n\ + movb %%al, -1("EDI","ECX") # and store \n" +#define STORE_GRAY8 \ + "psllw $8, %%xmm0 # XMM0: add 8 bits of precision \n\ + pmulhuw %%xmm5, %%xmm0 # XMM0: r7 r6 r5 r4 r3 r2 r1 r0 \n\ + psllw $8, %%xmm1 # XMM1: add 8 bits of precision \n\ + pmulhuw %%xmm6, %%xmm1 # XMM1: g7 g6 g5 g4 g3 g2 g1 g0 \n\ + paddw %%xmm3, %%xmm0 # XMM0: add rounding constant \n\ + psllw $8, %%xmm2 # XMM2: add 8 bits of precision \n\ + pmulhuw %%xmm7, %%xmm2 # XMM2: b7 b6 b5 b4 b3 b2 b1 b0 \n\ + paddw %%xmm1, %%xmm0 # XMM0: add green part \n\ + paddw %%xmm2, %%xmm0 # XMM0: add blue part \n\ + psrlw $8, %%xmm0 # XMM0: shift back to bytes \n\ + packuswb %%xmm4, %%xmm0 # XMM0: gray7..gray0 packed \n\ + movq %%xmm0, -8("EDI","ECX") \n" + +#define ASM_RGB24_GRAY(ofsR,ofsG,ofsB,load) \ + asm(INIT_GRAY8 \ + "push "EBX" \n\ + lea ("ECX","ECX",2),"EBX" \n"\ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ SINGLE_GRAY8(EBX, ofsR,ofsG,ofsB) "subl $3, %%ebx;",\ + /* main_loop */ load(4) STORE_GRAY8 "subl $24, %%ebx;", \ + /* emms */ "emms") \ + "pop "EBX \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), \ + "i" (R_GRAY), "i" (G_GRAY), "i" (B_GRAY) \ + : "eax", "edx") + +#define ASM_RGB32_GRAY(ofsR,ofsG,ofsB,load) \ + asm(INIT_GRAY8 \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ SINGLE_GRAY8(ECX",4", ofsR,ofsG,ofsB), \ + /* main_loop */ load(4) STORE_GRAY8, \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), \ + "i" (R_GRAY), "i" (G_GRAY), "i" (B_GRAY) \ + : "eax", "edx") + + +static int rgb24_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_RGB24_GRAY(-3,-2,-1, SSE2_LOAD_RGB24); + return 1; +} + +static int bgr24_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_RGB24_GRAY(-1,-2,-3, SSE2_LOAD_BGR24); + return 1; +} + +static int rgba32_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_RGB32_GRAY(-4,-3,-2, SSE2_LOAD_RGBA32); + return 1; +} + +static int bgra32_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_RGB32_GRAY(-2,-3,-4, SSE2_LOAD_BGRA32); + return 1; +} + +static int argb32_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_RGB32_GRAY(-3,-2,-1, SSE2_LOAD_ARGB32); + return 1; +} + +static int abgr32_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_RGB32_GRAY(-1,-2,-3, SSE2_LOAD_ABGR32); + return 1; +} + +/*************************************************************************/ + +static int gray8_rgb24_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("# Store all 0's in XMM4 \n\ + pxor %%xmm4, %%xmm4 \n\ + # Generate mask in XMM7 to select bytes 0,3,6,9 of an XMM register\n\ + pcmpeqd %%xmm7, %%xmm7 # XMM7: all 1's \n\ + psrlw $8, %%xmm7 # XMM7: 0x00FF * 8 \n\ + pcmpeqd %%xmm6, %%xmm6 # XMM6: all 1's \n\ + psllw $8, %%xmm6 # XMM6: 0xFF00 * 8 \n\ + pslldq $8, %%xmm6 \n\ + psrldq $8, %%xmm7 \n\ + por %%xmm6, %%xmm7 # XMM7: 0xFF00*4, 0x00FF*4 \n\ + pshufd $0xCC, %%xmm7, %%xmm7 # XMM7: {0xFF00*2, 0x00FF*2} * 2\n\ + pshuflw $0xC0, %%xmm7, %%xmm7 # XMM7.l: FF0000FF00FF00FF \n\ + psrldq $4, %%xmm7 # XMM7: 0x00000000FF00FF00 \n\ + # 00FF00FFFF0000FF \n\ + pshufd $0xEC, %%xmm7, %%xmm7 # XMM7: 0x00000000FF00FF00 \n\ + # 00000000FF0000FF \n\ + pshuflw $0x24, %%xmm7, %%xmm7 # XMM7.l: 00FF0000FF0000FF \n\ + pshufhw $0xFC, %%xmm7, %%xmm7 # XMM7.h: 000000000000FF00 \n\ + # Load ECX*3 into EDX ahead of time \n\ + lea ("ECX","ECX",2), "EDX" \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 4, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movb -1("ESI","ECX"), %%al # retrieve gray byte \n\ + movb %%al, -3("EDI","EDX") # and store 3 times \n\ + movb %%al, -2("EDI","EDX") \n\ + movb %%al, -1("EDI","EDX") \n\ + subl $3, %%edx \n", + /* main_loop */ "\ + movd -4("ESI","ECX"), %%xmm0 # XMM0: G3..G0 \n\ + pshufd $0xCC, %%xmm0, %%xmm0 # XMM0: {0,0,0,0,G3..G0} * 2 \n\ + pshuflw $0x50, %%xmm0, %%xmm0 # X0.l: G3 G2 G3 G2 G1 G0 G1 G0 \n\ + pshufhw $0x55, %%xmm0, %%xmm0 # X0.h: G3 G2 G3 G2 G3 G2 G3 G2 \n\ + pand %%xmm7, %%xmm0 # XMM0: ------3--2--1--0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: ------3--2--1--0 \n\ + pslldq $1, %%xmm1 # XMM1: -----3--2--1--0- \n\ + movdqa %%xmm0, %%xmm2 # XMM2: ------3--2--1--0 \n\ + pslldq $2, %%xmm2 # XMM2: ----3--2--1--0-- \n\ + por %%xmm1, %%xmm0 # XMM0: -----33-22-11-00 \n\ + por %%xmm2, %%xmm0 # XMM0: ----333222111000 \n\ + movd %%xmm0, -12("EDI","EDX") \n\ + pshufd $0xC9, %%xmm0, %%xmm0 \n\ + movq %%xmm0, -8("EDI","EDX") \n\ + subl $12, %%edx \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height) + : "eax", "edx"); + return 1; +} + +static int gray8_rgba32_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("pxor %%xmm4, %%xmm4 # XMM4: all 0's \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 4, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movb -1("ESI","ECX"), %%al # retrieve gray byte \n\ + movb %%al, -4("EDI","ECX",4) # and store 3 times \n\ + movb %%al, -3("EDI","ECX",4) \n\ + movb %%al, -2("EDI","ECX",4) \n\ + movb $0, -1("EDI","ECX",4) # clear A byte \n", + /* main_loop */ "\ + movd -4("ESI","ECX"), %%xmm0 # XMM0: 00 00 00 00 G3 G2 G1 G0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: 00 00 00 00 G3 G2 G1 G0 \n\ + punpcklbw %%xmm0, %%xmm0 # XMM0: G3 G3 G2 G2 G1 G1 G0 G0 \n\ + punpcklbw %%xmm4, %%xmm1 # XMM1: 00 G3 00 G2 00 G1 00 G0 \n\ + punpcklbw %%xmm1, %%xmm0 # XMM0: 0GGG3 0GGG2 0GGG1 0GGG0 \n\ + movdqu %%xmm0, -16("EDI","ECX",4) \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height) + : "eax"); + return 1; +} + +static int gray8_argb32_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("pxor %%xmm4, %%xmm4 # XMM4: all 0's \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 4, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movb -1("ESI","ECX"), %%al # retrieve gray byte \n\ + movb %%al, -3("EDI","ECX",4) # and store 3 times \n\ + movb %%al, -2("EDI","ECX",4) \n\ + movb %%al, -1("EDI","ECX",4) \n\ + movb $0, -4("EDI","ECX",4) # clear A byte \n", + /* main_loop */ "\ + movd -4("ESI","ECX"), %%xmm0 # XMM0: 00 00 00 00 G3 G2 G1 G0 \n\ + movdqa %%xmm4, %%xmm1 # XMM1: 00 00 00 00 00 00 00 00 \n\ + punpcklbw %%xmm0, %%xmm1 # XMM1: G3 00 G2 00 G1 00 G0 00 \n\ + punpcklbw %%xmm0, %%xmm0 # XMM0: G3 G3 G2 G2 G1 G1 G0 G0 \n\ + punpcklbw %%xmm0, %%xmm1 # XMM0: GGG03 GGG02 GGG01 GGG00 \n\ + movdqu %%xmm1, -16("EDI","ECX",4) \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height) + : "eax"); + return 1; +} + +#endif /* HAVE_ASM_SSE2 */ + +/*************************************************************************/ + +#endif /* ARCH_X86 || ARCH_X86_64 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* Initialization */ + +int ac_imgconvert_init_rgb_packed(int accel) +{ + if (!register_conversion(IMG_RGB24, IMG_RGB24, rgb_copy) + || !register_conversion(IMG_RGB24, IMG_BGR24, rgb24_bgr24) + || !register_conversion(IMG_RGB24, IMG_RGBA32, rgb24_rgba32) + || !register_conversion(IMG_RGB24, IMG_ABGR32, rgb24_abgr32) + || !register_conversion(IMG_RGB24, IMG_ARGB32, rgb24_argb32) + || !register_conversion(IMG_RGB24, IMG_BGRA32, rgb24_bgra32) + || !register_conversion(IMG_RGB24, IMG_GRAY8, rgb24_gray8) + + || !register_conversion(IMG_BGR24, IMG_BGR24, rgb_copy) + || !register_conversion(IMG_BGR24, IMG_RGB24, rgb24_bgr24) + || !register_conversion(IMG_BGR24, IMG_RGBA32, rgb24_bgra32) + || !register_conversion(IMG_BGR24, IMG_ABGR32, rgb24_argb32) + || !register_conversion(IMG_BGR24, IMG_ARGB32, rgb24_abgr32) + || !register_conversion(IMG_BGR24, IMG_BGRA32, rgb24_rgba32) + || !register_conversion(IMG_BGR24, IMG_GRAY8, bgr24_gray8) + + || !register_conversion(IMG_RGBA32, IMG_RGB24, rgba32_rgb24) + || !register_conversion(IMG_RGBA32, IMG_BGR24, bgra32_rgb24) + || !register_conversion(IMG_RGBA32, IMG_RGBA32, rgba_copy) + || !register_conversion(IMG_RGBA32, IMG_ABGR32, rgba_swapall) + || !register_conversion(IMG_RGBA32, IMG_ARGB32, rgba_alpha30) + || !register_conversion(IMG_RGBA32, IMG_BGRA32, rgba_swap02) + || !register_conversion(IMG_RGBA32, IMG_GRAY8, rgba32_gray8) + + || !register_conversion(IMG_ABGR32, IMG_RGB24, abgr32_rgb24) + || !register_conversion(IMG_ABGR32, IMG_BGR24, argb32_rgb24) + || !register_conversion(IMG_ABGR32, IMG_RGBA32, rgba_swapall) + || !register_conversion(IMG_ABGR32, IMG_ABGR32, rgba_copy) + || !register_conversion(IMG_ABGR32, IMG_ARGB32, rgba_swap13) + || !register_conversion(IMG_ABGR32, IMG_BGRA32, rgba_alpha03) + || !register_conversion(IMG_ABGR32, IMG_GRAY8, abgr32_gray8) + + || !register_conversion(IMG_ARGB32, IMG_RGB24, argb32_rgb24) + || !register_conversion(IMG_ARGB32, IMG_BGR24, abgr32_rgb24) + || !register_conversion(IMG_ARGB32, IMG_RGBA32, rgba_alpha03) + || !register_conversion(IMG_ARGB32, IMG_ABGR32, rgba_swap13) + || !register_conversion(IMG_ARGB32, IMG_ARGB32, rgba_copy) + || !register_conversion(IMG_ARGB32, IMG_BGRA32, rgba_swapall) + || !register_conversion(IMG_ARGB32, IMG_GRAY8, argb32_gray8) + + || !register_conversion(IMG_BGRA32, IMG_RGB24, bgra32_rgb24) + || !register_conversion(IMG_BGRA32, IMG_BGR24, rgba32_rgb24) + || !register_conversion(IMG_BGRA32, IMG_RGBA32, rgba_swap02) + || !register_conversion(IMG_BGRA32, IMG_ABGR32, rgba_alpha30) + || !register_conversion(IMG_BGRA32, IMG_ARGB32, rgba_swapall) + || !register_conversion(IMG_BGRA32, IMG_BGRA32, rgba_copy) + || !register_conversion(IMG_BGRA32, IMG_GRAY8, bgra32_gray8) + + || !register_conversion(IMG_GRAY8, IMG_RGB24, gray8_rgb24) + || !register_conversion(IMG_GRAY8, IMG_BGR24, gray8_rgb24) + || !register_conversion(IMG_GRAY8, IMG_RGBA32, gray8_rgba32) + || !register_conversion(IMG_GRAY8, IMG_ABGR32, gray8_argb32) + || !register_conversion(IMG_GRAY8, IMG_ARGB32, gray8_argb32) + || !register_conversion(IMG_GRAY8, IMG_BGRA32, gray8_rgba32) + || !register_conversion(IMG_GRAY8, IMG_GRAY8, gray8_copy) + ) { + return 0; + } + +#if defined(ARCH_X86) || defined(ARCH_X86_64) + + if (accel & (AC_IA32ASM | AC_AMD64ASM)) { + if (!register_conversion(IMG_RGBA32, IMG_ABGR32, rgba_swapall_x86) + || !register_conversion(IMG_RGBA32, IMG_ARGB32, rgba_alpha30_x86) + || !register_conversion(IMG_RGBA32, IMG_BGRA32, rgba_swap02_x86) + + || !register_conversion(IMG_ABGR32, IMG_RGBA32, rgba_swapall_x86) + || !register_conversion(IMG_ABGR32, IMG_ARGB32, rgba_swap13_x86) + || !register_conversion(IMG_ABGR32, IMG_BGRA32, rgba_alpha03_x86) + + || !register_conversion(IMG_ARGB32, IMG_RGBA32, rgba_alpha03_x86) + || !register_conversion(IMG_ARGB32, IMG_ABGR32, rgba_swap13_x86) + || !register_conversion(IMG_ARGB32, IMG_BGRA32, rgba_swapall_x86) + + || !register_conversion(IMG_BGRA32, IMG_RGBA32, rgba_swap02_x86) + || !register_conversion(IMG_BGRA32, IMG_ABGR32, rgba_alpha30_x86) + || !register_conversion(IMG_BGRA32, IMG_ARGB32, rgba_swapall_x86) + ) { + return 0; + } + } + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) + if (accel & AC_MMX) { + if (!register_conversion(IMG_RGBA32, IMG_ABGR32, rgba_swapall_mmx) + || !register_conversion(IMG_RGBA32, IMG_ARGB32, rgba_alpha30_mmx) + || !register_conversion(IMG_RGBA32, IMG_BGRA32, rgba_swap02_mmx) + + || !register_conversion(IMG_ABGR32, IMG_RGBA32, rgba_swapall_mmx) + || !register_conversion(IMG_ABGR32, IMG_ARGB32, rgba_swap13_mmx) + || !register_conversion(IMG_ABGR32, IMG_BGRA32, rgba_alpha03_mmx) + + || !register_conversion(IMG_ARGB32, IMG_RGBA32, rgba_alpha03_mmx) + || !register_conversion(IMG_ARGB32, IMG_ABGR32, rgba_swap13_mmx) + || !register_conversion(IMG_ARGB32, IMG_BGRA32, rgba_swapall_mmx) + + || !register_conversion(IMG_BGRA32, IMG_RGBA32, rgba_swap02_mmx) + || !register_conversion(IMG_BGRA32, IMG_ABGR32, rgba_alpha30_mmx) + || !register_conversion(IMG_BGRA32, IMG_ARGB32, rgba_swapall_mmx) + ) { + return 0; + } + } +#endif + +#if defined(HAVE_ASM_SSE2) + if (accel & AC_SSE2) { + if (!register_conversion(IMG_RGB24, IMG_BGR24, rgb24_bgr24_sse2) + || !register_conversion(IMG_RGB24, IMG_RGBA32, rgb24_rgba32_sse2) + || !register_conversion(IMG_RGB24, IMG_ABGR32, rgb24_abgr32_sse2) + || !register_conversion(IMG_RGB24, IMG_ARGB32, rgb24_argb32_sse2) + || !register_conversion(IMG_RGB24, IMG_BGRA32, rgb24_bgra32_sse2) + || !register_conversion(IMG_RGB24, IMG_GRAY8, rgb24_gray8_sse2) + + || !register_conversion(IMG_BGR24, IMG_RGB24, rgb24_bgr24_sse2) + || !register_conversion(IMG_BGR24, IMG_RGBA32, rgb24_bgra32_sse2) + || !register_conversion(IMG_BGR24, IMG_ABGR32, rgb24_argb32_sse2) + || !register_conversion(IMG_BGR24, IMG_ARGB32, rgb24_abgr32_sse2) + || !register_conversion(IMG_BGR24, IMG_BGRA32, rgb24_rgba32_sse2) + || !register_conversion(IMG_BGR24, IMG_GRAY8, bgr24_gray8_sse2) + + || !register_conversion(IMG_RGBA32, IMG_RGB24, rgba32_rgb24_sse2) + || !register_conversion(IMG_RGBA32, IMG_BGR24, bgra32_rgb24_sse2) + || !register_conversion(IMG_RGBA32, IMG_ABGR32, rgba_swapall_sse2) + || !register_conversion(IMG_RGBA32, IMG_ARGB32, rgba_alpha30_sse2) + || !register_conversion(IMG_RGBA32, IMG_BGRA32, rgba_swap02_sse2) + || !register_conversion(IMG_RGBA32, IMG_GRAY8, rgba32_gray8_sse2) + + || !register_conversion(IMG_ABGR32, IMG_RGB24, abgr32_rgb24_sse2) + || !register_conversion(IMG_ABGR32, IMG_BGR24, argb32_rgb24_sse2) + || !register_conversion(IMG_ABGR32, IMG_RGBA32, rgba_swapall_sse2) + || !register_conversion(IMG_ABGR32, IMG_ARGB32, rgba_swap13_sse2) + || !register_conversion(IMG_ABGR32, IMG_BGRA32, rgba_alpha03_sse2) + || !register_conversion(IMG_ABGR32, IMG_GRAY8, abgr32_gray8_sse2) + + || !register_conversion(IMG_ARGB32, IMG_RGB24, argb32_rgb24_sse2) + || !register_conversion(IMG_ARGB32, IMG_BGR24, abgr32_rgb24_sse2) + || !register_conversion(IMG_ARGB32, IMG_RGBA32, rgba_alpha03_sse2) + || !register_conversion(IMG_ARGB32, IMG_ABGR32, rgba_swap13_sse2) + || !register_conversion(IMG_ARGB32, IMG_BGRA32, rgba_swapall_sse2) + || !register_conversion(IMG_ARGB32, IMG_GRAY8, argb32_gray8_sse2) + + || !register_conversion(IMG_BGRA32, IMG_RGB24, bgra32_rgb24_sse2) + || !register_conversion(IMG_BGRA32, IMG_BGR24, rgba32_rgb24_sse2) + || !register_conversion(IMG_BGRA32, IMG_RGBA32, rgba_swap02_sse2) + || !register_conversion(IMG_BGRA32, IMG_ABGR32, rgba_alpha30_sse2) + || !register_conversion(IMG_BGRA32, IMG_ARGB32, rgba_swapall_sse2) + || !register_conversion(IMG_BGRA32, IMG_GRAY8, bgra32_gray8_sse2) + + || !register_conversion(IMG_GRAY8, IMG_RGB24, gray8_rgb24_sse2) + || !register_conversion(IMG_GRAY8, IMG_BGR24, gray8_rgb24_sse2) + || !register_conversion(IMG_GRAY8, IMG_RGBA32, gray8_rgba32_sse2) + || !register_conversion(IMG_GRAY8, IMG_ABGR32, gray8_argb32_sse2) + || !register_conversion(IMG_GRAY8, IMG_ARGB32, gray8_argb32_sse2) + || !register_conversion(IMG_GRAY8, IMG_BGRA32, gray8_rgba32_sse2) + ) { + return 0; + } + } +#endif + +#endif /* ARCH_X86 || ARCH_X86_64 */ + + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/img_x86_common.h b/veejay-server/aclib/img_x86_common.h new file mode 100644 index 00000000..a04084a1 --- /dev/null +++ b/veejay-server/aclib/img_x86_common.h @@ -0,0 +1,596 @@ +/* + * img_x86_common.h - common x86/x86-64 assembly macros + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#ifndef ACLIB_IMG_X86_COMMON_H +#define ACLIB_IMG_X86_COMMON_H + +/*************************************************************************/ + +/* Register names for pointers */ +#ifdef ARCH_X86_64 +# define EAX "%%rax" +# define EBX "%%rbx" +# define ECX "%%rcx" +# define EDX "%%rdx" +# define ESP "%%rsp" +# define EBP "%%rbp" +# define ESI "%%rsi" +# define EDI "%%rdi" +#else +# define EAX "%%eax" +# define EBX "%%ebx" +# define ECX "%%ecx" +# define EDX "%%edx" +# define ESP "%%esp" +# define EBP "%%ebp" +# define ESI "%%esi" +# define EDI "%%edi" +#endif + +/* Data for isolating particular bytes. Used by the SWAP32 macros; if you + * use them, make sure to define DEFINE_MASK_DATA before including this + * file! */ +#ifdef DEFINE_MASK_DATA +static const struct { uint32_t n[64]; } __attribute__((aligned(16))) mask_data = {{ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF, + 0x0000FF00, 0x0000FF00, 0x0000FF00, 0x0000FF00, + 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, + 0x00FF0000, 0x00FF0000, 0x00FF0000, 0x00FF0000, + 0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF, + 0x00FFFF00, 0x00FFFF00, 0x00FFFF00, 0x00FFFF00, + 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, + 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, + 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, + 0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00, + 0xFF00FFFF, 0xFF00FFFF, 0xFF00FFFF, 0xFF00FFFF, + 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, + 0xFFFF00FF, 0xFFFF00FF, 0xFFFF00FF, 0xFFFF00FF, + 0xFFFFFF00, 0xFFFFFF00, 0xFFFFFF00, 0xFFFFFF00, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, +}}; +#endif + +/*************************************************************************/ + +/* Basic assembly macros, used for odd-count loops */ + +/* Swap bytes in pairs of 16-bit values */ +#define X86_SWAP16_2 \ + "movl -4("ESI","ECX",4), %%eax \n\ + movl %%eax, %%edx \n\ + shll $8, %%eax \n\ + andl $0xFF00FF00, %%eax \n\ + shrl $8, %%edx \n\ + andl $0x00FF00FF, %%edx \n\ + orl %%edx, %%eax \n\ + movl %%eax, -4("EDI","ECX",4)" + +/* Swap words in a 32-bit value */ +#define X86_SWAP32 \ + "movl -4("ESI","ECX",4), %%eax \n\ + roll $16, %%eax \n\ + movl %%eax, -4("EDI","ECX",4)" + +/* Swap bytes 0 and 2 of a 32-bit value */ +#define X86_SWAP32_02 \ + "movw -4("ESI","ECX",4), %%ax \n\ + movw -2("ESI","ECX",4), %%dx \n\ + xchg %%dl, %%al \n\ + movw %%ax, -4("EDI","ECX",4) \n\ + movw %%dx, -2("EDI","ECX",4)" + +/* Swap bytes 1 and 3 of a 32-bit value */ +#define X86_SWAP32_13 \ + "movw -4("ESI","ECX",4), %%ax \n\ + movw -2("ESI","ECX",4), %%dx \n\ + xchg %%dh, %%ah \n\ + movw %%ax, -4("EDI","ECX",4) \n\ + movw %%dx, -2("EDI","ECX",4)" + +/* Reverse the order of bytes in a 32-bit value */ +#define X86_REV32 \ + "movl -4("ESI","ECX",4), %%eax \n\ + xchg %%ah, %%al \n\ + roll $16, %%eax \n\ + xchg %%ah, %%al \n\ + movl %%eax, -4("EDI","ECX",4)" + +/* The same, using the BSWAP instruction */ +#define X86_REV32_BSWAP \ + "movl -4("ESI","ECX",4), %%eax \n\ + bswap %%eax \n\ + movl %%eax, -4("EDI","ECX",4)" + +/* Rotate a 32-bit value left 8 bits */ +#define X86_ROL32 \ + "movl -4("ESI","ECX",4), %%eax \n\ + roll $8, %%eax \n\ + movl %%eax, -4("EDI","ECX",4)" + +/* Rotate a 32-bit value right 8 bits */ +#define X86_ROR32 \ + "movl -4("ESI","ECX",4), %%eax \n\ + rorl $8, %%eax \n\ + movl %%eax, -4("EDI","ECX",4)" + +/*************************************************************************/ + +/* Basic assembly routines. Sizes are all given in 32-bit units. */ + +#define ASM_SWAP16_2_X86(size) \ + asm("0: "X86_SWAP16_2" \n\ + subl $1, %%ecx \n\ + jnz 0b" \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax", "edx") + +#define ASM_SWAP32_X86(size) \ + asm("0: "X86_SWAP32" \n\ + subl $1, %%ecx \n\ + jnz 0b" \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax", "edx") + +#define ASM_SWAP32_02_X86(size) \ + asm("0: "X86_SWAP32_02" \n\ + subl $1, %%ecx \n\ + jnz 0b" \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax", "edx") + +#define ASM_SWAP32_13_X86(size) \ + asm("0: "X86_SWAP32_13" \n\ + subl $1, %%ecx \n\ + jnz 0b" \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax", "edx") + +#define ASM_REV32_X86(size) \ + asm("0: "X86_REV32" \n\ + subl $1, %%ecx \n\ + jnz 0b" \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax") + +#define ASM_ROL32_X86(size) \ + asm("0: "X86_ROL32" \n\ + subl $1, %%ecx \n\ + jnz 0b" \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax") + +#define ASM_ROR32_X86(size) \ + asm("0: "X86_ROR32" \n\ + subl $1, %%ecx \n\ + jnz 0b" \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax") + +/*************************************************************************/ +/*************************************************************************/ + +/* Wrapper for SIMD loops. This generates the body of an asm() construct + * (the string only, not the input/output/clobber lists) given the data + * block size (number of data units processed per SIMD loop iteration), + * instructions to save and restore unclobberable registers (such as EBX), + * and the bodies of the odd-count and main loops. The data count is + * assumed to be preloaded in ECX. Parameters are: + * blocksize: number of units of data processed per SIMD loop (must be + * a power of 2); can be a constant or a numerical + * expression containing only constants + * push_regs: string constant containing instructions to push registers + * that must be saved over the small loop + * pop_regs: string constant containing instructions to pop registers + * saved by `push_regs' (restored before the main loop) + * small_loop: loop for handling data elements one at a time (when the + * count is not a multiple of `blocksize' + * main_loop: main SIMD loop for processing data + * emms: EMMS/SFENCE instructions to end main loop with, as needed + */ + +#define SIMD_LOOP_WRAPPER(blocksize,push_regs,pop_regs,small_loop,main_loop,emms) \ + /* Always save ECX--GCC may rely on it being unmodified */ \ + "push "ECX"; " \ + /* Check whether the count is a multiple of the blocksize (this \ + * can cause branch mispredicts but seems to be faster overall) */ \ + "testl $(("#blocksize")-1), %%ecx; " \ + "jz 1f; " \ + /* It's not--run the small loop to align the count */ \ + push_regs"; " \ + "0: " \ + small_loop"; " \ + "subl $1, %%ecx; " \ + "testl $(("#blocksize")-1), %%ecx; " \ + "jnz 0b; " \ + pop_regs"; " \ + /* Make sure there's some data left */ \ + "testl %%ecx, %%ecx; " \ + "jz 2f; " \ + /* Now run the main SIMD loop */ \ + "1: " \ + main_loop"; " \ + "subl $("#blocksize"), %%ecx; " \ + "jnz 1b; " \ + /* Clear MMX state and/or SFENCE, as needed */ \ + emms"; " \ + /* Restore ECX and finish */ \ + "2: " \ + "pop "ECX";" + +/*************************************************************************/ + +/* MMX- and SSE2-optimized swap/rotate routines. These routines are + * identical save for data size, so we use common macros to implement them, + * with register names and data offsets replaced by parameters to the + * macros. */ + +#define ASM_SIMD_MMX(name,size) \ + name((size), 64, \ + "movq", "movq", "movq", "", \ + "%%mm0", "%%mm1", "%%mm2", "%%mm3", \ + "%%mm4", "%%mm5", "%%mm6", "%%mm7") +#define ASM_SIMD_SSE2(name,size) \ + name((size), 128, \ + "movdqu", "movdqa", "movdqu", "", \ + "%%xmm0", "%%xmm1", "%%xmm2", "%%xmm3",\ + "%%xmm4", "%%xmm5", "%%xmm6", "%%xmm7") +#define ASM_SIMD_SSE2_ALIGNED(name,size) \ + name((size), 128, \ + "movdqa", "movdqa", "movntdq", "sfence",\ + "%%xmm0", "%%xmm1", "%%xmm2", "%%xmm3",\ + "%%xmm4", "%%xmm5", "%%xmm6", "%%xmm7") + +#define ASM_SWAP16_2_MMX(size) ASM_SIMD_MMX(ASM_SWAP16_2_SIMD,(size)) +#define ASM_SWAP16_2_SSE2(size) ASM_SIMD_SSE2(ASM_SWAP16_2_SIMD,(size)) +#define ASM_SWAP16_2_SSE2A(size) ASM_SIMD_SSE2_ALIGNED(ASM_SWAP16_2_SIMD,(size)) +#define ASM_SWAP32_MMX(size) ASM_SIMD_MMX(ASM_SWAP32_SIMD,(size)) +#define ASM_SWAP32_SSE2(size) ASM_SIMD_SSE2(ASM_SWAP32_SIMD,(size)) +#define ASM_SWAP32_SSE2A(size) ASM_SIMD_SSE2_ALIGNED(ASM_SWAP32_SIMD,(size)) +#define ASM_SWAP32_02_MMX(size) ASM_SIMD_MMX(ASM_SWAP32_02_SIMD,(size)) +#define ASM_SWAP32_02_SSE2(size) ASM_SIMD_SSE2(ASM_SWAP32_02_SIMD,(size)) +#define ASM_SWAP32_02_SSE2A(size) ASM_SIMD_SSE2_ALIGNED(ASM_SWAP32_02_SIMD,(size)) +#define ASM_SWAP32_13_MMX(size) ASM_SIMD_MMX(ASM_SWAP32_13_SIMD,(size)) +#define ASM_SWAP32_13_SSE2(size) ASM_SIMD_SSE2(ASM_SWAP32_13_SIMD,(size)) +#define ASM_SWAP32_13_SSE2A(size) ASM_SIMD_SSE2_ALIGNED(ASM_SWAP32_13_SIMD,(size)) +#define ASM_REV32_MMX(size) ASM_SIMD_MMX(ASM_REV32_SIMD,(size)) +#define ASM_REV32_SSE2(size) ASM_SIMD_SSE2(ASM_REV32_SIMD,(size)) +#define ASM_REV32_SSE2A(size) ASM_SIMD_SSE2_ALIGNED(ASM_REV32_SIMD,(size)) +#define ASM_ROL32_MMX(size) ASM_SIMD_MMX(ASM_ROL32_SIMD,(size)) +#define ASM_ROL32_SSE2(size) ASM_SIMD_SSE2(ASM_ROL32_SIMD,(size)) +#define ASM_ROL32_SSE2A(size) ASM_SIMD_SSE2_ALIGNED(ASM_ROL32_SIMD,(size)) +#define ASM_ROR32_MMX(size) ASM_SIMD_MMX(ASM_ROR32_SIMD,(size)) +#define ASM_ROR32_SSE2(size) ASM_SIMD_SSE2(ASM_ROR32_SIMD,(size)) +#define ASM_ROR32_SSE2A(size) ASM_SIMD_SSE2_ALIGNED(ASM_ROR32_SIMD,(size)) + +/*************************************************************************/ + +/* Actual implementations. Note that unrolling the SIMD loops doesn't seem + * to be a win (only 2-3% improvement at most), and in fact can lose by a + * bit in short loops. */ + +#define ASM_SWAP16_2_SIMD(size,regsize,ldq,movq,stq,sfence,MM0,MM1,MM2,MM3,MM4,MM5,MM6,MM7) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ (regsize)/32, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ X86_SWAP16_2, \ + /* main_loop */ \ + ldq" -("#regsize"/8)("ESI","ECX",4), "MM0" \n\ + # MM0: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM1" # MM1: 7 6 5 4 3 2 1 0 \n\ + psrlw $8, "MM0" # MM0: - 7 - 5 - 3 - 1 \n\ + psllw $8, "MM1" # MM1: 6 - 4 - 2 - 0 - \n\ + por "MM1", "MM0" # MM0: 6 7 4 5 2 3 0 1 \n\ + "stq" "MM0", -("#regsize"/8)("EDI","ECX",4)", \ + /* emms */ "emms; "sfence) \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax", "edx") + +#define ASM_SWAP32_SIMD(size,regsize,ldq,movq,stq,sfence,MM0,MM1,MM2,MM3,MM4,MM5,MM6,MM7) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ (regsize)/32, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ X86_SWAP32, \ + /* main_loop */ \ + ldq" -("#regsize"/8)("ESI","ECX",4), "MM0" \n\ + # MM0: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM1" # MM1: 7 6 5 4 3 2 1 0 \n\ + psrld $16, "MM0" # MM0: - - 7 6 - - 3 2 \n\ + pslld $16, "MM1" # MM1: 5 4 - - 1 0 - - \n\ + por "MM1", "MM0" # MM0: 5 4 7 6 1 0 3 2 \n\ + "stq" "MM0", -("#regsize"/8)("EDI","ECX",4)", \ + /* emms */ "emms; "sfence) \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax") + +#define ASM_SWAP32_02_SIMD(size,regsize,ldq,movq,stq,sfence,MM0,MM1,MM2,MM3,MM4,MM5,MM6,MM7) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ (regsize)/32, \ + /* push_regs */ "push "EDX, \ + /* pop_regs */ "pop "EDX, \ + /* small_loop */ X86_SWAP32_02, \ + /* main_loop */ \ + ldq" -("#regsize"/8)("ESI","ECX",4), "MM0" \n\ + # MM0: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM1" # MM1: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM2" # MM2: 7 6 5 4 3 2 1 0 \n\ + pand 16("EDX"), "MM1" # MM1: - - - 4 - - - 0 \n\ + pslld $16, "MM1" # MM1: - 4 - - - 0 - - \n\ + pand 64("EDX"), "MM2" # MM2: - 6 - - - 2 - - \n\ + psrld $16, "MM2" # MM2: - - - 6 - - - 2 \n\ + pand 160("EDX"), "MM0" # MM0: 7 - 5 - 3 - 1 - \n\ + por "MM1", "MM0" # MM0: 7 4 5 - 3 0 1 - \n\ + por "MM2", "MM0" # MM0: 7 4 5 6 3 0 1 2 \n\ + "stq" "MM0", -("#regsize"/8)("EDI","ECX",4)", \ + /* emms */ "emms; "sfence) \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size), "d" (&mask_data), \ + "m" (mask_data) \ + : "eax") + +#define ASM_SWAP32_13_SIMD(size,regsize,ldq,movq,stq,sfence,MM0,MM1,MM2,MM3,MM4,MM5,MM6,MM7) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ (regsize)/32, \ + /* push_regs */ "push "EDX, \ + /* pop_regs */ "pop "EDX, \ + /* small_loop */ X86_SWAP32_13, \ + /* main_loop */ \ + ldq" -("#regsize"/8)("ESI","ECX",4), "MM0" \n\ + # MM0: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM1" # MM1: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM2" # MM2: 7 6 5 4 3 2 1 0 \n\ + pand 32("EDX"), "MM1" # MM1: - - 5 - - - 1 - \n\ + pslld $16, "MM1" # MM1: 5 - - - 1 - - - \n\ + pand 128("EDX"), "MM2" # MM2: 7 - - - 3 - - - \n\ + psrld $16, "MM2" # MM2: - - 7 - - - 3 - \n\ + pand 80("EDX"), "MM0" # MM0: - 6 - 4 - 2 - 0 \n\ + por "MM1", "MM0" # MM0: 5 6 - 4 1 2 - 0 \n\ + por "MM2", "MM0" # MM0: 5 6 7 4 1 2 3 0 \n\ + "stq" "MM0", -("#regsize"/8)("EDI","ECX",4)", \ + /* emms */ "emms; "sfence) \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size), "d" (&mask_data), \ + "m" (mask_data) \ + : "eax"); + +#define ASM_REV32_SIMD(size,regsize,ldq,movq,stq,sfence,MM0,MM1,MM2,MM3,MM4,MM5,MM6,MM7) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ (regsize)/32, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ X86_REV32_BSWAP, \ + /* main_loop */ \ + ldq" -("#regsize"/8)("ESI","ECX",4), "MM0" \n\ + # MM0: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM1" # MM1: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM2" # MM2: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM3" # MM3: 7 6 5 4 3 2 1 0 \n\ + psrld $24, "MM0" # MM0: - - - 7 - - - 3 \n\ + pand 32("EDX"), "MM2" # MM2: - - 5 - - - 1 - \n\ + psrld $8, "MM1" # MM1: - 7 6 5 - 3 2 1 \n\ + pand 32("EDX"), "MM1" # MM1: - - 6 - - - 2 - \n\ + pslld $8, "MM2" # MM2: - 5 - - - 1 - - \n\ + pslld $24, "MM3" # MM3: 4 - - - 0 - - - \n\ + por "MM1", "MM0" # MM0: - - 6 7 - - 2 3 \n\ + por "MM2", "MM0" # MM0: - 5 6 7 - 1 2 3 \n\ + por "MM3", "MM0" # MM0: 4 5 6 7 0 1 2 3 \n\ + "stq" "MM0", -("#regsize"/8)("EDI","ECX",4)", \ + /* emms */ "emms; "sfence) \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size), "d" (&mask_data), \ + "m" (mask_data) \ + : "eax") + +#define ASM_ROL32_SIMD(size,regsize,ldq,movq,stq,sfence,MM0,MM1,MM2,MM3,MM4,MM5,MM6,MM7) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ (regsize)/32, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ X86_ROL32, \ + /* main_loop */ \ + ldq" -("#regsize"/8)("ESI","ECX",4), "MM0" \n\ + # MM0: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM1" # MM1: 7 6 5 4 3 2 1 0 \n\ + pslld $8, "MM0" # MM0: 6 5 4 - 2 1 0 - \n\ + psrld $24, "MM1" # MM1: - - - 7 - - - 3 \n\ + por "MM1", "MM0" # MM0: 6 5 4 7 2 1 0 3 \n\ + "stq" "MM0", -("#regsize"/8)("EDI","ECX",4)", \ + /* emms */ "emms; "sfence) \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax") + +#define ASM_ROR32_SIMD(size,regsize,ldq,movq,stq,sfence,MM0,MM1,MM2,MM3,MM4,MM5,MM6,MM7) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ (regsize)/32, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ X86_ROR32, \ + /* main_loop */ \ + ldq" -("#regsize"/8)("ESI","ECX",4), "MM0" \n\ + # MM0: 7 6 5 4 3 2 1 0 \n\ + "movq" "MM0", "MM1" # MM1: 7 6 5 4 3 2 1 0 \n\ + psrld $8, "MM0" # MM0: - 7 6 5 - 3 2 1 \n\ + pslld $24, "MM1" # MM1: 4 - - - 0 - - - \n\ + por "MM1", "MM0" # MM0: 4 7 6 5 0 3 2 1 \n\ + "stq" "MM0", -("#regsize"/8)("EDI","ECX",4)", \ + /* emms */ "emms; "sfence) \ + : /* no outputs */ \ + : "S" (src[0]), "D" (dest[0]), "c" (size) \ + : "eax") + +/*************************************************************************/ + +/* SSE2 macros to load 8 24- or 32-bit RGB pixels into XMM0/1/2 (R/G/B) as + * 16-bit values, used for RGB->YUV and RGB->grayscale conversions. + * ZERO is the number of the XMM register containing all zeroes. */ + +#define SSE2_LOAD_RGB24(ZERO) \ + "movl -21("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm0 # XMM0: ----- ----- ----- xBGR1 \n\ + pshufd $0x39, %%xmm0, %%xmm0 # XMM0: xBGR1 ----- ----- ----- \n\ + movl -18("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm0 # XMM0: xBGR1 ----- ----- xBGR2 \n\ + pshufd $0x39, %%xmm0, %%xmm0 # XMM0: xBGR2 xBGR1 ----- ----- \n\ + movl -15("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm0 # XMM0: xBGR2 xBGR1 ----- xBGR3 \n\ + pshufd $0x39, %%xmm0, %%xmm0 # XMM0: xBGR3 xBGR2 xBGR1 ----- \n\ + movl -24("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm0 # XMM0: xBGR3 xBGR2 xBGR1 xBGR0 \n\ + movl -9("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm1 # XMM1: ----- ----- ----- xBGR5 \n\ + pshufd $0x39, %%xmm1, %%xmm1 # XMM1: xBGR5 ----- ----- ----- \n\ + movl -6("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm1 # XMM1: xBGR5 ----- ----- xBGR6 \n\ + pshufd $0x39, %%xmm1, %%xmm1 # XMM1: xBGR6 xBGR5 ----- ----- \n\ + movl -3("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm1 # XMM1: xBGR6 xBGR5 ----- xBGR7 \n\ + pshufd $0x39, %%xmm1, %%xmm1 # XMM1: xBGR7 xBGR6 xBGR5 ----- \n\ + movl -12("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm1 # XMM1: xBGR7 xBGR6 xBGR5 xBGR4 \n"\ + SSE2_MASSAGE_RGBA32(ZERO) + +#define SSE2_LOAD_BGR24(ZERO) \ + "movl -21("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm0 # XMM0: ----- ----- ----- xRGB1 \n\ + pshufd $0x39, %%xmm0, %%xmm0 # XMM0: xRGB1 ----- ----- ----- \n\ + movl -18("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm0 # XMM0: xRGB1 ----- ----- xRGB2 \n\ + pshufd $0x39, %%xmm0, %%xmm0 # XMM0: xRGB2 xRGB1 ----- ----- \n\ + movl -15("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm0 # XMM0: xRGB2 xRGB1 ----- xRGB3 \n\ + pshufd $0x39, %%xmm0, %%xmm0 # XMM0: xRGB3 xRGB2 xRGB1 ----- \n\ + movl -24("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm0 # XMM0: xRGB3 xRGB2 xRGB1 xRGB0 \n\ + movl -9("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm1 # XMM1: ----- ----- ----- xRGB5 \n\ + pshufd $0x39, %%xmm1, %%xmm1 # XMM1: xRGB5 ----- ----- ----- \n\ + movl -6("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm1 # XMM1: xRGB5 ----- ----- xRGB6 \n\ + pshufd $0x39, %%xmm1, %%xmm1 # XMM1: xRGB6 xRGB5 ----- ----- \n\ + movl -3("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm1 # XMM1: xRGB6 xRGB5 ----- xRGB7 \n\ + pshufd $0x39, %%xmm1, %%xmm1 # XMM1: xRGB7 xRGB6 xRGB5 ----- \n\ + movl -12("ESI","EBX"), %%eax \n\ + movd %%eax, %%xmm2 \n\ + por %%xmm2, %%xmm1 # XMM1: xRGB7 xRGB6 xRGB5 xRGB4 \n"\ + SSE2_MASSAGE_BGRA32(ZERO) + +#define SSE2_LOAD_RGBA32(ZERO) "\ + movdqu -32("ESI","ECX",4),%%xmm0 #XMM0: ABGR3 ABGR2 ABGR1 ABGR0 \n\ + movdqu -16("ESI","ECX",4),%%xmm1 #XMM1: ABGR7 ABGR6 ABGR5 ABGR4 \n"\ + SSE2_MASSAGE_RGBA32(ZERO) +#define SSE2_MASSAGE_RGBA32(ZERO) "\ + movdqa %%xmm0, %%xmm2 # XMM2: ABGR3 ABGR2 ABGR1 ABGR0 \n\ + punpcklbw %%xmm1, %%xmm0 # X0.l: A4 A0 B4 B0 G4 G0 R4 R0 \n\ + punpckhbw %%xmm1, %%xmm2 # X2.l: A6 A2 B6 B2 G6 G2 R6 R2 \n\ + movdqa %%xmm0, %%xmm1 # X1.l: A4 A0 B4 B0 G4 G0 R4 R0 \n\ + punpcklbw %%xmm2, %%xmm0 # X0.l: G6 G4 G2 G0 R6 R4 R2 R0 \n\ + punpckhbw %%xmm2, %%xmm1 # X1.l: G7 G5 G3 G1 R7 R5 R3 R1 \n\ + movdqa %%xmm0, %%xmm2 # X2.l: G6 G4 G2 G0 R6 R4 R2 R0 \n\ + punpcklbw %%xmm1, %%xmm0 # XMM0: G7.......G0 R7.......R0 \n\ + punpckhbw %%xmm1, %%xmm2 # XMM2: A7.......A0 B7.......B0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: G7.......G0 R7.......R0 \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + punpckhbw %%xmm4, %%xmm1 # XMM1: G7 G6 G5 G4 G3 G2 G1 G0 \n\ + punpcklbw %%xmm4, %%xmm2 # XMM2: B7 B6 B5 B4 B3 B2 B1 B0 \n" + +#define SSE2_LOAD_BGRA32(ZERO) "\ + movdqu -32("ESI","ECX",4),%%xmm0 #XMM0: ARGB3 ARGB2 ARGB1 ARGB0 \n\ + movdqu -16("ESI","ECX",4),%%xmm1 #XMM1: ARGB7 ARGB6 ARGB5 ARGB4 \n"\ + SSE2_MASSAGE_BGRA32(ZERO) +#define SSE2_MASSAGE_BGRA32(ZERO) "\ + movdqa %%xmm0, %%xmm2 # XMM2: ARGB3 ARGB2 ARGB1 ARGB0 \n\ + punpcklbw %%xmm1, %%xmm2 # X2.l: A4 A0 R4 R0 G4 G0 B4 B0 \n\ + punpckhbw %%xmm1, %%xmm0 # X0.l: A6 A2 R6 R2 G6 G2 B6 B2 \n\ + movdqa %%xmm2, %%xmm1 # X1.l: A4 A0 R4 R0 G4 G0 B4 B0 \n\ + punpcklbw %%xmm0, %%xmm2 # X2.l: G6 G4 G2 G0 B6 B4 B2 B0 \n\ + punpckhbw %%xmm0, %%xmm1 # X1.l: G7 G5 G3 G1 B7 B5 B3 B1 \n\ + movdqa %%xmm2, %%xmm0 # X0.l: G6 G4 G2 G0 B6 B4 B2 B0 \n\ + punpcklbw %%xmm1, %%xmm2 # XMM2: G7.......G0 B7.......B0 \n\ + punpckhbw %%xmm1, %%xmm0 # XMM0: A7.......A0 R7.......R0 \n\ + movdqa %%xmm2, %%xmm1 # XMM1: G7.......G0 B7.......B0 \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + punpckhbw %%xmm4, %%xmm1 # XMM1: G7 G6 G5 G4 G3 G2 G1 G0 \n\ + punpcklbw %%xmm4, %%xmm2 # XMM2: B7 B6 B5 B4 B3 B2 B1 B0 \n" + +#define SSE2_LOAD_ARGB32(ZERO) "\ + movdqu -32("ESI","ECX",4),%%xmm0 #XMM0: BGRA3 BGRA2 BGRA1 BGRA0 \n\ + movdqu -16("ESI","ECX",4),%%xmm1 #XMM1: BGRA7 BGRA6 BGRA5 BGRA4 \n"\ + SSE2_MASSAGE_ARGB32(ZERO) +#define SSE2_MASSAGE_ARGB32(ZERO) "\ + movdqa %%xmm0, %%xmm2 # XMM2: BGRA3 BGRA2 BGRA1 BGRA0 \n\ + punpcklbw %%xmm1, %%xmm0 # X0.l: B4 B0 G4 G0 R4 R0 A4 A0 \n\ + punpckhbw %%xmm1, %%xmm2 # X2.l: B6 B2 G6 G2 R6 R2 A6 A2 \n\ + movdqa %%xmm0, %%xmm1 # X1.l: B4 B0 G4 G0 R4 R0 A4 A0 \n\ + punpcklbw %%xmm2, %%xmm0 # X0.l: R6 R4 R2 R0 A6 A4 A2 A0 \n\ + punpckhbw %%xmm2, %%xmm1 # X1.l: R7 R5 R3 R1 A7 A5 A3 A1 \n\ + movdqa %%xmm0, %%xmm2 # X2.l: R6 R4 R2 R0 A6 A4 A2 A0 \n\ + punpcklbw %%xmm1, %%xmm0 # XMM0: R7.......G0 A7.......A0 \n\ + punpckhbw %%xmm1, %%xmm2 # XMM2: B7.......G0 G7.......G0 \n\ + movdqa %%xmm2, %%xmm1 # XMM1: B7.......B0 G7.......G0 \n\ + punpckhbw %%xmm4, %%xmm0 # XMM0: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + punpcklbw %%xmm4, %%xmm1 # XMM1: G7 G6 G5 G4 G3 G2 G1 G0 \n\ + punpckhbw %%xmm4, %%xmm2 # XMM2: B7 B6 B5 B4 B3 B2 B1 B0 \n" + +#define SSE2_LOAD_ABGR32(ZERO) "\ + movdqu -32("ESI","ECX",4),%%xmm0 #XMM0: RGBA3 RGBA2 RGBA1 RGBA0 \n\ + movdqu -16("ESI","ECX",4),%%xmm1 #XMM1: RGBA7 RGBA6 RGBA5 RGBA4 \n"\ + SSE2_MASSAGE_ABGR32(ZERO) +#define SSE2_MASSAGE_ABGR32(ZERO) "\ + movdqa %%xmm0, %%xmm2 # XMM2: RGBA3 RGBA2 RGBA1 RGBA0 \n\ + punpcklbw %%xmm1, %%xmm2 # X2.l: R4 R0 G4 G0 B4 B0 A4 A0 \n\ + punpckhbw %%xmm1, %%xmm0 # X0.l: R6 R2 G6 G2 B6 B2 A6 A2 \n\ + movdqa %%xmm2, %%xmm1 # X1.l: R4 R0 G4 G0 B4 B0 A4 A0 \n\ + punpcklbw %%xmm0, %%xmm2 # X2.l: B6 B4 B2 B0 A6 A4 A2 A0 \n\ + punpckhbw %%xmm0, %%xmm1 # X1.l: B7 B5 B3 B1 A7 A5 A3 A1 \n\ + movdqa %%xmm2, %%xmm0 # X0.l: B6 B4 B2 B0 A6 A4 A2 A0 \n\ + punpcklbw %%xmm1, %%xmm2 # XMM2: B7.......B0 A7.......A0 \n\ + punpckhbw %%xmm1, %%xmm0 # XMM0: R7.......R0 G7.......G0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: R7.......R0 G7.......G0 \n\ + punpckhbw %%xmm4, %%xmm0 # XMM0: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + punpcklbw %%xmm4, %%xmm1 # XMM1: G7 G6 G5 G4 G3 G2 G1 G0 \n\ + punpckhbw %%xmm4, %%xmm2 # XMM2: B7 B6 B5 B4 B3 B2 B1 B0 \n" + +/*************************************************************************/ + +#endif /* ACLIB_IMG_X86_COMMON_H */ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/img_yuv_mixed.c b/veejay-server/aclib/img_yuv_mixed.c new file mode 100644 index 00000000..004d5378 --- /dev/null +++ b/veejay-server/aclib/img_yuv_mixed.c @@ -0,0 +1,912 @@ +/* + * img_yuv_packed.c - YUV planar<->packed image format conversion routines + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "imgconvert.h" +#include "img_internal.h" + +/*************************************************************************/ +/*************************************************************************/ + +/* Standard C implementations */ + +/*************************************************************************/ + +/* Wrappers for UYVY and YVYU */ +/* Note: we rely on YUY2<->{UYVY,YVYU} working for src==dest */ +/* FIXME: when converting from UYVY/YVYU, src is destroyed! */ + +static int uyvy_yvyu_wrapper(uint8_t **src, ImageFormat srcfmt, + uint8_t **dest, ImageFormat destfmt, + int width, int height) +{ + if (srcfmt == IMG_UYVY || srcfmt == IMG_YVYU) + return ac_imgconvert(src, srcfmt, src, IMG_YUY2, width, height) + && ac_imgconvert(src, IMG_YUY2, dest, destfmt, width, height); + else + return ac_imgconvert(src, srcfmt, dest, IMG_YUY2, width, height) + && ac_imgconvert(dest, IMG_YUY2, dest, destfmt, width, height); +} + +static int yuv420p_uyvy(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YUV420P, dest, IMG_UYVY, width, height); } + +static int yuv420p_yvyu(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YUV420P, dest, IMG_YVYU, width, height); } + +static int yuv411p_uyvy(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YUV411P, dest, IMG_UYVY, width, height); } + +static int yuv411p_yvyu(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YUV411P, dest, IMG_YVYU, width, height); } + +static int yuv422p_uyvy(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YUV422P, dest, IMG_UYVY, width, height); } + +static int yuv422p_yvyu(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YUV422P, dest, IMG_YVYU, width, height); } + +static int yuv444p_uyvy(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YUV444P, dest, IMG_UYVY, width, height); } + +static int yuv444p_yvyu(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YUV444P, dest, IMG_YVYU, width, height); } + +static int uyvy_yuv420p(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_UYVY, dest, IMG_YUV420P, width, height); } + +static int yvyu_yuv420p(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YVYU, dest, IMG_YUV420P, width, height); } + +static int uyvy_yuv411p(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_UYVY, dest, IMG_YUV411P, width, height); } + +static int yvyu_yuv411p(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YVYU, dest, IMG_YUV411P, width, height); } + +static int uyvy_yuv422p(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_UYVY, dest, IMG_YUV422P, width, height); } + +static int yvyu_yuv422p(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YVYU, dest, IMG_YUV422P, width, height); } + +static int uyvy_yuv444p(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_UYVY, dest, IMG_YUV444P, width, height); } + +static int yvyu_yuv444p(uint8_t **src, uint8_t **dest, int width, int height) +{ return uyvy_yvyu_wrapper(src, IMG_YVYU, dest, IMG_YUV444P, width, height); } + +/*************************************************************************/ + +static int yuv420p_yuy2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + + for (y = 0; y < (height & ~1); y++) { + for (x = 0; x < (width & ~1); x += 2) { + dest[0][(y*width+x)*2 ] = src[0][y*width+x]; + dest[0][(y*width+x)*2+1] = src[1][(y/2)*(width/2)+x/2]; + dest[0][(y*width+x)*2+2] = src[0][y*width+x+1]; + dest[0][(y*width+x)*2+3] = src[2][(y/2)*(width/2)+x/2]; + } + } + return 1; +} + +static int yuv411p_yuy2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + + for (y = 0; y < height; y++) { + for (x = 0; x < (width & ~1); x += 2) { + dest[0][(y*width+x)*2 ] = src[0][y*width+x]; + dest[0][(y*width+x)*2+1] = src[1][y*(width/4)+x/4]; + dest[0][(y*width+x)*2+2] = src[0][y*width+x+1]; + dest[0][(y*width+x)*2+3] = src[2][y*(width/4)+x/4]; + } + } + return 1; +} + +static int yuv422p_yuy2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < (width/2)*height; i++) { + dest[0][i*4 ] = src[0][i*2]; + dest[0][i*4+1] = src[1][i]; + dest[0][i*4+2] = src[0][i*2+1]; + dest[0][i*4+3] = src[2][i]; + } + return 1; +} + +static int yuv444p_yuy2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < (width/2)*height; i++) { + dest[0][i*4 ] = src[0][i*2]; + dest[0][i*4+1] = (src[1][i*2] + src[1][i*2+1]) / 2; + dest[0][i*4+2] = src[0][i*2+1]; + dest[0][i*4+3] = (src[2][i*2] + src[2][i*2+1]) / 2; + } + return 1; +} + +/*************************************************************************/ + +static int yuy2_yuv420p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + + for (y = 0; y < (height & ~1); y++) { + for (x = 0; x < (width & ~1); x += 2) { + dest[0][y*width+x ] = src[0][(y*width+x)*2 ]; + dest[0][y*width+x+1] = src[0][(y*width+x)*2+2]; + if (y%2 == 0) { + dest[1][(y/2)*(width/2)+x/2] = src[0][(y*width+x)*2+1]; + dest[2][(y/2)*(width/2)+x/2] = src[0][(y*width+x)*2+3]; + } else { + dest[1][(y/2)*(width/2)+x/2] = + (dest[1][(y/2)*(width/2)+x/2] + src[0][(y*width+x)*2+1] + 1) / 2; + dest[2][(y/2)*(width/2)+x/2] = + (dest[2][(y/2)*(width/2)+x/2] + src[0][(y*width+x)*2+3] + 1) / 2; + } + } + } + return 1; +} + +static int yuy2_yuv411p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + for (y = 0; y < height; y++) { + for (x = 0; x < (width & ~3); x += 4) { + dest[0][y*width+x] = src[0][(y*width+x)*2 ]; + dest[0][y*width+x+1] = src[0][(y*width+x)*2+2]; + dest[0][y*width+x+2] = src[0][(y*width+x)*2+4]; + dest[0][y*width+x+3] = src[0][(y*width+x)*2+6]; + dest[1][y*(width/4)+x/4] = (src[0][(y*width+x)*2+1] + + src[0][(y*width+x)*2+5] + 1) / 2; + dest[2][y*(width/4)+x/4] = (src[0][(y*width+x)*2+3] + + src[0][(y*width+x)*2+7] + 1) / 2; + } + } + return 1; +} + +static int yuy2_yuv422p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < (width/2)*height; i++) { + dest[0][i*2] = src[0][i*4 ]; + dest[1][i] = src[0][i*4+1]; + dest[0][i*2+1] = src[0][i*4+2]; + dest[2][i] = src[0][i*4+3]; + } + return 1; +} + +static int yuy2_yuv444p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < (width & ~1)*height; i += 2) { + dest[0][i] = src[0][i*2 ]; + dest[1][i] = src[0][i*2+1]; + dest[1][i+1] = src[0][i*2+1]; + dest[0][i+1] = src[0][i*2+2]; + dest[2][i] = src[0][i*2+3]; + dest[2][i+1] = src[0][i*2+3]; + } + return 1; +} + +/*************************************************************************/ + +static int y8_yuy2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*2 ] = src[0][i]; + dest[0][i*2+1] = 128; + } + return 1; +} + +static int y8_uyvy(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) { + dest[0][i*2 ] = 128; + dest[0][i*2+1] = src[0][i]; + } + return 1; +} + +static int yuy2_y8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) + dest[0][i] = src[0][i*2]; + return 1; +} + +static int uyvy_y8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height; i++) + dest[0][i] = src[0][i*2+1]; + return 1; +} + +/*************************************************************************/ +/*************************************************************************/ + +#if defined(HAVE_ASM_SSE2) + +/* SSE2 routines. See comments in img_x86_common.h for why we don't bother + * unrolling the loops. */ + +/* Common macros/data for x86 code */ +#include "img_x86_common.h" + +/* YUV420P (1 row) or YUV422P -> YUY2 (unit: 2 pixels) */ +#define YUV42XP_YUY2 \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "push "EBX, \ + /* pop_regs */ "pop "EBX, \ + /* small_loop */ \ + "movb -1("EDX","ECX"), %%bh \n\ + movb -1("ESI","ECX",2), %%bl \n\ + shll $16, %%ebx \n\ + movb -1("EAX","ECX"), %%bh \n\ + movb -2("ESI","ECX",2), %%bl \n\ + movl %%ebx, -4("EDI","ECX",4)", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",2),%%xmm0 #XM0: YF YE YD ..... Y2 Y1 Y0 \n\ + movq -8("EAX","ECX"), %%xmm2 # XMM2: U7 U6 U5 U4 U3 U2 U1 U0 \n\ + movq -8("EDX","ECX"), %%xmm3 # XMM3: V7 V6 V5 V4 V3 V2 V1 V0 \n\ + punpcklbw %%xmm3, %%xmm2 # XMM2: V7 U7 V6 ..... U1 V0 U0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: YF YE YD ..... Y2 Y1 Y0 \n\ + punpcklbw %%xmm2, %%xmm0 # XMM0: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + punpckhbw %%xmm2, %%xmm1 # XMM1: V7 YF U7 ..... Y9 U4 Y8 \n\ + movdqu %%xmm0, -32("EDI","ECX",4) \n\ + movdqu %%xmm1, -16("EDI","ECX",4)", \ + /* emms */ "emms") + +/* YUV411P -> YUY2 (unit: 4 pixels) */ +#define YUV411P_YUY2 \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "push "EBX, \ + /* pop_regs */ "pop "EBX, \ + /* small_loop */ \ + "movb -1("EDX","ECX"), %%bh \n\ + movb -1("ESI","ECX",4), %%bl \n\ + shll $16, %%ebx \n\ + movb -1("EAX","ECX"), %%bh \n\ + movb -2("ESI","ECX",4), %%bl \n\ + movl %%ebx, -4("EDI","ECX",8) \n\ + movb -1("EDX","ECX"), %%bh \n\ + movb -3("ESI","ECX",4), %%bl \n\ + shll $16, %%ebx \n\ + movb -1("EAX","ECX"), %%bh \n\ + movb -4("ESI","ECX",4), %%bl \n\ + movl %%ebx, -8("EDI","ECX",8)", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",4),%%xmm0 #XM0: YF YE YD ..... Y2 Y1 Y0 \n\ + movd -4("EAX","ECX"), %%xmm2 # XMM2: U3 U2 U1 U0 \n\ + punpcklbw %%xmm2, %%xmm2 # XMM2: U3 U3 U2 U2 U1 U1 U0 U0 \n\ + movd -4("EDX","ECX"), %%xmm3 # XMM3: V3 V2 V1 V0 \n\ + punpcklbw %%xmm3, %%xmm3 # XMM3: V3 V3 V2 V2 V1 V1 V0 V0 \n\ + punpcklbw %%xmm3, %%xmm2 # XMM2: V3 U3 V3 ..... U0 V0 U0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: YF YE YD ..... Y2 Y1 Y0 \n\ + punpcklbw %%xmm2, %%xmm0 # XMM0: V1 Y7 U1 ..... Y1 U0 Y0 \n\ + punpckhbw %%xmm2, %%xmm1 # XMM1: V3 YF U3 ..... Y9 U2 Y8 \n\ + movdqu %%xmm0, -32("EDI","ECX",8) \n\ + movdqu %%xmm1, -16("EDI","ECX",8)", \ + /* emms */ "emms") + +/* YUV444P -> YUY2 (unit: 2 pixels) */ +#define YUV444P_YUY2 \ + /* Load 0x00FF*8 into XMM7 for masking */ \ + "pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "push "EBX"; push "EBP, \ + /* pop_regs */ "pop "EBP"; pop "EBX, \ + /* small_loop */ \ + "movzbl -1("EDX","ECX",2), %%ebx \n\ + movzbl -2("EDX","ECX",2), %%ebp \n\ + addl %%ebp, %%ebx \n\ + shrl $1, %%ebx \n\ + movb %%bl, -1("EDI","ECX",4) \n\ + movb -1("ESI","ECX",2), %%bl \n\ + movb %%bl, -2("EDI","ECX",4) \n\ + movzbl -1("EAX","ECX",2), %%ebx \n\ + movzbl -2("EAX","ECX",2), %%ebp \n\ + addl %%ebp, %%ebx \n\ + shrl $1, %%ebx \n\ + movb %%bl, -3("EDI","ECX",4) \n\ + movb -2("ESI","ECX",2), %%bl \n\ + movb %%bl, -4("EDI","ECX",4)", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",2),%%xmm0 #XM0: YF YE YD ..... Y2 Y1 Y0 \n\ + movdqu -16("EAX","ECX",2), %%xmm2 #XM2: UF UE UD ..... U2 U1 U0 \n\ + movdqu -16("EDX","ECX",2), %%xmm3 #XM3: VF VE VD ..... V2 V1 V0 \n\ + movdqa %%xmm2, %%xmm4 # XMM4: UF UE UD ..... U2 U1 U0 \n\ + pand %%xmm7, %%xmm2 # XMM2: -- UE -- ..... U2 -- U0 \n\ + psrlw $8, %%xmm4 # XMM4: -- UF -- ..... U3 -- U1 \n\ + pavgw %%xmm4, %%xmm2 # XMM2: -- u7 -- ..... u1 -- u0 \n\ + movdqa %%xmm3, %%xmm5 # XMM4: UF UE UD ..... U2 U1 U0 \n\ + pand %%xmm7, %%xmm3 # XMM3: -- VE -- ..... V2 -- V0 \n\ + psrlw $8, %%xmm5 # XMM5: -- VF -- ..... V3 -- V1 \n\ + pavgw %%xmm5, %%xmm3 # XMM3: -- v7 -- ..... v1 -- v0 \n\ + psllw $8, %%xmm3 # XMM3: v7 -- v6 ..... -- v0 -- \n\ + por %%xmm3, %%xmm2 # XMM2: v7 u7 v6 ..... u1 v0 u0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: YF YE YD ..... Y2 Y1 Y0 \n\ + punpcklbw %%xmm2, %%xmm0 # XMM0: v3 Y7 u3 ..... Y1 u0 Y0 \n\ + punpckhbw %%xmm2, %%xmm1 # XMM1: v7 YF u7 ..... Y9 u4 Y8 \n\ + movdqu %%xmm0, -32("EDI","ECX",4) \n\ + movdqu %%xmm1, -16("EDI","ECX",4)", \ + /* emms */ "emms") + +/* YUY2 -> YUV420P (U row) (unit: 2 pixels) */ +#define YUY2_YUV420P_U \ + /* Load 0x00FF*8 into XMM7 for masking */ \ + "pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "push "EBX"; push "EBP, \ + /* pop_regs */ "pop "EBP"; pop "EBX, \ + /* small_loop */ \ + "movb -4("ESI","ECX",4), %%bl \n\ + movb %%bl, -2("EDI","ECX",2) \n\ + movb -2("ESI","ECX",4), %%bl \n\ + movb %%bl, -1("EDI","ECX",2) \n\ + movzbl -3("ESI","ECX",4), %%ebx \n\ + movzbl -3("EAX","ECX",4), %%ebp \n\ + addl %%ebp, %%ebx \n\ + shrl $1, %%ebx \n\ + movb %%bl, -1("EDX","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",4),%%xmm0 #XM0: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + movdqu -16("EAX","ECX",4),%%xmm2 #XMM2: Vd Yh Ud ..... Yb Ua Ya \n\ + pand %%xmm7, %%xmm0 # XMM0: -- Y7 -- ..... Y1 -- Y0 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + psrlw $8, %%xmm1 # XMM1: -- V3 -- ..... V0 -- U0 \n\ + psrlw $8, %%xmm2 # XMM2: -- Vd -- ..... Va -- Ua \n\ + pavgw %%xmm2, %%xmm1 # XMM1: -- v3 -- ..... v0 -- u0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: v3 u3 v2 u2 v1 u1 v0 u0 \n\ + pand %%xmm7, %%xmm1 # XMM1: -- u3 -- u2 -- u1 -- u0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: u3 u2 u1 u0 \n\ + movq %%xmm0, -8("EDI","ECX",2) \n\ + movd %%xmm1, -4("EDX","ECX")", \ + /* emms */ "emms") + +/* YUY2 -> YUV420P (V row) (unit: 2 pixels) */ +#define YUY2_YUV420P_V \ + /* Load 0x00FF*8 into XMM7 for masking */ \ + "pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "push "EBX"; push "EBP, \ + /* pop_regs */ "pop "EBP"; pop "EBX, \ + /* small_loop */ \ + "movb -4("ESI","ECX",4), %%bl \n\ + movb %%bl, -2("EDI","ECX",2) \n\ + movb -2("ESI","ECX",4), %%bl \n\ + movb %%bl, -1("EDI","ECX",2) \n\ + movzbl -1("ESI","ECX",4), %%ebx \n\ + movzbl -1("EAX","ECX",4), %%ebp \n\ + addl %%ebp, %%ebx \n\ + shrl $1, %%ebx \n\ + movb %%bl, -1("EDX","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",4),%%xmm0 #XM0: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + movdqu -16("EAX","ECX",4),%%xmm2 #XMM2: Vd Yh Ud ..... Yb Ua Ya \n\ + pand %%xmm7, %%xmm0 # XMM0: -- Y7 -- ..... Y1 -- Y0 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + psrlw $8, %%xmm1 # XMM1: -- V3 -- ..... V0 -- U0 \n\ + psrlw $8, %%xmm2 # XMM2: -- Vd -- ..... Va -- Ua \n\ + pavgw %%xmm1, %%xmm2 # XMM2: -- v3 -- ..... v0 -- u0 \n\ + packuswb %%xmm2, %%xmm2 # XMM2: v3 u3 v2 u2 v1 u1 v0 u0 \n\ + psrlw $8, %%xmm2 # XMM2: -- v3 -- v2 -- v1 -- v0 \n\ + packuswb %%xmm2, %%xmm2 # XMM2: v3 v2 v1 v0 \n\ + movq %%xmm0, -8("EDI","ECX",2) \n\ + movd %%xmm2, -4("EDX","ECX")", \ + /* emms */ "emms") + +/* YUY2 -> YUV411P (unit: 4 pixels) */ +#define YUY2_YUV411P \ + /* Load 0x000..000FFFFFFFF into XMM6, 0x00FF*8 into XMM7 for masking */ \ + "pcmpeqd %%xmm6, %%xmm6; psrldq $12, %%xmm6;" \ + "pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 2, \ + /* push_regs */ "push "EBX"; push "EBP, \ + /* pop_regs */ "pop "EBP"; pop "EBX, \ + /* small_loop */ \ + "movb -8("ESI","ECX",8), %%bl \n\ + movb %%bl, -4("EDI","ECX",4) \n\ + movb -6("ESI","ECX",8), %%bl \n\ + movb %%bl, -3("EDI","ECX",4) \n\ + movb -4("ESI","ECX",8), %%bl \n\ + movb %%bl, -2("EDI","ECX",4) \n\ + movb -2("ESI","ECX",8), %%bl \n\ + movb %%bl, -1("EDI","ECX",4) \n\ + movzbl -7("ESI","ECX",8), %%ebx \n\ + movzbl -3("ESI","ECX",8), %%ebp \n\ + addl %%ebp, %%ebx \n\ + shrl $1, %%ebx \n\ + movb %%bl, -1("EAX","ECX") \n\ + movzbl -5("ESI","ECX",8), %%ebx \n\ + movzbl -1("ESI","ECX",8), %%ebp \n\ + addl %%ebp, %%ebx \n\ + shrl $1, %%ebx \n\ + movb %%bl, -1("EDX","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",8),%%xmm0 #XM0: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + pand %%xmm7, %%xmm0 # XMM0: -- Y7 -- ..... Y1 -- Y0 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + psrlw $8, %%xmm1 # XMM1: -- V3 -- ..... V0 -- U0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: V3 U3 V2 U2 V1 U1 V0 U0 \n\ + movdqa %%xmm1, %%xmm2 # XMM2: V3 U3 V2 U2 V1 U1 V0 U0 \n\ + pand %%xmm7, %%xmm1 # XMM1: -- U3 -- U2 -- U1 -- U0 \n\ + psrlw $8, %%xmm2 # XMM2: -- V3 -- V2 -- V1 -- V0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: U3 U2 U1 U0 \n\ + packuswb %%xmm2, %%xmm2 # XMM2: V3 V2 V1 V0 \n\ + pand %%xmm6, %%xmm1 # XMM1: -- -- -- -- U3 U2 U1 U0 \n\ + psllq $32, %%xmm2 # XMM2: V3 V2 V1 V0 -- -- -- -- \n\ + por %%xmm1, %%xmm2 # XMM2: V3 V2 V1 V0 U3 U2 U1 U0 \n\ + movdqa %%xmm2, %%xmm1 # XMM1: V3 V2 V1 V0 U3 U2 U1 U0 \n\ + pand %%xmm7, %%xmm1 # XMM1: -- V2 -- V0 -- U2 -- U0 \n\ + psrlw $8, %%xmm2 # XMM2: -- V3 -- V1 -- U3 -- U1 \n\ + pavgw %%xmm2, %%xmm1 # XMM1: -- v1 -- v0 -- u1 -- u0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: v1 v0 u1 u0 \n\ + movq %%xmm0, -8("EDI","ECX",4) \n\ + movd %%xmm1, %%ebx \n\ + movw %%bx, -2("EAX","ECX") \n\ + shrl $16, %%ebx; \n\ + movw %%bx, -2("EDX","ECX")", \ + /* emms */ "emms") + +/* YUY2 -> YUV422P (unit: 2 pixels) */ +#define YUY2_YUV422P \ + /* Load 0x00FF*8 into XMM7 for masking */ \ + "pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "push "EBX, \ + /* pop_regs */ "pop "EBX, \ + /* small_loop */ \ + "movb -4("ESI","ECX",4), %%bl \n\ + movb %%bl, -2("EDI","ECX",2) \n\ + movb -2("ESI","ECX",4), %%bl \n\ + movb %%bl, -1("EDI","ECX",2) \n\ + movb -3("ESI","ECX",4), %%bl \n\ + movb %%bl, -1("EAX","ECX") \n\ + movb -1("ESI","ECX",4), %%bl \n\ + movb %%bl, -1("EDX","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",4),%%xmm0 #XM0: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + pand %%xmm7, %%xmm0 # XMM0: -- Y7 -- ..... Y1 -- Y0 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + psrlw $8, %%xmm1 # XMM1: -- V3 -- ..... V0 -- U0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: V3 U3 V2 U2 V1 U1 V0 U0 \n\ + movdqa %%xmm1, %%xmm2 # XMM2: V3 U3 V2 U2 V1 U1 V0 U0 \n\ + pand %%xmm7, %%xmm1 # XMM1: -- U3 -- U2 -- U1 -- U0 \n\ + psrlw $8, %%xmm2 # XMM2: -- V3 -- V2 -- V1 -- V0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: U3 U2 U1 U0 \n\ + packuswb %%xmm2, %%xmm2 # XMM2: V3 V2 V1 V0 \n\ + movq %%xmm0, -8("EDI","ECX",2) \n\ + movd %%xmm1, -4("EAX","ECX") \n\ + movd %%xmm2, -4("EDX","ECX")", \ + /* emms */ "emms") + +/* YUY2 -> YUV444P (unit: 2 pixels) */ +#define YUY2_YUV444P \ + /* Load 0x00FF*8 into XMM7 for masking */ \ + "pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "push "EBX, \ + /* pop_regs */ "pop "EBX, \ + /* small_loop */ \ + "movb -4("ESI","ECX",4), %%bl \n\ + movb %%bl, -2("EDI","ECX",2) \n\ + movb -2("ESI","ECX",4), %%bl \n\ + movb %%bl, -1("EDI","ECX",2) \n\ + movb -3("ESI","ECX",4), %%bl \n\ + movb %%bl, -2("EAX","ECX",2) \n\ + movb %%bl, -1("EAX","ECX",2) \n\ + movb -1("ESI","ECX",4), %%bl \n\ + movb %%bl, -2("EDX","ECX",2) \n\ + movb %%bl, -1("EDX","ECX",2)", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",4),%%xmm0 #XM0: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + pand %%xmm7, %%xmm0 # XMM0: -- Y7 -- ..... Y1 -- Y0 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + psrlw $8, %%xmm1 # XMM1: -- V3 -- ..... V0 -- U0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: V3 U3 V2 U2 V1 U1 V0 U0 \n\ + movdqa %%xmm1, %%xmm2 # XMM2: V3 U3 V2 U2 V1 U1 V0 U0 \n\ + pand %%xmm7, %%xmm1 # XMM1: -- U3 -- U2 -- U1 -- U0 \n\ + psrlw $8, %%xmm2 # XMM2: -- V3 -- V2 -- V1 -- V0 \n\ + movdqa %%xmm1, %%xmm3 # XMM3: -- U3 -- U2 -- U1 -- U0 \n\ + psllw $8, %%xmm3 # XMM3: U3 -- U2 -- U1 -- U0 -- \n\ + por %%xmm3, %%xmm1 # XMM1: U3 U3 U2 U2 U1 U1 U0 U0 \n\ + movdqa %%xmm2, %%xmm3 # XMM3: -- V3 -- V2 -- V1 -- V0 \n\ + psllw $8, %%xmm3 # XMM3: V3 -- V2 -- V1 -- V0 -- \n\ + por %%xmm3, %%xmm2 # XMM1: V3 V3 V2 V2 V1 V1 V0 V0 \n\ + movq %%xmm0, -8("EDI","ECX",2) \n\ + movq %%xmm1, -8("EAX","ECX",2) \n\ + movq %%xmm2, -8("EDX","ECX",2)", \ + /* emms */ "emms") + + +/* Y8 -> YUY2/YVYU (unit: 1 pixel) */ +#define Y8_YUY2 \ + /* Load 0x80*16 into XMM7 for interlacing U/V */ \ + "pcmpeqd %%xmm7, %%xmm7; psllw $7, %%xmm7; packsswb %%xmm7, %%xmm7;"\ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 16, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "movb -1("ESI","ECX"), %%al \n\ + movb %%al, -2("EDI","ECX",2) \n\ + movb $0x80, -1("EDI","ECX",2)", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX"),%%xmm0 # XMM0: YF YE YD ..... Y2 Y1 Y0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: YF YE YD ..... Y2 Y1 Y0 \n\ + punpcklbw %%xmm7, %%xmm0 # XMM0: 80 Y7 80 ..... Y1 80 Y0 \n\ + movdqu %%xmm0, -32("EDI","ECX",2) \n\ + punpckhbw %%xmm7, %%xmm1 # XMM1: 80 YF 80 ..... Y9 80 Y8 \n\ + movdqu %%xmm1, -16("EDI","ECX",2)", \ + /* emms */ "emms") + +/* Y8 -> UYVY (unit: 1 pixel) */ +#define Y8_UYVY \ + /* Load 0x80*16 into XMM7 for interlacing U/V */ \ + "pcmpeqd %%xmm7, %%xmm7; psllw $7, %%xmm7; packsswb %%xmm7, %%xmm7;"\ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 16, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "movb -1("ESI","ECX"), %%al \n\ + movb %%al, -1("EDI","ECX",2) \n\ + movb $0x80, -2("EDI","ECX",2)", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX"),%%xmm0 # XMM0: YF YE YD ..... Y2 Y1 Y0 \n\ + movdqa %%xmm7, %%xmm1 # XMM1: 80 80 80 ..... 80 80 80 \n\ + punpcklbw %%xmm0, %%xmm1 # XMM1: Y7 80 Y6 ..... 80 Y0 80 \n\ + movdqu %%xmm1, -32("EDI","ECX",2) \n\ + movdqa %%xmm7, %%xmm2 # XMM2: 80 80 80 ..... 80 80 80 \n\ + punpckhbw %%xmm0, %%xmm2 # XMM0: YF 80 YE ..... 80 Y8 80 \n\ + movdqu %%xmm2, -16("EDI","ECX",2)", \ + /* emms */ "emms") + +/* YUY2/YVYU -> Y8 (unit: 1 pixel) */ +#define YUY2_Y8 \ + /* Load 0x00FF*8 into XMM7 for masking */ \ + "pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "movb -2("ESI","ECX",2), %%al \n\ + movb %%al, -1("EDI","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",2),%%xmm0 #XM0: V3 Y7 U3 ..... Y1 U0 Y0 \n\ + pand %%xmm7, %%xmm0 # XMM0: -- Y7 -- ..... Y1 -- Y0 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + movq %%xmm0, -8("EDI","ECX")", \ + /* emms */ "emms") + +/* UYVY -> Y8 (unit: 1 pixel) */ +#define UYVY_Y8 \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "movb -1("ESI","ECX",2), %%al \n\ + movb %%al, -1("EDI","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",2),%%xmm0 #XM0: Y7 V3 Y6 ..... V0 Y0 U0 \n\ + psrlw $8, %%xmm0 # XMM0: -- Y7 -- ..... Y1 -- Y0 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + movq %%xmm0, -8("EDI","ECX")", \ + /* emms */ "emms") + +/*************************************************************************/ + +static int yuv420p_yuy2_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int y; + for (y = 0; y < (height & ~1); y++) { + asm(YUV42XP_YUY2 + : /* no outputs */ + : "S" (src[0]+y*width), "a" (src[1]+(y/2)*(width/2)), + "d" (src[2]+(y/2)*(width/2)), "D" (dest[0]+y*width*2), + "c" (width/2)); + } + return 1; +} + +static int yuv411p_yuy2_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!(width & 3)) { + asm(YUV411P_YUY2 + : /* no outputs */ + : "S" (src[0]), "a" (src[1]), "d" (src[2]), "D" (dest[0]), + "c" ((width/4)*height)); + } else { + int y; + for (y = 0; y < height; y++) { + asm(YUV411P_YUY2 + : /* no outputs */ + : "S" (src[0]+y*width), "a" (src[1]+y*(width/4)), + "d" (src[2]+y*(width/4)), "D" (dest[0]+y*width*2), + "c" (width/4)); + } + } + return 1; +} + +static int yuv422p_yuy2_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!(width & 1)) { + asm(YUV42XP_YUY2 + : /* no outputs */ + : "S" (src[0]), "a" (src[1]), "d" (src[2]), "D" (dest[0]), + "c" ((width/2)*height)); + } else { + int y; + for (y = 0; y < height; y++) { + asm(YUV42XP_YUY2 + : /* no outputs */ + : "S" (src[0]+y*width), "a" (src[1]+y*(width/2)), + "d" (src[2]+y*(width/2)), "D" (dest[0]+y*width*2), + "c" (width/2)); + } + } + return 1; +} + +static int yuv444p_yuy2_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!(width & 1)) { + asm(YUV444P_YUY2 + : /* no outputs */ + : "S" (src[0]), "a" (src[1]), "d" (src[2]), "D" (dest[0]), + "c" ((width/2)*height)); + } else { + int y; + for (y = 0; y < height; y++) { + asm(YUV444P_YUY2 + : /* no outputs */ + : "S" (src[0]+y*width), "a" (src[1]+y*(width/2)), + "d" (src[2]+y*(width/2)), "D" (dest[0]+y*width*2), + "c" (width/2)); + } + } + return 1; +} + +/*************************************************************************/ + +static int yuy2_yuv420p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int y; + + for (y = 0; y < (height & ~1); y += 2) { + asm(YUY2_YUV420P_U + : /* no outputs */ + : "S" (src[0]+y*width*2), "a" (src[0]+(y+1)*width*2), + "D" (dest[0]+y*width), "d" (dest[1]+(y/2)*(width/2)), + "c" (width/2)); + asm(YUY2_YUV420P_V + : /* no outputs */ + : "S" (src[0]+(y+1)*width*2), "a" (src[0]+y*width*2), + "D" (dest[0]+(y+1)*width), "d" (dest[2]+(y/2)*(width/2)), + "c" (width/2)); + } + return 1; +} + +static int yuy2_yuv411p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!(width & 3)) { + asm(YUY2_YUV411P + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "a" (dest[1]), "d" (dest[2]), + "c" ((width/4)*height)); + } else { + int y; + for (y = 0; y < height; y++) { + asm(YUY2_YUV411P + : /* no outputs */ + : "S" (src[0]+y*width*2), "D" (dest[0]+y*width), + "a" (dest[1]+y*(width/4)), "d" (dest[2]+y*(width/4)), + "c" (width/4)); + } + } + return 1; +} + +static int yuy2_yuv422p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!(width & 1)) { + asm(YUY2_YUV422P + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "a" (dest[1]), "d" (dest[2]), + "c" ((width/2)*height)); + } else { + int y; + for (y = 0; y < height; y++) { + asm(YUY2_YUV422P + : /* no outputs */ + : "S" (src[0]+y*width*2), "D" (dest[0]+y*width), + "a" (dest[1]+y*(width/2)), "d" (dest[2]+y*(width/2)), + "c" (width/2)); + } + } + return 1; +} + +static int yuy2_yuv444p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!(width & 1)) { + asm(YUY2_YUV444P + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "a" (dest[1]), "d" (dest[2]), + "c" ((width/2)*height)); + } else { + int y; + for (y = 0; y < height; y++) { + asm(YUY2_YUV444P + : /* no outputs */ + : "S" (src[0]+y*width*2), "D" (dest[0]+y*width), + "a" (dest[1]+y*width), "d" (dest[2]+y*width), + "c" (width/2)); + } + } + return 1; +} + +/*************************************************************************/ + +static int y8_yuy2_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm(Y8_YUY2 + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height) + : "eax"); + return 1; +} + +static int y8_uyvy_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm(Y8_UYVY + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height) + : "eax"); + return 1; +} + +static int yuy2_y8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm(YUY2_Y8 + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height) + : "eax"); + return 1; +} + +static int uyvy_y8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm(UYVY_Y8 + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height) + : "eax"); + return 1; +} + +/*************************************************************************/ + +#endif /* HAVE_ASM_SSE2 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* Initialization */ + +int ac_imgconvert_init_yuv_mixed(int accel) +{ + if (!register_conversion(IMG_YUV420P, IMG_YUY2, yuv420p_yuy2) + || !register_conversion(IMG_YUV411P, IMG_YUY2, yuv411p_yuy2) + || !register_conversion(IMG_YUV422P, IMG_YUY2, yuv422p_yuy2) + || !register_conversion(IMG_YUV444P, IMG_YUY2, yuv444p_yuy2) + || !register_conversion(IMG_Y8, IMG_YUY2, y8_yuy2) + || !register_conversion(IMG_YUV420P, IMG_UYVY, yuv420p_uyvy) + || !register_conversion(IMG_YUV411P, IMG_UYVY, yuv411p_uyvy) + || !register_conversion(IMG_YUV422P, IMG_UYVY, yuv422p_uyvy) + || !register_conversion(IMG_YUV444P, IMG_UYVY, yuv444p_uyvy) + || !register_conversion(IMG_Y8, IMG_UYVY, y8_uyvy) + || !register_conversion(IMG_YUV420P, IMG_YVYU, yuv420p_yvyu) + || !register_conversion(IMG_YUV411P, IMG_YVYU, yuv411p_yvyu) + || !register_conversion(IMG_YUV422P, IMG_YVYU, yuv422p_yvyu) + || !register_conversion(IMG_YUV444P, IMG_YVYU, yuv444p_yvyu) + || !register_conversion(IMG_Y8, IMG_YVYU, y8_yuy2) + + || !register_conversion(IMG_YUY2, IMG_YUV420P, yuy2_yuv420p) + || !register_conversion(IMG_YUY2, IMG_YUV411P, yuy2_yuv411p) + || !register_conversion(IMG_YUY2, IMG_YUV422P, yuy2_yuv422p) + || !register_conversion(IMG_YUY2, IMG_YUV444P, yuy2_yuv444p) + || !register_conversion(IMG_YUY2, IMG_Y8, yuy2_y8) + || !register_conversion(IMG_UYVY, IMG_YUV420P, uyvy_yuv420p) + || !register_conversion(IMG_UYVY, IMG_YUV411P, uyvy_yuv411p) + || !register_conversion(IMG_UYVY, IMG_YUV422P, uyvy_yuv422p) + || !register_conversion(IMG_UYVY, IMG_YUV444P, uyvy_yuv444p) + || !register_conversion(IMG_UYVY, IMG_Y8, uyvy_y8) + || !register_conversion(IMG_YVYU, IMG_YUV420P, yvyu_yuv420p) + || !register_conversion(IMG_YVYU, IMG_YUV411P, yvyu_yuv411p) + || !register_conversion(IMG_YVYU, IMG_YUV422P, yvyu_yuv422p) + || !register_conversion(IMG_YVYU, IMG_YUV444P, yvyu_yuv444p) + || !register_conversion(IMG_YVYU, IMG_Y8, yuy2_y8) + ) { + return 0; + } + +#if defined(HAVE_ASM_SSE2) + if (accel & AC_SSE2) { + if (!register_conversion(IMG_YUV420P, IMG_YUY2, yuv420p_yuy2_sse2) + || !register_conversion(IMG_YUV411P, IMG_YUY2, yuv411p_yuy2_sse2) + || !register_conversion(IMG_YUV422P, IMG_YUY2, yuv422p_yuy2_sse2) + || !register_conversion(IMG_YUV444P, IMG_YUY2, yuv444p_yuy2_sse2) + || !register_conversion(IMG_Y8, IMG_YUY2, y8_yuy2_sse2) + || !register_conversion(IMG_Y8, IMG_UYVY, y8_uyvy_sse2) + || !register_conversion(IMG_Y8, IMG_YVYU, y8_yuy2_sse2) + + || !register_conversion(IMG_YUY2, IMG_YUV420P, yuy2_yuv420p_sse2) + || !register_conversion(IMG_YUY2, IMG_YUV411P, yuy2_yuv411p_sse2) + || !register_conversion(IMG_YUY2, IMG_YUV422P, yuy2_yuv422p_sse2) + || !register_conversion(IMG_YUY2, IMG_YUV444P, yuy2_yuv444p_sse2) + || !register_conversion(IMG_YUY2, IMG_Y8, yuy2_y8_sse2) + || !register_conversion(IMG_UYVY, IMG_Y8, uyvy_y8_sse2) + || !register_conversion(IMG_YVYU, IMG_Y8, yuy2_y8_sse2) + ) { + return 0; + } + } +#endif /* ARCH_X86 || ARCH_X86_64 */ + + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/img_yuv_packed.c b/veejay-server/aclib/img_yuv_packed.c new file mode 100644 index 00000000..05357405 --- /dev/null +++ b/veejay-server/aclib/img_yuv_packed.c @@ -0,0 +1,290 @@ +/* + * img_yuv_packed.c - YUV packed image format conversion routines + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "imgconvert.h" +#include "img_internal.h" + +/*************************************************************************/ +/*************************************************************************/ + +/* Standard C implementations */ + +/*************************************************************************/ + +/* Identity transformation, works when src==dest */ +static int yuv16_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height*2); + return 1; +} + +/* Used for YUY2->UYVY and UYVY->YUY2, works when src==dest */ +static int yuv16_swap16(uint8_t **src, uint8_t **dest, int width, int height) +{ + uint16_t *srcp = (uint16_t *)src[0]; + uint16_t *destp = (uint16_t *)dest[0]; + int i; + for (i = 0; i < width*height; i++) + destp[i] = srcp[i]>>8 | srcp[i]<<8; + return 1; +} + +/* Used for YUY2->YVYU and YVYU->YUY2, works when src==dest */ +static int yuv16_swapuv(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height/2; i++) { + uint8_t tmp = src[0][i*4+1]; + dest[0][i*4 ] = src[0][i*4 ]; + dest[0][i*4+1] = src[0][i*4+3]; + dest[0][i*4+2] = src[0][i*4+2]; + dest[0][i*4+3] = tmp; + } + return 1; +} + +/*************************************************************************/ + +static int uyvy_yvyu(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height/2; i++) { + dest[0][i*4 ] = src[0][i*4+1]; + dest[0][i*4+1] = src[0][i*4+2]; + dest[0][i*4+2] = src[0][i*4+3]; + dest[0][i*4+3] = src[0][i*4 ]; + } + return 1; +} + +static int yvyu_uyvy(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + for (i = 0; i < width*height/2; i++) { + dest[0][i*4 ] = src[0][i*4+3]; + dest[0][i*4+1] = src[0][i*4 ]; + dest[0][i*4+2] = src[0][i*4+1]; + dest[0][i*4+3] = src[0][i*4+2]; + } + return 1; +} + +/*************************************************************************/ +/*************************************************************************/ + +#if defined(ARCH_X86) || defined(ARCH_X86_64) + +/* Common macros/data for x86 code */ +#define DEFINE_MASK_DATA +#include "img_x86_common.h" + +/*************************************************************************/ + +/* Basic assembly routines */ + +static int yuv16_swap16_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP16_2_X86(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +static int yuv16_swapuv_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_13_X86(width*height/2); + return 1; +} + +static int uyvy_yvyu_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROR32_X86(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +static int yvyu_uyvy_x86(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROL32_X86(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +/*************************************************************************/ + +/* MMX routines */ + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) /* i.e. not x86_64 */ + +static int yuv16_swap16_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP16_2_MMX(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +static int yuv16_swapuv_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_13_MMX(width*height/2); + return 1; +} + +static int uyvy_yvyu_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROR32_MMX(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +static int yvyu_uyvy_mmx(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROL32_MMX(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +#endif /* HAVE_ASM_MMX && ARCH_X86 */ + +/*************************************************************************/ + +/* SSE2 routines */ + +#if defined(HAVE_ASM_SSE2) + +static int yuv16_swap16_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP16_2_SSE2(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +static int yuv16_swapuv_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_SWAP32_13_SSE2(width*height/2); + return 1; +} + +static int uyvy_yvyu_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROR32_SSE2(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +static int yvyu_uyvy_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ASM_ROL32_SSE2(width*height/2); + if (width*height % 1) + ((uint16_t *)(dest[0]))[width*height-1] = + src[0][width*height*2-2]<<8 | src[0][width*height*2-1]; + return 1; +} + +#endif /* HAVE_ASM_SSE2 */ + +/*************************************************************************/ + +#endif /* ARCH_X86 || ARCH_X86_64 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* Initialization */ + +int ac_imgconvert_init_yuv_packed(int accel) +{ + if (!register_conversion(IMG_YUY2, IMG_YUY2, yuv16_copy) + || !register_conversion(IMG_YUY2, IMG_UYVY, yuv16_swap16) + || !register_conversion(IMG_YUY2, IMG_YVYU, yuv16_swapuv) + + || !register_conversion(IMG_UYVY, IMG_YUY2, yuv16_swap16) + || !register_conversion(IMG_UYVY, IMG_UYVY, yuv16_copy) + || !register_conversion(IMG_UYVY, IMG_YVYU, uyvy_yvyu) + + || !register_conversion(IMG_YVYU, IMG_YUY2, yuv16_swapuv) + || !register_conversion(IMG_YVYU, IMG_UYVY, yvyu_uyvy) + || !register_conversion(IMG_YVYU, IMG_YVYU, yuv16_copy) + ) { + return 0; + } + +#if defined(ARCH_X86) || defined(ARCH_X86_64) + if (accel & (AC_IA32ASM | AC_AMD64ASM)) { + if (!register_conversion(IMG_YUY2, IMG_UYVY, yuv16_swap16_x86) + || !register_conversion(IMG_YUY2, IMG_YVYU, yuv16_swapuv_x86) + || !register_conversion(IMG_UYVY, IMG_YUY2, yuv16_swap16_x86) + || !register_conversion(IMG_UYVY, IMG_YVYU, uyvy_yvyu_x86) + || !register_conversion(IMG_YVYU, IMG_YUY2, yuv16_swapuv_x86) + || !register_conversion(IMG_YVYU, IMG_UYVY, yvyu_uyvy_x86) + ) { + return 0; + } + } + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) + if (accel & AC_MMX) { + if (!register_conversion(IMG_YUY2, IMG_UYVY, yuv16_swap16_mmx) + || !register_conversion(IMG_YUY2, IMG_YVYU, yuv16_swapuv_mmx) + || !register_conversion(IMG_UYVY, IMG_YUY2, yuv16_swap16_mmx) + || !register_conversion(IMG_UYVY, IMG_YVYU, uyvy_yvyu_mmx) + || !register_conversion(IMG_YVYU, IMG_YUY2, yuv16_swapuv_mmx) + || !register_conversion(IMG_YVYU, IMG_UYVY, yvyu_uyvy_mmx) + ) { + return 0; + } + } +#endif + +#if defined(HAVE_ASM_SSE2) + if (accel & AC_SSE2) { + if (!register_conversion(IMG_YUY2, IMG_UYVY, yuv16_swap16_sse2) + || !register_conversion(IMG_YUY2, IMG_YVYU, yuv16_swapuv_sse2) + || !register_conversion(IMG_UYVY, IMG_YUY2, yuv16_swap16_sse2) + || !register_conversion(IMG_UYVY, IMG_YVYU, uyvy_yvyu_sse2) + || !register_conversion(IMG_YVYU, IMG_YUY2, yuv16_swapuv_sse2) + || !register_conversion(IMG_YVYU, IMG_UYVY, yvyu_uyvy_sse2) + ) { + return 0; + } + } +#endif + +#endif /* ARCH_X86 || ARCH_X86_64 */ + + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/img_yuv_planar.c b/veejay-server/aclib/img_yuv_planar.c new file mode 100644 index 00000000..3ebef89a --- /dev/null +++ b/veejay-server/aclib/img_yuv_planar.c @@ -0,0 +1,771 @@ +/* + * img_yuv_planar.c - YUV planar image format conversion routines + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "imgconvert.h" +#include "img_internal.h" + +#include + +/*************************************************************************/ +/*************************************************************************/ + +/* Standard C implementations */ + +/*************************************************************************/ + +/* Identity transformations */ + +static int yuv420p_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + ac_memcpy(dest[1], src[1], (width/2)*(height/2)); + ac_memcpy(dest[2], src[2], (width/2)*(height/2)); + return 1; +} + +static int yuv411p_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + ac_memcpy(dest[1], src[1], (width/4)*height); + ac_memcpy(dest[2], src[2], (width/4)*height); + return 1; +} + +static int yuv422p_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + ac_memcpy(dest[1], src[1], (width/2)*height); + ac_memcpy(dest[2], src[2], (width/2)*height); + return 1; +} + +static int yuv444p_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + ac_memcpy(dest[1], src[1], width*height); + ac_memcpy(dest[2], src[2], width*height); + return 1; +} + +static int y8_copy(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + return 1; +} + +/*************************************************************************/ + +static int yuv420p_yuv411p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + for (x = 0; x < (width/2 & ~1); x += 2) { + dest[1][y*(width/4)+x/2] = (src[1][(y/2)*(width/2)+x] + + src[1][(y/2)*(width/2)+x+1] + 1) / 2; + dest[2][y*(width/4)+x/2] = (src[2][(y/2)*(width/2)+x] + + src[2][(y/2)*(width/2)+x+1] + 1) / 2; + } + ac_memcpy(dest[1]+(y+1)*(width/4), dest[1]+y*(width/4), width/4); + ac_memcpy(dest[2]+(y+1)*(width/4), dest[2]+y*(width/4), width/4); + } + return 1; +} + +static int yuv420p_yuv422p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + ac_memcpy(dest[1]+(y )*(width/2), src[1]+(y/2)*(width/2), width/2); + ac_memcpy(dest[1]+(y+1)*(width/2), src[1]+(y/2)*(width/2), width/2); + ac_memcpy(dest[2]+(y )*(width/2), src[2]+(y/2)*(width/2), width/2); + ac_memcpy(dest[2]+(y+1)*(width/2), src[2]+(y/2)*(width/2), width/2); + } + return 1; +} + +static int yuv420p_yuv444p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < height; y += 2) { + for (x = 0; x < width; x += 2) { + dest[1][y*width+x ] = + dest[1][y*width+x+1] = src[1][(y/2)*(width/2)+(x/2)]; + dest[2][y*width+x ] = + dest[2][y*width+x+1] = src[2][(y/2)*(width/2)+(x/2)]; + } + ac_memcpy(dest[1]+(y+1)*width, dest[1]+y*width, width); + ac_memcpy(dest[2]+(y+1)*width, dest[2]+y*width, width); + } + return 1; +} + +/*************************************************************************/ + +static int yuv411p_yuv420p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + for (x = 0; x < ((width/2) & ~1); x += 2) { + dest[1][(y/2)*(width/2)+x] = (src[1][y*(width/4)+x/2] + + src[1][(y+1)*(width/4)+x/2] + 1) / 2; + dest[2][(y/2)*(width/2)+x] = (src[2][y*(width/4)+x/2] + + src[2][(y+1)*(width/4)+x/2] + 1) / 2; + dest[1][(y/2)*(width/2)+x+1] = dest[1][(y/2)*(width/2)+x]; + dest[2][(y/2)*(width/2)+x+1] = dest[2][(y/2)*(width/2)+x]; + } + } + return 1; +} + +static int yuv411p_yuv422p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < height; y++) { + for (x = 0; x < ((width/2) & ~1); x += 2) { + dest[1][y*(width/2)+x ] = src[1][y*(width/4)+x/2]; + dest[1][y*(width/2)+x+1] = src[1][y*(width/4)+x/2]; + dest[2][y*(width/2)+x ] = src[2][y*(width/4)+x/2]; + dest[2][y*(width/2)+x+1] = src[2][y*(width/4)+x/2]; + } + } + return 1; +} + +static int yuv411p_yuv444p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < height; y++) { + for (x = 0; x < (width & ~3); x += 4) { + dest[1][y*width+x ] = src[1][y*(width/4)+x/4]; + dest[1][y*width+x+1] = src[1][y*(width/4)+x/4]; + dest[1][y*width+x+2] = src[1][y*(width/4)+x/4]; + dest[1][y*width+x+3] = src[1][y*(width/4)+x/4]; + dest[2][y*width+x ] = src[2][y*(width/4)+x/4]; + dest[2][y*width+x+1] = src[2][y*(width/4)+x/4]; + dest[2][y*width+x+2] = src[2][y*(width/4)+x/4]; + dest[2][y*width+x+3] = src[2][y*(width/4)+x/4]; + } + } + return 1; +} + +/*************************************************************************/ + +static int yuv422p_yuv420p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + for (x = 0; x < width/2; x++) { + dest[1][(y/2)*(width/2)+x] = (src[1][y*(width/2)+x] + + src[1][(y+1)*(width/2)+x] + 1) / 2; + dest[2][(y/2)*(width/2)+x] = (src[2][y*(width/2)+x] + + src[2][(y+1)*(width/2)+x] + 1) / 2; + } + } + return 1; +} + +static int yuv422p_yuv411p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < height; y++) { + for (x = 0; x < ((width/2) & ~1); x += 2) { + dest[1][y*(width/4)+x/2] = (src[1][y*(width/2)+x] + + src[1][y*(width/2)+x+1] + 1) / 2; + dest[2][y*(width/4)+x/2] = (src[2][y*(width/2)+x] + + src[2][y*(width/2)+x+1] + 1) / 2; + } + } + return 1; +} + +static int yuv422p_yuv444p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < height; y++) { + for (x = 0; x < (width & ~1); x += 2) { + dest[1][y*width+x ] = src[1][y*(width/2)+x/2]; + dest[1][y*width+x+1] = src[1][y*(width/2)+x/2]; + dest[2][y*width+x ] = src[2][y*(width/2)+x/2]; + dest[2][y*width+x+1] = src[2][y*(width/2)+x/2]; + } + } + return 1; +} + +/*************************************************************************/ + +static int yuv444p_yuv420p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + for (x = 0; x < (width & ~1); x += 2) { + dest[1][(y/2)*(width/2)+x/2] = (src[1][y*width+x] + + src[1][y*width+x+1] + + src[1][(y+1)*width+x] + + src[1][(y+1)*width+x+1] + 2) / 4; + dest[2][(y/2)*(width/2)+x/2] = (src[2][y*width+x] + + src[2][y*width+x+1] + + src[2][(y+1)*width+x] + + src[2][(y+1)*width+x+1] + 2) / 4; + } + } + return 1; +} + +static int yuv444p_yuv411p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < height; y++) { + for (x = 0; x < (width & ~3); x += 4) { + dest[1][y*(width/4)+x/4] = (src[1][y*width+x] + + src[1][y*width+x+1] + + src[1][y*width+x+2] + + src[1][y*width+x+3] + 2) / 4; + dest[2][y*(width/4)+x/4] = (src[2][y*width+x] + + src[2][y*width+x+1] + + src[2][y*width+x+2] + + src[2][y*width+x+3] + 2) / 4; + } + } + return 1; +} + +static int yuv444p_yuv422p(uint8_t **src, uint8_t **dest, int width, int height) +{ + int x, y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < height; y++) { + for (x = 0; x < (width & ~1); x += 2) { + dest[1][y*(width/2)+x/2] = (src[1][y*width+x] + + src[1][y*width+x+1] + 1) / 2; + dest[2][y*(width/2)+x/2] = (src[2][y*width+x] + + src[2][y*width+x+1] + 1) / 2; + } + } + return 1; +} + +/*************************************************************************/ + +/* We treat Y8 as a planar format */ + +static int yuvp_y8(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + return 1; +} + +static int y8_yuv420p(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + memset(dest[1], 128, (width/2)*(height/2)); + memset(dest[2], 128, (width/2)*(height/2)); + return 1; +} + +static int y8_yuv411p(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + memset(dest[1], 128, (width/4)*height); + memset(dest[2], 128, (width/4)*height); + return 1; +} + +static int y8_yuv422p(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + memset(dest[1], 128, (width/2)*height); + memset(dest[2], 128, (width/2)*height); + return 1; +} + +static int y8_yuv444p(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + memset(dest[1], 128, width*height); + memset(dest[2], 128, width*height); + return 1; +} + +/*************************************************************************/ +/*************************************************************************/ + +#if defined(HAVE_ASM_SSE2) + +/* SSE2 routines. See comments in img_x86_common.h for why we don't bother + * unrolling the loops. */ + +/* Common macros/data for x86 code */ +#include "img_x86_common.h" + +/* Average 2 bytes horizontally (e.g. 422P->411P) (unit: 2 source bytes) */ +#define AVG_2H(src,dest,count) \ + asm("pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" /* XMM7: 0x00FF*8 */ \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "movzbl -2("ESI","ECX",2), %%eax \n\ + movzbl -1("ESI","ECX",2), %%edx \n\ + addl %%edx, %%eax \n\ + shrl $1, %%eax \n\ + movb %%al, -1("EDI","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",2),%%xmm0 #XMM0:FEDCBA9876543210 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: FEDCBA9876543210 \n\ + pand %%xmm7, %%xmm0 # XMM0: E C A 8 6 4 2 0 \n\ + psrlw $8, %%xmm1 # XMM1: F D B 9 7 5 3 1 \n\ + pavgw %%xmm1, %%xmm0 # XMM0: w v u t s r q p (avgs) \n\ + packuswb %%xmm0, %%xmm0 # XMM0: wvutsrqpwvutsrqp \n\ + movq %%xmm0, -8("EDI","ECX")", \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src), "D" (dest), "c" (count) \ + : "eax", "edx") + +/* Average 4 bytes horizontally (e.g. 444P->411P) (unit: 4 source bytes) */ +#define AVG_4H(src,dest,count) \ + asm("pcmpeqd %%xmm7, %%xmm7; psrld $24, %%xmm7;" /* XMM7: 0x000000FF*4 */ \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "movzbl -4("ESI","ECX",4), %%eax \n\ + movzbl -3("ESI","ECX",4), %%edx \n\ + addl %%edx, %%eax \n\ + movzbl -2("ESI","ECX",4), %%edx \n\ + addl %%edx, %%eax \n\ + movzbl -1("ESI","ECX",4), %%edx \n\ + addl %%edx, %%eax \n\ + shrl $2, %%eax \n\ + movb %%al, -1("EDI","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",4),%%xmm0 #XMM0:FEDCBA9876543210 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: FEDCBA9876543210 \n\ + movdqa %%xmm0, %%xmm2 # XMM2: FEDCBA9876543210 \n\ + movdqa %%xmm0, %%xmm3 # XMM3: FEDCBA9876543210 \n\ + pand %%xmm7, %%xmm0 # XMM0: C 8 4 0 \n\ + psrld $8, %%xmm1 # XMM1: FED BA9 765 321 \n\ + pand %%xmm7, %%xmm1 # XMM1: D 9 5 1 \n\ + psrld $16, %%xmm2 # XMM2: FE BA 76 32 \n\ + pand %%xmm7, %%xmm2 # XMM2: E A 6 2 \n\ + psrld $24, %%xmm3 # XMM3: F B 7 3 \n\ + pavgw %%xmm1, %%xmm0 # XMM0: C+D 8+9 4+5 0+1 (avgs) \n\ + pavgw %%xmm3, %%xmm2 # XMM2: E+F A+B 6+7 2+3 (avgs) \n\ + pavgw %%xmm2, %%xmm0 # XMM0: s r q p (avgs) \n\ + packuswb %%xmm0, %%xmm0 # XMM0: s r q p s r q p \n\ + packuswb %%xmm0, %%xmm0 # XMM0: srqpsrqpsrqpsrqp \n\ + movd %%xmm0, -4("EDI","ECX")", \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src), "D" (dest), "c" (count) \ + : "eax", "edx") + +/* Repeat 2 bytes horizontally (e.g. 422P->444P) (unit: 1 source byte) */ +#define REP_2H(src,dest,count) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "movb -1("ESI","ECX"), %%al \n\ + movb %%al, %%ah \n\ + movw %%ax, -2("EDI","ECX",2)", \ + /* main_loop */ \ + "movq -8("ESI","ECX"), %%xmm0 # XMM0: 76543210 \n\ + punpcklbw %%xmm0, %%xmm0 # XMM0: 7766554433221100 \n\ + movdqu %%xmm0, -16("EDI","ECX",2)", \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src), "D" (dest), "c" (count) \ + : "eax") + +/* Repeat 4 bytes horizontally (e.g. 411P->444P) (unit: 1 source byte) */ +#define REP_4H(src,dest,count) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ 4, \ + /* push_regs */ "", \ + /* pop_regs */ "", \ + /* small_loop */ \ + "movzbl -1("ESI","ECX"), %%eax \n\ + movb %%al, %%ah \n\ + movl %%eax, %%edx \n\ + shll $16, %%eax \n\ + orl %%edx, %%eax \n\ + movl %%eax, -4("EDI","ECX",4)", \ + /* main_loop */ \ + "movd -4("ESI","ECX"), %%xmm0 # XMM0: 3210 \n\ + punpcklbw %%xmm0, %%xmm0 # XMM0: 33221100 \n\ + punpcklwd %%xmm0, %%xmm0 # XMM0: 3333222211110000 \n\ + movdqu %%xmm0, -16("EDI","ECX",4)", \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src), "D" (dest), "c" (count) \ + : "eax", "edx") + +/* Average 2 bytes vertically and double horizontally (411P->420P) + * (unit: 1 source byte) */ +#define AVG_411_420(src1,src2,dest,count) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "push "EBX, \ + /* pop_regs */ "pop "EBX, \ + /* small_loop */ \ + "movzbl -1("ESI","ECX"), %%eax \n\ + movzbl -1("EDX","ECX"), %%ebx \n\ + addl %%ebx, %%eax \n\ + shrl $1, %%eax \n\ + movb %%al, %%ah \n\ + movw %%ax, -2("EDI","ECX",2)", \ + /* main_loop */ \ + "movq -8("ESI","ECX"), %%xmm0 \n\ + movq -8("EDX","ECX"), %%xmm1 \n\ + pavgb %%xmm1, %%xmm0 \n\ + punpcklbw %%xmm0, %%xmm0 \n\ + movdqu %%xmm0, -16("EDI","ECX",2)", \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src1), "d" (src2), "D" (dest), "c" (count) \ + : "eax") + +/* Average 2 bytes vertically (422P->420P) (unit: 1 source byte) */ +#define AVG_422_420(src1,src2,dest,count) \ + asm(SIMD_LOOP_WRAPPER( \ + /* blocksize */ 16, \ + /* push_regs */ "push "EBX, \ + /* pop_regs */ "pop "EBX, \ + /* small_loop */ \ + "movzbl -1("ESI","ECX"), %%eax \n\ + movzbl -1("EDX","ECX"), %%ebx \n\ + addl %%ebx, %%eax \n\ + shrl $1, %%eax \n\ + movb %%al, -1("EDI","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX"), %%xmm0 \n\ + movdqu -16("EDX","ECX"), %%xmm1 \n\ + pavgb %%xmm1, %%xmm0 \n\ + movdqu %%xmm0, -16("EDI","ECX")", \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src1), "d" (src2), "D" (dest), "c" (count) \ + : "eax") + +/* Average 4 bytes, 2 horizontally and 2 vertically (444P->420P) + * (unit: 2 source bytes) */ +#define AVG_444_420(src1,src2,dest,count) \ + asm("pcmpeqd %%xmm7, %%xmm7; psrlw $8, %%xmm7;" /* XMM7: 0x00FF*8 */ \ + SIMD_LOOP_WRAPPER( \ + /* blocksize */ 8, \ + /* push_regs */ "push "EBX, \ + /* pop_regs */ "pop "EBX, \ + /* small_loop */ \ + "movzbl -2("ESI","ECX",2), %%eax \n\ + movzbl -1("ESI","ECX",2), %%ebx \n\ + addl %%ebx, %%eax \n\ + movzbl -2("EDX","ECX",2), %%ebx \n\ + addl %%ebx, %%eax \n\ + movzbl -1("EDX","ECX",2), %%ebx \n\ + addl %%ebx, %%eax \n\ + shrl $2, %%eax \n\ + movb %%al, -1("EDI","ECX")", \ + /* main_loop */ \ + "movdqu -16("ESI","ECX",2), %%xmm0 \n\ + movdqu -16("EDX","ECX",2), %%xmm2 \n\ + movdqa %%xmm0, %%xmm1 \n\ + pand %%xmm7, %%xmm0 \n\ + psrlw $8, %%xmm1 \n\ + pavgw %%xmm1, %%xmm0 \n\ + movdqa %%xmm2, %%xmm3 \n\ + pand %%xmm7, %%xmm2 \n\ + psrlw $8, %%xmm3 \n\ + pavgw %%xmm3, %%xmm2 \n\ + pavgw %%xmm2, %%xmm0 \n\ + packuswb %%xmm0, %%xmm0 \n\ + movq %%xmm0, -8("EDI","ECX")", \ + /* emms */ "emms") \ + : /* no outputs */ \ + : "S" (src1), "d" (src2), "D" (dest), "c" (count)) + +/*************************************************************************/ + +static int yuv420p_yuv411p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + AVG_2H(src[1]+(y/2)*(width/2), dest[1]+y*(width/4), width/4); + ac_memcpy(dest[1]+(y+1)*(width/4), dest[1]+y*(width/4), width/4); + AVG_2H(src[2]+(y/2)*(width/2), dest[2]+y*(width/4), width/4); + ac_memcpy(dest[2]+(y+1)*(width/4), dest[2]+y*(width/4), width/4); + } + return 1; +} + +static int yuv420p_yuv444p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < height; y += 2) { + REP_2H(src[1]+(y/2)*(width/2), dest[1]+y*width, width/2); + ac_memcpy(dest[1]+(y+1)*width, dest[1]+y*width, width); + REP_2H(src[2]+(y/2)*(width/2), dest[2]+y*width, width/2); + ac_memcpy(dest[2]+(y+1)*width, dest[2]+y*width, width); + } + return 1; +} + +/*************************************************************************/ + +static int yuv411p_yuv420p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + AVG_411_420(src[1]+y*(width/4), src[1]+(y+1)*(width/4), + dest[1]+(y/2)*(width/2), width/4); + AVG_411_420(src[2]+y*(width/4), src[2]+(y+1)*(width/4), + dest[2]+(y/2)*(width/2), width/4); + } + return 1; +} + +static int yuv411p_yuv422p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + if (!(width & 3)) { + /* Fast version, no bytes at end of row to skip */ + REP_2H(src[1], dest[1], (width/4)*height); + REP_2H(src[2], dest[2], (width/4)*height); + } else { + /* Slow version, loop through each row */ + int y; + for (y = 0; y < height; y++) { + REP_2H(src[1]+y*(width/4), dest[1]+y*(width/2), width/4); + REP_2H(src[2]+y*(width/4), dest[2]+y*(width/2), width/4); + } + } + return 1; +} + +static int yuv411p_yuv444p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + if (!(width & 3)) { + /* Fast version, no bytes at end of row to skip */ + REP_4H(src[1], dest[1], (width/4)*height); + REP_4H(src[2], dest[2], (width/4)*height); + } else { + /* Slow version, loop through each row */ + int y; + for (y = 0; y < height; y++) { + REP_4H(src[1]+y*(width/4), dest[1]+y*width, width/4); + REP_4H(src[2]+y*(width/4), dest[2]+y*width, width/4); + } + } + return 1; +} + +/*************************************************************************/ + +static int yuv422p_yuv420p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + AVG_422_420(src[1]+y*(width/2), src[1]+(y+1)*(width/2), + dest[1]+(y/2)*(width/2), width/2); + AVG_422_420(src[2]+y*(width/2), src[2]+(y+1)*(width/2), + dest[2]+(y/2)*(width/2), width/2); + } + return 1; +} + +static int yuv422p_yuv411p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + if (!(width & 3)) { + /* Fast version, no bytes at end of row to skip */ + AVG_2H(src[1], dest[1], (width/4)*height); + AVG_2H(src[2], dest[2], (width/4)*height); + } else { + /* Slow version, loop through each row */ + int y; + for (y = 0; y < height; y++) { + AVG_2H(src[1]+y*(width/2), dest[1]+y*(width/4), width/4); + AVG_2H(src[2]+y*(width/2), dest[2]+y*(width/4), width/4); + } + } + return 1; +} + +static int yuv422p_yuv444p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + if (!(width & 1)) { + /* Fast version, no bytes at end of row to skip */ + REP_2H(src[1], dest[1], (width/2)*height); + REP_2H(src[2], dest[2], (width/2)*height); + } else { + /* Slow version, loop through each row */ + int y; + for (y = 0; y < height; y++) { + REP_2H(src[1]+y*(width/2), dest[1]+y*width, width/2); + REP_2H(src[2]+y*(width/2), dest[2]+y*width, width/2); + } + } + return 1; +} + +/*************************************************************************/ + +static int yuv444p_yuv420p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int y; + ac_memcpy(dest[0], src[0], width*height); + for (y = 0; y < (height & ~1); y += 2) { + AVG_444_420(src[1]+y*width, src[1]+(y+1)*width, + dest[1]+(y/2)*(width/2), width/2); + AVG_444_420(src[2]+y*width, src[2]+(y+1)*width, + dest[2]+(y/2)*(width/2), width/2); + } + return 1; +} + +static int yuv444p_yuv411p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + if (!(width & 3)) { + /* Fast version, no bytes at end of row to skip */ + AVG_4H(src[1], dest[1], (width/4)*height); + AVG_4H(src[2], dest[2], (width/4)*height); + } else { + /* Slow version, loop through each row */ + int y; + for (y = 0; y < height; y++) { + AVG_4H(src[1]+y*width, dest[1]+y*(width/4), width/4); + AVG_4H(src[2]+y*width, dest[2]+y*(width/4), width/4); + } + } + return 1; +} + +static int yuv444p_yuv422p_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + ac_memcpy(dest[0], src[0], width*height); + if (!(width & 1)) { + /* Fast version, no bytes at end of row to skip */ + AVG_2H(src[1], dest[1], (width/2)*height); + AVG_2H(src[2], dest[2], (width/2)*height); + } else { + /* Slow version, loop through each row */ + int y; + for (y = 0; y < height; y++) { + AVG_2H(src[1]+y*width, dest[1]+y*(width/2), width/2); + AVG_2H(src[2]+y*width, dest[2]+y*(width/2), width/2); + } + } + return 1; +} + +/*************************************************************************/ + +#endif /* HAVE_ASM_SSE2 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* Initialization */ + +int ac_imgconvert_init_yuv_planar(int accel) +{ + if (!register_conversion(IMG_YUV420P, IMG_YUV420P, yuv420p_copy) + || !register_conversion(IMG_YUV420P, IMG_YUV411P, yuv420p_yuv411p) + || !register_conversion(IMG_YUV420P, IMG_YUV422P, yuv420p_yuv422p) + || !register_conversion(IMG_YUV420P, IMG_YUV444P, yuv420p_yuv444p) + || !register_conversion(IMG_YUV420P, IMG_Y8, yuvp_y8) + + || !register_conversion(IMG_YUV411P, IMG_YUV420P, yuv411p_yuv420p) + || !register_conversion(IMG_YUV411P, IMG_YUV411P, yuv411p_copy) + || !register_conversion(IMG_YUV411P, IMG_YUV422P, yuv411p_yuv422p) + || !register_conversion(IMG_YUV411P, IMG_YUV444P, yuv411p_yuv444p) + || !register_conversion(IMG_YUV411P, IMG_Y8, yuvp_y8) + + || !register_conversion(IMG_YUV422P, IMG_YUV420P, yuv422p_yuv420p) + || !register_conversion(IMG_YUV422P, IMG_YUV411P, yuv422p_yuv411p) + || !register_conversion(IMG_YUV422P, IMG_YUV422P, yuv422p_copy) + || !register_conversion(IMG_YUV422P, IMG_YUV444P, yuv422p_yuv444p) + || !register_conversion(IMG_YUV422P, IMG_Y8, yuvp_y8) + + || !register_conversion(IMG_YUV444P, IMG_YUV420P, yuv444p_yuv420p) + || !register_conversion(IMG_YUV444P, IMG_YUV411P, yuv444p_yuv411p) + || !register_conversion(IMG_YUV444P, IMG_YUV422P, yuv444p_yuv422p) + || !register_conversion(IMG_YUV444P, IMG_YUV444P, yuv444p_copy) + || !register_conversion(IMG_YUV444P, IMG_Y8, yuvp_y8) + + || !register_conversion(IMG_Y8, IMG_YUV420P, y8_yuv420p) + || !register_conversion(IMG_Y8, IMG_YUV411P, y8_yuv411p) + || !register_conversion(IMG_Y8, IMG_YUV422P, y8_yuv422p) + || !register_conversion(IMG_Y8, IMG_YUV444P, y8_yuv444p) + || !register_conversion(IMG_Y8, IMG_Y8, y8_copy) + ) { + return 0; + } + +#if defined(HAVE_ASM_SSE2) + if (accel & AC_SSE2) { + if (!register_conversion(IMG_YUV420P, IMG_YUV411P, yuv420p_yuv411p_sse2) + || !register_conversion(IMG_YUV420P, IMG_YUV444P, yuv420p_yuv444p_sse2) + + || !register_conversion(IMG_YUV411P, IMG_YUV420P, yuv411p_yuv420p_sse2) + || !register_conversion(IMG_YUV411P, IMG_YUV422P, yuv411p_yuv422p_sse2) + || !register_conversion(IMG_YUV411P, IMG_YUV444P, yuv411p_yuv444p_sse2) + + || !register_conversion(IMG_YUV422P, IMG_YUV420P, yuv422p_yuv420p_sse2) + || !register_conversion(IMG_YUV422P, IMG_YUV411P, yuv422p_yuv411p_sse2) + || !register_conversion(IMG_YUV422P, IMG_YUV444P, yuv422p_yuv444p_sse2) + + || !register_conversion(IMG_YUV444P, IMG_YUV420P, yuv444p_yuv420p_sse2) + || !register_conversion(IMG_YUV444P, IMG_YUV411P, yuv444p_yuv411p_sse2) + || !register_conversion(IMG_YUV444P, IMG_YUV422P, yuv444p_yuv422p_sse2) + ) { + return 0; + } + } +#endif /* ARCH_X86 || ARCH_X86_64 */ + + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/img_yuv_rgb.c b/veejay-server/aclib/img_yuv_rgb.c new file mode 100644 index 00000000..95deb4fd --- /dev/null +++ b/veejay-server/aclib/img_yuv_rgb.c @@ -0,0 +1,2398 @@ +/* + * img_yuv_rgb.c - YUV<->RGB image format conversion routines + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "ac_internal.h" +#include "imgconvert.h" +#include "img_internal.h" + +#include + +#define USE_LOOKUP_TABLES /* for YUV420P->RGB24 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* Standard C implementations */ + +const int cY = 76309; +const int crV = 104597; +const int cgU = -25675; +const int cgV = -53279; +const int cbU = 132201; + +/*************************************************************************/ + +#ifdef USE_LOOKUP_TABLES +# define TABLE_SCALE 16 /* scale factor for Y */ +static int Ylutbase[768*TABLE_SCALE]; +static int *Ylut = Ylutbase+256*TABLE_SCALE; +static int rVlut[256]; +static int gUlut[256]; +static int gVlut[256]; +static int bUlut[256]; +static void yuv_create_tables(void) { + static int yuv_tables_created = 0; + if (!yuv_tables_created) { + int i; + for (i = -256*TABLE_SCALE; i < 512*TABLE_SCALE; i++) { + int v = ((cY*(i-16*TABLE_SCALE)/TABLE_SCALE) + 32768) >> 16; + Ylut[i] = v<0 ? 0 : v>255 ? 255 : v; + } + for (i = 0; i < 256; i++) { + rVlut[i] = ((crV * (i-128)) * TABLE_SCALE + cY/2) / cY; + gUlut[i] = ((cgU * (i-128)) * TABLE_SCALE + cY/2) / cY; + gVlut[i] = ((cgV * (i-128)) * TABLE_SCALE + cY/2) / cY; + bUlut[i] = ((cbU * (i-128)) * TABLE_SCALE + cY/2) / cY; + } + yuv_tables_created = 1; + } +} +# define YUV2RGB(uvofs,rgbsz,rofs,gofs,bofs) do { \ + int Y = src[0][y*width+x] * TABLE_SCALE; \ + int U = src[1][(uvofs)]; \ + int V = src[2][(uvofs)]; \ + dest[0][(y*width+x)*rgbsz+rofs] = Ylut[Y+rVlut[V]]; \ + dest[0][(y*width+x)*rgbsz+gofs] = Ylut[Y+gUlut[U]+gVlut[V]];\ + dest[0][(y*width+x)*rgbsz+bofs] = Ylut[Y+bUlut[U]]; \ +} while (0) +# define YUV2RGB_PACKED(yofs,uofs,vofs,rgbsz,rofs,gofs,bofs) do { \ + int Y = src[0][(y*width+x)*2+yofs] * TABLE_SCALE; \ + int U = src[0][(y*width+(x&~1))*2+uofs]; \ + int V = src[0][(y*width+(x&~1))*2+vofs]; \ + dest[0][(y*width+x)*rgbsz+rofs] = Ylut[Y+rVlut[V]]; \ + dest[0][(y*width+x)*rgbsz+gofs] = Ylut[Y+gUlut[U]+gVlut[V]];\ + dest[0][(y*width+x)*rgbsz+bofs] = Ylut[Y+bUlut[U]]; \ +} while (0) +#else /* !USE_LOOKUP_TABLES */ +# define yuv_create_tables() /*nothing*/ +# define YUV2RGB(uvofs,rgbsz,rofs,gofs,bofs) do { \ + int Y = cY * (src[0][y*width+x] - 16); \ + int U = src[1][(uvofs)] - 128; \ + int V = src[2][(uvofs)] - 128; \ + int r = (Y + crV*V + 32768) >> 16; \ + int g = (Y + cgU*U + cgV*V + 32768) >> 16; \ + int b = (Y + cbU*U + 32768) >> 16; \ + dest[0][(y*width+x)*rgbsz+rofs] = r<0 ? 0 : r>255 ? 255 : r;\ + dest[0][(y*width+x)*rgbsz+gofs] = g<0 ? 0 : g>255 ? 255 : g;\ + dest[0][(y*width+x)*rgbsz+bofs] = b<0 ? 0 : b>255 ? 255 : b;\ +} while (0) +# define YUV2RGB_PACKED(yofs,uofs,vofs,rgbsz,rofs,gofs,bofs) do { \ + int Y = cY * (src[0][(y*width+x)*2+yofs] - 16); \ + int U = src[0][(y*width+(x&~1))*2+uofs] - 128; \ + int V = src[0][(y*width+(x&~1))*2+vofs] - 128; \ + int r = (Y + crV*V + 32768) >> 16; \ + int g = (Y + cgU*U + cgV*V + 32768) >> 16; \ + int b = (Y + cbU*U + 32768) >> 16; \ + dest[0][(y*width+x)*rgbsz+rofs] = r<0 ? 0 : r>255 ? 255 : r;\ + dest[0][(y*width+x)*rgbsz+gofs] = g<0 ? 0 : g>255 ? 255 : g;\ + dest[0][(y*width+x)*rgbsz+bofs] = b<0 ? 0 : b>255 ? 255 : b;\ +} while (0) +#endif + +#define YUV2RGB_420P(s,r,g,b) YUV2RGB((y/2)*(width/2)+(x/2),s,r,g,b) +#define YUV2RGB_411P(s,r,g,b) YUV2RGB((y )*(width/4)+(x/4),s,r,g,b) +#define YUV2RGB_422P(s,r,g,b) YUV2RGB((y )*(width/2)+(x/2),s,r,g,b) +#define YUV2RGB_444P(s,r,g,b) YUV2RGB((y )*(width )+(x ),s,r,g,b) +#define YUV2RGB_YUY2(s,r,g,b) YUV2RGB_PACKED(0,1,3, s,r,g,b) +#define YUV2RGB_UYVY(s,r,g,b) YUV2RGB_PACKED(1,0,2, s,r,g,b) +#define YUV2RGB_YVYU(s,r,g,b) YUV2RGB_PACKED(0,3,1, s,r,g,b) + +#define DEFINE_YUV2RGB(name,op) \ +static int name(uint8_t **src, uint8_t **dest, int width, int height) \ +{ \ + int x, y; \ + \ + yuv_create_tables(); \ + for (y = 0; y < height; y++) { \ + for (x = 0; x < width; x++) { \ + op; \ + } \ + } \ + return 1; \ +} + +#define DEFINE_YUV2RGB_SET(rgb,rgbsz,rofs,gofs,bofs) \ + DEFINE_YUV2RGB(yuv420p_##rgb, YUV2RGB_420P(rgbsz,rofs,gofs,bofs)) \ + DEFINE_YUV2RGB(yuv411p_##rgb, YUV2RGB_411P(rgbsz,rofs,gofs,bofs)) \ + DEFINE_YUV2RGB(yuv422p_##rgb, YUV2RGB_422P(rgbsz,rofs,gofs,bofs)) \ + DEFINE_YUV2RGB(yuv444p_##rgb, YUV2RGB_444P(rgbsz,rofs,gofs,bofs)) \ + DEFINE_YUV2RGB(yuy2_##rgb, YUV2RGB_YUY2(rgbsz,rofs,gofs,bofs)) \ + DEFINE_YUV2RGB(uyvy_##rgb, YUV2RGB_UYVY(rgbsz,rofs,gofs,bofs)) \ + DEFINE_YUV2RGB(yvyu_##rgb, YUV2RGB_YVYU(rgbsz,rofs,gofs,bofs)) + +DEFINE_YUV2RGB_SET(rgb24, 3,0,1,2) +DEFINE_YUV2RGB_SET(bgr24, 3,2,1,0) +DEFINE_YUV2RGB_SET(rgba32, 4,0,1,2) +DEFINE_YUV2RGB_SET(abgr32, 4,3,2,1) +DEFINE_YUV2RGB_SET(argb32, 4,1,2,3) +DEFINE_YUV2RGB_SET(bgra32, 4,2,1,0) + +/* Y8->RGB is defined as part of grayscale stuff below */ + +/*************************************************************************/ + +#define RGB2Y() \ + (dest[0][y*width+x] = ((16829*r + 33039*g + 6416*b + 32768) >> 16) + 16) +#define RGB2U(uvofs) \ + (dest[1][(uvofs)] = ((-9714*r - 19070*g + 28784*b + 32768) >> 16) + 128) +#define RGB2V(uvofs) \ + (dest[2][(uvofs)] = ((28784*r - 24103*g - 4681*b + 32768) >> 16) + 128) +#define RGB2Y_PACKED(ofs) \ + (dest[0][(y*width+x)*2+(ofs)] = ((16829*r + 33039*g + 6416*b + 32768) >> 16) + 16) +#define RGB2U_PACKED(ofs) \ + (dest[0][(y*width+x)*2+(ofs)] = ((-9714*r - 19070*g + 28784*b + 32768) >> 16) + 128) +#define RGB2V_PACKED(ofs) \ + (dest[0][(y*width+x)*2+(ofs)] = ((28784*r - 24103*g - 4681*b + 32768) >> 16) + 128) + +#define RGB2YUV(utest,vtest,uvofs) \ + RGB2Y(); if (utest) RGB2U(uvofs); if (vtest) RGB2V(uvofs) +#define RGB2YUV_PACKED(utest,vtest,yofs,uvofs) \ + RGB2Y_PACKED(yofs); \ + if (utest) RGB2U_PACKED(uvofs); \ + if (vtest) RGB2V_PACKED(uvofs) +/* YUV420P: take Cb/Cr from opposite corners */ +#define RGB2YUV_420P RGB2YUV(!((x|y) & 1), (x&y) & 1, (y/2)*(width/2)+(x/2)) +/* YUV411P: take Cb/Cr from points 2 pixels apart */ +#define RGB2YUV_411P RGB2YUV(!(x & 3), !((x^2) & 3), y*(width/4)+(x/4)) +/* YUV422P: take Cb/Cr from adjacent pixels */ +#define RGB2YUV_422P RGB2YUV(!(x & 1), x & 1, y*(width/2)+(x/2)) +/* YUV444P: every pixel is sampled */ +#define RGB2YUV_444P RGB2YUV(1, 1, y*width+x) +/* YUY2/UYVY/YVYU: take Cb/Cr from the corresponding pixel */ +#define RGB2YUV_YUY2 RGB2YUV_PACKED(!(x & 1), x & 1, 0,1) +#define RGB2YUV_UYVY RGB2YUV_PACKED(!(x & 1), x & 1, 1,0) +#define RGB2YUV_YVYU RGB2YUV_PACKED(x & 1, !(x & 1), 0,1) + +#define DEFINE_RGB2YUV(name,rgbsz,rofs,gofs,bofs,op) \ +static int name(uint8_t **src, uint8_t **dest, int width, int height) \ +{ \ + int x, y; \ + \ + for (y = 0; y < height; y++) { \ + for (x = 0; x < width; x++) { \ + int r = src[0][(y*width+x)*rgbsz+rofs]; \ + int g = src[0][(y*width+x)*rgbsz+gofs]; \ + int b = src[0][(y*width+x)*rgbsz+bofs]; \ + op; \ + } \ + } \ + return 1; \ +} + +#define DEFINE_RGB2Y8(name,rgbsz,rofs,gofs,bofs) \ +static int name(uint8_t **src, uint8_t **dest, int width, int height) \ +{ \ + int x, y; \ + \ + for (y = 0; y < height; y++) { \ + for (x = 0; x < width; x++) { \ + int r = src[0][(y*width+x)*rgbsz+rofs]; \ + int g = src[0][(y*width+x)*rgbsz+gofs]; \ + int b = src[0][(y*width+x)*rgbsz+bofs]; \ + RGB2Y(); \ + } \ + } \ + return 1; \ +} + +#define DEFINE_RGB2YUV_SET(rgb,rgbsz,rofs,gofs,bofs) \ + DEFINE_RGB2YUV(rgb##_yuv420p, rgbsz,rofs,gofs,bofs, RGB2YUV_420P) \ + DEFINE_RGB2YUV(rgb##_yuv411p, rgbsz,rofs,gofs,bofs, RGB2YUV_411P) \ + DEFINE_RGB2YUV(rgb##_yuv422p, rgbsz,rofs,gofs,bofs, RGB2YUV_422P) \ + DEFINE_RGB2YUV(rgb##_yuv444p, rgbsz,rofs,gofs,bofs, RGB2YUV_444P) \ + DEFINE_RGB2YUV(rgb##_yuy2, rgbsz,rofs,gofs,bofs, RGB2YUV_YUY2) \ + DEFINE_RGB2YUV(rgb##_uyvy, rgbsz,rofs,gofs,bofs, RGB2YUV_UYVY) \ + DEFINE_RGB2YUV(rgb##_yvyu, rgbsz,rofs,gofs,bofs, RGB2YUV_YVYU) \ + DEFINE_RGB2Y8 (rgb##_y8, rgbsz,rofs,gofs,bofs) + +DEFINE_RGB2YUV_SET(rgb24, 3,0,1,2) +DEFINE_RGB2YUV_SET(bgr24, 3,2,1,0) +DEFINE_RGB2YUV_SET(rgba32, 4,0,1,2) +DEFINE_RGB2YUV_SET(abgr32, 4,3,2,1) +DEFINE_RGB2YUV_SET(argb32, 4,1,2,3) +DEFINE_RGB2YUV_SET(bgra32, 4,2,1,0) + +/*************************************************************************/ + +/* All YUV planar formats convert to grayscale the same way */ + +#ifdef USE_LOOKUP_TABLES +static uint8_t graylut[2][256]; +static int graylut_created = 0; +static void gray8_create_tables(void) +{ + if (!graylut_created) { + int i; + for (i = 0; i < 256; i++) { + if (i <= 16) + graylut[0][i] = 0; + else if (i >= 235) + graylut[0][i] = 255; + else + graylut[0][i] = (i-16) * 255 / 219; + graylut[1][i] = 16 + i*219/255; + } + graylut_created = 1; + } +} +# define Y2GRAY(val) (graylut[0][(val)]) +# define GRAY2Y(val) (graylut[1][(val)]) +#else +# define gray8_create_tables() /*nothing*/ +# define Y2GRAY(val) ((val)<16 ? 0 : (val)>=235 ? 255 : ((val)-16)*256/219) +# define GRAY2Y(val) (16 + (val)*219/255) +#endif + +static int yuvp_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) + dest[0][i] = Y2GRAY(src[0][i]); + return 1; +} + +static int yuy2_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) + dest[0][i] = Y2GRAY(src[0][i*2]); + return 1; +} + +static int uyvy_gray8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) + dest[0][i] = Y2GRAY(src[0][i*2+1]); + return 1; +} + +/*************************************************************************/ + +static int gray8_y8(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) + dest[0][i] = GRAY2Y(src[0][i]); + return 1; +} + +static int gray8_yuv420p(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!ac_imgconvert(src, IMG_GRAY8, dest, IMG_Y8, width, height)) + return 0; + memset(dest[1], 128, (width/2)*(height/2)); + memset(dest[2], 128, (width/2)*(height/2)); + return 1; +} + +static int gray8_yuv411p(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!ac_imgconvert(src, IMG_GRAY8, dest, IMG_Y8, width, height)) + return 0; + memset(dest[1], 128, (width/4)*height); + memset(dest[2], 128, (width/4)*height); + return 1; +} + +static int gray8_yuv422p(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!ac_imgconvert(src, IMG_GRAY8, dest, IMG_Y8, width, height)) + return 0; + memset(dest[1], 128, (width/2)*height); + memset(dest[2], 128, (width/2)*height); + return 1; +} + +static int gray8_yuv444p(uint8_t **src, uint8_t **dest, int width, int height) +{ + if (!ac_imgconvert(src, IMG_GRAY8, dest, IMG_Y8, width, height)) + return 0; + memset(dest[1], 128, width*height); + memset(dest[2], 128, width*height); + return 1; +} + +static int gray8_yuy2(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) { + dest[0][i*2 ] = GRAY2Y(src[0][i]); + dest[0][i*2+1] = 128; + } + return 1; +} + +static int gray8_uyvy(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) { + dest[0][i*2 ] = 128; + dest[0][i*2+1] = GRAY2Y(src[0][i]); + } + return 1; +} + +/*************************************************************************/ + +/* We only need 3 functions for Y8->RGB (no difference between RGB and BGR) */ + +static int y8_rgb24(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) + dest[0][i*3] = dest[0][i*3+1] = dest[0][i*3+2] = Y2GRAY(src[0][i]); + return 1; +} + +static int y8_rgba32(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) + dest[0][i*4] = dest[0][i*4+1] = dest[0][i*4+2] = Y2GRAY(src[0][i]); + return 1; +} + +static int y8_argb32(uint8_t **src, uint8_t **dest, int width, int height) +{ + int i; + gray8_create_tables(); + for (i = 0; i < width*height; i++) + dest[0][i*4+1] = dest[0][i*4+2] = dest[0][i*4+3] = Y2GRAY(src[0][i]); + return 1; +} + +/*************************************************************************/ +/*************************************************************************/ + +/* Accelerated versions of colorspace routines. */ + +/* Common constant values used in routines: */ + +#if defined(HAVE_ASM_MMX) + +#include "img_x86_common.h" + +static const struct { uint16_t n[72]; } __attribute__((aligned(16))) yuv_data = {{ + 0x00FF,0x00FF,0x00FF,0x00FF,0x00FF,0x00FF,0x00FF,0x00FF, /* for odd/even */ + 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010, /* for Y -16 */ + 0x0080,0x0080,0x0080,0x0080,0x0080,0x0080,0x0080,0x0080, /* for U/V -128 */ + 0x2543,0x2543,0x2543,0x2543,0x2543,0x2543,0x2543,0x2543, /* Y constant */ + 0x3313,0x3313,0x3313,0x3313,0x3313,0x3313,0x3313,0x3313, /* rV constant */ + 0xF377,0xF377,0xF377,0xF377,0xF377,0xF377,0xF377,0xF377, /* gU constant */ + 0xE5FC,0xE5FC,0xE5FC,0xE5FC,0xE5FC,0xE5FC,0xE5FC,0xE5FC, /* gV constant */ + 0x408D,0x408D,0x408D,0x408D,0x408D,0x408D,0x408D,0x408D, /* bU constant */ + 0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008, /* for rounding */ +}}; +/* Note that G->Y exceeds 0x7FFF, so be careful to treat it as unsigned + * (the rest of the values are signed) */ +static const struct { uint16_t n[96]; } __attribute__((aligned(16))) rgb_data = {{ + 0x41BD,0x41BD,0x41BD,0x41BD,0x41BD,0x41BD,0x41BD,0x41BD, /* R->Y */ + 0x810F,0x810F,0x810F,0x810F,0x810F,0x810F,0x810F,0x810F, /* G->Y */ + 0x1910,0x1910,0x1910,0x1910,0x1910,0x1910,0x1910,0x1910, /* B->Y */ + 0xDA0E,0xDA0E,0xDA0E,0xDA0E,0xDA0E,0xDA0E,0xDA0E,0xDA0E, /* R->U */ + 0xB582,0xB582,0xB582,0xB582,0xB582,0xB582,0xB582,0xB582, /* G->U */ + 0x7070,0x7070,0x7070,0x7070,0x7070,0x7070,0x7070,0x7070, /* B->U */ + 0x7070,0x7070,0x7070,0x7070,0x7070,0x7070,0x7070,0x7070, /* R->V */ + 0xA1D9,0xA1D9,0xA1D9,0xA1D9,0xA1D9,0xA1D9,0xA1D9,0xA1D9, /* G->V */ + 0xEDB7,0xEDB7,0xEDB7,0xEDB7,0xEDB7,0xEDB7,0xEDB7,0xEDB7, /* B->V */ + 0x0420,0x0420,0x0420,0x0420,0x0420,0x0420,0x0420,0x0420, /* Y +16.5 */ + 0x2020,0x2020,0x2020,0x2020,0x2020,0x2020,0x2020,0x2020, /* U/V +128.5 */ + 0x00FF,0x00FF,0x00FF,0x00FF,0x00FF,0x00FF,0x00FF,0x00FF, /* for odd/even */ +}}; +#define Y_GRAY 0x4A85 +#define GRAY_Y 0x36F7 +static const struct { uint16_t n[32]; } __attribute__((aligned(16))) gray_data = {{ + Y_GRAY,Y_GRAY,Y_GRAY,Y_GRAY,Y_GRAY,Y_GRAY,Y_GRAY,Y_GRAY, /* 255/219 */ + GRAY_Y,GRAY_Y,GRAY_Y,GRAY_Y,GRAY_Y,GRAY_Y,GRAY_Y,GRAY_Y, /* 219/255 */ + 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010, /* Y +/-16 */ + 0x00FF,0xFF00,0x0000,0x00FF,0xFF00,0x0000,0x0000,0x0000, /* for Y->RGB */ +}}; + +/* Convert 4 RGB32 pixels in EAX/EBX/ECX/EDX to RGB24 in EAX/EBX/ECX */ +#define IA32_RGB32_TO_RGB24 \ + "movl %%ebx, %%esi # ESI: 00 B1 G1 R1 \n\ + shll $24, %%esi # ESI: R1 00 00 00 \n\ + shrl $8, %%ebx # EBX: 00 00 B1 G1 \n\ + orl %%esi, %%eax # EAX: R1 B0 G0 R0 \n\ + movl %%ecx, %%esi # ESI: 00 B2 G2 R2 \n\ + shll $16, %%esi # ESI: G2 R2 00 00 \n\ + shrl $16, %%ecx # ECX: 00 00 00 B2 \n\ + shll $8, %%edx # EDX: B3 G3 R3 00 \n\ + orl %%esi, %%ebx # EBX: G2 R2 B1 G1 \n\ + orl %%edx, %%ecx # ECX: B3 G3 R3 B2 \n" + +/* Convert 4 RGB24 pixels in EAX/EBX/ECX to RGB32 in EAX/EBX/ECX/EDX */ +#define IA32_RGB24_TO_RGB32 \ + "movl %%ecx, %%edx # EDX: B3 G3 R3 B2 \n\ + shrl $8, %%edx # EDX: 00 B3 G3 R3 \n\ + andl $0xFF, %%ecx # ECX: 00 00 00 B2 \n\ + movl %%ebx, %%edi # EDI: G2 R2 B1 G1 \n\ + andl $0xFFFF0000, %%edi # EDI: G2 R2 00 00 \n\ + orl %%edi, %%ecx # ECX: G2 R2 00 B2 \n\ + rorl $16, %%ecx # ECX: 00 B2 G2 R2 \n\ + movl %%eax, %%edi # EDI: R1 B0 G0 R0 \n\ + andl $0xFF000000, %%edi # EDI: R1 00 00 00 \n\ + andl $0x0000FFFF, %%ebx # EBX: 00 00 B1 G1 \n\ + orl %%edi, %%ebx # EBX: R1 00 B1 G1 \n\ + roll $8, %%ebx # EBX: 00 B1 G1 R1 \n\ + andl $0x00FFFFFF, %%eax # EAX: 00 B0 G0 R0 \n" + +#endif /* HAVE_ASM_MMX */ + +/*************************************************************************/ +/*************************************************************************/ + +/* MMX routines */ + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) /* i.e. not x86_64 */ + +static inline void mmx_yuv42Xp_to_rgb(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV); +#define mmx_yuv420p_to_rgb mmx_yuv42Xp_to_rgb +#define mmx_yuv422p_to_rgb mmx_yuv42Xp_to_rgb +static inline void mmx_store_rgb24(uint8_t *dest); +static inline void mmx_store_bgr24(uint8_t *dest); +static inline void mmx_store_rgba32(uint8_t *dest); +static inline void mmx_store_abgr32(uint8_t *dest); +static inline void mmx_store_argb32(uint8_t *dest); +static inline void mmx_store_bgra32(uint8_t *dest); + +#define DEFINE_YUV2RGB_MMX(yuv,rgb,uvofs,rgbsz,rofs,gofs,bofs) \ +static int yuv##_##rgb##_mmx(uint8_t **src, uint8_t **dest, \ + int width, int height) \ +{ \ + int x, y; \ + \ + yuv_create_tables(); \ + for (y = 0; y < height; y++) { \ + for (x = 0; x < (width & ~7); x += 8) { \ + mmx_##yuv##_to_rgb(src[0]+y*width+x, \ + src[1]+(uvofs), src[2]+(uvofs)); \ + mmx_store_##rgb(dest[0]+(y*width+x)*rgbsz); \ + } \ + while (x < width) { \ + YUV2RGB(uvofs,rgbsz,rofs,gofs,bofs); \ + x++; \ + } \ + } \ + asm("emms"); \ + return 1; \ +} + +#define DEFINE_YUV2RGB_MMX_SET(rgb,rgbsz,rofs,gofs,bofs) \ + DEFINE_YUV2RGB_MMX(yuv420p,rgb,(y/2)*(width/2)+(x/2),rgbsz,rofs,gofs,bofs)\ + DEFINE_YUV2RGB_MMX(yuv422p,rgb,(y )*(width/2)+(x/2),rgbsz,rofs,gofs,bofs) + +DEFINE_YUV2RGB_MMX_SET(rgb24, 3,0,1,2) +DEFINE_YUV2RGB_MMX_SET(bgr24, 3,2,1,0) +DEFINE_YUV2RGB_MMX_SET(rgba32, 4,0,1,2) +DEFINE_YUV2RGB_MMX_SET(abgr32, 4,3,2,1) +DEFINE_YUV2RGB_MMX_SET(argb32, 4,1,2,3) +DEFINE_YUV2RGB_MMX_SET(bgra32, 4,2,1,0) + +/************************************/ + +static inline void mmx_yuv42Xp_to_rgb(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV) +{ + asm("\ + # Load data, bias and expand to 16 bits \n\ + pxor %%mm4, %%mm4 # MM4: 00 00 00 00 00 00 00 00 \n\ + movq ("EAX"), %%mm6 # MM6: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + movd ("ECX"), %%mm2 # MM2: U3 U2 U1 U0 \n\ + movd ("EDX"), %%mm3 # MM3: V3 V2 V1 V0 \n\ + movq %%mm6, %%mm7 # MM7: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + pand ("ESI"), %%mm6 # MM6: -Y6- -Y4- -Y2- -Y0- \n\ + psrlw $8, %%mm7 # MM7: -Y7- -Y5- -Y3- -Y1- \n\ + punpcklbw %%mm4, %%mm2 # MM2: -U3- -U2- -U1- -U0- \n\ + punpcklbw %%mm4, %%mm3 # MM3: -V3- -V2- -V1- -V0- \n\ + psubw 16("ESI"), %%mm6 # MM6: subtract 16 \n\ + psubw 16("ESI"), %%mm7 # MM7: subtract 16 \n\ + psubw 32("ESI"), %%mm2 # MM2: subtract 128 \n\ + psubw 32("ESI"), %%mm3 # MM3: subtract 128 \n\ + psllw $7, %%mm6 # MM6: convert to fixed point 8.7 \n\ + psllw $7, %%mm7 # MM7: convert to fixed point 8.7 \n\ + psllw $7, %%mm2 # MM2: convert to fixed point 8.7 \n\ + psllw $7, %%mm3 # MM3: convert to fixed point 8.7 \n\ + # Multiply by constants \n\ + pmulhw 48("ESI"), %%mm6 # MM6: -cY6- -cY4- -cY2- -cY0- \n\ + pmulhw 48("ESI"), %%mm7 # MM6: -cY7- -cY5- -cY3- -cY1- \n\ + movq 80("ESI"), %%mm4 # MM4: gU constant \n\ + movq 96("ESI"), %%mm5 # MM5: gV constant \n\ + pmulhw %%mm2, %%mm4 # MM4: -gU3- -gU2- -gU1- -gU0- \n\ + pmulhw %%mm3, %%mm5 # MM5: -gV3- -gV2- -gV1- -gV0- \n\ + paddw %%mm5, %%mm4 # MM4: -g3- -g2- -g1- -g0- \n\ + pmulhw 64("ESI"), %%mm3 # MM3: -r3- -r2- -r1- -r0- \n\ + pmulhw 112("ESI"),%%mm2 # MM2: -b3- -b2- -b1- -b0- \n\ + movq %%mm3, %%mm0 # MM0: -r3- -r2- -r1- -r0- \n\ + movq %%mm4, %%mm1 # MM1: -g3- -g2- -g1- -g0- \n\ + movq %%mm2, %%mm5 # MM5: -b3- -b2- -b1- -b0- \n\ + # Add intermediate results and round/shift to get R/G/B values \n\ + paddw 128("ESI"), %%mm6 # Add rounding value (0.5 @ 8.4 fixed) \n\ + paddw 128("ESI"), %%mm7 \n\ + paddw %%mm6, %%mm0 # MM0: -R6- -R4- -R2- -R0- \n\ + psraw $4, %%mm0 # Shift back to 8.0 fixed \n\ + paddw %%mm6, %%mm1 # MM1: -G6- -G4- -G2- -G0- \n\ + psraw $4, %%mm1 \n\ + paddw %%mm6, %%mm2 # MM2: -B6- -B4- -B2- -B0- \n\ + psraw $4, %%mm2 \n\ + paddw %%mm7, %%mm3 # MM3: -R7- -R5- -R3- -R1- \n\ + psraw $4, %%mm3 \n\ + paddw %%mm7, %%mm4 # MM4: -G7- -G5- -G3- -G1- \n\ + psraw $4, %%mm4 \n\ + paddw %%mm7, %%mm5 # MM5: -B7- -B5- -B3- -B1- \n\ + psraw $4, %%mm5 \n\ + # Saturate to 0-255 and pack into bytes \n\ + packuswb %%mm0, %%mm0 # MM0: R6 R4 R2 R0 R6 R4 R2 R0 \n\ + packuswb %%mm1, %%mm1 # MM1: G6 G4 G2 G0 G6 G4 G2 G0 \n\ + packuswb %%mm2, %%mm2 # MM2: B6 B4 B2 B0 B6 B4 B2 B0 \n\ + packuswb %%mm3, %%mm3 # MM3: R7 R5 R3 R1 R7 R5 R3 R1 \n\ + packuswb %%mm4, %%mm4 # MM4: G7 G5 G3 G1 G7 G5 G3 G1 \n\ + packuswb %%mm5, %%mm5 # MM5: B7 B5 B3 B1 B7 B5 B3 B1 \n\ + punpcklbw %%mm3, %%mm0 # MM0: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + punpcklbw %%mm4, %%mm1 # MM1: G7 G6 G5 G4 G3 G2 G1 G0 \n\ + punpcklbw %%mm5, %%mm2 # MM2: B7 B6 B5 B4 B3 B2 B1 B0 \n" + : /* no outputs */ + : "a" (srcY), "c" (srcU), "d" (srcV), "S" (&yuv_data), "m" (yuv_data) + ); +} + +/************************************/ + +/* Convert YUV->RGB output to RGBA pixels in MM0..MM3 */ +#define MMX_RGB_TO_RGBA "\ + pxor %%mm7, %%mm7 # MM7: 00 00 00 00 00 00 00 00 \n\ + movq %%mm0, %%mm3 # MM3: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + movq %%mm1, %%mm4 # MM4: G7 G6 G5 G4 G3 G2 G1 G0 \n\ + movq %%mm2, %%mm5 # MM5: B7 B6 B5 B4 B3 B2 B1 B0 \n\ + punpcklbw %%mm1, %%mm0 # MM0: G3 R3 G2 R2 G1 R1 G0 R0 \n\ + punpcklbw %%mm7, %%mm2 # MM2: 00 B3 00 B2 00 B1 00 B0 \n\ + movq %%mm0, %%mm1 # MM1: G3 R3 G2 R2 G1 R1 G0 R0 \n\ + punpcklwd %%mm2, %%mm0 # MM0: 00 B1 G1 R1 00 B0 G0 R0 \n\ + punpckhwd %%mm2, %%mm1 # MM1: 00 B3 G3 R3 00 B2 G2 R2 \n\ + punpckhbw %%mm4, %%mm3 # MM3: G7 R7 G6 R6 G5 R5 G4 R4 \n\ + punpckhbw %%mm7, %%mm5 # MM5: 00 B7 00 B6 00 B5 00 B4 \n\ + movq %%mm3, %%mm2 # MM2: G7 R7 G6 R6 G5 R5 G4 R4 \n\ + punpckhwd %%mm5, %%mm3 # MM3: 00 B7 G7 R7 00 B6 G6 R6 \n\ + punpcklwd %%mm5, %%mm2 # MM2: 00 B5 G5 R5 00 B4 G4 R4 \n" + +/* Convert YUV->RGB output to BGRA pixels in MM0..MM3 */ +#define MMX_RGB_TO_BGRA "\ + pxor %%mm7, %%mm7 # MM7: 00 00 00 00 00 00 00 00 \n\ + movq %%mm0, %%mm5 # MM5: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + movq %%mm1, %%mm4 # MM4: G7 G6 G5 G4 G3 G2 G1 G0 \n\ + movq %%mm2, %%mm3 # MM3: B7 B6 B5 B4 B3 B2 B1 B0 \n\ + punpcklbw %%mm1, %%mm2 # MM2: G3 B3 G2 B2 G1 B1 G0 B0 \n\ + punpcklbw %%mm7, %%mm0 # MM0: 00 R3 00 R2 00 R1 00 R0 \n\ + movq %%mm2, %%mm1 # MM1: G3 B3 G2 B2 G1 B1 G0 B0 \n\ + punpcklwd %%mm0, %%mm2 # MM2: 00 R1 G1 B1 00 R0 G0 B0 \n\ + punpckhwd %%mm0, %%mm1 # MM1: 00 R3 G3 B3 00 R2 G2 B2 \n\ + movq %%mm2, %%mm0 # MM0: 00 R1 G1 B1 00 R0 G0 B0 \n\ + punpckhbw %%mm4, %%mm3 # MM3: G7 B7 G6 B6 G5 B5 G4 B4 \n\ + punpckhbw %%mm7, %%mm5 # MM5: 00 R7 00 R6 00 R5 00 R4 \n\ + movq %%mm3, %%mm2 # MM2: G7 B7 G6 B6 G5 B5 G4 B4 \n\ + punpckhwd %%mm5, %%mm3 # MM3: 00 R7 G7 B7 00 R6 G6 B6 \n\ + punpcklwd %%mm5, %%mm2 # MM2: 00 R5 G5 B5 00 R4 G4 B4 \n" + + +static inline void mmx_store_rgb24(uint8_t *dest) +{ + /* It looks like it's fastest to go to RGB32 first, then shift the + * result to merge the 24-bit pixels together. */ + asm(MMX_RGB_TO_RGBA "\ + movq %%mm0, %%mm4 # MM4: 00 B1 G1 R1 00 B0 G0 R0 \n\ + movq %%mm1, %%mm5 # MM5: 00 B3 G3 R3 00 B2 G2 R2 \n\ + movq %%mm2, %%mm6 # MM6: 00 B5 G5 R5 00 B4 G4 R4 \n\ + movq %%mm3, %%mm7 # MM7: 00 B7 G7 R7 00 B6 G6 R6 \n\ + psrlq $32, %%mm4 # MM4: 00 00 00 00 00 B1 G1 R1 \n\ + psrlq $32, %%mm5 # MM5: 00 00 00 00 00 B3 G3 R3 \n\ + psrlq $32, %%mm6 # MM6: 00 00 00 00 00 B5 G5 R5 \n\ + psrlq $32, %%mm7 # MM7: 00 00 00 00 00 B7 G7 R7 \n\ + push "EBX" \n\ + movd %%mm0, %%eax # EAX: 00 B0 G0 R0 \n\ + movd %%mm4, %%ebx # EBX: 00 B1 G1 R1 \n\ + movd %%mm1, %%ecx # ECX: 00 B2 G2 R2 \n\ + movd %%mm5, %%edx # EDX: 00 B3 G3 R3 \n\ + "IA32_RGB32_TO_RGB24" \n\ + movl %%eax, ("EDI") \n\ + movl %%ebx, 4("EDI") \n\ + movl %%ecx, 8("EDI") \n\ + movd %%mm2, %%eax # EAX: 00 B4 G4 R4 \n\ + movd %%mm6, %%ebx # EBX: 00 B5 G5 R5 \n\ + movd %%mm3, %%ecx # ECX: 00 B6 G6 R6 \n\ + movd %%mm7, %%edx # EDX: 00 B7 G7 R7 \n\ + "IA32_RGB32_TO_RGB24" \n\ + movl %%eax, 12("EDI") \n\ + movl %%ebx, 16("EDI") \n\ + movl %%ecx, 20("EDI") \n\ + pop "EBX" \n" + : /* no outputs */ + : "D" (dest) + : "eax", "ecx", "edx", "esi" + ); +} + +static inline void mmx_store_bgr24(uint8_t *dest) +{ + asm(MMX_RGB_TO_BGRA "\ + movq %%mm0, %%mm4 # MM4: 00 B1 G1 R1 00 B0 G0 R0 \n\ + movq %%mm1, %%mm5 # MM5: 00 B3 G3 R3 00 B2 G2 R2 \n\ + movq %%mm2, %%mm6 # MM6: 00 B5 G5 R5 00 B4 G4 R4 \n\ + movq %%mm3, %%mm7 # MM7: 00 B7 G7 R7 00 B6 G6 R6 \n\ + psrlq $32, %%mm4 # MM4: 00 00 00 00 00 B1 G1 R1 \n\ + psrlq $32, %%mm5 # MM5: 00 00 00 00 00 B3 G3 R3 \n\ + psrlq $32, %%mm6 # MM6: 00 00 00 00 00 B5 G5 R5 \n\ + psrlq $32, %%mm7 # MM7: 00 00 00 00 00 B7 G7 R7 \n\ + push "EBX" \n\ + movd %%mm0, %%eax # EAX: 00 B0 G0 R0 \n\ + movd %%mm4, %%ebx # EBX: 00 B1 G1 R1 \n\ + movd %%mm1, %%ecx # ECX: 00 B2 G2 R2 \n\ + movd %%mm5, %%edx # EDX: 00 B3 G3 R3 \n\ + "IA32_RGB32_TO_RGB24" \n\ + movl %%eax, ("EDI") \n\ + movl %%ebx, 4("EDI") \n\ + movl %%ecx, 8("EDI") \n\ + movd %%mm2, %%eax # EAX: 00 B4 G4 R4 \n\ + movd %%mm6, %%ebx # EBX: 00 B5 G5 R5 \n\ + movd %%mm3, %%ecx # ECX: 00 B6 G6 R6 \n\ + movd %%mm7, %%edx # EDX: 00 B7 G7 R7 \n\ + "IA32_RGB32_TO_RGB24" \n\ + movl %%eax, 12("EDI") \n\ + movl %%ebx, 16("EDI") \n\ + movl %%ecx, 20("EDI") \n\ + pop "EBX" \n" + : /* no outputs */ + : "D" (dest) + : "eax", "ecx", "edx", "esi" + ); +} + +static inline void mmx_store_rgba32(uint8_t *dest) +{ + asm(MMX_RGB_TO_RGBA "\ + movq %%mm0, ("EDI") \n\ + movq %%mm1, 8("EDI") \n\ + movq %%mm2, 16("EDI") \n\ + movq %%mm3, 24("EDI") \n" + : /* no outputs */ + : "D" (dest) + ); +} + +static inline void mmx_store_abgr32(uint8_t *dest) +{ + asm(MMX_RGB_TO_BGRA "\ + psllq $8, %%mm0 \n\ + psllq $8, %%mm1 \n\ + psllq $8, %%mm2 \n\ + psllq $8, %%mm3 \n\ + movq %%mm0, ("EDI") \n\ + movq %%mm1, 8("EDI") \n\ + movq %%mm2, 16("EDI") \n\ + movq %%mm3, 24("EDI") \n" + : /* no outputs */ + : "D" (dest) + ); +} + +static inline void mmx_store_argb32(uint8_t *dest) +{ + asm(MMX_RGB_TO_RGBA "\ + psllq $8, %%mm0 \n\ + psllq $8, %%mm1 \n\ + psllq $8, %%mm2 \n\ + psllq $8, %%mm3 \n\ + movq %%mm0, ("EDI") \n\ + movq %%mm1, 8("EDI") \n\ + movq %%mm2, 16("EDI") \n\ + movq %%mm3, 24("EDI") \n" + : /* no outputs */ + : "D" (dest) + ); +} + +static inline void mmx_store_bgra32(uint8_t *dest) +{ + asm(MMX_RGB_TO_BGRA "\ + movq %%mm0, ("EDI") \n\ + movq %%mm1, 8("EDI") \n\ + movq %%mm2, 16("EDI") \n\ + movq %%mm3, 24("EDI") \n" + : /* no outputs */ + : "D" (dest) + ); +} + +#endif /* HAVE_ASM_MMX && ARCH_X86 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* SSE2 routines */ + +#if defined(HAVE_ASM_SSE2) + +/*************************************************************************/ + +static inline void sse2_load_yuv420p(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width); +static inline void sse2_load_yuv411p(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width); +static inline void sse2_load_yuv422p(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width); +static inline void sse2_load_yuv444p(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width); +static inline void sse2_load_yuy2(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width); +static inline void sse2_load_uyvy(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width); +static inline void sse2_load_yvyu(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width); +static inline void sse2_yuv_to_rgb(void); +static inline void sse2_yuv444_to_rgb(void); +static inline void sse2_store_rgb24(uint8_t *dest); +static inline void sse2_store_bgr24(uint8_t *dest); +static inline void sse2_store_rgba32(uint8_t *dest); +static inline void sse2_store_abgr32(uint8_t *dest); +static inline void sse2_store_argb32(uint8_t *dest); +static inline void sse2_store_bgra32(uint8_t *dest); + +#define DEFINE_YUV2RGB_SSE2(yuv,y2r,rgb,rgbsz,slowop) \ +static int yuv##_##rgb##_sse2(uint8_t **src, uint8_t **dest, \ + int width, int height) \ +{ \ + int x, y; \ + \ + yuv_create_tables(); \ + for (y = 0; y < height; y++) { \ + for (x = 0; x < (width & ~15); x += 16) { \ + sse2_load_##yuv(src[0], src[1], src[2], x, y, width); \ + sse2_##y2r(); \ + sse2_store_##rgb(dest[0] + (y*width+x)*rgbsz); \ + } \ + while (x < width) { \ + slowop; \ + x++; \ + } \ + } \ + asm("emms"); \ + return 1; \ +} + +#define DEFINE_YUV2RGB_SSE2_SET(rgb,sz,r,g,b) \ + DEFINE_YUV2RGB_SSE2(yuv420p, yuv_to_rgb, rgb,sz, YUV2RGB_420P(sz,r,g,b))\ + DEFINE_YUV2RGB_SSE2(yuv411p, yuv_to_rgb, rgb,sz, YUV2RGB_411P(sz,r,g,b))\ + DEFINE_YUV2RGB_SSE2(yuv422p, yuv_to_rgb, rgb,sz, YUV2RGB_422P(sz,r,g,b))\ + DEFINE_YUV2RGB_SSE2(yuv444p, yuv444_to_rgb,rgb,sz, YUV2RGB_444P(sz,r,g,b))\ + DEFINE_YUV2RGB_SSE2(yuy2, yuv_to_rgb, rgb,sz, YUV2RGB_YUY2(sz,r,g,b))\ + DEFINE_YUV2RGB_SSE2(uyvy, yuv_to_rgb, rgb,sz, YUV2RGB_UYVY(sz,r,g,b))\ + DEFINE_YUV2RGB_SSE2(yvyu, yuv_to_rgb, rgb,sz, YUV2RGB_YVYU(sz,r,g,b)) + +DEFINE_YUV2RGB_SSE2_SET(rgb24, 3,0,1,2) +DEFINE_YUV2RGB_SSE2_SET(bgr24, 3,2,1,0) +DEFINE_YUV2RGB_SSE2_SET(rgba32, 4,0,1,2) +DEFINE_YUV2RGB_SSE2_SET(abgr32, 4,3,2,1) +DEFINE_YUV2RGB_SSE2_SET(argb32, 4,1,2,3) +DEFINE_YUV2RGB_SSE2_SET(bgra32, 4,2,1,0) + +/************************************/ + +static inline void sse2_load_yuv420p(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width) +{ + srcY += y*width+x; + srcU += (y/2)*(width/2)+(x/2); + srcV += (y/2)*(width/2)+(x/2); + asm("\ + # Load data, bias and expand to 16 bits \n\ + pxor %%xmm4, %%xmm4 # XMM4: 00 00 00 00 00 00 00 00 \n\ + movdqu ("EAX"), %%xmm6 # XMM6: YF...................Y0 \n\ + movq ("ECX"), %%xmm2 # XMM2: U7.......U0 \n\ + movq ("EDX"), %%xmm3 # XMM3: V7.......V0 \n\ + movdqa %%xmm6, %%xmm7 # XMM7: YF...................Y0 \n\ + pand ("ESI"), %%xmm6 # XMM6: YE YC YA Y8 Y6 Y4 Y2 Y0 \n\ + psrlw $8, %%xmm7 # XMM7: YF YD YB Y9 Y7 Y5 Y3 Y1 \n\ + punpcklbw %%xmm4,%%xmm2 # XMM2: U7 U6 U5 U4 U3 U2 U1 U0 \n\ + punpcklbw %%xmm4,%%xmm3 # XMM3: V7 V6 V5 V4 V3 V2 V1 V0 \n" + : /* no outputs */ + : "a" (srcY), "c" (srcU), "d" (srcV), "S" (&yuv_data), "m" (yuv_data) + ); +} + +static inline void sse2_load_yuv411p(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width) +{ + srcY += y*width+x; + srcU += y*(width/4)+(x/4); + srcV += y*(width/4)+(x/4); + asm("\ + # Load data, bias and expand to 16 bits \n\ + pxor %%xmm4, %%xmm4 # XMM4: 00 00 00 00 00 00 00 00 \n\ + movdqu ("EAX"), %%xmm6 # XMM6: YF...................Y0 \n\ + movd ("ECX"), %%xmm2 # XMM2: U3.U0 \n\ + punpcklbw %%xmm2,%%xmm2 # XMM2: U3 U3.U0 U0 \n\ + movd ("EDX"), %%xmm3 # XMM3: V3.V0 \n\ + punpcklbw %%xmm3,%%xmm3 # XMM2: V3 V3.V0 V0 \n\ + movdqa %%xmm6, %%xmm7 # XMM7: YF...................Y0 \n\ + pand ("ESI"), %%xmm6 # XMM6: YE YC YA Y8 Y6 Y4 Y2 Y0 \n\ + psrlw $8, %%xmm7 # XMM7: YF YD YB Y9 Y7 Y5 Y3 Y1 \n\ + punpcklbw %%xmm4,%%xmm2 # XMM2: U3 U3 U2 U2 U1 U1 U0 U0 \n\ + punpcklbw %%xmm4,%%xmm3 # XMM3: V3 V3 V2 V2 V1 V1 V0 V0 \n" + : /* no outputs */ + : "a" (srcY), "c" (srcU), "d" (srcV), "S" (&yuv_data), "m" (yuv_data) + ); +} + +static inline void sse2_load_yuv422p(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width) +{ + srcY += y*width+x; + srcU += y*(width/2)+(x/2); + srcV += y*(width/2)+(x/2); + asm("\ + # Load data, bias and expand to 16 bits \n\ + pxor %%xmm4, %%xmm4 # XMM4: 00 00 00 00 00 00 00 00 \n\ + movdqu ("EAX"), %%xmm6 # XMM6: YF...................Y0 \n\ + movq ("ECX"), %%xmm2 # XMM2: U7.......U0 \n\ + movq ("EDX"), %%xmm3 # XMM3: V7.......V0 \n\ + movdqa %%xmm6, %%xmm7 # XMM7: YF...................Y0 \n\ + pand ("ESI"), %%xmm6 # XMM6: YE YC YA Y8 Y6 Y4 Y2 Y0 \n\ + psrlw $8, %%xmm7 # XMM7: YF YD YB Y9 Y7 Y5 Y3 Y1 \n\ + punpcklbw %%xmm4,%%xmm2 # XMM2: U7 U6 U5 U4 U3 U2 U1 U0 \n\ + punpcklbw %%xmm4,%%xmm3 # XMM3: V7 V6 V5 V4 V3 V2 V1 V0 \n" + : /* no outputs */ + : "a" (srcY), "c" (srcU), "d" (srcV), "S" (&yuv_data), "m" (yuv_data) + ); +} + +static inline void sse2_load_yuv444p(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width) +{ + srcY += y*width+x; + srcU += y*width+x; + srcV += y*width+x; + asm("\ + # Load data, bias and expand to 16 bits \n\ + pxor %%xmm4, %%xmm4 # XMM4: 00 00 00 00 00 00 00 00 \n\ + movdqu ("EAX"), %%xmm6 # XMM6: YF...................Y0 \n\ + movdqu ("ECX"), %%xmm2 # XMM2: UF...................U0 \n\ + movdqu ("EDX"), %%xmm0 # XMM0: VF...................V0 \n\ + movdqa %%xmm6, %%xmm7 # XMM7: YF...................Y0 \n\ + punpcklbw %%xmm4,%%xmm6 # XMM6: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + punpckhbw %%xmm4,%%xmm7 # XMM7: YF YE YD YC YB YA Y9 Y8 \n\ + movdqa %%xmm2, %%xmm5 # XMM5: UF...................U0 \n\ + punpcklbw %%xmm4,%%xmm2 # XMM2: U7 U6 U5 U4 U3 U2 U1 U0 \n\ + punpckhbw %%xmm4,%%xmm5 # XMM5: UF UE UD UC UB UA U9 U8 \n\ + movdqa %%xmm0, %%xmm3 # XMM3: VF...................V0 \n\ + punpcklbw %%xmm4,%%xmm0 # XMM0: V7 V6 V5 V4 V3 V2 V1 V0 \n\ + punpckhbw %%xmm4,%%xmm3 # XMM3: VF VE VD VC VB VA V9 V8 \n" + : /* no outputs */ + : "a" (srcY), "c" (srcU), "d" (srcV), "S" (&yuv_data), "m" (yuv_data) + ); +} + +static inline void sse2_load_yuy2(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width) +{ + srcY += (y*width+x)*2; + asm("\ + # Load data, bias and expand to 16 bits \n\ + pxor %%xmm4, %%xmm4 # XMM4: 00 00 00 00 00 00 00 00 \n\ + movdqu ("EAX"), %%xmm6 # XMM6: V3 Y7.............U0 Y0 \n\ + movdqu 16("EAX"),%%xmm7 # XMM7: V7 YF.............U4 Y8 \n\ + movdqa %%xmm6, %%xmm2 # XMM2: V3 Y7.............U0 Y0 \n\ + psrlw $8, %%xmm2 # XMM2: V3 U3 V2 U2 V1 U1 V0 U0 \n\ + pand ("ESI"), %%xmm6 # XMM6: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + movdqa %%xmm7, %%xmm3 # XMM3: V7 YF.............U4 Y8 \n\ + psrlw $8, %%xmm3 # XMM3: V7 U7 V6 U6 V5 U5 V4 U4 \n\ + pand ("ESI"), %%xmm7 # XMM6: YF YE YD YC YB YA Y9 Y8 \n\ + packuswb %%xmm3, %%xmm2 # XMM2: V7 U7.............V0 U0 \n\ + movdqa %%xmm2, %%xmm3 # XMM3: V7 U7.............V0 U0 \n\ + pand ("ESI"), %%xmm2 # XMM2: U7 U6 U5 U4 U3 U2 U1 U0 \n\ + psrlw $8, %%xmm3 # XMM3: V7 V6 V5 V4 V3 V2 V1 V0 \n\ + packuswb %%xmm7, %%xmm6 # XMM6: YF...................Y0 \n\ + movdqa %%xmm6, %%xmm7 # XMM7: YF...................Y0 \n\ + pand ("ESI"), %%xmm6 # XMM6: YE YC YA Y8 Y6 Y4 Y2 Y0 \n\ + psrlw $8, %%xmm7 # XMM7: YF YD YB Y9 Y7 Y5 Y3 Y1 \n" + : /* no outputs */ + : "a" (srcY), "S" (&yuv_data), "m" (yuv_data) + ); +} + +static inline void sse2_load_uyvy(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width) +{ + srcY += (y*width+x)*2; + asm("\ + # Load data, bias and expand to 16 bits \n\ + pxor %%xmm4, %%xmm4 # XMM4: 00 00 00 00 00 00 00 00 \n\ + movdqu ("EAX"), %%xmm6 # XMM6: Y7 V3.............Y0 00 \n\ + movdqu 16("EAX"),%%xmm7 # XMM7: YF V7.............Y8 U4 \n\ + movdqa %%xmm6, %%xmm2 # XMM2: Y7 V3.............Y0 U0 \n\ + pand ("ESI"), %%xmm2 # XMM2: V3 U3 V2 U2 V1 U1 V0 U0 \n\ + psrlw $8, %%xmm6 # XMM6: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + movdqa %%xmm7, %%xmm3 # XMM3: YF V7.............Y8 U4 \n\ + pand ("ESI"), %%xmm3 # XMM3: V7 U7 V6 U6 V5 U5 V4 U4 \n\ + psrlw $8, %%xmm7 # XMM6: YF YE YD YC YB YA Y9 Y8 \n\ + packuswb %%xmm3, %%xmm2 # XMM2: V7 U7.............V0 U0 \n\ + movdqa %%xmm2, %%xmm3 # XMM3: V7 U7.............V0 U0 \n\ + pand ("ESI"), %%xmm2 # XMM2: U7 U6 U5 U4 U3 U2 U1 U0 \n\ + psrlw $8, %%xmm3 # XMM3: V7 V6 V5 V4 V3 V2 V1 V0 \n\ + packuswb %%xmm7, %%xmm6 # XMM6: YF...................Y0 \n\ + movdqa %%xmm6, %%xmm7 # XMM7: YF...................Y0 \n\ + pand ("ESI"), %%xmm6 # XMM6: YE YC YA Y8 Y6 Y4 Y2 Y0 \n\ + psrlw $8, %%xmm7 # XMM7: YF YD YB Y9 Y7 Y5 Y3 Y1 \n" + : /* no outputs */ + : "a" (srcY), "S" (&yuv_data), "m" (yuv_data) + ); +} + +static inline void sse2_load_yvyu(uint8_t *srcY, uint8_t *srcU, + uint8_t *srcV, int x, int y, int width) +{ + srcY += (y*width+x)*2; + asm("\ + # Load data, bias and expand to 16 bits \n\ + pxor %%xmm4, %%xmm4 # XMM4: 00 00 00 00 00 00 00 00 \n\ + movdqu ("EAX"), %%xmm6 # XMM6: U3 Y7.............V0 Y0 \n\ + movdqu 16("EAX"),%%xmm7 # XMM7: U7 YF.............V4 Y8 \n\ + movdqa %%xmm6, %%xmm2 # XMM2: U3 Y7.............V0 Y0 \n\ + psrlw $8, %%xmm2 # XMM2: U3 V3 U2 V2 U1 V1 U0 V0 \n\ + pand ("ESI"), %%xmm6 # XMM6: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ + movdqa %%xmm7, %%xmm3 # XMM3: U7 YF.............V4 Y8 \n\ + psrlw $8, %%xmm3 # XMM3: U7 V7 U6 V6 U5 V5 U4 V4 \n\ + pand ("ESI"), %%xmm7 # XMM6: YF YE YD YC YB YA Y9 Y8 \n\ + packuswb %%xmm3, %%xmm2 # XMM2: U7 V7.............U0 V0 \n\ + movdqa %%xmm2, %%xmm3 # XMM3: U7 V7.............U0 V0 \n\ + psrlw $8, %%xmm2 # XMM2: U7 U6 U5 U4 U3 U2 U1 U0 \n\ + pand ("ESI"), %%xmm3 # XMM3: V7 V6 V5 V4 V3 V2 V1 V0 \n\ + packuswb %%xmm7, %%xmm6 # XMM6: YF...................Y0 \n\ + movdqa %%xmm6, %%xmm7 # XMM7: YF...................Y0 \n\ + pand ("ESI"), %%xmm6 # XMM6: YE YC YA Y8 Y6 Y4 Y2 Y0 \n\ + psrlw $8, %%xmm7 # XMM7: YF YD YB Y9 Y7 Y5 Y3 Y1 \n" + : /* no outputs */ + : "a" (srcY), "S" (&yuv_data), "m" (yuv_data) + ); +} + +/************************************/ + +/* Standard YUV->RGB (Yodd=XMM7 Yeven=XMM6 U=XMM2 V=XMM3) */ +static inline void sse2_yuv_to_rgb(void) +{ + asm("\ + psubw 16("ESI"), %%xmm6 # XMM6: subtract 16 \n\ + psllw $7, %%xmm6 # XMM6: convert to fixed point 8.7 \n\ + psubw 16("ESI"), %%xmm7 # XMM7: subtract 16 \n\ + psllw $7, %%xmm7 # XMM7: convert to fixed point 8.7 \n\ + psubw 32("ESI"), %%xmm2 # XMM2: subtract 128 \n\ + psllw $7, %%xmm2 # XMM2: convert to fixed point 8.7 \n\ + psubw 32("ESI"), %%xmm3 # XMM3: subtract 128 \n\ + psllw $7, %%xmm3 # XMM3: convert to fixed point 8.7 \n\ + # Multiply by constants \n\ + pmulhw 48("ESI"),%%xmm6 # XMM6: cYE.................cY0 \n\ + pmulhw 48("ESI"),%%xmm7 # XMM7: cYF.................cY1 \n\ + movdqa 80("ESI"),%%xmm4 # XMM4: gU constant \n\ + pmulhw %%xmm2, %%xmm4 # XMM4: gU7.................gU0 \n\ + movdqa 96("ESI"),%%xmm5 # XMM5: gV constant \n\ + pmulhw %%xmm3, %%xmm5 # XMM5: gV7.................gV0 \n\ + paddw %%xmm5, %%xmm4 # XMM4: g7 g6 g5 g4 g3 g2 g1 g0 \n\ + pmulhw 64("ESI"),%%xmm3 # XMM3: r7 r6 r5 r4 r3 r2 r1 r0 \n\ + pmulhw 112("ESI"),%%xmm2 #XMM2: b7 b6 b5 b4 b3 b2 b1 b0 \n\ + movdqa %%xmm3, %%xmm0 # XMM0: r7 r6 r5 r4 r3 r2 r1 r0 \n\ + movdqa %%xmm4, %%xmm1 # XMM1: g7 g6 g5 g4 g3 g2 g1 g0 \n\ + movdqa %%xmm2, %%xmm5 # XMM5: b7 b6 b5 b4 b3 b2 b1 b0 \n\ + # Add intermediate results and round/shift to get R/G/B values \n\ + paddw 128("ESI"),%%xmm6 # Add rounding value (0.5 @ 8.4 fixed) \n\ + paddw 128("ESI"),%%xmm7 \n\ + paddw %%xmm6, %%xmm0 # XMM0: RE RC RA R8 R6 R4 R2 R0 \n\ + psraw $4, %%xmm0 # Shift back to 8.0 fixed \n\ + paddw %%xmm6, %%xmm1 # XMM1: GE GC GA G8 G6 G4 G2 G0 \n\ + psraw $4, %%xmm1 \n\ + paddw %%xmm6, %%xmm2 # XMM2: BE BC BA B8 B6 B4 B2 B0 \n\ + psraw $4, %%xmm2 \n\ + paddw %%xmm7, %%xmm3 # XMM3: RF RD RB R9 R7 R5 R3 R1 \n\ + psraw $4, %%xmm3 \n\ + paddw %%xmm7, %%xmm4 # XMM4: GF GD GB G9 G7 G5 G3 G1 \n\ + psraw $4, %%xmm4 \n\ + paddw %%xmm7, %%xmm5 # XMM5: BF BD BB B9 B7 B5 B3 B1 \n\ + psraw $4, %%xmm5 \n\ + # Saturate to 0-255 and pack into bytes \n\ + packuswb %%xmm0, %%xmm0 # XMM0: RE.......R0 RE.......R0 \n\ + packuswb %%xmm1, %%xmm1 # XMM1: GE.......G0 GE.......G0 \n\ + packuswb %%xmm2, %%xmm2 # XMM2: BE.......B0 BE.......B0 \n\ + packuswb %%xmm3, %%xmm3 # XMM3: RF.......R1 RF.......R1 \n\ + packuswb %%xmm4, %%xmm4 # XMM4: GF.......G1 GF.......G1 \n\ + packuswb %%xmm5, %%xmm5 # XMM5: BF.......B1 BF.......B1 \n\ + punpcklbw %%xmm3,%%xmm0 # XMM0: RF...................R0 \n\ + punpcklbw %%xmm4,%%xmm1 # XMM1: GF...................G0 \n\ + punpcklbw %%xmm5,%%xmm2 # XMM2: BF...................B0 \n" + : /* no outputs */ + : "S" (&yuv_data), "m" (yuv_data) + ); +} + +/* YUV444 YUV->RGB (Y=XMM7:XMM6 U=XMM5:XMM2 V=XMM3:XMM0) */ +static inline void sse2_yuv444_to_rgb(void) +{ + asm("\ + psubw 16("ESI"), %%xmm6 # XMM6: subtract 16 \n\ + psllw $7, %%xmm6 # XMM6: convert to fixed point 8.7 \n\ + psubw 16("ESI"), %%xmm7 # XMM7: subtract 16 \n\ + psllw $7, %%xmm7 # XMM7: convert to fixed point 8.7 \n\ + psubw 32("ESI"), %%xmm2 # XMM2: subtract 128 \n\ + psllw $7, %%xmm2 # XMM2: convert to fixed point 8.7 \n\ + psubw 32("ESI"), %%xmm5 # XMM5: subtract 128 \n\ + psllw $7, %%xmm5 # XMM5: convert to fixed point 8.7 \n\ + psubw 32("ESI"), %%xmm0 # XMM0: subtract 128 \n\ + psllw $7, %%xmm0 # XMM0: convert to fixed point 8.7 \n\ + psubw 32("ESI"), %%xmm3 # XMM3: subtract 128 \n\ + psllw $7, %%xmm3 # XMM3: convert to fixed point 8.7 \n\ + # Multiply by constants \n\ + pmulhw 48("ESI"),%%xmm6 # XMM6: cY7.................cY0 \n\ + movdqa 80("ESI"),%%xmm1 # XMM1: gU constant \n\ + pmulhw %%xmm2, %%xmm1 # XMM1: gU7.................gU0 \n\ + movdqa 96("ESI"),%%xmm4 # XMM4: gV constant \n\ + pmulhw %%xmm0, %%xmm4 # XMM4: gV7.................gV0 \n\ + paddw %%xmm4, %%xmm1 # XMM1: g7 g6 g5 g4 g3 g2 g1 g0 \n\ + pmulhw 64("ESI"),%%xmm0 # XMM0: r7 r6 r5 r4 r3 r2 r1 r0 \n\ + pmulhw 112("ESI"),%%xmm2 #XMM2: b7 b6 b5 b4 b3 b2 b1 b0 \n\ + # Add intermediate results and round/shift to get R/G/B values \n\ + paddw 128("ESI"),%%xmm6 # Add rounding value (0.5 @ 8.4 fixed) \n\ + paddw %%xmm6, %%xmm0 # XMM0: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + psraw $4, %%xmm0 # Shift back to 8.0 fixed \n\ + paddw %%xmm6, %%xmm1 # XMM1: G7 G6 G5 G4 G3 G2 G1 G0 \n\ + psraw $4, %%xmm1 \n\ + paddw %%xmm6, %%xmm2 # XMM2: B7 B6 B5 B4 B3 B2 B1 B0 \n\ + psraw $4, %%xmm2 \n\ + # Do it all over again for pixels 8-15 \n\ + pmulhw 48("ESI"),%%xmm7 # XMM7: cYF.................cY8 \n\ + movdqa 80("ESI"),%%xmm6 # XMM6: gU constant \n\ + pmulhw %%xmm5, %%xmm6 # XMM6: gUF.................gU8 \n\ + movdqa 96("ESI"),%%xmm4 # XMM4: gV constant \n\ + pmulhw %%xmm3, %%xmm4 # XMM4: gVF.................gV8 \n\ + paddw %%xmm6, %%xmm4 # XMM4: gF gE gD gC gB gA g9 g8 \n\ + pmulhw 64("ESI"),%%xmm3 # XMM3: rF rE rD rC rB rA r9 r8 \n\ + pmulhw 112("ESI"),%%xmm5 #XMM5: bF bE bD bC bB bA b9 b8 \n\ + paddw 128("ESI"),%%xmm7 # Add rounding value (0.5 @ 8.4 fixed) \n\ + paddw %%xmm7, %%xmm3 # XMM3: RF RE RD RC RB RA R9 R8 \n\ + psraw $4, %%xmm3 \n\ + paddw %%xmm7, %%xmm4 # XMM4: GF GE GD GC GB GA G9 G8 \n\ + psraw $4, %%xmm4 \n\ + paddw %%xmm7, %%xmm5 # XMM5: BF BE BD BC BB BA B9 B8 \n\ + psraw $4, %%xmm5 \n\ + # Saturate to 0-255 and pack into bytes \n\ + packuswb %%xmm3, %%xmm0 # XMM0: RF...................R0 \n\ + packuswb %%xmm4, %%xmm1 # XMM1: GF...................G0 \n\ + packuswb %%xmm5, %%xmm2 # XMM2: BF...................B0 \n" + : /* no outputs */ + : "S" (&yuv_data), "m" (yuv_data) + ); +} + +/************************************/ + +/* Convert YUV->RGB output to RGBA pixels in XMM0..XMM3 */ +#define SSE2_RGB_TO_RGBA "\ + pxor %%xmm7, %%xmm7 # XMM7: 00 00 00 00 00 00 00 00 \n\ + movdqa %%xmm0, %%xmm3 # XMM3: RF...................R0 \n\ + movdqa %%xmm1, %%xmm4 # XMM4: GF...................G0 \n\ + movdqa %%xmm2, %%xmm5 # XMM5: BF...................B0 \n\ + punpcklbw %%xmm1,%%xmm0 # XMM0: G7 R7.............G0 R0 \n\ + punpcklbw %%xmm7,%%xmm2 # XMM2: 00 B7.............00 B0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: G7 R7.............G0 R0 \n\ + punpcklwd %%xmm2,%%xmm0 # XMM0: 0BGR3 0BGR2 0BGR1 0BGR0 \n\ + punpckhwd %%xmm2,%%xmm1 # XMM1: 0BGR7 0BGR6 0BGR5 0BGR4 \n\ + punpckhbw %%xmm4,%%xmm3 # XMM3: GF RF.............G8 R8 \n\ + punpckhbw %%xmm7,%%xmm5 # XMM5: 00 BF.............00 B8 \n\ + movdqa %%xmm3, %%xmm2 # XMM2: GF RF.............G8 R8 \n\ + punpckhwd %%xmm5,%%xmm3 # XMM3: 0BGRF 0BGRE 0BGRD 0BGRC \n\ + punpcklwd %%xmm5,%%xmm2 # XMM2: 0BGRB 0BGRA 0BGR9 0BGR8 \n" + +/* Convert YUV->RGB output to BGRA pixels in XMM0..XMM3 */ +#define SSE2_RGB_TO_BGRA "\ + pxor %%xmm7, %%xmm7 # XMM7: 00 00 00 00 00 00 00 00 \n\ + movdqa %%xmm0, %%xmm5 # XMM5: RF...................R0 \n\ + movdqa %%xmm1, %%xmm4 # XMM4: GF...................G0 \n\ + movdqa %%xmm2, %%xmm3 # XMM3: BF...................B0 \n\ + punpcklbw %%xmm1,%%xmm2 # XMM0: G7 B7.............G0 B0 \n\ + punpcklbw %%xmm7,%%xmm0 # XMM2: 00 R7.............00 R0 \n\ + movdqa %%xmm2, %%xmm1 # XMM1: G7 B7.............G0 B0 \n\ + punpcklwd %%xmm0,%%xmm2 # XMM2: 0RGB3 0RGB2 0RGB1 0RGB0 \n\ + punpckhwd %%xmm0,%%xmm1 # XMM1: 0RGB7 0RGB6 0RGB5 0RGB4 \n\ + movdqa %%xmm2, %%xmm0 # XMM0: 0RGB3 0RGB2 0RGB1 0RGB0 \n\ + punpckhbw %%xmm4,%%xmm3 # XMM3: GF BF.............G8 B8 \n\ + punpckhbw %%xmm7,%%xmm5 # XMM5: 00 RF.............00 R8 \n\ + movdqa %%xmm3, %%xmm2 # XMM2: GF BF.............G8 B8 \n\ + punpckhwd %%xmm5,%%xmm3 # XMM3: 0RGBF 0RGBE 0RGBD 0RGBC \n\ + punpcklwd %%xmm5,%%xmm2 # XMM2: 0RGBB 0RGBA 0RGB9 0RGB8 \n" + +/* Convert and 4 RGBA32 (BGRA32) pixels in XMMn to RGB24 (BGR24) and store + * at EDI+(12*n) */ +#define SSE2_RGB32_TO_RGB24(n) "\ + movd %%xmm"#n", %%eax # EAX: 00 B0 G0 R0 \n\ + psrldq $4, %%xmm"#n" # XMMn: 00000 0BGR3 0BGR2 0BGR1 \n\ + movd %%xmm"#n", %%ebx # EBX: 00 B1 G1 R1 \n\ + psrldq $4, %%xmm"#n" # XMMn: 00000 00000 0BGR3 0BGR2 \n\ + movd %%xmm"#n", %%ecx # ECX: 00 B2 G2 R2 \n\ + psrldq $4, %%xmm"#n" # XMMn: 00000 00000 00000 0BGR3 \n\ + movd %%xmm"#n", %%edx # EDX: 00 B3 G3 R3 \n\ + "IA32_RGB32_TO_RGB24" \n\ + movl %%eax, 12*"#n"+0("EDI") \n\ + movl %%ebx, 12*"#n"+4("EDI") \n\ + movl %%ecx, 12*"#n"+8("EDI") \n" + + +static inline void sse2_store_rgb24(uint8_t *dest) +{ + /* It looks like it's fastest to go to RGB32 first, then shift the + * result to merge the 24-bit pixels together. */ + asm(SSE2_RGB_TO_RGBA "\ + push "EBX" \n\ + "SSE2_RGB32_TO_RGB24(0)" \n\ + "SSE2_RGB32_TO_RGB24(1)" \n\ + "SSE2_RGB32_TO_RGB24(2)" \n\ + "SSE2_RGB32_TO_RGB24(3)" \n\ + pop "EBX" \n" + : /* no outputs */ + : "D" (dest) + : "eax", "ecx", "edx", "esi" + ); +} + +static inline void sse2_store_bgr24(uint8_t *dest) +{ + asm(SSE2_RGB_TO_BGRA "\ + push "EBX" \n\ + "SSE2_RGB32_TO_RGB24(0)" \n\ + "SSE2_RGB32_TO_RGB24(1)" \n\ + "SSE2_RGB32_TO_RGB24(2)" \n\ + "SSE2_RGB32_TO_RGB24(3)" \n\ + pop "EBX" \n" + : /* no outputs */ + : "D" (dest) + : "eax", "ecx", "edx", "esi" + ); +} + +/* It would be nice to be able to use movntdq here for a 50% speedup, + * but we're not guaranteed alignment... (think 766x512 for example) */ +static inline void sse2_store_rgba32(uint8_t *dest) +{ + asm(SSE2_RGB_TO_RGBA "\ + movdqu %%xmm0, ("EDI") \n\ + movdqu %%xmm1, 16("EDI") \n\ + movdqu %%xmm2, 32("EDI") \n\ + movdqu %%xmm3, 48("EDI") \n" + : /* no outputs */ + : "D" (dest) + ); +} + +static inline void sse2_store_abgr32(uint8_t *dest) +{ + asm(SSE2_RGB_TO_BGRA "\ + pslldq $1, %%xmm0 \n\ + pslldq $1, %%xmm1 \n\ + pslldq $1, %%xmm2 \n\ + pslldq $1, %%xmm3 \n\ + movdqu %%xmm0, ("EDI") \n\ + movdqu %%xmm1, 16("EDI") \n\ + movdqu %%xmm2, 32("EDI") \n\ + movdqu %%xmm3, 48("EDI") \n" + : /* no outputs */ + : "D" (dest) + ); +} + +static inline void sse2_store_argb32(uint8_t *dest) +{ + asm(SSE2_RGB_TO_RGBA "\ + pslldq $1, %%xmm0 \n\ + pslldq $1, %%xmm1 \n\ + pslldq $1, %%xmm2 \n\ + pslldq $1, %%xmm3 \n\ + movdqu %%xmm0, ("EDI") \n\ + movdqu %%xmm1, 16("EDI") \n\ + movdqu %%xmm2, 32("EDI") \n\ + movdqu %%xmm3, 48("EDI") \n" + : /* no outputs */ + : "D" (dest) + ); +} + +static inline void sse2_store_bgra32(uint8_t *dest) +{ + asm(SSE2_RGB_TO_BGRA "\ + movdqu %%xmm0, ("EDI") \n\ + movdqu %%xmm1, 16("EDI") \n\ + movdqu %%xmm2, 32("EDI") \n\ + movdqu %%xmm3, 48("EDI") \n" + : /* no outputs */ + : "D" (dest) + ); +} + +/*************************************************************************/ + +static inline void sse2_load_rgb24(uint8_t *src); +static inline void sse2_load_bgr24(uint8_t *src); +static inline void sse2_load_rgba32(uint8_t *src); +static inline void sse2_load_abgr32(uint8_t *src); +static inline void sse2_load_argb32(uint8_t *src); +static inline void sse2_load_bgra32(uint8_t *src); +static inline void sse2_rgb_to_yuv420p( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width); +static inline void sse2_rgb_to_yuv411p( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width); +static inline void sse2_rgb_to_yuv422p( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width); +static inline void sse2_rgb_to_yuv444p( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width); +static inline void sse2_rgb_to_yuy2( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width); +static inline void sse2_rgb_to_uyvy( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width); +static inline void sse2_rgb_to_yvyu( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width); +static inline void sse2_rgb_to_y8( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width); + +#define DEFINE_RGB2YUV_SSE2(rgb,yuv,rgbsz,rofs,gofs,bofs,slowop) \ +static int rgb##_##yuv##_sse2(uint8_t **src, uint8_t **dest, \ + int width, int height) \ +{ \ + int x, y; \ + \ + for (y = 0; y < height; y++) { \ + for (x = 0; x < (width & ~7); x += 8) { \ + sse2_load_##rgb(src[0]+(y*width+x)*rgbsz); \ + sse2_rgb_to_##yuv(dest[0], dest[1], dest[2], x, y, width); \ + } \ + while (x < width) { \ + int r = src[0][(y*width+x)*rgbsz+rofs]; \ + int g = src[0][(y*width+x)*rgbsz+gofs]; \ + int b = src[0][(y*width+x)*rgbsz+bofs]; \ + slowop; \ + x++; \ + } \ + } \ + asm("emms"); \ + return 1; \ +} + +#define DEFINE_RGB2YUV_SSE2_SET(rgb,sz,r,g,b) \ + DEFINE_RGB2YUV_SSE2(rgb,yuv420p, sz,r,g,b, RGB2YUV_420P) \ + DEFINE_RGB2YUV_SSE2(rgb,yuv411p, sz,r,g,b, RGB2YUV_411P) \ + DEFINE_RGB2YUV_SSE2(rgb,yuv422p, sz,r,g,b, RGB2YUV_422P) \ + DEFINE_RGB2YUV_SSE2(rgb,yuv444p, sz,r,g,b, RGB2YUV_444P) \ + DEFINE_RGB2YUV_SSE2(rgb,yuy2, sz,r,g,b, RGB2YUV_YUY2) \ + DEFINE_RGB2YUV_SSE2(rgb,uyvy, sz,r,g,b, RGB2YUV_UYVY) \ + DEFINE_RGB2YUV_SSE2(rgb,yvyu, sz,r,g,b, RGB2YUV_YVYU) \ + DEFINE_RGB2YUV_SSE2(rgb,y8, sz,r,g,b, RGB2Y()) + +DEFINE_RGB2YUV_SSE2_SET(rgb24, 3,0,1,2) +DEFINE_RGB2YUV_SSE2_SET(bgr24, 3,2,1,0) +DEFINE_RGB2YUV_SSE2_SET(rgba32, 4,0,1,2) +DEFINE_RGB2YUV_SSE2_SET(abgr32, 4,3,2,1) +DEFINE_RGB2YUV_SSE2_SET(argb32, 4,1,2,3) +DEFINE_RGB2YUV_SSE2_SET(bgra32, 4,2,1,0) + +/************************************/ + +/* Split 8 RGBA pixels in XMMr/XMMb into R/G/B in XMM0/XMM1/XMM2. + * r and b are 0 and 2 for RGB, 2 and 0 for BGR */ +#define SSE2_SPLIT_RGB32(r,b) "\ + movdqa 176(%%edi), %%xmm7 # XMM7: 00FF*8 \n\ + movdqa %%xmm"#r", %%xmm1 # XMM1: XBGR3 XBGR2 XBGR1 XBGR0 \n\ + movdqa %%xmm"#b", %%xmm3 # XMM3: XBGR7 XBGR6 XBGR5 XBGR4 \n\ + pand %%xmm7, %%xmm"#r" # XMMr: B3 R3 B2 R2 B1 R1 B0 R0 \n\ + psrld $8, %%xmm1 # XMM1: -XBG3 -XBG2 -XBG1 -XBG0 \n\ + pand %%xmm7, %%xmm"#b" # XMMb: B7 R7 B6 R6 B5 R5 B4 R4 \n\ + psrld $8, %%xmm3 # XMM3: -XBG7 -XBG6 -XBG5 -XBG4 \n\ + pand %%xmm7, %%xmm1 # XMM1: XX G3 XX G2 XX G1 XX G0 \n\ + packuswb %%xmm"#b", %%xmm"#r" # XMMr: B7 R7 ........... B0 R0 \n\ + pand %%xmm7, %%xmm3 # XMM3: XX G7 XX G6 XX G5 XX G4 \n\ + movdqa %%xmm"#r", %%xmm"#b" # XMMb: B7 R7 ........... B0 R0 \n\ + packuswb %%xmm3, %%xmm1 # XMM1: XX G7 ........... XX G0 \n\ + pand %%xmm7, %%xmm"#r" # XMMr: R7 R6 R5 R4 R3 R2 R1 R0 \n\ + psrlw $8, %%xmm"#b" # XMMb: B7 B6 B5 B4 B3 B2 B1 B0 \n\ + pand %%xmm7, %%xmm1 # XMM1: G7 G6 G5 G4 G3 G2 G1 G0 \n" + +static inline void sse2_load_rgb24(uint8_t *src) +{ + asm("\ + push "EBX" \n\ + # Make stack space for loading XMM registers \n\ + sub $24, "ESP" \n\ + # Copy source pixels to appropriate positions in stack (this \n\ + # seems to be the fastest way to get them where we want them) \n\ + movl $8, %%ebx \n\ + movl $24, %%edx \n\ + 0: \n\ + movb -3("ESI","EDX"), %%al \n\ + movb %%al, 0-1("ESP","EBX") \n\ + movb -2("ESI","EDX"), %%al \n\ + movb %%al, 8-1("ESP","EBX") \n\ + movb -1("ESI","EDX"), %%al \n\ + movb %%al, 16-1("ESP","EBX") \n\ + subl $3, %%edx \n\ + subl $1, %%ebx \n\ + jnz 0b \n\ + # Load XMM0-XMM2 with R/G/B values and expand to 16-bit \n\ + pxor %%xmm7, %%xmm7 \n\ + movq ("ESP"), %%xmm0 \n\ + punpcklbw %%xmm7, %%xmm0 \n\ + movq 8("ESP"), %%xmm1 \n\ + punpcklbw %%xmm7, %%xmm1 \n\ + movq 16("ESP"), %%xmm2 \n\ + punpcklbw %%xmm7, %%xmm2 \n\ + add $24, "ESP" \n\ + pop "EBX" \n" + : /* no outputs */ + : "S" (src) + : "eax", "ecx", "edx", "edi" + ); +} + +static inline void sse2_load_bgr24(uint8_t *src) +{ + /* Load as RGB and swap registers */ + sse2_load_rgb24(src); + asm("\ + movdqa %%xmm0, %%xmm3 \n\ + movdqa %%xmm2, %%xmm0 \n\ + movdqa %%xmm3, %%xmm2 \n" + : /* no outputs */ + : /* no inputs */ + ); +} + +static inline void sse2_load_rgba32(uint8_t *src) +{ + asm("\ + movdqu (%%esi), %%xmm0 # XMM0: XBGR3 XBGR2 XBGR1 XBGR0 \n\ + movdqu 16(%%esi), %%xmm2 # XMM2: XBGR7 XBGR6 XBGR5 XBGR4 \n\ + "SSE2_SPLIT_RGB32(0,2)" \n" + : /* no outputs */ + : "S" (src), "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_load_abgr32(uint8_t *src) +{ + asm("\ + movdqu (%%esi), %%xmm2 # XMM2: RGBX3 RGBX2 RGBX1 RGBX0 \n\ + movdqu 16(%%esi), %%xmm0 # XMM0: RGBX7 RGBX6 RGBX5 RGBX4 \n\ + psrld $8, %%xmm2 # XMM2: -RGB3 -RGB2 -RGB1 -RGB0 \n\ + psrld $8, %%xmm0 # XMM0: -RGB7 -RGB6 -RGB5 -RGB4 \n\ + "SSE2_SPLIT_RGB32(2,0)" \n" + : /* no outputs */ + : "S" (src), "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_load_argb32(uint8_t *src) +{ + asm("\ + movdqu (%%esi), %%xmm0 # XMM0: BGRX3 BGRX2 BGRX1 BGRX0 \n\ + movdqu 16(%%esi), %%xmm2 # XMM2: BGRX7 BGRX6 BGRX5 BGRX4 \n\ + psrld $8, %%xmm0 # XMM0: -BGR3 -BGR2 -BGR1 -BGR0 \n\ + psrld $8, %%xmm2 # XMM2: -BGR7 -BGR6 -BGR5 -BGR4 \n\ + "SSE2_SPLIT_RGB32(0,2)" \n" + : /* no outputs */ + : "S" (src), "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_load_bgra32(uint8_t *src) +{ + asm("\ + movdqu (%%esi), %%xmm2 # XMM2: XRGB3 XRGB2 XRGB1 XRGB0 \n\ + movdqu 16(%%esi), %%xmm0 # XMM0: XRGB7 XRGB6 XRGB5 XRGB4 \n\ + "SSE2_SPLIT_RGB32(2,0)" \n" + : /* no outputs */ + : "S" (src), "D" (&rgb_data), "m" (rgb_data) + ); +} + +/************************************/ + +#define SSE2_RGB2Y "\ + # Make RGB data into 8.6 fixed-point, then create 8.6 \n\ + # fixed-point Y data in XMM3 \n\ + psllw $6, %%xmm0 \n\ + movdqa %%xmm0, %%xmm3 \n\ + pmulhuw ("EDI"), %%xmm3 \n\ + psllw $6, %%xmm1 \n\ + movdqa %%xmm1, %%xmm6 \n\ + pmulhuw 16("EDI"), %%xmm6 \n\ + psllw $6, %%xmm2 \n\ + movdqa %%xmm2, %%xmm7 \n\ + pmulhuw 32("EDI"), %%xmm7 \n\ + paddw %%xmm6, %%xmm3 # No possibility of overflow \n\ + paddw %%xmm7, %%xmm3 \n\ + paddw 144("EDI"), %%xmm3 \n" +#define SSE2_RGB2U "\ + # Create 8.6 fixed-point U data in XMM4 \n\ + movdqa %%xmm0, %%xmm4 \n\ + pmulhw 48("EDI"), %%xmm4 \n\ + movdqa %%xmm1, %%xmm6 \n\ + pmulhw 64("EDI"), %%xmm6 \n\ + movdqa %%xmm2, %%xmm7 \n\ + pmulhw 80("EDI"), %%xmm7 \n\ + paddw %%xmm6, %%xmm4 \n\ + paddw %%xmm7, %%xmm4 \n\ + paddw 160("EDI"), %%xmm4 \n" +#define SSE2_RGB2U0 "\ + # Create 8.6 fixed-point U data in XMM0 \n\ + pmulhw 48("EDI"), %%xmm0 \n\ + pmulhw 64("EDI"), %%xmm1 \n\ + pmulhw 80("EDI"), %%xmm2 \n\ + paddw %%xmm1, %%xmm0 \n\ + paddw %%xmm2, %%xmm0 \n\ + paddw 160("EDI"), %%xmm0 \n" +#define SSE2_RGB2V "\ + # Create 8.6 fixed-point V data in XMM0 \n\ + pmulhw 96("EDI"), %%xmm0 \n\ + pmulhw 112("EDI"), %%xmm1 \n\ + pmulhw 128("EDI"), %%xmm2 \n\ + paddw %%xmm1, %%xmm0 \n\ + paddw %%xmm2, %%xmm0 \n\ + paddw 160("EDI"), %%xmm0 \n" +#define SSE2_PACKYU "\ + # Shift back down to 8-bit values \n\ + psraw $6, %%xmm3 \n\ + psraw $6, %%xmm0 \n\ + # Pack into bytes \n\ + pxor %%xmm7, %%xmm7 \n\ + packuswb %%xmm7, %%xmm3 \n\ + packuswb %%xmm7, %%xmm0 \n" +#define SSE2_PACKYUV "\ + # Shift back down to 8-bit values \n\ + psraw $6, %%xmm3 \n\ + psraw $6, %%xmm4 \n\ + psraw $6, %%xmm0 \n\ + # Pack into bytes \n\ + pxor %%xmm7, %%xmm7 \n\ + packuswb %%xmm7, %%xmm3 \n\ + packuswb %%xmm7, %%xmm4 \n\ + packuswb %%xmm7, %%xmm0 \n" +#define SSE2_STRIPU(N) "\ + # Remove every odd U value \n\ + pand 176("EDI"), %%xmm"#N" \n\ + packuswb %%xmm7, %%xmm"#N" \n" +#define SSE2_STRIPV "\ + # Remove every even V value \n\ + psrlw $8, %%xmm0 \n\ + packuswb %%xmm7, %%xmm0 \n" + +static inline void sse2_rgb_to_yuv420p( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width) +{ + if (y%2 == 0) { + asm("\ + "SSE2_RGB2Y" \n\ + "SSE2_RGB2U0" \n\ + "SSE2_PACKYU" \n\ + "SSE2_STRIPU(0)" \n\ + # Store into destination pointers \n\ + movq %%xmm3, ("EAX") \n\ + movd %%xmm0, ("ECX") \n" + : /* no outputs */ + : "a" (destY+y*width+x), "c" (destU+(y/2)*(width/2)+(x/2)), + "D" (&rgb_data), "m" (rgb_data) + ); + } else { + asm("\ + "SSE2_RGB2Y" \n\ + "SSE2_RGB2V" \n\ + "SSE2_PACKYU" \n\ + "SSE2_STRIPV" \n\ + # Store into destination pointers \n\ + movq %%xmm3, ("EAX") \n\ + movd %%xmm0, ("EDX") \n" + : /* no outputs */ + : "a" (destY+y*width+x), "d" (destV+(y/2)*(width/2)+(x/2)), + "D" (&rgb_data), "m" (rgb_data) + ); + } +} + +static inline void sse2_rgb_to_yuv411p( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width) +{ + asm("\ + "SSE2_RGB2Y" \n\ + "SSE2_RGB2U" \n\ + "SSE2_RGB2V" \n\ + "SSE2_PACKYUV" \n\ + "SSE2_STRIPU(4)" \n\ + "SSE2_STRIPU(4)" \n\ + "SSE2_STRIPU(0)" \n\ + "SSE2_STRIPV" \n\ + # Store into destination pointers \n\ + movq %%xmm3, ("EAX") \n\ + push "EAX" # needed because GCC might rely on it later \n\ + movd %%xmm4, %%eax \n\ + movw %%ax, ("ECX") \n\ + movd %%xmm0, %%eax \n\ + movw %%ax, ("EDX") \n\ + pop "EAX" \n" + : /* no outputs */ + : "a" (destY+y*width+x), "c" (destU+y*(width/4)+(x/4)), + "d" (destV+y*(width/4)+(x/4)), "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_rgb_to_yuv422p( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width) +{ + asm("\ + "SSE2_RGB2Y" \n\ + "SSE2_RGB2U" \n\ + "SSE2_RGB2V" \n\ + "SSE2_PACKYUV" \n\ + "SSE2_STRIPU(4)" \n\ + "SSE2_STRIPV" \n\ + # Store into destination pointers \n\ + movq %%xmm3, ("EAX") \n\ + movd %%xmm4, ("ECX") \n\ + movd %%xmm0, ("EDX") \n" + : /* no outputs */ + : "a" (destY+y*width+x), "c" (destU+y*(width/2)+(x/2)), + "d" (destV+y*(width/2)+(x/2)), "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_rgb_to_yuv444p( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width) +{ + asm("\ + "SSE2_RGB2Y" \n\ + "SSE2_RGB2U" \n\ + "SSE2_RGB2V" \n\ + "SSE2_PACKYUV" \n\ + # Store into destination pointers \n\ + movq %%xmm3, ("EAX") \n\ + movq %%xmm4, ("ECX") \n\ + movq %%xmm0, ("EDX") \n" + : /* no outputs */ + : "a" (destY+y*width+x), "c" (destU+y*width+x), "d" (destV+y*width+x), + "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_rgb_to_yuy2( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width) +{ + asm("\ + "SSE2_RGB2Y" \n\ + "SSE2_RGB2U" \n\ + "SSE2_RGB2V" \n\ + "SSE2_PACKYUV" \n\ + "SSE2_STRIPU(4)" \n\ + "SSE2_STRIPV" \n\ + # Interleave Y/U/V \n\ + punpcklbw %%xmm0, %%xmm4 \n\ + punpcklbw %%xmm4, %%xmm3 \n\ + # Store into destination pointer \n\ + movdqu %%xmm3, ("EAX") \n" + : /* no outputs */ + : "a" (destY+(y*width+x)*2), "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_rgb_to_uyvy( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width) +{ + asm("\ + "SSE2_RGB2Y" \n\ + "SSE2_RGB2U" \n\ + "SSE2_RGB2V" \n\ + "SSE2_PACKYUV" \n\ + "SSE2_STRIPU(4)" \n\ + "SSE2_STRIPV" \n\ + # Interleave Y/U/V \n\ + punpcklbw %%xmm0, %%xmm4 \n\ + punpcklbw %%xmm3, %%xmm4 \n\ + # Store into destination pointer \n\ + movdqu %%xmm4, ("EAX") \n" + : /* no outputs */ + : "a" (destY+(y*width+x)*2), "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_rgb_to_yvyu( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width) +{ + asm("\ + "SSE2_RGB2Y" \n\ + "SSE2_RGB2U" \n\ + "SSE2_RGB2V" \n\ + "SSE2_PACKYUV" \n\ + # Remove every odd V value \n\ + pand 176("EDI"), %%xmm0 \n\ + packuswb %%xmm7, %%xmm0 \n\ + # Remove every even U value \n\ + psrlw $8, %%xmm4 \n\ + packuswb %%xmm7, %%xmm4 \n\ + # Interleave Y/U/V \n\ + punpcklbw %%xmm4, %%xmm0 \n\ + punpcklbw %%xmm0, %%xmm3 \n\ + # Store into destination pointer \n\ + movdqu %%xmm3, ("EAX") \n" + : /* no outputs */ + : "a" (destY+(y*width+x)*2), "D" (&rgb_data), "m" (rgb_data) + ); +} + +static inline void sse2_rgb_to_y8( + uint8_t *destY, uint8_t *destU, uint8_t *destV, int x, int y, int width) +{ + asm("\ + psllw $6, %%xmm0 \n\ + pmulhuw ("EDI"), %%xmm0 \n\ + psllw $6, %%xmm1 \n\ + pmulhuw 16("EDI"), %%xmm1 \n\ + psllw $6, %%xmm2 \n\ + pmulhuw 32("EDI"), %%xmm2 \n\ + paddw %%xmm1, %%xmm0 # No possibility of overflow \n\ + paddw %%xmm2, %%xmm0 \n\ + paddw 144("EDI"), %%xmm0 \n\ + psraw $6, %%xmm0 \n\ + packuswb %%xmm0, %%xmm0 \n\ + movq %%xmm0, ("EAX") \n" + : /* no outputs */ + : "a" (destY+y*width+x), "D" (&rgb_data), "m" (rgb_data) + ); +} + +/*************************************************************************/ + +static int yuvp_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa ("EDX"), %%xmm7 # constant: 255/219 \n\ + movdqa 32("EDX"), %%xmm6 # constant: 16 \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 16, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movzbl -1("ESI","ECX"), %%eax # retrieve Y byte \n\ + subl $16, %%eax # subtract 16 \n\ + imull %3, %%eax # multiply by 255/219 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + testb %%ah, %%ah # saturate to 0..255 \n\ + movl $-1, %%edx # (trash EDX, we don't need it \n\ + cmovnz %%edx, %%eax # anymore) \n\ + movl $0, %%edx \n\ + cmovs %%edx, %%eax \n\ + movb %%al, -1("EDI","ECX") # and store \n", + /* main_loop */ "\ + movdqu -16("ESI","ECX"), %%xmm0 # XMM0: Y15..Y0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: Y15..Y0 \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: Y7..Y0 \n\ + psubw %%xmm6, %%xmm0 # XMM0: unbias by 16 \n\ + psllw $2, %%xmm0 # XMM0: fixed point 8.2 \n\ + pmulhw %%xmm7, %%xmm0 # XMM0: multiply by 255/219>>2 \n\ + punpckhbw %%xmm4, %%xmm1 # XMM1: Y15..Y8 << 8 \n\ + psubw %%xmm6, %%xmm1 # XMM1: unbias by 16 \n\ + psllw $2, %%xmm1 # XMM1: fixed point 8.2 \n\ + pmulhw %%xmm7, %%xmm1 # XMM1: multiply by 255/219>>2 \n\ + packuswb %%xmm1, %%xmm0 # XMM0: G15..G0, saturated \n\ + movdqu %%xmm0, -16("EDI","ECX") \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (Y_GRAY), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +static int yuy2_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa ("EDX"), %%xmm7 # constant: 255/219 \n\ + movdqa 32("EDX"), %%xmm6 # constant: 16 \n\ + pcmpeqd %%xmm5, %%xmm5 \n\ + psrlw $8, %%xmm5 # constant: 0x00FF \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 8, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movzbl -2("ESI","ECX",2), %%eax # retrieve Y byte \n\ + subl $16, %%eax # subtract 16 \n\ + imull %3, %%eax # multiply by 255/219 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + testb %%ah, %%ah # saturate to 0..255 \n\ + movl $-1, %%edx # (trash EDX, we don't need it \n\ + cmovnz %%edx, %%eax # anymore) \n\ + movl $0, %%edx \n\ + cmovs %%edx, %%eax \n\ + movb %%al, -1("EDI","ECX") # and store \n", + /* main_loop */ "\ + movdqu -16("ESI","ECX",2),%%xmm0 #XMM0: V3 Y7..U0 Y0 \n\ + pand %%xmm5, %%xmm0 # XMM0: Y7..Y0 \n\ + psubw %%xmm6, %%xmm0 # XMM0: unbias by 16 \n\ + psllw $2, %%xmm0 # XMM0: fixed point 8.2 \n\ + pmulhw %%xmm7, %%xmm0 # XMM0: multiply by 255/219>>2 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: G7..G0, saturated \n\ + movq %%xmm0, -8("EDI","ECX") \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (Y_GRAY), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +static int uyvy_gray8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa ("EDX"), %%xmm7 # constant: 255/219 \n\ + movdqa 32("EDX"), %%xmm6 \n\ + psllw $2, %%xmm6 # constant: 16<<2 \n\ + pcmpeqd %%xmm5, %%xmm5 \n\ + psllw $8, %%xmm5 # constant: 0xFF00 \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 8, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movzbl -1("ESI","ECX",2), %%eax # retrieve Y byte \n\ + subl $16, %%eax # subtract 16 \n\ + imull %3, %%eax # multiply by 255/219 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + testb %%ah, %%ah # saturate to 0..255 \n\ + movl $-1, %%edx # (trash EDX, we don't need it \n\ + cmovnz %%edx, %%eax # anymore) \n\ + movl $0, %%edx \n\ + cmovs %%edx, %%eax \n\ + movb %%al, -1("EDI","ECX") # and store \n", + /* main_loop */ "\ + movdqu -16("ESI","ECX",2),%%xmm0 #XMM0: Y7 V3..Y0 U0 \n\ + pand %%xmm5, %%xmm0 # XMM0: Y7..Y0 << 8 \n\ + psrlw $6, %%xmm0 # XMM0: fixed point 8.2 \n\ + psubw %%xmm6, %%xmm0 # XMM0: unbias by 16 \n\ + pmulhw %%xmm7, %%xmm0 # XMM0: multiply by 255/219>>2 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: G7..G0, saturated \n\ + movq %%xmm0, -8("EDI","ECX") \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (Y_GRAY), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +/*************************************************************************/ + +static int gray8_y8_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa 16("EDX"), %%xmm7 # constant: 219/255 \n\ + movdqa 32("EDX"), %%xmm6 # constant: 16 \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 16, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movzbl -1("ESI","ECX"), %%eax # retrieve gray byte \n\ + imull %3, %%eax # multiply by 219/255 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + addl $16, %%eax # add 16 \n\ + movb %%al, -1("EDI","ECX") # and store \n", + /* main_loop */ "\ + movdqu -16("ESI","ECX"), %%xmm2 # XMM2: G15..G0 \n\ + movdqa %%xmm4, %%xmm0 \n\ + punpcklbw %%xmm2, %%xmm0 # XMM0: G7..G0 << 8 \n\ + pmulhuw %%xmm7, %%xmm0 # XMM0: multiply by 219/255>>2 \n\ + movdqa %%xmm4, %%xmm1 \n\ + punpckhbw %%xmm2, %%xmm1 # XMM1: G15..G8 << 8 \n\ + pmulhuw %%xmm7, %%xmm1 # XMM1: multiply by 219/255>>2 \n\ + psrlw $6, %%xmm0 # XMM0: shift down to 8 bits \n\ + paddw %%xmm6, %%xmm0 # XMM0: bias by 16 \n\ + psrlw $6, %%xmm1 # XMM1: shift down to 8 bits \n\ + paddw %%xmm6, %%xmm1 # XMM1: bias by 16 \n\ + packuswb %%xmm1, %%xmm0 # XMM0: Y15..Y0 \n\ + movdqu %%xmm0, -16("EDI","ECX") \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (GRAY_Y), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +static int gray8_yuy2_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa 16("EDX"), %%xmm7 # constant: 219/255 \n\ + movdqa 32("EDX"), %%xmm6 # constant: 16 \n\ + pcmpeqd %%xmm5, %%xmm5 \n\ + psllw $15, %%xmm5 # constant: 0x8000 \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 8, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movzbl -1("ESI","ECX"), %%eax # retrieve gray byte \n\ + imull %3, %%eax # multiply by 219/255 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + addl $16, %%eax # add 16 \n\ + movb %%al, -2("EDI","ECX",2) # and store \n\ + movb $128, -1("EDI","ECX",2) # store 128 in U/V byte \n", + /* main_loop */ "\ + movq -8("ESI","ECX"), %%xmm2 # XMM2: G5..G0 \n\ + movdqa %%xmm4, %%xmm0 \n\ + punpcklbw %%xmm2, %%xmm0 # XMM0: G7..G0 << 8 \n\ + pmulhuw %%xmm7, %%xmm0 # XMM0: multiply by 219/255>>2 \n\ + psrlw $6, %%xmm0 # XMM0: shift down to 8 bits \n\ + paddw %%xmm6, %%xmm0 # XMM0: bias by 16 \n\ + por %%xmm5, %%xmm0 # XMM0: OR in U/V bytes \n\ + movdqu %%xmm0, -16("EDI","ECX",2) \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (GRAY_Y), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +static int gray8_uyvy_sse2(uint8_t **src, uint8_t **dest, int width, int height) { + asm("movdqa 16("EDX"), %%xmm7 # constant: 219/255 \n\ + movdqa 32("EDX"), %%xmm6 \n\ + psllw $8, %%xmm6 # constant: 16 << 8 \n\ + pcmpeqd %%xmm5, %%xmm5 \n\ + psllw $15, %%xmm5 \n\ + psrlw $8, %%xmm5 # constant: 0x0080 \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n\ + pcmpeqd %%xmm3, %%xmm3 \n\ + psllw $8, %%xmm3 # constant: 0xFF00 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 8, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movzbl -1("ESI","ECX"), %%eax # retrieve gray byte \n\ + imull %3, %%eax # multiply by 219/255 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + addl $16, %%eax # add 16 \n\ + movb %%al, -1("EDI","ECX",2) # and store \n\ + movb $128, -2("EDI","ECX",2) # store 128 in U/V byte \n", + /* main_loop */ "\ + movq -8("ESI","ECX"), %%xmm2 # XMM2: G5..G0 \n\ + movdqa %%xmm4, %%xmm0 \n\ + punpcklbw %%xmm2, %%xmm0 # XMM0: G7..G0 << 8 \n\ + pmulhuw %%xmm7, %%xmm0 # XMM0: multiply by 219/255>>2 \n\ + psllw $2, %%xmm0 # XMM0: shift results to hi byte\n\ + pand %%xmm3, %%xmm0 # XMM0: clear low byte \n\ + paddw %%xmm6, %%xmm0 # XMM0: bias by 16 \n\ + por %%xmm5, %%xmm0 # XMM0: OR in U/V bytes \n\ + movdqu %%xmm0, -16("EDI","ECX",2) \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (GRAY_Y), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +/*************************************************************************/ + +static int y8_rgb24_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa ("EDX"), %%xmm7 # constant: 255/219 \n\ + movdqa 32("EDX"), %%xmm6 # constant: 16 \n\ + movdqa 48("EDX"), %%xmm5 # constant: bytes 0/3/6/9 mask \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 4, + /* push_regs */ "push "EBX, + /* pop_regs */ "pop "EBX, + /* small_loop */ "\ + lea ("ECX","ECX",2), "EDX" # 3*count for RGB offset \n\ + movzbl -1("ESI","ECX"), %%eax # retrieve Y byte \n\ + subl $16, %%eax # subtract 16 \n\ + imull %3, %%eax # multiply by 255/219 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + testb %%ah, %%ah # saturate to 0..255 \n\ + movl $-1, %%ebx \n\ + cmovnz %%ebx, %%eax \n\ + movl $0, %%ebx \n\ + cmovs %%ebx, %%eax \n\ + movb %%al, -3("EDI","EDX") # and store \n\ + movb %%al, -2("EDI","EDX") \n\ + movb %%al, -1("EDI","EDX") \n", + /* main_loop */ "\ + lea ("ECX","ECX",2), "EDX" \n\ + movd -4("ESI","ECX"), %%xmm0 # XMM0: Y3..Y0 \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: Y3..Y0 in 16 bits \n\ + psubw %%xmm6, %%xmm0 # XMM0: unbias by 16 \n\ + psllw $2, %%xmm0 # XMM0: fixed point 8.2 \n\ + pmulhw %%xmm7, %%xmm0 # XMM0: multiply by 255/219>>2 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: G3..G0, saturated \n\ + pshuflw $0x50, %%xmm0, %%xmm0 # X0.l: G3 G2 G3 G2 G1 G0 G1 G0 \n\ + pshufhw $0x55, %%xmm0, %%xmm0 # X0.h: G3 G2 G3 G2 G3 G2 G3 G2 \n\ + pand %%xmm5, %%xmm0 # XMM0: ------3--2--1--0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: ------3--2--1--0 \n\ + pslldq $1, %%xmm1 # XMM1: -----3--2--1--0- \n\ + movdqa %%xmm0, %%xmm2 # XMM2: ------3--2--1--0 \n\ + pslldq $2, %%xmm2 # XMM2: ----3--2--1--0-- \n\ + por %%xmm1, %%xmm0 # XMM0: -----33-22-11-00 \n\ + por %%xmm2, %%xmm0 # XMM0: ----333222111000 \n\ + movd %%xmm0, -12("EDI","EDX") \n\ + pshufd $0xC9, %%xmm0, %%xmm0 \n\ + movq %%xmm0, -8("EDI","EDX") \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (Y_GRAY), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +/* 4BPP is slightly easier... */ +static int y8_rgba32_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa ("EDX"), %%xmm7 # constant: 255/219 \n\ + movdqa 32("EDX"), %%xmm6 # constant: 16 \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 4, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movzbl -1("ESI","ECX"), %%eax # retrieve Y byte \n\ + subl $16, %%eax # subtract 16 \n\ + imull %3, %%eax # multiply by 255/219 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + testb %%ah, %%ah # saturate to 0..255 \n\ + movl $-1, %%edx \n\ + cmovnz %%edx, %%eax \n\ + movl $0, %%edx \n\ + cmovs %%edx, %%eax \n\ + movb %%al, -4("EDI","ECX",4) # and store \n\ + movb %%al, -3("EDI","ECX",4) \n\ + movb %%al, -2("EDI","ECX",4) \n", + /* main_loop */ "\ + movd -4("ESI","ECX"), %%xmm0 # XMM0: Y3..Y0 \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: Y3..Y0 in 16 bits \n\ + psubw %%xmm6, %%xmm0 # XMM0: unbias by 16 \n\ + psllw $2, %%xmm0 # XMM0: fixed point 8.2 \n\ + pmulhw %%xmm7, %%xmm0 # XMM0: multiply by 255/219>>2 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: G3..G0, saturated \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: G3..G0 in 16 bits \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: ---3---2---1---0 \n\ + movdqa %%xmm0, %%xmm1 # XMM1: ---3---2---1---0 \n\ + pslldq $1, %%xmm1 # XMM1: --3---2---1---0- \n\ + movdqa %%xmm0, %%xmm2 # XMM2: ---3---2---1---0 \n\ + pslldq $2, %%xmm2 # XMM2: -3---2---1---0-- \n\ + por %%xmm1, %%xmm0 # XMM0: --33--22--11--00 \n\ + por %%xmm2, %%xmm0 # XMM0: -333-222-111-000 \n\ + movntdq %%xmm0, -16("EDI","ECX",4) \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (Y_GRAY), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +static int y8_argb32_sse2(uint8_t **src, uint8_t **dest, int width, int height) +{ + asm("movdqa ("EDX"), %%xmm7 # constant: 255/219 \n\ + movdqa 32("EDX"), %%xmm6 # constant: 16 \n\ + pxor %%xmm4, %%xmm4 # constant: 0 \n" + SIMD_LOOP_WRAPPER( + /* blocksize */ 4, + /* push_regs */ "", + /* pop_regs */ "", + /* small_loop */ "\ + movzbl -1("ESI","ECX"), %%eax # retrieve Y byte \n\ + subl $16, %%eax # subtract 16 \n\ + imull %3, %%eax # multiply by 255/219 \n\ + shrl $14, %%eax # shift down to 8 bits \n\ + testb %%ah, %%ah # saturate to 0..255 \n\ + movl $-1, %%edx \n\ + cmovnz %%edx, %%eax \n\ + movl $0, %%edx \n\ + cmovs %%edx, %%eax \n\ + movb %%al, -3("EDI","ECX",4) # and store \n\ + movb %%al, -2("EDI","ECX",4) \n\ + movb %%al, -1("EDI","ECX",4) \n", + /* main_loop */ "\ + movd -4("ESI","ECX"), %%xmm0 # XMM0: Y3..Y0 \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: Y3..Y0 in 16 bits \n\ + psubw %%xmm6, %%xmm0 # XMM0: unbias by 16 \n\ + psllw $2, %%xmm0 # XMM0: fixed point 8.2 \n\ + pmulhw %%xmm7, %%xmm0 # XMM0: multiply by 255/219>>2 \n\ + packuswb %%xmm0, %%xmm0 # XMM0: G3..G0, saturated \n\ + punpcklbw %%xmm4, %%xmm0 # XMM0: G3..G0 in 16 bits \n\ + movdqa %%xmm4, %%xmm3 # XMM3: 0 \n\ + punpcklbw %%xmm0, %%xmm3 # XMM3: --3---2---1---0- \n\ + movdqa %%xmm3, %%xmm1 # XMM1: --3---2---1---0- \n\ + pslldq $1, %%xmm1 # XMM1: -3---2---1---0-- \n\ + movdqa %%xmm3, %%xmm2 # XMM2: --3---2---1---0- \n\ + pslldq $2, %%xmm2 # XMM2: 3---2---1---0--- \n\ + por %%xmm1, %%xmm3 # XMM3: -33--22--11--00- \n\ + por %%xmm2, %%xmm3 # XMM3: 333-222-111-000- \n\ + movntdq %%xmm3, -16("EDI","ECX",4) \n", + /* emms */ "emms") + : /* no outputs */ + : "S" (src[0]), "D" (dest[0]), "c" (width*height), + "i" (Y_GRAY), "d" (&gray_data), "m" (gray_data) + : "eax"); + return 1; +} + +/*************************************************************************/ + +#endif /* HAVE_ASM_SSE2 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* Initialization */ + +int ac_imgconvert_init_yuv_rgb(int accel) +{ + /******** Standard C implementations ********/ + + //---- YUV->RGB ----// + + if (!register_conversion(IMG_YUV420P, IMG_RGB24, yuv420p_rgb24) + || !register_conversion(IMG_YUV411P, IMG_RGB24, yuv411p_rgb24) + || !register_conversion(IMG_YUV422P, IMG_RGB24, yuv422p_rgb24) + || !register_conversion(IMG_YUV444P, IMG_RGB24, yuv444p_rgb24) + || !register_conversion(IMG_YUY2, IMG_RGB24, yuy2_rgb24) + || !register_conversion(IMG_UYVY, IMG_RGB24, uyvy_rgb24) + || !register_conversion(IMG_YVYU, IMG_RGB24, yvyu_rgb24) + || !register_conversion(IMG_Y8, IMG_RGB24, y8_rgb24) + + || !register_conversion(IMG_YUV420P, IMG_BGR24, yuv420p_bgr24) + || !register_conversion(IMG_YUV411P, IMG_BGR24, yuv411p_bgr24) + || !register_conversion(IMG_YUV422P, IMG_BGR24, yuv422p_bgr24) + || !register_conversion(IMG_YUV444P, IMG_BGR24, yuv444p_bgr24) + || !register_conversion(IMG_YUY2, IMG_BGR24, yuy2_bgr24) + || !register_conversion(IMG_UYVY, IMG_BGR24, uyvy_bgr24) + || !register_conversion(IMG_YVYU, IMG_BGR24, yvyu_bgr24) + || !register_conversion(IMG_Y8, IMG_BGR24, y8_rgb24) + + || !register_conversion(IMG_YUV420P, IMG_RGBA32, yuv420p_rgba32) + || !register_conversion(IMG_YUV411P, IMG_RGBA32, yuv411p_rgba32) + || !register_conversion(IMG_YUV422P, IMG_RGBA32, yuv422p_rgba32) + || !register_conversion(IMG_YUV444P, IMG_RGBA32, yuv444p_rgba32) + || !register_conversion(IMG_YUY2, IMG_RGBA32, yuy2_rgba32) + || !register_conversion(IMG_UYVY, IMG_RGBA32, uyvy_rgba32) + || !register_conversion(IMG_YVYU, IMG_RGBA32, yvyu_rgba32) + || !register_conversion(IMG_Y8, IMG_RGBA32, y8_rgba32) + + || !register_conversion(IMG_YUV420P, IMG_ABGR32, yuv420p_abgr32) + || !register_conversion(IMG_YUV411P, IMG_ABGR32, yuv411p_abgr32) + || !register_conversion(IMG_YUV422P, IMG_ABGR32, yuv422p_abgr32) + || !register_conversion(IMG_YUV444P, IMG_ABGR32, yuv444p_abgr32) + || !register_conversion(IMG_YUY2, IMG_ABGR32, yuy2_abgr32) + || !register_conversion(IMG_UYVY, IMG_ABGR32, uyvy_abgr32) + || !register_conversion(IMG_YVYU, IMG_ABGR32, yvyu_abgr32) + || !register_conversion(IMG_Y8, IMG_ABGR32, y8_argb32) + + || !register_conversion(IMG_YUV420P, IMG_ARGB32, yuv420p_argb32) + || !register_conversion(IMG_YUV411P, IMG_ARGB32, yuv411p_argb32) + || !register_conversion(IMG_YUV422P, IMG_ARGB32, yuv422p_argb32) + || !register_conversion(IMG_YUV444P, IMG_ARGB32, yuv444p_argb32) + || !register_conversion(IMG_YUY2, IMG_ARGB32, yuy2_argb32) + || !register_conversion(IMG_UYVY, IMG_ARGB32, uyvy_argb32) + || !register_conversion(IMG_YVYU, IMG_ARGB32, yvyu_argb32) + || !register_conversion(IMG_Y8, IMG_ARGB32, y8_argb32) + + || !register_conversion(IMG_YUV420P, IMG_BGRA32, yuv420p_bgra32) + || !register_conversion(IMG_YUV411P, IMG_BGRA32, yuv411p_bgra32) + || !register_conversion(IMG_YUV422P, IMG_BGRA32, yuv422p_bgra32) + || !register_conversion(IMG_YUV444P, IMG_BGRA32, yuv444p_bgra32) + || !register_conversion(IMG_YUY2, IMG_BGRA32, yuy2_bgra32) + || !register_conversion(IMG_UYVY, IMG_BGRA32, uyvy_bgra32) + || !register_conversion(IMG_YVYU, IMG_BGRA32, yvyu_bgra32) + || !register_conversion(IMG_Y8, IMG_BGRA32, y8_rgba32) + + //---- RGB->YUV ----// + + || !register_conversion(IMG_RGB24, IMG_YUV420P, rgb24_yuv420p) + || !register_conversion(IMG_RGB24, IMG_YUV411P, rgb24_yuv411p) + || !register_conversion(IMG_RGB24, IMG_YUV422P, rgb24_yuv422p) + || !register_conversion(IMG_RGB24, IMG_YUV444P, rgb24_yuv444p) + || !register_conversion(IMG_RGB24, IMG_YUY2, rgb24_yuy2) + || !register_conversion(IMG_RGB24, IMG_UYVY, rgb24_uyvy) + || !register_conversion(IMG_RGB24, IMG_YVYU, rgb24_yvyu) + || !register_conversion(IMG_RGB24, IMG_Y8, rgb24_y8) + + || !register_conversion(IMG_BGR24, IMG_YUV420P, bgr24_yuv420p) + || !register_conversion(IMG_BGR24, IMG_YUV411P, bgr24_yuv411p) + || !register_conversion(IMG_BGR24, IMG_YUV422P, bgr24_yuv422p) + || !register_conversion(IMG_BGR24, IMG_YUV444P, bgr24_yuv444p) + || !register_conversion(IMG_BGR24, IMG_YUY2, bgr24_yuy2) + || !register_conversion(IMG_BGR24, IMG_UYVY, bgr24_uyvy) + || !register_conversion(IMG_BGR24, IMG_YVYU, bgr24_yvyu) + || !register_conversion(IMG_BGR24, IMG_Y8, bgr24_y8) + + || !register_conversion(IMG_RGBA32, IMG_YUV420P, rgba32_yuv420p) + || !register_conversion(IMG_RGBA32, IMG_YUV411P, rgba32_yuv411p) + || !register_conversion(IMG_RGBA32, IMG_YUV422P, rgba32_yuv422p) + || !register_conversion(IMG_RGBA32, IMG_YUV444P, rgba32_yuv444p) + || !register_conversion(IMG_RGBA32, IMG_YUY2, rgba32_yuy2) + || !register_conversion(IMG_RGBA32, IMG_UYVY, rgba32_uyvy) + || !register_conversion(IMG_RGBA32, IMG_YVYU, rgba32_yvyu) + || !register_conversion(IMG_RGBA32, IMG_Y8, rgba32_y8) + + || !register_conversion(IMG_ABGR32, IMG_YUV420P, abgr32_yuv420p) + || !register_conversion(IMG_ABGR32, IMG_YUV411P, abgr32_yuv411p) + || !register_conversion(IMG_ABGR32, IMG_YUV422P, abgr32_yuv422p) + || !register_conversion(IMG_ABGR32, IMG_YUV444P, abgr32_yuv444p) + || !register_conversion(IMG_ABGR32, IMG_YUY2, abgr32_yuy2) + || !register_conversion(IMG_ABGR32, IMG_UYVY, abgr32_uyvy) + || !register_conversion(IMG_ABGR32, IMG_YVYU, abgr32_yvyu) + || !register_conversion(IMG_ABGR32, IMG_Y8, abgr32_y8) + + || !register_conversion(IMG_ARGB32, IMG_YUV420P, argb32_yuv420p) + || !register_conversion(IMG_ARGB32, IMG_YUV411P, argb32_yuv411p) + || !register_conversion(IMG_ARGB32, IMG_YUV422P, argb32_yuv422p) + || !register_conversion(IMG_ARGB32, IMG_YUV444P, argb32_yuv444p) + || !register_conversion(IMG_ARGB32, IMG_YUY2, argb32_yuy2) + || !register_conversion(IMG_ARGB32, IMG_UYVY, argb32_uyvy) + || !register_conversion(IMG_ARGB32, IMG_YVYU, argb32_yvyu) + || !register_conversion(IMG_ARGB32, IMG_Y8, argb32_y8) + + || !register_conversion(IMG_BGRA32, IMG_YUV420P, bgra32_yuv420p) + || !register_conversion(IMG_BGRA32, IMG_YUV411P, bgra32_yuv411p) + || !register_conversion(IMG_BGRA32, IMG_YUV422P, bgra32_yuv422p) + || !register_conversion(IMG_BGRA32, IMG_YUV444P, bgra32_yuv444p) + || !register_conversion(IMG_BGRA32, IMG_YUY2, bgra32_yuy2) + || !register_conversion(IMG_BGRA32, IMG_UYVY, bgra32_uyvy) + || !register_conversion(IMG_BGRA32, IMG_YVYU, bgra32_yvyu) + || !register_conversion(IMG_BGRA32, IMG_Y8, bgra32_y8) + + //---- Grayscale ----// + + || !register_conversion(IMG_YUV420P, IMG_GRAY8, yuvp_gray8) + || !register_conversion(IMG_YUV411P, IMG_GRAY8, yuvp_gray8) + || !register_conversion(IMG_YUV422P, IMG_GRAY8, yuvp_gray8) + || !register_conversion(IMG_YUV444P, IMG_GRAY8, yuvp_gray8) + || !register_conversion(IMG_YUY2, IMG_GRAY8, yuy2_gray8) + || !register_conversion(IMG_UYVY, IMG_GRAY8, uyvy_gray8) + || !register_conversion(IMG_YVYU, IMG_GRAY8, yuy2_gray8) + || !register_conversion(IMG_Y8, IMG_GRAY8, yuvp_gray8) + + || !register_conversion(IMG_GRAY8, IMG_YUV420P, gray8_yuv420p) + || !register_conversion(IMG_GRAY8, IMG_YUV411P, gray8_yuv411p) + || !register_conversion(IMG_GRAY8, IMG_YUV422P, gray8_yuv422p) + || !register_conversion(IMG_GRAY8, IMG_YUV444P, gray8_yuv444p) + || !register_conversion(IMG_GRAY8, IMG_YUY2, gray8_yuy2) + || !register_conversion(IMG_GRAY8, IMG_UYVY, gray8_uyvy) + || !register_conversion(IMG_GRAY8, IMG_YVYU, gray8_yuy2) + || !register_conversion(IMG_GRAY8, IMG_Y8, gray8_y8) + ) { + return 0; + } + + /******** MMX implementations ********/ + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) + if (accel & AC_MMX) { + + //---- YUV->RGB ----// + + if (!register_conversion(IMG_YUV420P, IMG_RGB24, yuv420p_rgb24_mmx) + || !register_conversion(IMG_YUV422P, IMG_RGB24, yuv422p_rgb24_mmx) + || !register_conversion(IMG_YUV420P, IMG_BGR24, yuv420p_bgr24_mmx) + || !register_conversion(IMG_YUV422P, IMG_BGR24, yuv422p_bgr24_mmx) + || !register_conversion(IMG_YUV420P, IMG_RGBA32, yuv420p_rgba32_mmx) + || !register_conversion(IMG_YUV422P, IMG_RGBA32, yuv422p_rgba32_mmx) + || !register_conversion(IMG_YUV420P, IMG_ABGR32, yuv420p_abgr32_mmx) + || !register_conversion(IMG_YUV422P, IMG_ABGR32, yuv422p_abgr32_mmx) + || !register_conversion(IMG_YUV420P, IMG_ARGB32, yuv420p_argb32_mmx) + || !register_conversion(IMG_YUV422P, IMG_ARGB32, yuv422p_argb32_mmx) + || !register_conversion(IMG_YUV420P, IMG_BGRA32, yuv420p_bgra32_mmx) + || !register_conversion(IMG_YUV422P, IMG_BGRA32, yuv422p_bgra32_mmx) + ) { + return 0; + } + } +#endif + + /******** SSE2 implementations ********/ + +#if defined(HAVE_ASM_SSE2) + if (HAS_ACCEL(accel, AC_SSE2)) { + + //---- YUV->RGB ----// + if (!register_conversion(IMG_YUV420P, IMG_RGB24, yuv420p_rgb24_sse2) + || !register_conversion(IMG_YUV411P, IMG_RGB24, yuv411p_rgb24_sse2) + || !register_conversion(IMG_YUV422P, IMG_RGB24, yuv422p_rgb24_sse2) + || !register_conversion(IMG_YUV444P, IMG_RGB24, yuv444p_rgb24_sse2) + || !register_conversion(IMG_YUY2, IMG_RGB24, yuy2_rgb24_sse2) + || !register_conversion(IMG_UYVY, IMG_RGB24, uyvy_rgb24_sse2) + || !register_conversion(IMG_YVYU, IMG_RGB24, yvyu_rgb24_sse2) + || !register_conversion(IMG_Y8, IMG_RGB24, y8_rgb24_sse2) + + || !register_conversion(IMG_YUV420P, IMG_BGR24, yuv420p_bgr24_sse2) + || !register_conversion(IMG_YUV411P, IMG_BGR24, yuv411p_bgr24_sse2) + || !register_conversion(IMG_YUV422P, IMG_BGR24, yuv422p_bgr24_sse2) + || !register_conversion(IMG_YUV444P, IMG_BGR24, yuv444p_bgr24_sse2) + || !register_conversion(IMG_YUY2, IMG_BGR24, yuy2_bgr24_sse2) + || !register_conversion(IMG_UYVY, IMG_BGR24, uyvy_bgr24_sse2) + || !register_conversion(IMG_YVYU, IMG_BGR24, yvyu_bgr24_sse2) + || !register_conversion(IMG_Y8, IMG_BGR24, y8_rgb24_sse2) + + || !register_conversion(IMG_YUV420P, IMG_RGBA32, yuv420p_rgba32_sse2) + || !register_conversion(IMG_YUV411P, IMG_RGBA32, yuv411p_rgba32_sse2) + || !register_conversion(IMG_YUV422P, IMG_RGBA32, yuv422p_rgba32_sse2) + || !register_conversion(IMG_YUV444P, IMG_RGBA32, yuv444p_rgba32_sse2) + || !register_conversion(IMG_YUY2, IMG_RGBA32, yuy2_rgba32_sse2) + || !register_conversion(IMG_UYVY, IMG_RGBA32, uyvy_rgba32_sse2) + || !register_conversion(IMG_YVYU, IMG_RGBA32, yvyu_rgba32_sse2) + || !register_conversion(IMG_Y8, IMG_RGBA32, y8_rgba32_sse2) + + || !register_conversion(IMG_YUV420P, IMG_ABGR32, yuv420p_abgr32_sse2) + || !register_conversion(IMG_YUV411P, IMG_ABGR32, yuv411p_abgr32_sse2) + || !register_conversion(IMG_YUV422P, IMG_ABGR32, yuv422p_abgr32_sse2) + || !register_conversion(IMG_YUV444P, IMG_ABGR32, yuv444p_abgr32_sse2) + || !register_conversion(IMG_YUY2, IMG_ABGR32, yuy2_abgr32_sse2) + || !register_conversion(IMG_UYVY, IMG_ABGR32, uyvy_abgr32_sse2) + || !register_conversion(IMG_YVYU, IMG_ABGR32, yvyu_abgr32_sse2) + || !register_conversion(IMG_Y8, IMG_ABGR32, y8_argb32_sse2) + + || !register_conversion(IMG_YUV420P, IMG_ARGB32, yuv420p_argb32_sse2) + || !register_conversion(IMG_YUV411P, IMG_ARGB32, yuv411p_argb32_sse2) + || !register_conversion(IMG_YUV422P, IMG_ARGB32, yuv422p_argb32_sse2) + || !register_conversion(IMG_YUV444P, IMG_ARGB32, yuv444p_argb32_sse2) + || !register_conversion(IMG_YUY2, IMG_ARGB32, yuy2_argb32_sse2) + || !register_conversion(IMG_UYVY, IMG_ARGB32, uyvy_argb32_sse2) + || !register_conversion(IMG_YVYU, IMG_ARGB32, yvyu_argb32_sse2) + || !register_conversion(IMG_Y8, IMG_ARGB32, y8_argb32_sse2) + + || !register_conversion(IMG_YUV420P, IMG_BGRA32, yuv420p_bgra32_sse2) + || !register_conversion(IMG_YUV411P, IMG_BGRA32, yuv411p_bgra32_sse2) + || !register_conversion(IMG_YUV422P, IMG_BGRA32, yuv422p_bgra32_sse2) + || !register_conversion(IMG_YUV444P, IMG_BGRA32, yuv444p_bgra32_sse2) + || !register_conversion(IMG_YUY2, IMG_BGRA32, yuy2_bgra32_sse2) + || !register_conversion(IMG_UYVY, IMG_BGRA32, uyvy_bgra32_sse2) + || !register_conversion(IMG_YVYU, IMG_BGRA32, yvyu_bgra32_sse2) + || !register_conversion(IMG_Y8, IMG_BGRA32, y8_rgba32_sse2) + + //---- RGB->YUV ----// + + || !register_conversion(IMG_RGB24, IMG_YUV420P, rgb24_yuv420p_sse2) + || !register_conversion(IMG_RGB24, IMG_YUV411P, rgb24_yuv411p_sse2) + || !register_conversion(IMG_RGB24, IMG_YUV422P, rgb24_yuv422p_sse2) + || !register_conversion(IMG_RGB24, IMG_YUV444P, rgb24_yuv444p_sse2) + || !register_conversion(IMG_RGB24, IMG_YUY2, rgb24_yuy2_sse2) + || !register_conversion(IMG_RGB24, IMG_UYVY, rgb24_uyvy_sse2) + || !register_conversion(IMG_RGB24, IMG_YVYU, rgb24_yvyu_sse2) + || !register_conversion(IMG_RGB24, IMG_Y8, rgb24_y8_sse2) + + || !register_conversion(IMG_BGR24, IMG_YUV420P, bgr24_yuv420p_sse2) + || !register_conversion(IMG_BGR24, IMG_YUV411P, bgr24_yuv411p_sse2) + || !register_conversion(IMG_BGR24, IMG_YUV422P, bgr24_yuv422p_sse2) + || !register_conversion(IMG_BGR24, IMG_YUV444P, bgr24_yuv444p_sse2) + || !register_conversion(IMG_BGR24, IMG_YUY2, bgr24_yuy2_sse2) + || !register_conversion(IMG_BGR24, IMG_UYVY, bgr24_uyvy_sse2) + || !register_conversion(IMG_BGR24, IMG_YVYU, bgr24_yvyu_sse2) + || !register_conversion(IMG_BGR24, IMG_Y8, bgr24_y8_sse2) + + || !register_conversion(IMG_RGBA32, IMG_YUV420P, rgba32_yuv420p_sse2) + || !register_conversion(IMG_RGBA32, IMG_YUV411P, rgba32_yuv411p_sse2) + || !register_conversion(IMG_RGBA32, IMG_YUV422P, rgba32_yuv422p_sse2) + || !register_conversion(IMG_RGBA32, IMG_YUV444P, rgba32_yuv444p_sse2) + || !register_conversion(IMG_RGBA32, IMG_YUY2, rgba32_yuy2_sse2) + || !register_conversion(IMG_RGBA32, IMG_UYVY, rgba32_uyvy_sse2) + || !register_conversion(IMG_RGBA32, IMG_YVYU, rgba32_yvyu_sse2) + || !register_conversion(IMG_RGBA32, IMG_Y8, rgba32_y8_sse2) + + || !register_conversion(IMG_ABGR32, IMG_YUV420P, abgr32_yuv420p_sse2) + || !register_conversion(IMG_ABGR32, IMG_YUV411P, abgr32_yuv411p_sse2) + || !register_conversion(IMG_ABGR32, IMG_YUV422P, abgr32_yuv422p_sse2) + || !register_conversion(IMG_ABGR32, IMG_YUV444P, abgr32_yuv444p_sse2) + || !register_conversion(IMG_ABGR32, IMG_YUY2, abgr32_yuy2_sse2) + || !register_conversion(IMG_ABGR32, IMG_UYVY, abgr32_uyvy_sse2) + || !register_conversion(IMG_ABGR32, IMG_YVYU, abgr32_yvyu_sse2) + || !register_conversion(IMG_ABGR32, IMG_Y8, abgr32_y8_sse2) + + || !register_conversion(IMG_ARGB32, IMG_YUV420P, argb32_yuv420p_sse2) + || !register_conversion(IMG_ARGB32, IMG_YUV411P, argb32_yuv411p_sse2) + || !register_conversion(IMG_ARGB32, IMG_YUV422P, argb32_yuv422p_sse2) + || !register_conversion(IMG_ARGB32, IMG_YUV444P, argb32_yuv444p_sse2) + || !register_conversion(IMG_ARGB32, IMG_YUY2, argb32_yuy2_sse2) + || !register_conversion(IMG_ARGB32, IMG_UYVY, argb32_uyvy_sse2) + || !register_conversion(IMG_ARGB32, IMG_YVYU, argb32_yvyu_sse2) + || !register_conversion(IMG_ARGB32, IMG_Y8, argb32_y8_sse2) + + || !register_conversion(IMG_BGRA32, IMG_YUV420P, bgra32_yuv420p_sse2) + || !register_conversion(IMG_BGRA32, IMG_YUV411P, bgra32_yuv411p_sse2) + || !register_conversion(IMG_BGRA32, IMG_YUV422P, bgra32_yuv422p_sse2) + || !register_conversion(IMG_BGRA32, IMG_YUV444P, bgra32_yuv444p_sse2) + || !register_conversion(IMG_BGRA32, IMG_YUY2, bgra32_yuy2_sse2) + || !register_conversion(IMG_BGRA32, IMG_UYVY, bgra32_uyvy_sse2) + || !register_conversion(IMG_BGRA32, IMG_YVYU, bgra32_yvyu_sse2) + || !register_conversion(IMG_BGRA32, IMG_Y8, bgra32_y8_sse2) + + //---- Grayscale ----// + + || !register_conversion(IMG_GRAY8, IMG_YUY2, gray8_yuy2_sse2) + || !register_conversion(IMG_GRAY8, IMG_UYVY, gray8_uyvy_sse2) + || !register_conversion(IMG_GRAY8, IMG_YVYU, gray8_yuy2_sse2) + || !register_conversion(IMG_GRAY8, IMG_Y8, gray8_y8_sse2) + ) { + return 0; + } + } + + /* YUV->GRAY8 routines use CMOVcc */ + if (HAS_ACCEL(accel, AC_CMOVE|AC_SSE2)) { + if (!register_conversion(IMG_YUV420P, IMG_GRAY8, yuvp_gray8_sse2) + || !register_conversion(IMG_YUV411P, IMG_GRAY8, yuvp_gray8_sse2) + || !register_conversion(IMG_YUV422P, IMG_GRAY8, yuvp_gray8_sse2) + || !register_conversion(IMG_YUV444P, IMG_GRAY8, yuvp_gray8_sse2) + || !register_conversion(IMG_YUY2, IMG_GRAY8, yuy2_gray8_sse2) + || !register_conversion(IMG_UYVY, IMG_GRAY8, uyvy_gray8_sse2) + || !register_conversion(IMG_YVYU, IMG_GRAY8, yuy2_gray8_sse2) + || !register_conversion(IMG_Y8, IMG_GRAY8, yuvp_gray8_sse2) + ) { + return 0; + } + } +#endif + + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/imgconvert.c b/veejay-server/aclib/imgconvert.c new file mode 100644 index 00000000..cc502977 --- /dev/null +++ b/veejay-server/aclib/imgconvert.c @@ -0,0 +1,119 @@ +/* + * imgconvert.c - image format conversion routines + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "imgconvert.h" +#include "img_internal.h" + +#include +#include + +/*************************************************************************/ + +static struct { + ImageFormat srcfmt, destfmt; + ConversionFunc func; +} *conversions; +static int n_conversions = 0; + +/*************************************************************************/ +/*************************************************************************/ + +/* Image conversion routine. src and dest are arrays of pointers to planes + * (for packed formats with only one plane, just use `&data'); srcfmt and + * destfmt specify the source and destination image formats (IMG_*). + * width and height are in pixels. Returns 1 on success, 0 on failure. */ + +int ac_imgconvert(uint8_t **src, ImageFormat srcfmt, + uint8_t **dest, ImageFormat destfmt, + int width, int height) +{ + int i; + + /* Hack to handle YV12 easily, because conversion routines don't get + * format tags */ + uint8_t *newsrc[3], *newdest[3]; + if (srcfmt == IMG_YV12) { + srcfmt = IMG_YUV420P; + newsrc[0] = src[0]; + newsrc[1] = src[2]; + newsrc[2] = src[1]; + src = newsrc; + } + if (destfmt == IMG_YV12) { + destfmt = IMG_YUV420P; + newdest[0] = dest[0]; + newdest[1] = dest[2]; + newdest[2] = dest[1]; + dest = newdest; + } + + for (i = 0; i < n_conversions; i++) { + if (conversions[i].srcfmt==srcfmt && conversions[i].destfmt==destfmt) + return (*conversions[i].func)(src, dest, width, height); + } + + return 0; +} + +/*************************************************************************/ +/*************************************************************************/ + +/* Internal use only! */ + +int ac_imgconvert_init(int accel) +{ + if (!ac_imgconvert_init_yuv_planar(accel) + || !ac_imgconvert_init_yuv_packed(accel) + || !ac_imgconvert_init_yuv_mixed(accel) + || !ac_imgconvert_init_yuv_rgb(accel) + || !ac_imgconvert_init_rgb_packed(accel) + ) { + fprintf(stderr, "ac_imgconvert_init() failed"); + return 0; + } + return 1; +} + +int register_conversion(ImageFormat srcfmt, ImageFormat destfmt, + ConversionFunc function) +{ + int i; + + for (i = 0; i < n_conversions; i++) { + if (conversions[i].srcfmt==srcfmt && conversions[i].destfmt==destfmt) { + conversions[i].func = function; + return 1; + } + } + + if (!(conversions = realloc(conversions, + (n_conversions+1) * sizeof(*conversions)))) { + fprintf(stderr, "register_conversion(): out of memory\n"); + return 0; + } + conversions[n_conversions].srcfmt = srcfmt; + conversions[n_conversions].destfmt = destfmt; + conversions[n_conversions].func = function; + n_conversions++; + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/imgconvert.h b/veejay-server/aclib/imgconvert.h new file mode 100644 index 00000000..c02d5a01 --- /dev/null +++ b/veejay-server/aclib/imgconvert.h @@ -0,0 +1,105 @@ +/* + * imgconvert.h - defines for image format conversion routines + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#ifndef ACLIB_IMGCONVERT_H +#define ACLIB_IMGCONVERT_H + +/*************************************************************************/ + +/* Image format defines */ +typedef enum { + IMG_UNKNOWN = 0, /* Unknown/unset (dummy value, guaranteed to be 0) */ + /* YUV formats */ + IMG_YUV_BASE = 0x1000, + IMG_YUV420P, /* YUV planar, 1 U/V per 2x2 Y pixels */ + IMG_YV12, /* YUV420P with U and V reversed */ + IMG_YUV411P, /* YUV planar, 1 U/V per 4x1 Y pixels */ + IMG_YUV422P, /* YUV planar, 1 U/V per 2x1 Y pixels */ + IMG_YUV444P, /* YUV planar, 1 U/V per 1x1 Y pixels */ + IMG_YUY2, /* YUV packed, 1 U/V per 2x1 Y pixels, Y:U:Y:V */ + IMG_UYVY, /* YUV packed, 1 U/V per 2x1 Y pixels, U:Y:V:Y */ + IMG_YVYU, /* YUV packed, 1 U/V per 2x1 Y pixels, Y:V:Y:U */ + IMG_Y8, /* Y-only 8-bit data */ + IMG_YUV_LAST, + /* RGB formats */ + IMG_RGB_BASE = 0x2000, + IMG_RGB24, /* RGB packed, 8 bits per component, R:G:B */ + IMG_BGR24, /* RGB packed, 8 bits per component, B:G:R */ + IMG_RGBA32, /* RGB+alpha packed, 8 bits per component, R:G:B:A */ + IMG_ABGR32, /* RGB+alpha packed, 8 bits per component, A:B:G:R */ + IMG_ARGB32, /* RGB+alpha packed, 8 bits per component, A:R:G:B */ + IMG_BGRA32, /* RGB+alpha packed, 8 bits per component, B:G:R:A */ + IMG_GRAY8, /* Grayscale 8-bit data */ + IMG_RGB_LAST, +} ImageFormat; + +/* Alias */ +#define IMG_NONE IMG_UNKNOWN + +/* Default YUV and RGB formats */ +#define IMG_YUV_DEFAULT IMG_YUV420P +#define IMG_RGB_DEFAULT IMG_RGB24 + +/* Is the given image format a YUV/RGB one? */ +#define IS_YUV_FORMAT(fmt) ((fmt) > IMG_YUV_BASE && (fmt) < IMG_YUV_LAST) +#define IS_RGB_FORMAT(fmt) ((fmt) > IMG_RGB_BASE && (fmt) < IMG_RGB_LAST) + +/* U/V plane size for YUV planar formats (Y plane size is always w*h) */ +#define UV_PLANE_SIZE(fmt,w,h) \ + ((fmt)==IMG_YUV420P ? ((w)/2)*((h)/2) : \ + (fmt)==IMG_YV12 ? ((w)/2)*((h)/2) : \ + (fmt)==IMG_YUV411P ? ((w)/4)* (h) : \ + (fmt)==IMG_YUV422P ? ((w)/2)* (h) : \ + (fmt)==IMG_YUV444P ? (w) * (h) : 0) + +/* Macro to initialize an array of planes from a buffer */ +#define YUV_INIT_PLANES(planes,buffer,fmt,w,h) \ + ((planes)[0] = (buffer), \ + (planes)[1] = (planes)[0] + (w)*(h), \ + (planes)[2] = (planes)[1] + UV_PLANE_SIZE((fmt),(w),(h))) + +#if 0 +/* Structure describing an image. FIXME: not currently used--this should + * eventually replace the (planes,format) pairs passed to ac_imgconvert. */ +typedef struct { + ImageFormat format; /* Format of image data */ + int width, height; /* Size of image */ + uint8_t *planes[4]; /* Data planes (use planes[0] for packed data) */ + int stride[4]; /* Length of one row in each plane, incl. padding */ +} Image; +#endif + +/*************************************************************************/ + +/* Initialization routine. Returns 1 on success, 0 on failure. */ +extern int ac_imgconvert_init(int accel); + +/* Conversion routine. Returns 1 on success, 0 on failure. */ +extern int ac_imgconvert(uint8_t **src, /* Array of source planes */ + ImageFormat srcfmt, /* Source image format */ + uint8_t **dest, /* Array of dest planes */ + ImageFormat destfmt, /* Destination image format */ + int width, /* Image width in pixels */ + int height /* Image height in pixels */ + ); + +/*************************************************************************/ + +#endif /* ACLIB_IMGCONVERT_H */ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/memcpy.c b/veejay-server/aclib/memcpy.c new file mode 100644 index 00000000..00ca19af --- /dev/null +++ b/veejay-server/aclib/memcpy.c @@ -0,0 +1,507 @@ +/* + * memcpy.c - optimized memcpy() routines for aclib + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "ac_internal.h" +#include + +/* Use memmove because memcpy isn't guaranteed to be ascending */ +static void *(*memcpy_ptr)(void *, const void *, size_t) = memmove; + +/*************************************************************************/ + +/* External interface */ + +void *ac_memcpy(void *dest, const void *src, size_t size) +{ + return (*memcpy_ptr)(dest, src, size); +} + +/*************************************************************************/ +/*************************************************************************/ + +/* Note the check for ARCH_X86 here: this is to prevent compilation of this + * code on x86_64, since all x86_64 processors support SSE2, and because + * this code is not set up to use the 64-bit registers for addressing on + * x86_64. */ + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) + +/* MMX-optimized routine, intended for PMMX/PII processors. + * Nonstandard instructions used: + * (CPUID.MMX) MOVQ + */ + +static void *memcpy_mmx(void *dest, const void *src, size_t bytes) +{ + asm("\ +PENTIUM_LINE_SIZE = 32 # PMMX/PII cache line size \n\ +PENTIUM_CACHE_SIZE = 8192 # PMMX/PII total cache size \n\ +# Use only half because writes may touch the cache too (PII) \n\ +PENTIUM_CACHE_BLOCK = (PENTIUM_CACHE_SIZE/2 - PENTIUM_LINE_SIZE) \n\ + \n\ + push %%ebx # Save PIC register \n\ + push %%edi # Save destination for return value \n\ + cld # MOVS* should ascend \n\ + \n\ + mov $64, %%ebx # Constant \n\ + \n\ + cmp %%ebx, %%ecx \n\ + jb mmx.memcpy_last # Just use movs if <64 bytes \n\ + \n\ + # First align destination address to a multiple of 8 bytes \n\ + mov $8, %%eax # EAX <- (8-dest) & 7 \n\ + sub %%edi, %%eax \n\ + and $0b111, %%eax # ... which is the number of bytes to copy\n\ + lea 0f, %%edx # Use a computed jump--faster than a loop\n\ + sub %%eax, %%edx \n\ + jmp *%%edx # Execute 0-7 MOVSB's \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ +0: sub %%eax, %%ecx # Update count \n\ + \n\ + # Now copy data in blocks \n\ +0: mov %%ecx, %%edx # EDX <- ECX >> 6 (cache lines to copy) \n\ + shr $6, %%edx \n\ + jz mmx.memcpy_last # <64 bytes left? Skip to end \n\ + cmp $PENTIUM_CACHE_BLOCK/64, %%edx \n\ + jb 1f # Limit size of block \n\ + mov $PENTIUM_CACHE_BLOCK/64, %%edx \n\ +1: mov %%edx, %%eax # EAX <- EDX << 6 (bytes to copy) \n\ + shl $6, %%eax \n\ + sub %%eax, %%ecx # Update remaining count \n\ + add %%eax, %%esi # Point to end of region to be block-copied\n\ +2: test %%eax, -32(%%esi) # Touch each cache line in reverse order\n\ + test %%eax, -64(%%esi) \n\ + sub %%ebx, %%esi # Update pointer \n\ + sub %%ebx, %%eax # And loop \n\ + jnz 2b \n\ + # Note that ESI now points to the beginning of the block \n\ +3: movq (%%esi), %%mm0 # Do the actual copy, 64 bytes at a time\n\ + movq 8(%%esi), %%mm1 \n\ + movq 16(%%esi), %%mm2 \n\ + movq 24(%%esi), %%mm3 \n\ + movq 32(%%esi), %%mm4 \n\ + movq 40(%%esi), %%mm5 \n\ + movq 48(%%esi), %%mm6 \n\ + movq 56(%%esi), %%mm7 \n\ + movq %%mm0, (%%edi) \n\ + movq %%mm1, 8(%%edi) \n\ + movq %%mm2, 16(%%edi) \n\ + movq %%mm3, 24(%%edi) \n\ + movq %%mm4, 32(%%edi) \n\ + movq %%mm5, 40(%%edi) \n\ + movq %%mm6, 48(%%edi) \n\ + movq %%mm7, 56(%%edi) \n\ + add %%ebx, %%esi # Update pointers \n\ + add %%ebx, %%edi \n\ + dec %%edx # And loop \n\ + jnz 3b \n\ + jmp 0b \n\ + \n\ +mmx.memcpy_last: \n\ + # Copy last <64 bytes, using the computed jump trick \n\ + mov %%ecx, %%eax # EAX <- ECX>>2 \n\ + shr $2, %%eax \n\ + lea 0f, %%edx \n\ + sub %%eax, %%edx \n\ + jmp *%%edx # Execute 0-15 MOVSD's \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ +0: and $0b11, %%ecx # ECX <- ECX & 3 \n\ + lea 0f, %%edx \n\ + sub %%ecx, %%edx \n\ + jmp *%%edx # Execute 0-3 MOVSB's \n\ + movsb \n\ + movsb \n\ + movsb \n\ +0: \n\ + # All done! \n\ + emms # Clean up MMX state \n\ + pop %%edi # Restore destination (return value) \n\ + pop %%ebx # Restore PIC register \n\ + " : /* no outputs */ + : "D" (dest), "S" (src), "c" (bytes) + : "%eax", "%edx" + ); + return dest; +} + +#endif /* HAVE_ASM_MMX && ARCH_X86 */ + +/*************************************************************************/ + +#if defined(HAVE_ASM_SSE) && defined(ARCH_X86) + +/* SSE-optimized routine. Backported from AMD64 routine below. + * Nonstandard instructions used: + * (CPUID.CMOVE) CMOVA + * (CPUID.MMX) MOVQ + * (CPUID.SSE) MOVNTQ + */ + +static void *memcpy_sse(void *dest, const void *src, size_t bytes) +{ + asm("\ + push %%ebx # Save PIC register \n\ + push %%edi # Save destination for return value \n\ + cld # MOVS* should ascend \n\ + \n\ + cmp $64, %%ecx # Skip block copy for small blocks \n\ + jb sse.memcpy_last \n\ + \n\ + mov $128, %%ebx # Constant used later \n\ + \n\ + # First align destination address to a multiple of 8 bytes \n\ + mov $8, %%eax # EAX <- (8-dest) & 7 \n\ + sub %%edi, %%eax \n\ + and $0b111, %%eax # ... which is the number of bytes to copy\n\ + lea 0f, %%edx # Use a computed jump--faster than a loop\n\ + sub %%eax, %%edx \n\ + jmp *%%edx # Execute 0-7 MOVSB's \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ +0: sub %%eax, %%ecx # Update count \n\ + \n\ + cmp $0x10040, %%ecx # Is this a large block? (0x10040 is an \n\ + # arbitrary value where prefetching and \n\ + # write combining seem to start becoming\n\ + # faster) \n\ + jae sse.memcpy_bp # Yup, use prefetch copy \n\ + \n\ +sse.memcpy_small: # Small block copy routine--no prefetch \n" +#if 0 +" mov %%ecx, %%edx # EDX <- bytes to copy / 8 \n\ + shr $3, %%edx \n\ + mov %%edx, %%eax # Leave remainder in ECX for later \n\ + shl $3, %%eax \n\ + sub %%eax, %%ecx \n\ + .align 16 \n\ +0: movq (%%esi), %%mm0 # Copy 8 bytes of data \n\ + movq %%mm0, (%%edi) \n\ + add $8, %%esi # Update pointers \n\ + add $8, %%edi \n\ + dec %%edx # And loop \n\ + jg 0b \n\ + jmp sse.memcpy_last # Copy any remaining bytes \n\ + \n\ + nop # Align loops below \n" +#else +" # It appears that a simple rep movs is faster than cleverness \n\ + # with movq... \n\ + mov %%ecx, %%edx # EDX <- ECX & 3 \n\ + and $0b11, %%edx \n\ + shr $2, %%ecx # ECX <- ECX >> 2 \n\ + rep movsl # Copy away! \n\ + mov %%edx, %%ecx # Take care of last 0-3 bytes \n\ + rep movsb \n\ + jmp sse.memcpy_end # And exit \n\ + \n\ + .align 16 \n\ + nop \n\ + nop \n" +#endif +"sse.memcpy_bp: # Block prefetch copy routine \n\ +0: mov %%ecx, %%edx # EDX: temp counter \n\ + shr $6, %%edx # Divide by cache line size (64 bytes) \n\ + cmp %%ebx, %%edx # ... and cap at 128 (8192 bytes) \n\ + cmova %%ebx, %%edx \n\ + shl $3, %%edx # EDX <- cache lines to copy * 8 \n\ + mov %%edx, %%eax # EAX <- cache lines to preload * 8 \n\ + # (also used as memory offset) \n\ +1: test %%eax, -64(%%esi,%%eax,8) # Preload cache lines in pairs \n\ + test %%eax, -128(%%esi,%%eax,8) # (going backwards) \n\ + # (note that test %%eax,... seems to be faster than prefetchnta \n\ + # on x86) \n\ + sub $16, %%eax # And loop \n\ + jg 1b \n\ + \n\ + # Then copy--forward, which seems to be faster than reverse for \n\ + # certain alignments \n\ + xor %%eax, %%eax \n\ +2: movq (%%esi,%%eax,8), %%mm0 # Copy 8 bytes and loop \n\ + movntq %%mm0, (%%edi,%%eax,8) \n\ + inc %%eax \n\ + cmp %%edx, %%eax \n\ + jb 2b \n\ + \n\ + # Finally, update pointers and count, and loop \n\ + shl $3, %%edx # EDX <- bytes copied \n\ + add %%edx, %%esi \n\ + add %%edx, %%edi \n\ + sub %%edx, %%ecx \n\ + cmp $64, %%ecx # At least one cache line left? \n\ + jae 0b # Yup, loop \n\ + \n\ +sse.memcpy_last: \n\ + # Copy last <64 bytes, using the computed jump trick \n\ + mov %%ecx, %%eax # EAX <- ECX>>2 \n\ + shr $2, %%eax \n\ + lea 0f, %%edx \n\ + sub %%eax, %%edx \n\ + jmp *%%edx # Execute 0-15 MOVSD's \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ + movsd \n\ +0: and $0b11, %%ecx # ECX <- ECX & 3 \n\ + lea sse.memcpy_end, %%edx \n\ + sub %%ecx, %%edx \n\ + jmp *%%edx # Execute 0-3 MOVSB's \n\ + movsb \n\ + movsb \n\ + movsb \n\ + \n\ +sse.memcpy_end: \n\ + # All done! \n\ + emms # Clean up after MMX instructions \n\ + sfence # Flush the write buffer \n\ + pop %%edi # Restore destination (return value) \n\ + pop %%ebx # Restore PIC register \n\ + " : /* no outputs */ + : "D" (dest), "S" (src), "c" (bytes) + : "%eax", "%edx" + ); + return dest; +} + +#endif /* HAVE_ASM_SSE && ARCH_X86 */ + +/*************************************************************************/ + +#if defined(HAVE_ASM_SSE2) && defined(ARCH_X86_64) + +/* AMD64-optimized routine, using SSE2. Derived from AMD64 optimization + * guide section 5.13: Appropriate Memory Copying Routines. + * Nonstandard instructions used: + * (CPUID.CMOVE) CMOVA + * (CPUID.SSE2) MOVDQA, MOVDQU, MOVNTDQ + * + * Note that this routine will also run more or less as-is (modulo register + * names and label(%%rip) references) on x86 CPUs, but tests have shown the + * SSE1 version above to be faster. + */ + +/* The block copying code--macroized because we use two versions of it + * depending on whether the source is 16-byte-aligned or not. Pass either + * movdqa or movdqu (unquoted) for the parameter. */ +#define AMD64_BLOCK_MEMCPY(movdq) \ +" # First prefetch (note that if we end on an odd number of cache \n\ + # lines, we skip prefetching the last one--faster that way than \n\ + # prefetching line by line or treating it as a special case) \n\ +0: mov %%ecx, %%edx # EDX: temp counter (always <32 bits) \n\ + shr $6, %%edx # Divide by cache line size (64 bytes) \n\ + cmp %%ebx, %%edx # ... and cap at 128 (8192 bytes) \n\ + cmova %%ebx, %%edx \n\ + shl $3, %%edx # EDX <- cache lines to copy * 8 \n\ + mov %%edx, %%eax # EAX <- cache lines to preload * 8 \n\ + # (also used as memory offset) \n\ +1: prefetchnta -64(%%rsi,%%rax,8) # Preload cache lines in pairs \n\ + prefetchnta -128(%%rsi,%%rax,8) # (going backwards) \n\ + sub $16, %%eax # And loop \n\ + jg 1b \n\ + \n\ + # Then copy--forward, which seems to be faster than reverse for \n\ + # certain alignments \n\ + xor %%eax, %%eax \n\ +2: " #movdq " (%%rsi,%%rax,8), %%xmm0 # Copy 16 bytes and loop \n\ + movntdq %%xmm0, (%%rdi,%%rax,8) \n\ + add $2, %%eax \n\ + cmp %%edx, %%eax \n\ + jb 2b \n\ + \n\ + # Finally, update pointers and count, and loop \n\ + shl $3, %%edx # EDX <- bytes copied \n\ + add %%rdx, %%rsi \n\ + add %%rdx, %%rdi \n\ + sub %%rdx, %%rcx \n\ + cmp $64, %%rcx # At least one cache line left? \n\ + jae 0b # Yup, loop \n" + +static void *memcpy_amd64(void *dest, const void *src, size_t bytes) +{ + asm("\ + push %%rdi # Save destination for return value \n\ + cld # MOVS* should ascend \n\ + \n\ + cmp $64, %%rcx # Skip block copy for small blocks \n\ + jb amd64.memcpy_last \n\ + \n\ + mov $128, %%ebx # Constant used later \n\ + \n\ + # First align destination address to a multiple of 16 bytes \n\ + mov $8, %%eax # EAX <- (8-dest) & 7 \n\ + sub %%edi, %%eax # (we don't care about the top 32 bits) \n\ + and $0b111, %%eax # ... which is the number of bytes to copy\n\ + lea 0f(%%rip), %%rdx # Use a computed jump--faster than a loop\n\ + sub %%rax, %%rdx \n\ + jmp *%%rdx # Execute 0-7 MOVSB's \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ +0: sub %%rax, %%rcx # Update count \n\ + test $0b1000, %%edi # Is destination not 16-byte aligned? \n\ + je 1f \n\ + movsq # Then move 8 bytes to align it \n\ + sub $8, %%rcx \n\ + \n\ +1: cmp $0x38000, %%rcx # Is this a large block? (0x38000 is an \n\ + # arbitrary value where prefetching and \n\ + # write combining seem to start becoming\n\ + # faster) \n\ + jb amd64.memcpy_small # Nope, use small copy (no prefetch/WC) \n\ + test $0b1111, %%esi # Is source also 16-byte aligned? \n\ + # (use ESI to save a REX prefix byte) \n\ + jnz amd64.memcpy_normal_bp # Nope, use slow copy \n\ + jmp amd64.memcpy_fast_bp # Yup, use fast copy \n\ + \n\ +amd64.memcpy_small: # Small block copy routine--no prefetch \n\ + mov %%ecx, %%edx # EDX <- bytes to copy / 16 \n\ + shr $4, %%edx # (count known to fit in 32 bits) \n\ + mov %%edx, %%eax # Leave remainder in ECX for later \n\ + shl $4, %%eax \n\ + sub %%eax, %%ecx \n\ + .align 16 \n\ +0: movdqu (%%rsi), %%xmm0 # Copy 16 bytes of data \n\ + movdqa %%xmm0, (%%rdi) \n\ + add $16, %%rsi # Update pointers \n\ + add $16, %%rdi \n\ + dec %%edx # And loop \n\ + jnz 0b \n\ + jmp amd64.memcpy_last # Copy any remaining bytes \n\ + \n\ + .align 16 \n\ + nop \n\ + nop \n\ +amd64.memcpy_fast_bp: # Fast block prefetch loop \n" +AMD64_BLOCK_MEMCPY(movdqa) +" jmp amd64.memcpy_last # Copy any remaining bytes \n\ + \n\ + .align 16 \n\ + nop \n\ + nop \n\ +amd64.memcpy_normal_bp: # Normal (unaligned) block prefetch loop\n" +AMD64_BLOCK_MEMCPY(movdqu) +" \n\ +amd64.memcpy_last: \n\ + # Copy last <64 bytes, using the computed jump trick \n\ + mov %%ecx, %%eax # EAX <- ECX>>3 \n\ + shr $3, %%eax \n\ + lea 0f(%%rip), %%rdx \n\ + add %%eax, %%eax # Watch out, MOVSQ is 2 bytes! \n\ + sub %%rax, %%rdx \n\ + jmp *%%rdx # Execute 0-7 MOVSQ's \n\ + movsq \n\ + movsq \n\ + movsq \n\ + movsq \n\ + movsq \n\ + movsq \n\ + movsq \n\ +0: and $0b111, %%ecx # ECX <- ECX & 7 \n\ + lea 0f(%%rip), %%rdx \n\ + sub %%rcx, %%rdx \n\ + jmp *%%rdx # Execute 0-7 MOVSB's \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ + movsb \n\ +0: \n\ + # All done! \n\ + emms # Clean up after MMX instructions \n\ + sfence # Flush the write buffer \n\ + pop %%rdi # Restore destination (return value) \n\ + " : /* no outputs */ + : "D" (dest), "S" (src), "c" (bytes) + : "%rax", "%rbx", "%rdx" + ); + return dest; +} + +#endif /* HAVE_ASM_SSE2 && ARCH_X86_64 */ + +/*************************************************************************/ + +/* Initialization routine. */ + +int ac_memcpy_init(int accel) +{ + memcpy_ptr = memmove; + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) + if (HAS_ACCEL(accel, AC_MMX)) + memcpy_ptr = memcpy_mmx; +#endif + +#if defined(HAVE_ASM_SSE) && defined(ARCH_X86) + if (HAS_ACCEL(accel, AC_CMOVE|AC_SSE)) + memcpy_ptr = memcpy_sse; +#endif + +#if defined(HAVE_ASM_SSE2) && defined(ARCH_X86_64) + if (HAS_ACCEL(accel, AC_CMOVE|AC_SSE2)) + memcpy_ptr = memcpy_amd64; +#endif + + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/rescale.c b/veejay-server/aclib/rescale.c new file mode 100644 index 00000000..5a619735 --- /dev/null +++ b/veejay-server/aclib/rescale.c @@ -0,0 +1,280 @@ +/* + * rescale.c -- take the weighted average of two sets of byte data + * Written by Andrew Church + * + * This file is part of transcode, a video stream processing tool. + * transcode is free software, distributable under the terms of the GNU + * General Public License (version 2 or later). See the file COPYING + * for details. + */ + +#include "ac.h" +#include "ac_internal.h" + +static void rescale(const uint8_t *, const uint8_t *, uint8_t *, int, + uint32_t, uint32_t); +static void (*rescale_ptr)(const uint8_t *, const uint8_t *, uint8_t *, int, + uint32_t, uint32_t) = rescale; + +/*************************************************************************/ + +/* External interface */ + +void ac_rescale(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes, uint32_t weight1, uint32_t weight2) +{ + if (weight1 >= 0x10000) + ac_memcpy(dest, src1, bytes); + else if (weight2 >= 0x10000) + ac_memcpy(dest, src2, bytes); + else + (*rescale_ptr)(src1, src2, dest, bytes, weight1, weight2); +} + +/*************************************************************************/ +/*************************************************************************/ + +/* Vanilla C version */ + +static void rescale(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes, + uint32_t weight1, uint32_t weight2) +{ + int i; + for (i = 0; i < bytes; i++) + dest[i] = (src1[i]*weight1 + src2[i]*weight2 + 32768) >> 16; +} + +/*************************************************************************/ + +/* MMX version */ + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) /* i.e. not x86_64 */ + +static void rescale_mmx(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes, + uint32_t weight1, uint32_t weight2) +{ + if (bytes >= 8) { + /* First store weights in MM4/MM5 to relieve register pressure; + * save time by making 2 copies ahead of time in the general + * registers. Note that we divide by 2 for MMX due to the lack + * of an unsigned SIMD multiply instruction (PMULHUW). */ + int half1 = weight1 / 2; + int half2 = weight2 / 2; + half2 += weight1 & weight2 & 1; // pick up the lost bit here + asm("movd %%eax, %%mm4; movd %%edx, %%mm5" + : : "a" (half1<<16|half1), "d" (half2<<16|half2)); + asm("\ + movq %%mm4, %%mm6 # MM6: 00 00 W1 W1 \n\ + psllq $32, %%mm4 # MM4: W1 W1 00 00 \n\ + por %%mm6, %%mm4 # MM4: W1 W1 W1 W1 \n\ + movq %%mm5, %%mm7 # MM7: 00 00 W2 W2 \n\ + psllq $32, %%mm5 # MM5: W2 W2 00 00 \n\ + por %%mm7, %%mm5 # MM5: W2 W2 W2 W2 \n\ + pxor %%mm7, %%mm7 # MM7: 00 00 00 00 \n\ + pxor %%mm6, %%mm6 # Put 0x0020*4 in MM6 (rounding)\n\ + pcmpeqw %%mm3, %%mm3 \n\ + psubw %%mm3, %%mm6 \n\ + psllw $5, %%mm6 \n\ + 0: \n\ + movq -8(%%esi,%%ecx), %%mm0 \n\ + movq %%mm0, %%mm1 \n\ + punpcklbw %%mm7, %%mm0 \n\ + psllw $7, %%mm0 # 9.7 fixed point \n\ + pmulhw %%mm4, %%mm0 # Multiply to get 10.6 fixed \n\ + punpckhbw %%mm7, %%mm1 \n\ + psllw $7, %%mm1 \n\ + pmulhw %%mm4, %%mm1 \n\ + movq -8(%%edx,%%ecx), %%mm2 \n\ + movq %%mm2, %%mm3 \n\ + punpcklbw %%mm7, %%mm2 \n\ + psllw $7, %%mm2 \n\ + pmulhw %%mm5, %%mm2 \n\ + punpckhbw %%mm7, %%mm3 \n\ + psllw $7, %%mm3 \n\ + pmulhw %%mm5, %%mm3 \n\ + paddw %%mm2, %%mm0 \n\ + paddw %%mm6, %%mm0 \n\ + psrlw $6, %%mm0 \n\ + paddw %%mm3, %%mm1 \n\ + paddw %%mm6, %%mm1 \n\ + psrlw $6, %%mm1 \n\ + packuswb %%mm1, %%mm0 \n\ + movq %%mm0, -8(%%edi,%%ecx) \n\ + subl $8, %%ecx \n\ + jnz 0b \n\ + emms" + : /* no outputs */ + : "S" (src1), "d" (src2), "D" (dest), "c" (bytes & ~7)); + } + if (UNLIKELY(bytes & 7)) { + rescale(src1+(bytes & ~7), src2+(bytes & ~7), dest+(bytes & ~7), + bytes & 7, weight1, weight2); + } +} + +#endif /* HAVE_ASM_MMX && ARCH_X86 */ + +/*************************************************************************/ + +/* MMXEXT version (also for SSE) */ + +#if (defined(HAVE_ASM_MMXEXT) || defined(HAVE_ASM_SSE)) && defined(ARCH_X86) + +static void rescale_mmxext(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes, + uint32_t weight1, uint32_t weight2) +{ + if (bytes >= 8) { + asm("movd %%eax, %%mm4; movd %%edx, %%mm5" + : : "a" (weight1), "d" (weight2)); + asm("\ + pshufw $0, %%mm4, %%mm4 # MM4: W1 W1 W1 W1 \n\ + pshufw $0, %%mm5, %%mm5 # MM5: W2 W2 W2 W2 \n\ + pxor %%mm6, %%mm6 # Put 0x0080*4 in MM6 (rounding)\n\ + pcmpeqw %%mm7, %%mm7 \n\ + psubw %%mm7, %%mm6 \n\ + psllw $7, %%mm6 \n\ + 0: \n\ + movq -8(%%esi,%%ecx), %%mm7 \n\ + pxor %%mm0, %%mm0 # Load data into high bytes \n\ + punpcklbw %%mm7, %%mm0 # (gives 8.8 fixed point) \n\ + pmulhuw %%mm4, %%mm0 # Result: 0000..FF00 \n\ + pxor %%mm1, %%mm1 \n\ + punpckhbw %%mm7, %%mm1 \n\ + pmulhuw %%mm4, %%mm1 \n\ + movq -8(%%edx,%%ecx), %%mm7 \n\ + pxor %%mm2, %%mm2 \n\ + punpcklbw %%mm7, %%mm2 \n\ + pmulhuw %%mm5, %%mm2 \n\ + pxor %%mm3, %%mm3 \n\ + punpckhbw %%mm7, %%mm3 \n\ + pmulhuw %%mm5, %%mm3 \n\ + paddw %%mm2, %%mm0 \n\ + paddw %%mm6, %%mm0 \n\ + psrlw $8, %%mm0 # Shift back down to 00..FF \n\ + paddw %%mm3, %%mm1 \n\ + paddw %%mm6, %%mm1 \n\ + psrlw $8, %%mm1 \n\ + packuswb %%mm1, %%mm0 \n\ + movq %%mm0, -8(%%edi,%%ecx) \n\ + subl $8, %%ecx \n\ + jnz 0b \n\ + emms" + : /* no outputs */ + : "S" (src1), "d" (src2), "D" (dest), "c" (bytes & ~7)); + } + if (UNLIKELY(bytes & 7)) { + rescale(src1+(bytes & ~7), src2+(bytes & ~7), dest+(bytes & ~7), + bytes & 7, weight1, weight2); + } +} + +#endif /* (HAVE_ASM_MMXEXT || HAVE_ASM_SSE) && ARCH_X86 */ + +/*************************************************************************/ + +/* SSE2 version */ + +#if defined(HAVE_ASM_SSE2) + +#ifdef ARCH_X86_64 +# define ECX "%%rcx" +# define EDX "%%rdx" +# define ESI "%%rsi" +# define EDI "%%rdi" +#else +# define ECX "%%ecx" +# define EDX "%%edx" +# define ESI "%%esi" +# define EDI "%%edi" +#endif + +static void rescale_sse2(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int bytes, + uint32_t weight1, uint32_t weight2) +{ + if (bytes >= 16) { + asm("movd %%eax, %%xmm4; movd %%edx, %%xmm5" + : : "a" (weight1<<16|weight1), "d" (weight2<<16|weight2)); + asm("\ + pshufd $0, %%xmm4, %%xmm4 # XMM4: W1 W1 W1 W1 W1 W1 W1 W1 \n\ + pshufd $0, %%xmm5, %%xmm5 # XMM5: W2 W2 W2 W2 W2 W2 W2 W2 \n\ + pxor %%xmm6, %%xmm6 # Put 0x0080*4 in XMM6 (rounding)\n\ + pcmpeqw %%xmm7, %%xmm7 \n\ + psubw %%xmm7, %%xmm6 \n\ + psllw $7, %%xmm6 \n\ + 0: \n\ + movdqu -16("ESI","ECX"), %%xmm7 \n\ + pxor %%xmm0, %%xmm0 \n\ + punpcklbw %%xmm7, %%xmm0 \n\ + pmulhuw %%xmm4, %%xmm0 \n\ + pxor %%xmm1, %%xmm1 \n\ + punpckhbw %%xmm7, %%xmm1 \n\ + pmulhuw %%xmm4, %%xmm1 \n\ + movdqu -16("EDX","ECX"), %%xmm7 \n\ + pxor %%xmm2, %%xmm2 \n\ + punpcklbw %%xmm7, %%xmm2 \n\ + pmulhuw %%xmm5, %%xmm2 \n\ + pxor %%xmm3, %%xmm3 \n\ + punpckhbw %%xmm7, %%xmm3 \n\ + pmulhuw %%xmm5, %%xmm3 \n\ + paddw %%xmm2, %%xmm0 \n\ + paddw %%xmm6, %%xmm0 \n\ + psrlw $8, %%xmm0 \n\ + paddw %%xmm3, %%xmm1 \n\ + paddw %%xmm6, %%xmm1 \n\ + psrlw $8, %%xmm1 \n\ + packuswb %%xmm1, %%xmm0 \n\ + movdqu %%xmm0, -16("EDI","ECX") \n\ + subl $16, %%ecx \n\ + jnz 0b \n\ + emms" + : /* no outputs */ + : "S" (src1), "d" (src2), "D" (dest), "c" (bytes & ~15)); + } + if (UNLIKELY(bytes & 15)) { + rescale(src1+(bytes & ~15), src2+(bytes & ~15), dest+(bytes & ~15), + bytes & 15, weight1, weight2); + } +} + +#endif /* HAVE_ASM_SSE2 */ + +/*************************************************************************/ +/*************************************************************************/ + +/* Initialization routine. */ + +int ac_rescale_init(int accel) +{ + rescale_ptr = rescale; + +#if defined(HAVE_ASM_MMX) && defined(ARCH_X86) + if (HAS_ACCEL(accel, AC_MMX)) + rescale_ptr = rescale_mmx; +#endif +#if (defined(HAVE_ASM_MMXEXT) || defined(HAVE_ASM_SSE)) && defined(ARCH_X86) + if (HAS_ACCEL(accel, AC_MMXEXT) || HAS_ACCEL(accel, AC_SSE)) + rescale_ptr = rescale_mmxext; +#endif +#if defined(HAVE_ASM_SSE2) + if (HAS_ACCEL(accel, AC_SSE2)) + rescale_ptr = rescale_sse2; +#endif + + return 1; +} + +/*************************************************************************/ + +/* + * Local variables: + * c-file-style: "stroustrup" + * c-file-offsets: ((case-label . *) (statement-case-intro . *)) + * indent-tabs-mode: nil + * End: + * + * vim: expandtab shiftwidth=4: + */ diff --git a/veejay-server/aclib/rgb-yuv-conv.pl b/veejay-server/aclib/rgb-yuv-conv.pl new file mode 100755 index 00000000..a2b6257c --- /dev/null +++ b/veejay-server/aclib/rgb-yuv-conv.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl -w +# Calculate conversion matrices for RGB<->YUV given Kb and Kr + +die "Usage: $0 Kb Kr [scale]\n" if @ARGV < 2; +$scale = $ARGV[2] || 1; +$Kb = $ARGV[0]; +$Kr = $ARGV[1]; +$Kg = 1 - $Kr - $Kb; +$a11 = $Kr; +$a12 = $Kg; +$a13 = $Kb; +$a21 = -$Kr/(1-$Kb)/2; +$a22 = -$Kg/(1-$Kb)/2; +$a23 = 1/2; +$a31 = 1/2; +$a32 = -$Kg/(1-$Kr)/2; +$a33 = -$Kb/(1-$Kr)/2; +print "Y [R] = ".($a11*$scale)."\n"; +print "Y [G] = ".($a12*$scale)."\n"; +print "Y [B] = ".($a13*$scale)."\n"; +print "Cb[R] = ".($a21*$scale)."\n"; +print "Cb[G] = ".($a22*$scale)."\n"; +print "Cb[B] = ".($a23*$scale)."\n"; +print "Cr[R] = ".($a31*$scale)."\n"; +print "Cr[G] = ".($a32*$scale)."\n"; +print "Cr[B] = ".($a33*$scale)."\n"; +$det = $a11*$a22*$a33 - $a11*$a23*$a32 + + $a12*$a23*$a31 - $a12*$a21*$a33 + + $a13*$a21*$a32 - $a13*$a22*$a31; +$b11 = (1/$det)*($a22*$a33-$a23*$a32); +$b12 = (1/$det)*($a13*$a32-$a12*$a33); +$b13 = (1/$det)*($a12*$a23-$a13*$a22); +$b21 = (1/$det)*($a23*$a31-$a21*$a33); +$b22 = (1/$det)*($a11*$a33-$a13*$a31); +$b23 = (1/$det)*($a13*$a21-$a11*$a23); +$b31 = (1/$det)*($a21*$a32-$a22*$a31); +$b32 = (1/$det)*($a12*$a31-$a11*$a32); +$b33 = (1/$det)*($a11*$a22-$a12*$a21); +map {$_ = 0 if abs($_) < 1e-10} ($b11,$b12,$b13,$b21,$b22,$b23,$b31,$b32,$b33); +print "R[Y ] = ".($b11*$scale)."\n"; +print "R[Cb] = ".($b12*$scale)."\n"; +print "R[Cr] = ".($b13*$scale)."\n"; +print "G[Y ] = ".($b21*$scale)."\n"; +print "G[Cb] = ".($b22*$scale)."\n"; +print "G[Cr] = ".($b23*$scale)."\n"; +print "B[Y ] = ".($b31*$scale)."\n"; +print "B[Cb] = ".($b32*$scale)."\n"; +print "B[Cr] = ".($b33*$scale)."\n"; diff --git a/veejay-server/aclocal.m4 b/veejay-server/aclocal.m4 new file mode 100644 index 00000000..fae36d42 --- /dev/null +++ b/veejay-server/aclocal.m4 @@ -0,0 +1,7878 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# 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_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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 conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|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*) + 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_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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 < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +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_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [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="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + 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_AC_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_AC_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 +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_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 .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_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 +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_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 +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[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 +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +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" +m4_if($1,[],[ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognize shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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 + +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 +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognize a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_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 + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_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]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible 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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[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_AC_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_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# 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 + ;; + +aix4* | aix5*) + 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]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_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(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + 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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_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' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_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' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + osf3*) + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([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. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +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... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +])# AC_LIBTOOL_POSTDEP_PREDEP + +# AC_LIBTOOL_LANG_F77_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +[AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_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_AC_TAGVAR(objext, $1)=$objext + +# 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_AC_SYS_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" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +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 + ;; +aix4* | aix5*) + 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_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_F77_CONFIG + + +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +[AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_GCJ_CONFIG + + +# AC_LIBTOOL_LANG_RC_CONFIG +# ------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +[AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_RC_CONFIG + + +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then 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 +# TAGNAME from the matching tagged config vars. +AC_DEFUN([AC_LIBTOOL_CONFIG], +[# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac + +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) + + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# 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]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $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 < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f 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 +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_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 + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_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_AC_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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_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' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + +# 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. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_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]) +]) + +# 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 "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +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 --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + 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 + +# Configure paths for SDL +# Sam Lantinga 9/21/99 +# stolen from Manish Singh +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS +dnl +AC_DEFUN([AM_PATH_SDL], +[dnl +dnl Get the cflags and libraries from the sdl-config script +dnl +AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], + sdl_prefix="$withval", sdl_prefix="") +AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], + sdl_exec_prefix="$withval", sdl_exec_prefix="") +AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], + , enable_sdltest=yes) + + if test x$sdl_exec_prefix != x ; then + sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_args="$sdl_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + if test "x$prefix" != xNONE; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) + min_sdl_version=ifelse([$1], ,0.11.0,$1) + AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" +dnl +dnl Now check if the installed SDL is sufficiently new. (Also sanity +dnl checks the results of sdl-config to some extent +dnl + rm -f conf.sdltest + AC_TRY_RUN([ +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + AC_TRY_LINK([ +#include +#include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(SDL_CFLAGS) + AC_SUBST(SDL_LIBS) + rm -f conf.sdltest +]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 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, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + + +# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# This was merged into AC_PROG_CC in Autoconf. + +AU_DEFUN([AM_PROG_CC_STDC], +[AC_PROG_CC +AC_DIAGNOSE([obsolete], [$0: + your code should no longer depend upon `am_cv_prog_cc_stdc', but upon + `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when + you adjust the code. You can also remove the above call to + AC_PROG_CC if you already called it elsewhere.]) +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +]) +AU_DEFUN([fp_PROG_CC_STDC]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 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 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_LEX +# ----------- +# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a +# "missing" invocation, for better error output. +AC_DEFUN([AM_PROG_LEX], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AM_MISSING_HAS_RUN])dnl +AC_REQUIRE([AC_PROG_LEX])dnl +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/veejay-server/autogen.sh b/veejay-server/autogen.sh new file mode 100755 index 00000000..ba7e3840 --- /dev/null +++ b/veejay-server/autogen.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + + +autoreconf -v -f -i diff --git a/veejay-server/bio2jack/AUTHORS b/veejay-server/bio2jack/AUTHORS new file mode 100644 index 00000000..87c570cd --- /dev/null +++ b/veejay-server/bio2jack/AUTHORS @@ -0,0 +1,4 @@ +bio2jack - a library for porting blocked io(OSS/ALSA) apps to jack +--------------------------------------------------------- + +Chris Morgan diff --git a/veejay-server/bio2jack/COPYING b/veejay-server/bio2jack/COPYING new file mode 100644 index 00000000..a43ea212 --- /dev/null +++ b/veejay-server/bio2jack/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/veejay-server/bio2jack/INSTALL b/veejay-server/bio2jack/INSTALL new file mode 100644 index 00000000..6906d0cb --- /dev/null +++ b/veejay-server/bio2jack/INSTALL @@ -0,0 +1,6 @@ +Installing bio2jack +---------------------- + +This library is intended only for static linking as it is small and there +is no need to require yet another library for a user to install. So +please, statically link to this library. diff --git a/veejay-server/bio2jack/Makefile.am b/veejay-server/bio2jack/Makefile.am new file mode 100644 index 00000000..9b88de7f --- /dev/null +++ b/veejay-server/bio2jack/Makefile.am @@ -0,0 +1,4 @@ +noinst_LTLIBRARIES = libbio2jack4vj.la +INCLUDES=-I$(top_srcdir)/libvjmem -I$(top_srcdir)/libvjmsg +LIBS = @LIBS@ @PTHREAD_LIBS@ @JACK_LIBS@ +libbio2jack4vj_la_SOURCES = bio2jack.c bio2jack.h diff --git a/veejay-server/bio2jack/Makefile.in b/veejay-server/bio2jack/Makefile.in new file mode 100644 index 00000000..c7a2cc0b --- /dev/null +++ b/veejay-server/bio2jack/Makefile.in @@ -0,0 +1,502 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = bio2jack +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + AUTHORS COPYING INSTALL NEWS +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libbio2jack4vj_la_LIBADD = +am_libbio2jack4vj_la_OBJECTS = bio2jack.lo +libbio2jack4vj_la_OBJECTS = $(am_libbio2jack4vj_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libbio2jack4vj_la_SOURCES) +DIST_SOURCES = $(libbio2jack4vj_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ @PTHREAD_LIBS@ @JACK_LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libbio2jack4vj.la +INCLUDES = -I$(top_srcdir)/libvjmem -I$(top_srcdir)/libvjmsg +libbio2jack4vj_la_SOURCES = bio2jack.c bio2jack.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bio2jack/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu bio2jack/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libbio2jack4vj.la: $(libbio2jack4vj_la_OBJECTS) $(libbio2jack4vj_la_DEPENDENCIES) + $(LINK) $(libbio2jack4vj_la_OBJECTS) $(libbio2jack4vj_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bio2jack.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/bio2jack/NEWS b/veejay-server/bio2jack/NEWS new file mode 100644 index 00000000..8c269fef --- /dev/null +++ b/veejay-server/bio2jack/NEWS @@ -0,0 +1,10 @@ +bio2jack - NEWS +-------- +9/12/2004 - Check out ChangeLog for news ;-) +10/26/2003 - Updated to the new jack api, fixed a bunch of bugs + Removed all blocking functions, blocking is BAD as it could potentially + hold off the callback function. +1/13/2003 - Continuing to refine the api by working on the xine plugin. + Fixed a few bugs in the code. Uploaded newer packages to + sourceforge. +12/31/2002 - Sourceforge project is setup. diff --git a/veejay-server/bio2jack/README b/veejay-server/bio2jack/README new file mode 100644 index 00000000..ac5cf24e --- /dev/null +++ b/veejay-server/bio2jack/README @@ -0,0 +1,30 @@ +bio2jack +----------- + +To Build: +---------- +run ./autogen.sh +run ./configure +run make +enjoy ;-) + + +Bio(blocked i/o) 2 jack. + +A library for enabling easy porting of blocked io(OSS/ALSA) applications to +the jack sound server(http://jackit.sourceforge.net). This library allows the +person porting the code to simply replace the calls into OSS/ALSA with +calls into interface functions of this library. The library buffers a +small amount of audio data and takes care of the rest of the jack +implementation including the linked list of audio data buffers and the jack +callback. + +Interface functions: +TODO: once these become stable copy and paste from the header file + + +Currently these drivers use the bio2jack library: +--------------------------------------------------- +xmms-jack: Written in conjunction with this library +xine: + diff --git a/veejay-server/bio2jack/bio2jack.c b/veejay-server/bio2jack/bio2jack.c new file mode 100644 index 00000000..74229cb1 --- /dev/null +++ b/veejay-server/bio2jack/bio2jack.c @@ -0,0 +1,2690 @@ +/* + * Copyright 2003-2006 Chris Morgan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* NOTE: All functions that take a jack_driver_t* do NOT lock the device, in order to get a */ +/* jack_driver_t* you must call getDriver() which will pthread_mutex_lock() */ +#include +#ifdef HAVE_JACK +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_SAMPLERATE +#include +#endif +#include "bio2jack.h" + +/* enable/disable TRACING through the JACK_Callback() function */ +/* this can sometimes be too much information */ +#define TRACE_CALLBACK 0 + +/* set to 1 for verbose output */ +#define VERBOSE_OUTPUT 0 + +/* set to 1 to enable debug messages */ +#define DEBUG_OUTPUT 0 + +/* set to 1 to enable tracing */ +#define TRACE_ENABLE 0 + +/* set to 1 to enable the function timers */ +#define TIMER_ENABLE 0 + +/* set to 1 to enable tracing of getDriver() and releaseDriver() */ +#define TRACE_getReleaseDevice 0 + +#define ENABLE_WARNINGS 0 + +#define DEFAULT_RB_SIZE 4096 + +#define OUTFILE stderr + +#if TIMER_ENABLE +/* This seemingly construct makes timing arbitrary functions really easy + all you have to do is place a 'TIMER("start\n")' at the beginning and + a 'TIMER("stop\n")' at the end of any function and this does the rest + (naturally you can place any printf-compliant text you like in the argument + along with the associated values). */ +static struct timeval timer_now; +#define TIMER(format,args...) gettimeofday(&timer_now,0); \ + fprintf(OUTFILE, "%ld.%06ld: %s::%s(%d) "format, timer_now.tv_sec, timer_now.tv_usec, __FILE__, __FUNCTION__, __LINE__, ##args) +#else +#define TIMER(...) +#endif + +#if TRACE_ENABLE +#define TRACE(format,args...) fprintf(OUTFILE, "%s::%s(%d) "format, __FILE__, __FUNCTION__, __LINE__,##args); \ + fflush(OUTFILE); +#else +#define TRACE(...) +#endif + +#if DEBUG_OUTPUT +#define DEBUG(format,args...) fprintf(OUTFILE, "%s::%s(%d) "format, __FILE__, __FUNCTION__, __LINE__,##args); \ + fflush(OUTFILE); +#else +#define DEBUG(...) +#endif + +#if TRACE_CALLBACK +#define CALLBACK_TRACE(format,args...) fprintf(OUTFILE, "%s::%s(%d) "format, __FILE__, __FUNCTION__, __LINE__,##args); \ + fflush(OUTFILE); +#else +#define CALLBACK_TRACE(...) +#endif + +#if ENABLE_WARNINGS +#define WARN(format,args...) fprintf(OUTFILE, "WARN: %s::%s(%d) "format, __FILE__,__FUNCTION__,__LINE__,##args); \ + fflush(OUTFILE); +#else +#define WARN(...) +#endif + +#define ERR(format,args...) veejay_msg(0, format, ##args); + +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#define max(a,b) (((a) < (b)) ? (b) : (a)) + +#define MAX_OUTPUT_PORTS 10 +#define MAX_INPUT_PORTS 10 + +typedef struct jack_driver_s +{ + bool allocated; /* whether or not this device has been allocated */ + + int deviceID; /* id of this device */ + int clientCtr; /* to prevent overlapping client ids */ + long jack_sample_rate; /* jack samples(frames) per second */ + + long client_sample_rate; /* client samples(frames) per second */ + double output_sample_rate_ratio; /* ratio between jack's output rate & ours */ + double input_sample_rate_ratio; /* ratio between our input rate & jack's */ + + unsigned long num_input_channels; /* number of input channels(1 is mono, 2 stereo etc..) */ + unsigned long num_output_channels; /* number of output channels(1 is mono, 2 stereo etc..) */ + + unsigned long bits_per_channel; /* number of bits per channel (only 8 & 16 are currently supported) */ + + unsigned long bytes_per_output_frame; /* (num_output_channels * bits_per_channel) / 8 */ + unsigned long bytes_per_input_frame; /* (num_input_channels * bits_per_channel) / 8 */ + + unsigned long bytes_per_jack_output_frame; /* (num_output_channels * bits_per_channel) / 8 */ + unsigned long bytes_per_jack_input_frame; /* (num_input_channels * bits_per_channel) / 8 */ + + unsigned long latencyMS; /* latency in ms between writing and actual audio output of the written data */ + + long clientBytesInJack; /* number of INPUT bytes(from the client of bio2jack) we wrote to jack(not necessary the number of bytes we wrote to jack) */ + long jack_buffer_size; /* size of the buffer jack will pass in to the process callback */ + + unsigned long callback_buffer1_size; /* number of bytes in the buffer allocated for processing data in JACK_Callback */ + char *callback_buffer1; + unsigned long callback_buffer2_size; /* number of bytes in the buffer allocated for processing data in JACK_Callback */ + char *callback_buffer2; + + unsigned long rw_buffer1_size; /* number of bytes in the buffer allocated for processing data in JACK_(Read|Write) */ + char *rw_buffer1; + + struct timeval previousTime; /* time of last JACK_Callback() write to jack, allows for MS accurate bytes played */ + + unsigned long num_ticks; + unsigned long chunk_size; + unsigned long written_client_bytes; /* input bytes we wrote to jack, not necessarily actual bytes we wrote to jack due to channel and other conversion */ + unsigned long played_client_bytes; /* input bytes that jack has played */ + + unsigned long client_bytes; /* total bytes written by the client of bio2jack via JACK_Write() */ + + jack_port_t *output_port[MAX_OUTPUT_PORTS]; /* output ports */ + jack_port_t *input_port[MAX_OUTPUT_PORTS]; /* input ports */ + + jack_client_t *client; /* pointer to jack client */ + + char **jack_port_name; /* user given strings for the port names, can be NULL */ + unsigned int jack_port_name_count; /* the number of port names given */ + + unsigned long jack_output_port_flags; /* flags to be passed to jack when opening the output ports */ + unsigned long jack_input_port_flags; /* flags to be passed to jack when opening the output ports */ + + jack_ringbuffer_t *pPlayPtr; /* the playback ringbuffer */ + jack_ringbuffer_t *pRecPtr; /* the recording ringbuffer */ +/* + SRC_STATE *output_src; + SRC_STATE *input_src; +*/ + + enum status_enum state; /* one of PLAYING, PAUSED, STOPPED, CLOSED, RESET etc */ + + unsigned int volume[MAX_OUTPUT_PORTS]; /* percentage of sample value to preserve, 100 would be no attenuation */ + enum JACK_VOLUME_TYPE volumeEffectType; /* linear or dbAttenuation, if dbAttenuation volume is the number of dBs of + attenuation to apply, 0 volume being no attenuation, full volume */ + + long position_byte_offset; /* an offset that we will apply to returned position queries to achieve */ + /* the position that the user of the driver desires set */ + + bool in_use; /* true if this device is currently in use */ + + pthread_mutex_t mutex; /* mutex to lock this specific device */ + + /* variables used for trying to restart the connection to jack */ + bool jackd_died; /* true if jackd has died and we should try to restart it */ + struct timeval last_reconnect_attempt; +} jack_driver_t; + + +static char *client_name; /* the name bio2jack will use when creating a new + jack client. client_name_%deviceID% will be used */ + + +static bool do_sample_rate_conversion; /* whether the client has requested sample rate conversion, + default to on for improved compatibility */ + +/* + Which SRC converter function we should use when doing sample rate conversion. + Default to the fastest of the 'good quality' set. + */ +#ifdef HAVE_SAMPLE_RATE +static int preferred_src_converter = SRC_SINC_FASTEST; +#endif +static bool init_done = 0; /* just to prevent clients from calling JACK_Init twice, that would be very bad */ + +static enum JACK_PORT_CONNECTION_MODE port_connection_mode = CONNECT_ALL; + +/* enable/disable code that allows us to close a device without actually closing the jack device */ +/* this works around the issue where jack doesn't always close devices by the time the close function call returns */ +#define JACK_CLOSE_HACK 1 + +typedef jack_default_audio_sample_t sample_t; +typedef jack_nframes_t nframes_t; + +/* allocate devices for output */ +/* if you increase this past 10, you might want to update 'out_client_name = ... ' in JACK_OpenDevice */ +#define MAX_OUTDEVICES 10 +static jack_driver_t outDev[MAX_OUTDEVICES]; + +static pthread_mutex_t device_mutex = PTHREAD_MUTEX_INITIALIZER; /* this is to lock the entire outDev array + to make managing it in a threaded + environment sane */ + +#if JACK_CLOSE_HACK +static void JACK_CloseDevice(jack_driver_t * drv, bool close_client); +#else +static void JACK_CloseDevice(jack_driver_t * drv); +#endif + + +/* Prototypes */ +static int JACK_OpenDevice(jack_driver_t * drv); +static unsigned long JACK_GetBytesFreeSpaceFromDriver(jack_driver_t * drv); +static void JACK_ResetFromDriver(jack_driver_t * drv); +static long JACK_GetPositionFromDriver(jack_driver_t * drv, + enum pos_enum position, int type); +static void JACK_CleanupDriver(jack_driver_t * drv); + + +/* Return the difference between two timeval structures in terms of milliseconds */ +long +TimeValDifference(struct timeval *start, struct timeval *end) +{ + double long ms; /* milliseconds value */ + + ms = end->tv_sec - start->tv_sec; /* compute seconds difference */ + ms *= (double) 1000; /* convert to milliseconds */ + + ms += (double) (end->tv_usec - start->tv_usec) / (double) 1000; /* add on microseconds difference */ + + return (long) ms; +} + +/* get a device and lock the devices mutex */ +/* */ +/* also attempt to reconnect to jack since this function is called from */ +/* most other bio2jack functions it provides a good point to attempt reconnection */ +/* */ +/* Ok, I know this looks complicated and it kind of is. The point is that when you're + trying to trace mutexes it's more important to know *who* called us than just that + we were called. This uses from pre-processor trickery so that the fprintf is actually + placed in the function making the getDriver call. Thus, the __FUNCTION__ and __LINE__ + macros will actually reference our caller, rather than getDriver. The reason the + fprintf call is passes as a parameter is because this macro has to still return a + jack_driver_t* and we want to log both before *and* after the getDriver call for + easier detection of blocked calls. + */ +#if TRACE_getReleaseDevice +#define getDriver(x) _getDriver(x,fprintf(OUTFILE, "%s::%s(%d) getting driver %d\n", __FILE__, __FUNCTION__, __LINE__,x)); TRACE("got driver %d\n",x); +jack_driver_t * +_getDriver(int deviceID, int ignored) +{ + fflush(OUTFILE); +#else +jack_driver_t * +getDriver(int deviceID) +{ +#endif + jack_driver_t *drv = &outDev[deviceID]; + + if(pthread_mutex_lock(&drv->mutex) != 0) + ERR("lock returned an error\n"); + + /* should we try to restart the jack server? */ + if(drv->jackd_died && drv->client == 0) + { + struct timeval now; + gettimeofday(&now, 0); + + /* wait 250ms before trying again */ + if(TimeValDifference(&drv->last_reconnect_attempt, &now) >= 250) + { + JACK_OpenDevice(drv); + drv->last_reconnect_attempt = now; + } + } + + return drv; +} + +#if TRACE_getReleaseDevice +#define tryGetDriver(x) _tryGetDriver(x,fprintf(OUTFILE, "%s::%s(%d) trying to get driver %d\n", __FILE__, __FUNCTION__, __LINE__,x)); TRACE("got driver %d\n",x); +jack_driver_t * +_tryGetDriver(int deviceID, int ignored) +{ + fflush(OUTFILE); +#else +jack_driver_t * +tryGetDriver(int deviceID) +{ +#endif + jack_driver_t *drv = &outDev[deviceID]; + + int err; + if((err = pthread_mutex_trylock(&drv->mutex)) == 0) + return drv; + + if(err == EBUSY) + { + TRACE("driver %d is busy\n",deviceID); + return 0; + } + + ERR("lock returned an error\n"); + return 0; +} + + +/* release a device's mutex */ +/* */ +/* This macro is similar to the one for getDriver above, only simpler since we only + really need to know when the lock was release for the sake of debugging. +*/ +#if TRACE_getReleaseDevice +#define releaseDriver(x) TRACE("releasing driver %d\n",x->deviceID); _releaseDriver(x); +void +_releaseDriver(jack_driver_t * drv) +#else +void +releaseDriver(jack_driver_t * drv) +#endif +{ + /* + #if TRACE_getReleaseDevice + TRACE("deviceID == %d\n", drv->deviceID); + #endif + */ + if(pthread_mutex_unlock(&drv->mutex) != 0) + ERR("lock returned an error\n"); +} + + +/* Return a string corresponding to the input state */ +char * +DEBUGSTATE(enum status_enum state) +{ + if(state == PLAYING) + return "PLAYING"; + else if(state == PAUSED) + return "PAUSED"; + else if(state == STOPPED) + return "STOPPED"; + else if(state == CLOSED) + return "CLOSED"; + else if(state == RESET) + return "RESET"; + else + return "unknown state"; +} + + +#define SAMPLE_MAX_16BIT 32767.0f +#define SAMPLE_MAX_8BIT 255.0f + +/* floating point volume routine */ +/* volume should be a value between 0.0 and 1.0 */ +static void +float_volume_effect(sample_t * buf, unsigned long nsamples, float volume, + int skip) +{ + if(volume < 0) + volume = 0; + if(volume > 1.0) + volume = 1.0; + + while(nsamples--) + { + *buf = (*buf) * volume; + buf += skip; + } +} + +/* place one channel into a multi-channel stream */ +static inline void +mux(sample_t * dst, sample_t * src, unsigned long nsamples, + unsigned long dst_skip) +{ + /* ALERT: signed sign-extension portability !!! */ + while(nsamples--) + { + *dst = *src; + dst += dst_skip; + src++; + } +} + +/* pull one channel out of a multi-channel stream */ +static void +demux(sample_t * dst, sample_t * src, unsigned long nsamples, + unsigned long src_skip) +{ + /* ALERT: signed sign-extension portability !!! */ + while(nsamples--) + { + *dst = *src; + dst++; + src += src_skip; + } +} + +/* convert from 16 bit to floating point */ +static inline void +sample_move_short_float(sample_t * dst, short *src, unsigned long nsamples) +{ + /* ALERT: signed sign-extension portability !!! */ + unsigned long i; + for(i = 0; i < nsamples; i++) + dst[i] = (sample_t) (src[i]) / SAMPLE_MAX_16BIT; +} + +/* convert from floating point to 16 bit */ +static inline void +sample_move_float_short(short *dst, sample_t * src, unsigned long nsamples) +{ + /* ALERT: signed sign-extension portability !!! */ + unsigned long i; + for(i = 0; i < nsamples; i++) + dst[i] = (short) ((src[i]) * SAMPLE_MAX_16BIT); +} + +/* convert from 8 bit to floating point */ +static inline void +sample_move_char_float(sample_t * dst, unsigned char *src, unsigned long nsamples) +{ + /* ALERT: signed sign-extension portability !!! */ + unsigned long i; + for(i = 0; i < nsamples; i++) + dst[i] = (sample_t) (src[i]) / SAMPLE_MAX_8BIT; +} + +/* convert from floating point to 8 bit */ +static inline void +sample_move_float_char(unsigned char *dst, sample_t * src, unsigned long nsamples) +{ + /* ALERT: signed sign-extension portability !!! */ + unsigned long i; + for(i = 0; i < nsamples; i++) + dst[i] = (char) ((src[i]) * SAMPLE_MAX_8BIT); +} + +/* fill dst buffer with nsamples worth of silence */ +static inline void +sample_silence_float(sample_t * dst, unsigned long nsamples) +{ + /* ALERT: signed sign-extension portability !!! */ + while(nsamples--) + { + *dst = 0; + dst++; + } +} + +static inline bool +ensure_buffer_size(char **buffer, unsigned long *cur_size, + unsigned long needed_size) +{ + DEBUG("current size = %lu, needed size = %lu\n", *cur_size, needed_size); + if(*cur_size >= needed_size) + return TRUE; + DEBUG("reallocing\n"); + char *tmp = realloc(*buffer, needed_size); + if(tmp) + { + *cur_size = needed_size; + *buffer = tmp; + return TRUE; + } + DEBUG("reallocing failed\n"); + return FALSE; +} + +/****************************************************************** + * JACK_callback + * + * every time the jack server wants something from us it calls this + * function, so we either deliver it some sound to play or deliver it nothing + * to play + */ +static int +JACK_callback(nframes_t nframes, void *arg) +{ + jack_driver_t *drv = (jack_driver_t *) arg; + + unsigned int i; + + + drv->chunk_size = nframes; + + TIMER("start\n"); + gettimeofday(&drv->previousTime, 0); /* record the current time */ + + CALLBACK_TRACE("nframes %ld, sizeof(sample_t) == %d\n", (long) nframes, + sizeof(sample_t)); + + if(!drv->client) + ERR("client is closed, this is weird...\n"); + + sample_t *out_buffer[MAX_OUTPUT_PORTS]; + /* retrieve the buffers for the output ports */ + for(i = 0; i < drv->num_output_channels; i++) + out_buffer[i] = (sample_t *) jack_port_get_buffer(drv->output_port[i], nframes); + + sample_t *in_buffer[MAX_INPUT_PORTS]; + /* retrieve the buffers for the input ports */ + for(i = 0; i < drv->num_input_channels; i++) + in_buffer[i] = (sample_t *) jack_port_get_buffer(drv->input_port[i], nframes); + + /* handle playing state */ + if(drv->state == PLAYING) + { + /* handle playback data, if any */ + if(drv->num_output_channels > 0) + { + unsigned long jackFramesAvailable = nframes; /* frames we have left to write to jack */ + unsigned long numFramesToWrite; /* num frames we are writing */ + size_t inputBytesAvailable = jack_ringbuffer_read_space(drv->pPlayPtr); + unsigned long inputFramesAvailable; /* frames we have available */ + + inputFramesAvailable = inputBytesAvailable / drv->bytes_per_jack_output_frame; + size_t jackBytesAvailable = jackFramesAvailable * drv->bytes_per_jack_output_frame; + + long read = 0; + + CALLBACK_TRACE("playing... jackFramesAvailable = %ld inputFramesAvailable = %ld\n", + jackFramesAvailable, inputFramesAvailable); + +#if JACK_CLOSE_HACK + if(drv->in_use == FALSE) + { + /* output silence if nothing is being outputted */ + for(i = 0; i < drv->num_output_channels; i++) + sample_silence_float(out_buffer[i], nframes); + + return -1; + } +#endif + + /* make sure our buffer is large enough for the data we are writing */ + /* ie. callback_buffer2_size < (bytes we already wrote + bytes we are going to write in this loop) */ + if(!ensure_buffer_size + (&drv->callback_buffer2, &drv->callback_buffer2_size, + jackBytesAvailable)) + { + + + return -1; + } + + /* do sample rate conversion if needed & requested */ +#ifdef HAVE_SAMPLERATE + if(drv->output_src && drv->output_sample_rate_ratio != 1.0) + { + long bytes_needed_write = nframes * drv->bytes_per_jack_output_frame; + + /* make a very good guess at how many raw bytes we'll need to satisfy jack's request after conversion */ + long bytes_needed_read = min(inputBytesAvailable, + (double) (bytes_needed_write + + drv-> + output_sample_rate_ratio + * + drv-> + bytes_per_jack_output_frame) + / drv->output_sample_rate_ratio); + DEBUG("guessing that we need %ld bytes in and %ld out for rate conversion ratio = %f\n", + bytes_needed_read, bytes_needed_write, + drv->output_sample_rate_ratio); + + if(!ensure_buffer_size(&drv->callback_buffer1, + &drv->callback_buffer1_size, + bytes_needed_read)) + { + ERR("could not realloc callback_buffer2!\n"); + return 1; + } + if(!ensure_buffer_size(&drv->callback_buffer2, + &drv->callback_buffer2_size, + bytes_needed_write)) + { + ERR("could not realloc callback_buffer2!\n"); + return 1; + } + + if(jackFramesAvailable && inputBytesAvailable > 0) + { + /* read in the data, but don't move the read pointer until we know how much SRC used */ + jack_ringbuffer_peek(drv->pPlayPtr, drv->callback_buffer1, + bytes_needed_read); + + SRC_DATA srcdata; + srcdata.data_in = (sample_t *) drv->callback_buffer1; + srcdata.input_frames = bytes_needed_read / drv->bytes_per_jack_output_frame; + srcdata.src_ratio = drv->output_sample_rate_ratio; + srcdata.data_out = (sample_t *) drv->callback_buffer2; + srcdata.output_frames = nframes; + srcdata.end_of_input = 0; // it's a stream, it never ends + DEBUG("input_frames = %ld, output_frames = %ld\n", + srcdata.input_frames, srcdata.output_frames); + /* convert the sample rate */ + src_error = src_process(drv->output_src, &srcdata); + DEBUG("used = %ld, generated = %ld, error = %d: %s.\n", + srcdata.input_frames_used, srcdata.output_frames_gen, + src_error, src_strerror(src_error)); + + if(src_error == 0) + { + /* now we can move the read pointer */ + jack_ringbuffer_read_advance(drv->pPlayPtr, + srcdata. + input_frames_used * + drv->bytes_per_jack_output_frame); + /* add on what we wrote */ + read = srcdata.input_frames_used * drv->bytes_per_output_frame; + jackFramesAvailable -= srcdata.output_frames_gen; /* take away what was used */ + } + } + } + else /* no resampling needed or requested */ + { + /* read as much data from the buffer as is available */ + if(jackFramesAvailable && inputBytesAvailable > 0) + { + /* write as many bytes as we have space remaining, or as much as we have data to write */ + numFramesToWrite = min(jackFramesAvailable, inputFramesAvailable); + jack_ringbuffer_read(drv->pPlayPtr, drv->callback_buffer2, + jackBytesAvailable); + /* add on what we wrote */ + read = numFramesToWrite * drv->bytes_per_output_frame; + jackFramesAvailable -= numFramesToWrite; /* take away what was written */ + } + } +#else + /* read as much data from the buffer as is available */ + if(jackFramesAvailable && inputBytesAvailable > 0) + { + /* write as many bytes as we have space remaining, or as much as we have data to write */ + numFramesToWrite = min(jackFramesAvailable, inputFramesAvailable); + jack_ringbuffer_read(drv->pPlayPtr, drv->callback_buffer2, + jackBytesAvailable); + /* add on what we wrote */ + read = numFramesToWrite * drv->bytes_per_output_frame; + jackFramesAvailable -= numFramesToWrite; /* take away what was written */ + } + +#endif + drv->written_client_bytes += read; + drv->played_client_bytes += drv->clientBytesInJack; /* move forward by the previous bytes we wrote since those must have finished by now */ + drv->clientBytesInJack = read; /* record the input bytes we wrote to jack */ + drv->num_ticks ++; + /* see if we still have jackBytesLeft here, if we do that means that we + ran out of wave data to play and had a buffer underrun, fill in + the rest of the space with zero bytes so at least there is silence */ + if(jackFramesAvailable) + { + WARN("buffer underrun of %ld frames\n", jackFramesAvailable); + for(i = 0; i < drv->num_output_channels; i++) + sample_silence_float(out_buffer[i] + + (nframes - jackFramesAvailable), + jackFramesAvailable); + } + + /* if we aren't converting or we are converting and src_error == 0 then we should */ + /* apply volume and demux */ +#ifdef HAVE_SAMPLERATE + if(!(drv->output_src && drv->output_sample_rate_ratio != 1.0) || (src_error == 0)) + { + /* apply volume */ + for(i = 0; i < drv->num_output_channels; i++) + { + if(drv->volumeEffectType == dbAttenuation) + { + /* assume the volume setting is dB of attenuation, a volume of 0 */ + /* is 0dB attenuation */ + float volume = powf(10.0, -((float) drv->volume[i]) / 20.0); + float_volume_effect((sample_t *) drv->callback_buffer2 + i, + (nframes - jackFramesAvailable), volume, drv->num_output_channels); + } else + { + float_volume_effect((sample_t *) drv->callback_buffer2 + i, (nframes - jackFramesAvailable), + ((float) drv->volume[i] / 100.0), + drv->num_output_channels); + } + } + } +#endif + if( !(drv->output_sample_rate_ratio != 1.0)) + { + /* demux the stream: we skip over the number of samples we have output channels as the channel data */ + /* is encoded like chan1,chan2,chan3,chan1,chan2,chan3... */ + for(i = 0; i < drv->num_output_channels; i++) + { + demux(out_buffer[i], + (sample_t *) drv->callback_buffer2 + i, + (nframes - jackFramesAvailable), drv->num_output_channels); + } + + } + } + + /* handle record data, if any */ + if(drv->num_input_channels > 0) + { + long jack_bytes = nframes * drv->bytes_per_jack_input_frame; /* how many bytes jack is feeding us */ + + if(!ensure_buffer_size(&drv->callback_buffer1, &drv->callback_buffer1_size, jack_bytes)) + { + ERR("allocated %lu bytes, need %lu bytes\n", + drv->callback_buffer1_size, jack_bytes); + return -1; + } + + /* mux the invividual channels into one stream */ + for(i = 0; i < drv->num_input_channels; i++) + { + mux((sample_t *) drv->callback_buffer1 + i, in_buffer[i], + nframes, drv->num_input_channels); + } + + /* do sample rate conversion if needed & requested */ +#ifdef HAVE_SAMPLERATE + if(drv->input_src && drv->input_sample_rate_ratio != 1.0) + { + /* make a very good guess at how many raw bytes we'll need to read all the data jack gave us */ + long bytes_needed_write = (double) (jack_bytes + + drv->input_sample_rate_ratio * + drv->bytes_per_jack_input_frame) * + drv->input_sample_rate_ratio; + DEBUG("guessing that we need %ld bytes in and %ld out for rate conversion ratio = %f\n", + nframes * drv->bytes_per_jack_input_frame, + bytes_needed_write, drv->input_sample_rate_ratio); + + if(!ensure_buffer_size(&drv->callback_buffer2, + &drv->callback_buffer2_size, + bytes_needed_write)) + { + ERR("could not realloc callback_buffer2!\n"); + return 1; + } + + SRC_DATA srcdata; + srcdata.data_in = (sample_t *) drv->callback_buffer1; + srcdata.input_frames = nframes; + srcdata.src_ratio = drv->input_sample_rate_ratio; + srcdata.data_out = (sample_t *) drv->callback_buffer2; + srcdata.output_frames = drv->callback_buffer2_size / drv->bytes_per_jack_input_frame; + srcdata.end_of_input = 0; // it's a stream, it never ends + DEBUG("input_frames = %ld, output_frames = %ld\n", + srcdata.input_frames, srcdata.output_frames); + /* convert the sample rate */ + src_error = src_process(drv->input_src, &srcdata); + DEBUG("used = %ld, generated = %ld, error = %d: %s.\n", + srcdata.input_frames_used, srcdata.output_frames_gen, + src_error, src_strerror(src_error)); + + if(src_error == 0) + { + long write_space = jack_ringbuffer_write_space(drv->pRecPtr); + long bytes_used = srcdata.output_frames_gen * drv->bytes_per_jack_input_frame; + /* if there isn't enough room, make some. sure this discards data, but when dealing with input sources + it seems like it's better to throw away old data than new */ + if(write_space < bytes_used) + { + /* the ringbuffer is designed such that only one thread should ever access each pointer. + since calling read_advance here will be touching the read pointer which is also accessed + by JACK_Read, we need to lock the mutex first for safety */ + jack_driver_t *d = tryGetDriver(drv->deviceID); + if( d ) + { + /* double check the write space after we've gained the lock, just + in case JACK_Read was being called before we gained it */ + write_space = jack_ringbuffer_write_space(drv->pRecPtr); + if(write_space < bytes_used) + { + /* hey, we warn about underruns, we might as well warn about overruns as well */ + WARN("buffer overrun of %ld bytes\n", jack_bytes - write_space); + jack_ringbuffer_read_advance(drv->pRecPtr, bytes_used - write_space); + } + + releaseDriver(drv); + } + } + + jack_ringbuffer_write(drv->pRecPtr, drv->callback_buffer2, + bytes_used); + } + } + else /* no resampling needed */ + { +#endif + long write_space = jack_ringbuffer_write_space(drv->pRecPtr); + /* if there isn't enough room, make some. sure this discards data, but when dealing with input sources + it seems like it's better to throw away old data than new */ + if(write_space < jack_bytes) + { + /* the ringbuffer is designed such that only one thread should ever access each pointer. + since calling read_advance here will be touching the read pointer which is also accessed + by JACK_Read, we need to lock the mutex first for safety */ + jack_driver_t *d = tryGetDriver(drv->deviceID); + if( d ) + { + /* double check the write space after we've gained the lock, just + in case JACK_Read was being called before we gained it */ + write_space = jack_ringbuffer_write_space(drv->pRecPtr); + if(write_space < jack_bytes) + { + ERR("buffer overrun of %ld bytes\n", jack_bytes - write_space); + jack_ringbuffer_read_advance(drv->pRecPtr, jack_bytes - write_space); + } + releaseDriver(drv); + } + } + + jack_ringbuffer_write(drv->pRecPtr, drv->callback_buffer1, + jack_bytes); +#ifdef HAVE_SAMPLERATE + } +#endif + } + } + else if(drv->state == PAUSED || + drv->state == STOPPED || + drv->state == CLOSED || drv->state == RESET) + { + CALLBACK_TRACE("%s, outputting silence\n", DEBUGSTATE(drv->state)); + + /* output silence if nothing is being outputted */ + for(i = 0; i < drv->num_output_channels; i++) + sample_silence_float(out_buffer[i], nframes); + + /* if we were told to reset then zero out some variables */ + /* and transition to STOPPED */ + if(drv->state == RESET) + { + drv->written_client_bytes = 0; + drv->played_client_bytes = 0; /* number of the clients bytes that jack has played */ + + drv->client_bytes = 0; /* bytes that the client wrote to use */ + + drv->clientBytesInJack = 0; /* number of input bytes in jack(not necessary the number of bytes written to jack) */ + + drv->position_byte_offset = 0; + + if(drv->pPlayPtr) + jack_ringbuffer_reset(drv->pPlayPtr); + + if(drv->pRecPtr) + jack_ringbuffer_reset(drv->pRecPtr); + + drv->state = STOPPED; /* transition to STOPPED */ + } + } + + CALLBACK_TRACE("done\n"); + TIMER("finish\n"); + + return 0; +} + + +/****************************************************************** + * JACK_bufsize + * + * Called whenever the jack server changes the the max number + * of frames passed to JACK_callback + */ +static int +JACK_bufsize(nframes_t nframes, void *arg) +{ + jack_driver_t *drv = (jack_driver_t *) arg; + TRACE("the maximum buffer size is now %lu frames\n", (long) nframes); + + drv->jack_buffer_size = nframes; + + return 0; +} + +/****************************************************************** + * JACK_srate + */ +int +JACK_srate(nframes_t nframes, void *arg) +{ + jack_driver_t *drv = (jack_driver_t *) arg; + + drv->jack_sample_rate = (long) nframes; + drv->output_sample_rate_ratio = 1.0; + drv->input_sample_rate_ratio = 1.0; +#ifdef HAVE_SAMPLERATE + /* make sure to recalculate the ratios needed for proper sample rate conversion */ + drv->output_sample_rate_ratio = (double) drv->jack_sample_rate / (double) drv->client_sample_rate; + if(drv->output_src) src_set_ratio(drv->output_src, drv->output_sample_rate_ratio); + + drv->input_sample_rate_ratio = (double) drv->client_sample_rate / (double) drv->jack_sample_rate; + if(drv->input_src) src_set_ratio(drv->input_src, drv->input_sample_rate_ratio); +#endif + TRACE("the sample rate is now %lu/sec\n", (long) nframes); + return 0; +} + + +/****************************************************************** + * JACK_shutdown + * + * if this is called then jack shut down... handle this appropriately */ +void +JACK_shutdown(void *arg) +{ + jack_driver_t *drv = (jack_driver_t *) arg; + + TRACE("\n"); + + getDriver(drv->deviceID); + + drv->client = 0; /* reset client */ + drv->jackd_died = TRUE; + + TRACE("jack shutdown, setting client to 0 and jackd_died to true, closing device\n"); + +#if JACK_CLOSE_HACK + JACK_CloseDevice(drv, TRUE); +#else + JACK_CloseDevice(drv); +#endif + + TRACE("trying to reconnect right now\n"); + /* lets see if we can't reestablish the connection */ + if(JACK_OpenDevice(drv) != ERR_SUCCESS) + { + ERR("unable to reconnect with jack\n"); + } + + releaseDriver(drv); +} + + +/****************************************************************** + * JACK_Error + * + * Callback for jack errors + */ +static void +JACK_Error(const char *desc) +{ + ERR("%s\n", desc); +} + + +/****************************************************************** + * JACK_OpenDevice + * + * RETURNS: ERR_SUCCESS upon success + */ +static int +JACK_OpenDevice(jack_driver_t * drv) +{ + const char **ports; + char *our_client_name = 0; + unsigned int i; + int failed = 0; + + TRACE("creating jack client and setting up callbacks\n"); + +#if JACK_CLOSE_HACK + /* see if this device is already open */ + if(drv->client) + { + /* if this device is already in use then it is bad for us to be in here */ + if(drv->in_use) + return ERR_OPENING_JACK; + + TRACE("using existing client\n"); + drv->in_use = TRUE; + return ERR_SUCCESS; + } +#endif + + /* set up an error handler */ + jack_set_error_function(JACK_Error); + + + /* build the client name */ + our_client_name = (char *) malloc(snprintf + (our_client_name, 0, "%s_%d_%d%02d", client_name, getpid(), + drv->deviceID, drv->clientCtr + 1) + 1); + sprintf(our_client_name, "%s_%d_%d%02d", client_name, getpid(), + drv->deviceID, drv->clientCtr++); + + /* try to become a client of the JACK server */ + TRACE("client name '%s'\n", our_client_name); + if((drv->client = jack_client_new(our_client_name)) == 0) + { + /* try once more */ + TRACE("trying once more to jack_client_new"); + if((drv->client = jack_client_new(our_client_name)) == 0) + { + ERR("jack server not running?\n"); + free(our_client_name); + return ERR_OPENING_JACK; + } + } + + free(our_client_name); + + drv->client_sample_rate = jack_get_sample_rate(drv->client); + + TRACE("setting up jack callbacks\n"); + + /* JACK server to call `JACK_callback()' whenever + there is work to be done. */ + jack_set_process_callback(drv->client, JACK_callback, drv); + + /* setup a buffer size callback */ + jack_set_buffer_size_callback(drv->client, JACK_bufsize, drv); + + /* tell the JACK server to call `srate()' whenever + the sample rate of the system changes. */ + jack_set_sample_rate_callback(drv->client, JACK_srate, drv); + + /* tell the JACK server to call `jack_shutdown()' if + it ever shuts down, either entirely, or if it + just decides to stop calling us. */ + jack_on_shutdown(drv->client, JACK_shutdown, drv); + + /* display the current sample rate. once the client is activated + (see below), you should rely on your own sample rate + callback (see above) for this value. */ + drv->jack_sample_rate = jack_get_sample_rate(drv->client); + drv->output_sample_rate_ratio = (double) drv->jack_sample_rate / (double) drv->client_sample_rate; + drv->input_sample_rate_ratio = (double) drv->client_sample_rate / (double) drv->jack_sample_rate; + TRACE("client sample rate: %lu, jack sample rate: %lu, output ratio = %f, input ratio = %f\n", + drv->client_sample_rate, drv->jack_sample_rate, + drv->output_sample_rate_ratio, drv->input_sample_rate_ratio); + + drv->jack_buffer_size = jack_get_buffer_size(drv->client); + + /* create the output ports */ + TRACE("creating output ports\n"); + for(i = 0; i < drv->num_output_channels; i++) + { + char portname[32]; + sprintf(portname, "out_%d", i); + TRACE("port %d is named '%s'\n", i, portname); + /* NOTE: Yes, this is supposed to be JackPortIsOutput since this is an output */ + /* port FROM bio2jack */ + drv->output_port[i] = jack_port_register(drv->client, portname, + JACK_DEFAULT_AUDIO_TYPE, + JackPortIsOutput, 0); + } + + /* create the input ports */ + TRACE("creating input ports\n"); + for(i = 0; i < drv->num_input_channels; i++) + { + char portname[32]; + sprintf(portname, "in_%d", i); + TRACE("port %d is named '%s'\n", i, portname); + /* NOTE: Yes, this is supposed to be JackPortIsInput since this is an input */ + /* port TO bio2jack */ + drv->input_port[i] = jack_port_register(drv->client, portname, + JACK_DEFAULT_AUDIO_TYPE, + JackPortIsInput, 0); + } + +#if JACK_CLOSE_HACK + drv->in_use = TRUE; +#endif + + /* tell the JACK server that we are ready to roll */ + TRACE("calling jack_activate()\n"); + if(jack_activate(drv->client)) + { + ERR("cannot activate client\n"); + return ERR_OPENING_JACK; + } + + /* if we have output channels and the port connection mode isn't CONNECT_NONE */ + /* then we should connect up some ports */ + if((drv->num_output_channels > 0) && (port_connection_mode != CONNECT_NONE)) + { + /* determine how we are to acquire output port names */ + if((drv->jack_port_name_count == 0) || (drv->jack_port_name_count == 1)) + { + if(drv->jack_port_name_count == 0) + { + TRACE("jack_get_ports() passing in NULL/NULL\n"); + ports = jack_get_ports(drv->client, NULL, NULL, + drv->jack_output_port_flags); + } + else + { + TRACE("jack_get_ports() passing in port of '%s'\n", + drv->jack_port_name[0]); + ports = jack_get_ports(drv->client, drv->jack_port_name[0], NULL, + drv->jack_output_port_flags); + } + + /* display a trace of the output ports we found */ + unsigned int num_ports = 0; + if(ports) + { + for(i = 0; ports[i]; i++) + { + TRACE("ports[%d] = '%s'\n", i, ports[i]); + num_ports++; + } + } + + /* ensure that we found enough ports */ + if(!ports || (i < drv->num_output_channels)) + { + TRACE("ERR: jack_get_ports() failed to find ports with jack port flags of 0x%lX'\n", + drv->jack_output_port_flags); +#if JACK_CLOSE_HACK + JACK_CloseDevice(drv, TRUE); +#else + JACK_CloseDevice(drv); +#endif + return ERR_PORT_NOT_FOUND; + } + + /* connect a port for each output channel. Note: you can't do this before + the client is activated (this may change in the future). */ + for(i = 0; i < drv->num_output_channels; i++) + { + TRACE("jack_connect() to port %d('%p')\n", i, drv->output_port[i]); + if(jack_connect(drv->client, jack_port_name(drv->output_port[i]), ports[i])) + { + ERR("cannot connect to output port %d('%s')\n", i, ports[i]); + failed = 1; + } + } + + /* only if we are in CONNECT_ALL mode should we keep connecting ports up beyond */ + /* the minimum number of ports required for each output channel coming into bio2jack */ + if(port_connection_mode == CONNECT_ALL) + { + /* It's much cheaper and easier to let JACK do the processing required to + connect 2 channels to 4 or 4 channels to 2 or any other combinations. + This effectively eliminates the need for sample_move_d16_d16() */ + if(drv->num_output_channels < num_ports) + { + for(i = drv->num_output_channels; ports[i]; i++) + { + int n = i % drv->num_output_channels; + TRACE("jack_connect() to port %d('%p')\n", i, drv->output_port[n]); + if(jack_connect(drv->client, jack_port_name(drv->output_port[n]), ports[i])) + { + // non fatal + ERR("cannot connect to output port %d('%s')\n", n, ports[i]); + } + } + } + else if(drv->num_output_channels > num_ports) + { + for(i = num_ports; i < drv->num_output_channels; i++) + { + int n = i % num_ports; + TRACE("jack_connect() to port %d('%p')\n", i, drv->output_port[n]); + if(jack_connect(drv->client, jack_port_name(drv->output_port[i]), ports[n])) + { + // non fatal + ERR("cannot connect to output port %d('%s')\n", i, ports[n]); + } + } + } + } + + free(ports); /* free the returned array of ports */ + } + else + { + for(i = 0; i < drv->jack_port_name_count; i++) + { + TRACE("jack_get_ports() portname %d of '%s\n", i, + drv->jack_port_name[i]); + ports = jack_get_ports(drv->client, drv->jack_port_name[i], NULL, + drv->jack_output_port_flags); + + if(!ports) + { + ERR("jack_get_ports() failed to find ports with jack port flags of 0x%lX'\n", + drv->jack_output_port_flags); + return ERR_PORT_NOT_FOUND; + } + + TRACE("ports[%d] = '%s'\n", 0, ports[0]); /* display a trace of the output port we found */ + + /* connect the port */ + TRACE("jack_connect() to port %d('%p')\n", i, drv->output_port[i]); + if(jack_connect(drv->client, jack_port_name(drv->output_port[i]), ports[0])) + { + ERR("cannot connect to output port %d('%s')\n", 0, ports[0]); + failed = 1; + } + free(ports); /* free the returned array of ports */ + } + } + } /* if( drv->num_output_channels > 0 ) */ + + + if(drv->num_input_channels > 0) + { + /* determine how we are to acquire input port names */ + if((drv->jack_port_name_count == 0) || (drv->jack_port_name_count == 1)) + { + if(drv->jack_port_name_count == 0) + { + TRACE("jack_get_ports() passing in NULL/NULL\n"); + ports = jack_get_ports(drv->client, NULL, NULL, drv->jack_input_port_flags); + } + else + { + TRACE("jack_get_ports() passing in port of '%s'\n", + drv->jack_port_name[0]); + ports = jack_get_ports(drv->client, drv->jack_port_name[0], NULL, + drv->jack_input_port_flags); + } + + /* display a trace of the input ports we found */ + unsigned int num_ports = 0; + if(ports) + { + for(i = 0; ports[i]; i++) + { + TRACE("ports[%d] = '%s'\n", i, ports[i]); + num_ports++; + } + } + + /* ensure that we found enough ports */ + if(!ports || (i < drv->num_input_channels)) + { + TRACE("ERR: jack_get_ports() failed to find ports with jack port flags of 0x%lX'\n", + drv->jack_input_port_flags); +#if JACK_CLOSE_HACK + JACK_CloseDevice(drv, TRUE); +#else + JACK_CloseDevice(drv); +#endif + return ERR_PORT_NOT_FOUND; + } + + /* connect the ports. Note: you can't do this before + the client is activated (this may change in the future). */ + for(i = 0; i < drv->num_input_channels; i++) + { + TRACE("jack_connect() to port %d('%p')\n", i, drv->input_port[i]); + if(jack_connect(drv->client, ports[i], jack_port_name(drv->input_port[i]))) + { + ERR("cannot connect to input port %d('%s')\n", i, ports[i]); + failed = 1; + } + } + + /* It's much cheaper and easier to let JACK do the processing required to + connect 2 channels to 4 or 4 channels to 2 or any other combinations. + This effectively eliminates the need for sample_move_d16_d16() */ + if(drv->num_input_channels < num_ports) + { + for(i = drv->num_input_channels; ports[i]; i++) + { + int n = i % drv->num_input_channels; + TRACE("jack_connect() to port %d('%p')\n", i, drv->input_port[n]); + if(jack_connect(drv->client, ports[i], jack_port_name(drv->input_port[n]))) + { + // non fatal + ERR("cannot connect to input port %d('%s')\n", n, ports[i]); + } + } + } + else if(drv->num_input_channels > num_ports) + { + for(i = num_ports; i < drv->num_input_channels; i++) + { + int n = i % num_ports; + TRACE("jack_connect() to port %d('%p')\n", i, drv->input_port[n]); + if(jack_connect(drv->client, ports[n], jack_port_name(drv->input_port[i]))) + { + // non fatal + ERR("cannot connect to input port %d('%s')\n", i, ports[n]); + } + } + } + + free(ports); /* free the returned array of ports */ + } + else + { + for(i = 0; i < drv->jack_port_name_count; i++) + { + TRACE("jack_get_ports() portname %d of '%s\n", i, + drv->jack_port_name[i]); + ports = jack_get_ports(drv->client, drv->jack_port_name[i], NULL, + drv->jack_input_port_flags); + + if(!ports) + { + ERR("jack_get_ports() failed to find ports with jack port flags of 0x%lX'\n", + drv->jack_input_port_flags); + return ERR_PORT_NOT_FOUND; + } + + TRACE("ports[%d] = '%s'\n", 0, ports[0]); /* display a trace of the input port we found */ + + /* connect the port */ + TRACE("jack_connect() to port %d('%p')\n", i, drv->input_port[i]); + if(jack_connect(drv->client, jack_port_name(drv->input_port[i]), ports[0])) + { + ERR("cannot connect to input port %d('%s')\n", 0, ports[0]); + failed = 1; + } + free(ports); /* free the returned array of ports */ + } + } + } /* if( drv->num_input_channels > 0 ) */ + + /* if something failed we need to shut the client down and return 0 */ + if(failed) + { + TRACE("failed, closing and returning error\n"); +#if JACK_CLOSE_HACK + JACK_CloseDevice(drv, TRUE); +#else + JACK_CloseDevice(drv); +#endif + return ERR_OPENING_JACK; + } + + TRACE("success\n"); + + drv->jackd_died = FALSE; /* clear out this flag so we don't keep attempting to restart things */ + drv->state = PLAYING; /* clients seem to behave much better with this on from the start, especially when recording */ + + return ERR_SUCCESS; /* return success */ +} + + +/****************************************************************** + * JACK_CloseDevice + * + * Close the connection to the server cleanly. + * If close_client is TRUE we close the client for this device instead of + * just marking the device as in_use(JACK_CLOSE_HACK only) + */ +#if JACK_CLOSE_HACK +static void +JACK_CloseDevice(jack_driver_t * drv, bool close_client) +#else +static void +JACK_CloseDevice(jack_driver_t * drv) +#endif +{ + unsigned int i; + +#if JACK_CLOSE_HACK + if(close_client) + { +#endif + + TRACE("closing the jack client thread\n"); + if(drv->client) + { + TRACE("after jack_deactivate()\n"); + int errorCode = jack_client_close(drv->client); + if(errorCode) + ERR("jack_client_close() failed returning an error code of %d\n", + errorCode); + } + + /* reset client */ + drv->client = 0; + + /* free up the port strings */ + TRACE("freeing up %d port strings\n", drv->jack_port_name_count); + if(drv->jack_port_name_count > 1) + { + for(i = 0; i < drv->jack_port_name_count; i++) + free(drv->jack_port_name[i]); + free(drv->jack_port_name); + } + JACK_CleanupDriver(drv); + + JACK_ResetFromDriver(drv); + +#if JACK_CLOSE_HACK + } else + { + TRACE("setting in_use to FALSE\n"); + drv->in_use = FALSE; + + if(!drv->client) + { + TRACE("critical error, closing a device that has no client\n"); + } + } +#endif +} + + + + +/**************************************/ +/* External interface functions below */ +/**************************************/ + +/* Clear out any buffered data, stop playing, zero out some variables */ +static void +JACK_ResetFromDriver(jack_driver_t * drv) +{ + TRACE("resetting drv->deviceID(%d)\n", drv->deviceID); + + /* NOTE: we use the RESET state so we don't need to worry about clearing out */ + /* variables that the callback modifies while the callback is running */ + /* we set the state to RESET and the callback clears the variables out for us */ + drv->state = RESET; /* tell the callback that we are to reset, the callback will transition this to STOPPED */ +} + +/* Clear out any buffered data, stop playing, zero out some variables */ +void +JACK_Reset(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + TRACE("resetting deviceID(%d)\n", deviceID); + JACK_ResetFromDriver(drv); + releaseDriver(drv); +} + + +/* + * open the audio device for writing to + * + * deviceID is set to the opened device + * if client is non-zero and in_use is FALSE then just set in_use to TRUE + * + * return value is zero upon success, non-zero upon failure + * + * if ERR_RATE_MISMATCH (*rate) will be updated with the jack servers rate + */ +int +JACK_Open(int *deviceID, unsigned int bits_per_channel, unsigned long *rate, + int channels) +{ + /* we call through to JACK_OpenEx(), but default the input channels to 0 for better backwards + compatibility with clients written before recording was available */ + return JACK_OpenEx(deviceID, bits_per_channel, + rate, + 0, channels, + NULL, 0, JackPortIsPhysical); +} + +/* + * see JACK_Open() for comments + * NOTE: jack_port_name has three ways of being used: + * - NULL - finds all ports with the given flags + * - A single regex string used to retrieve all port names + * - A series of port names, one for each output channel + * + * we set *deviceID + */ +int +JACK_OpenEx(int *deviceID, unsigned int bits_per_channel, + unsigned long *rate, + unsigned int input_channels, unsigned int output_channels, + const char **jack_port_name, + unsigned int jack_port_name_count, unsigned long jack_port_flags) +{ + jack_driver_t *drv = 0; + unsigned int i; + int retval; + + if(input_channels < 1 && output_channels < 1) + { + ERR("no input OR output channels, nothing to do\n"); + return ERR_OPENING_JACK; + } + + switch (bits_per_channel) + { + case 8: + case 16: + break; + default: + ERR("invalid bits_per_channel\n"); + return ERR_OPENING_JACK; + } + + /* Lock the device_mutex and find one that's not allocated already. + We'll keep this lock until we've either made use of it, or given up. */ + pthread_mutex_lock(&device_mutex); + + for(i = 0; i < MAX_OUTDEVICES; i++) + { + if(!outDev[i].allocated) + { + drv = &outDev[i]; + break; + } + } + + if(!drv) + { + ERR("no more devices available\n"); + return ERR_OPENING_JACK; + } + + /* We found an unallocated device, now lock it for extra saftey */ + getDriver(drv->deviceID); + + TRACE("bits_per_channel=%d rate=%ld, input_channels=%d, output_channels=%d\n", + bits_per_channel, *rate, input_channels, output_channels); + + if(output_channels > MAX_OUTPUT_PORTS) + { + ERR("output_channels == %d, MAX_OUTPUT_PORTS == %d\n", output_channels, + MAX_OUTPUT_PORTS); + releaseDriver(drv); + pthread_mutex_unlock(&device_mutex); + return ERR_TOO_MANY_OUTPUT_CHANNELS; + } + + if(input_channels > MAX_INPUT_PORTS) + { + ERR("input_channels == %d, MAX_INPUT_PORTS == %d\n", input_channels, + MAX_INPUT_PORTS); + releaseDriver(drv); + pthread_mutex_unlock(&device_mutex); + return ERR_TOO_MANY_INPUT_CHANNELS; + } + + drv->jack_output_port_flags = jack_port_flags | JackPortIsInput; /* port must be input(ie we can put data into it), so mask this in */ + drv->jack_input_port_flags = jack_port_flags | JackPortIsOutput; /* port must be output(ie we can get data from it), so mask this in */ + + /* check that we have the correct number of port names + FIXME?: not sure how we should handle output ports vs input ports.... + */ + if((jack_port_name_count > 1) + && ((jack_port_name_count < output_channels) + || (jack_port_name_count < input_channels))) + { + ERR("specified individual port names but not enough, gave %d names, need %d\n", + jack_port_name_count, output_channels); + releaseDriver(drv); + pthread_mutex_unlock(&device_mutex); + return ERR_PORT_NAME_OUTPUT_CHANNEL_MISMATCH; + } else + { + /* copy this data into the device information */ + drv->jack_port_name_count = jack_port_name_count; + + if(drv->jack_port_name_count != 0) + { + drv->jack_port_name = + (char **) malloc(sizeof(char *) * drv->jack_port_name_count); + for(i = 0; i < drv->jack_port_name_count; i++) + { + drv->jack_port_name[i] = strdup(jack_port_name[i]); + TRACE("jack_port_name[%d] == '%s'\n", i, jack_port_name[i]); + } + } else + { + drv->jack_port_name = NULL; + TRACE("jack_port_name = NULL\n"); + } + } + + /* initialize some variables */ + drv->in_use = FALSE; + + JACK_ResetFromDriver(drv); /* flushes all queued buffers, sets status to STOPPED and resets some variables */ + + /* drv->jack_sample_rate is set by JACK_OpenDevice() */ +//@ veejay resamples + drv->client_sample_rate = *rate; + drv->bits_per_channel = bits_per_channel; + drv->num_input_channels = input_channels; + drv->num_output_channels = output_channels; + drv->bytes_per_input_frame = (drv->bits_per_channel * drv->num_input_channels) / 8; + drv->bytes_per_output_frame = (drv->bits_per_channel * drv->num_output_channels) / 8; + drv->bytes_per_jack_output_frame = sizeof(sample_t) * drv->num_output_channels; + drv->bytes_per_jack_input_frame = sizeof(sample_t) * drv->num_input_channels; + + if(drv->num_output_channels > 0) + { + drv->pPlayPtr = jack_ringbuffer_create(drv->num_output_channels * + drv->bytes_per_jack_output_frame * + DEFAULT_RB_SIZE); + } + + if(drv->num_input_channels > 0) + { + drv->pRecPtr = jack_ringbuffer_create(drv->num_input_channels * + drv->bytes_per_jack_input_frame * + DEFAULT_RB_SIZE); + } + + DEBUG("bytes_per_output_frame == %ld\n", drv->bytes_per_output_frame); + DEBUG("bytes_per_input_frame == %ld\n", drv->bytes_per_input_frame); + DEBUG("bytes_per_jack_output_frame == %ld\n", + drv->bytes_per_jack_output_frame); + DEBUG("bytes_per_jack_input_frame == %ld\n", + drv->bytes_per_jack_input_frame); + + /* go and open up the device */ + retval = JACK_OpenDevice(drv); + if(retval != ERR_SUCCESS) + { + TRACE("error opening jack device\n"); + releaseDriver(drv); + pthread_mutex_unlock(&device_mutex); + return retval; + } + else + { + TRACE("succeeded opening jack device\n"); + } + + /* setup SRC objects just in case they'll be needed but only if requested */ +#ifdef HAVE_SAMPLERATE + if(do_sample_rate_conversion) + { + int error; + if(drv->num_output_channels > 0) + { + drv->output_src = src_new(preferred_src_converter, drv->num_output_channels, &error); + if(error != 0) + { + src_delete(drv->output_src); + drv->output_src = 0; + ERR("Could not created SRC object for output stream %d: %s\n", + error, src_strerror(error)); + } + } + if(drv->num_input_channels > 0) + { + drv->input_src = src_new(preferred_src_converter, drv->num_input_channels, &error); + if(error != 0) + { + src_delete(drv->input_src); + drv->input_src = 0; + ERR("Could not created SRC object for input stream %d: %s\n", + error, src_strerror(error)); + } + } + } +#endif +/* if((long) (*rate) != drv->jack_sample_rate) + { + TRACE("rate of %ld doesn't match jack sample rate of %ld, returning error\n", + *rate, drv->jack_sample_rate); + *rate = drv->jack_sample_rate; +#if JACK_CLOSE_HACK + JACK_CloseDevice(drv, TRUE); +#else + JACK_CloseDevice(drv); +#endif + releaseDriver(drv); + pthread_mutex_unlock(&device_mutex); + return ERR_RATE_MISMATCH; + } */ + + drv->allocated = TRUE; /* record that we opened this device */ + + DEBUG("sizeof(sample_t) == %d\n", sizeof(sample_t)); + + int periodSize = jack_get_buffer_size(drv->client); + int periods = 0; + /* FIXME: maybe we should keep different latency values for input vs output? */ + if(drv->num_output_channels > 0) + { + periods = jack_port_get_total_latency(drv->client, + drv->output_port[0]) / periodSize; + drv->latencyMS = periodSize * periods * 1000 / (drv->jack_sample_rate * + (drv->bits_per_channel / 8 * + drv->num_output_channels)); + } + else if(drv->num_input_channels > 0) + { + periods = jack_port_get_total_latency(drv->client, + drv->input_port[0]) / periodSize; + drv->latencyMS = + periodSize * periods * 1000 / (drv->jack_sample_rate * + (drv->bits_per_channel / 8 * + drv->num_input_channels)); + } + + TRACE("drv->latencyMS == %ldms\n", drv->latencyMS); + + *deviceID = drv->deviceID; /* set the deviceID for the caller */ + releaseDriver(drv); + pthread_mutex_unlock(&device_mutex); + return ERR_SUCCESS; /* success */ +} + +/* Close the jack device */ +//FIXME: add error handling in here at some point... +/* NOTE: return 0 for success, non-zero for failure */ +int +JACK_Close(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + + TRACE("deviceID(%d)\n", deviceID); + +#if JACK_CLOSE_HACK + JACK_CloseDevice(drv, TRUE); +#else + JACK_CloseDevice(drv); +#endif + + JACK_ResetFromDriver(drv); /* reset this device to a normal starting state */ + + pthread_mutex_lock(&device_mutex); + + /* free buffer memory */ + drv->callback_buffer1_size = 0; + if(drv->callback_buffer1) free(drv->callback_buffer1); + drv->callback_buffer1 = 0; + + drv->callback_buffer2_size = 0; + if(drv->callback_buffer2) free(drv->callback_buffer2); + drv->callback_buffer2 = 0; + + drv->rw_buffer1_size = 0; + if(drv->rw_buffer1) free(drv->rw_buffer1); + drv->rw_buffer1 = 0; + + if(drv->pPlayPtr) jack_ringbuffer_free(drv->pPlayPtr); + drv->pPlayPtr = 0; + + if(drv->pRecPtr) jack_ringbuffer_free(drv->pRecPtr); + drv->pRecPtr = 0; + + /* free the SRC objects */ +#ifdef HAVE_SAMPLERATE + if(drv->output_src) src_delete(drv->output_src); + drv->output_src = 0; + + if(drv->input_src) src_delete(drv->input_src); + drv->input_src = 0; +#endif + drv->allocated = FALSE; /* release this device */ + + pthread_mutex_unlock(&device_mutex); + + releaseDriver(drv); + + return 0; +} + +/* If we haven't already taken in the max allowed data then create a wave header */ +/* to package the audio data and attach the wave header to the end of the */ +/* linked list of wave headers */ +/* These wave headers will be peeled off as they are played by the callback routine */ +/* Return value is the number of bytes written */ +/* NOTE: this function takes the length of data to be written bytes */ +long +JACK_Write(int deviceID, unsigned char *data, unsigned long bytes) +{ + jack_driver_t *drv = getDriver(deviceID); + + long frames_free, frames; + + TIMER("start\n"); + + TRACE("deviceID(%d), bytes == %ld\n", deviceID, bytes); + + /* check and see that we have enough space for this audio */ + frames_free = + jack_ringbuffer_write_space(drv->pPlayPtr) / + drv->bytes_per_jack_output_frame; + frames = bytes / drv->bytes_per_output_frame; + TRACE("frames free == %ld, bytes = %lu\n", frames_free, bytes); + + TRACE("state = '%s'\n", DEBUGSTATE(drv->state)); + /* if we are currently STOPPED we should start playing now... + do this before the check for bytes == 0 since some clients like + to write 0 bytes the first time out */ + if(drv->state == STOPPED) + { + TRACE("currently STOPPED, transitioning to PLAYING\n"); + drv->state = PLAYING; + } + + /* handle the case where the user calls this routine with 0 bytes */ + if(bytes == 0 || frames_free < 1) + { + TRACE("no room left\n"); + TIMER("finish (nothing to do, buffer is full)\n"); + releaseDriver(drv); + return 0; /* indicate that we couldn't write any bytes */ + } + + frames = min(frames, frames_free); + long jack_bytes = frames * drv->bytes_per_jack_output_frame; + if(!ensure_buffer_size(&drv->rw_buffer1, &drv->rw_buffer1_size, jack_bytes)) + { + ERR("couldn't allocate enough space for the buffer\n"); + releaseDriver(drv); + return 0; + } + /* adjust bytes to be how many client bytes we're actually writing */ + bytes = frames * drv->bytes_per_output_frame; + + /* convert from client samples to jack samples + we have to tell it how many samples there are, which is frames * channels */ + switch (drv->bits_per_channel) + { + case 8: + sample_move_char_float((sample_t *) drv->rw_buffer1, (unsigned char *) data, + frames * drv->num_output_channels); + break; + case 16: + sample_move_short_float((sample_t *) drv->rw_buffer1, (short *) data, + frames * drv->num_output_channels); + break; + } + + DEBUG("ringbuffer read space = %d, write space = %d\n", + jack_ringbuffer_read_space(drv->pPlayPtr), + jack_ringbuffer_write_space(drv->pPlayPtr)); + + jack_ringbuffer_write(drv->pPlayPtr, drv->rw_buffer1, jack_bytes); + DEBUG("wrote %lu bytes, %lu jack_bytes\n", bytes, jack_bytes); + + DEBUG("ringbuffer read space = %d, write space = %d\n", + jack_ringbuffer_read_space(drv->pPlayPtr), + jack_ringbuffer_write_space(drv->pPlayPtr)); + + drv->client_bytes += bytes; /* update client_bytes */ + + TIMER("finish\n"); + + DEBUG("returning bytes written of %ld\n", bytes); + + releaseDriver(drv); + return bytes; /* return the number of bytes we wrote out */ +} + +long +JACK_Read(int deviceID, unsigned char *data, unsigned long bytes) +{ + jack_driver_t *drv = getDriver(deviceID); + + long frames_available, frames; + + TIMER("start\n"); + + TRACE("deviceID(%d), bytes == %ld\n", deviceID, bytes); + + /* find out if there's any room to write this data */ + frames_available = + jack_ringbuffer_read_space(drv->pRecPtr) / + drv->bytes_per_jack_input_frame; + frames = bytes / drv->bytes_per_input_frame; + DEBUG("frames available = %ld, bytes = %lu\n", frames_available, bytes); + + TRACE("state = '%s'\n", DEBUGSTATE(drv->state)); + /* if we are currently STOPPED we should start recording now... */ + if(drv->state == STOPPED) + { + TRACE("currently STOPPED, transitioning to PLAYING\n"); + drv->state = PLAYING; + } + + /* handle the case where the user calls this routine with 0 bytes */ + if(bytes == 0 || frames_available < 1) + { + TRACE("no bytes in buffer\n"); + + TIMER("finish (nothing to do)\n"); + releaseDriver(drv); + return 0; + } + + frames = min(frames, frames_available); + long jack_bytes = frames * drv->bytes_per_jack_input_frame; + if(!ensure_buffer_size(&drv->rw_buffer1, &drv->rw_buffer1_size, jack_bytes)) + { + ERR("couldn't allocate enough space for the buffer\n"); + releaseDriver(drv); + return 0; + } + + DEBUG("ringbuffer read space = %d, write space = %d\n", + jack_ringbuffer_read_space(drv->pRecPtr), + jack_ringbuffer_write_space(drv->pRecPtr)); + + jack_ringbuffer_read(drv->pRecPtr, drv->rw_buffer1, + frames * drv->bytes_per_jack_input_frame); + + DEBUG("ringbuffer read space = %d, write space = %d\n", + jack_ringbuffer_read_space(drv->pRecPtr), + jack_ringbuffer_write_space(drv->pRecPtr)); + + unsigned int i; + for(i = 0; i < drv->num_output_channels; i++) + { + /* apply volume to the floating value */ + if(drv->volumeEffectType == dbAttenuation) + { + /* assume the volume setting is dB of attenuation, a volume of 0 */ + /* is 0dB attenuation */ + float volume = powf(10.0, -((float) drv->volume[i]) / 20.0); + float_volume_effect((sample_t *) drv->rw_buffer1 + i, + frames, volume, drv->num_output_channels); + } else + { + float_volume_effect((sample_t *) drv->rw_buffer1 + i, frames, + ((float) drv->volume[i] / 100.0), + drv->num_output_channels); + } + } + + /* convert from jack samples to client samples + we have to tell it how many samples there are, which is frames * channels */ + switch (drv->bits_per_channel) + { + case 8: + sample_move_float_char((unsigned char *) data, (sample_t *) drv->rw_buffer1, + frames * drv->num_input_channels); + break; + case 16: + sample_move_float_short((short *) data, (sample_t *) drv->rw_buffer1, + frames * drv->num_input_channels); + break; + } + + TIMER("finish\n"); + + long read_bytes = frames * drv->bytes_per_input_frame; + + DEBUG("returning bytes read of %ld\n", bytes); + + releaseDriver(drv); + return read_bytes; +} + +/* return ERR_SUCCESS for success */ +static int +JACK_SetVolumeForChannelFromDriver(jack_driver_t * drv, + unsigned int channel, unsigned int volume) +{ + /* TODO?: maybe we should have different volume levels for input & output */ + /* ensure that we have the channel we are setting volume for */ + if(channel > (drv->num_output_channels - 1)) + return 1; + + if(volume > 100) + volume = 100; /* check for values in excess of max */ + + drv->volume[channel] = volume; + return ERR_SUCCESS; +} + +/* return ERR_SUCCESS for success */ +int +JACK_SetVolumeForChannel(int deviceID, unsigned int channel, + unsigned int volume) +{ + jack_driver_t *drv = getDriver(deviceID); + int retval = JACK_SetVolumeForChannelFromDriver(drv, channel, volume); + releaseDriver(drv); + return retval; +} + +/* Set the volume */ +/* return 0 for success */ +/* NOTE: we check for invalid volume values */ +int +JACK_SetAllVolume(int deviceID, unsigned int volume) +{ + jack_driver_t *drv = getDriver(deviceID); + unsigned int i; + + TRACE("deviceID(%d), setting volume of %d\n", deviceID, volume); + + for(i = 0; i < drv->num_output_channels; i++) + { + if(JACK_SetVolumeForChannelFromDriver(drv, i, volume) != ERR_SUCCESS) + { + releaseDriver(drv); + return 1; + } + } + + releaseDriver(drv); + return ERR_SUCCESS; +} + +/* Return the current volume in the inputted pointers */ +/* NOTE: we check for null pointers being passed in just in case */ +void +JACK_GetVolumeForChannel(int deviceID, unsigned int channel, + unsigned int *volume) +{ + jack_driver_t *drv = getDriver(deviceID); + + /* ensure that we have the channel we are getting volume for */ + if(channel > (drv->num_output_channels - 1)) + { + ERR("asking for channel index %d but we only have %ld channels\n", channel, drv->num_output_channels); + releaseDriver(drv); + return; + } + + if(volume) + *volume = drv->volume[channel]; + +#if VERBOSE_OUTPUT + if(volume) + { + TRACE("deviceID(%d), returning volume of %d for channel %d\n", + deviceID, *volume, channel); + } + else + { + TRACE("volume is null, can't dereference it\n"); + } +#endif + + releaseDriver(drv); +} + + +/* linear means 0 volume is silence, 100 is full volume */ +/* dbAttenuation means 0 volume is 0dB attenuation */ +/* Bio2jack defaults to linear */ +enum JACK_VOLUME_TYPE +JACK_SetVolumeEffectType(int deviceID, enum JACK_VOLUME_TYPE type) +{ + enum JACK_VOLUME_TYPE retval; + jack_driver_t *drv = getDriver(deviceID); + + TRACE("setting type of '%s'\n", + (type == dbAttenuation ? "dbAttenuation" : "linear")); + + retval = drv->volumeEffectType; + drv->volumeEffectType = type; + + releaseDriver(drv); + return retval; +} + + +/* Controls the state of the playback(playing, paused, ...) */ +int +JACK_SetState(int deviceID, enum status_enum state) +{ + jack_driver_t *drv = getDriver(deviceID); + + switch (state) + { + case PAUSED: + drv->state = PAUSED; + break; + case PLAYING: + drv->state = PLAYING; + break; + case STOPPED: + drv->state = STOPPED; + break; + default: + TRACE("unknown state of %d\n", state); + } + + TRACE("%s\n", DEBUGSTATE(drv->state)); + + releaseDriver(drv); + return 0; +} + +/* Retrieve the current state of the device */ +enum status_enum +JACK_GetState(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + enum status_enum return_val; + + return_val = drv->state; + releaseDriver(drv); + + TRACE("deviceID(%d), returning current state of %s\n", deviceID, + DEBUGSTATE(return_val)); + return return_val; +} + +/* Retrieve the number of bytes per second we are outputting */ +unsigned long +JACK_GetOutputBytesPerSecondFromDriver(jack_driver_t * drv) +{ + unsigned long return_val; + + return_val = drv->bytes_per_output_frame * drv->client_sample_rate; + +#if VERBOSE_OUTPUT + TRACE("deviceID(%d), return_val = %ld\n", drv->deviceID, return_val); +#endif + + return return_val; +} + +/* Retrieve the number of bytes per second we are outputting */ +unsigned long +JACK_GetOutputBytesPerSecond(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + unsigned long return_val; + + return_val = JACK_GetOutputBytesPerSecondFromDriver(drv); + releaseDriver(drv); + + return return_val; +} + +/* Retrieve the number of input bytes(from jack) per second we are outputting + to the user of bio2jack */ +static long +JACK_GetInputBytesPerSecondFromDriver(jack_driver_t * drv) +{ + long return_val; + + return_val = drv->bytes_per_input_frame * drv->client_sample_rate; +#if VERBOSE_OUTPUT + TRACE("drv->deviceID(%d), return_val = %ld\n", drv->deviceID, return_val); +#endif + + return return_val; +} + +/* Retrieve the number of input bytes(from jack) per second we are outputting + to the user of bio2jack */ +unsigned long +JACK_GetInputBytesPerSecond(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val = JACK_GetInputBytesPerSecondFromDriver(drv); + releaseDriver(drv); + +#if VERBOSE_OUTPUT + TRACE("deviceID(%d), return_val = %ld\n", deviceID, return_val); +#endif + + return return_val; +} + +/* Return the number of bytes we have buffered thus far for output */ +/* NOTE: convert from output bytes to input bytes in here */ +static long +JACK_GetBytesStoredFromDriver(jack_driver_t * drv) +{ + if(drv->pPlayPtr == 0 || drv->bytes_per_jack_output_frame == 0) + return 0; + + /* leave at least one frame in the buffer at all times to prevent underruns */ + long return_val = + jack_ringbuffer_read_space(drv->pPlayPtr) - drv->jack_buffer_size; + if(return_val <= 0) + { + return_val = 0; + } else + { + /* adjust from jack bytes to client bytes */ + return_val = + return_val / drv->bytes_per_jack_output_frame * + drv->bytes_per_output_frame; + } + + return return_val; +} + +/* An approximation of how many bytes we have to send out to jack */ +/* that is computed as if we were sending jack a continuous stream of */ +/* bytes rather than chunks during discrete callbacks. */ +/* Return the number of bytes we have buffered thus far for output */ +/* NOTE: convert from output bytes to input bytes in here */ +unsigned long +JACK_GetBytesStored(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long retval = JACK_GetBytesStoredFromDriver(drv); + releaseDriver(drv); + TRACE("deviceID(%d), retval = %ld\n", deviceID, retval); + return retval; +} + +static unsigned long +JACK_GetBytesFreeSpaceFromDriver(jack_driver_t * drv) +{ + if(drv->pPlayPtr == 0 || drv->bytes_per_jack_output_frame == 0) + return 0; + + /* leave at least one frame in the buffer at all times to prevent underruns */ + long return_val = jack_ringbuffer_write_space(drv->pPlayPtr) - drv->jack_buffer_size; + if(return_val <= 0) + { + return_val = 0; + } else + { + /* adjust from jack bytes to client bytes */ + return_val = + return_val / drv->bytes_per_jack_output_frame * + drv->bytes_per_output_frame; + } + + return return_val; +} + +/* Return the number of bytes we can write to the device */ +unsigned long +JACK_GetBytesFreeSpace(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + unsigned long return_val; + + return_val = JACK_GetBytesFreeSpaceFromDriver(drv); + releaseDriver(drv); + + TRACE("deviceID(%d), retval == %ld\n", deviceID, return_val); + + return return_val; +} + +/* bytes of space used in the input buffer */ +unsigned long +JACK_GetBytesUsedSpace(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val; + + if(drv->pRecPtr == 0 || drv->bytes_per_jack_input_frame == 0) + { + return_val = 0; + } else + { + /* adjust from jack bytes to client bytes */ + return_val = + jack_ringbuffer_read_space(drv->pRecPtr) / + drv->bytes_per_jack_input_frame * drv->bytes_per_input_frame; + } + + releaseDriver(drv); + + if(return_val < 0) + return_val = 0; + TRACE("deviceID(%d), retval == %ld\n", deviceID, return_val); + + return return_val; +} + +/* Get the current position of the driver, either in bytes or */ +/* in milliseconds */ +/* NOTE: this is position relative to input bytes, output bytes may differ greatly due to + input vs. output channel count */ +static long +JACK_GetPositionFromDriver(jack_driver_t * drv, enum pos_enum position, + int type) +{ + long return_val = 0; + struct timeval now; + long elapsedMS; + double sec2msFactor = 1000; + + char *type_str = "UNKNOWN type"; + + /* if we are reset we should return a position of 0 */ + if(drv->state == RESET) + { + TRACE("we are currently RESET, returning 0\n"); + return 0; + } + + if(type == WRITTEN) + { + type_str = "WRITTEN"; + return_val = drv->client_bytes; + } else if(type == WRITTEN_TO_JACK) + { + type_str = "WRITTEN_TO_JACK"; + return_val = drv->written_client_bytes; + } else if(type == PLAYED) /* account for the elapsed time for the played_bytes */ + { + type_str = "PLAYED"; + return_val = drv->played_client_bytes; + gettimeofday(&now, 0); + + elapsedMS = TimeValDifference(&drv->previousTime, &now); /* find the elapsed milliseconds since last JACK_Callback() */ + + TRACE("elapsedMS since last callback is '%ld'\n", elapsedMS); + + /* account for the bytes played since the last JACK_Callback() */ + /* NOTE: [Xms * (Bytes/Sec)] * (1 sec/1,000ms) */ + /* NOTE: don't do any compensation if no data has been sent to jack since the last callback */ + /* as this would result a bogus computed result */ + if(drv->clientBytesInJack != 0) + { + return_val += (long) ((double) elapsedMS * + ((double) JACK_GetOutputBytesPerSecondFromDriver(drv) / + sec2msFactor)); + } else + { + TRACE("clientBytesInJack == 0\n"); + } + } + + /* add on the offset */ + return_val += drv->position_byte_offset; + + /* convert byte position to milliseconds value if necessary */ + if(position == MILLISECONDS) + { + if(JACK_GetOutputBytesPerSecondFromDriver(drv) != 0) + { + return_val = (long) (((double) return_val / + (double) JACK_GetOutputBytesPerSecondFromDriver(drv)) * + (double) sec2msFactor); + } else + { + return_val = 0; + } + } + + TRACE("drv->deviceID(%d), type(%s), return_val = %ld\n", drv->deviceID, + type_str, return_val); + + return return_val; +} + +/* Get the current position of the driver, either in bytes or */ +/* in milliseconds */ +/* NOTE: this is position relative to input bytes, output bytes may differ greatly due to input vs. output channel count */ +long +JACK_GetPosition(int deviceID, enum pos_enum position, int type) +{ + jack_driver_t *drv = getDriver(deviceID); + long retval = JACK_GetPositionFromDriver(drv, position, type); + releaseDriver(drv); + TRACE("retval == %ld\n", retval); + return retval; +} + +// Set position always applies to written bytes +// NOTE: we must apply this instantly because if we pass this as a message +// to the callback we risk the user sending us audio data in the mean time +// and there is no need to send this as a message, we don't modify any +// internal variables +void +JACK_SetPositionFromDriver(jack_driver_t * drv, enum pos_enum position, + long value) +{ + double sec2msFactor = 1000; +#if TRACE_ENABLE + long input_value = value; +#endif + + /* convert the incoming value from milliseconds into bytes */ + if(position == MILLISECONDS) + { + value = (long) (((double) value * + (double) JACK_GetOutputBytesPerSecondFromDriver(drv)) / + sec2msFactor); + } + + /* ensure that if the user asks for the position */ + /* they will at this instant get the correct position */ + drv->position_byte_offset = value - drv->client_bytes; + + TRACE("deviceID(%d) input_value of %ld %s, new value of %ld, setting position_byte_offset to %ld\n", + drv->deviceID, input_value, (position == MILLISECONDS) ? "ms" : "bytes", + value, drv->position_byte_offset); +} + +// Set position always applies to written bytes +// NOTE: we must apply this instantly because if we pass this as a message +// to the callback we risk the user sending us audio data in the mean time +// and there is no need to send this as a message, we don't modify any +// internal variables +void +JACK_SetPosition(int deviceID, enum pos_enum position, long value) +{ + jack_driver_t *drv = getDriver(deviceID); + JACK_SetPositionFromDriver(drv, position, value); + releaseDriver(drv); + + TRACE("deviceID(%d) value of %ld\n", drv->deviceID, value); +} + +/* Return the number of bytes per frame, or (output_channels * bits_per_channel) / 8 */ +unsigned long +JACK_GetBytesPerOutputFrame(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val = drv->bytes_per_output_frame; + releaseDriver(drv); + TRACE("deviceID(%d), return_val = %ld\n", deviceID, return_val); + return return_val; +} + +/* Return the number of bytes per frame, or (input_channels * bits_per_channel) / 8 */ +unsigned long +JACK_GetBytesPerInputFrame(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val = drv->bytes_per_input_frame; + releaseDriver(drv); + TRACE("deviceID(%d), return_val = %ld\n", deviceID, return_val); + return return_val; +} + +/* Return the number of output bytes we buffer max */ +long +JACK_GetMaxOutputBufferedBytes(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val; + + if(drv->pPlayPtr == 0 || drv->bytes_per_jack_output_frame == 0) return_val = 0; + + /* adjust from jack bytes to client bytes */ + return_val = + (jack_ringbuffer_read_space(drv->pPlayPtr) + + jack_ringbuffer_write_space(drv->pPlayPtr)) / + drv->bytes_per_jack_output_frame * drv->bytes_per_output_frame; + + releaseDriver(drv); + + TRACE("return_val = %ld\n", return_val); + + return return_val; +} + +/* Return the number of input bytes we buffer max */ +long +JACK_GetMaxInputBufferedBytes(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val; + + if(drv->pRecPtr == 0 || drv->bytes_per_jack_input_frame == 0) return_val = 0; + + /* adjust from jack bytes to client bytes */ + return_val = + (jack_ringbuffer_read_space(drv->pRecPtr) + + jack_ringbuffer_write_space(drv->pRecPtr)) / + drv->bytes_per_jack_input_frame * drv->bytes_per_input_frame; + + releaseDriver(drv); + + TRACE("return_val = %ld\n", return_val); + + return return_val; +} + +/* Get the number of output channels */ +int +JACK_GetNumOutputChannels(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + int return_val = drv->num_output_channels; + releaseDriver(drv); + TRACE("getting num_output_channels of %d\n", return_val); + return return_val; +} + +/* Get the number of input channels */ +int +JACK_GetNumInputChannels(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + int return_val = drv->num_input_channels; + releaseDriver(drv); + TRACE("getting num_input_channels of %d\n", return_val); + return return_val; +} + +/* Get the number of samples per second, the sample rate */ +long +JACK_GetSampleRate(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + int return_val = drv->client_sample_rate; + releaseDriver(drv); + TRACE("getting sample_rate of %d\n", return_val); + return return_val; +} + +void +JACK_CleanupDriver(jack_driver_t * drv) +{ + TRACE("\n"); + /* things that need to be reset both in JACK_Init & JACK_CloseDevice */ + drv->client = 0; + drv->in_use = FALSE; + drv->state = CLOSED; + drv->jack_sample_rate = 0; + drv->output_sample_rate_ratio = 1.0; + drv->input_sample_rate_ratio = 1.0; + drv->jackd_died = FALSE; + gettimeofday(&drv->previousTime, 0); /* record the current time */ + gettimeofday(&drv->last_reconnect_attempt, 0); +} + +/* Initialize the jack porting library to a clean state */ +void +JACK_Init(void) +{ + jack_driver_t *drv; + int x, y; + + if(init_done) + { + TRACE("not initing twice\n"); + return; + } + + init_done = 1; + + TRACE("\n"); + + pthread_mutex_lock(&device_mutex); + + /* initialize the device structures */ + for(x = 0; x < MAX_OUTDEVICES; x++) + { + drv = &outDev[x]; + + pthread_mutex_init(&drv->mutex, NULL); + + getDriver(x); + + memset(drv, 0, sizeof(jack_driver_t)); + drv->volumeEffectType = linear; + drv->deviceID = x; + + for(y = 0; y < MAX_OUTPUT_PORTS; y++) /* make all volume 25% as a default */ + drv->volume[y] = 25; + + JACK_CleanupDriver(drv); + JACK_ResetFromDriver(drv); + releaseDriver(drv); + } + + client_name = 0; /* initialize the name to null */ + do_sample_rate_conversion = FALSE; /* default to on */ + //@ veejay: default to false! + JACK_SetClientName("bio2jack"); + + pthread_mutex_unlock(&device_mutex); + + TRACE("finished\n"); +} + +/* Get the latency, in frames, of jack */ +long +JACK_GetJackOutputLatency(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val = 0; + + if(drv->client && drv->num_output_channels) + return_val = jack_port_get_total_latency(drv->client, drv->output_port[0]); + + TRACE("got latency of %ld frames\n", return_val); + + releaseDriver(drv); + return return_val; +} + +/* Get the latency, in frames, of jack */ +long +JACK_GetJackInputLatency(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val = 0; + + if(drv->client && drv->num_input_channels) + return_val = jack_port_get_total_latency(drv->client, drv->input_port[0]); + + TRACE("got latency of %ld frames\n", return_val); + + releaseDriver(drv); + return return_val; +} + +/* bytes that jack requests during each callback */ +unsigned long +JACK_GetJackBufferedBytes(int deviceID) +{ + jack_driver_t *drv = getDriver(deviceID); + long return_val; + + if(drv->bytes_per_jack_output_frame == 0) + { + return_val = 0; + } else + { + /* adjust from jack bytes to client bytes */ + return_val = + drv->jack_buffer_size / drv->bytes_per_jack_output_frame * + drv->bytes_per_output_frame * drv->num_output_channels; + } + + releaseDriver(drv); + return return_val; +} + +/* value = TRUE, perform sample rate conversion */ +void +JACK_DoSampleRateConversion(bool value) +{ +#ifdef HAVE_SAMPLERATE + do_sample_rate_conversion = value; +#endif +} + +/* FIXME: put the filename of the resample library header file with the decoders in here */ +/* consider mapping them in the bio2jack.h header file since its useless to the user unless */ +/* they can figure out wtf the settings on */ +void +JACK_SetSampleRateConversionFunction(int converter) +{ +#ifdef HAVE_SAMPLERATE + preferred_src_converter = converter; +#endif +} + +/* set the client name that will be reported to jack when we open a */ +/* connection via JACK_OpenDevice() */ +void +JACK_SetClientName(char *name) +{ + if(name) + { + if(client_name) free(client_name); + + /* jack_client_name_size() is the max length of a client name, including + the terminating null. */ + int size = strlen(name) + 1; /* take into account the terminating null */ + if(size > jack_client_name_size()) + size = jack_client_name_size(); + + client_name = malloc(size); + if(client_name) + snprintf(client_name, size, "%s", name); + else + ERR("unable to allocate %d bytes for client_name\n", size); + } +} + +long JACK_OutputStatus(int deviceID,long int *sec, long int *usec) +{ + jack_driver_t *this = &outDev[deviceID]; + *sec = (long int) this->previousTime.tv_sec; + *usec = (long int) this->previousTime.tv_usec; + return (this->num_ticks * this->chunk_size); +} + + + +void +JACK_SetPortConnectionMode(enum JACK_PORT_CONNECTION_MODE mode) +{ + port_connection_mode = mode; +} +#endif diff --git a/veejay-server/bio2jack/bio2jack.h b/veejay-server/bio2jack/bio2jack.h new file mode 100644 index 00000000..7a295681 --- /dev/null +++ b/veejay-server/bio2jack/bio2jack.h @@ -0,0 +1,147 @@ +/* + * Copyright 2003-2004 Chris Morgan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _H_JACK_OUT_H +#define _H_JACK_OUT_H + +#include + +#ifdef __cplusplus +extern "C" { +#else +#define bool long +#endif + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#define ERR_SUCCESS 0 +#define ERR_OPENING_JACK 1 +#define ERR_RATE_MISMATCH 2 +#define ERR_BYTES_PER_OUTPUT_FRAME_INVALID 3 +#define ERR_BYTES_PER_INPUT_FRAME_INVALID 4 +#define ERR_TOO_MANY_OUTPUT_CHANNELS 5 +#define ERR_PORT_NAME_OUTPUT_CHANNEL_MISMATCH 6 +#define ERR_PORT_NOT_FOUND 7 +#define ERR_TOO_MANY_INPUT_CHANNELS 8 +#define ERR_PORT_NAME_INPUT_CHANNEL_MISMATCH 9 + +enum status_enum { PLAYING, PAUSED, STOPPED, CLOSED, RESET }; +enum pos_enum { BYTES, MILLISECONDS }; + +#define PLAYED 1 /* played out of the speakers(estimated value but should be close */ +#define WRITTEN_TO_JACK 2 /* amount written out to jack */ +#define WRITTEN 3 /* amount written to the bio2jack device */ + +/**********************/ +/* External functions */ +void JACK_Init(void); /* call this before any other bio2jack calls */ +void JACK_DoSampleRateConversion(bool value); /* whether the next device that's Open()d should do + sample rate conversion if necessary */ +void JACK_SetSampleRateConversionFunction(int converter); /* which SRC converter function should be used + for the next Open()d device */ +int JACK_Open(int *deviceID, unsigned int bits_per_sample, unsigned long *rate, int channels); /* Note: defaults to 0 input channels + if you need input (record) use OpenEx + instead */ +int JACK_OpenEx(int *deviceID, unsigned int bits_per_channel, + unsigned long *rate, + unsigned int input_channels, unsigned int output_channels, + const char **jack_port_name, unsigned int jack_port_name_count, + unsigned long jack_port_flags); +int JACK_Close(int deviceID); /* return 0 for success */ +void JACK_Reset(int deviceID); /* free all buffered data and reset several values in the device */ +long JACK_Write(int deviceID, unsigned char *data, unsigned long bytes); /* returns the number of bytes written */ +long JACK_Read(int deviceID, unsigned char *data, unsigned long bytes); /* returns the number of bytes read */ + +/* state setting values */ +/* set/get the written/played/buffered value based on a byte or millisecond input value */ +long JACK_GetPosition(int deviceID, enum pos_enum position, int type); +void JACK_SetPosition(int deviceID, enum pos_enum position, long value); + +long JACK_GetJackLatency(int deviceID); /* deprectated, you probably want JACK_GetJackOutputLatency */ +long JACK_GetJackOutputLatency(int deviceID); /* return the output latency in frames */ +long JACK_GetJackInputLatency(int deviceID); /* return the input latency in frames */ + +int JACK_SetState(int deviceID, enum status_enum state); /* playing, paused, stopped */ +enum status_enum JACK_GetState(int deviceID); + +long JACK_GetMaxOutputBufferedBytes(int deviceID); +long JACK_GetMaxInputBufferedBytes(int deviceID); + +/* bytes that jack requests during each callback */ +unsigned long JACK_GetJackBufferedBytes(int deviceID); + +/* Properties of the jack driver */ + +/* linear means 0 volume is silence, 100 is full volume */ +/* dbAttenuation means 0 volume is 0dB attenuation */ +/* Bio2jack defaults to linear */ +/* Note: volume controls only effect output channels for now */ +enum JACK_VOLUME_TYPE { linear, dbAttenuation }; +enum JACK_VOLUME_TYPE JACK_SetVolumeEffectType(int deviceID, + enum JACK_VOLUME_TYPE type); + +int JACK_SetAllVolume(int deviceID, unsigned int volume); /* returns 0 on success */ +int JACK_SetVolumeForChannel(int deviceID, unsigned int channel, unsigned int volume); +void JACK_GetVolumeForChannel(int deviceID, unsigned int channel, unsigned int *volume); + + +unsigned long JACK_GetOutputBytesPerSecond(int deviceID); /* bytes_per_output_frame * sample_rate */ +unsigned long JACK_GetInputBytesPerSecond(int deviceID); /* bytes_per_input_frame * sample_rate */ +unsigned long JACK_GetBytesStored(int deviceID); /* bytes currently buffered in the output buffer */ +unsigned long JACK_GetBytesFreeSpace(int deviceID); /* bytes of free space in the output buffer */ +unsigned long JACK_GetBytesUsedSpace(int deviceID); /* bytes of space used in the input buffer */ +unsigned long JACK_GetBytesPerOutputFrame(int deviceID); +unsigned long JACK_GetBytesPerInputFrame(int deviceID); + +/* Note: these will probably be removed in a future release */ +int JACK_GetNumInputChannels(int deviceID); +int JACK_GetNumOutputChannels(int deviceID); + +long JACK_GetSampleRate(int deviceID); /* samples per second */ + +void JACK_SetClientName(char *name); /* sets the name that bio2jack will use when + creating a new jack client. name_%pid%_%deviceID%%counter% + will be used + NOTE: this defaults to name = bio2jack + NOTE: we limit the size of the client name to + jack_client_name_size() */ + +enum JACK_PORT_CONNECTION_MODE +{ + CONNECT_ALL, /* connect to all avaliable ports */ + CONNECT_OUTPUT, /* connect only to the ports we need for output */ + CONNECT_NONE /* don't connect to any ports */ +}; + +/* set the mode for port connections */ +/* defaults to CONNECT_ALL */ +void JACK_SetPortConnectionMode(enum JACK_PORT_CONNECTION_MODE mode); + +long JACK_OutputStatus(int deviceID,long int *sec, long int *usec); + +#ifdef __cplusplus +} +#endif + +#endif /* #ifndef JACK_OUT_H */ diff --git a/veejay-server/config.guess b/veejay-server/config.guess new file mode 100755 index 00000000..0f0fe712 --- /dev/null +++ b/veejay-server/config.guess @@ -0,0 +1,1516 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-03-06' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/veejay-server/config.h.in b/veejay-server/config.h.in new file mode 100644 index 00000000..a61f95d4 --- /dev/null +++ b/veejay-server/config.h.in @@ -0,0 +1,323 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Compiling for MIPS CPU */ +#undef ARCH_MIPS + +/* Compiling for PowerPC */ +#undef ARCH_PPC + +/* Compiling for x86 architecture */ +#undef ARCH_X86 + +/* Compiling for x86-64 architecture CPU */ +#undef ARCH_X86_64 + +/* */ +#undef AVCODEC_INC + +/* */ +#undef AVFORMAT_INC + +/* */ +#undef AVUTIL_INC + +/* Define to 1 if you have the header file. */ +#undef HAVE_ALLOCA_H + +/* Inline PPC Altivec primitives available */ +#undef HAVE_ALTIVEC + +/* Compiling in 3Dnow */ +#undef HAVE_ASM_3DNOW + +/* Compiling in MMX support */ +#undef HAVE_ASM_MMX + +/* Compiling in MMX2 */ +#undef HAVE_ASM_MMX2 + +/* Compiling in MMXEXT */ +#undef HAVE_ASM_MMXEXT + +/* Compiling in SSE support */ +#undef HAVE_ASM_SSE + +/* Compiling in SSE2 support */ +#undef HAVE_ASM_SSE2 + +/* use avcodec */ +#undef HAVE_AVCODEC + +/* use avformat */ +#undef HAVE_AVFORMAT + +/* Define to 1 if you have the `bzero' function. */ +#undef HAVE_BZERO + +/* Compiling in CMOV */ +#undef HAVE_CMOV + +/* Include config.h */ +#undef HAVE_CONFIG_H + +/* MAC OS X Darin */ +#undef HAVE_DARWIN + +/* Compiling with DirectFB */ +#undef HAVE_DIRECTFB + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Compile with dlopen support */ +#undef HAVE_DL_DLOPEN + +/* Define to 1 if you have the header file. */ +#undef HAVE_FENV_H + +/* Defined if building against uninstalled FFmpeg source */ +#undef HAVE_FFMPEG_UNINSTALLED + +/* Define to 1 if you have the `fmax' function. */ +#undef HAVE_FMAX + +/* Compiling with FreeType */ +#undef HAVE_FREETYPE + +/* long getopt support */ +#undef HAVE_GETOPT_LONG + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* use gl */ +#undef HAVE_GL + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Compiling with support for Jack */ +#undef HAVE_JACK + +/* Define is JPEG libraries are available */ +#undef HAVE_JPEG + +/* Define to 1 if you have the `dl' library (-ldl). */ +#undef HAVE_LIBDL + +/* Compiling with pthread library */ +#undef HAVE_LIBPTHREAD + +/* libquicktime >= 1.0.0 prese nt */ +#undef HAVE_LIBQUICKTIME + +/* libxf86dga is present */ +#undef HAVE_LIBXXF86DGA + +/* Linux platform */ +#undef HAVE_LINUX + +/* Define to 1 if you have the `lround' function. */ +#undef HAVE_LROUND + +/* Define to 1 if you have the `memalign' function. */ +#undef HAVE_MEMALIGN + +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Compiling for MIPS CPU */ +#undef HAVE_MIPS + +/* MJPEGTools installed */ +#undef HAVE_MJPEGTOOLS + +/* Define to 1 if you have the `mmap' function. */ +#undef HAVE_MMAP + +/* Compiling in MMX support */ +#undef HAVE_MMX + +/* Compiling in MMX2 */ +#undef HAVE_MMX2 + +/* Define to 1 if you have the `posix_memalign' function. */ +#undef HAVE_POSIX_MEMALIGN + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Compiling for PowerPC CPU */ +#undef HAVE_PPCCPU + +/* Compile for playstation2 */ +#undef HAVE_PS2 + +/* Using pthread stack size */ +#undef HAVE_PTHREADSTACKSIZE + +/* Define to 1 if you have the `sched_get_priority_max' function. */ +#undef HAVE_SCHED_GET_PRIORITY_MAX + +/* SDL library present */ +#undef HAVE_SDL + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* Compiling in SSE support */ +#undef HAVE_SSE + +/* Compiling in SSE2 support */ +#undef HAVE_SSE2 + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strncasecmp' function. */ +#undef HAVE_STRNCASECMP + +/* Define to 1 if you have the `strndup' function. */ +#undef HAVE_STRNDUP + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* use swscaler */ +#undef HAVE_SWSCALER + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* define if unicap */ +#undef HAVE_UNICAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Building for Linux - using the video4linux API */ +#undef HAVE_V4L + +/* Compiling for x86 architecture CPU */ +#undef HAVE_X86CPU + +/* Compiling for x86-64 architecture CPU */ +#undef HAVE_X86_CPU + +/* Use Xinerama */ +#undef HAVE_XINERAMA + +/* with XML */ +#undef HAVE_XML2 + +/* Is __progname defined by system? */ +#undef HAVE___PROGNAME + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* The size of `float', as computed by sizeof. */ +#undef SIZEOF_FLOAT + +/* The size of `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of `long int', as computed by sizeof. */ +#undef SIZEOF_LONG_INT + +/* The size of `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* libdv is present */ +#undef SUPPORT_READ_DV2 + +/* */ +#undef SWSCALE_INC + +/* use gdk image load / save */ +#undef USE_GDK_PIXBUF + +/* Building Veejay */ +#undef VEEJAY + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#undef YYTEXT_POINTER + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif + +/* 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 diff --git a/veejay-server/config.sub b/veejay-server/config.sub new file mode 100755 index 00000000..5defff65 --- /dev/null +++ b/veejay-server/config.sub @@ -0,0 +1,1622 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-01-18' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/veejay-server/configure b/veejay-server/configure new file mode 100755 index 00000000..672983c5 --- /dev/null +++ b/veejay-server/configure @@ -0,0 +1,34189 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for veejay 1.2. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='veejay' +PACKAGE_TARNAME='veejay' +PACKAGE_VERSION='1.2' +PACKAGE_STRING='veejay 1.2' +PACKAGE_BUGREPORT='veejay-users@lists.sourceforge.net' + +ac_unique_file="veejay/veejay.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +LT_RELEASE +LT_CURRENT +LT_REVISION +LT_AGE +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +SED +GREP +EGREP +LN_S +ECHO +AR +RANLIB +CPP +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +YACC +YFLAGS +LEX +LEX_OUTPUT_ROOT +LEXLIB +CCAS +CCASFLAGS +CCASDEPMODE +am__fastdepCCAS_TRUE +am__fastdepCCAS_FALSE +LIBGETOPT_LIB +HAVE_GL +GL_LIBS +GL_CFLAGS +XINERAMA_LIBS +LIBM_LIBS +PTHREAD_LIBS +PKG_CONFIG +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +JPEG_LIBS +JPEG_CFLAGS +PIXBUF_CFLAGS +PIXBUF_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +LIBDV_CFLAGS +LIBDV_LIBS +LIBQUICKTIME_CFLAGS +LIBQUICKTIME_LIBS +HAVE_LIBQUICKTIME_TRUE +HAVE_LIBQUICKTIME_FALSE +V4LCONF_LIBS +XMKMF +X_CFLAGS +X_PRE_LIBS +X_LIBS +X_EXTRA_LIBS +HAVE_X_TRUE +HAVE_X_FALSE +SDL_CONFIG +SDL_CFLAGS +SDL_LIBS +UNICAP_CFLAGS +UNICAP_LIBS +HAVE_UNICAP +DIRECTFB_CFLAGS +DIRECTFB_LIBS +JACK_CFLAGS +JACK_LIBS +XML2_CFLAGS +XML2_LIBS +FREETYPE_CONFIG +FT_LIBS +FT_LDFLAGS +FT_CFLAGS +DEBUGLIBS +OP_CFLAGS +YUVCFLAGS +PROGRAM_NOPIC +ALTIVEC_CFLAGS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_AVFORMAT_CFLAGS +FFMPEG_AVFORMAT_LIBS +FFMPEG_AVFORMAT_CFLAGS +FFMPEG_AVFORMAT_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS +HAVE_ASM_MMX_TRUE +HAVE_ASM_MMX_FALSE +HAVE_X86CPU_TRUE +HAVE_X86CPU_FALSE +HAVE_PPCCPU_TRUE +HAVE_PPCCPU_FALSE +ARCH_PPC_TRUE +ARCH_PPC_FALSE +ARCH_X86_TRUE +ARCH_X86_FALSE +HAVE_ALTIVEC_TRUE +HAVE_ALTIVEC_FALSE +HAVE_ASM_MMX2_TRUE +HAVE_ASM_MMX2_FALSE +HAVE_ASM_SSE_TRUE +HAVE_ASM_SSE_FALSE +HAVE_ASM_SSE2_TRUE +HAVE_ASM_SSE2_FALSE +HAVE_ASM_NASM_TRUE +HAVE_ASM_NASM_FALSE +HAVE_MMX_TRUE +HAVE_MMX_FALSE +HAVE_SSE_TRUE +HAVE_SSE_FALSE +HAVE_SSE2_TRUE +HAVE_SSE2_FALSE +HAVE_MMX2_TRUE +HAVE_MMX2_FALSE +HAVE_SDL_TRUE +HAVE_SDL_FALSE +HAVE_XML2_TRUE +HAVE_XML2_FALSE +HAVE_JACK_TRUE +HAVE_JACK_FALSE +HAVE_DIRECTFB_TRUE +HAVE_DIRECTFB_FALSE +HAVE_FREETYPE_TRUE +HAVE_FREETYPE_FALSE +HAVE_V4L_TRUE +HAVE_V4L_FALSE +SUPPORT_READ_DV2_TRUE +SUPPORT_READ_DV2_FALSE +HAVE_DL_DLOPEN_TRUE +HAVE_DL_DLOPEN_FALSE +HAVE_JPEG_TRUE +HAVE_JPEG_FALSE +HAVE_GL_TRUE +HAVE_GL_FALSE +HAVE_UNICAP_TRUE +HAVE_UNICAP_FALSE +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS +YACC +YFLAGS +CCAS +CCASFLAGS +PKG_CONFIG +MJPEGTOOLS_CFLAGS +MJPEGTOOLS_LIBS +PIXBUF_CFLAGS +PIXBUF_LIBS +LIBDV_CFLAGS +LIBDV_LIBS +LIBQUICKTIME_CFLAGS +LIBQUICKTIME_LIBS +XMKMF +UNICAP_CFLAGS +UNICAP_LIBS +DIRECTFB_CFLAGS +DIRECTFB_LIBS +JACK_CFLAGS +JACK_LIBS +XML2_CFLAGS +XML2_LIBS +FFMPEG_AVCODEC_CFLAGS +FFMPEG_AVCODEC_LIBS +FFMPEG_AVFORMAT_CFLAGS +FFMPEG_AVFORMAT_LIBS +FFMPEG_SWSCALER_CFLAGS +FFMPEG_SWSCALER_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures veejay 1.2 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/veejay] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of veejay 1.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-strict Compile in paranoia assertion checking + --enable-debug Compile in debugging information + --enable-profiling Compile in profiling information + --enable-compile-warnings + Turn on compiler warnings. + --enable-warnings_as_errors + Compiler warnings are errors. + --enable-simd-accel use SIMD multimedia instructions such as MMX, + AltiVec, etc.if possible + --enable-gl Compile with openGL display support + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + --disable-sdltest Do not try to compile and run a test SDL program + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-extra-cflags=flags + Options to be added to CFLAGS (optional) + --without-libdv Do not use libdv. + --without-pixbuf Do not use GDK pixbuf + --without-directfb Do not use DirectFB. + --without-sdl Do not use SDL. + --without-jack Do not use jack. + --without-v4l Do not use video4linux + --without-xml2 Do not use the XML library for Gnome + --without-jpeg Do not JPEG support + --with-jpegmmx=PFX Prefix where jpeg-mmx is installed (optional). + --without-unicap Do not use unicap + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] include additional configurations [automatic] + --with-x use the X Window System + --with-sdl-prefix=PFX Prefix where SDL is installed (optional) + --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + PKG_CONFIG path to pkg-config utility + MJPEGTOOLS_CFLAGS + C compiler flags for MJPEGTOOLS, overriding pkg-config + MJPEGTOOLS_LIBS + linker flags for MJPEGTOOLS, overriding pkg-config + PIXBUF_CFLAGS + C compiler flags for PIXBUF, overriding pkg-config + PIXBUF_LIBS linker flags for PIXBUF, overriding pkg-config + LIBDV_CFLAGS + C compiler flags for LIBDV, overriding pkg-config + LIBDV_LIBS linker flags for LIBDV, overriding pkg-config + LIBQUICKTIME_CFLAGS + C compiler flags for LIBQUICKTIME, overriding pkg-config + LIBQUICKTIME_LIBS + linker flags for LIBQUICKTIME, overriding pkg-config + XMKMF Path to xmkmf, Makefile generator for X Window System + UNICAP_CFLAGS + C compiler flags for UNICAP, overriding pkg-config + UNICAP_LIBS linker flags for UNICAP, overriding pkg-config + DIRECTFB_CFLAGS + C compiler flags for DIRECTFB, overriding pkg-config + DIRECTFB_LIBS + linker flags for DIRECTFB, overriding pkg-config + JACK_CFLAGS C compiler flags for JACK, overriding pkg-config + JACK_LIBS linker flags for JACK, overriding pkg-config + XML2_CFLAGS C compiler flags for XML2, overriding pkg-config + XML2_LIBS linker flags for XML2, overriding pkg-config + FFMPEG_AVCODEC_CFLAGS + C compiler flags for FFMPEG_AVCODEC, overriding pkg-config + FFMPEG_AVCODEC_LIBS + linker flags for FFMPEG_AVCODEC, overriding pkg-config + FFMPEG_AVFORMAT_CFLAGS + C compiler flags for FFMPEG_AVFORMAT, overriding pkg-config + FFMPEG_AVFORMAT_LIBS + linker flags for FFMPEG_AVFORMAT, overriding pkg-config + FFMPEG_SWSCALER_CFLAGS + C compiler flags for FFMPEG_SWSCALER, overriding pkg-config + FFMPEG_SWSCALER_LIBS + linker flags for FFMPEG_SWSCALER, 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" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +veejay configure 1.2 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by veejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + +VEEJAY_MAJOR_VERSION=1 +VEEJAY_MINOR_VERSION=2 +VEEJAY_MICRO_VERSION=0 +VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION +VEEJAY_CODENAME="Veejay Classic - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" +ac_config_headers="$ac_config_headers config.h" + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='veejay' + VERSION='1.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='veejay' + VERSION='1.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + +cat >>confdefs.h <<\_ACEOF +#define VEEJAY 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CONFIG_H 1 +_ACEOF + +# libtool versioning +LT_RELEASE=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION +LT_CURRENT=$VEEJAY_MICRO_VERSION +LT_REVISION=$VEEJAY_MICRO_VERSION +LT_AGE=$VEEJAY_MICRO_VERSION + + + + + + +CFLAGS="" +# Check whether --enable-strict was given. +if test "${enable_strict+set}" = set; then + enableval=$enable_strict; +fi + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; +fi + +# Check whether --enable-profile was given. +if test "${enable_profile+set}" = set; then + enableval=$enable_profile; +fi + +# Check whether --enable-compile-warnings was given. +if test "${enable_compile_warnings+set}" = set; then + enableval=$enable_compile_warnings; +fi + +# Check whether --enable-warnings_as_errors was given. +if test "${enable_warnings_as_errors+set}" = set; then + enableval=$enable_warnings_as_errors; +fi + +# Check whether --enable-simd-accel was given. +if test "${enable_simd_accel+set}" = set; then + enableval=$enable_simd_accel; +fi + +# Check whether --enable-gl was given. +if test "${enable_gl+set}" = set; then + enableval=$enable_gl; +fi + + + +# Check whether --with-extra-cflags was given. +if test "${with_extra_cflags+set}" = set; then + withval=$with_extra_cflags; +fi + + +# Check whether --with-libdv was given. +if test "${with_libdv+set}" = set; then + withval=$with_libdv; +else + with_libdv=yes +fi + + + +# Check whether --with-pixbuf was given. +if test "${with_pixbuf+set}" = set; then + withval=$with_pixbuf; +else + with_pixbuf=yes +fi + + + + +# Check whether --with-directfb was given. +if test "${with_directfb+set}" = set; then + withval=$with_directfb; +else + with_directfb=yes +fi + + +# Check whether --with-sdl was given. +if test "${with_sdl+set}" = set; then + withval=$with_sdl; +else + with_sdl=yes +fi + + +# Check whether --with-jack was given. +if test "${with_jack+set}" = set; then + withval=$with_jack; +else + with_jack=yes +fi + + +# Check whether --with-v4l was given. +if test "${with_v4l+set}" = set; then + withval=$with_v4l; +else + with_v4l=yes +fi + + +# Check whether --with-xml2 was given. +if test "${with_xml2+set}" = set; then + withval=$with_xml2; +else + with_xml2=yes +fi + + + +# Check whether --with-jpeg was given. +if test "${with_jpeg+set}" = set; then + withval=$with_jpeg; +else + with_libjpeg=yes +fi + + + +# Check whether --with-jpeg-mmx was given. +if test "${with_jpeg_mmx+set}" = set; then + withval=$with_jpeg_mmx; +fi + + + +# Check whether --with-unicap was given. +if test "${with_unicap+set}" = set; then + withval=$with_unicap; +else + with_unicap=yes +fi + + + + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + +# Check whether --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 + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 + +fi + +SED=$lt_cv_path_SED + +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If 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 whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5069 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + + +esac + +need_locks="$enable_libtool_lock" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# 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 + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +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 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 conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7919: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7923: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # 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' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + 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 + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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:8209: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8213: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_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 +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 + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8313: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8317: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # 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_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + 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 + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; 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 + link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + 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_libdir_separator=':' + link_all_deplibs=yes + + 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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + 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 + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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 + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + 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' + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +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" + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant 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_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; 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 + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + fix_srcfile_path \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_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 + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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(int, char *[]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + 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].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + ld_shlibs_CXX=no + fi + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13195: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13199: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13299: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13303: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# 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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-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_F77='-Bstatic' + fi + ;; + + amigaos*) + # 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_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + 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_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # 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:14876: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14880: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=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:14980: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14984: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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_F77="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$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_F77='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_F77=no + fi + ;; + + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${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_F77='$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_F77='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$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 + link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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_F77=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_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$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].*|aix5*) + 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_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + 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_F77=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_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=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_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$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*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_F77=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=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_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17180: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17184: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # 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_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + 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_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # 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:17470: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17474: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=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:17574: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:17578: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # 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_GCJ="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$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_GCJ='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_GCJ=no + fi + ;; + + interix[3-9]*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$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 + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$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].*|aix5*) + 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_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + 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_GCJ=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_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=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_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$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*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_GCJ=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$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' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=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_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" + +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$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. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { echo "$as_me:$LINENO: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ (ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { echo "$as_me:$LINENO: checking lex library" >&5 +echo $ECHO_N "checking lex library... $ECHO_C" >&6; } +if test "${ac_cv_lib_lex+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lex=$ac_lib +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 +echo "${ECHO_T}$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat >conftest.$ac_ext <<_ACEOF +#define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_prog_lex_yytext_pointer=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\_ACEOF +#define YYTEXT_POINTER 1 +_ACEOF + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* 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. */ + char *t; + 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 saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$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 + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$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 -f conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$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 -f conftest* + fi +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= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_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 + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +echo "${ECHO_T}$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 + + + + + + + + +for ac_header in fenv.h stdint.h inttypes.h sys/types.h alloca.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + +for ac_func in posix_memalign memalign fmax lround pow bzero gettimeofday memset mmap strndup strstr strncasecmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in sched_get_priority_max +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + +for ac_func in select socket getpagesize memcpy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ echo "$as_me:$LINENO: checking for getopt_long" >&5 +echo $ECHO_N "checking for getopt_long... $ECHO_C" >&6; } +if test "${ac_cv_func_getopt_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getopt_long to an innocuous variant, in case declares getopt_long. + For example, HP-UX 11i declares gettimeofday. */ +#define getopt_long innocuous_getopt_long + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getopt_long (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getopt_long + +/* 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 getopt_long (); +/* 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_getopt_long || defined __stub___getopt_long +choke me +#endif + +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getopt_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getopt_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 +echo "${ECHO_T}$ac_cv_func_getopt_long" >&6; } +if test $ac_cv_func_getopt_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETOPT_LONG 1 +_ACEOF + +else + # FreeBSD and BSD/OS have a gnugetopt library for this: + { echo "$as_me:$LINENO: checking for getopt_long in -lgnugetopt" >&5 +echo $ECHO_N "checking for getopt_long in -lgnugetopt... $ECHO_C" >&6; } +if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnugetopt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getopt_long (); +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gnugetopt_getopt_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gnugetopt_getopt_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gnugetopt_getopt_long" >&5 +echo "${ECHO_T}$ac_cv_lib_gnugetopt_getopt_long" >&6; } +if test $ac_cv_lib_gnugetopt_getopt_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETOPT_LONG 1 +_ACEOF + + LIBGETOPT_LIB="-lgnugetopt" +fi + + +fi + + +{ echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6; } +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for long int" >&5 +echo $ECHO_N "checking for long int... $ECHO_C" >&6; } +if test "${ac_cv_type_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_int" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of long int" >&5 +echo $ECHO_N "checking size of long int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_int=$ac_lo;; +'') if test "$ac_cv_type_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of size_t" >&5 +echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_size_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + +{ echo "$as_me:$LINENO: checking for float" >&5 +echo $ECHO_N "checking for float... $ECHO_C" >&6; } +if test "${ac_cv_type_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef float ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_float=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_float=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5 +echo "${ECHO_T}$ac_cv_type_float" >&6; } + +# 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. +{ echo "$as_me:$LINENO: checking size of float" >&5 +echo $ECHO_N "checking size of float... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef float ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_float=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF + + + + + + + +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + +{ echo "$as_me:$LINENO: The host is $host $host_cpu $host_vendor $host_os ." >&5 +echo "$as_me: The host is $host $host_cpu $host_vendor $host_os ." >&6;} + +have_gl=false +if test "x$enable_gl" = "xyes" ; then + +for ac_header in GL/gl.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: Cannot find OpenGL headers" >&5 +echo "$as_me: WARNING: Cannot find OpenGL headers" >&2;} +fi + +done + + GL_LIBS="" + GL_CFLAGS="$GL_INC_PATH" + { echo "$as_me:$LINENO: checking for main in -lGL" >&5 +echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6; } +if test "${ac_cv_lib_GL_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lGL $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_GL_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_GL_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 +echo "${ECHO_T}$ac_cv_lib_GL_main" >&6; } +if test $ac_cv_lib_GL_main = yes; then + have_gl=true +fi + + if test x$have_gl = xtrue ; then + GL_LIBS="$GL_LIB_PATH -lGL" + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GL 1 +_ACEOF + + else + { { echo "$as_me:$LINENO: error: Cannot find openGL library" >&5 +echo "$as_me: error: Cannot find openGL library" >&2;} + { (exit 1); exit 1; }; } + have_gl=false + fi +fi + + + + +use_xinerama=no +{ echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5 +echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6; } +if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXinerama -lXext $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XineramaQueryExtension (); +int +main () +{ +return XineramaQueryExtension (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_Xinerama_XineramaQueryExtension=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xinerama_XineramaQueryExtension=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5 +echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; } +if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then + { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 +echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; } +if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_X11_extensions_Xinerama_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_X11_extensions_Xinerama_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; } +if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_XINERAMA 1 +_ACEOF + + XINERAMA_LIBS="-lXext -lXinerama" + + use_xinerama=yes, + +else + use_xinerama=no +fi + + +else + use_xinerama=no +fi + +{ echo "$as_me:$LINENO: checking for Xinerama support on XFree86 " >&5 +echo $ECHO_N "checking for Xinerama support on XFree86 ... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $use_xinerama" >&5 +echo "${ECHO_T}$use_xinerama" >&6; } + + + +have_v4l=false +have_linux=false +have_darwin=false +case $host in + *-*-linux*) + if test "${ac_cv_header_linux_version_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking linux/version.h usability" >&5 +echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking linux/version.h presence" >&5 +echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_version_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; } + +fi +if test $ac_cv_header_linux_version_h = yes; then + have_linux=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINUX +_ACEOF + + +else + { { echo "$as_me:$LINENO: error: version.h not found - please install the linux kernel headers" >&5 +echo "$as_me: error: version.h not found - please install the linux kernel headers" >&2;} + { (exit 1); exit 1; }; } + +fi + + + LIBM_LIBS="-lm" + ;; + *-apple-darwin*) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DARWIN +_ACEOF + + CFLAGS="$CFLAGS -no-cpp-precomp" + have_darwin=true + LIBM_LIBS="" + ;; + *) + { echo "$as_me:$LINENO: WARNING: Alien platform - Good Luck!" >&5 +echo "$as_me: WARNING: Alien platform - Good Luck!" >&2;} + LIBM_LIBS="" + ;; +esac + + +if test x"$PKG_CONFIG_PATH" = x ; then + { echo "$as_me:$LINENO: The PKG_CONFIG_PATH variable was not set" >&5 +echo "$as_me: The PKG_CONFIG_PATH variable was not set" >&6;} + { echo "$as_me:$LINENO: You should set it to the directories that contain the .pc files" >&5 +echo "$as_me: You should set it to the directories that contain the .pc files" >&6;} + { { echo "$as_me:$LINENO: error: Abort" >&5 +echo "$as_me: error: Abort" >&2;} + { (exit 1); exit 1; }; } +fi + + + + +if test x$with_v4l != xno ; then + if test x$have_linux != xfalse ; then + + if test "${ac_cv_header_linux_videodev_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/videodev.h" >&5 +echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_videodev_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_videodev_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_videodev_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking linux/videodev.h usability" >&5 +echo $ECHO_N "checking linux/videodev.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking linux/videodev.h presence" >&5 +echo $ECHO_N "checking linux/videodev.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/videodev.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/videodev.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/videodev.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/videodev.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/videodev.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/videodev.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/videodev.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for linux/videodev.h" >&5 +echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_videodev_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_videodev_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_videodev_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_videodev_h" >&6; } + +fi +if test $ac_cv_header_linux_videodev_h = yes; then + have_v4l=true + if test x$with_v4l != xno; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_V4L 1 +_ACEOF + + fi + +else + { { echo "$as_me:$LINENO: error: videodev.h not found - please install the linux kernel headers" >&5 +echo "$as_me: error: videodev.h not found - please install the linux kernel headers" >&2;} + { (exit 1); exit 1; }; } +fi + + + fi +fi + + +have_pthread=false +{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; } +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int +main () +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_pthread_pthread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pthread_pthread_create=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; } +if test $ac_cv_lib_pthread_pthread_create = yes; then + PTHREAD_LIBS="-lpthread" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBPTHREAD +_ACEOF + + have_pthread=true +fi + + +{ echo "$as_me:$LINENO: checking for pthread_attr_getstacksize" >&5 +echo $ECHO_N "checking for pthread_attr_getstacksize... $ECHO_C" >&6; } +if test "${ac_cv_func_pthread_attr_getstacksize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define pthread_attr_getstacksize to an innocuous variant, in case declares pthread_attr_getstacksize. + For example, HP-UX 11i declares gettimeofday. */ +#define pthread_attr_getstacksize innocuous_pthread_attr_getstacksize + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pthread_attr_getstacksize (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef pthread_attr_getstacksize + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_attr_getstacksize (); +/* 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_pthread_attr_getstacksize || defined __stub___pthread_attr_getstacksize +choke me +#endif + +int +main () +{ +return pthread_attr_getstacksize (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_pthread_attr_getstacksize=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_pthread_attr_getstacksize=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_getstacksize" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_attr_getstacksize" >&6; } +if test $ac_cv_func_pthread_attr_getstacksize = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREADSTACKSIZE +_ACEOF + + +fi + + +if test x$have_pthread != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find pthread library" >&5 +echo "$as_me: error: Cannot find pthread library" >&2;} + { (exit 1); exit 1; }; } +fi + +have_dl_dlopen=false + +{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + +if test "$ac_cv_lib_dl_dlopen" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DL_DLOPEN +_ACEOF + + have_dl_dlopen=true +fi + + +have_mjpegtools=false + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi + +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for MJPEGTOOLS" >&5 +echo $ECHO_N "checking for MJPEGTOOLS... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$MJPEGTOOLS_CFLAGS"; then + pkg_cv_MJPEGTOOLS_CFLAGS="$MJPEGTOOLS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mjpegtools >= 1.6 \"") >&5 + ($PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MJPEGTOOLS_CFLAGS=`$PKG_CONFIG --cflags "mjpegtools >= 1.6 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$MJPEGTOOLS_LIBS"; then + pkg_cv_MJPEGTOOLS_LIBS="$MJPEGTOOLS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mjpegtools >= 1.6 \"") >&5 + ($PKG_CONFIG --exists --print-errors "mjpegtools >= 1.6 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MJPEGTOOLS_LIBS=`$PKG_CONFIG --libs "mjpegtools >= 1.6 " 2>/dev/null` +else + pkg_failed=yes +fi + 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 + MJPEGTOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mjpegtools >= 1.6 "` + else + MJPEGTOOLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mjpegtools >= 1.6 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$MJPEGTOOLS_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_mjpegtools=false +elif test $pkg_failed = untried; then + have_mjpegtools=false +else + MJPEGTOOLS_CFLAGS=$pkg_cv_MJPEGTOOLS_CFLAGS + MJPEGTOOLS_LIBS=$pkg_cv_MJPEGTOOLS_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_mjpegtools=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MJPEGTOOLS 1 +_ACEOF + +fi + +if test x$have_mjpegtools != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find mjpegtools. " >&5 +echo "$as_me: error: Cannot find mjpegtools. " >&2;} + { (exit 1); exit 1; }; } +fi + + +have_jpeg=false +if test x$with_jpeg != xno ; then + + + + have_jpeg=false + if test x$with_jpegmmx = xyes ; then + { { echo "$as_me:$LINENO: error: + *** A directory must be specified for --with-jpeg-mmx option." >&5 +echo "$as_me: error: + *** A directory must be specified for --with-jpeg-mmx option." >&2;} + { (exit 1); exit 1; }; } + fi + if test x$with_jpegmmx = x ; then + if test -d ../jpeg-mmx ; then + with_jpegmmx=`pwd`/../jpeg-mmx + else + with_jpegmmx=/usr/local/src/jpeg-mmx + fi + fi + + + OLD_CFLAGS="$CFLAGS" + OLD_LIBS="$LIBS" + LIBS="$LIBS -L$with_jpegmmx" + CFLAGS="$CFLAGS -I$with_jpegmmx" + { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg-mmx" >&5 +echo $ECHO_N "checking for jpeg_start_compress in -ljpeg-mmx... $ECHO_C" >&6; } +if test "${ac_cv_lib_jpeg_mmx_jpeg_start_compress+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljpeg-mmx $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jpeg_start_compress (); +int +main () +{ +return jpeg_start_compress (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_jpeg_mmx_jpeg_start_compress=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jpeg_mmx_jpeg_start_compress=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_mmx_jpeg_start_compress" >&5 +echo "${ECHO_T}$ac_cv_lib_jpeg_mmx_jpeg_start_compress" >&6; } +if test $ac_cv_lib_jpeg_mmx_jpeg_start_compress = yes; then + JPEG_LIBS="$LIBS -ljpeg-mmx" + JPEG_CFLAGS="-I$with_jpegmmx" + have_jpeg=true +fi + + LIBS="$OLD_LIBS" + CFLAGS="$OLD_CFLAGS" + + if test x$have_jpeg = xfalse ; then + if test "${ac_cv_header_jpeglib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_jpeglib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 +echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 +echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_jpeglib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_jpeglib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; } + +fi +if test $ac_cv_header_jpeglib_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: jpeglib.h not found - please install the libjpeg headers" >&5 +echo "$as_me: error: jpeglib.h not found - please install the libjpeg headers" >&2;} + { (exit 1); exit 1; }; } +fi + + + { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5 +echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; } +if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljpeg $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 jpeg_start_compress (); +int +main () +{ +return jpeg_start_compress (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_jpeg_jpeg_start_compress=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jpeg_jpeg_start_compress=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5 +echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; } +if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then + JPEG_LIBS="-ljpeg" + JPEG_CFLAGS="" + have_jpeg=true +fi + + fi + + if test x$have_jpeg = xtrue ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_JPEG +_ACEOF + + fi +fi +have_pixbuf=false +if test x$with_pixbuf != xno ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for PIXBUF" >&5 +echo $ECHO_N "checking for PIXBUF... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PIXBUF_CFLAGS"; then + pkg_cv_PIXBUF_CFLAGS="$PIXBUF_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0 gdk-pixbuf-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$PIXBUF_LIBS"; then + pkg_cv_PIXBUF_LIBS="$PIXBUF_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0 gdk-pixbuf-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXBUF_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + PIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0"` + else + PIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0 gdk-pixbuf-2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$PIXBUF_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_pixbuf=false +elif test $pkg_failed = untried; then + have_pixbuf=false +else + PIXBUF_CFLAGS=$pkg_cv_PIXBUF_CFLAGS + PIXBUF_LIBS=$pkg_cv_PIXBUF_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_pixbuf=true + +cat >>confdefs.h <<\_ACEOF +#define USE_GDK_PIXBUF 1 +_ACEOF + +fi +fi + + +if test x$have_pixbuf != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find the gdk pixbuf library" >&5 +echo "$as_me: error: Cannot find the gdk pixbuf library" >&2;} + { (exit 1); exit 1; }; } +fi + + + +have_libdv=false +if test x$with_libdv != xno ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for LIBDV" >&5 +echo $ECHO_N "checking for LIBDV... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$LIBDV_CFLAGS"; then + pkg_cv_LIBDV_CFLAGS="$LIBDV_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdv >= 0.102\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdv >= 0.102") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDV_CFLAGS=`$PKG_CONFIG --cflags "libdv >= 0.102" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$LIBDV_LIBS"; then + pkg_cv_LIBDV_LIBS="$LIBDV_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdv >= 0.102\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdv >= 0.102") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDV_LIBS=`$PKG_CONFIG --libs "libdv >= 0.102" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + LIBDV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdv >= 0.102"` + else + LIBDV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdv >= 0.102"` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBDV_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_libdv=false +elif test $pkg_failed = untried; then + have_libdv=false +else + LIBDV_CFLAGS=$pkg_cv_LIBDV_CFLAGS + LIBDV_LIBS=$pkg_cv_LIBDV_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + have_libdv=true + +cat >>confdefs.h <<\_ACEOF +#define SUPPORT_READ_DV2 1 +_ACEOF + +fi +fi + +have_libquicktime=false +if test x$with_libquicktime != xno ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for LIBQUICKTIME" >&5 +echo $ECHO_N "checking for LIBQUICKTIME... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$LIBQUICKTIME_CFLAGS"; then + pkg_cv_LIBQUICKTIME_CFLAGS="$LIBQUICKTIME_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libquicktime >= 1.0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libquicktime >= 1.0.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBQUICKTIME_CFLAGS=`$PKG_CONFIG --cflags "libquicktime >= 1.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$LIBQUICKTIME_LIBS"; then + pkg_cv_LIBQUICKTIME_LIBS="$LIBQUICKTIME_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libquicktime >= 1.0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libquicktime >= 1.0.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBQUICKTIME_LIBS=`$PKG_CONFIG --libs "libquicktime >= 1.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + LIBQUICKTIME_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libquicktime >= 1.0.0"` + else + LIBQUICKTIME_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libquicktime >= 1.0.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBQUICKTIME_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_libquicktime=false +elif test $pkg_failed = untried; then + have_libquicktime=false +else + LIBQUICKTIME_CFLAGS=$pkg_cv_LIBQUICKTIME_CFLAGS + LIBQUICKTIME_LIBS=$pkg_cv_LIBQUICKTIME_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + have_libquicktime=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBQUICKTIME 1 +_ACEOF + +fi +fi + if test x$have_libquicktime = xtrue; then + HAVE_LIBQUICKTIME_TRUE= + HAVE_LIBQUICKTIME_FALSE='#' +else + HAVE_LIBQUICKTIME_TRUE='#' + HAVE_LIBQUICKTIME_FALSE= +fi + + + + +{ echo "$as_me:$LINENO: checking for __progname" >&5 +echo $ECHO_N "checking for __progname... $ECHO_C" >&6; } +if test "${mjt_cv_extern___progname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +extern char *__progname; + puts(__progname); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + mjt_cv_extern___progname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + mjt_cv_extern___progname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $mjt_cv_extern___progname" >&5 +echo "${ECHO_T}$mjt_cv_extern___progname" >&6; } +if test x$mjt_cv_extern___progname = xyes ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___PROGNAME 1 +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 +echo $ECHO_N "checking for XF86DGAQueryExtension in -lXxf86dga... $ECHO_C" >&6; } +if test "${ac_cv_lib_Xxf86dga_XF86DGAQueryExtension+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXxf86dga $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XF86DGAQueryExtension (); +int +main () +{ +return XF86DGAQueryExtension (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_Xxf86dga_XF86DGAQueryExtension=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xxf86dga_XF86DGAQueryExtension=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&5 +echo "${ECHO_T}$ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&6; } +if test $ac_cv_lib_Xxf86dga_XF86DGAQueryExtension = yes; then + V4LCONF_LIBS="$X_LIBS -lXxf86dga" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBXXF86DGA 1 +_ACEOF + +fi + + + +{ echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then + withval=$with_x; +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + case $x_includes,$x_libraries in #( + *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 +echo "$as_me: error: Cannot use X directory names containing '" >&2;} + { (exit 1); exit 1; }; };; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi + +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac +fi +;; #( + *) have_x=yes;; + esac + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + { echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6; } + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +cat >>confdefs.h <<\_ACEOF +#define X_DISPLAY_MISSING 1 +_ACEOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XOpenDisplay (); +int +main () +{ +return XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_stub_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_gethostbyname || defined __stub___gethostbyname +choke me +#endif + +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } + + if test $ac_cv_func_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_bsd_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_connect || defined __stub___connect +choke me +#endif + +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } + + if test $ac_cv_func_connect = no; then + { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } +if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + { echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6; } +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef remove + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_remove || defined __stub___remove +choke me +#endif + +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6; } + + if test $ac_cv_func_remove = no; then + { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_posix_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } +if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + { echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shmat + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shmat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shmat || defined __stub___shmat +choke me +#endif + +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6; } + + if test $ac_cv_func_shmat = no; then + { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shmat (); +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ipc_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } +if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char IceConnectionNumber (); +int +main () +{ +return IceConnectionNumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ICE_IceConnectionNumber=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + + if test x$have_x = xyes; then + HAVE_X_TRUE= + HAVE_X_FALSE='#' +else + HAVE_X_TRUE='#' + HAVE_X_FALSE= +fi + + +have_sdl=false +if test x$with_sdl != xno ; then + +# Check whether --with-sdl-prefix was given. +if test "${with_sdl_prefix+set}" = set; then + withval=$with_sdl_prefix; sdl_prefix="$withval" +else + sdl_prefix="" +fi + + +# Check whether --with-sdl-exec-prefix was given. +if test "${with_sdl_exec_prefix+set}" = set; then + withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval" +else + sdl_exec_prefix="" +fi + +# Check whether --enable-sdltest was given. +if test "${enable_sdltest+set}" = set; then + enableval=$enable_sdltest; +else + enable_sdltest=yes +fi + + + if test x$sdl_exec_prefix != x ; then + sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_args="$sdl_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + if test "x$prefix" != xNONE; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + # Extract the first word of "sdl-config", so it can be a program name with args. +set dummy sdl-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_SDL_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SDL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" + ;; +esac +fi +SDL_CONFIG=$ac_cv_path_SDL_CONFIG +if test -n "$SDL_CONFIG"; then + { echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5 +echo "${ECHO_T}$SDL_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + min_sdl_version=1.2.3 + { echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5 +echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6; } + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + rm -f conf.sdltest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_sdl=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + have_sdl=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SDL +_ACEOF + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main + +int +main () +{ + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + : + fi + + + rm -f conf.sdltest + +fi + + +have_unicap=false +if test x$with_unicap != xno; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for UNICAP" >&5 +echo $ECHO_N "checking for UNICAP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$UNICAP_CFLAGS"; then + pkg_cv_UNICAP_CFLAGS="$UNICAP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libunicap >= 0.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libunicap >= 0.1.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_UNICAP_CFLAGS=`$PKG_CONFIG --cflags "libunicap >= 0.1.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$UNICAP_LIBS"; then + pkg_cv_UNICAP_LIBS="$UNICAP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libunicap >= 0.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libunicap >= 0.1.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_UNICAP_LIBS=`$PKG_CONFIG --libs "libunicap >= 0.1.0" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + UNICAP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libunicap >= 0.1.0"` + else + UNICAP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libunicap >= 0.1.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$UNICAP_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ac_cv_unicap=0 +elif test $pkg_failed = untried; then + ac_cv_unicap=0 +else + UNICAP_CFLAGS=$pkg_cv_UNICAP_CFLAGS + UNICAP_LIBS=$pkg_cv_UNICAP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + ac_cv_unicap=1 +fi + + +cat >>confdefs.h <<_ACEOF +#define HAVE_UNICAP ${ac_cv_unicap} +_ACEOF + + +if test "${ac_cv_unicap}" = 0 +then + { echo "$as_me:$LINENO: WARNING: Could not find libunicap, dropping capture device support" >&5 +echo "$as_me: WARNING: Could not find libunicap, dropping capture device support" >&2;} +else +have_unicap=true + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNICAP +_ACEOF + +fi + +fi + + + + + +have_directfb=false +if test x$with_directfb != xno ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DIRECTFB" >&5 +echo $ECHO_N "checking for DIRECTFB... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DIRECTFB_CFLAGS"; then + pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"directfb >= 0.9.17\"") >&5 + ($PKG_CONFIG --exists --print-errors "directfb >= 0.9.17") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags "directfb >= 0.9.17" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DIRECTFB_LIBS"; then + pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"directfb >= 0.9.17\"") >&5 + ($PKG_CONFIG --exists --print-errors "directfb >= 0.9.17") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DIRECTFB_LIBS=`$PKG_CONFIG --libs "directfb >= 0.9.17" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "directfb >= 0.9.17"` + else + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "directfb >= 0.9.17"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DIRECTFB_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_directfb=false +elif test $pkg_failed = untried; then + have_directfb=false +else + DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS + DIRECTFB_LIBS=$pkg_cv_DIRECTFB_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + have_directfb=true +fi + +if test x$have_directfb = xtrue ; then + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIRECTFB +_ACEOF + +fi +fi + + +have_jack=false +if test x$with_jack != xno ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for JACK" >&5 +echo $ECHO_N "checking for JACK... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$JACK_CFLAGS"; then + pkg_cv_JACK_CFLAGS="$JACK_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"jack >= 0.1 \"") >&5 + ($PKG_CONFIG --exists --print-errors "jack >= 0.1 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack >= 0.1 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$JACK_LIBS"; then + pkg_cv_JACK_LIBS="$JACK_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"jack >= 0.1 \"") >&5 + ($PKG_CONFIG --exists --print-errors "jack >= 0.1 ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack >= 0.1 " 2>/dev/null` +else + pkg_failed=yes +fi + 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 --errors-to-stdout --print-errors "jack >= 0.1 "` + else + JACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "jack >= 0.1 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$JACK_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_jack=false +elif test $pkg_failed = untried; then + have_jack=false +else + JACK_CFLAGS=$pkg_cv_JACK_CFLAGS + JACK_LIBS=$pkg_cv_JACK_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + have_jack=true +fi + if test x$have_jack = xtrue ; then + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_JACK +_ACEOF + + else + { echo "$as_me:$LINENO: WARNING: Jack >= 0.100 is required, get it at http://jackit.sourceforge.net" >&5 +echo "$as_me: WARNING: Jack >= 0.100 is required, get it at http://jackit.sourceforge.net" >&2;}; + fi +fi + +have_xml2=false +if test x$with_xml2 != xno; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XML2" >&5 +echo $ECHO_N "checking for XML2... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XML2_CFLAGS"; then + pkg_cv_XML2_CFLAGS="$XML2_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.5.4\"") >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.5.4") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.5.4" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XML2_LIBS"; then + pkg_cv_XML2_LIBS="$XML2_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.5.4\"") >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.5.4") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.5.4" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0 >= 2.5.4"` + else + XML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.5.4"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XML2_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_xml2=false +elif test $pkg_failed = untried; then + have_xml2=false +else + XML2_CFLAGS=$pkg_cv_XML2_CFLAGS + XML2_LIBS=$pkg_cv_XML2_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + have_xml2=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_XML2 1 +_ACEOF + + +fi + +fi + +if test x$have_xml2 != xtrue ; then + { { echo "$as_me:$LINENO: error: Cannot find the The XML C library for gnome" >&5 +echo "$as_me: error: Cannot find the The XML C library for gnome" >&2;} + { (exit 1); exit 1; }; } +fi + + +have_freetype=false +# Extract the first word of "freetype-config", so it can be a program name with args. +set dummy freetype-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_FREETYPE_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$FREETYPE_CONFIG"; then + ac_cv_prog_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FREETYPE_CONFIG="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_FREETYPE_CONFIG" && ac_cv_prog_FREETYPE_CONFIG="no" +fi +fi +FREETYPE_CONFIG=$ac_cv_prog_FREETYPE_CONFIG +if test -n "$FREETYPE_CONFIG"; then + { echo "$as_me:$LINENO: result: $FREETYPE_CONFIG" >&5 +echo "${ECHO_T}$FREETYPE_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test $FREETYPE_CONFIG = yes; then + FT_CFLAGS="`freetype-config --cflags`" + FT_WORD="`freetype-config --libs`" + FT_LDFLAGS="" + FT_LIBS="" + for word in $FT_WORD ; do + beginning=`echo $word | cut -c -2` + if test ".$beginning" = ".-L"; then + FT_LDFLAGS="$FT_LDFLAGS $word" + else + FT_LIBS="$FT_LIBS $word" + fi + done + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FREETYPE +_ACEOF + + + + + have_freetype=true +else + { { echo "$as_me:$LINENO: error: Cannot find the freetype-config program" >&5 +echo "$as_me: error: Cannot find the freetype-config program" >&2;} + { (exit 1); exit 1; }; } +fi + +{ echo "$as_me:$LINENO: checking whether to compile in debugging information" >&5 +echo $ECHO_N "checking whether to compile in debugging information... $ECHO_C" >&6; } +debugCFLAGS="" +if test "x$enable_debug" = "xyes" ; then + debugCFLAGS="-g" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +{ echo "$as_me:$LINENO: checking whether to compile in profiling information" >&5 +echo $ECHO_N "checking whether to compile in profiling information... $ECHO_C" >&6; } +if test "x$enable_profiling" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -fprofile-arcs -ftest-coverage" + DEBUGLIBS="-lgcov" + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +{ echo "$as_me:$LINENO: checking whether to compile in assertion checking" >&5 +echo $ECHO_N "checking whether to compile in assertion checking... $ECHO_C" >&6; } +if test "x$enable_strict" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -DSTRICT_CHECKING" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +have_asm_nasm=false +have_asm_mmx=false +have_asm_sse=false +have_asm_sse2=false +have_asm_mmx2=false +have_asm_3dnow=false +have_cmov=false +have_x86cpu=false +have_x86_64cpu=false +have_altivec=false +have_mips=false +have_ppccpu=false +have_ps2=false + +OP_CFLAGS="" +YUVCFLAGS="-fif-conversion" + +{ echo "$as_me:$LINENO: checking Architecture" >&5 +echo $ECHO_N "checking Architecture... $ECHO_C" >&6; } +case $host_cpu in + i[3-7]86) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_X86CPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ARCH_X86 1 +_ACEOF + + have_x86cpu=true + + PROGRAM_NOPIC="-fno-PIC" + + if test "x$enable_debug" != "xyes" ; then + OP_CFLAGS="-O3" + fi + + + + + case $host_cpu in + i686) + CFLAGS="$CFLAGS" + ;; + *) + ;; + esac + + ;; + x86_64*|k8-*) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_X86_CPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ARCH_X86_64 1 +_ACEOF + + have_x86cpu=true + have_x86_64cpu=true + CFLAGS="$CFLAGS -fPIC -DPIC" + ;; + powerpc | powerpc64) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PPCCPU +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ARCH_PPC +_ACEOF + + have_ppccpu=true + + case $host in + *-apple-darwin*) + PROGRAM_NOPIC="-mdynamic-no-pic" # dynamic-no-pic is an Apple gcc option + + ;; + *) + PROGRAM_NOPIC="" + ;; + esac + ;; + mips | mipsel) + +cat >>confdefs.h <<\_ACEOF +#define ARCH_MIPS +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MIPS +_ACEOF + + have_mips=true + { echo "$as_me:$LINENO: checking if we are compiling on playstation2 hardware" >&5 +echo $ECHO_N "checking if we are compiling on playstation2 hardware... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#include + #include + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + have_ps2=true +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + have_ps2=false +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test x$have_ps2 = xtrue ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PS2 +_ACEOF + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + ;; + *) + { echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6; } + ;; +esac + + + + +if test x$have_x86cpu = xtrue +then + { echo "$as_me:$LINENO: checking for MMX on processor(s)" >&5 +echo $ECHO_N "checking for MMX on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_mmx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx=yes + else + ac_cv_flag_mmx=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_mmx" >&5 +echo "${ECHO_T}$ac_cv_flag_mmx" >&6; } + + if test $ac_cv_flag_mmx = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_MMX +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMX +_ACEOF + + have_asm_mmx=true + fi + + { echo "$as_me:$LINENO: checking for SSE on processor(s)" >&5 +echo $ECHO_N "checking for SSE on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_sse+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse=yes + else + ac_cv_flag_sse=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_sse" >&5 +echo "${ECHO_T}$ac_cv_flag_sse" >&6; } + + if test $ac_cv_flag_sse = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_SSE +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SSE +_ACEOF + + have_asm_sse=true + fi + + + { echo "$as_me:$LINENO: checking for SSE2 on processor(s)" >&5 +echo $ECHO_N "checking for SSE2 on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_sse2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse2=yes + else + ac_cv_flag_sse2=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_sse2" >&5 +echo "${ECHO_T}$ac_cv_flag_sse2" >&6; } + + if test $ac_cv_flag_sse2 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_SSE2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SSE2 +_ACEOF + + have_asm_sse2=true + fi + + { echo "$as_me:$LINENO: checking for 3DNOW on processor(s)" >&5 +echo $ECHO_N "checking for 3DNOW on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_3dnow+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* 3dnow" /proc/cpuinfo > /dev/null; then + ac_cv_flag_3dnow=yes + else + ac_cv_flag_3dnow=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_3dnow" >&5 +echo "${ECHO_T}$ac_cv_flag_3dnow" >&6; } + + if test $ac_cv_flag_3dnow = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_3DNOW +_ACEOF + + have_asm_3dnow=true + fi + + { echo "$as_me:$LINENO: checking for CMOV on processor(s)" >&5 +echo $ECHO_N "checking for CMOV on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_cmov+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* cmov" /proc/cpuinfo > /dev/null; then + ac_cv_flag_cmov=yes + else + ac_cv_flag_cmov=yes + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_cmov" >&5 +echo "${ECHO_T}$ac_cv_flag_cmov" >&6; } + + if test $ac_cv_flag_cmov = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CMOV +_ACEOF + + have_cmov=true + fi + + + { echo "$as_me:$LINENO: checking for MMX2 on processor(s)" >&5 +echo $ECHO_N "checking for MMX2 on processor(s)... $ECHO_C" >&6; } +if test "${ac_cv_flag_mmx2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if grep "^flags.* mmxext" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx2=yes + else + ac_cv_flag_mmx2=yes + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_flag_mmx2" >&5 +echo "${ECHO_T}$ac_cv_flag_mmx2" >&6; } + + if test $ac_cv_flag_mmx2 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_MMX2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMX2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ASM_MMXEXT +_ACEOF + + have_asm_mmx2=true + fi + +fi + +if test x$have_ppccpu = xtrue +then + { echo "$as_me:$LINENO: checking compiler support for AltiVec" >&5 +echo $ECHO_N "checking compiler support for AltiVec... $ECHO_C" >&6; } + cat > conftest.c < +#endif +int main() { + union { vector signed int v; + signed int i; + } vi; + vi.v = vec_splat_s32(1); + return vi.i; +} +EOF + ALTIVEC_CFLAGS="" + if $CC -o conftest conftest.c >/dev/null 2>&1; then + have_altivec=true + elif $CC $CFLAGS -faltivec -o conftest conftest.c >/dev/null 2>&1; then + # Mac OS X style + have_altivec=true + ALTIVEC_CFLAGS="-faltivec" + elif $CC $CFLAGS -fvec -o conftest conftest.c >/dev/null 2>&1; then + # Motorola style + have_altivec=true + ALTIVEC_CFLAGS="-fvec" + elif $CC $CFLAGS -DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec -o conftest conftest.c >/dev/null 2>&1; then + # gcc 3.1 style + have_altivec=true + ALTIVEC_CFLAGS="-DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec" + fi + rm -f conftest*; + + if test x$have_altivec = xtrue + then + # add -O3 flag + ALTIVEC_CFLAGS="-O3 ${ALTIVEC_CFLAGS}" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALTIVEC +_ACEOF + + + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + +fi + +if test ! -r $srcdir/cpuinfo.sh; then + { { echo "$as_me:$LINENO: error: cpuinfo.sh script not found - do a cvs update" >&5 +echo "$as_me: error: cpuinfo.sh script not found - do a cvs update" >&2;} + { (exit 1); exit 1; }; } +fi + + +if test x$have_x86cpu = xtrue -o x$have_ppccpu = xtrue; then + if test x$host_alias != x; then + { echo "$as_me:$LINENO: checking sub-architecture settings" >&5 +echo $ECHO_N "checking sub-architecture settings... $ECHO_C" >&6; } + if test x$have_x86cpu = xtrue; then + host_mod_cpu=`echo $host_cpu|tr _ -` + ARCHFLAGS="-march=$host_mod_cpu -mcpu=$host_mod_cpu" + { echo "$as_me:$LINENO: result: $ARCHFLAGS" >&5 +echo "${ECHO_T}$ARCHFLAGS" >&6; } + fi + else + { echo "$as_me:$LINENO: checking sub-architecture settings" >&5 +echo $ECHO_N "checking sub-architecture settings... $ECHO_C" >&6; } + chmod +x $srcdir/cpuinfo.sh + + if test x$have_x86cpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh x86` + fi + if test x$have_ppccpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh ppc` + fi + { echo "$as_me:$LINENO: result: $ARCHFLAGS" >&5 +echo "${ECHO_T}$ARCHFLAGS" >&6; } + fi +fi + + +if test x$have_x86cpu = xtrue; +then + { echo "$as_me:$LINENO: enable_debug = $enable_debug" >&5 +echo "$as_me: enable_debug = $enable_debug" >&6;} + if test "x$enable_debug" != "xyes" ; + then + { echo "$as_me:$LINENO: debug koekje" >&5 +echo "$as_me: debug koekje" >&6;} + if test $ac_cv_flag_sse = yes; then + CFLAGS="$CFLAGS -msse -mfpmath=sse" + { echo "$as_me:$LINENO: cflags aangepast" >&5 +echo "$as_me: cflags aangepast" >&6;} + fi + if test $av_cv_flag_sse2 = yes; then + CFLAGS="$CFLAGS -msse2 -mfpmath=sse" + { echo "$as_me:$LINENO: cflags aangepast" >&5 +echo "$as_me: cflags aangepast" >&6;} + fi + fi +fi + +{ echo "$as_me:$LINENO: result: $CFLAGS" >&5 +echo "${ECHO_T}$CFLAGS" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_FFMPEG_UNINSTALLED +_ACEOF + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_AVCODEC" >&5 +echo $ECHO_N "checking for FFMPEG_AVCODEC... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVCODEC_CFLAGS"; then + pkg_cv_FFMPEG_AVCODEC_CFLAGS="$FFMPEG_AVCODEC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavcodec\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVCODEC_CFLAGS=`$PKG_CONFIG --cflags "libavcodec" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVCODEC_LIBS"; then + pkg_cv_FFMPEG_AVCODEC_LIBS="$FFMPEG_AVCODEC_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavcodec\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVCODEC_LIBS=`$PKG_CONFIG --libs "libavcodec" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_AVCODEC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavcodec"` + else + FFMPEG_AVCODEC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_AVCODEC_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_avcodec=false +elif test $pkg_failed = untried; then + have_avcodec=false +else + FFMPEG_AVCODEC_CFLAGS=$pkg_cv_FFMPEG_AVCODEC_CFLAGS + FFMPEG_AVCODEC_LIBS=$pkg_cv_FFMPEG_AVCODEC_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_avcodec=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AVCODEC 1 +_ACEOF + +fi + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_AVFORMAT" >&5 +echo $ECHO_N "checking for FFMPEG_AVFORMAT... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVFORMAT_CFLAGS"; then + pkg_cv_FFMPEG_AVFORMAT_CFLAGS="$FFMPEG_AVFORMAT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavformat\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavformat") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVFORMAT_CFLAGS=`$PKG_CONFIG --cflags "libavformat" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_AVFORMAT_LIBS"; then + pkg_cv_FFMPEG_AVFORMAT_LIBS="$FFMPEG_AVFORMAT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavformat\"") >&5 + ($PKG_CONFIG --exists --print-errors "libavformat") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_AVFORMAT_LIBS=`$PKG_CONFIG --libs "libavformat" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_AVFORMAT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavformat"` + else + FFMPEG_AVFORMAT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavformat"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_AVFORMAT_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_avformat=false +elif test $pkg_failed = untried; then + have_avformat=false +else + FFMPEG_AVFORMAT_CFLAGS=$pkg_cv_FFMPEG_AVFORMAT_CFLAGS + FFMPEG_AVFORMAT_LIBS=$pkg_cv_FFMPEG_AVFORMAT_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_avformat=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AVFORMAT 1 +_ACEOF + +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFMPEG_SWSCALER" >&5 +echo $ECHO_N "checking for FFMPEG_SWSCALER... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_SWSCALER_CFLAGS"; then + pkg_cv_FFMPEG_SWSCALER_CFLAGS="$FFMPEG_SWSCALER_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libswscale\"") >&5 + ($PKG_CONFIG --exists --print-errors "libswscale") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_SWSCALER_CFLAGS=`$PKG_CONFIG --cflags "libswscale" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFMPEG_SWSCALER_LIBS"; then + pkg_cv_FFMPEG_SWSCALER_LIBS="$FFMPEG_SWSCALER_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libswscale\"") >&5 + ($PKG_CONFIG --exists --print-errors "libswscale") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFMPEG_SWSCALER_LIBS=`$PKG_CONFIG --libs "libswscale" 2>/dev/null` +else + pkg_failed=yes +fi + 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 + FFMPEG_SWSCALER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libswscale"` + else + FFMPEG_SWSCALER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libswscale"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFMPEG_SWSCALER_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_swscaler=false +elif test $pkg_failed = untried; then + have_swscaler=false +else + FFMPEG_SWSCALER_CFLAGS=$pkg_cv_FFMPEG_SWSCALER_CFLAGS + FFMPEG_SWSCALER_LIBS=$pkg_cv_FFMPEG_SWSCALER_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + + + have_swscaler=true + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SWSCALER 1 +_ACEOF + +fi + + + +if test x$have_avcodec != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net " >&5 +echo "$as_me: error: FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net " >&2;} + { (exit 1); exit 1; }; } +fi + +if test x$have_avformat != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg AVFormat not found. Get it from http://ffmpeg.sourceforge.net " >&5 +echo "$as_me: error: FFmpeg AVFormat not found. Get it from http://ffmpeg.sourceforge.net " >&2;} + { (exit 1); exit 1; }; } +fi + +if test x$have_swscaler != xtrue ; then + { { echo "$as_me:$LINENO: error: FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? " >&5 +echo "$as_me: error: FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? " >&2;} + { (exit 1); exit 1; }; } +fi + +FFMPEG_INCLUDE_AVCODEC="" +FFMPEG_INCLUDE_AVUTIL="" +FFMPEG_INCLUDE_SWSCALE="" +FFMPEG_INCLUDE_AVFORMAT="" + +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5 +echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avcodec.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avcodec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avcodec.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avcodec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avcodec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avcodec.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5 +echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avcodec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avcodec_h = yes; then + FFMPEG_INCLUDE_AVCODEC="" +fi + + +if test "${ac_cv_header_ffmpeg_avformat_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avformat.h" >&5 +echo $ECHO_N "checking for ffmpeg/avformat.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avformat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avformat_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avformat_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avformat.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avformat.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avformat.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avformat.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avformat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avformat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avformat.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avformat.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avformat.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avformat.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avformat.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avformat.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avformat.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avformat.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avformat.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avformat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avformat.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avformat.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avformat.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avformat.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avformat.h" >&5 +echo $ECHO_N "checking for ffmpeg/avformat.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avformat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avformat_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avformat_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avformat_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avformat_h = yes; then + FFMPEG_INCLUDE_AVFORMAT="" +fi + + +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/avutil.h" >&5 +echo $ECHO_N "checking for ffmpeg/avutil.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avutil_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avutil_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/avutil.h usability" >&5 +echo $ECHO_N "checking ffmpeg/avutil.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/avutil.h presence" >&5 +echo $ECHO_N "checking ffmpeg/avutil.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/avutil.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/avutil.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/avutil.h" >&5 +echo $ECHO_N "checking for ffmpeg/avutil.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_avutil_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_avutil_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avutil_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_avutil_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_avutil_h = yes; then + FFMPEG_INCLUDE_AVUTIL="" +fi + + +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + { echo "$as_me:$LINENO: checking for ffmpeg/swscale.h" >&5 +echo $ECHO_N "checking for ffmpeg/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_swscale_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ffmpeg/swscale.h usability" >&5 +echo $ECHO_N "checking ffmpeg/swscale.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ffmpeg/swscale.h presence" >&5 +echo $ECHO_N "checking ffmpeg/swscale.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ffmpeg/swscale.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ffmpeg/swscale.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for ffmpeg/swscale.h" >&5 +echo $ECHO_N "checking for ffmpeg/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_ffmpeg_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ffmpeg_swscale_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_ffmpeg_swscale_h" >&6; } + +fi +if test $ac_cv_header_ffmpeg_swscale_h = yes; then + FFMPEG_INCLUDE_SWSCALE="" +fi + + +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + { echo "$as_me:$LINENO: checking for libavutil/avutil.h " >&5 +echo $ECHO_N "checking for libavutil/avutil.h ... $ECHO_C" >&6; } +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavutil_avutil_h_" >&5 +echo "${ECHO_T}$ac_cv_header_libavutil_avutil_h_" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavutil/avutil.h usability" >&5 +echo $ECHO_N "checking libavutil/avutil.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavutil/avutil.h presence" >&5 +echo $ECHO_N "checking libavutil/avutil.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavutil/avutil.h : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavutil/avutil.h : in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavutil/avutil.h " >&5 +echo $ECHO_N "checking for libavutil/avutil.h ... $ECHO_C" >&6; } +if test "${ac_cv_header_libavutil_avutil_h_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavutil_avutil_h_=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavutil_avutil_h_" >&5 +echo "${ECHO_T}$ac_cv_header_libavutil_avutil_h_" >&6; } + +fi +if test $ac_cv_header_libavutil_avutil_h_ = yes; then + FFMPEG_INCLUDE_AVUTIL="" +fi + + +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libswscale/swscale.h" >&5 +echo $ECHO_N "checking for libswscale/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libswscale_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_libswscale_swscale_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libswscale/swscale.h usability" >&5 +echo $ECHO_N "checking libswscale/swscale.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libswscale/swscale.h presence" >&5 +echo $ECHO_N "checking libswscale/swscale.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libswscale/swscale.h" >&5 +echo $ECHO_N "checking for libswscale/swscale.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libswscale_swscale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libswscale_swscale_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libswscale_swscale_h" >&5 +echo "${ECHO_T}$ac_cv_header_libswscale_swscale_h" >&6; } + +fi +if test $ac_cv_header_libswscale_swscale_h = yes; then + FFMPEG_INCLUDE_SWSCALE="" +fi + + +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libavcodec/avcodec.h" >&5 +echo $ECHO_N "checking for libavcodec/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavcodec_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavcodec_avcodec_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavcodec/avcodec.h usability" >&5 +echo $ECHO_N "checking libavcodec/avcodec.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavcodec/avcodec.h presence" >&5 +echo $ECHO_N "checking libavcodec/avcodec.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavcodec/avcodec.h" >&5 +echo $ECHO_N "checking for libavcodec/avcodec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavcodec_avcodec_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavcodec_avcodec_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavcodec_avcodec_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavcodec_avcodec_h" >&6; } + +fi +if test $ac_cv_header_libavcodec_avcodec_h = yes; then + FFMPEG_INCLUDE_AVCODEC="" +fi + + +if test "${ac_cv_header_libavformat_avformat_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libavformat/avformat.h" >&5 +echo $ECHO_N "checking for libavformat/avformat.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavformat_avformat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavformat_avformat_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavformat_avformat_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libavformat/avformat.h usability" >&5 +echo $ECHO_N "checking libavformat/avformat.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libavformat/avformat.h presence" >&5 +echo $ECHO_N "checking libavformat/avformat.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libavformat/avformat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libavformat/avformat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libavformat/avformat.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libavformat/avformat.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libavformat/avformat.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libavformat/avformat.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libavformat/avformat.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libavformat/avformat.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libavformat/avformat.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libavformat/avformat.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libavformat/avformat.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libavformat/avformat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libavformat/avformat.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libavformat/avformat.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libavformat/avformat.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libavformat/avformat.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------------- ## +## Report this to veejay-users@lists.sourceforge.net ## +## ------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libavformat/avformat.h" >&5 +echo $ECHO_N "checking for libavformat/avformat.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libavformat_avformat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libavformat_avformat_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libavformat_avformat_h" >&5 +echo "${ECHO_T}$ac_cv_header_libavformat_avformat_h" >&6; } + +fi +if test $ac_cv_header_libavformat_avformat_h = yes; then + FFMPEG_INCLUDE_AVFORMAT="" +fi + + + + +cat >>confdefs.h <<_ACEOF +#define AVCODEC_INC $FFMPEG_INCLUDE_AVCODEC +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define AVUTIL_INC $FFMPEG_INCLUDE_AVUTIL +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define AVFORMAT_INC $FFMPEG_INCLUDE_AVFORMAT +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SWSCALE_INC $FFMPEG_INCLUDE_SWSCALE +_ACEOF + + + + if test x$have_asm_mmx = xtrue; then + HAVE_ASM_MMX_TRUE= + HAVE_ASM_MMX_FALSE='#' +else + HAVE_ASM_MMX_TRUE='#' + HAVE_ASM_MMX_FALSE= +fi + + if test x$have_x86cpu = xtrue; then + HAVE_X86CPU_TRUE= + HAVE_X86CPU_FALSE='#' +else + HAVE_X86CPU_TRUE='#' + HAVE_X86CPU_FALSE= +fi + + if test x$have_ppccpu = xtrue; then + HAVE_PPCCPU_TRUE= + HAVE_PPCCPU_FALSE='#' +else + HAVE_PPCCPU_TRUE='#' + HAVE_PPCCPU_FALSE= +fi + + if test x$have_ppccpu = xtrue; then + ARCH_PPC_TRUE= + ARCH_PPC_FALSE='#' +else + ARCH_PPC_TRUE='#' + ARCH_PPC_FALSE= +fi + + if test x$have_x86cpu = xtrue; then + ARCH_X86_TRUE= + ARCH_X86_FALSE='#' +else + ARCH_X86_TRUE='#' + ARCH_X86_FALSE= +fi + + if test x$have_altivec = xtrue; then + HAVE_ALTIVEC_TRUE= + HAVE_ALTIVEC_FALSE='#' +else + HAVE_ALTIVEC_TRUE='#' + HAVE_ALTIVEC_FALSE= +fi + + if test x$have_asm_mmx2 = xtrue; then + HAVE_ASM_MMX2_TRUE= + HAVE_ASM_MMX2_FALSE='#' +else + HAVE_ASM_MMX2_TRUE='#' + HAVE_ASM_MMX2_FALSE= +fi + + if test x$have_asm_sse = xtrue; then + HAVE_ASM_SSE_TRUE= + HAVE_ASM_SSE_FALSE='#' +else + HAVE_ASM_SSE_TRUE='#' + HAVE_ASM_SSE_FALSE= +fi + + if test x$have_asm_sse2 = xtrue; then + HAVE_ASM_SSE2_TRUE= + HAVE_ASM_SSE2_FALSE='#' +else + HAVE_ASM_SSE2_TRUE='#' + HAVE_ASM_SSE2_FALSE= +fi + + if test x$have_asm_nasm = xtrue; then + HAVE_ASM_NASM_TRUE= + HAVE_ASM_NASM_FALSE='#' +else + HAVE_ASM_NASM_TRUE='#' + HAVE_ASM_NASM_FALSE= +fi + + if test x$have_asm_mmx = xtrue; then + HAVE_MMX_TRUE= + HAVE_MMX_FALSE='#' +else + HAVE_MMX_TRUE='#' + HAVE_MMX_FALSE= +fi + + if test x$have_asm_sse = xtrue; then + HAVE_SSE_TRUE= + HAVE_SSE_FALSE='#' +else + HAVE_SSE_TRUE='#' + HAVE_SSE_FALSE= +fi + + if test x$have_asm_sse2 = xtrue; then + HAVE_SSE2_TRUE= + HAVE_SSE2_FALSE='#' +else + HAVE_SSE2_TRUE='#' + HAVE_SSE2_FALSE= +fi + + if test x$have_asm_mmx2 = xtrue; then + HAVE_MMX2_TRUE= + HAVE_MMX2_FALSE='#' +else + HAVE_MMX2_TRUE='#' + HAVE_MMX2_FALSE= +fi + + if test x$have_sdl = xtrue; then + HAVE_SDL_TRUE= + HAVE_SDL_FALSE='#' +else + HAVE_SDL_TRUE='#' + HAVE_SDL_FALSE= +fi + + if test x$have_xml2 = xtrue; then + HAVE_XML2_TRUE= + HAVE_XML2_FALSE='#' +else + HAVE_XML2_TRUE='#' + HAVE_XML2_FALSE= +fi + + if test x$have_jack = xtrue; then + HAVE_JACK_TRUE= + HAVE_JACK_FALSE='#' +else + HAVE_JACK_TRUE='#' + HAVE_JACK_FALSE= +fi + + if test x$have_directfb = xtrue; then + HAVE_DIRECTFB_TRUE= + HAVE_DIRECTFB_FALSE='#' +else + HAVE_DIRECTFB_TRUE='#' + HAVE_DIRECTFB_FALSE= +fi + + if test x$have_freetype = xtrue; then + HAVE_FREETYPE_TRUE= + HAVE_FREETYPE_FALSE='#' +else + HAVE_FREETYPE_TRUE='#' + HAVE_FREETYPE_FALSE= +fi + + if test x$have_v4l = xtrue; then + HAVE_V4L_TRUE= + HAVE_V4L_FALSE='#' +else + HAVE_V4L_TRUE='#' + HAVE_V4L_FALSE= +fi + + if test x$have_libdv = xtrue; then + SUPPORT_READ_DV2_TRUE= + SUPPORT_READ_DV2_FALSE='#' +else + SUPPORT_READ_DV2_TRUE='#' + SUPPORT_READ_DV2_FALSE= +fi + + if test x$have_dl_dlopen = xtrue; then + HAVE_DL_DLOPEN_TRUE= + HAVE_DL_DLOPEN_FALSE='#' +else + HAVE_DL_DLOPEN_TRUE='#' + HAVE_DL_DLOPEN_FALSE= +fi + + if test x$have_jpeg = xtrue; then + HAVE_JPEG_TRUE= + HAVE_JPEG_FALSE='#' +else + HAVE_JPEG_TRUE='#' + HAVE_JPEG_FALSE= +fi + + if test x$have_gl = xtrue; then + HAVE_GL_TRUE= + HAVE_GL_FALSE='#' +else + HAVE_GL_TRUE='#' + HAVE_GL_FALSE= +fi + + if test x$have_unicap = xtrue; then + HAVE_UNICAP_TRUE= + HAVE_UNICAP_FALSE='#' +else + HAVE_UNICAP_TRUE='#' + HAVE_UNICAP_FALSE= +fi + + +CFLAGS="$ARCHFLAGS $CFLAGS" +CXXFLAGS="$ARCHFLAGS $CXXFLAGS" + + +if test "x${GCC}" != "xyes" ; then + enable_compile_warnings=no +fi + +{ echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 +echo $ECHO_N "checking what warning flags to pass to the C compiler... $ECHO_C" >&6; } +warnCFLAGS= +warnCXXFLAGS= +if test "x$enable_compile_warnings" != "xno" ; then + if test "x$GCC" = "xyes" ; then + case "$CFLAGS" in + *-Wall*) ;; + *) warnCFLAGS="" ;; + esac + if test "x$enable_compile_warnings" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wundef -Wshadow -Wbad-function-cast -Wconversion -Wpadded -Wunreachable-code -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + fi + if test "x$enable_warnings_as_errors" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Werror" + warnCXXFLAGS="$warnCXXFLAGS -Werror" + fi + fi +fi + +if test "x$cflags_set" != "xyes" ; then + if test "x$enable_debug" = "xyes" ; then + CFLAGS="$debugCFLAGS $warnCFLAGS $CFLAGS" + else + CFLAGS="$CFLAGS $warnCFLAGS" + fi + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS" + cflags_set=yes +fi + + +if test x"$with_extra_cflags" != "x"; then + CFLAGS="$CFLAGS $with_extra_cflags" + CXXFLAGS="$CXXFLAGS $with_extra_cflags" +fi + + +ac_config_files="$ac_config_files Makefile aclib/Makefile libOSC/Makefile libhash/Makefile libvjmsg/Makefile libvevo/Makefile liblzo/Makefile libvjmem/Makefile libgoom/Makefile libvje/Makefile libsample/Makefile libvjnet/Makefile libyuv/Makefile libel/Makefile libstream/Makefile liblavjpeg/Makefile libsamplerec/Makefile bio2jack/Makefile veejay/Makefile man/Makefile veejay.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_LIBQUICKTIME_TRUE}" && test -z "${HAVE_LIBQUICKTIME_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBQUICKTIME\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_LIBQUICKTIME\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X_TRUE}" && test -z "${HAVE_X_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_MMX_TRUE}" && test -z "${HAVE_ASM_MMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X86CPU_TRUE}" && test -z "${HAVE_X86CPU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X86CPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X86CPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_PPCCPU_TRUE}" && test -z "${HAVE_PPCCPU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_PPCCPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_PPCCPU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_PPC_TRUE}" && test -z "${ARCH_PPC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_X86_TRUE}" && test -z "${ARCH_X86_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ALTIVEC_TRUE}" && test -z "${HAVE_ALTIVEC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_MMX2_TRUE}" && test -z "${HAVE_ASM_MMX2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_SSE_TRUE}" && test -z "${HAVE_ASM_SSE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_SSE2_TRUE}" && test -z "${HAVE_ASM_SSE2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_ASM_NASM_TRUE}" && test -z "${HAVE_ASM_NASM_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_ASM_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_ASM_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_MMX_TRUE}" && test -z "${HAVE_MMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SSE_TRUE}" && test -z "${HAVE_SSE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SSE2_TRUE}" && test -z "${HAVE_SSE2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SSE2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_MMX2_TRUE}" && test -z "${HAVE_MMX2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_MMX2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SDL_TRUE}" && test -z "${HAVE_SDL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_XML2_TRUE}" && test -z "${HAVE_XML2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_XML2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_XML2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_JACK_TRUE}" && test -z "${HAVE_JACK_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_JACK\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_JACK\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_DIRECTFB_TRUE}" && test -z "${HAVE_DIRECTFB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_DIRECTFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_DIRECTFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_FREETYPE_TRUE}" && test -z "${HAVE_FREETYPE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_FREETYPE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_FREETYPE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_V4L_TRUE}" && test -z "${HAVE_V4L_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_V4L\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_V4L\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SUPPORT_READ_DV2_TRUE}" && test -z "${SUPPORT_READ_DV2_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"SUPPORT_READ_DV2\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"SUPPORT_READ_DV2\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_DL_DLOPEN_TRUE}" && test -z "${HAVE_DL_DLOPEN_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_DL_DLOPEN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_DL_DLOPEN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_JPEG_TRUE}" && test -z "${HAVE_JPEG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_JPEG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_JPEG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_GL_TRUE}" && test -z "${HAVE_GL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_GL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_GL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_UNICAP_TRUE}" && test -z "${HAVE_UNICAP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_UNICAP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_UNICAP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by veejay $as_me 1.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +veejay config.status 1.2 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "aclib/Makefile") CONFIG_FILES="$CONFIG_FILES aclib/Makefile" ;; + "libOSC/Makefile") CONFIG_FILES="$CONFIG_FILES libOSC/Makefile" ;; + "libhash/Makefile") CONFIG_FILES="$CONFIG_FILES libhash/Makefile" ;; + "libvjmsg/Makefile") CONFIG_FILES="$CONFIG_FILES libvjmsg/Makefile" ;; + "libvevo/Makefile") CONFIG_FILES="$CONFIG_FILES libvevo/Makefile" ;; + "liblzo/Makefile") CONFIG_FILES="$CONFIG_FILES liblzo/Makefile" ;; + "libvjmem/Makefile") CONFIG_FILES="$CONFIG_FILES libvjmem/Makefile" ;; + "libgoom/Makefile") CONFIG_FILES="$CONFIG_FILES libgoom/Makefile" ;; + "libvje/Makefile") CONFIG_FILES="$CONFIG_FILES libvje/Makefile" ;; + "libsample/Makefile") CONFIG_FILES="$CONFIG_FILES libsample/Makefile" ;; + "libvjnet/Makefile") CONFIG_FILES="$CONFIG_FILES libvjnet/Makefile" ;; + "libyuv/Makefile") CONFIG_FILES="$CONFIG_FILES libyuv/Makefile" ;; + "libel/Makefile") CONFIG_FILES="$CONFIG_FILES libel/Makefile" ;; + "libstream/Makefile") CONFIG_FILES="$CONFIG_FILES libstream/Makefile" ;; + "liblavjpeg/Makefile") CONFIG_FILES="$CONFIG_FILES liblavjpeg/Makefile" ;; + "libsamplerec/Makefile") CONFIG_FILES="$CONFIG_FILES libsamplerec/Makefile" ;; + "bio2jack/Makefile") CONFIG_FILES="$CONFIG_FILES bio2jack/Makefile" ;; + "veejay/Makefile") CONFIG_FILES="$CONFIG_FILES veejay/Makefile" ;; + "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "veejay.pc") CONFIG_FILES="$CONFIG_FILES veejay.pc" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +LT_RELEASE!$LT_RELEASE$ac_delim +LT_CURRENT!$LT_CURRENT$ac_delim +LT_REVISION!$LT_REVISION$ac_delim +LT_AGE!$LT_AGE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +CPP!$CPP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +YACC!$YACC$ac_delim +YFLAGS!$YFLAGS$ac_delim +LEX!$LEX$ac_delim +LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim +LEXLIB!$LEXLIB$ac_delim +CCAS!$CCAS$ac_delim +CCASFLAGS!$CCASFLAGS$ac_delim +CCASDEPMODE!$CCASDEPMODE$ac_delim +am__fastdepCCAS_TRUE!$am__fastdepCCAS_TRUE$ac_delim +am__fastdepCCAS_FALSE!$am__fastdepCCAS_FALSE$ac_delim +LIBGETOPT_LIB!$LIBGETOPT_LIB$ac_delim +HAVE_GL!$HAVE_GL$ac_delim +GL_LIBS!$GL_LIBS$ac_delim +GL_CFLAGS!$GL_CFLAGS$ac_delim +XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim +LIBM_LIBS!$LIBM_LIBS$ac_delim +PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +MJPEGTOOLS_CFLAGS!$MJPEGTOOLS_CFLAGS$ac_delim +MJPEGTOOLS_LIBS!$MJPEGTOOLS_LIBS$ac_delim +MJPEGTOOLS_CFLAGS!$MJPEGTOOLS_CFLAGS$ac_delim +MJPEGTOOLS_LIBS!$MJPEGTOOLS_LIBS$ac_delim +JPEG_LIBS!$JPEG_LIBS$ac_delim +JPEG_CFLAGS!$JPEG_CFLAGS$ac_delim +PIXBUF_CFLAGS!$PIXBUF_CFLAGS$ac_delim +PIXBUF_LIBS!$PIXBUF_LIBS$ac_delim +PIXBUF_CFLAGS!$PIXBUF_CFLAGS$ac_delim +PIXBUF_LIBS!$PIXBUF_LIBS$ac_delim +LIBDV_CFLAGS!$LIBDV_CFLAGS$ac_delim +LIBDV_LIBS!$LIBDV_LIBS$ac_delim +LIBQUICKTIME_CFLAGS!$LIBQUICKTIME_CFLAGS$ac_delim +LIBQUICKTIME_LIBS!$LIBQUICKTIME_LIBS$ac_delim +HAVE_LIBQUICKTIME_TRUE!$HAVE_LIBQUICKTIME_TRUE$ac_delim +HAVE_LIBQUICKTIME_FALSE!$HAVE_LIBQUICKTIME_FALSE$ac_delim +V4LCONF_LIBS!$V4LCONF_LIBS$ac_delim +XMKMF!$XMKMF$ac_delim +X_CFLAGS!$X_CFLAGS$ac_delim +X_PRE_LIBS!$X_PRE_LIBS$ac_delim +X_LIBS!$X_LIBS$ac_delim +X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim +HAVE_X_TRUE!$HAVE_X_TRUE$ac_delim +HAVE_X_FALSE!$HAVE_X_FALSE$ac_delim +SDL_CONFIG!$SDL_CONFIG$ac_delim +SDL_CFLAGS!$SDL_CFLAGS$ac_delim +SDL_LIBS!$SDL_LIBS$ac_delim +UNICAP_CFLAGS!$UNICAP_CFLAGS$ac_delim +UNICAP_LIBS!$UNICAP_LIBS$ac_delim +HAVE_UNICAP!$HAVE_UNICAP$ac_delim +DIRECTFB_CFLAGS!$DIRECTFB_CFLAGS$ac_delim +DIRECTFB_LIBS!$DIRECTFB_LIBS$ac_delim +JACK_CFLAGS!$JACK_CFLAGS$ac_delim +JACK_LIBS!$JACK_LIBS$ac_delim +XML2_CFLAGS!$XML2_CFLAGS$ac_delim +XML2_LIBS!$XML2_LIBS$ac_delim +FREETYPE_CONFIG!$FREETYPE_CONFIG$ac_delim +FT_LIBS!$FT_LIBS$ac_delim +FT_LDFLAGS!$FT_LDFLAGS$ac_delim +FT_CFLAGS!$FT_CFLAGS$ac_delim +DEBUGLIBS!$DEBUGLIBS$ac_delim +OP_CFLAGS!$OP_CFLAGS$ac_delim +YUVCFLAGS!$YUVCFLAGS$ac_delim +PROGRAM_NOPIC!$PROGRAM_NOPIC$ac_delim +ALTIVEC_CFLAGS!$ALTIVEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_CFLAGS!$FFMPEG_AVCODEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_LIBS!$FFMPEG_AVCODEC_LIBS$ac_delim +FFMPEG_AVCODEC_CFLAGS!$FFMPEG_AVCODEC_CFLAGS$ac_delim +FFMPEG_AVCODEC_LIBS!$FFMPEG_AVCODEC_LIBS$ac_delim +FFMPEG_AVFORMAT_CFLAGS!$FFMPEG_AVFORMAT_CFLAGS$ac_delim +FFMPEG_AVFORMAT_LIBS!$FFMPEG_AVFORMAT_LIBS$ac_delim +FFMPEG_AVFORMAT_CFLAGS!$FFMPEG_AVFORMAT_CFLAGS$ac_delim +FFMPEG_AVFORMAT_LIBS!$FFMPEG_AVFORMAT_LIBS$ac_delim +FFMPEG_SWSCALER_CFLAGS!$FFMPEG_SWSCALER_CFLAGS$ac_delim +FFMPEG_SWSCALER_LIBS!$FFMPEG_SWSCALER_LIBS$ac_delim +FFMPEG_SWSCALER_CFLAGS!$FFMPEG_SWSCALER_CFLAGS$ac_delim +FFMPEG_SWSCALER_LIBS!$FFMPEG_SWSCALER_LIBS$ac_delim +HAVE_ASM_MMX_TRUE!$HAVE_ASM_MMX_TRUE$ac_delim +HAVE_ASM_MMX_FALSE!$HAVE_ASM_MMX_FALSE$ac_delim +HAVE_X86CPU_TRUE!$HAVE_X86CPU_TRUE$ac_delim +HAVE_X86CPU_FALSE!$HAVE_X86CPU_FALSE$ac_delim +HAVE_PPCCPU_TRUE!$HAVE_PPCCPU_TRUE$ac_delim +HAVE_PPCCPU_FALSE!$HAVE_PPCCPU_FALSE$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +ARCH_PPC_TRUE!$ARCH_PPC_TRUE$ac_delim +ARCH_PPC_FALSE!$ARCH_PPC_FALSE$ac_delim +ARCH_X86_TRUE!$ARCH_X86_TRUE$ac_delim +ARCH_X86_FALSE!$ARCH_X86_FALSE$ac_delim +HAVE_ALTIVEC_TRUE!$HAVE_ALTIVEC_TRUE$ac_delim +HAVE_ALTIVEC_FALSE!$HAVE_ALTIVEC_FALSE$ac_delim +HAVE_ASM_MMX2_TRUE!$HAVE_ASM_MMX2_TRUE$ac_delim +HAVE_ASM_MMX2_FALSE!$HAVE_ASM_MMX2_FALSE$ac_delim +HAVE_ASM_SSE_TRUE!$HAVE_ASM_SSE_TRUE$ac_delim +HAVE_ASM_SSE_FALSE!$HAVE_ASM_SSE_FALSE$ac_delim +HAVE_ASM_SSE2_TRUE!$HAVE_ASM_SSE2_TRUE$ac_delim +HAVE_ASM_SSE2_FALSE!$HAVE_ASM_SSE2_FALSE$ac_delim +HAVE_ASM_NASM_TRUE!$HAVE_ASM_NASM_TRUE$ac_delim +HAVE_ASM_NASM_FALSE!$HAVE_ASM_NASM_FALSE$ac_delim +HAVE_MMX_TRUE!$HAVE_MMX_TRUE$ac_delim +HAVE_MMX_FALSE!$HAVE_MMX_FALSE$ac_delim +HAVE_SSE_TRUE!$HAVE_SSE_TRUE$ac_delim +HAVE_SSE_FALSE!$HAVE_SSE_FALSE$ac_delim +HAVE_SSE2_TRUE!$HAVE_SSE2_TRUE$ac_delim +HAVE_SSE2_FALSE!$HAVE_SSE2_FALSE$ac_delim +HAVE_MMX2_TRUE!$HAVE_MMX2_TRUE$ac_delim +HAVE_MMX2_FALSE!$HAVE_MMX2_FALSE$ac_delim +HAVE_SDL_TRUE!$HAVE_SDL_TRUE$ac_delim +HAVE_SDL_FALSE!$HAVE_SDL_FALSE$ac_delim +HAVE_XML2_TRUE!$HAVE_XML2_TRUE$ac_delim +HAVE_XML2_FALSE!$HAVE_XML2_FALSE$ac_delim +HAVE_JACK_TRUE!$HAVE_JACK_TRUE$ac_delim +HAVE_JACK_FALSE!$HAVE_JACK_FALSE$ac_delim +HAVE_DIRECTFB_TRUE!$HAVE_DIRECTFB_TRUE$ac_delim +HAVE_DIRECTFB_FALSE!$HAVE_DIRECTFB_FALSE$ac_delim +HAVE_FREETYPE_TRUE!$HAVE_FREETYPE_TRUE$ac_delim +HAVE_FREETYPE_FALSE!$HAVE_FREETYPE_FALSE$ac_delim +HAVE_V4L_TRUE!$HAVE_V4L_TRUE$ac_delim +HAVE_V4L_FALSE!$HAVE_V4L_FALSE$ac_delim +SUPPORT_READ_DV2_TRUE!$SUPPORT_READ_DV2_TRUE$ac_delim +SUPPORT_READ_DV2_FALSE!$SUPPORT_READ_DV2_FALSE$ac_delim +HAVE_DL_DLOPEN_TRUE!$HAVE_DL_DLOPEN_TRUE$ac_delim +HAVE_DL_DLOPEN_FALSE!$HAVE_DL_DLOPEN_FALSE$ac_delim +HAVE_JPEG_TRUE!$HAVE_JPEG_TRUE$ac_delim +HAVE_JPEG_FALSE!$HAVE_JPEG_FALSE$ac_delim +HAVE_GL_TRUE!$HAVE_GL_TRUE$ac_delim +HAVE_GL_FALSE!$HAVE_GL_FALSE$ac_delim +HAVE_UNICAP_TRUE!$HAVE_UNICAP_TRUE$ac_delim +HAVE_UNICAP_FALSE!$HAVE_UNICAP_FALSE$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + +cat >>confdefs.h <<\_ACEOF +#define VERSION ${VERSION} +_ACEOF + + +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Veejay ${VERSION} build configuration :" >&5 +echo "$as_me: Veejay ${VERSION} build configuration :" >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Compiler flags: $CFLAGS" >&5 +echo "$as_me: Compiler flags: $CFLAGS" >&6;} +{ echo "$as_me:$LINENO: $YUVCFLAGS" >&5 +echo "$as_me: $YUVCFLAGS" >&6;} +{ echo "$as_me:$LINENO: $OP_CFLAGS" >&5 +echo "$as_me: $OP_CFLAGS" >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Architecture: ${host_cpu} " >&5 +echo "$as_me: Architecture: ${host_cpu} " >&6;} +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +if test "$have_x86cpu" = "true" ; then +{ echo "$as_me:$LINENO: x86 " >&5 +echo "$as_me: x86 " >&6;} +{ echo "$as_me:$LINENO: MMX enabled : ${ac_cv_flag_mmx}" >&5 +echo "$as_me: MMX enabled : ${ac_cv_flag_mmx}" >&6;} +{ echo "$as_me:$LINENO: MMX2 enabled : ${ac_cv_flag_mmx2}" >&5 +echo "$as_me: MMX2 enabled : ${ac_cv_flag_mmx2}" >&6;} +{ echo "$as_me:$LINENO: SSE enabled : ${ac_cv_flag_sse}" >&5 +echo "$as_me: SSE enabled : ${ac_cv_flag_sse}" >&6;} +{ echo "$as_me:$LINENO: SSE2 enabled : ${ac_cv_flag_sse2}" >&5 +echo "$as_me: SSE2 enabled : ${ac_cv_flag_sse2}" >&6;} +{ echo "$as_me:$LINENO: 3DNOW enabled : ${ac_cv_flag_3dnow}" >&5 +echo "$as_me: 3DNOW enabled : ${ac_cv_flag_3dnow}" >&6;} +{ echo "$as_me:$LINENO: CMOV enabled : ${ac_cv_flag_cmov}" >&5 +echo "$as_me: CMOV enabled : ${ac_cv_flag_cmov}" >&6;} +fi + +if test "$have_ppccpu" = "true" ; then +{ echo "$as_me:$LINENO: ppc" >&5 +echo "$as_me: ppc" >&6;} +{ echo "$as_me:$LINENO: AltiVec enabled : ${have_altivec}" >&5 +echo "$as_me: AltiVec enabled : ${have_altivec}" >&6;} +fi + +if test "$have_mips" = "true" ; then +{ echo "$as_me:$LINENO: mips" >&5 +echo "$as_me: mips" >&6;} +{ echo "$as_me:$LINENO: PS/2 enabled : ${have_ps2}" >&5 +echo "$as_me: PS/2 enabled : ${have_ps2}" >&6;} +fi +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +if test "$have_linux" = "true" ; then +{ echo "$as_me:$LINENO: Platform: Linux" >&5 +echo "$as_me: Platform: Linux" >&6;} +fi + +if test "$have_darwin" = "true" ; then +{ echo "$as_me:$LINENO: Platform: Darwin" >&5 +echo "$as_me: Platform: Darwin" >&6;} +{ echo "$as_me:$LINENO: Good luck! You can be the first! " >&5 +echo "$as_me: Good luck! You can be the first! " >&6;} +fi +{ echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} +{ echo "$as_me:$LINENO: Required dependencies:" >&5 +echo "$as_me: Required dependencies:" >&6;} +{ echo "$as_me:$LINENO: - POSIX Threads (pthread) : ${have_pthread}" >&5 +echo "$as_me: - POSIX Threads (pthread) : ${have_pthread}" >&6;} +{ echo "$as_me:$LINENO: - MJPEGTools : ${have_mjpegtools}" >&5 +echo "$as_me: - MJPEGTools : ${have_mjpegtools}" >&6;} +{ echo "$as_me:$LINENO: - AVI MJPEG playback/recording : true (always)" >&5 +echo "$as_me: - AVI MJPEG playback/recording : true (always)" >&6;} +{ echo "$as_me:$LINENO: - FFmpeg AVFormat : ${have_avformat} " >&5 +echo "$as_me: - FFmpeg AVFormat : ${have_avformat} " >&6;} +{ echo "$as_me:$LINENO: - FFmpeg AVCodec : ${have_avcodec} " >&5 +echo "$as_me: - FFmpeg AVCodec : ${have_avcodec} " >&6;} +{ echo "$as_me:$LINENO: - FFmpeg Swscaler : ${have_swscaler} " >&5 +echo "$as_me: - FFmpeg Swscaler : ${have_swscaler} " >&6;} +{ echo "$as_me:$LINENO: Optional dependencies" >&5 +echo "$as_me: Optional dependencies" >&6;} +{ echo "$as_me:$LINENO: - SDL support : ${have_sdl}" >&5 +echo "$as_me: - SDL support : ${have_sdl}" >&6;} +{ echo "$as_me:$LINENO: - DirectFB support : ${have_directfb}" >&5 +echo "$as_me: - DirectFB support : ${have_directfb}" >&6;} +{ echo "$as_me:$LINENO: - OpenGL support : ${have_gl}" >&5 +echo "$as_me: - OpenGL support : ${have_gl}" >&6;} +{ echo "$as_me:$LINENO: - libDV (digital video) support : ${have_libdv} " >&5 +echo "$as_me: - libDV (digital video) support : ${have_libdv} " >&6;} +{ echo "$as_me:$LINENO: - QuickTime support : ${have_libquicktime} " >&5 +echo "$as_me: - QuickTime support : ${have_libquicktime} " >&6;} +{ echo "$as_me:$LINENO: - Unicap Imaging : ${have_unicap} " >&5 +echo "$as_me: - Unicap Imaging : ${have_unicap} " >&6;} +{ echo "$as_me:$LINENO: - video4linux : ${have_v4l}" >&5 +echo "$as_me: - video4linux : ${have_v4l}" >&6;} +{ echo "$as_me:$LINENO: - JPEG support : ${have_jpeg} " >&5 +echo "$as_me: - JPEG support : ${have_jpeg} " >&6;} +{ echo "$as_me:$LINENO: - GDK Pixbuf support : ${have_pixbuf}" >&5 +echo "$as_me: - GDK Pixbuf support : ${have_pixbuf}" >&6;} +{ echo "$as_me:$LINENO: - Jack Audio Connection Kit : ${have_jack}" >&5 +echo "$as_me: - Jack Audio Connection Kit : ${have_jack}" >&6;} +{ echo "$as_me:$LINENO: - XML c library for Gnome : ${have_xml2}" >&5 +echo "$as_me: - XML c library for Gnome : ${have_xml2}" >&6;} +{ echo "$as_me:$LINENO: - Freetype support : ${have_freetype}" >&5 +echo "$as_me: - Freetype support : ${have_freetype}" >&6;} + diff --git a/veejay-server/configure.ac b/veejay-server/configure.ac new file mode 100644 index 00000000..bcb07e71 --- /dev/null +++ b/veejay-server/configure.ac @@ -0,0 +1,1086 @@ +dnl Process this file with autoconf to produce a configure script. +dnl AC_INIT +AC_INIT([veejay],[1.2],[veejay-users@lists.sourceforge.net]) +AC_PREREQ(2.57) +AC_CONFIG_SRCDIR([veejay/veejay.c]) + +VEEJAY_MAJOR_VERSION=1 +VEEJAY_MINOR_VERSION=2 +VEEJAY_MICRO_VERSION=0 +VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION +VEEJAY_CODENAME="Veejay Classic - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" +AC_CONFIG_HEADERS([config.h]) +dnl AX_CONFIG_PREFIXED_HEADER([veejay-config.h], [VEEJAY], [config.h]) + +AC_CANONICAL_HOST +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE([1.7]) +AM_MAINTAINER_MODE +AM_INIT_AUTOMAKE([dist-bzip2]) + +AC_DEFINE(VEEJAY,1,[Building Veejay]) +AC_DEFINE(HAVE_CONFIG_H,1,[Include config.h]) +# libtool versioning +LT_RELEASE=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION +LT_CURRENT=$VEEJAY_MICRO_VERSION +LT_REVISION=$VEEJAY_MICRO_VERSION +LT_AGE=$VEEJAY_MICRO_VERSION +AC_SUBST(LT_RELEASE) +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) +dnl ********************************************************************** +dnl Options + + +dnl kill CFLAGS +CFLAGS="" +AC_ARG_ENABLE(strict, + AC_HELP_STRING([--enable-strict], + [Compile in paranoia assertion checking])) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], + [Compile in debugging information])) +AC_ARG_ENABLE(profile, + AC_HELP_STRING([--enable-profiling], + [Compile in profiling information])) +AC_ARG_ENABLE(compile-warnings, + AC_HELP_STRING([--enable-compile-warnings], + [Turn on compiler warnings.])) +AC_ARG_ENABLE(warnings_as_errors, + AC_HELP_STRING([--enable-warnings_as_errors], + [Compiler warnings are errors.])) +AC_ARG_ENABLE(simd-accel, + AC_HELP_STRING([--enable-simd-accel], + [use SIMD multimedia instructions such as MMX, AltiVec, etc.if possible])) +AC_ARG_ENABLE(gl, + AC_HELP_STRING([--enable-gl], + [Compile with openGL display support])) + +AC_ARG_WITH(extra-cflags, + AC_HELP_STRING([--with-extra-cflags=flags], + [Options to be added to CFLAGS (optional)])) +AC_ARG_WITH(libdv, + AC_HELP_STRING([--without-libdv], [Do not use libdv.]), + [], [with_libdv=yes]) + +AC_ARG_WITH(pixbuf, + AC_HELP_STRING([--without-pixbuf], [Do not use GDK pixbuf]), + [], [with_pixbuf=yes]) + + +AC_ARG_WITH(directfb, + AC_HELP_STRING([--without-directfb], [Do not use DirectFB.]), + [], [with_directfb=yes]) +AC_ARG_WITH(sdl, + AC_HELP_STRING([--without-sdl], [Do not use SDL.]), + [], [with_sdl=yes]) +AC_ARG_WITH(jack, + AC_HELP_STRING([--without-jack], [Do not use jack.]), + [], [with_jack=yes]) +AC_ARG_WITH(v4l, + AC_HELP_STRING([--without-v4l], [Do not use video4linux]), + [], [with_v4l=yes]) +AC_ARG_WITH(xml2, + AC_HELP_STRING([--without-xml2], [Do not use the XML library for Gnome]), + [], [with_xml2=yes]) + +AC_ARG_WITH(jpeg, + AC_HELP_STRING([--without-jpeg], [Do not JPEG support]), + [], [with_libjpeg=yes]) + +AC_ARG_WITH(jpeg-mmx, + AC_HELP_STRING([--with-jpegmmx=PFX], + [Prefix where jpeg-mmx is installed (optional).])) + +AC_ARG_WITH(unicap, AC_HELP_STRING([--without-unicap], [Do not use unicap]), + [], [with_unicap=yes]) + + +AC_GNU_SOURCE + +dnl Initialize libtool +AC_PROG_LIBTOOL + +dnl Checks for programs. +AC_PROG_AWK +AC_PROG_CC +AM_PROG_CC_STDC +AC_PROG_YACC +AM_PROG_LEX +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_LN_S +AC_C_BIGENDIAN +AC_C_CONST +AC_C_INLINE +AC_SYS_LARGEFILE + +dnl configure AS and ASFLAGS... +AM_PROG_AS + +AC_CHECK_HEADERS([fenv.h stdint.h inttypes.h sys/types.h alloca.h]) + +dnl AX_PREFIXED_DEFINE([VEEJAY], [HAVE_STDINT_H]) +dnl AX_PREFIXED_DEFINE([VEEJAY], [HAVE_INTTYPES_H]) + +AC_CHECK_FUNCS([posix_memalign memalign fmax lround pow bzero gettimeofday memset mmap strndup strstr strncasecmp]) +AC_CHECK_FUNCS([sched_get_priority_max]) +AC_CHECK_FUNCS([select socket getpagesize memcpy]) + +AC_CHECK_FUNC(getopt_long, + [AC_DEFINE(HAVE_GETOPT_LONG, 1, [long getopt support])], + [ # FreeBSD and BSD/OS have a gnugetopt library for this: + AC_CHECK_LIB([gnugetopt], [getopt_long], + [AC_DEFINE(HAVE_GETOPT_LONG, 1, + [long getopt support]) + LIBGETOPT_LIB="-lgnugetopt"]) + ]) + +AC_CHECK_SIZEOF([int]) +AC_CHECK_SIZEOF([long int]) +AC_CHECK_SIZEOF([size_t]) +AC_CHECK_SIZEOF([float]) + + + +AC_SUBST(LIBGETOPT_LIB) + +AC_TYPE_SIGNAL + +AC_MSG_NOTICE([The host is $host $host_cpu $host_vendor $host_os .]) + +have_gl=false +if test "x$enable_gl" = "xyes" ; then + AC_CHECK_HEADERS(GL/gl.h ,, + [AC_MSG_WARN([Cannot find OpenGL headers]) ]) + GL_LIBS="" + GL_CFLAGS="$GL_INC_PATH" + AC_CHECK_LIB([GL], [main], have_gl=true) + if test x$have_gl = xtrue ; then + GL_LIBS="$GL_LIB_PATH -lGL" + AC_SUBST( HAVE_GL ) + AC_DEFINE(HAVE_GL,1,[use gl]) + else + AC_MSG_ERROR([Cannot find openGL library]) + have_gl=false + fi +fi + +AC_SUBST( GL_LIBS ) +AC_SUBST( GL_CFLAGS ) + +dnl Check for Xinerama +use_xinerama=no +AC_CHECK_LIB( Xinerama, XineramaQueryExtension, + [ AC_CHECK_HEADER(X11/extensions/Xinerama.h, + [ + AC_DEFINE( HAVE_XINERAMA,1,[Use Xinerama] ) + XINERAMA_LIBS="-lXext -lXinerama" + AC_SUBST( XINERAMA_LIBS ) + use_xinerama=yes, + ], + use_xinerama=no, + [#include ])], + use_xinerama=no, -lXext) +AC_MSG_CHECKING( for Xinerama support on XFree86 ) +AC_MSG_RESULT($use_xinerama) + + +dnl e_xdpms=no +dnl ACCHECK_HEADER(X11/extensions/dpms.h, +dnl AC_DEFINE( HAVE_XDPMS, 1, [If we have xpdms] ) have_xdpms=yes,, +dnl []) + +dnl ********************************************************************* +dnl Test whether we're linux or not. If so, define HAVE_V4L and build the +dnl video4linux/hardware dependent tools. Else, undefine HAVE_V4L +have_v4l=false +have_linux=false +have_darwin=false +case $host in + *-*-linux*) + AC_CHECK_HEADER(linux/version.h, + [have_linux=true + AC_DEFINE(HAVE_LINUX,,[Linux platform]) + ], + [AC_MSG_ERROR([version.h not found - please install the linux kernel headers]) + ]) + LIBM_LIBS="-lm" + ;; + *-apple-darwin*) + AC_DEFINE(HAVE_DARWIN,,[MAC OS X Darin]) + dnl OS-X/Darwin needs no-cpp-precomp + CFLAGS="$CFLAGS -no-cpp-precomp" + have_darwin=true + LIBM_LIBS="" + ;; + *) + AC_MSG_WARN([Alien platform - Good Luck!]) + LIBM_LIBS="" + ;; +esac + + +dnl ====== check for PKG_CONFIG_PATH +if test x"$PKG_CONFIG_PATH" = x ; then + AC_MSG_NOTICE([The PKG_CONFIG_PATH variable was not set]) + AC_MSG_NOTICE([You should set it to the directories that contain the .pc files]) + AC_MSG_ERROR([Abort]) +fi + + +AC_SUBST(LIBM_LIBS) + +if test x$with_v4l != xno ; then + if test x$have_linux != xfalse ; then + + AC_CHECK_HEADER(linux/videodev.h, + [have_v4l=true + if test x$with_v4l != xno; then + AC_DEFINE(HAVE_V4L, 1, + [Building for Linux - using the video4linux API]) + fi + ], + [AC_MSG_ERROR([videodev.h not found - please install the linux kernel headers])]) + fi +fi + +dnl ********************************************************************* +dnl Check for the pthread lib +dnl +AC_SUBST(PTHREAD_LIBS) +have_pthread=false +AC_CHECK_LIB(pthread, pthread_create, + [ PTHREAD_LIBS="-lpthread" + AC_DEFINE(HAVE_LIBPTHREAD,,[Compiling with pthread library]) + have_pthread=true ],,) + +AC_CHECK_FUNC(pthread_attr_getstacksize, + [ + AC_DEFINE(HAVE_PTHREADSTACKSIZE,,[Using pthread stack size]) + ] ) + +if test x$have_pthread != xtrue ; then + AC_MSG_ERROR([Cannot find pthread library]) +fi + +have_dl_dlopen=false +AC_CHECK_LIB(dl,dlopen) +if test "$ac_cv_lib_dl_dlopen" = "yes"; then + AC_DEFINE(HAVE_DL_DLOPEN,,[Compile with dlopen support]) + have_dl_dlopen=true +fi + + +dnl ********************************************************************* +dnl Check for mjpegtools +dnl (creates MJPEGYTOOLS_CFLAGS, +dnl ********************************************************************* +have_mjpegtools=false +PKG_CHECK_MODULES(MJPEGTOOLS, [mjpegtools >= 1.6 ], + [ + AC_SUBST( MJPEGTOOLS_CFLAGS ) + AC_SUBST( MJPEGTOOLS_LIBS ) + have_mjpegtools=true + AC_DEFINE(HAVE_MJPEGTOOLS, 1, [MJPEGTools installed])], + [have_mjpegtools=false]) + +if test x$have_mjpegtools != xtrue ; then + AC_MSG_ERROR([Cannot find mjpegtools.] ) +fi + +dnl +dnl Check if we want to link with libjpeg (used for making a screenshot) + +have_jpeg=false +if test x$with_jpeg != xno ; then + + dnl ********************************************************************* + dnl Check for the special mmx accelerated jpeg library + dnl At the end of this mess, JPEG_LIBS will contain the libraries and + dnl flags needed to link with the jpeg library and JPEG_CFLAGS will + dnl have the needed flags to compile against said library + AC_SUBST(JPEG_LIBS) + AC_SUBST(JPEG_CFLAGS) + have_jpeg=false + if test x$with_jpegmmx = xyes ; then + AC_MSG_ERROR([ + *** A directory must be specified for --with-jpeg-mmx option.]) + fi + if test x$with_jpegmmx = x ; then + dnl Special case for building .deb's + if test -d ../jpeg-mmx ; then + with_jpegmmx=`pwd`/../jpeg-mmx + else + with_jpegmmx=/usr/local/src/jpeg-mmx + fi + fi + + dnl + dnl Look for the installed/specified copy + dnl + + OLD_CFLAGS="$CFLAGS" + OLD_LIBS="$LIBS" + LIBS="$LIBS -L$with_jpegmmx" + CFLAGS="$CFLAGS -I$with_jpegmmx" + AC_CHECK_LIB(jpeg-mmx, jpeg_start_compress, + [ JPEG_LIBS="$LIBS -ljpeg-mmx" + JPEG_CFLAGS="-I$with_jpegmmx" + have_jpeg=true ],,) + LIBS="$OLD_LIBS" + CFLAGS="$OLD_CFLAGS" + + dnl + dnl Look for _a_ jpeg lib that will work. + dnl + if test x$have_jpeg = xfalse ; then + AC_CHECK_HEADER(jpeglib.h,, + AC_MSG_ERROR([jpeglib.h not found - please install the libjpeg headers])) + AC_CHECK_LIB(jpeg, jpeg_start_compress, + [ JPEG_LIBS="-ljpeg" + JPEG_CFLAGS="" + have_jpeg=true ],,) + fi + + if test x$have_jpeg = xtrue ; then + AC_DEFINE(HAVE_JPEG,,[Define is JPEG libraries are available]) + fi +fi +have_pixbuf=false +if test x$with_pixbuf != xno ; then + PKG_CHECK_MODULES(PIXBUF, [gtk+-2.0 >= 2.0 gdk-pixbuf-2.0], + [ + AC_SUBST( PIXBUF_CFLAGS ) + AC_SUBST( PIXBUF_LIBS ) + have_pixbuf=true + AC_DEFINE(USE_GDK_PIXBUF, 1, [use gdk image load / save])], + [have_pixbuf=false]) +fi + + +if test x$have_pixbuf != xtrue ; then + AC_MSG_ERROR([Cannot find the gdk pixbuf library]) +fi + + + +dnl ********************************************************************* +dnl Check for libdv +dnl (creates LIBDV_CFLAGS, LIBDV_LIBS; defines HAVE_LIBDV) +dnl ********************************************************************* +have_libdv=false +if test x$with_libdv != xno ; then + PKG_CHECK_MODULES(LIBDV, [libdv >= 0.102], + [have_libdv=true + AC_DEFINE(SUPPORT_READ_DV2, 1, [libdv is present])], + [have_libdv=false]) +fi + +have_libquicktime=false +if test x$with_libquicktime != xno ; then + PKG_CHECK_MODULES(LIBQUICKTIME, [libquicktime >= 1.0.0], + [have_libquicktime=true + AC_DEFINE(HAVE_LIBQUICKTIME, 1, [libquicktime >= 1.0.0 prese +nt])], + [have_libquicktime=false]) +fi +AM_CONDITIONAL(HAVE_LIBQUICKTIME, test x$have_libquicktime = xtrue) + + + +dnl ******************************************************************** +dnl Check to see if __progname is provided by the system +dnl ******************************************************************** +AC_CACHE_CHECK([for __progname], + [mjt_cv_extern___progname], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + [[extern char *__progname; + puts(__progname);]])], + [mjt_cv_extern___progname=yes], + [mjt_cv_extern___progname=no])]) +if test x$mjt_cv_extern___progname = xyes ; then + AC_DEFINE(HAVE___PROGNAME, 1, [Is __progname defined by system?]) +fi + +dnl ******************************************************************** +dnl Check for DGA (for v4l-conf) +dnl ******************************************************************** +AC_SUBST(V4LCONF_LIBS) +AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, + V4LCONF_LIBS="$X_LIBS -lXxf86dga" + AC_DEFINE(HAVE_LIBXXF86DGA,1, [libxf86dga is present]),, + $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS) + + +dnl Look for X +AC_PATH_XTRA +AM_CONDITIONAL(HAVE_X, test x$have_x = xyes) + +dnl ******************************************************************** +dnl Check for the SDL library (for software playback) +dnl (defines SDL_CFLAGS and SDL_LIBS) +dnl ******************************************************************** +have_sdl=false +if test x$with_sdl != xno ; then +AM_PATH_SDL(1.2.3,[ + have_sdl=true + AC_DEFINE(HAVE_SDL,, [SDL library present])],,) +fi + + +have_unicap=false +if test x$with_unicap != xno; then +PKG_CHECK_MODULES( UNICAP, libunicap >= 0.1.0, + ac_cv_unicap=1, ac_cv_unicap=0) + +AC_DEFINE_UNQUOTED([HAVE_UNICAP], ${ac_cv_unicap}, + [ Set to 1 if you have unicap.]) + +if test "${ac_cv_unicap}" = 0 +then + AC_MSG_WARN([Could not find libunicap, dropping capture device support]) +else +have_unicap=true +AC_SUBST(HAVE_UNICAP) +AC_DEFINE(HAVE_UNICAP,,[define if unicap]) +fi + +fi + +AC_SUBST(UNICAP_CFLAGS) +AC_SUBST(UNICAP_LIBS) + + +dnl ********************************************************************* +dnl Check for the DirectFB library (for Matrox G550 Tvout) +dnl +have_directfb=false +if test x$with_directfb != xno ; then +PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.17, have_directfb=true, + have_directfb=false) + +if test x$have_directfb = xtrue ; then +AC_SUBST(DIRECTFB_LIBS) +AC_SUBST(DIRECTFB_CFLAGS) +AC_DEFINE(HAVE_DIRECTFB,,[Compiling with DirectFB]) +fi +fi + +dnl ********************************************************************* +dnl Check for the Jack Audio connection kit +dnl + +have_jack=false +if test x$with_jack != xno ; then + PKG_CHECK_MODULES(JACK, jack >= 0.1 , have_jack=true, have_jack=false) + if test x$have_jack = xtrue ; then + AC_SUBST(JACK_LIBS) + AC_SUBST(JACK_CFLAGS) + AC_DEFINE(HAVE_JACK,,[Compiling with support for Jack]) + else + AC_MSG_WARN([Jack >= 0.100 is required, get it at http://jackit.sourceforge.net]); + fi +fi + +dnl ******************************************************************** +dnl Check for the libxml2 library (for saving/loading project files) +dnl +have_xml2=false +if test x$with_xml2 != xno; then + PKG_CHECK_MODULES( XML2, [libxml-2.0 >= 2.5.4], + [ + have_xml2=true + AC_DEFINE(HAVE_XML2,1,[with XML]) + ], + [ have_xml2=false ]) + +dnl AM_PATH_XML2(2.5.4, [ +dnl have_xml2=true +dnl AC_DEFINE(HAVE_XML2,,[Compiling with XML2])],,) +dnl +dnl if test x$have_xml2 = xfalse ; then +dnl AC_MSG_WARN([cannot find The XML C library for gnome]) +dnl fi +fi + +if test x$have_xml2 != xtrue ; then + AC_MSG_ERROR([Cannot find the The XML C library for gnome]) +fi + + +have_freetype=false +AC_CHECK_PROG(FREETYPE_CONFIG, freetype-config,yes,no) +if test $FREETYPE_CONFIG = yes; then + FT_CFLAGS="`freetype-config --cflags`" + FT_WORD="`freetype-config --libs`" + FT_LDFLAGS="" + FT_LIBS="" + for word in $FT_WORD ; do + beginning=`echo $word | cut -c -2` + if test ".$beginning" = ".-L"; then + FT_LDFLAGS="$FT_LDFLAGS $word" + else + FT_LIBS="$FT_LIBS $word" + fi + done + AC_DEFINE(HAVE_FREETYPE,,[Compiling with FreeType]) + AC_SUBST(FT_LIBS) + AC_SUBST(FT_LDFLAGS) + AC_SUBST(FT_CFLAGS) + have_freetype=true +else + AC_MSG_ERROR([Cannot find the freetype-config program]) +fi + +AC_MSG_CHECKING(whether to compile in debugging information) +debugCFLAGS="" +if test "x$enable_debug" = "xyes" ; then + debugCFLAGS="-g" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AC_MSG_CHECKING(whether to compile in profiling information) +if test "x$enable_profiling" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -fprofile-arcs -ftest-coverage" + DEBUGLIBS="-lgcov" + AC_SUBST( DEBUGLIBS ) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AC_MSG_CHECKING(whether to compile in assertion checking) +if test "x$enable_strict" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -DSTRICT_CHECKING" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +dnl ******************************************************************** +dnl Test for MMX support if an IA32 platform. If on a PPC then look for +dnl Altivec support. For the IA32 platform see if gcc understands inline +dnl MMX instructions. +dnl +dnl TODO: host = non intel, target = intel do the checks also? +dnl Remember we are checking that the toolchain can generate the +dnl code, not whether the host can execute the code, thats done +dnl at run time with the exception of the SSE code. + + +have_asm_nasm=false +have_asm_mmx=false +have_asm_sse=false +have_asm_sse2=false +have_asm_mmx2=false +have_asm_3dnow=false +have_cmov=false +have_x86cpu=false +have_x86_64cpu=false +have_altivec=false +have_mips=false +have_ppccpu=false +have_ps2=false + +OP_CFLAGS="" +YUVCFLAGS="-fif-conversion" + +AC_MSG_CHECKING([Architecture]) +case $host_cpu in + i[[3-7]]86) + AC_DEFINE(HAVE_X86CPU,, [Compiling for x86 architecture CPU]) + AC_DEFINE(ARCH_X86,1,[Compiling for x86 architecture]) + have_x86cpu=true + + PROGRAM_NOPIC="-fno-PIC" + + if test "x$enable_debug" != "xyes" ; then + OP_CFLAGS="-O3" + fi + + AC_SUBST( OP_CFLAGS ) + AC_SUBST( YUVCFLAGS ) + + dnl If the host is pentium, align on double word boundary + case $host_cpu in + i686) + CFLAGS="$CFLAGS" + ;; + *) + ;; + esac + + ;; + x86_64*|k8-*) + AC_DEFINE(HAVE_X86_CPU,, [Compiling for x86-64 architecture CPU]) + AC_DEFINE(ARCH_X86_64,1, [Compiling for x86-64 architecture CPU]) + have_x86cpu=true + have_x86_64cpu=true + CFLAGS="$CFLAGS -fPIC -DPIC" + ;; + powerpc | powerpc64) + AC_DEFINE(HAVE_PPCCPU,, [Compiling for PowerPC CPU]) + AC_DEFINE(ARCH_PPC,,[Compiling for PowerPC]) + have_ppccpu=true + + case $host in + *-apple-darwin*) + PROGRAM_NOPIC="-mdynamic-no-pic" # dynamic-no-pic is an Apple gcc option +dnl CFLAGS="$CFLAGS -no-cpp-precomp" + + ;; + *) + PROGRAM_NOPIC="" + ;; + esac + ;; + mips | mipsel) + AC_DEFINE(ARCH_MIPS,,[Compiling for MIPS CPU]) + AC_DEFINE(HAVE_MIPS,,[Compiling for MIPS CPU]) + have_mips=true + AC_MSG_CHECKING([if we are compiling on playstation2 hardware]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], + [[#include + #include + ]])], + [have_ps2=true], + [have_ps2=false]) + + if test x$have_ps2 = xtrue ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PS2,,[Compile for playstation2]) + else + AC_MSG_RESULT(no) + fi + + ;; + *) + AC_MSG_RESULT([unknown]) + ;; +esac + +dnl This flag is used for PROGRAMS not SHARED LIBRARIES. PIC code is required +dnl for shared libraries but is slower than non-pic code. Compute bound +dnl programs such as yuvdenoise and y4mspatialfilter can use this flag by +dnl simply adding programname_CFLAGS=@PROGRAM_NOPIC@ to the Makefile.am + +AC_SUBST(PROGRAM_NOPIC) + +if test x$have_x86cpu = xtrue +then + AC_CACHE_CHECK(for MMX on processor(s), ac_cv_flag_mmx, [ + if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx=yes + else + ac_cv_flag_mmx=no + fi + ]) + + if test $ac_cv_flag_mmx = yes; then + AC_DEFINE(HAVE_ASM_MMX,,[Compiling in MMX support]) + AC_DEFINE(HAVE_MMX,,[Compiling in MMX support]) + have_asm_mmx=true + fi + + AC_CACHE_CHECK(for SSE on processor(s), ac_cv_flag_sse, [ + if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse=yes + else + ac_cv_flag_sse=no + fi + ]) + + if test $ac_cv_flag_sse = yes; then + AC_DEFINE(HAVE_ASM_SSE,,[Compiling in SSE support]) + AC_DEFINE(HAVE_SSE,,[Compiling in SSE support]) + have_asm_sse=true + fi + + + dnl check for sse2 + AC_CACHE_CHECK(for SSE2 on processor(s), ac_cv_flag_sse2, [ + if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse2=yes + else + ac_cv_flag_sse2=no + fi + ]) + + if test $ac_cv_flag_sse2 = yes; then + AC_DEFINE(HAVE_ASM_SSE2,,[Compiling in SSE2 support]) + AC_DEFINE(HAVE_SSE2,,[Compiling in SSE2 support]) + have_asm_sse2=true + fi + + AC_CACHE_CHECK(for 3DNOW on processor(s), ac_cv_flag_3dnow, [ + if grep "^flags.* 3dnow" /proc/cpuinfo > /dev/null; then + ac_cv_flag_3dnow=yes + else + ac_cv_flag_3dnow=no + fi + ]) + + if test $ac_cv_flag_3dnow = yes; then + AC_DEFINE(HAVE_ASM_3DNOW,,[Compiling in 3Dnow]) + have_asm_3dnow=true + fi + + AC_CACHE_CHECK(for CMOV on processor(s), ac_cv_flag_cmov, [ + if grep "^flags.* cmov" /proc/cpuinfo > /dev/null; then + ac_cv_flag_cmov=yes + else + ac_cv_flag_cmov=yes + fi + ]) + + if test $ac_cv_flag_cmov = yes; then + AC_DEFINE(HAVE_CMOV,,[Compiling in CMOV]) + have_cmov=true + fi + + + dnl check for MMX2 + AC_CACHE_CHECK(for MMX2 on processor(s), ac_cv_flag_mmx2, [ + if grep "^flags.* mmxext" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx2=yes + else + ac_cv_flag_mmx2=yes + fi + ]) + + if test $ac_cv_flag_mmx2 = yes; then + AC_DEFINE(HAVE_ASM_MMX2,,[Compiling in MMX2]) + AC_DEFINE(HAVE_MMX2,,[Compiling in MMX2]) + AC_DEFINE(HAVE_ASM_MMXEXT,,[Compiling in MMXEXT]) + have_asm_mmx2=true + fi + +fi + +if test x$have_ppccpu = xtrue +then + AC_MSG_CHECKING([compiler support for AltiVec]) + cat > conftest.c < +#endif +int main() { + union { vector signed int v; + signed int i; + } vi; + vi.v = vec_splat_s32(1); + return vi.i; +} +EOF + ALTIVEC_CFLAGS="" + if $CC -o conftest conftest.c >/dev/null 2>&1; then + have_altivec=true + elif $CC $CFLAGS -faltivec -o conftest conftest.c >/dev/null 2>&1; then + # Mac OS X style + have_altivec=true + ALTIVEC_CFLAGS="-faltivec" + elif $CC $CFLAGS -fvec -o conftest conftest.c >/dev/null 2>&1; then + # Motorola style + have_altivec=true + ALTIVEC_CFLAGS="-fvec" + elif $CC $CFLAGS -DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec -o conftest conftest.c >/dev/null 2>&1; then + # gcc 3.1 style + have_altivec=true + ALTIVEC_CFLAGS="-DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec" + fi + rm -f conftest*; + + if test x$have_altivec = xtrue + then + # add -O3 flag + ALTIVEC_CFLAGS="-O3 ${ALTIVEC_CFLAGS}" + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ALTIVEC,, + [Inline PPC Altivec primitives available]) + AC_SUBST(ALTIVEC_CFLAGS) + else + AC_MSG_RESULT(no) + fi + + +fi + +if test ! -r $srcdir/cpuinfo.sh; then + AC_MSG_ERROR([cpuinfo.sh script not found - do a cvs update]) +fi + + +if test x$have_x86cpu = xtrue -o x$have_ppccpu = xtrue; then + if test x$host_alias != x; then + dnl Cross compiling + AC_MSG_CHECKING(sub-architecture settings) + if test x$have_x86cpu = xtrue; then + host_mod_cpu=`echo $host_cpu|tr _ -` + ARCHFLAGS="-march=$host_mod_cpu -mcpu=$host_mod_cpu" + AC_MSG_RESULT($ARCHFLAGS) + fi + else + AC_MSG_CHECKING(sub-architecture settings) + chmod +x $srcdir/cpuinfo.sh + + if test x$have_x86cpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh x86` + fi + if test x$have_ppccpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh ppc` + fi + AC_MSG_RESULT($ARCHFLAGS) + fi +fi + + +if test x$have_x86cpu = xtrue; +then + AC_MSG_NOTICE([enable_debug = $enable_debug]) + if test "x$enable_debug" != "xyes" ; + then + AC_MSG_NOTICE([debug koekje]) + if test $ac_cv_flag_sse = yes; then + CFLAGS="$CFLAGS -msse -mfpmath=sse" + AC_MSG_NOTICE([cflags aangepast]) + fi + if test $av_cv_flag_sse2 = yes; then + CFLAGS="$CFLAGS -msse2 -mfpmath=sse" + AC_MSG_NOTICE([cflags aangepast]) + fi + fi +fi + +AC_MSG_RESULT($CFLAGS) + + +AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED,, + [Defined if building against uninstalled FFmpeg source]) + +PKG_CHECK_MODULES(FFMPEG_AVCODEC, [libavcodec], + [ + AC_SUBST( FFMPEG_AVCODEC_CFLAGS ) + AC_SUBST( FFMPEG_AVCODEC_LIBS ) + have_avcodec=true + AC_DEFINE(HAVE_AVCODEC, 1, [use avcodec])], + [have_avcodec=false]) + + +PKG_CHECK_MODULES(FFMPEG_AVFORMAT, [libavformat], + [ + AC_SUBST( FFMPEG_AVFORMAT_CFLAGS ) + AC_SUBST( FFMPEG_AVFORMAT_LIBS ) + have_avformat=true + AC_DEFINE(HAVE_AVFORMAT, 1, [use avformat])], + [have_avformat=false]) + +PKG_CHECK_MODULES(FFMPEG_SWSCALER, [libswscale], + [ + AC_SUBST( FFMPEG_SWSCALER_CFLAGS ) + AC_SUBST( FFMPEG_SWSCALER_LIBS ) + have_swscaler=true + AC_DEFINE( HAVE_SWSCALER,1,[use swscaler])], + [ have_swscaler=false] ) + + + +if test x$have_avcodec != xtrue ; then + AC_MSG_ERROR([ FFmpeg AVCodec not found. Get it from http://ffmpeg.sourceforge.net ] ) +fi + +if test x$have_avformat != xtrue ; then + AC_MSG_ERROR([ FFmpeg AVFormat not found. Get it from http://ffmpeg.sourceforge.net ] ) +fi + +if test x$have_swscaler != xtrue ; then + AC_MSG_ERROR([ FFmpeg Swscaler not found. Did you enable it when you compiled ffmpeg ? ]) +fi + +FFMPEG_INCLUDE_AVCODEC="" +FFMPEG_INCLUDE_AVUTIL="" +FFMPEG_INCLUDE_SWSCALE="" +FFMPEG_INCLUDE_AVFORMAT="" + +AC_CHECK_HEADER( ffmpeg/avcodec.h, [FFMPEG_INCLUDE_AVCODEC=""],[]) +AC_CHECK_HEADER( ffmpeg/avformat.h, [FFMPEG_INCLUDE_AVFORMAT=""],[]) +AC_CHECK_HEADER( ffmpeg/avutil.h, [FFMPEG_INCLUDE_AVUTIL=""],[]) +AC_CHECK_HEADER( ffmpeg/swscale.h, [FFMPEG_INCLUDE_SWSCALE=""],[]) +AC_CHECK_HEADER( libavutil/avutil.h , [FFMPEG_INCLUDE_AVUTIL=""],[]) +AC_CHECK_HEADER( libswscale/swscale.h, [FFMPEG_INCLUDE_SWSCALE=""],[]) +AC_CHECK_HEADER( libavcodec/avcodec.h, [FFMPEG_INCLUDE_AVCODEC=""],[]) +AC_CHECK_HEADER( libavformat/avformat.h, [FFMPEG_INCLUDE_AVFORMAT=""],[]) + +AC_DEFINE_UNQUOTED( AVCODEC_INC, $FFMPEG_INCLUDE_AVCODEC,[] ) +AC_DEFINE_UNQUOTED( AVUTIL_INC, $FFMPEG_INCLUDE_AVUTIL,[] ) +AC_DEFINE_UNQUOTED( AVFORMAT_INC, $FFMPEG_INCLUDE_AVFORMAT,[] ) +AC_DEFINE_UNQUOTED( SWSCALE_INC, $FFMPEG_INCLUDE_SWSCALE,[] ) + + +dnl ********************************************************************** +dnl All the conditional stuff for the Makefiles +AM_CONDITIONAL(HAVE_ASM_MMX, test x$have_asm_mmx = xtrue) +AM_CONDITIONAL(HAVE_X86CPU, test x$have_x86cpu = xtrue) +AM_CONDITIONAL(HAVE_PPCCPU, test x$have_ppccpu = xtrue) +AM_CONDITIONAL(ARCH_PPC, test x$have_ppccpu = xtrue) +AM_CONDITIONAL(ARCH_X86, test x$have_x86cpu = xtrue) +AM_CONDITIONAL(HAVE_ALTIVEC, test x$have_altivec = xtrue) +AM_CONDITIONAL(HAVE_ASM_MMX2, test x$have_asm_mmx2 = xtrue) +AM_CONDITIONAL(HAVE_ASM_SSE, test x$have_asm_sse = xtrue) +AM_CONDITIONAL(HAVE_ASM_SSE2, test x$have_asm_sse2 = xtrue) +AM_CONDITIONAL(HAVE_ASM_NASM, test x$have_asm_nasm = xtrue) +AM_CONDITIONAL(HAVE_MMX, test x$have_asm_mmx = xtrue) +AM_CONDITIONAL(HAVE_SSE, test x$have_asm_sse = xtrue) +AM_CONDITIONAL(HAVE_SSE2, test x$have_asm_sse2 = xtrue) +AM_CONDITIONAL(HAVE_MMX2, test x$have_asm_mmx2 = xtrue) +AM_CONDITIONAL(HAVE_SDL, test x$have_sdl = xtrue) +AM_CONDITIONAL(HAVE_XML2, test x$have_xml2 = xtrue) +AM_CONDITIONAL(HAVE_JACK, test x$have_jack = xtrue) +AM_CONDITIONAL(HAVE_DIRECTFB, test x$have_directfb = xtrue) +AM_CONDITIONAL(HAVE_FREETYPE, test x$have_freetype = xtrue) +AM_CONDITIONAL(HAVE_V4L, test x$have_v4l = xtrue) +AM_CONDITIONAL(SUPPORT_READ_DV2, test x$have_libdv = xtrue) +AM_CONDITIONAL(HAVE_DL_DLOPEN, test x$have_dl_dlopen = xtrue) +AM_CONDITIONAL(HAVE_JPEG,test x$have_jpeg = xtrue) +AM_CONDITIONAL(HAVE_GL, test x$have_gl = xtrue) +AM_CONDITIONAL(HAVE_UNICAP,test x$have_unicap = xtrue) +dnl ********************************************************************* +dnl Check for what warnings we want gcc to use and adjust the CFLAGS +dnl as needed. This only works for GCC. +dnl We do this last as it can screw up library detection etc... + +CFLAGS="$ARCHFLAGS $CFLAGS" +CXXFLAGS="$ARCHFLAGS $CXXFLAGS" + + +if test "x${GCC}" != "xyes" ; then + enable_compile_warnings=no +fi + +AC_MSG_CHECKING(what warning flags to pass to the C compiler) +warnCFLAGS= +warnCXXFLAGS= +if test "x$enable_compile_warnings" != "xno" ; then + if test "x$GCC" = "xyes" ; then + case "$CFLAGS" in + *-Wall*) ;; + *) warnCFLAGS="" ;; + esac + if test "x$enable_compile_warnings" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wundef -Wshadow -Wbad-function-cast -Wconversion -Wpadded -Wunreachable-code -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + fi + if test "x$enable_warnings_as_errors" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Werror" + warnCXXFLAGS="$warnCXXFLAGS -Werror" + fi + fi +fi + +if test "x$cflags_set" != "xyes" ; then + if test "x$enable_debug" = "xyes" ; then + CFLAGS="$debugCFLAGS $warnCFLAGS $CFLAGS" + else + CFLAGS="$CFLAGS $warnCFLAGS" + fi + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS" + cflags_set=yes +fi + + +if test x"$with_extra_cflags" != "x"; then + CFLAGS="$CFLAGS $with_extra_cflags" + CXXFLAGS="$CXXFLAGS $with_extra_cflags" +fi + + +dnl ********************************************************************** +dnl Output a Makefile or two and the lib/header descriptor script +dnl +AC_CONFIG_FILES([ +Makefile +aclib/Makefile +libOSC/Makefile +libhash/Makefile +libvjmsg/Makefile +libvevo/Makefile +liblzo/Makefile +libvjmem/Makefile +libgoom/Makefile +libvje/Makefile +libsample/Makefile +libvjnet/Makefile +libyuv/Makefile +libel/Makefile +libstream/Makefile +liblavjpeg/Makefile +libsamplerec/Makefile +bio2jack/Makefile +veejay/Makefile +man/Makefile +veejay.pc +]) +AC_OUTPUT + +AC_DEFINE(VERSION, ${VERSION}) + +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Veejay ${VERSION} build configuration :]) +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Compiler flags: $CFLAGS]) +AC_MSG_NOTICE([ $YUVCFLAGS]) +AC_MSG_NOTICE([ $OP_CFLAGS]) +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Architecture: ${host_cpu} ]) +AC_MSG_NOTICE([]) +if test "$have_x86cpu" = "true" ; then +AC_MSG_NOTICE([ x86 ]) +AC_MSG_NOTICE([ MMX enabled : ${ac_cv_flag_mmx}]) +AC_MSG_NOTICE([ MMX2 enabled : ${ac_cv_flag_mmx2}]) +AC_MSG_NOTICE([ SSE enabled : ${ac_cv_flag_sse}]) +AC_MSG_NOTICE([ SSE2 enabled : ${ac_cv_flag_sse2}]) +AC_MSG_NOTICE([ 3DNOW enabled : ${ac_cv_flag_3dnow}]) +AC_MSG_NOTICE([ CMOV enabled : ${ac_cv_flag_cmov}]) +fi + +if test "$have_ppccpu" = "true" ; then +AC_MSG_NOTICE([ ppc]) +AC_MSG_NOTICE([ AltiVec enabled : ${have_altivec}]) +fi + +if test "$have_mips" = "true" ; then +AC_MSG_NOTICE([ mips]) +AC_MSG_NOTICE([ PS/2 enabled : ${have_ps2}]) +fi +AC_MSG_NOTICE([]) +if test "$have_linux" = "true" ; then +AC_MSG_NOTICE([ Platform: Linux]) +fi + +if test "$have_darwin" = "true" ; then +AC_MSG_NOTICE([ Platform: Darwin]) +AC_MSG_NOTICE([ Good luck! You can be the first! ]) +fi +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Required dependencies:]) +AC_MSG_NOTICE([ - POSIX Threads (pthread) : ${have_pthread}]) +AC_MSG_NOTICE([ - MJPEGTools : ${have_mjpegtools}]) +AC_MSG_NOTICE([ - AVI MJPEG playback/recording : true (always)]) +AC_MSG_NOTICE([ - FFmpeg AVFormat : ${have_avformat} ]) +AC_MSG_NOTICE([ - FFmpeg AVCodec : ${have_avcodec} ]) +AC_MSG_NOTICE([ - FFmpeg Swscaler : ${have_swscaler} ]) +AC_MSG_NOTICE([ Optional dependencies]) +AC_MSG_NOTICE([ - SDL support : ${have_sdl}]) +AC_MSG_NOTICE([ - DirectFB support : ${have_directfb}]) +AC_MSG_NOTICE([ - OpenGL support : ${have_gl}]) +AC_MSG_NOTICE([ - libDV (digital video) support : ${have_libdv} ]) +AC_MSG_NOTICE([ - QuickTime support : ${have_libquicktime} ]) +AC_MSG_NOTICE([ - Unicap Imaging : ${have_unicap} ]) +AC_MSG_NOTICE([ - video4linux : ${have_v4l}]) +AC_MSG_NOTICE([ - JPEG support : ${have_jpeg} ]) +AC_MSG_NOTICE([ - GDK Pixbuf support : ${have_pixbuf}]) +AC_MSG_NOTICE([ - Jack Audio Connection Kit : ${have_jack}]) +AC_MSG_NOTICE([ - XML c library for Gnome : ${have_xml2}]) +AC_MSG_NOTICE([ - Freetype support : ${have_freetype}]) + diff --git a/veejay-server/cpuinfo.sh b/veejay-server/cpuinfo.sh new file mode 100755 index 00000000..a8e6ace8 --- /dev/null +++ b/veejay-server/cpuinfo.sh @@ -0,0 +1,336 @@ +#!/bin/sh + +if test x"$CC" = x; then + CC=gcc +fi + +if test $# -ne 1; then + echo "Please give the arch (ppc or x86) as an argument!" 1>&2 + exit 1 +fi + +if test `uname -s` = Darwin; then + IsDarwin=yes +else + IsDarwin=no +fi + +target=$1 + +cc_version=`$CC -dumpversion` +_cc_major=`echo $cc_version | cut -d'.' -f1` +_cc_minor=`echo $cc_version | cut -d'.' -f2` + +if test $_cc_major -ge 4; then + _opt_mcpu="-mtune" +else + _opt_mcpu="-mcpu" +fi + +do_cc() +{ + $CC -o conftest conftest.c $@ >/dev/null 2>&1 +} + +extcheck() +{ +cat > conftest.c < +void catch() { exit(1); } +int main(void){ + signal(SIGILL, catch); + __asm__ __volatile__ ("$1":::"memory"); + exit(0); +} +EOF + +do_cc +if test -x ./conftest; then + ./conftest + if test $? -ne 0; then + return 1 + fi + return 0 +else + return 1 +fi +} + +do_x86() +{ + +CFLAGS=-O +if test $IsDarwin = yes; then + CFLAGS="$CFLAGS -fno-pic -Wl,-read_only_relocs -Wl,suppress" +fi + +if test -r /proc/cpuinfo; then + _cpuinfo="cat /proc/cpuinfo" +else + $CC $CFLAGS -o cpuinfo utils/cpuinfo.c + _cpuinfo="./cpuinfo" +fi + +# Cpu determination logic adapted from the MPlayer configure script. + +pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -n 1` +pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pfamily=`$_cpuinfo | grep 'cpu family' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pstep=`$_cpuinfo | grep 'stepping' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pparam=`$_cpuinfo | grep 'features' | cut -d':' -f2 | head -n 1` + +if test -z "$pparam" ; then + pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | head -n 1` +fi + +_mmx=no +_3dnow=no +_3dnowex=no +_mmx2=no +_sse=no +_sse2=no +_mtrr=no + +for i in $pparam ; do + case "$i" in + 3dnow) _3dnow=yes ;; + 3dnowext) _3dnow=yes _3dnowex=yes ;; + mmx) _mmx=yes ;; + mmxext) _mmx2=yes ;; + mtrr|k6_mtrr|cyrix_arr) _mtrr=yes ;; + xmm|sse|kni) _sse=yes _mmx2=yes ;; + sse2) _sse2=yes ;; + esac +done + +case "$pvendor" in + AuthenticAMD) + case "$pfamily" in + 3)proc=i386 + ;; + 4) proc=i486 + ;; + 5) iproc=586 + # models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3 + # K6 model 13 are the K6-2+ and K6-III+ + if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then + proc=k6-3 + elif test "$pmodel" -ge 8; then + proc=k6-2 + elif test "$pmodel" -ge 6; then + proc=k6 + else + proc=i586 + fi + ;; + 6) iproc=686 + if test "$pmodel" -ge 7; then + proc=athlon-4 + elif test "$pmodel" -ge 6; then + if test "$_sse" = yes && test "$pstep" -ge 2; then + proc=athlon-xp + else + proc=athlon-4 + fi + elif test "$pmodel" -ge 4; then + proc=athlon-tbird + else + proc=athlon + fi + ;; + 15) + # Despite what the gcc into says 'athlon64' is not accepted as + # synonym for 'k8' + proc=k8 + ;; + *) proc=athlon-xp + ;; + esac + ;; + GenuineIntel) + case "$pfamily" in + 3) proc=i386 + ;; + 4) proc=i486 + ;; + 5) iproc=586 + if test "$pmodel" -eq 4 || test "$pmodel" -eq 8; then + proc=pentium-mmx # 4 is desktop, 8 is mobile + else + proc=i586 + fi + ;; + 6) iproc=686 + if test "$pmodel" -ge 15; then + proc=nocona + elif test "$pmodel" -ge 13; then + proc=pentium-m + elif test "$pmodel" -ge 7; then + proc=pentium3 + elif test "$pmodel" -ge 3; then + proc=pentium2 + else + proc=i686 + fi + ;; + 15) proc=pentium4 + ;; + *) proc=pentium4 + ;; + esac + ;; + unknown) + case "$pfamily" in + 3) proc=i386 + ;; + 4) proc=i486 + ;; + *) proc=i586 + ;; + esac + ;; + *) + proc=i586 + ;; +esac + +# check that gcc supports our CPU, if not, fall back to earlier ones + +cat > conftest.c << EOF +int main(void) { return 0; } +EOF +if test "$proc" = "athlon64" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=athlon-xp +fi + +if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" || test "$proc" = "athlon-tbird"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=athlon +fi + +if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=k6 +fi + +if test "$proc" = "k6"; then + do_cc -march=$proc $_opt_mcpu=$proc + if test $? -ne 0; then + if do_cc -march=i586 $_opt_mcpu=i686; then + proc=i586-i686 + else + proc=i586 + fi + fi +fi + +if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i686 +fi +if test "$proc" = "i686" || test "$proc" = "pentium-mmx"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i586 +fi +if test "$proc" = "i586" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i486 +fi +if test "$proc" = "i486" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i386 +fi +if test "$proc" = "i386" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=error +fi +if test "$proc" = "error" ; then + echo "Your $_cc does not even support \"i386\" for '-march' and $_opt_mcpu." + _mcpu="" + _march="" +elif test "$proc" = "i586-i686"; then + _march="-march=i586" + _mcpu="$_opt_mcpu=i686" +else + _march="-march=$proc" + _mcpu="$_opt_mcpu=$proc" +fi + +if test $_cc_major -ge 3; then + extcheck "xorps %%xmm0, %%xmm0" || _gcc3_ext="$_gcc3_ext -mno-sse" + extcheck "xorpd %%xmm0, %%xmm0" || _gcc3_ext="$_gcc3_ext -mno-sse2" + + if test x"$_gcc3_ext" != "x"; then + # if we had to disable sse/sse2 because the active kernel does not + # support this instruction set extension, we also have to tell + # gcc3 to not generate sse/sse2 instructions for normal C code + cat > conftest.c << EOF +int main(void) { return 0; } +EOF + do_cc $_march $_gcc3_ext && _march="$_march $_gcc3_ext" + fi +fi + +echo $_march $_mcpu +rm -f conftest.c conftest cpuinfo +return 0 +} + +do_ppc() +{ +# Linux on a PPC has /proc/info +# Darwin (OS/X) has the hostinfo command +# If neither of those we have no idea what to do - so do nothing. +if test -r /proc/cpuinfo; then + proc=`grep cpu /proc/cpuinfo | cut -d':' -f2 | cut -d',' -f1 | cut -b 2- | head -n 1` +elif test $IsDarwin = yes; then + proc=`hostinfo | grep "Processor type" | cut -f3 -d' ' | sed 's/ppc//'` +else + return 0 +fi + +case "$proc" in + 601) _march="$_opt_mcpu=601" _mcpu='-mtune=601' + ;; + 603) _march="$_opt_mcpu=603" _mcpu='-mtune=603' + ;; + 603e|603ev) _march="$_opt_mcpu=603e" _mcpu='-mtune=603e' + ;; + 604|604e|604r|604ev) _march="$_opt_mcpu=604" _mcpu='-mtune=604' + ;; + 740|740/750|745/755) _march="$_opt_mcpu=740" _mcpu='-mtune=740' + ;; + 750|750CX) _march="$_opt_mcpu=750" _mcpu='-mtune=750' + ;; + *) ;; +esac + +# gcc 3.1(.1) and up supports 7400 and 7450 +if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" || test "$_cc_major" -ge "4"; then + case "$proc" in + 7400*|7410*) _march="$_opt_mcpu=7400" _mcpu='-mtune=7400' ;; + 7450*|7455*) _march="$_opt_mcpu=7450" _mcpu='-mtune=7450' ;; + *) ;; + esac +fi + +# gcc 3.2 and up supports 970 +if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then + case "$proc" in + 970*) if test $IsDarwin = yes; then + _march="$_opt_mcpu=G5 -mpowerpc64 -mpowerpc-gpopt -falign-loops=16 -force_cpusubtype_ALL" _mcpu='-mtune=G5' + else + _march="$_opt_mcpu=970" _mcpu='-mtune=970' + fi + ;; + *) ;; + esac +fi + +echo $_march $_mcpu +return 0 +} + +# +# The script that runs the various functions above +# + +if test $target = x86; then + do_x86 +elif test $target = ppc; then + do_ppc +fi diff --git a/veejay-server/depcomp b/veejay-server/depcomp new file mode 100755 index 00000000..ca5ea4e1 --- /dev/null +++ b/veejay-server/depcomp @@ -0,0 +1,584 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2006-10-15.18 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/veejay-server/doc/COPYING b/veejay-server/doc/COPYING new file mode 100644 index 00000000..a43ea212 --- /dev/null +++ b/veejay-server/doc/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/veejay-server/doc/HowtoCache.txt b/veejay-server/doc/HowtoCache.txt new file mode 100644 index 00000000..524d328d --- /dev/null +++ b/veejay-server/doc/HowtoCache.txt @@ -0,0 +1,8 @@ +Since version 0.9.3 veejay features a caching mechanism to load frames from disk into the system's memory. The cache size is limited to the amount of RAM available in your machine. If the cache is full, Veejay must decide which frames to discard. Veejay will discard the frame furthest away from the current position. + +You can configure the cache with two commandline options: + + -m / --memory [percentage of available RAM to use] + -j / --max_chain [maximum number of samples to cache] + +The second option, '-j' is used to divide up the cache memory into a number of equal sized chunks. Veejay will cache by default up to 8 samples into your system's main memory, if you specified the -m option. diff --git a/veejay-server/doc/HowtoCompile.txt b/veejay-server/doc/HowtoCompile.txt new file mode 100644 index 00000000..76a2a8c5 --- /dev/null +++ b/veejay-server/doc/HowtoCompile.txt @@ -0,0 +1,118 @@ + +Compiling Veejay ¶ +Prerequisities ¶ + +Required: + + * MJPEG Tools + * FFmpeg + * libxml2 for saving project data + * SDL for the video window + * libdv for playback of DV Video + * DirectFB for secundary head (TVOut) + * Jack for audio playback + * freetype2 for font rendering + * libjpegMMX for SIMD optimized JPEG decoding + * [http://www.gtk.org GTK-2.4 (GTK 2.6 recommended) + * [http://www.gnome.org GdkPixbuf (comes with Gnome) + * Cairo (needed for GVeejay Reloaded) + * GtkCairo (needed for GVeejay Reloaded) + * Libquicktime for Quicktime] + * openGL library (gl.h and libGL.so) for the video window + * Unicap API for more video input devices] + +You should check with the package manager of your distribution to see if all development packages have been installed, among others this includes: + + * libdv-dev + * cairo + * jack-dev + * glib >= 2.4 dev + * gtk >= 2.4 dev + * libglade >= 2.2 dev + * automake, autoconf, libtool, etc. + * linux kernel header files + +If you are one of those lucky users with a distribution without any compiler pre-installed you will need to setup a build system by installing a gcc, automake, autoconf, etc etc. + + * Compiling On Ubuntu: doc/HowtoUbuntu.txt + +Preperation ¶ +Configuration ¶ + +Before running configure, check if the PKG_CONFIG_PATH variable is setup correctly: + + $ echo $PKG_CONFIG_PATH + +If echo is silent, you must set the PKG_CONFIG_PATH to point to the directory containing all your .pc files (like for example libdv.pc or jack.pc ) + + $ find /usr -name libdv.pc + /usr/local/lib/pkgconfig/libdv.pc + + $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +1. Get the sources from Veejay's repository: + + $ svn co svn://dyne.org/veejay/trunk/veejay/current + +2. Enter the source directory and run autogen.sh + + $ cd veejay-current + $ sh autogen.sh + +3. Run ./configure + + $ ./configure + +If you want to disable the graphical interfaces for some reason, use: + + $ ./configure --without-gveejayreloaded --without-gveejay + +Building ¶ + +Type 'make' to build veejay + + $ make + +Installing ¶ + + $ sudo make install + +or + + $ su + # make install + +Running veejay ¶ + +Test if veejay works: + + $ veejay -d -n + +To run veejay without accelerated display: + + $ veejay -O5 -d -n + +To run veejay in verbose mode: + + $ veejay -O5 -d -n -v + +To run veejay with openGL display: + + $ veejay -O4 -d -n + +Start another terminal and type: + + $ gveejayreloaded + +or + + $ gveejayreloaded -n + +Stopping veejay ¶ + +Open another terminal + + $ sayVIMS "600:;" + +(or press CTRL-C in the terminal running veejay) + diff --git a/veejay-server/doc/HowtoPlugins.txt b/veejay-server/doc/HowtoPlugins.txt new file mode 100644 index 00000000..99a764fb --- /dev/null +++ b/veejay-server/doc/HowtoPlugins.txt @@ -0,0 +1,13 @@ + ¶ + +First, you need to create a file to tell veejay where to find plugins. + + $ mkdir ~/.veejay + $ vi ~/.veejay/plugins + +The contents of the file can look like: + +/usr/local/lib/freeframe +/usr/local/lib/frei0r-1 + +Veejay will pick up the plugins the next time you start it. diff --git a/veejay-server/doc/HowtoUbuntu.txt b/veejay-server/doc/HowtoUbuntu.txt new file mode 100644 index 00000000..1c951837 --- /dev/null +++ b/veejay-server/doc/HowtoUbuntu.txt @@ -0,0 +1,77 @@ +Which packages do I need ? ¶ + +You will need about 200 megabytes of available diskspace, this includes the packages below and the space needed for building veejay. + + * subversion + * cvs + * build-essentials + * autogen + * autotools-dev + * autoconf + * automake1.8 + * libtool + * libsdl1.2-dev + * libjack0.100.0-dev + * libquicktime-dev + * libxml2-dev + * libglade2-dev + * libgtk2.0-dev + +Which packages do I need to compile myself ? ¶ + + * mjpegtools + + + If there is a compile error in Region2D.hh, complaining about 'assert' insert a line in top of the file '#include ' + + * libunicap + * FFmpeg + * GTK Cairo + + cvs -d :pserver:anoncvs@cvs.cairographics.org:/cvs/cairo co gtkcairo + cd gtkcairo + sh autogen.sh + ./configure && make && sudo make install + +WARNING ¶ + +I use ffmpeg from source, I suggest you do the same. There are unmet dependencies in libavcodec-dev and libavformat-dev that relate to ogg,vorbis,theora, *1394* packages in Ubuntu 6.06. + + $ sudo apt-get remove libavcodec-dev libavformat-dev + $ svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg + $ cd ffmpeg + $ ./configure --help + +Disable what you dont need, then: + + $ ./configure --prefix=/usr --enable-shared ... + $ make && make install + +And continue building veejay +Building veejay ¶ + +Check if the PKG_CONFIG_PATH variable has been set properly. + + $ echo $PKG_CONFIG_PATH + +If you just ran 'configure' and 'make' for mjpegtools,libunicap etc, check if the accompanying .pc files are in /usr/local/lib/pkgconfig + + $ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig + +To get the latest veejay: + + $ svn co svn://dyne.org/veejay/trunk/veejay-current + +To build a veejay optimized for speed: + + $ sh autogen.sh + $ ./configure + $ make && sudo make install + +To build a veejay to send usefull bugreports: + + $ sh autogen.sh + $ ./configure --enable-debug + $ make && sudo make install + + diff --git a/veejay-server/doc/HowtoVeejay-PureData.html b/veejay-server/doc/HowtoVeejay-PureData.html new file mode 100644 index 00000000..9e23c672 --- /dev/null +++ b/veejay-server/doc/HowtoVeejay-PureData.html @@ -0,0 +1,503 @@ + + + + + Using sendVIMS to write simple control paches for veejay in +PureData + + +

Using sendVIMS to write simple control paches for veejay in PureData

+

M. van Henten cola at looze.net

+V0.01 104-10-09 +
+SendVIMS is a Puredata external written by Niels +Elburg and Tom Schouten. It is a control interface to veejay, a +realtime video processing package. +I will explain some of my work using both tools together. +
+

1. Introduction

+

+ SendVIMS is a Puredata external written +by Niels Elburg and Tom Schouten. It is a control interface to veejay, +a realtime video processing package. VIMS stands for 'Veejay's Internal +Messaging System.
+I have been working with veejay +for a long time now so I took my knowledge of what it could do and +built a few paches that will demonstrate the power of building +interactive controls for veejay. This might be interesting for the +newcomers to linux video, but also for the experienced who want to know +more about veejay, and puredata although it is not intended as step by +step guide on how to use PureData or veejay( Especially since I'm +rather new to PureData), but I will try to explain some basics on how +to get this working. +

+

1.1 Copyright

+

This document is Copyright © 104-10-09 M. van Henten. +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +

+

1.2 Disclaimer

+

Use the information in this document at your own risk. I disavow any +potential liability for the contents of this document. Use of the +concepts, examples, and/or other content of this document is entirely +at your own risk. +

+

All copyrights are owned by their owners, unless specifically noted +otherwise. Use of a term in this document should not be regarded as +affecting the validity of any trademark or service mark. +

+

Naming of particular products or brands should not be seen as +endorsements. +

+

You are strongly recommended to take a backup of your system before +major installation and backups at regular intervals. +

+

1.3 News

+

9-10-2004 +Started Writing first draft to this howto, after finishing up on some +basic patches. +

+

1.4 Credits

+

Many thanks to of course to Tom Schouten en Niels Elburg for +creating this tool, thanks to Niels for creating veejay after numerous +sessions of feature dreaming, and continue working on it to create more +then we ever fantasized about.

+

Also, much obliged to the people in te PureData community, who +helped me getting started in the first place.Thanks to Derek Holzer, +who introduced me to PD and showed me how easy and fun PD was. +

+

A thankyou should be in place for the people at BEK ( +http://www.bek.no) Who brought a lot of video guys in the OS world +together, and made this collaboration possible in the first place. +

+

2. Technologies

+

2.1 Expected Skills
+

+

I assume that you know how to work with the linux commandline. +Veejay is ( up to this date) mainly a console application ( besides the +video bit of course) and you need to type stuff to get it working. If this is all +too strange for you, I would advice you to get know a bit more of linux +first, by reading some magazines, and some howto's ( the linux documentation project has a +lot of howto's) like the windows/dos +to linux howto.
+

+

2.2 Veejay
+

+

First of all, you need to download and install a later version of +veejay.  In this document, I used veejay-0.6.2. Any version before +0.5.9 will not work as expected, or not at all together with SendVims.
+

+

Veejay sources are located http://veejay.sourceforge.net, +or go directly to the sourceforge +download area.
+Installation is standard: open a shell, or terminal, unpack the package +somehwere, go into the newly created directory, and type:
+

+

./configure
+

+

when configure has finished, something like:
+

+

 veejay 0.6.2 build +configuration :
+
+ Build +configuration:
+                    +MMX +enabled                     +: true
+                    +MMX2 +enabled                    +: false
+                    +SSE +enabled                     +: true
+                    +3DNow +enabled                   +: false
+                    +CMOV +enabled                    +: true
+                    +glibc support for >2GB files    : true
+
+ Required +dependencies:
+                    +POSIX Threads (pthread)         +: true
+                    +video4linux recording/playback  : true
+                    +Simple Direct Media Layer       : true
+                    +XML C library for Gnome libxml2 : true
+                    +libJPEG                         +: true
+
+ Optional +dependencies:
+                    +libDV (digital +video)                 +: true
+                    +Jack Audio Connection Kit       : true
+                    +DirectFB +support                +: false

+
+

+Should appear.
+
+Note that veejay depends on the XML +C library ( it comes as part of the GNOME libraries and desktop) +and SDL, if you don't have these +packages you should install them. Libdv is optional, for being +able to play dv type 2 format avi's, jack is optional but needed +if you want to hear sound with your movies.
+
+Describing how to get jack working optimal is not within the scope of +this document, I can only say that if you have jack setup properly +veejay should be able to output sound.
+
+When this is done, do a "make" followed by a "make install".
+Veejay should now be installed. Get some movie to edit( you can borrow +one from me here)
+

2.2 PureData

+

PureData is a whole story upon itself. Please read the installation +notes and documentation on http://www.puredata.org. +You can verify if everything works by just running pd, goto help en +check out some of the example paches. Using the documentation  +from within pd you should at least get some basic understanding.
+

+

2.3 SendVims
+

+

In this document I used sendVIMS-0.1.
+This is compied from the README in sendVIMS-0.1.tar.gz :
+
+

+

sendVIMS +- very simple VeeJay client for pure data
+             +(C) 2002-2004 Niels Elburg <elburg@hio.hen.nl>
+             +(C) 2004 Tom Schouten <doelie@zzz.kotnet.org>
+
+This is free +software covered under the terms of the
+GNU GPL. See +the file COPYING for details.
+
+
+building:
+
+./configure +&& make && make install
+
+
+'make +install' copies these files to your pd directory:
+
+<prefix>/lib/pd/extra/sendVIMS.pd_linux
+<prefix>/lib/pd/doc/5.reference/help-sendVIMS.pd
+
+the default +<prefix> is /usr/local
+
+
+
+running:
+
+if the module +is in your pd path it will be loaded automaticly.

+

+

3. Implementation

+

3.1 Get veejay running
+

+

To start veejay, you need to start it with a video file. Veejay only +plays avi files, so no quicktime, or mpeg movies.
+Veejay only knows of two types of video codecs: mjpeg and DV type 2.0.
+So to get veejay running, you need at least one mjpeg or DV type 2.0 +.avi file. These formats were chosen with some reasons, explained in +the veejay-howto. Converting into codecs and other formats is a whole +science upon itself, and I do intend to write a crash course into video +and linux in the future. For creating mjpeg avi's I use the lavtools and mplayer, and veejay itself.
+

+

You can grab a one +second mjpeg avi from here.
+

+

This is copyright free material I transcoded out of a movie from archive.org
+Start veejay by opening up a terminal window such as xterm and type:
+

+

veejay +mymovie.avi

+

If you used the example one second avi, it will briefly play the +whole movie and stop at the last frame. Move your mouse into the video +window. As long as the mouse pointer is inside the video window, you +can use the built in keyboard controls. press keypad-5, this pauzes +playback. now press keypad-1, to skip to the start of your movie. press +the [ key, this marks 'clip start', press keypad-3, to skip to the end +of the movie, and press the ] key, this marks the 'clip end'. You can +now sellect your clip by pressing the F1 key. the movie will +automatically keep looping. you can alterate loopmode by pressing +keypad-*. try some other keypad keys to see what they do. See 'man +veejay' for the other controls.
+

+

3.2 Running PD/SendVIMS
+

+

Open up a terminal window such as xterm and type:
+

+

pd
+

+

You'll need the terminal to get some feedback from pd. From the file +menu of pd, choose 'new'. In the new window, choose 'put > object'.
+A rectangular object appears under your mousepointer. Click somewhere +in the white area of the window, and type "sendVIMS" inside the object. +If you installed the sendVIMS external properly, you should read  +in the terminal:
+

+

sendVIMS: +version 0.1
+sendVIMS: (c) +2004 Niels Elburg & Tom Schouten
+sendVIMS: +connected to localhost:3490

+

+

That's it! you should now be able to right-click on the sendVIMS +object, and choose 'help' from the popup window.
+You are now properly set up to use sendVIMS and veejay. Please refer to +some of the examples I provide under 'examples' for more information. +You should note that my examples will work right away, even without +understanding PD in the first place, but they are not intended as a +tutorial on how to use PD. you should see the 'help' menu and various +resources around the web for that!.
+

+


+

+

4. Troubleshooting

+

+4.1 Veejay doesn't start!
+

+

You need to start veejay from a terminal, using a proper encoded avi +file. you can use the demo +file if you don't have one.
+Please refer to veejay documentation and maillinglist.
+

+

4.2 SendVIMS doesn't work, PD tells +me it can't create sendvims.
+

+

The sendVIMS-0.1 external is not installed. please install the +external and restart PD.
+

+

4.3 I have a different problem, +please help me.
+

+

If the problem is relevant to this document please mail me and I'll add it here. Try the +PD and veejay maillinglist otherwise.
+

+

5. Further Information

+

5.1 HOWTO's and documentation
+

+

The veejay howto can be found here: http://veejay.sourceforge.net/veejay-HOWTO.html
+PureData documentation is here:   http://www.puredata.org
+

+

I have have been working on some more patches besides the ones in +the examples, they're on my personal homepage:
+http://cola.looze.net/sendvims/

+


+5.2 Email, Mailinglists

+

Please post your questions to the veejay mailinglist, you can +subscribe here.
+
+

+

6. Examples

+

6.1 Basic Example: play, play +backwards.
+

+

In PD, you send a message by creating a message object, type the +message into that object, and connect the output of the message to the +sendVIMS object.
+

+

Screenhost of example patch
+

+

In this example, I used PD aliasses: video.play.forward, and +video.play.backward. Normally, most VIMS messages are represented as +numbers, preceded by a 'p', for example, p100 stands for 'select and +play sample' followed by an argument. In the following example, you can +select different clips to play in veejay by changing the number inside +the number box. ( you can make diferent clips in veejay when in 'plain +video' mode, by pressing keypad '/'. Use keypad play controls to select +different frame positions, use the [ and ] keys to mark in and +outpoints of clips, use the function keys to select samples with the +keyboard controls).
+

+

6.2 Set the playing clip with an argument.
+

+

Set the playing clip with an argument
+

+

The $1 takes the number from the number box, and together with the +p100 message it gives the command "select and play sample $1" to +veejay. Note, that since PD doesn't know how many clips we have here, +we can select non-existing clips. We can give negative numbers. veejay +will give an error message.
+

+

6.3 Getting status output from +veejay.
+

+

This example shows how to get information you need from veejay: for +example the current frame.
+

+

Example of getting status information
+

+

Now, there are two number boxes. When playing clips, the first +number box will display the current frame, but when playing in plain +video, the second box outputs the current frame. Veejay sends it's +status in one big string of numbers, seperated by spaces. all +information comes in at the same time. You can use the 'unpack' object +to split the information in smaller chunks. notice how many outputs it +has - there are lots of status messages to be read. I have made a patch +that helps me remember what goes where, and I include it as a subpatch +when working with sendVIMS. You can find it on my personal weppage: http://cola.looze.net/sendvims.
+

+

6.4 Controlling video effects.
+

+

Veejay has many video effects. you can find out what kind of effects +on veejay's homepage, in the gallery section. For this next example, +you need two different clips. Assuming that you are working with the +example movie, press Keypad-5 for pauze, and Keypad-1 to go to the +start of the movie. Mark the beginning of your first clip here. Now, we +gently scrub to frame 12 in the movie using Keypad-9 - it skips one +frame ahead at a time - and mark the end of the first clip, and, on the +same frame, the beginning of the second clip, and at the last frame of +the movie, the end of the second clip( HINT: you could use the +"video.set.frame <frame>" message here instead).
+You should have two samples now, which you can select with the F1 and +F2 keys. Lets start with selecting the first clip and have a look at +the example:
+

+

example of effect controls
+

+

The first message sets up the effect chain. Veejay can chain +multiple effects on top of eachother, like layers in an image editing +program. In this example, it sets effect 4 on current playing sample ( +the number zero in the VIMS messages that control effects always stands +for the current playing clip, as a convenience. you could also replace +the number with a variable, and read it from veejay's output to know +the current clip).
+Effect 4 is the "Normal Overlay" effect, it simply mixes two video like +a videomixer.
+

+

The second message controls the clip the overlay effect mixes with. +Put it to 2 to mix with our second clip.
+The third message is a PD message, that controls the boundaries of the +slider. Normally, sliders have value 0 to 127 by default. the overlay +effect has only one controll, opacity, and it is mesured in value 0 to +255, so I want the slider to have boundaries ranging 0 to 255.
+The slider is connected to the third message: control parameter 0 of +the effect on chain-entry 3 of the current playing clip.
+The order of these values is typical: first, tell which sample to +select. second, what effect chain entry, third, which control +parameter, and last, the value of that parameter.
+You can make a dump of the effects numbers and the VIMS messages by +running:
+

+

veejay +--dump-events -d > veejay-events.txt
+

+

The last message, "connect localhost 3490" actually (re)connects the +sendVIMS object to veejay if not already connected. You can use the +message "disconnect" and "quit", too, have a look at the sendVIMS +helpfile.
+

+

6.5 More advanced playback control: +scrubbing.
+

+

This example shows two things: One slider can be used to set a new +play position in a clip, the other shows the play position in the +current clip.
+Both sliders get their boundaries updated with the starting position of +the clip and the ending position. This only works in the 'clip' mode, +not when playing in plain video.
+

+

Example of controlling play position with a slider
+

+

From the status, the starting frame and the end frame of the current +playing clip are read, which sets the boundaries of both sliders. The +slider in the top of the patch controls message p089: set frame $1, the +slider in the bottom gets updated with the 'current frame of clip' +information.
+However, when switching from clip to plain video mode, this will no +longer work as the outputs get different status updates. Switching +between clips wil work perfectly however.
+

+

More advanced combinations are possible. PD offers a lot of +functionality, such as MIDI, joystick controls and controlling things +through sound. Some more examples of my work are on my personal +website.
+

+


+

+


+

+


+

+ + diff --git a/veejay-server/doc/HowtoVideoCodecs.txt b/veejay-server/doc/HowtoVideoCodecs.txt new file mode 100644 index 00000000..1d836945 --- /dev/null +++ b/veejay-server/doc/HowtoVideoCodecs.txt @@ -0,0 +1,83 @@ + +Video files ¶ + +A video file consists out of TWO seperate elements: + + * container + * codec + +The container holds the digitally encoded data and the codec is capable of decoding/encoding this digitally encoded data. + +Veejay supports the AVI and the Quicktime container , with the following codecs: + +Quicktime: + + * mpjeg,mjpa,jpeg,dmb1 + * dvsd, dv, dvcp, dvhd + +AVI + + * mjpeg, mjpa,jpeg,jfif,dmb1 + * dvsd, dv, dvcp, dvhd + * i420, i422, yv16, hfyu + +Raw DV + + * PAL / NTSC dvsd + +Veejay can only deal with video files that consists entirely out of whole images (only I-frames). The codecs below will only work if all frames are I-frames. Otherwise, veejay will abort with an error message. + +AVI / Quicktime: + + * xvid, mp4v,divx,dxsd,mp4s,m4s2 + * div3,mp43,mp42,mpg4 + * avc1,h264,x264,davc,svq1,svq3,avc1 + +Wich codec to use ¶ + +MotionJPEG ( mjpeg) is the veejay codec of choice for most applications, it gives you a good tradeof between compression, quality and compatibility. If you want speed, use AVI yv16 or i420 while recording to new samples. + +Tools that support MJPEG: + + * http://cvs.cinelerra.org/Cinelerra + * http://www.kinodv.org/Kino + * http://ronald.bitfreak.net/lvs/Linux video studio + * http://mjpeg.sourceforge.net/mjpegtools + * http://www.mplayerhq.huMplayer, and mencoder + * http://lives.sf.net Lives + +Wich resolutions to use ¶ + +Veejay can do: + + * high definition (use MLZO/YUV avi) + * pal: 720x576 (recommended to use MLZO/YUV avi) + * ntsc: 720x480 + * 1/4 pal: 360x288 (any) + * 1/4 ntsc: 360x240 (any) + +If you load multiple video files on the commandline, make sure that all files have the same resolution and audio properties. +How to convert ¶ + +Veejay can convert dv video to mjpeg for you, however, I prefer to use mplayer for this, wich has more flexibility. + +From "anything" mplayer can play to mjpeg, use: + + $ mencoder -ovc lavc -oac pcm -lavcopts vcodec=mjpeg -o + +To scale on the fly, use: + + $ mencoder -ovc lavc -oac pcm -lavcopts vcodec=mjpeg -vf scale=352:288 -o + +consult mplayer documentation about other options, such as cropping and filtering out blocks in video. + +a quick hint for bulk encoding a bunch of capture.dv files: + + $ for i in `ls *dv`;do mencoder -ovc lavc -oac pcm -lavcopts vcodec=mjpeg -o `echo $i | sed s/.dv/.avi/` $i; done; + +What is this dummy mode ¶ + +Dummy mode opens up a 'color stream' to start veejay without a video file. + +If you use a video file, veejay will take that file's properties as default settings for the whole session. + diff --git a/veejay-server/doc/INSTALL b/veejay-server/doc/INSTALL new file mode 100644 index 00000000..b42a17ac --- /dev/null +++ b/veejay-server/doc/INSTALL @@ -0,0 +1,182 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/veejay-server/doc/NET.txt b/veejay-server/doc/NET.txt new file mode 100644 index 00000000..aa929282 --- /dev/null +++ b/veejay-server/doc/NET.txt @@ -0,0 +1,105 @@ + +Veejay can stream over the Network +================================================= + +With -p you can give Veejay's port offset + +TCP socket for sending commands: + 0 (sayVIMS -h) +TCP socket for receiving status: + 1 (gveejay) +TCP socket for querying commands:+ 2 (gveejay - editlist/sampellist etc) +UDP multicast frame sender : + 3 (input stream multicast/other applications) +UDP multicast for sending commands: + 4 (sayVIMS -g) + + +How to activate: + +1. veejay movie1.avi +2. veejay movie2.avi -p 5000 + +(Both movie clips must have identical properties!!) + +veejay 2 makes a connection with veejay 1 + +3. sayVIMS "245:localhost 3490;" -p 5000 -h localhost + +4. move mouse to veejay2 video window and press 'ESC' + +if everything is OK, the video will be playing. + +5. stop veejay1 (CTRL-C) + +6. veejay2 will show last frame (press ESC) + +7. restart veejay1 + +8. press 'ESC' in veejay2 to resume streaming (auto-reconnect) + +Veejay can stream over the Network (UDP / Multicast ) +===================================================== + +How to activate: + +1. veejay -V 224.0.0.50 -p 5000 -v movie1.avi +2. veejay -d -W -H + +3. sayVIMS -h localhost -p 3490 "246:5000 224.0.0.50;" +4. press F7 to activate newest created stream + + +Veejay can receive OSC (Open Sound Control) messages over Multicast protocol +============================================================================ +How to activate: + +1. veejay --multicast 224.0.0.30 movie1.avi + +Note that you must have 'multicast' enabled in your kernel configuration. +Use the tool 'mcastOSC' in test/OSC to send OSC messages to all +veejay's you have started with --multicast (on multiple hosts!!) + +2. export MCAST_ADDR=224.0.0.30 +4. mcastOSC -r 3495 + + +Veejay can send/receive VIMS (Veejay Internal Message System) packets +over Multicast protocol +============================================================================= + +How to activate: + +1. veejay --multicast-vims 224.0.0.32 movie1.avi +2. veejay --multicast-vims 224.0.0.32 movie2.avi + +3. sayVIMS -g 224.0.0.32 -f test/vims/magicmirror-vims.txt + + +How to setup multicast? +======================= +1. enable 'multicast' in kernel configuration + +2. type 'route add -net 224.0.0.0 netmask 255.255.255.0 dev eth0' + (or something similar, read the man page of route to figure out + what addresses are reserved for multicast) + +What is multicast? +================== + +Multicasts enables you to (ab)use the network topology to transmit +packets to multiple hosts. + + +Limitations +=========== + +1. Veejay can only stream to another veejay +2. All veejays must have identical video properties (fps,width,height, ... ) +3. Veejay will drop frames when it cannot keep up (or when packets are dropped) +4. Audio is not supported + +What header format? +=================== + +see libvjnet/packet.h for multicast packet definition + +for peer-to-peer streaming, the first 11 bytes of the buffer indicate +width, height and format in plain ASCII: "%04d %04d %1d" + diff --git a/veejay-server/doc/README.performance b/veejay-server/doc/README.performance new file mode 100644 index 00000000..234cb133 --- /dev/null +++ b/veejay-server/doc/README.performance @@ -0,0 +1,22 @@ + + Veejay's performace depends much on the memory bandwith, CPU and disk access. + + For HDTV (1280x720) mjpeg, you need at least a 2.5 ghz. The faster the better. + + For full PAL/NTSC resolutions (720x576 resp. 720x480) DV/Mjpeg you need at least a 1.5 ghz, + for lower resolution (352x288) you can do fine with a 500-800 mhz PC. + + If you need to record without framedrop, you can do so by disabling audio and + disabling synchronization with the commandline options -a0 -c0 + + On newer PC's (pentium4) your best bet is working in RAW or MLZO (compressed) + YUV 4:2:0 / 4:2:2 On my pentium 4 , 3.0 ghz playing a AVI file that contains RAW YUV frames + uses about 3-4% for a full PAL movie and 10-12% for mixing 2 movies. + The tradeoff here is your diskspeed. You could use compression, this reduces the + size of the videofile anywhere between 0-30% . + + Typical for laptops is slow diskspeed access, on my 1.8 ghz dell latitude laptop + the best I get is an average of about 20.0 mb/sec which is barely sufficient + for playing full PAL avi's containing RAW YUV. + (you can test yours with hdparm -T -t /dev/hdX) + diff --git a/veejay-server/doc/README.quickstart b/veejay-server/doc/README.quickstart new file mode 100644 index 00000000..a55cdb13 --- /dev/null +++ b/veejay-server/doc/README.quickstart @@ -0,0 +1,110 @@ + +It is advised to read the howto and the MAN page as well. + +You can launch veejay with + +$ veejay -d + +This should show some moving black/white footage. Most of the effects will be boring on this footage, +so you can try to open your video4linux device with + +sayVIMS "240:0 1;" (device 0, channel 1) + +Or, to use mplayer, create a FIFO first: + +$ mkfifo stream.yuv + +Use something like 'mplayer -vo yuv4mpeg -x 352 -y 288 -vf scale -zoom' + +and open the stream in veejay's console: + +sayVIMS "243:stream.yuv;" + +Move your mouse pointer to the SDL window (so it dissapears) and press 'ESC' to +switch from the dummy footage to the last created or played video stream. + +Try loading an AVI file with something like: + +$ veejay -v mjpeg-video-file.avi + +The '-v' commandline option generates extra debugging output. + +By default, veejay uses a SDL window for displaying video. You can specify veejay to +write to STDOUT : + +$ veejay -O3 -o stdout mjpeg-video-file.avi | yuvplay + +In this mode, the console input and SDL keyboard functions are disabled. You must use +the sendVIMS commandline utility to interact with veejay or with an alternative utility like sendOSC. +Refer to the howto for more information. + + +Once you have loaded veejay (preferably with a videofile) + + (see man veejay for an overview of both console input and SDL keyboard events) + + press 'KP 1' , 'left bracket', 'KP 3', 'right bracket' , 'F1' + + This will create a virtual clip (in memory) from your entire video file. + + If you press 'KP divide' , veejay will return to plain video mode so you can create more clips. + If you press 'ESC' , veejay will switch from playing streams to playing clips or vice versa + + Press F1 to F12 to select a clip, + press 1 to 9 to select a bank (1 = clips 1 to 12, 2 = clips 12 to 24, etc ) + + Once you are playing a clip/stream, simply press + 'Cursor UP' , 'ENTER' + + If you add a video effect, try pressing '-' and '=' to select another channel and '/' to + toggle between clip/stream sources + + + Veejay supports chaining of effects since day 0, a number of keys have some importance + + '-' ,'=' and '/' + + 'END' for enabling/disabling the chain + 'KP -' for selecting the previous entry + 'KP +' for selecting the next entry + 'ALT+END' for enabling/disabling the current selected entry + 'ENTER' for adding an effect from the list to the chain + 'DEL' for removing an effect from the chain + + + Also, you can press 'HOME' to see clip or stream information. + + Try the keys 'A' to 'L' to increase/decrease playback speed. + + +Also, you can load some predefined custom effect chain templates that +will put a template on your effect chain when you press SHIFT + some alphabetic character + +First, load an action file + +$ veejay -l test/livecinema/action-file.xml + +Or in veejay's console + +> al test/livecinema/action-file.xml + +(activate a stream or clip and) press SHIFT+S or SHIFT+B or SHIFT+ ... + + +Except all that, try this: + + +sayVIMS -h localhost -p 3490 "241:63;" +(press F7) + +to open your dv1394 firewire device + +or +sayVIMS -h localhost -p 3490 "240:0 1;" +(press F7) + +to open your video4linux device /dev/video0, channel 1 + + + + Enjoy! diff --git a/veejay-server/doc/README.whatis b/veejay-server/doc/README.whatis new file mode 100644 index 00000000..9bc806ca --- /dev/null +++ b/veejay-server/doc/README.whatis @@ -0,0 +1,16 @@ +Veejay is a live performance tool featuring simple non-linear editing and mixing from multiple sources. You can load multiple video clips, cut and paste portions of video/audio and save it as an EditList. Also, you can record new clips from existing clips or (live) streams. With these clips you can change playback speed (slow motion/acceleration), change the looptype and set markers. + +With both clips and streams you can edit the effect chain and mix from multiple sources to one. Veejay has a 84+ effects, divided into two categories: Image and Video Effects, only with Video Effects you can select a channel to mix in. + +Veejay has many frame blending methods, some of these are: Additive,Substractive,Difference Negate, Relative Addition and Selective Replacement. Next to blending, you can key on Luma and Chroma seperatly or combined or simply use Transitions or other effects. + +Most edit and navigation commands are mapped to single key press commands, this allows you to control, depending on the playback mode, video navigation, the effect chain, effect parameters and clip properties at playback time. + +Also, you can record a new clip on the fly from a live feed or from the video clip you are playing. If requested, the recorded videofile will be added to the edit descision list and activated as a new video clip. This is particular usefull for time-looping,rebouncing and rough clip scratching/editing + +Veejay can be remotely controled through using OSC (Open Sound Control) or via its own internal message interface 'VIMS'. 'VIMS' allows you to create/load/save effect chain templates and to add customized events which can be triggered by a keypress or a remote message. + +Veejay supports streaming from multiple video sources to one, this can be a Video4Linux device , a vloopback device or a yuv4mpeg stream. You can chain several veejays with effectv and vice versa to create some amazing footage. + + +veejay is licensed as Free Software (GNU). diff --git a/veejay-server/doc/VIMS.txt b/veejay-server/doc/VIMS.txt new file mode 100644 index 00000000..e4abecc0 --- /dev/null +++ b/veejay-server/doc/VIMS.txt @@ -0,0 +1,318 @@ +1. VIMS is Veejay's IMS (Internal Message System) +================================================= + +All control data is distributed via VIMS. Each (atomical) message consists of an Action Identifier +and a list of zero or more Arguments which can be used to control Video Clips, Video Streams, +the Effect Chain and many other things. + +VIMS allows events to be triggered through: + +SDL Keyboard Event (libsdl) +OSC (OpenSoundControl) +IMP (Internal Message Protocol) + + +After intalling veejay, you will have a commandline utility 'sayVIMS' + +This document describes what messages you can send to veejay through using VIMS + +Inside of veejay's source package you will find a test/ directory containing various examples demonstrating +how to load an ActionFile, how to use Perl for batch like video processing and how to attach message bundles to +keyboard events. + + +Use the command + +$ veejay -u -n |less + +to see documentation generated by veejay on using Effects, VIMS and OSC. +If there is an error in the documentation, you have found a bug in veejay +and should report it :) + +1.1 Message Format +================== + +A message is described as: + + : ; + +Example: + + 080:; + 099:0 0; + + + +The action identifier is a 3 digit number describing a Network Event +The colon is used to indicate the start of the Argument List and must be given. + + + +The Argument List is described by a printf() style formatted template +which describes the number and type of arguments to be used. + +The semicolon must be given to indicate the end of this message + + + +1.2 Bundled Messages +==================== + +A message bundle is a special message that contains an ordered list of at least 1 or more messages. Each message is executed from left to right (first in, first out) while parsing the bundle. + + +Example: + + 5032|BUN:002{361:0 3 56 230 93 0;361:0 4 1 7;}| + 5033|BUN:003{361:0 3 56 230 93 0;361:0 4 1 7;361:0 5 1 7;}| + 5034|BUN:003{361:0 3 56 230 93 0;361:0 4 1 7;361:0 5 1 8;}| + + +A message bundle is described as: + + BUN: { + : ; + : ; + ... + } + ; + + +The token 'BUN:' indicates the start of a messaage bundle, the first 3 digit numeric value represents the total number of messages in the bundle. The '{' symbol indicates the start of a message block and is ended with '};' or just '}'. + + +1.3 Format of an Action File/Attaching Keys to Bundles +====================================================== + + <501 - 599> | | + +The contents of some action file can be : + + 516|BUN:001{355:;}| + + + +The message bundle BUN sends '355' for clear effect chain. +This message bundle is attached to action identifier 516. + +A key is attached to this function trough using the GUI (GVeejay) +or by using: + + +DYNAMIC KEYMAPPING: +================== + + "083:516 ;" + + +The message bundle can be attached to a key , for example 'SHIFT + A' by sending + + 083:516 97 3; + +Which attaches bundle '516' to SDL key '97' using a modifier '3', which is SHIFT. + +Modifiers: 0 = none, 1 = alt , 2 = ctrl, 3 = shift +Keys : see SDLkeysym.h somewhere in include/SDL/ + +If the number 0 is used for an event number, a given key combination can be +unset (wiped) : + + 083:0 97 3; + +Alternativly, you can bind keys to any action identifier. The complete +list can be viewd by typing veejay -u |less or with Gveejay. + + 083:20 97 0 4; + +The example above sets key 'a' to 'change video speed to 4' + + + +General description of VIMS messages +===================================== + + +Some reserved numbers: + + clip id 0 : select currently playing clip + clip id -1 : select highest clip number + chain entry -1 : select current chain entry + stream id 0 : select currently playing stream + stream id -1 : select highest stream number + key modifier : 0 = normal, 1= alt , 2 = ctrl, 3 = shift + frame -1 : use highest possible frame number (usually num video frames) + playback mode : 0 = clip, 1 = stream, 2 = plain + data format : yv16 (yuv 4:2:2 raw) , mpeg4, divx, msmpeg4v3, + div3, dvvideo, dvsd, mjpeg, i420 and yv12 (yuv 4:2:0 raw) + loop type : 0 = no looping, 1 = normal loop, 2 = pingpong (bounce) loop + + +What follows now is a general description of argument formatting and its ordering. +In the future, veejay -u will describe all VIMS arguments as well. +I wont put it into this document, since auto documentation will work much better +(eliminating the need to update this documentation when things change). + + all EditList commands, the arguments represent frame numbers (from 0 - max frames) + +For example; + 021:10 100; will copy frames 10-100 into a temporary buffer + 020:100; will insert the frames 10-100 from the temporary buffer on frame 100 + + +For all Clip commands, the first argument always represent the clip number except for 099 +(create new clip) which takes 2 arguments ; starting and ending positions. +The arguments that may follow usually represent a number to describe either a property setting +(like speed, slow motion or looptype) and in other cases relative or real frame numbers. + +Idem for Streams. + +In general, for Chain commands the first argument is also the clip or stream number. +The second (or following arguments) usually represent the property setting or some value. + +For example; 178 (fade in) takes 2 arguments. The first is to identify the clip number, +the second describes the duration (in frames) for the fade in. + +181 (set effect with defaults) takes 3 arguments. Again, the first is to identify a clip or +stream, the second for the chain entry and the last for the effect number. +Idem for 182, but here starting from the 4th argument it takes preset values + + + + +2. OSC - Open Sound Control +============================ + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl + +(quote from the website) + +OpenSound Control ("OSC") is a protocol for communication among computers, sound synthesizers +and other multimedia devices that is optimized for modern networking technology. + +Veejay starts up an OSC server that listens on port number VJ_PORT + 2 (usually 3492). +In the veejay/libOMC/send+dump you can compile a test application that sends OSC strings to veejay. +Bundled messages are handled automatically by libOMC + + +Type veejay -u |less to see an overview of all actions, it includes OSC. The OSC messages +are mapped onto its respective VIMS Action Identifiers. + + +EXAMPLES: + + To create a new clip and play it: + + /clip/new 100 200 + /clip/select 0 + + To record from a clip and auto play the recording after 10 seconds of PAL video: + + /clip/record/start 250 1 + + To add Effect 45 to the clip's Effect Chain + + /clip/chain/entry/add 45 + + To fade in the Effect Chain in 4 seconds + + /clip/chain/fade_in 100 + + To add Effect 45 on Entry 4 of clip 2's Effect Chain + + /clip/chain/add 2 4 45 + + To play newest clip + + /clip/select + + To record from a clip and auto play the new clip after recording + + /clip/record 100 1 + + + +currently, OSC support in veejay is meant for triggering only. +Some users have showed genuine interest in building user interfaces for Veejay using +this protocol. However, for such thing bi-directional communication is required +(i.e. current frame number, current playing clip, total number of clips, etc etc) + +In veejay, VIMS provides a status port that can be read which will provide all kind +of status information but it is not mapped to OSC yet. + +Also, in the veejay source package you will find a utility 'mcastOSC' +(which is not installed by default) + +Build instructions (from veejay top source directory) + +$ cd test/OSC +$ cd libOSC +$ make +$ cd .. +$ cd send+dump +$ make + +Start veejay with -M or --multicast-osc , and use mcastOSC to control +all instances of veejay listening on the given multicast address. +(One tool to rule all). + + +SAVING/RESTORING Veejay states +=============================== +Example configuration file (with most options) + + + + 3490 + + 352 + 288 + + + + 1 + + 2 + + 3 + + 0 + 0 + + 1 + + 0 + + 1 + + 352 + 288 + + 0.000000 + 0 + 0 + 0 + + 0 + + 0 + + + + + + +Initially, you can setup veejay on the commandline and tell it to save +its settings in a configuration file. + + veejay -z 1 -W 720 -H 576 /tmp/videofile.avi -p 5000 + +(in another terminal) + + sayVIMS -h localhost -p 5000 "084:/tmp/config.tmp 1;" + +In this file, not only the configuration is stored : +Bundled VIMS events, valid VIMS identifiers and Keymappings are +stored here. + + diff --git a/veejay-server/doc/YCbCr.txt b/veejay-server/doc/YCbCr.txt new file mode 100644 index 00000000..23c79a51 --- /dev/null +++ b/veejay-server/doc/YCbCr.txt @@ -0,0 +1,23 @@ +Veejay processing +================= + + Veejay processes nativly in YUV, this is to keep colorspace conversions + to a minimum. + + YUV 4:2:0 Planar ( 1 Cr and 1 Cb sample per 2x2 Y samples) + YUV 4:2:2 Planar ( 1 Cr and 1 Cr sample per 1x2 Y samples) + (both full range JPEG and clipped to 16-235 / 16-240) + + Places where veejay uses software conversion: + Conversion from RGB to YUV is for webcam devices. + Conversion from YUV to RGB is for preview image + Some FX convert the frame to RGB + +Why YUV ? +========= + + - Many video codecs decode into some YUV flavour + - Many capture devices deliver YUV + - Software conversion of RGB <-> YUV is expensive + - Consumes less bandwith then RGB + diff --git a/veejay-server/doc/veejay-HOWTO.html b/veejay-server/doc/veejay-HOWTO.html new file mode 100644 index 00000000..9f6420a1 --- /dev/null +++ b/veejay-server/doc/veejay-HOWTO.html @@ -0,0 +1,1439 @@ + + + + +veejay HOWTO (work in progress) + + +
+

Veejay HOWTO

+Matthijs van Henten ( cola@cb3rob.net )
+Niels Elburg ( nielselburg@yahoo.de )
+v1.0, 30 March 2003
+v1.1, 22 June 2003
+v1.2, 26 August 2003
+v1.3, 9 November 2003
+v1.4, 24 May 2004
+v2.0, 25 July 2004
+v2.1 27 January 2005
+v2.2 22 April 2005
+v3.0 8 March 2008
+
+This document describes how to use veejay, a visual 'music' instrument for Linux/GNU +

+ +
1.Introduction
+
1.1 Disclaimer
+
1.2 Acknowledgements
+
1.3 Audience and Intent
+
1.4 Revision History
+
1.5 New versions of this document
+
1.6 Feedback
+
1.7 Distribution Policy
+ +
2. About veejay
+
2.1 Features
+
2.2Hardware configuration
+
+ +
3. Installation
+
3.1 Dependencies
+
3.2 Installing veejay
+
3.3 Setting up multicast
+ +
4. Using Veejay
+
4.1 Terminology and limitations
+
4.2 VIMS
+
4.3 The keyboard interface
+
4.4 Recording video
+
4.5 Streaming video
+
4.6 Other utilities
+ +
5Popular packages
+
5.1EffecTV
+
5.2mplayer
+
5.3The MJPEG Tools
+
5.4Transcode
+
+
+ + + +
6.Other Resources
+
6.1Web Sites
+
6.2 Mailing Lists
+ +
7.Credits

+
8.GNU Free Documentation License
+


+ + +

1. Introduction

+

+ +

1.1 Disclaimer

+No liability for the contents of this documents can be accepted. Use the concepts, examples and other +content at your own risk. As this is a new edition of this document, there may be errors and inaccuracies, that may of course be damaging to your system. Proceed with caution, and although this is highly unlikely, the authors do not take any responsibility for that. +
+All copyrights are held by their respective owners, unless specifically noted otherwise. Use of a term in +this document should not be regarded as affecting the validity of any trademark or service mark. +
+Naming of particular products or brands should not be seen as endorsements. +
+You are strongly recommended to take a backup of your system before major installation and backups at regular intervals. +

+ +

1.2 Acknowledgements

+The following peope have been helpful in getting this HOWTO done: +

+ +

+ +

1.3 Audience and Intent

+This document is targeted at the Linux user interested in learning a bit about veejay and trying it out. +

+ +

1.4 Revision History

+Version 1.0 +

First version for public release
+Version 1.1 +
Updated Howto to match version 0.4.0. Revised chapters 2.2,4.4, 5.3 and 6
+Version 1.2 +
Updated Howto to match version 0.4.6. Revised chapter 2.1,2.2,3.3
+Version 1.3 +
Updated Howto to match version 0.5.3.
+Version 1.4 +
Updated Howto to match version 0.5.9
+Version 2.0 +
Partial re-write to match version 0.6
+Version 2.1 +
Updated Howto to match version 0.7.2
+Version 2.2 +
Updated Howto to match version 0.8
+Version 3.0 +
Large rewrite to match version 1.1
+

+ +

1.5 New versions of this document

+

+You will find the most recent version of this document at veejay.sourceforge.net/veejay-HOWTO.html.
+If you make a translation of this document into another langauge, let us know and we'll include a reference to it here. +

+ +

1.6 Feedback

+We rely on you, the reader, to make this HOWTO usefull. If you have any suggestions, corrections , or comments , please +send them to us ( veejay-users@lists.sourceforge.net ), and we will try to incorporate +them in the next revision. Please add 'HOWTO veejay' to the Subject-line of the mail. +
+Before sending bug reports or questions, please read all of the information in this HOWTO, and send detailed information about the problem. +
+If you publish this document on a CD-ROM or in hardcopy form, a complimentary copy would be appreciated. Mail us for our postal address. +Also consider making a donation to the Veejay Project to help support free video editing software in the future. + +

+ +

1.7 Distribution Policy

+Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, +Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, +with no Front-Cover Texts , and with no Back-Cover Texts. A copy of this license is included in the section entitled "GNU Free Documentation License". + +

+ + + +

2. About Veejay

+Veejay is a visual instrument and realtime video sampler. +It allows you to 'play' the video like you would play a Piano +and it allows you to record the resulting video directly to disk for +immediate playback (video sampling).
+
+Veejay consists out of several packages:
+

    +
  • veejay-server +
  • veejay-client +
  • veejay-tools +
  • veejay-themes +
+ + + + + + + + + + + + + + + + + +
+ veejay-server + + This is veejay +
+ veejay-client + + This is reloaded, the graphical user interface to veejay +
+ veejay-tools + + Commandline utilities to interface with veejay +
+ veejay-themes + + Themepack for reloaded +
+

+ +

2.1 Features

+ +

General

+
    +
  • Free Software (GNU GPL) +
  • Servent architecture +
  • Soft realtime +
  • Frame accurate +
  • Loop based editing +
  • Native YUV processing +
  • Crash recovery +
+ +

Media

+
    +
  • Codecs: MJPEG,MPNG, DV, YUV (raw) +
  • Containers: AVI , Quicktime, rawDV +
  • Devices: USB webcams, DV1394, TV capture cards, etc. +
  • Support for unlimited capture devices +
  • Support for Image files (PNG ,JPEG,TIFF,etc) +
+ +

FX processing

+
    +
  • 132 built-in FX , many unique and original FX filters +
  • FX chain (20 slots) +
  • All FX parameters can be animated. +
  • Mix up to two layers per FX slot +
+ +

Editing

+
    +
  • Non destructive edit decision lists (cut/copy/paste/crop video) +
  • Simple text editor +
  • Sample editor +
  • Sequence editor +
  • Live disk recorder (sampling) +
  • Full deck save/restore +
  • Live clip loading +
  • Live sample sequencing +
  • VIMS event recording/playback (6) +
  • Various looping modes including bounce looping +
  • Playback speed and direction +
  • Video scratching +
  • Change in-and out points of a sample (marker) +
  • Slow motion audio / video (7) +
  • Fast motion audio / video +
  • Dynamic framerate +
  • Random frame play +
  • Random sample play +
  • Access up to 4096 video samples instantly +
  • Full screen or windowed mode +
  • Perspective and foward projection +
+ +

Output

+
    +
  • Audio trough Jack (low latency audio server) (8) +
  • SDL and OpenGL video +
  • Headless +
  • YUV4MPEG streaming +
  • Network streaming (unicast and multicast) +
  • Preview rendering +
+ +

Input

+
    +
  • Programmable keyboard interface +
  • VIMS (tcp/ip) +
  • OSC (udp) +
  • PureData trough sendVIMS external +
  • Full screen or windowed mode +
+ +

Plugin systems

+
    +
  • Support for FreeFrame plugins +
  • Support for Frei0r plugins +
+ +

+ +

2.2 Hardware configuration

+ +Veejay requires at least a linux kernel 2.4.x, 2.6.x or later, a lot of diskspace and a fast CPU. +Depending on the speed of your machine, your milage may vary. See the list below for +a few systems veejay was reported to work on:
+

    +
  • An Intel Pentium 4 3.0 Ghz HT/512 MB DDR RAM with a ATI Radeon 9600 XT +
  • A dual celeron 400 Mhz/512 MB RAM with a voodoo3 and second pci card. +
  • An Athlon 750 Mhz with voodoo3 and second pci card. +
  • An Athlon 750 Mhz with Matrox G400 Dualhead(TVout using X11/SDL or DirectFB) +
  • An Athlon 850 Mhz and Matrox G550 Dualhead( TVout support through DirectFB) +
  • An Athlon XP 1600 Mhz and Matrox G550 Dualhead( TVout support through DirectFB) +
  • A Pentium 4 2.2 Ghz and Matrox G550 Dualhead( TVout support through DirectFB) +
  • A Pentium 4 3.0 Ghz and ATI Radeon 9600 XT/ (no TVout yet) +
  • Sony Playstation 2 (MIPS, little endian) (but runs very slow +/- 20 fps) +

+Video Editing requires a lot of diskspace, make sure you you have enough diskspace available for +your project. If you are going to use the recording functions, make sure you have sufficient free disk space available.Otherwise you are quite safe, veejay does not change your original video or fill your harddisk with needless temporary files. Neither does it waste your resources (unless you fill the effect chain with a lot of effects)
+

+ +

3. Installation

+

+ +

3.1 Dependencies

+Before you install Veejay, you should install the following software packages. +Although none of them is required, Veejay will be much less usable without them.
+

    +
  • (required) mjpegtools >= 1.9.0 +
  • (required) The XML C library 2 for gnome >= 2.5.4 +
  • (required) libunicap >= 0.2.0 +
  • (required) ffmpeg (libavcodec, etc) >= 0.50.0 +
  • (optional) libdv >= 1.02 +
  • (optional) The SDL library >= 1.2.3 +
  • (optional) JACK low latency audio server >= 0.98.1 +
  • (optional) DirectFB >= 0.9.17 +
  • (optional) FreeType >= 2.1.9 +
  • (optional) GTK >= 2.6.0 +
+
+On newer distributions, some of the listed software is already installed but you may be missing the -devel- packages! (especially on redhat, suse and debdian systems!!)

+You can find the websites of these projects in Other Resources.

+

+

3.1.0 From source

+You can compile the following packages from source if your distribution does not include them:
+

    +
  • libavcodec, libavutil, libswscale and libavformat from the FFmpeg project +
  • mjpegtools +
  • unicap +
  • gtkcairo +
+
+

FFmpeg

+

+You can download the ffmpeg sources from the SVN repository via http://ffmpeg.sourecforge.net" +After downloading and unpacking the source tarball, run the configure script with the following options:
+

+$ ./configure --enable-swscaler --enable-shared --enable-gpl
+...
+$ make
+# make install
+
+

+

+

MjpegTools, Unicap

+You can download the MjpegTools from http://mjpeg.sourceforge.net
+and the Unicap Imaging library from http://unicap.sourceforge.net
+
+Compilation of both packages is straightforward , in general the following will do it:
+
+$ ./configure && make
+# make install
+
+

+

GtkCairo

+

+ GtkCairo is available from the veejay repository. +

+
+

+

3.2 Installing veejay

+Verify that the PKG_CONFIG_PATH variable is set to the directory containing files like jack.pc and directfb.pc to include them in the build process. If it is not set , the configure script will abort with an error message. +

+$ echo $PKG_CONFIG_PATH   
+
+If nothing is set, do something like +
+$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
+
+Decompress and untar the file by typing: +
+$ tar -jxvf veejay-1.1.x.tar.bz2
+
+Change to the directory containing veejay's source's: +
+$ cd veejay-1.1.x
+
+$ ./configure
+
+On completion it will summarize the results of the ./configure script, which could look like this: +
+configure:  Veejay 1.1 build configuration :
+configure: 
+configure:  Compiler flags: -march=pentium4 -mtune=pentium4  -msse -mfpmath=sse 
+configure:                  -fif-conversion
+configure:                      -O3
+configure: 
+configure:  Architecture: i686 
+configure: 
+configure:    x86  
+configure:     MMX     enabled     : yes
+configure:     MMX2    enabled     : yes
+configure:     SSE     enabled     : yes
+configure:     SSE2    enabled     : yes
+configure:     3DNOW   enabled     : no
+configure:     CMOV    enabled     : yes
+configure: 
+configure:    Platform: Linux
+configure: 
+configure:  Required dependencies:
+configure:   - POSIX Threads (pthread)       : true
+configure:   - MJPEGTools                        : true
+configure:   - AVI MJPEG playback/recording  : true (always)
+configure:   - FFmpeg AVFormat               : true 
+configure:   - FFmpeg AVCodec                : true 
+configure:   - FFmpeg Swscaler           : true 
+configure:  Optional dependencies
+configure:   - SDL support                   : true
+configure:   - DirectFB support              : false
+configure:   - OpenGL support                : false
+configure:   - libDV (digital video) support : false 
+configure:   - QuickTime support             : false 
+configure:   - Unicap Imaging                : true 
+configure:   - video4linux                   : true
+configure:   - JPEG support                  : true 
+configure:   - GDK Pixbuf support            : true
+configure:   - Jack Audio Connection Kit     : false
+configure:   - XML c library for Gnome       : true
+configure:   - Freetype support              : true
+
+Now, you can start building veejay +
+$ make
+
+Followed by +
+# make install
+
+

+ +

3.3 Setting up multicast

+ +Multicast is a technology that reduces network traffic by +simultaneously delivering a single stream of information +to any interested recipient. +

+To enable multicast in Veejay, you must have enabled IP multicast +in your kernel configuration. +

+Finally you need to add a multicast route : +

+for 1 ethernet device:
+# route add -net 224.0.0.0 netmask 255.255.255.0 dev eth0
+
+for > 1 
+# route add -net 224.0.0.0 netmask 255.255.255.0 gw 192.168.100.1 dev eth1
+
+
+Next, Veejay can be started with the commandline flags +-M/--multicast-osc and/or -V/--multicast-vims +
+ +

+ +

4. Using Veejay

+Veejay uses by default a SDL window to play the video. +All the keybinding in veejay depend on SDL; if you move your mouse over to the +SDL windows to focus it , you can press the keys explained in 4.3 The keyboard interface.
+To use veejay in commandline style interface mode, see +4.2 sayVIMS.
+You must no longer provide a video file to use with veejay; it will run in dummy mode by +using the '-d' commandline parameter:
+

+$ veejay -d
+
+
+To use the graphical client with veejay: +
+$ reloaded -h localhost
+
+
+

+

4.1 Terminology and limitations

+Veejay has a number of playback modes, each playback mode is unique and defines more or less +a different functionality:

+Also, note that veejay runs in only 1 resolution at a time (depending on the video dimensions of +the first loaded movie). All movies loaded must have identical properties, otherwise veejay will not start. +This limitation is also valid when streaming video from veejay to another veejay.
+ +

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

Playback modes in veejay

ModeDescriptionNavigationLoopingSpeedEffect Chain
PlainDefault mode, playback of videoYesNoYesNo
SampleSample mode, playback of video samples.YesYesYesYes
TagTag mode, playback of video streamsNoNoNoYes
+ +

+ +

4.2 VIMS

+

+
+Use the command 
+$ veejay -u -n |less
+
+to dump all VIMS messages.
+
+1.1 Message Format
+==================
+
+A message is described as:
+
+	  :  ; 
+
+Example:
+
+	080:;
+	099:0 0;
+
+
+
+The action identifier is a 3 digit number describing a Network Event  
+The colon is used to indicate the start of the Argument List and must be given. 
+
+
+
+The Argument List is described by a printf() style formatted template 
+which describes the number and type of arguments to be used. 
+
+The semicolon must be given to indicate the end of this message
+
+1.2 Bundled Messages
+====================
+
+A message bundle is a special message that contains an ordered list of at least 1 or more messages. Each message is executed from left to right (first in, first out) while parsing the bundle.   
+
+
+Example:
+
+	5032|BUN:002{361:0 3 56 230 93 0;361:0 4 1 7;}|
+	5033|BUN:003{361:0 3 56 230 93 0;361:0 4 1 7;361:0 5 1 7;}|
+	5034|BUN:003{361:0 3 56 230 93 0;361:0 4 1 7;361:0 5 1 8;}|
+
+
+A message bundle is described as:
+
+	 BUN:  { 
+		 :  ;
+		 :  ;
+		... 
+		}
+		;
+
+
+The token 'BUN:' indicates the start of a messaage bundle, the first 3 digit numeric value represents the total number of messages in the bundle. The '{' symbol indicates the start of a message block and is ended with '};' or just '}'. 
+
+
+1.3 Format of an Action File/Attaching Keys to Bundles
+======================================================
+
+	<501 - 599> |  |
+
+The contents of some action file can be :
+
+	516|BUN:001{355:;}|
+
+
+
+The message bundle BUN sends '355' for clear effect chain.
+This message bundle is attached to action identifier 516.
+
+A key is attached to this function trough using the GUI (GVeejay)
+or by using: 
+
+
+DYNAMIC KEYMAPPING:
+==================
+
+	"083:516   ;"
+
+
+The message bundle can be attached to a key , for example 'SHIFT + A' by sending 
+	
+	083:516 97 3;
+
+Which attaches bundle '516' to SDL key '97' using a modifier '3', which is SHIFT. 
+
+Modifiers: 0 = none, 1 = alt , 2 = ctrl,  3 = shift
+Keys     : see SDLkeysym.h somewhere in include/SDL/
+
+If the number 0 is used for an event number, a given key combination can be
+unset (wiped) :
+
+	083:0 97 3;
+
+Alternativly, you can bind keys to any action identifier. The complete
+list can be viewd by typing veejay -u |less or with Gveejay. 
+
+	083:20 97 0 4;
+
+The example above sets key 'a' to 'change video speed to 4'
+
+
+
+General  description of VIMS messages
+=====================================  
+
+
+Some reserved numbers:
+
+	clip id		0	:	select currently playing clip	
+	clip id		-1	:	select highest clip number 
+        chain entry	-1      :   	select current chain entry 
+	stream id 	0	:	select currently playing stream 
+	stream id 	-1	:	select highest stream number
+	key modifier	        :	0 = normal, 1= alt , 2 = ctrl, 3 = shift
+	frame		-1	:	use highest possible frame number (usually num video frames)
+	playback mode   	:	0 = clip, 1 = stream, 2 = plain
+	data format     	: 	yv16 (yuv 4:2:2 raw) , mpeg4, divx, msmpeg4v3,
+					div3, dvvideo, dvsd, mjpeg, i420 and yv12 (yuv 4:2:0 raw)
+	loop type		:  	0 = no looping, 1 = normal loop, 2 = pingpong (bounce) loop
+
+

+

sayVIMS

+

+sayVIMS is a commandline utility distributed with the veejay package, +it allows you to give short commands in interactive mode

+$ sayVIMS -i -h localhost -p 3490

+Typing '?' followed by pressing ENTER gives the list of command below: +
+  vi [file]           Open video4linux device 
+  fi [file]           Open Y4M stream for input 
+  fo [file]           Open Y4M stream for output 
+  av [file]           Open (almost any) video file using FFmpeg 
+  mc [address] [port] Open a multicast UDP video stream 
+  pr [hostname][port] Open a unicast TCP video stream
+  cl [file]           Load cliplist from file 
+  cn [n1] [n2]        New clip from frames n1 to n2 
+  cd [n]              Delete clip n1 
+  sd [n]              Delete Stream n1 
+  cs [file]           Save cliplist to file 
+  es [file]           Save editlist to file 
+  ec [n1] [n2]        Cut frames n1 - n2 to buffer 
+  ed [n1] [n2]        Del franes n1 - n2  
+  ep [n]              Paste from buffer at frame n1 
+  ex [n1] [n2]        Copy frames n1 - n2 to buffer 
+  er [n1] [n2]        Crop frames n1 - n2 
+  al [file]           Action file Load 
+  as [file]           Action file save 
+  de                  Toggle debug level (default off) 
+  be                  Toggle bezerk mode (default on) 
+
+Also, you can send messages in VIMS format (or files, containing VIMS messages )

+For example, add the Pixelate effect on the Effect Chain of the current playing stream or clip: +
+sayVIMS -h localhost -p 3490 "361:0 0 150 3;"
+
+
+Last but not least, sayVIMS can parse files containing VIMS messages.
+See the test/examples directory of the package for a list of perl +scripts that output a VIMS script.
+
+sayVIMS -f advocate.vims -h localhost -p 3490
+
+
+Alternativly, you can start a secundary veejay and stream from peer to peer in uncompressed video: +
+
+$ veejay -d -p 5000
+
+$ sayVIMS -h localhost -p 5000 "245:localhost 3490;"
+
+(press 'F7' in veejay to display the stream, prob. stream 7)
+
+Or for multicast: +
+$ veejay -V 224.0.0.50 -p 5000 -n -L movie1.avi
+
+$ veejay -d 
+
+$ sayVIMS -h localhost -p 3490 "246:224.0.0.50 5000;"
+
+$ veejay -d -p 4000
+
+$ sayVIMS -h localhost -p 4000 "246:224.0.0.50 5000;"
+
+
+ +Or, if you want to play a XVID movie (or any other compressed format that is not I frame only): +
+$ sayVIMS -h localhost -p 3490 "244:/tmp/my-XVID-movie.avi;"
+
+ +

4.3 The keyboard interface

+Here is a quick overview for the most used default keys, if applied in order you will end up +with a newly created video sample looping in some way (depending on how many times you press the asterix key)
+

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

Some keyboard bindings

DescriptionSDL key In plain english
Set the starting position of a new sampleSDLK_LEFTBRACKETLeft bracket
Set ending position and create a new sampleSDLK_RIGHTBRACKETRight bracket
Select and play sample 1SDLK_F1F1
Set playback speed to 3SDLK_dd
Change looptypeSDLK_KP_MULTIPLYasterix on numeric keypad
Play backwardSDLK_KP_4Cursor left on numeric keypad
Play forwardSDLK_KP_6Cursor right on numeric keypad
Skip 1 secondSDLK_KP_8Cursor up on numeric keypad
Switch playmode to PlainSDLK_KP_DIVIDEDivide on numeric keypad
Print information about sampleSDLK_HOMEHome
+

+The function keys F1...F12 can be used to select sample 1 ... 12, +use the keys 1...9 to select a sample range 1-12 ... 108-120 and press +one of the F-keys to play that sample.
+
+Use ESC to switch between samples and streams. +Press ESC again to switch back to the sample playmode
+You can create new input streams by using the console interface or by using GVeejay.
+All new input streams (and samples) are auto numbered.
+

+

+ +

4.4 Recording video

+You can record video to a new clip , by using the stream- or clip recorder functions.
+For example, to record a new clip from a playing clip in MJPG format:
+

+302:mjpg;
+
+Record 100 frames and start playing new clip when ready: +
+130:100 1;
+
+Record the whole clip and dont start playing new clip when ready: +
+130:0 0;
+
+If your Effect Chain is very CPU demanding , consider disabling audio and using the commandline parameter -c 0 to +disable sync correction.
+
+It is possible to start veejay headless and have it write all video data to +a (special) file for further processing.

+Refer to chapter 5.3 for some examples.

+ +

4.5 Streaming video

+You can create an input stream to read video coming from a video4linux device, from a pipe +or from a network socket (both unicast and multicast).
+

4.5.1 video4linux

+To open a video4linux device use gveejay or type the command:
+
+
+$ sayVIMS 240:0 1;
+
+The selector '240' tells veejay to open a video4linux device, the first argument '0' indicates +the device number (i.e. /dev/video0) and the last argument '1' indicates the video in port +of your capture card (in this case composite).
+Veejay will create a new stream see chapter 4.4 for activating the stream.
+

+

4.5.2 pipe

+Veejay supports reading video data from a pipe (FIFO) by means of an input stream.
+The only supported transport format is yuv4mpeg (yuv 4:2:0). When playing YUV 4:2:2 +the video stream will be sampled to YUV 4:2:0 and vice versa
+You can create the input stream by typing the command +
+$ sayVIMS 243:/tmp/stream.yuv;
+
+

4.5.3 network

+To get frames from another running veejay, use the command: +
+
+$ sayVIMS 245: ;
+
+For example, sayVIMS 245:localhost 5000;
+
+If you want to send the same video to multiple running veejays accross the network, +you can save bandwith by starting the veejay you wish to use as server with the -V option. +
+You can use the -V option to start an optional multicast frame sender.
+First, you need a multicast route in your routing table. See chapter 3.3 for +a short introduction +or consult a howto that disuccess setting up multicast for your operating system. +
+
+ +
+$ veejay -V 224.0.0.50 -p 5000
+
+ +Start another veejay, and use this command: +
+
+$ sayVIMS "246:5000 224.0.0.50;" 
+
+To create a new input stream. Start more veejays and use sayVIMS with the -p option to give +it a port offset number.
+

+

4.6 Other utilities

+ +Currently there are 4 extra utilities yuv2rawdv , rawdv2yuv , sayVIMS and any2yuv included in the veejay package for encoding +a Y'CBCR 4:2:0 stream to raw DV and vice versa. +

+ +yuv2rawdv takes input from STDIN and outputs to STDOUT, we illustrate this with +a few examples.
+
+When loading yuv2raw dv without parameters you will see:
+

+This program reads a YUV4MPEG stream and puts RAW DV to stdout
+Usage:  yuv2rawdv [params]
+where possible params are:
+    -v num    Verbosity [0..2] (default 1)
+    -l num    Clamp Luma (default 0)
+    -c num    Clamp Chroma (default 0)
+
+ +If you use the clamp parameters, it will clip (not scale!) a pixel into a valid range, +the resulting video could be for example a bit darker if the input stream has values for +Luminance exceeding the maximum of 235.
+See the table below for all valid ranges. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Y'CBCR

ChannelRange (Clamp)Byte range (no clamping)
Y (Luminance)16 - 2350 - 255
Cb (Chroma Blue)16 - 2400 - 255
Cr (Chroma Red) 16 - 2400 - 255
+
+ +To convert a yuv4mpeg file to rawdv (the yuv4mpeg file needs to be compatible with the +digital video format properties)
+
$ cat yuv4mpeg-file.yuv | yuv2rawdv | playdv
+

+To convert a yuv4mpeg file to rawdv with luminance and chroma information clipped +to a valid range:
+
$ cat yuv4mpeg-file.yuv | yuv2rawdv -l 1 -c 1 | playdv
+
+ +

+rawdv2yuv takes input from STDIN and outputs to STDOUT, we illustrate this with +a few examples.
+ +
+This program reads a raw DV stream from stdin and puts YV12/I420 to stdout
+Usage:  rawdv2yuv [params]
+where possible params are:
+   -v num     Verbosity [0..2] (default 1)
+   -x         Swap Cb/Cr channels to produce IV12 (default is I420)
+   -n num     Norm to use: 0 = NTSC, 1 = PAL (default 1)
+   -q         DV quality to fastest (Monochrome)
+   -h         Output Half frame size
+   -c num     clip off  rows of frame (for use with -h)
+              must be a multiple of 8
+
+
+If you want to convert a full PAL/NTSC dv frame to half PAL YCbCr (I420 or YV12) you can +give the command: +
+
+$ cat raw.dv | rawdv2yuv -h | yuvplay
+
+You can use the -c parameter to clip the width of the video frame.
+
+$ cat raw.dv | rawdv2yuv -h -c 8 | yuvplay
+
+The resizer in rawdv2yuv uses a best neighbour interpolation algorithm for downsizing.
+ +

+any2yuv takes input from STDIN and puts YV12/I420 to stdout: +
+This program reads anything from stdin and puts YV12/I420 to stdout
+Usage:  any2yuv [params]
+where possible params are:
+   -v num     Verbosity [0..2] (default 1)
+   -x         Swap Cb/Cr channels to produce IV12 (default is I420)
+   -n num     Norm to use: 0 = NTSC, 1 = PAL (default 1)
+
+
+

+sayVIMS can be used to send commands or files to batch-process to veejay +
+Usage: sayVIMS [options] [messages]
+where options are:
+ -p             Veejay port (3490)
+ -h             Veejay host (localhost)
+ -g			    Veejay multicast address (224.0.0.50)
+ -f   Send contents of this file to veejay
+ -c             Colored output (geek feature)
+
+Messages to send to veejay must be wrapped in quotes
+You can send multiple messages by seperating them with a whitespace
+
+

+ +

+ +

5 Popular Packages

+Usefull software (in no apparant order): +

    +
  • The MJPEG Tools +
  • Transcode +
  • PureData (PD) +
  • PDP for PD +
+Please refer to Other Resources to find the project's website
+

+

5.1 The MJPEG Tools

+

The Mjpeg tools are a set of tools that can do recording of videos and playback, simple cut-and-paste +editing and the MPEG compression of audio and video under Linux. +You can use the EditLists from this package in veejay and vice versa
+ +Here are a few examples for processing video data:

+ +1. Start veejay headless: +

+$ mkfifo /tmp/special_file
+$ veejay /video/video.avi -O3 -o /tmp/special_file
+
+
+Encoding it to DV avi type 2 (if video dimensions match either full PAL or NTSC) +
+$ cat /tmp/special_file | yuv2rawdv -v 2 > rawdv
+
+
+Encoding it to MJPEG file 'video-mjpeg.avi' +
+$ cat /tmp/special_file | yuv2lav -v2 -f 0 -I 0 -q 90 -o video-mjpeg.avi
+
+Encoding veejay output to MJPEG file: +
+$ veejay movie1.avi -o stdout -O3 | yuv2lav -f 0 -I 0 -q 90 -o movie1-mjpeg.avi
+
+ +

+ +

5.2 Transcode

+

Transcode is a Linux video Stream Processing Tool, it can convert between different types of video formats
+
+Encode a file to mjpeg with no audio and rescale the output video to 352x288:

+

$ transcode -i input_file.avi -o new_mjpeg_file.avi -y mjpeg,null -Z352x288
+
+

+ + + + +

6. Other Resources

+Here you will find the websites of the packages veejay requires as well as packages +you can use in combination with veejay. +

6.1 Web Sites

+

Packages you need

+ +

+

+

Usefull software

+ +

+

6.2 Mailing Lists

+There is a mailing list for veejay which is hosted by Sourceforge. +The address is veejay-users@lists.sourceforge.net +

+

+

6.3 Veejay developer's lounge

+Veejay's developer lounge provides a ticket system for you , the user, to report +any problem or feature requests. The ticket system allows us to keep track of +problems.
+Also, the developer lounge hosts a subversion code repository where you can +find the 'on the bleeding edge' source codes of veejay.
+Many thanks to jaromil (author of FreeJ/Muse) and the Dyne Foundation for providing these tools
. +

+ +

7. Credits

+End of the Veejay HOWTO. (You can stop reading here.) +

+ +

8. GNU Free Documentation License

+ +

GNU Free Documentation License + +

Version 1.1, March 2000 + +

Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +

Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +

0. PREAMBLE + +

The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +

This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +

We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + +

1. APPLICABILITY AND DEFINITIONS + +

This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +

A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +

A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +

The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +

The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +

A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +

Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +

The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +

2. VERBATIM COPYING + +

You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +

You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + +

3. COPYING IN QUANTITY + +

If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +

If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +

If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +

It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + +

4. MODIFICATIONS + +

You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +

A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +

If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +

You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties-for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +

You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +

The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + +

5. COMBINING DOCUMENTS + +

You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +

The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +

In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + +

6. COLLECTIONS OF DOCUMENTS + +

You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +

You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + +

7. AGGREGATION WITH INDEPENDENT WORKS + +

A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +

If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + +

8. TRANSLATION + +

Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + +

9. TERMINATION + +

You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document 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. + +

10. FUTURE REVISIONS OF THIS LICENSE + +

The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation 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. See +http://www.gnu.org/copyleft/. + +

Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + +

ADDENDUM: How to use this License for your documents + +

To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +

    Copyright (c)  YEAR  YOUR NAME.
+    Permission is granted to copy, distribute and/or modify this document
+    under the terms of the GNU Free Documentation License, Version 1.1
+    or any later version published by the Free Software Foundation;
+    with the Invariant Sections being LIST THEIR TITLES, with the
+    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+    A copy of the license is included in the section entitled "GNU
+    Free Documentation License".
+
+ +

If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. + +

If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + + + +

+ + + diff --git a/veejay-server/install-sh b/veejay-server/install-sh new file mode 100755 index 00000000..4fbbae7b --- /dev/null +++ b/veejay-server/install-sh @@ -0,0 +1,507 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-10-14.15 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + shift + shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac +done + +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir + shift + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ + || { + echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + } || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/veejay-server/libOSC/AUTHORS b/veejay-server/libOSC/AUTHORS new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/veejay-server/libOSC/AUTHORS @@ -0,0 +1 @@ + diff --git a/veejay-server/libOSC/Makefile.am b/veejay-server/libOSC/Makefile.am new file mode 100644 index 00000000..1e4ea128 --- /dev/null +++ b/veejay-server/libOSC/Makefile.am @@ -0,0 +1,16 @@ +INCLUDES = -I$(top_srcdir)/libOSC -I$(includedir) +AM_CFLAGS=$(OP_CFLAGS) +OSC_LIB_FILE = libOSC.la +noinst_LTLIBRARIES = $(OSC_LIB_FILE) +libOSC_la_CFLAGS = $(AM_CFLAGS) +libOSC_la_SOURCES = OSC-address-space.c \ + OSC-callbacklist.c \ + OSC-drop.c \ + OSC-pattern-match.c \ + OSC-priority-queue.c \ + OSC-receive.c \ + OSC-string-help.c \ + OSC-common.c \ + OSC-timetag.c \ + NetworkReturnAddress.c + diff --git a/veejay-server/libOSC/Makefile.in b/veejay-server/libOSC/Makefile.in new file mode 100644 index 00000000..21db8ff2 --- /dev/null +++ b/veejay-server/libOSC/Makefile.in @@ -0,0 +1,601 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libOSC +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in AUTHORS NEWS +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libOSC_la_LIBADD = +am_libOSC_la_OBJECTS = libOSC_la-OSC-address-space.lo \ + libOSC_la-OSC-callbacklist.lo libOSC_la-OSC-drop.lo \ + libOSC_la-OSC-pattern-match.lo libOSC_la-OSC-priority-queue.lo \ + libOSC_la-OSC-receive.lo libOSC_la-OSC-string-help.lo \ + libOSC_la-OSC-common.lo libOSC_la-OSC-timetag.lo \ + libOSC_la-NetworkReturnAddress.lo +libOSC_la_OBJECTS = $(am_libOSC_la_OBJECTS) +libOSC_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libOSC_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libOSC_la_SOURCES) +DIST_SOURCES = $(libOSC_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I$(top_srcdir)/libOSC -I$(includedir) +AM_CFLAGS = $(OP_CFLAGS) +OSC_LIB_FILE = libOSC.la +noinst_LTLIBRARIES = $(OSC_LIB_FILE) +libOSC_la_CFLAGS = $(AM_CFLAGS) +libOSC_la_SOURCES = OSC-address-space.c \ + OSC-callbacklist.c \ + OSC-drop.c \ + OSC-pattern-match.c \ + OSC-priority-queue.c \ + OSC-receive.c \ + OSC-string-help.c \ + OSC-common.c \ + OSC-timetag.c \ + NetworkReturnAddress.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libOSC/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libOSC/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libOSC.la: $(libOSC_la_OBJECTS) $(libOSC_la_DEPENDENCIES) + $(libOSC_la_LINK) $(libOSC_la_OBJECTS) $(libOSC_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-NetworkReturnAddress.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-address-space.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-callbacklist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-drop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-pattern-match.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-priority-queue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-receive.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-string-help.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libOSC_la-OSC-timetag.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libOSC_la-OSC-address-space.lo: OSC-address-space.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-address-space.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-address-space.Tpo -c -o libOSC_la-OSC-address-space.lo `test -f 'OSC-address-space.c' || echo '$(srcdir)/'`OSC-address-space.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-address-space.Tpo $(DEPDIR)/libOSC_la-OSC-address-space.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-address-space.c' object='libOSC_la-OSC-address-space.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-address-space.lo `test -f 'OSC-address-space.c' || echo '$(srcdir)/'`OSC-address-space.c + +libOSC_la-OSC-callbacklist.lo: OSC-callbacklist.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-callbacklist.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-callbacklist.Tpo -c -o libOSC_la-OSC-callbacklist.lo `test -f 'OSC-callbacklist.c' || echo '$(srcdir)/'`OSC-callbacklist.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-callbacklist.Tpo $(DEPDIR)/libOSC_la-OSC-callbacklist.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-callbacklist.c' object='libOSC_la-OSC-callbacklist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-callbacklist.lo `test -f 'OSC-callbacklist.c' || echo '$(srcdir)/'`OSC-callbacklist.c + +libOSC_la-OSC-drop.lo: OSC-drop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-drop.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-drop.Tpo -c -o libOSC_la-OSC-drop.lo `test -f 'OSC-drop.c' || echo '$(srcdir)/'`OSC-drop.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-drop.Tpo $(DEPDIR)/libOSC_la-OSC-drop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-drop.c' object='libOSC_la-OSC-drop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-drop.lo `test -f 'OSC-drop.c' || echo '$(srcdir)/'`OSC-drop.c + +libOSC_la-OSC-pattern-match.lo: OSC-pattern-match.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-pattern-match.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-pattern-match.Tpo -c -o libOSC_la-OSC-pattern-match.lo `test -f 'OSC-pattern-match.c' || echo '$(srcdir)/'`OSC-pattern-match.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-pattern-match.Tpo $(DEPDIR)/libOSC_la-OSC-pattern-match.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-pattern-match.c' object='libOSC_la-OSC-pattern-match.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-pattern-match.lo `test -f 'OSC-pattern-match.c' || echo '$(srcdir)/'`OSC-pattern-match.c + +libOSC_la-OSC-priority-queue.lo: OSC-priority-queue.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-priority-queue.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-priority-queue.Tpo -c -o libOSC_la-OSC-priority-queue.lo `test -f 'OSC-priority-queue.c' || echo '$(srcdir)/'`OSC-priority-queue.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-priority-queue.Tpo $(DEPDIR)/libOSC_la-OSC-priority-queue.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-priority-queue.c' object='libOSC_la-OSC-priority-queue.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-priority-queue.lo `test -f 'OSC-priority-queue.c' || echo '$(srcdir)/'`OSC-priority-queue.c + +libOSC_la-OSC-receive.lo: OSC-receive.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-receive.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-receive.Tpo -c -o libOSC_la-OSC-receive.lo `test -f 'OSC-receive.c' || echo '$(srcdir)/'`OSC-receive.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-receive.Tpo $(DEPDIR)/libOSC_la-OSC-receive.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-receive.c' object='libOSC_la-OSC-receive.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-receive.lo `test -f 'OSC-receive.c' || echo '$(srcdir)/'`OSC-receive.c + +libOSC_la-OSC-string-help.lo: OSC-string-help.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-string-help.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-string-help.Tpo -c -o libOSC_la-OSC-string-help.lo `test -f 'OSC-string-help.c' || echo '$(srcdir)/'`OSC-string-help.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-string-help.Tpo $(DEPDIR)/libOSC_la-OSC-string-help.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-string-help.c' object='libOSC_la-OSC-string-help.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-string-help.lo `test -f 'OSC-string-help.c' || echo '$(srcdir)/'`OSC-string-help.c + +libOSC_la-OSC-common.lo: OSC-common.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-common.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-common.Tpo -c -o libOSC_la-OSC-common.lo `test -f 'OSC-common.c' || echo '$(srcdir)/'`OSC-common.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-common.Tpo $(DEPDIR)/libOSC_la-OSC-common.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-common.c' object='libOSC_la-OSC-common.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-common.lo `test -f 'OSC-common.c' || echo '$(srcdir)/'`OSC-common.c + +libOSC_la-OSC-timetag.lo: OSC-timetag.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-OSC-timetag.lo -MD -MP -MF $(DEPDIR)/libOSC_la-OSC-timetag.Tpo -c -o libOSC_la-OSC-timetag.lo `test -f 'OSC-timetag.c' || echo '$(srcdir)/'`OSC-timetag.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-OSC-timetag.Tpo $(DEPDIR)/libOSC_la-OSC-timetag.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OSC-timetag.c' object='libOSC_la-OSC-timetag.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-OSC-timetag.lo `test -f 'OSC-timetag.c' || echo '$(srcdir)/'`OSC-timetag.c + +libOSC_la-NetworkReturnAddress.lo: NetworkReturnAddress.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -MT libOSC_la-NetworkReturnAddress.lo -MD -MP -MF $(DEPDIR)/libOSC_la-NetworkReturnAddress.Tpo -c -o libOSC_la-NetworkReturnAddress.lo `test -f 'NetworkReturnAddress.c' || echo '$(srcdir)/'`NetworkReturnAddress.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libOSC_la-NetworkReturnAddress.Tpo $(DEPDIR)/libOSC_la-NetworkReturnAddress.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='NetworkReturnAddress.c' object='libOSC_la-NetworkReturnAddress.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libOSC_la_CFLAGS) $(CFLAGS) -c -o libOSC_la-NetworkReturnAddress.lo `test -f 'NetworkReturnAddress.c' || echo '$(srcdir)/'`NetworkReturnAddress.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/libOSC/NEWS b/veejay-server/libOSC/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/veejay-server/libOSC/NetworkReturnAddress.c b/veejay-server/libOSC/NetworkReturnAddress.c new file mode 100644 index 00000000..e34d290f --- /dev/null +++ b/veejay-server/libOSC/NetworkReturnAddress.c @@ -0,0 +1,58 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + +/* + NetworkReturnAddress.c + + This version implements UDP return addresses on SGI + + Matt Wright, + 9/11/98 +*/ + +#include +#include +#include +#include +#include +#include +#include + + + +int SizeOfNetworkReturnAddress(void) { + return sizeof(struct NetworkReturnAddressStruct); +} + +Boolean NetworkSendReturnMessage(NetworkReturnAddressPtr addr, + int n, + void *buf) { + if (addr == 0) return FALSE; + + return n == sendto(addr->sockfd, buf, n, 0, &(addr->cl_addr), addr->clilen); +} diff --git a/veejay-server/libOSC/NetworkReturnAddress.h b/veejay-server/libOSC/NetworkReturnAddress.h new file mode 100644 index 00000000..086cc00f --- /dev/null +++ b/veejay-server/libOSC/NetworkReturnAddress.h @@ -0,0 +1,52 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* + NetworkReturnAddress.h + + API that the OSC Kit uses to deal with network return addresses. You will + fill in parts of this file and write NetworkReturnAddress.c to implement + this API via whatever network services you use. + + NB: This API is the only interface the Kit uses for dealing with network + addresses, but of course the part of the application that accepts incoming + packets needs to know about network return addresses so it can fill in the + correct return address when it receives a packet. + + Matt Wright, + 6/3/98 +*/ + +/* Return sizeof(struct NetworkReturnAddressStruct). */ +int SizeOfNetworkReturnAddress(void); + +/* Send a packet back to the client, or do nothing if addr==0 */ +Boolean NetworkSendReturnMessage(NetworkReturnAddressPtr addr, + int n, + void *buf); diff --git a/veejay-server/libOSC/NetworkUDP.h b/veejay-server/libOSC/NetworkUDP.h new file mode 100644 index 00000000..7f693250 --- /dev/null +++ b/veejay-server/libOSC/NetworkUDP.h @@ -0,0 +1,7 @@ +#include + +struct NetworkReturnAddressStruct { + struct sockaddr_in cl_addr; + int clilen; + int sockfd; +}; diff --git a/veejay-server/libOSC/OSC-address-space.c b/veejay-server/libOSC/OSC-address-space.c new file mode 100644 index 00000000..4b4f0420 --- /dev/null +++ b/veejay-server/libOSC/OSC-address-space.c @@ -0,0 +1,599 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* + OSC-address-space.c + Matt Wright, 3/16/98 +*/ +#include +#include +#include +#include +#include + +#include + +#define MAX_ALIASES_PER_CONTAINER 3 +#define MAX_CHILDREN_PER_CONTAINER 20 +#define MAX_METHODS_PER_CONTAINER 30 +#define BASE_NUM_TO_REALLOCATE 10 + + +struct OSCContainerStruct { + struct OSCContainerStruct *parent; + int numChildren; + Name childrenNames[MAX_CHILDREN_PER_CONTAINER]; + struct OSCContainerStruct *children[MAX_CHILDREN_PER_CONTAINER]; + int numMethods; + Name methodNames[MAX_METHODS_PER_CONTAINER]; + OSCMethod methods[MAX_METHODS_PER_CONTAINER]; + struct OSCContainerQueryResponseInfoStruct QueryResponseInfo; + struct OSCContainerStruct *next; +}; + +struct OSCMethodStruct { + methodCallback callback; + void *context; + struct OSCMethodQueryResponseInfoStruct QueryResponseInfo; + struct OSCMethodStruct *next; +}; + +/* Globals */ +static Boolean Initialized = FALSE; +static OSCcontainer OSCTopLevelContainer; +static OSCcontainer freeContainers; /* Linked list via next field. */ +static OSCMethod freeMethods; /* Linked list via next field. */ +static void *(*RealTimeMemoryAllocator)(int numBytes); + + +/* Note: The free list of containers should actually be a "free forest", so + that all the subcontainers recursively under a freed container are + automatically freed. + + FREE: just stick the freed subtree on the front of the list. + + ALLOC: Take all the children of the first container on the list and + insert them in the free list, then return that first container. + +*/ + + + +/************************ Initialization and Memory ************************/ + +static void MakeFreeContainersList(int n) { + int i; + + for (i = 0; i+1 < n; ++i) { + freeContainers[i].next = &(freeContainers[i+1]); + } + freeContainers[n-1].next = 0; +} + +static void MakeFreeMethodsList(int n) { + int i; + + for (i = 0; i+1 < n; ++i) { + freeMethods[i].next = &(freeMethods[i+1]); + } + freeMethods[n-1].next = 0; +} + +OSCcontainer OSCInitAddressSpace(struct OSCAddressSpaceMemoryTuner *t) { + int bytesNeeded; + + if (Initialized) + fatal_error("OSCInitAddressSpace: already initialized!"); + Initialized = TRUE; + + RealTimeMemoryAllocator = t->RealTimeMemoryAllocator; + + bytesNeeded = (1 + t->initNumContainers) * sizeof(*freeContainers); + freeContainers = (OSCcontainer) (*(t->InitTimeMemoryAllocator))(bytesNeeded); + if (freeContainers == 0) { + fatal_error("OSCInitAddressSpace: couldn't allocate %d bytes for %d containers", + bytesNeeded, t->initNumContainers); + } + + OSCTopLevelContainer = &freeContainers[t->initNumContainers]; + MakeFreeContainersList(t->initNumContainers); + + bytesNeeded = t->initNumMethods * sizeof(*freeMethods); + freeMethods = (OSCMethod) (*(t->InitTimeMemoryAllocator))(bytesNeeded); + if (freeMethods == 0) { + fatal_error("OSCInitAddressSpace: couldn't allocate %d bytes for %d methods", + bytesNeeded, t->initNumMethods); + } + MakeFreeMethodsList(t->initNumMethods); + + /* Initialize the top-level container */ + OSCTopLevelContainer->parent = 0; + OSCTopLevelContainer->numChildren = 0; + OSCTopLevelContainer->numMethods = 0; + OSCTopLevelContainer->QueryResponseInfo.comment = "OSC top-level container"; + OSCTopLevelContainer->next = 0; + + return OSCTopLevelContainer; +} + + +/* Container and method memory management: linked lists of free objects */ + +static OSCcontainer AllocContainer(void) { + static int numExtraAllocs = 0; + + OSCcontainer result; + if (freeContainers != 0) { + result = freeContainers; + freeContainers = freeContainers->next; + return result; + } + + OSCWarning("Out of memory for containers; trying to allocate more in real time"); + { + int num = BASE_NUM_TO_REALLOCATE * ++numExtraAllocs; + freeContainers = (*RealTimeMemoryAllocator)(num * sizeof(*freeContainers)); + if (freeContainers == 0) { + OSCWarning("Real-time allocation failed"); + return 0; + } + MakeFreeContainersList(num); + return AllocContainer(); + } +} + +//static void FreeContainer(OSCcontainer c) { +// c->next = freeContainers; +// freeContainers = c; +//} + +static OSCMethod AllocMethod(void) { + static int numExtraAllocs = 0; + OSCMethod result; + + if (freeMethods != 0) { + result = freeMethods; + freeMethods = freeMethods->next; + return result; + } + + OSCWarning("Out of memory for methods; trying to allocate more in real time"); + { + int num = BASE_NUM_TO_REALLOCATE * ++numExtraAllocs; + freeMethods = (*RealTimeMemoryAllocator)(num * sizeof(*freeMethods)); + if (freeMethods == 0) { + OSCWarning("Real-time allocation failed"); + return 0; + } + MakeFreeMethodsList(num); + return AllocMethod(); + } +} + +//static void FreeMethod(OSCMethod c) { +// c->next = freeMethods; +// freeMethods = c; +//} + + +/**************************** Containers ****************************/ + +/* Managing the tree of containers and subcontainers, with aliases */ + +void AddSubContainer(OSCcontainer parent, OSCcontainer child, Name name) { + if (parent->numChildren >= MAX_CHILDREN_PER_CONTAINER) { + fatal_error("AddSubContainer: exceeded MAX_CHILDREN_PER_CONTAINER (%d)\n" + "Increase the value in OSC-address-space.c and recompile.", + MAX_CHILDREN_PER_CONTAINER); + } + + parent->childrenNames[parent->numChildren] = name; + parent->children[parent->numChildren] = child; + ++(parent->numChildren); +} + + +Boolean OSCAddContainerAlias(OSCcontainer container, Name otherName) { + if (container->parent->numChildren >= MAX_CHILDREN_PER_CONTAINER) { + return FALSE; + } + AddSubContainer(container->parent, container, otherName); + return TRUE; +} + +void RemoveSubContainer(OSCcontainer parent, OSCcontainer child) { + int i, numRemoved; + + /* Remove every pointer to the container, even if it has multiple aliases */ + + numRemoved = 0; + for (i = 0; i < parent->numChildren; ++i) { + if (parent->children[i] != child) { + parent->children[i-numRemoved] = parent->children[i]; + parent->childrenNames[i-numRemoved] = parent->childrenNames[i]; + } else { + ++numRemoved; + } + } + + parent->numChildren -= numRemoved; + + if (numRemoved == 0) { + fatal_error("RemoveSubContainer: subcontainer not found!\n"); + } +} + + + + + +Boolean OSCRemoveContainerAlias(OSCcontainer container, Name otherName) { + int i, j; + OSCcontainer parent = container->parent; + Boolean found = FALSE; + + for (i = 0; i < parent->numChildren; ++i) { + if (parent->childrenNames[i] == otherName) { + if (parent->children[i] != container) { + fatal_error("OSCRemoveContainerAlias: %s is actually a sibling's name!", + otherName); + } + found = TRUE; + for (j = i+1; j < parent->numChildren; ++j) { + parent->children[j-1] = parent->children[j]; + parent->childrenNames[j-1] = parent->childrenNames[j]; + --(parent->numChildren); + } + } + } + if (!found) { + fatal_error("OSCRemoveContainerAlias: %s not found!", otherName); + } + + /* Now make sure the child still exists under another name */ + for (i = 0; i < parent->numChildren; ++i) { + if (parent->children[i] == container) return TRUE; + } + + OSCWarning("OSCRemoveContainerAlias: %s was the last name for that subcontainer"); + + /* xxx should recursively free the container and its children... */ + return TRUE; +} + + +OSCcontainer OSCNewContainer(Name name, OSCcontainer parent, + struct OSCContainerQueryResponseInfoStruct *QueryResponseInfo) { + OSCcontainer me; + + me = AllocContainer(); + if (me == 0) return 0; + + if (strchr(name, '/') != NULL) { + OSCProblem("Container name \"%s\" contains a slash --- not good.", + name); + return 0; + } + + me->parent = parent; + AddSubContainer(me->parent, me, name); + me->numChildren = 0; + me->numMethods = 0; + me->QueryResponseInfo = (*QueryResponseInfo); + return me; +} + + +static const char *ContainerName(OSCcontainer c) { + /* Return the first name associated with me in my parent's child list. + (Assume all later ones are aliases.) */ + int i; + + for (i = 0; i < c->parent->numChildren; ++i) { + if (c->parent->children[i] == c) { + return c->parent->childrenNames[i]; + } + } + fatal_error("ContainerName: Container %p isn't in its parent's child list.", c); + return 0; +} + +static int gasHelp(char *target, int maxlength, OSCcontainer c ); + +Boolean OSCGetAddressString(char *target, int maxLength, OSCcontainer c) { + int lenNeeded; + + if (maxLength <= 1) return FALSE; + + lenNeeded = gasHelp(target, maxLength-1, c) + 1; /* -1, +1 are for null char. */ + if (lenNeeded > maxLength) { + OSCProblem("Address string too long (room for %d chars; need %d)", + maxLength, lenNeeded); + target[0] = '\0'; + return FALSE; + } + return TRUE; +} + +static int gasHelp(char *target, int maxLength, OSCcontainer c) { + int sublength, length; + const char *myName; + +/* printf("*** gasHelp %s %d %p %s\n", target, maxLength, c, c->name); */ + + if (c == OSCTopLevelContainer) { + target[0] = '/'; + target[1] = '\0'; + return 1; + } + + myName = ContainerName(c); + sublength = gasHelp(target, maxLength, c->parent); + length = sublength + strlen(myName) + 1; /* +1 is for trailing slash */ + if (length > maxLength) { + return length; + } + + strcpy(target+sublength, myName); + target[length-1] = '/'; + target[length] = '\0'; + + return length; +} + + +/**************************** Methods ****************************/ + +#define LONG_ADDR_SIZE 1000 /* Just for error messages */ + +OSCMethod OSCNewMethod(Name name, OSCcontainer me, methodCallback callback, + void *context, struct OSCMethodQueryResponseInfoStruct *QueryResponseInfo) { + + char addr[LONG_ADDR_SIZE]; + OSCMethod m; + + if (strchr(name, '/') != NULL) { + OSCProblem("Method name \"%s\" contains a slash --- not good.", + name); + return 0; + } + + + if (me->numMethods >= MAX_METHODS_PER_CONTAINER) { + addr[0] = '\0'; + OSCGetAddressString(addr, LONG_ADDR_SIZE, me); + OSCProblem("OSCNewMethod: container %s already has %d methods; can't add another\n" + "Change MAX_METHODS_PER_CONTAINER in OSC-address-space.c and recompile.", + addr, me->numMethods); + return 0; + } + + m = AllocMethod(); + if (!m) return 0; + + m->callback = callback; + m->context = context; + m->QueryResponseInfo = *QueryResponseInfo; + + me->methodNames[me->numMethods] = name; + me->methods[me->numMethods] = m; + ++(me->numMethods); + return m; +} + +/**************************** Queries ****************************/ + +void OSCInitContainerQueryResponseInfo(struct OSCContainerQueryResponseInfoStruct *i) { + i->comment = 0; +} + +void OSCInitMethodQueryResponseInfo(struct OSCMethodQueryResponseInfoStruct *i) { + i->description = 0; + i->pvq = 0; +} + +/******************************* Debug ********************************/ + + +static int ContainerAliases(OSCcontainer c, char *target) { + /* Write a space-delimited list of alias names in the given string, + and return the number */ + int i, n; + + if (c == OSCTopLevelContainer) return 0; + target[0] = '\0'; + n = 0; + + for (i = 0; i < c->parent->numChildren; ++i) { + if (c->parent->children[i] == c) { + if (n > 0) { + strcat(target, " "); + strcat(target, c->parent->childrenNames[i]); + } + ++n; + } + } + if (n == 0) fatal_error("ContainerAliases: internal inconsistency"); + + return n-1; +} + +#define BIG_ADDRESS 50 + +static void PrintHelp(OSCcontainer c) { + char addr[BIG_ADDRESS]; + char aliasNames[1000]; + + int i, j, numAliases; + + if (OSCGetAddressString(addr, BIG_ADDRESS, c) == FALSE) { + printf(" /.../%s", ContainerName(c)); + } else { + printf(" %s", addr); + } + + numAliases = ContainerAliases(c, aliasNames); + if (numAliases > 0) { + printf(" (%d aliases:%s)", numAliases, aliasNames); + } + printf("\n"); + + for (i = 0; i < c->numMethods; ++i) { + printf(" %s%s: %s\n", addr, c->methodNames[i], + c->methods[i]->QueryResponseInfo.description); + } + + /* Forgive this quadratic kludge: */ + for (i = 0; i < c->numChildren; ++i) { + int matches = 0; + for (j = 0; j < i; ++j) { + if (c->children[j] == c->children[i]) { + /* c->children[i] is just an alias to c->children[j], + which we already printed, so ignore it. */ + matches ++; + } + } + + if(matches == 0 ) PrintHelp(c->children[i]); + } +} + +void OSCPrintWholeAddressSpace(void) { + printf("\n----- The OSC address space -----\n"); + PrintHelp(OSCTopLevelContainer); + printf("...end of OSC address space.\n\n\n"); +} + + + + +/***************************** Dispatching *****************************/ + +#include +#include +#include + +/* To do quick concatenation of singly-linked lists, we pass around + this data structure that points to the first and last elements: */ + +typedef struct callbackListEnds_struct { + callbackList begin; + callbackList end; +} callbackListEnds; + +/* Helper proc. declarations */ +static callbackListEnds DispatchSubMessage(char *pattern, OSCcontainer c); +static char *NextSlashOrNull(char *p); + + +callbackList OSCDispatchMessage(char *pattern) { + callbackListEnds result; + + if (pattern[0] != '/') { + OSCProblem("Invalid address \"%s\" does not begin with /", pattern); + return 0; + } + + result = DispatchSubMessage(pattern+1, OSCTopLevelContainer); + + return result.begin; +} + +#define LONG_ADDR_LEN 100 + + +static callbackListEnds DispatchSubMessage(char *pattern, OSCcontainer c) { + callbackListEnds result; + char *nextSlash, *restOfPattern; + char offendingAddr[LONG_ADDR_LEN]; + int i; + + result.begin = result.end = 0; + nextSlash = NextSlashOrNull(pattern); + + if (*nextSlash == '\0') { + /* Base case: the pattern names methods of this container. */ + for (i = 0; i < c->numMethods; i++) { + if (PatternMatch(pattern, c->methodNames[i])) { + callbackList node = AllocCallbackListNode(c->methods[i]->callback, + c->methods[i]->context, + result.begin); + if (node == 0) { + /* Excuse the hairyness of the code to generate the error message. */ + if (OSCGetAddressString(offendingAddr, + LONG_ADDR_LEN-strlen(c->methodNames[i]), + c)) { + strcat(offendingAddr, c->methodNames[i]); + } else { + strcpy(offendingAddr, c->methodNames[i]); + } + + OSCWarning("No memory for callback node; not invoking %s", + offendingAddr); + } else { + if (result.end == 0) { + result.end = node; + } + result.begin = node; + } + } + } + } else { + /* Recursive case: in the middle of an address, so the job at this + step is to look for containers that match. We temporarily turn + the next slash into a null so pattern will be a null-terminated + string of the stuff between the slashes. */ + *nextSlash = '\0'; + restOfPattern = nextSlash + 1; + + for (i = 0; i < c->numChildren; ++i) { + if (PatternMatch(pattern, c->childrenNames[i])) { + callbackListEnds subResult = + DispatchSubMessage(restOfPattern, c->children[i]); + if (result.end == 0) { + result = subResult; + } else { + subResult.end->next = result.begin; + result.begin = subResult.begin; + } + } + } + *nextSlash = '/'; + } + return result; +} + + +static char *NextSlashOrNull(char *p) { + while (*p != '/' && *p != '\0') { + p++; + } + return p; +} + diff --git a/veejay-server/libOSC/OSC-address-space.h b/veejay-server/libOSC/OSC-address-space.h new file mode 100644 index 00000000..f25d623a --- /dev/null +++ b/veejay-server/libOSC/OSC-address-space.h @@ -0,0 +1,364 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* + OSC-address-space.h + Matt Wright, 11/20/97 + Version 2.0 5/28/98 + + C interface for registering the nodes in the OSC address space for an + application. + + include OSC-timetag.h before this file + +****************************** Introduction ****************************** + + + The model is based on our original C++ design and consists of two kinds of + objects: + + methods are the leaf nodes of the address space hierarchy. A complete OSC + address corresponds to a particular method, which has a corresponding + callback procedure that will be invoked to implement commands sent by an + OSC client. + + containers are branch nodes of the address space hierarchy, and contain + methods and other containers. Each container has a single namespace; + it cannot contain a method and a subcontainer with the same name. + + For example, let's examine the OSC message "/resonators/foo/decay 2.5". The + address of this message is "/resonators/foo/decay" and the message has a + single argument, 2.5. We'd say that the object corresponding to the prefix + "/resonators" is a container, and that it contains another container whose + address is "/resonators/foo". The "/resonators/foo" container has a method + "decay". + + The memory model used by this module is pre-allocation of fixed-size objects + for containers, methods, and other internal objects. This preallocated + memory is dynamically managed internally by a custom high-performance memory + allocator. When the preallocated memory runs out, this module calls an + optional realtime memory allocator that you provide. If your memory allocator + gives this module more memory, it will add it to the pool of objects and + never free the memory. If your system does not have a realtime memory + allocator, provide a procedure that always returns 0. +*/ + +/*************************** Type Definitions ******************************/ + +/* Users of this module don't get to see what's inside these objects */ +typedef struct OSCContainerStruct *OSCcontainer; +typedef struct OSCMethodStruct *OSCMethod; + +/* This makes it easy to change the way we represent symbolic names: */ +typedef const char *Name; + + +/************************ Initialization and Memory ************************/ + +/* You will fill an OSCAddressSpaceMemoryTuner struct with the parameters that + determine how memory will be allocated. + + initNumContainers is the number of containers that will be allocated at + initialization time. This should be the maximum number of containers you + ever expect to have in your address space. + + initNumMethods is the number of methods that will be allocated at + initialization time. If you register the same method callback procedure + multiple times at different places in the address space, each of these + locations counts as a separate method as far as memory allocation is + concerned. + + The MemoryAllocator fields are procedures you will provide that allocate + memory. Like malloc(), they take the number of bytes as arguments and return + either a pointer to the new memory or 0 for failure. This memory will never + be freed. + + The InitTimeMemoryAllocator will be called only at initialization time, + i.e., before OSCInitAddressSpace() returns. If it ever returns 0, that's + a fatal error. + + The RealTimeMemoryAllocator will be called if, while the application is + running, the address space grows larger than can fit in what was allocated + at initialization time. If the RealTimeMemoryAllocator() returns 0, the + operation attempting to grow the address space will fail. If your system + does not have real-time memory allocation, RealTimeMemoryAllocator should + be a procedure that always returns 0. +*/ + +struct OSCAddressSpaceMemoryTuner { + int initNumContainers; + int initNumMethods; + void *(*InitTimeMemoryAllocator)(int numBytes); + void *(*RealTimeMemoryAllocator)(int numBytes); +}; + +/* Given an OSCAddressSpaceMemoryTuner, return the number of bytes of + memory that would be allocated if OSCInitAddressSpace() were called + on it. */ +int OSCAddressSpaceMemoryThatWouldBeAllocated(struct OSCAddressSpaceMemoryTuner *t); + + +/* Call this before you call anything else. It returns the container that + corresponds to the address "/" and is the root of the address space tree. +*/ +OSCcontainer OSCInitAddressSpace(struct OSCAddressSpaceMemoryTuner *t); + + +/**************************** Containers ****************************/ + +/* Here's how this system deals with the standard OSC queries addressed to + containers. This module handles the details of listening for these queries + and returning a correctly-formatted answer; all it needs from you is the + actual data that constitute the answers to these queries. + + You pass this data in an OSCContainerQueryResponseInfo structure. Future versions + of this module may have new kinds of queries that they can deal with, so + the list of fields in this structure may grow. That's why your code should + call OSCInitContainerQueryResponseInfo() on your struct before putting new values + into it; this procedure will initialize all of the fields to 0, meaning + "don't have that information", which will cause the associated queries to + fail. + + The "null" message, i.e., a message with a trailing slash, requesting the + list of addresses under a given container, is handled automatically. +*/ + +struct OSCContainerQueryResponseInfoStruct { + char *comment; + /* Other fields may go here */ +}; + +void OSCInitContainerQueryResponseInfo(struct OSCContainerQueryResponseInfoStruct *i); + + +/* Allocate a new container and initialize it. Returns 0 if it cannot + allocate a new container, e.g., if you've exceeded the initNumContainers + limit of the OSCAddressSpaceMemoryTuner() and the RealTimeMemoryAllocator() + didn't return any new memory. + + This procedure doesn't make a copy of the name string or any of the + contents of the OSCContainerQueryResponseInfoStruct. It does copy the fields + of the OSCContainerQueryResponseInfoStruct. +*/ +OSCcontainer OSCNewContainer(Name name, OSCcontainer parent, + struct OSCContainerQueryResponseInfoStruct *queryInfo); + + +/* Remove a container from the address space. This also removes all the + container's methods and recursively removes all sub-containers. Memory + freed by removing a container is kept in this module's internal pool. +*/ +void OSCRemoveContainer(OSCcontainer container); + + +/* Given a pointer to a container, and another name for that container, add or + remove that name as an alias for the container. Return FALSE for failure. */ +Boolean OSCAddContainerAlias(OSCcontainer container, Name otherName); +Boolean OSCRemoveContainerAlias(OSCcontainer container, Name otherName); + + +/* Write the OSC address of the given container into the given string. + Return FALSE if the address won't fit in the string. */ +Boolean OSCGetAddressString(char *target, int maxLength, OSCcontainer c); + + +/* Given an address (not a pattern!), return the single OSCcontainer it names, + or 0 if there is no container at that address */ +OSCcontainer OSCLookUpContainer(Name address); + + +/**************************** Methods ****************************/ + +/* A methodCallback is a procedure that you write that will be called at the + time that an OSC message is to take effect. It will be called with 5 + arguments: + - A context pointer that was registered with the methodNode + this is a method of. (Something like the C++ "this" pointer.) + - The number of bytes of argument data + - A pointer to the argument portion of the OSC message + - The time tag at which this message is supposed to take effect. + - A "return address" object you can use to send a message back to the + client that sent this message. This return channel is guaranteed + to be usable only during the invocation of your method, so your method + must use the return address immediately or ignore it, not store it away + for later use. +*/ +typedef struct NetworkReturnAddressStruct *NetworkReturnAddressPtr; +/* removed const */ + +typedef void (*methodCallback)(void *context, int arglen, const void *args, + OSCTimeTag when, NetworkReturnAddressPtr returnAddr); + + +/* A ParamValQuerier is a procedure that the OSC system will call when the + user wants to know the current value of a parameter. It will be passed the + same context pointer as the associated method. It should write its return + value in the given buffer in the same format as the associated + methodCallback would expect its "args" argument, and should return the + length of data just like the method would expect in its "arglen" argument. + It doesn't have to worry about the address portion of the OSC message. +*/ +typedef char OSCData; /* For pointers to OSC-formatted data */ +typedef int (*ParamValQuerier)(OSCData *result, void *context); + + +/* This system deals with other standard per-method queries, such as + documentation, valid parameter types and ranges, units, default values, + etc., pretty much just like per-container queries. +*/ + +struct OSCMethodQueryResponseInfoStruct { + char *description; + ParamValQuerier pvq; + /* For each argument of the method: + min, max, default, units */ +}; + +void OSCInitMethodQueryResponseInfo(struct OSCMethodQueryResponseInfoStruct *i); + + +/* Allocate a new method, initialize it, and add it to a container. Returns 0 + for failure, e.g., if you've exceeded the initNumMethods limit of the + OSCAddressSpaceMemoryTuner() and the RealTimeMemoryAllocator() didn't return any + new memory. + + This procedure doesn't make a copy of the name string or any of the + contents of the OSCMethodQueryResponseInfoStruct. +*/ + +OSCMethod OSCNewMethod(Name name, OSCcontainer container, methodCallback meth, + void *context, struct OSCMethodQueryResponseInfoStruct *queryInfo); + + + +/******************************* Debug ********************************/ + + +void OSCPrintWholeAddressSpace(void); + + +/**************************** Sample Code *****************************/ + +/* Here's a gross approximation of how your application will invoke the + procedures in this module. It registers an address space with + containers with addresses "/foo", "/foo/foochild", and "/bar", + and gives each of them "play" and "shuddup" messages. + + +#include "OSC-common.h" +#include "OSC-timetag.h" +#include "OSC-address-space.h" + + +typedef struct { + int playing; + int param; + float otherParam; +} Player; + +void PlayCallback(void *context, int arglen, const void *vargs, + OSCTimeTag when, NetworkReturnAddressPtr ra) { + Player *p = context; + const int *args = vargs; + + + p->playing = 1; + if (arglen >= 4) { + p->param = args[0]; + } +} + +void ShuddupCallback(void *context, int arglen, const void *vargs, + OSCTimeTag when, NetworkReturnAddressPtr ra) { + Player *p = context; + const float *args = vargs; + + + p->playing = 0; + if (arglen >= 4) { + p->otherParam = args[0]; + } +} + +void *InitTimeMalloc(int numBytes) { + return malloc(numBytes); +} + +void *NoRealTimeMalloc(int numBytes) { + return 0; +} + +main() { + struct OSCAddressSpaceMemoryTuner oasmt; + OSCcontainer topLevelContainer, foo, foochild, bar; + struct OSCContainerQueryResponseInfoStruct ocqris; + struct OSCMethodQueryResponseInfoStruct omqris; + + Player *players; + + players = (Player *) malloc(3 * sizeof(*players)); + if (!players) exit(1); + + oasmt.initNumContainers = 10; + oasmt.initNumMethods = 10; + oasmt.InitTimeMemoryAllocator = InitTimeMalloc; + oasmt.RealTimeMemoryAllocator = NoRealTimeMalloc; + + topLevelContainer = OSCInitAddressSpace(&oasmt); + + OSCInitContainerQueryResponseInfo(&ocqris); + ocqris.comment = "Foo for you"; + foo = OSCNewContainer("foo", topLevelContainer, &ocqris); + + OSCInitContainerQueryResponseInfo(&ocqris); + ocqris.comment = "Beware the son of foo!"; + foochild = OSCNewContainer("foochild", foo, &ocqris); + + OSCInitContainerQueryResponseInfo(&ocqris); + ocqris.comment = "Belly up to the bar"; + bar = OSCNewContainer("bar", topLevelContainer, &ocqris); + + if (foo == 0 || foochild == 0 || bar == 0) { + fprintf(stderr, "Problem!\n"); + exit(1); + } + + OSCInitMethodQueryResponseInfo(&omqris); + OSCNewMethod("play", foo, PlayCallback, &(players[0]), &omqris); + OSCNewMethod("shuddup", foo, ShuddupCallback, &(players[0]), &omqris); + + OSCNewMethod("play", foochild, PlayCallback, &(players[1]), &omqris); + OSCNewMethod("shuddup", foochild, ShuddupCallback, &(players[1]), &omqris); + + OSCNewMethod("play", bar, PlayCallback, &(players[2]), &omqris); + OSCNewMethod("shuddup", bar, ShuddupCallback, &(players[2]), &omqris); +} + +*/ + diff --git a/veejay-server/libOSC/OSC-callbacklist.c b/veejay-server/libOSC/OSC-callbacklist.c new file mode 100644 index 00000000..3193ae8f --- /dev/null +++ b/veejay-server/libOSC/OSC-callbacklist.c @@ -0,0 +1,95 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* + OSC-callbacklist.c + Linked lists of methods + + Matt Wright, 11/20/97 + + Allocator is a simple linked list of free nodes. + +*/ + + + +#include +#include +#include +#include +#include + +static callbackList allNodes; +static callbackList freeNodes; + +/* Call this before you call anything else */ +Boolean InitCallbackListNodes(int numNodes, void *(*InitTimeMalloc)(int numBytes)) { + int i; + + allNodes = (*InitTimeMalloc)(numNodes * sizeof(*allNodes)); + if (allNodes == 0) return FALSE; + + /* Initialize list of freeNodes */ + freeNodes = &(allNodes[0]); + for (i = 0; i < numNodes-1; ++i) { + allNodes[i].next = &(allNodes[i+1]); + } + allNodes[numNodes-1].next = 0; + return TRUE; +} + +callbackList AllocCallbackListNode(methodCallback callback, void *context, + struct callbackListNode *next) { + callbackList result; + if (freeNodes == 0) { + /* OSCProblem("Out of memory for callback lists!"); */ + return 0; + } + + result = freeNodes; + freeNodes = freeNodes->next; + + result->callback = callback; + result->context = context; + result->next = next; +#ifdef DEBUG_CBL + printf("AllocCallbackListNode: returning %p (cb %p, context %p, next %p)\n", + result, result->callback, result->context, result->next); +#endif + return result; +} + + +void FreeCallbackListNode(callbackList cb) { +#ifdef DEBUG_CBL + printf("FreeCallbackListNode(%p)\n", cb); +#endif + cb->next = freeNodes; + freeNodes = cb; +} diff --git a/veejay-server/libOSC/OSC-callbacklist.h b/veejay-server/libOSC/OSC-callbacklist.h new file mode 100644 index 00000000..2e49fd24 --- /dev/null +++ b/veejay-server/libOSC/OSC-callbacklist.h @@ -0,0 +1,49 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* + OSC-callbacklist.h + Linked lists of methods + + Matt Wright, 3/13/98 + + include "OSC-dispatch.h" before this file. + +*/ + + +/* Call this before you call anything else. */ +Boolean InitCallbackListNodes(int numNodes, void *(*InitTimeMalloc)(int numBytes)); + +callbackList AllocCallbackListNode(methodCallback callback, void *context, + struct callbackListNode *next); + +void FreeCallbackListNode(callbackList); + + diff --git a/veejay-server/libOSC/OSC-common.c b/veejay-server/libOSC/OSC-common.c new file mode 100644 index 00000000..c29afaef --- /dev/null +++ b/veejay-server/libOSC/OSC-common.c @@ -0,0 +1,87 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + + +/* OSC-system-dependent.c + + Matt Wright, 3/13/98 + + File of procedures OSC has to call that are not part of the OSC package + and that you, the developer adding OSC addressability to an application, + must write in a way that makes sense in the context of your system. + + You should also look at OSC-timetag.c and see if there's a better way + to handle time tags on your system. + +*/ + +#include + +/* Printing stuff: for now, use stderr. Some cleverer stuff we could do: + + - Make a silent mode where these don't do anything. + - Return error messages via OSC to some client +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +void fatal_error(char *s, ...) { + va_list ap; + fprintf(stderr, "Fatal error: "); + va_start(ap, s); + vfprintf(stderr, s, ap); + fprintf(stderr, "\n"); + va_end(ap); + exit(-321); +} + +void OSCProblem(char *s, ...) { + va_list ap; + fprintf(stderr, "OSC Problem: "); + va_start(ap, s); + vfprintf(stderr, s, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +void OSCWarning(char *s, ...) { + /* va_list ap; + fprintf(stderr, "OSC Warning: "); + va_start(ap, s); + vfprintf(stderr, s, ap); + fprintf(stderr, "\n"); + va_end(ap);*/ +} diff --git a/veejay-server/libOSC/OSC-common.h b/veejay-server/libOSC/OSC-common.h new file mode 100644 index 00000000..80ee70b3 --- /dev/null +++ b/veejay-server/libOSC/OSC-common.h @@ -0,0 +1,60 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + + +/* OSC-common.h + Simple stuff to #include everywhere in the OSC package + + by Matt Wright, 3/13/98 +*/ + +/* Boolean type */ + +#ifndef TRUE +typedef int Boolean; +#define TRUE 1 +#define FALSE 0 +#endif + + +/* Fixed byte width types */ +typedef int int4; /* 4 byte int */ + +/* Printing type procedures. All take printf-style format string */ + +/* Catastrophic failure: print message and halt system */ +void fatal_error(char *s, ...); + +/* Error message for user */ +void OSCProblem(char *s, ...); + +/* Warning for user */ +void OSCWarning(char *s, ...); + + diff --git a/veejay-server/libOSC/OSC-dispatch.h b/veejay-server/libOSC/OSC-dispatch.h new file mode 100644 index 00000000..2411029c --- /dev/null +++ b/veejay-server/libOSC/OSC-dispatch.h @@ -0,0 +1,52 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* OSC-dispatch.h + + Given an OSC message pattern from an incoming message, match the + pattern against the OSC address space and produce a list of the + callbacks corresponding to all the addresses that were matched. + + Matt Wright, 6/5/98 +*/ + +/***************************** Dispatching *****************************/ + +typedef struct callbackListNode { + methodCallback callback; + void *context; + struct callbackListNode *next; +} *callbackList; + + +/* Given an OSC message pattern from an incoming message, match the + pattern against the OSC address space and produce a list of the + callbacks corresponding to all the addresses that were matched. */ +callbackList OSCDispatchMessage(char *pattern); + diff --git a/veejay-server/libOSC/OSC-drop.c b/veejay-server/libOSC/OSC-drop.c new file mode 100644 index 00000000..88585ac7 --- /dev/null +++ b/veejay-server/libOSC/OSC-drop.c @@ -0,0 +1,58 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* OSC-drop.c + + This implementation just prints a warning. + + Matt Wright, 3/16/98 +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void DropPacket(OSCPacketBuffer p) { + OSCWarning("Packet dropped."); +} + +void DropBundle(char *buf, int n, OSCPacketBuffer p) { + OSCWarning("Bundle dropped."); +} + +void DropMessage(char *buf, int n, OSCPacketBuffer p) { + OSCWarning("Message dropped."); +} + diff --git a/veejay-server/libOSC/OSC-drop.h b/veejay-server/libOSC/OSC-drop.h new file mode 100644 index 00000000..59c810ea --- /dev/null +++ b/veejay-server/libOSC/OSC-drop.h @@ -0,0 +1,43 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* OSC-drop.h + + These procedures will be called on a packet, bundle, or message that's + being dropped for whatever reason. They can do nothing, print (or + otherwise inform the user of) a warning, save the offending data somewhere, + etc. + + Matt Wright, 3/16/98 +*/ + +void DropPacket(OSCPacketBuffer p); +void DropBundle(char *buf, int n, OSCPacketBuffer p); +void DropMessage(char *buf, int n, OSCPacketBuffer p); + diff --git a/veejay-server/libOSC/OSC-internal-messages.h b/veejay-server/libOSC/OSC-internal-messages.h new file mode 100644 index 00000000..54de8e5a --- /dev/null +++ b/veejay-server/libOSC/OSC-internal-messages.h @@ -0,0 +1,70 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* OSC-internal-messages.h + + Interface for having an application send OSC messages to itself + internally. + + All these procedures return FALSE if unable to deliver the message. + + Matt Wright, 3/17/98 + +*/ + +/* Send a message immediately, with no return address. This procedure + returns after the message has been sent (or has failed to be sent), + so the memory for address and args can be on the stack. Returns FALSE + if there's a problem; TRUE otherwise. */ +Boolean OSCSendInternalMessage(char *address, int arglen, void *args); + + +/* Same thing, but with a return address supplied. */ +Boolean OSCSendInternalMessageWithRSVP(char *address, int arglen, void *args, + NetworkReturnAddressPtr returnAddr); + + +/* Schedule some messages to occur at a given time. This allocates one of the + OSCPacketBuffer structures (see OSC-receive.h) to hold the addresses and argument + data until the messages take effect, so if you're going to call this, you + should take this use of packets into account in setting the + numReceiveBuffers argument to OSCInitReceive(). + + This provides an less general interface than OSC's bundle mechanism, because + the bundle of messages you provide cannot include subbundles. + + The addresses, arglens, and args arguments are arrays of size numMessages. + + There's no return address argument because you're not allowed to save a network + return address for later use. +*/ + +Boolean OSCScheduleInternalMessages(OSCTimeTag when, int numMessages, + char **addresses, int *arglens, + void **args); diff --git a/veejay-server/libOSC/OSC-pattern-match.c b/veejay-server/libOSC/OSC-pattern-match.c new file mode 100644 index 00000000..b1614ae5 --- /dev/null +++ b/veejay-server/libOSC/OSC-pattern-match.c @@ -0,0 +1,193 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + + +/* + OSC-pattern-match.c + Matt Wright, 3/16/98 + Adapted from oscpattern.c, by Matt Wright and Amar Chaudhury + */ + +#include +#include +#include +#include +static const char *theWholePattern; /* Just for warning messages */ + +static Boolean MatchBrackets (const char *pattern, const char *test); +static Boolean MatchList (const char *pattern, const char *test); + +Boolean PatternMatch (const char * pattern, const char * test) { + theWholePattern = pattern; + + if (pattern == 0 || pattern[0] == 0) { + return test[0] == 0; + } + + if (test[0] == 0) { + if (pattern[0] == '*') + return PatternMatch (pattern+1,test); + else + return FALSE; + } + + switch (pattern[0]) { + case 0 : return test[0] == 0; + case '?' : return PatternMatch (pattern + 1, test + 1); + case '*' : + if (PatternMatch (pattern+1, test)) { + return TRUE; + } else { + return PatternMatch (pattern, test+1); + } + case ']' : + case '}' : + OSCWarning("Spurious %c in pattern \".../%s/...\"",pattern[0], theWholePattern); + return FALSE; + case '[' : + return MatchBrackets (pattern,test); + case '{' : + return MatchList (pattern,test); + case '\\' : + if (pattern[1] == 0) { + return test[0] == 0; + } else if (pattern[1] == test[0]) { + return PatternMatch (pattern+2,test+1); + } else { + return FALSE; + } + default : + if (pattern[0] == test[0]) { + return PatternMatch (pattern+1,test+1); + } else { + return FALSE; + } + } +} + + +/* we know that pattern[0] == '[' and test[0] != 0 */ + +static Boolean MatchBrackets (const char *pattern, const char *test) { + Boolean result; + Boolean negated = FALSE; + const char *p = pattern; + + if (pattern[1] == 0) { + OSCWarning("Unterminated [ in pattern \".../%s/...\"", theWholePattern); + return FALSE; + } + + if (pattern[1] == '!') { + negated = TRUE; + p++; + } + + while (*p != ']') { + if (*p == 0) { + OSCWarning("Unterminated [ in pattern \".../%s/...\"", theWholePattern); + return FALSE; + } + if (p[1] == '-' && p[2] != 0) { + if (test[0] >= p[0] && test[0] <= p[2]) { + result = !negated; + goto advance; + } + } + if (p[0] == test[0]) { + result = !negated; + goto advance; + } + p++; + } + + result = negated; + +advance: + + if (!result) + return FALSE; + + while (*p != ']') { + if (*p == 0) { + OSCWarning("Unterminated [ in pattern \".../%s/...\"", theWholePattern); + return FALSE; + } + p++; + } + + return PatternMatch (p+1,test+1); +} + +static Boolean MatchList (const char *pattern, const char *test) { + + const char *restOfPattern, *tp = test; + + + for(restOfPattern = pattern; *restOfPattern != '}'; restOfPattern++) { + if (*restOfPattern == 0) { + OSCWarning("Unterminated { in pattern \".../%s/...\"", theWholePattern); + return FALSE; + } + } + + restOfPattern++; /* skip close curly brace */ + + + pattern++; /* skip open curly brace */ + + while (1) { + + if (*pattern == ',') { + if (PatternMatch (restOfPattern, tp)) { + return TRUE; + } else { + tp = test; + ++pattern; + } + } else if (*pattern == '}') { + return PatternMatch (restOfPattern, tp); + } else if (*pattern == *tp) { + ++pattern; + ++tp; + } else { + tp = test; + while (*pattern != ',' && *pattern != '}') { + pattern++; + } + if (*pattern == ',') { + pattern++; + } + } + } + +} + + + diff --git a/veejay-server/libOSC/OSC-pattern-match.h b/veejay-server/libOSC/OSC-pattern-match.h new file mode 100644 index 00000000..653b54d2 --- /dev/null +++ b/veejay-server/libOSC/OSC-pattern-match.h @@ -0,0 +1,35 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* + OSC-pattern-match.h +*/ + +Boolean PatternMatch (const char *pattern, const char *test); + diff --git a/veejay-server/libOSC/OSC-priority-queue.c b/veejay-server/libOSC/OSC-priority-queue.c new file mode 100644 index 00000000..5c29b694 --- /dev/null +++ b/veejay-server/libOSC/OSC-priority-queue.c @@ -0,0 +1,190 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* OSC-priority-queue.c + Priority queue used by OSC time tag scheduler + + This is the most trivial implementation, an unsorted array of queued + objects, mostly for debug purposes. + + Matt Wright, 9/17/98 +*/ + +#include +#include +#include +#include +#include +#define PRINT_PRIORITY_QUEUE + +#ifdef DEBUG_OSC_PRIORITY_QUEUE +#define PRINT_PRIORITY_QUEUE +#endif + +#if defined(PRINT_PRIORITY_QUEUE) || defined(DEBUG_OSC_PRIORITY_QUEUE) + +#include +void OSCQueuePrint(OSCQueue q); +#endif + +#define CAPACITY 1000 + + +struct OSCQueueStruct { + OSCSchedulableObject list[CAPACITY]; + int n; + int scanIndex; +}; + + +OSCQueue OSCNewQueue(int maxItems, void *(*InitTimeMalloc)(int numBytes)) { + OSCQueue result; + + if (maxItems > CAPACITY) fatal_error("Increase CAPACITY in OSC-priority-queue.c"); + + result = (*InitTimeMalloc)(sizeof(*result)); + if (result == 0) return 0; + + result->n = 0; + +#ifdef DEBUG_OSC_PRIORITY_QUEUE + OSCQueuePrint(result); +#endif + return result; +} + +int OSCQueueInsert(OSCQueue q, OSCSchedulableObject new) { + if (q->n == CAPACITY) return FALSE; + + q->list[q->n] = new; + ++(q->n); +#ifdef DEBUG_OSC_PRIORITY_QUEUE + printf("OSCQueueInsert: just inserted %p\n", new); + OSCQueuePrint(q); +#endif + return TRUE; +} + + +OSCTimeTag OSCQueueEarliestTimeTag(OSCQueue q) { + int i; + OSCTimeTag smallest = OSCTT_BiggestPossibleTimeTag(); + + for (i = 0; i < q->n; ++i) { + if (OSCTT_Compare(smallest, q->list[i]->timetag) > 0) { + smallest = q->list[i]->timetag; + } + } + +#ifdef DEBUG_OSC_PRIORITY_QUEUE + printf("OSCQueueEarliestTimeTag: about to return %llx\n", smallest); + OSCQueuePrint(q); +#endif + return smallest; +} + + +static void RemoveElement(int goner, OSCQueue q) { + int i; + --(q->n); + + for (i = goner; i < q->n; ++i) { + q->list[i] = q->list[i+1]; + } +} + +OSCSchedulableObject OSCQueueRemoveEarliest(OSCQueue q) { + OSCSchedulableObject result; + int i, smallestIndex; + + if (q->n == 0) { + OSCWarning("OSCQueueRemoveEarliest: empty queue"); + return NULL; + } + +#ifdef DEBUG_OSC_PRIORITY_QUEUE + printf("OSCQueueRemoveEarliest: begin\n"); + OSCQueuePrint(q); +#endif + + smallestIndex = 0; + for (i = 1; i < q->n; ++i) { + if (OSCTT_Compare(q->list[smallestIndex]->timetag, q->list[i]->timetag) > 0) { + smallestIndex = i; + } + } + + result = q->list[smallestIndex]; + + RemoveElement(smallestIndex, q); + +#ifdef DEBUG_OSC_PRIORITY_QUEUE + printf("OSCQueueRemoveEarliest: done\n"); + OSCQueuePrint(q); +#endif + return result; +} + +#ifdef PRINT_PRIORITY_QUEUE + +void OSCQueuePrint(OSCQueue q) { + int i; + printf("OSC Priority queue at %p has %d elements:\n", q, q->n); + + for (i = 0; i < q->n; ++i) { + printf(" list[%2d] is %p, timetag = %llx\n", i, q->list[i], q->list[i]->timetag); + } + printf("\n\n"); +} + +#endif + + +void OSCQueueScanStart(OSCQueue q) { + q->scanIndex = 0; +} + +OSCSchedulableObject OSCQueueScanNext(OSCQueue q) { + if (q->scanIndex >= q->n) return 0; + + return (q->list[(q->scanIndex)++]); +} + +void OSCQueueRemoveCurrentScanItem(OSCQueue q) { + /* Remember that q->scanIndex is the index of the *next* + item that will be returned, so the "current" item, i.e., + the one most recently returned by OSCQueueScanNext(), + is q->scanIndex-1. */ + + RemoveElement(q->scanIndex-1, q); + --(q->scanIndex); +} + +void CheckWholeQueue(void) { +} diff --git a/veejay-server/libOSC/OSC-priority-queue.h b/veejay-server/libOSC/OSC-priority-queue.h new file mode 100644 index 00000000..dc15c8a2 --- /dev/null +++ b/veejay-server/libOSC/OSC-priority-queue.h @@ -0,0 +1,90 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* OSC-priority-queue.h + Interface to priority queue used by OSC time tag scheduler + + Matt Wright, 3/13/98 + +*/ + +/* include OSC-timetag.h before this file. */ + +/* This queue manages pointers to data objects. It doesn't care what's in the + objects except that the first element has to be an OSCTimeTag. So whatever + data you want to store, cast your pointer to it to a pointer to this type. */ + +typedef struct { + OSCTimeTag timetag; + /* There will be other stuff... */ +} *OSCSchedulableObject; + +typedef struct OSCQueueStruct *OSCQueue; + +/* Make a new queue, or return 0 for failure. */ +OSCQueue OSCNewQueue(int maxItems, void *(*InitTimeMalloc)(int numBytes)); + +/* Put something into the queue. Return FALSE if quque is full. */ +Boolean OSCQueueInsert(OSCQueue q, OSCSchedulableObject o); + +/* What's the time tag of the earliest item in the queue? + Return OSCTT_BiggestPossibleTimeTag() if queue is empty. */ +OSCTimeTag OSCQueueEarliestTimeTag(OSCQueue q); + +/* Remove the item from the front of the queue. Fatal error + if the queue is empty. */ +OSCSchedulableObject OSCQueueRemoveEarliest(OSCQueue q); + + +/* Interface for examining items currently stored on the queue: + + - To start, call OSCQueueScanStart(). + + - Then each subsequent call to OSCQueueScanNext() returns a pointer to an + OSCSchedulableObject that is stored on the queue, until + OSCQueueScanNext() returns 0 to indicate that all objects on the queue + have been scanned. + + The objects returned by OSCQueueScanNext() come in chronological order (or + approximately chronological order, depending on the underlying queue data + structure). + + If you call OSCQueueRemoveCurrentScanItem(), the object most recently + returned by OSCQueueScanNext() will be removed from the queue. + + If there are any insertions or deletions to the queue, the sequence of + scanned objects must still include every object in the queue. This may + cause a particular object to be returned more than once by + OSCQueueScanNext(). +*/ + + +void OSCQueueScanStart(OSCQueue q); +OSCSchedulableObject OSCQueueScanNext(OSCQueue q); +void OSCQueueRemoveCurrentScanItem(OSCQueue q); diff --git a/veejay-server/libOSC/OSC-receive.c b/veejay-server/libOSC/OSC-receive.c new file mode 100644 index 00000000..216188f1 --- /dev/null +++ b/veejay-server/libOSC/OSC-receive.c @@ -0,0 +1,893 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +#define PARANOID 0 +/* + OSC-receive.c + Matt Wright, 3/13/98, 6/3/98 + + Adapted from OSC-addressability.c (and seriously cleaned up!) + +*/ + #include + #include + #include + #include + #include + #include + #include + #include + #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(DEBUG_INTERNAL) || defined(DEBUG) || defined(DEBUG_PACKET_MEM) || defined(DEBUG_QD_MEM) || defined(DEBUG_8BYTE_ALIGN) || defined(SUSPECT_QD_PROB) +#include +#endif + +static int use_mcast_ = 0; +static char mcast_groupname[200]; + +struct { + OSCQueue TheQueue; /* The Priority Queue */ + OSCTimeTag lastTimeTag; /* Best approximation to current time */ + Boolean timePassed; /* TRUE if OSCInvokeMessagesThatAreReady() has been + called since the last time OSCBeProductiveWhileWaiting() was. */ + int recvBufSize; /* Size of all receive buffers */ + void *(*InitTimeMalloc)(int numBytes); + void *(*RealTimeMemoryAllocator)(int numBytes); +} globals; + + +/* Data structures */ + +struct OSCPacketBuffer_struct { + char *buf; /* Contents of network packet go here */ + int n; /* Overall size of packet */ + int refcount; /* # queued things using memory from this buffer */ + struct OSCPacketBuffer_struct *nextFree; /* For linked list of free packets */ + + Boolean returnAddrOK; /* Because returnAddr points to memory we need to + store future return addresses, we set this + field to FALSE in situations where a packet + buffer "has no return address" instead of + setting returnAddr to 0 */ + + NetworkReturnAddressPtr returnAddr; + //void *returnAddr; /* Addr of client this packet is from */ + /* This was of type NetworkReturnAddressPtr, but the constness + was making it impossible for me to initialize it. There's + probably a better way that I don't understand. */ + +}; + +/* These are the data objects that are inserted and removed from the + scheduler. The idea is that we can insert a single message or + an entire bundle on the scheduler, and we can leave it in various + states of being parsed and pattern matched. */ + +#define NOT_DISPATCHED_YET ((callbackList) -1) + +typedef struct queuedDataStruct { + OSCTimeTag timetag; /* When this bundle or message is supposed to happen */ + OSCPacketBuffer myPacket; /* Ptr. to buffer this is contained in */ + + enum {MESSAGE, BUNDLE} type; + + union { + struct { + char *bytes; + int length; + } bundle; + + struct { + char *messageName; /* Ptr. into receive buffer */ + int length; /* Includes name and arugments */ + void *args; /* 0 if not yet parsed */ + int argLength; + callbackList callbacks; /* May be NOT_DISPATCHED_YET */ + } message; + } data; + + struct queuedDataStruct *nextFree; /* For linked list of free structures */ +} queuedData; + + + +/* Static procedure declatations */ +static Boolean InitPackets(int receiveBufferSize, int clientAddrSize, int numReceiveBuffers); +static Boolean InitQueuedData(int numQueuedObjects); +static queuedData *AllocQD(void); +static void FreeQD(queuedData *qd); +static void CallWholeCallbackList(callbackList l, int argLength, void *args, OSCTimeTag when, NetworkReturnAddressPtr returnAddr); +static void InsertBundleOrMessage(char *buf, int n, OSCPacketBuffer packet, OSCTimeTag enclosingTimeTag); +static void ParseBundle(queuedData *qd); +static Boolean ParseMessage(queuedData *qd); +/* static void CheckPacketRefcount(OSCPacketBuffer packet); */ +static void PacketAddRef(OSCPacketBuffer packet); +static void PacketRemoveRef(OSCPacketBuffer packet); + + +/************************************************** + Initialization and memory pre-allocation + **************************************************/ + + +Boolean OSCInitReceive(struct OSCReceiveMemoryTuner *t) { + globals.recvBufSize = t->receiveBufferSize; + globals.InitTimeMalloc = t->InitTimeMemoryAllocator; + globals.RealTimeMemoryAllocator = t->RealTimeMemoryAllocator; + + globals.TheQueue = OSCNewQueue(t->numQueuedObjects, t->InitTimeMemoryAllocator); + if (globals.TheQueue == 0) return FALSE; + + globals.lastTimeTag = OSCTT_Immediately(); + globals.timePassed = TRUE; + + if (InitPackets(t->receiveBufferSize, SizeOfNetworkReturnAddress(), + t->numReceiveBuffers) == FALSE) return FALSE; + if (InitQueuedData(t->numQueuedObjects) == FALSE) return FALSE; + if (InitCallbackListNodes(t->numCallbackListNodes, t->InitTimeMemoryAllocator) + == FALSE) return FALSE; + + return TRUE; +} + + +/************************************************** + Managing packet data structures + **************************************************/ + +static struct OSCPacketBuffer_struct *freePackets; + +#ifdef DEBUG_PACKET_MEM +static void PrintPacketFreeList(void) { + struct OSCPacketBuffer_struct *p; + printf("- freePackets:"); + if (freePackets == 0) { + printf(" [none]"); + } + for (p = freePackets; p != 0; p = p->nextFree) { + printf(" %p", p); + } + printf("\n"); +} +#endif + +#define MIN_REASONABLE_RCV_BUFSIZE 128 + +void OSCFreeReceiver(void) +{ + if( freePackets) free(freePackets); + if( globals.TheQueue ) free( globals.TheQueue ); +} + + +static Boolean InitPackets(int receiveBufferSize, int clientAddrSize, int numReceiveBuffers) { + int i; + struct OSCPacketBuffer_struct *allPackets; + + if (receiveBufferSize < MIN_REASONABLE_RCV_BUFSIZE) { + fatal_error("OSCInitReceive: receiveBufferSize of %d is unreasonably small.", + receiveBufferSize); + } + + allPackets = (*(globals.InitTimeMalloc))(numReceiveBuffers * sizeof(*allPackets)); + if (allPackets == 0) return FALSE; + + for (i = 0; i < numReceiveBuffers; ++i) { + allPackets[i].returnAddr = (*(globals.InitTimeMalloc))(clientAddrSize); + if (allPackets[i].returnAddr == 0) return FALSE; + + allPackets[i].buf = (*(globals.InitTimeMalloc))(receiveBufferSize); + if (allPackets[i].buf == 0) return FALSE; + + allPackets[i].nextFree = &(allPackets[i+1]); + } + allPackets[numReceiveBuffers-1].nextFree = ((struct OSCPacketBuffer_struct *) 0); + freePackets = allPackets; + + return TRUE; +} + +char *OSCPacketBufferGetBuffer(OSCPacketBuffer p) { + return p->buf; +} + +int *OSCPacketBufferGetSize(OSCPacketBuffer p) { + return &(p->n); +} + +int OSCGetReceiveBufferSize(void) { + return globals.recvBufSize; +} + +NetworkReturnAddressPtr OSCPacketBufferGetClientAddr(OSCPacketBuffer p) { + return p->returnAddr; +} + + +#ifdef DEBUG +void PrintPacket(OSCPacketBuffer p) { + printf("Packet %p. buf %p, n %d, refcount %d, nextFree %p\n", + p, p->buf, p->n, p->refcount, p->nextFree); +} +#endif + + + +OSCPacketBuffer OSCAllocPacketBuffer(void) { + OSCPacketBuffer result; + if (freePackets == 0) { + /* Could try to call the real-time memory allocator here */ + OSCWarning("OSCAllocPacketBuffer: no free packets!"); + return 0; + } + + result = freePackets; + freePackets = result->nextFree; + result->refcount = 0; + +#ifdef DEBUG_PACKET_MEM + printf("OSCAllocPacketBuffer: allocating %p ", result); + PrintPacketFreeList(); +#endif + + return result; +} + +void OSCFreePacket(OSCPacketBuffer p) { +#ifdef PARANOID + if (p->refcount != 0) { + OSCWarning("OSCFreePacket: %p's refcount is %d!\n", p, p->refcount); + } +#endif + + p->nextFree = freePackets; + freePackets = p; + +#ifdef DEBUG_PACKET_MEM + printf("OSCFreePacket: freed %p ", p); + PrintPacketFreeList(); +#endif + +} + + +/************************************************** + Dealing with OpenSoundControl packets and + making the messages take effect. + **************************************************/ + +static queuedData *freeQDList; + +#ifdef DEBUG_QD_MEM +static void PrintQDFreeList(void) { + static queuedData *p; + printf("- freeQDList:"); + if (freeQDList == 0) { + printf(" [none]"); + } + for (p = freeQDList; p != 0; p = p->nextFree) { + printf(" %p", p); + } + printf("\n"); +} +#endif + +static Boolean InitQueuedData(int numQueuedObjects) { + int i; + queuedData *allQD; + + allQD = (*(globals.InitTimeMalloc))(numQueuedObjects * (sizeof(*allQD))); + if (allQD == 0) return FALSE; + + for (i = 0; i < numQueuedObjects; ++i) { + allQD[i].nextFree = &(allQD[i+1]); + } + allQD[numQueuedObjects-1].nextFree = 0; + freeQDList = &(allQD[0]); + + return TRUE; +} + +static queuedData *AllocQD(void) { + queuedData *result; + + if (freeQDList == 0) { + /* Could try to call realtime malloc() */ + OSCWarning("AllocQD: no QD objects free now; returning 0."); + return 0; + } + + result = freeQDList; + freeQDList = freeQDList->nextFree; + return result; +} + +static void FreeQD(queuedData *qd) { + qd->nextFree = freeQDList; + freeQDList = qd; +} + + +void OSCAcceptPacket(OSCPacketBuffer packet) { + if ((packet->n % 4) != 0) { + OSCProblem("OSC packet size (%d bytes) not a multiple of 4.", packet->n); + DropPacket(packet); + return; + } + +#ifdef DEBUG + printf("OSCAcceptPacket(OSCPacketBuffer %p, buf %p, size %d)\n", + packet, packet->buf, packet->n); +#endif + + /* If the packet came from the user, it's return address is OK. */ + packet->returnAddrOK = TRUE; + + InsertBundleOrMessage(packet->buf, packet->n, packet, OSCTT_Immediately()); + +#ifdef PARANOID + if (packet->refcount == 0) { + if (freePackets != packet) { + fatal_error("OSCAcceptPacket: packet refcount 0, but it's not the head of the free list!"); + } + } +#endif + + OSCInvokeAllMessagesThatAreReady(globals.lastTimeTag); +} + +Boolean OSCBeProductiveWhileWaiting(void) { + /* Here's where we could be clever if an allocation fails. + (I.e., if we're out of QD objects, we should avoid + parsing bundles.) The code isn't that smart yet. */ + + queuedData *qd; + + if (globals.timePassed) { + OSCQueueScanStart(globals.TheQueue); + } + + while (1) { + qd = (queuedData *) OSCQueueScanNext(globals.TheQueue); + if (qd == 0) return FALSE; + + if (qd->type == BUNDLE) { + ParseBundle(qd); + OSCQueueRemoveCurrentScanItem(globals.TheQueue); + return TRUE; + } else { + if (qd->data.message.callbacks == NOT_DISPATCHED_YET) { + if (ParseMessage(qd) == FALSE) { + /* Problem with this message - flush it. */ + DropMessage(qd->data.message.messageName, + qd->data.message.length, + qd->myPacket); + OSCQueueRemoveCurrentScanItem(globals.TheQueue); + PacketRemoveRef(qd->myPacket); + FreeQD(qd); + } + return TRUE; + } + /* The item we found was an already-dispatched message, + so continue the while loop. */ + } + } +} + +Boolean OSCInvokeMessagesThatAreReady(OSCTimeTag now) { + queuedData *x; + OSCTimeTag thisTimeTag; + + globals.lastTimeTag = now; + globals.timePassed = TRUE; + + thisTimeTag = OSCQueueEarliestTimeTag(globals.TheQueue); + + if (OSCTT_Compare(thisTimeTag, now) > 0) { + /* No messages ready yet. */ + return FALSE; + } + +#ifdef DEBUG + printf("OSCInvokeMessagesThatAreReady(%llx) - yes, some are ready; earliest %llx\n", now, thisTimeTag); +#endif + + while (OSCTT_Compare(thisTimeTag, OSCQueueEarliestTimeTag(globals.TheQueue)) == 0) { + x = (queuedData *) OSCQueueRemoveEarliest(globals.TheQueue); + if (!x) return FALSE; + +#ifdef DEBUG + printf("...Just removed earliest entry from queue: %p, TT %llx, %s\n", + x, x->timetag, x->type == MESSAGE ? "message" : "bundle"); + if (x->type == MESSAGE) { + printf("...message %s, len %d, args %p, arglen %d, callbacks %p\n", + x->data.message.messageName, x->data.message.length, x->data.message.args, + x->data.message.argLength, x->data.message.callbacks); + } else { + if (x->data.bundle.length == 0) { + printf("...bundle is empty.\n"); + } else { + printf("...bundle len %d, first count %d, first msg %s\n", + x->data.bundle.length, *((int *) x->data.bundle.bytes), x->data.bundle.bytes+4); + } + } + PrintPacket(x->myPacket); +#endif + + if (x->type == BUNDLE) { + ParseBundle(x); + } else { + if (x->data.message.callbacks == NOT_DISPATCHED_YET) { + if (ParseMessage(x) == FALSE) { + /* Problem with this message - flush it. */ + PacketRemoveRef(x->myPacket); + FreeQD(x); + continue; + } + } + + CallWholeCallbackList(x->data.message.callbacks, + x->data.message.argLength, + x->data.message.args, + thisTimeTag, + x->myPacket->returnAddrOK ? x->myPacket->returnAddr : 0); + + PacketRemoveRef(x->myPacket); + FreeQD(x); + } + } + + +#ifdef PARANOID + if (OSCTT_Compare(thisTimeTag, OSCQueueEarliestTimeTag(globals.TheQueue)) > 0) { + fatal_error("OSCInvokeMessagesThatAreReady: corrupt queue!\n" + " just did %llx; earliest in queue is now %llx", + thisTimeTag, OSCQueueEarliestTimeTag(globals.TheQueue)); + } +#endif + + return OSCTT_Compare(OSCQueueEarliestTimeTag(globals.TheQueue), now) <= 0; +} + +void OSCInvokeAllMessagesThatAreReady(OSCTimeTag now) { + while (OSCInvokeMessagesThatAreReady(now)) { + /* Do nothing */ + } +} + +static void CallWholeCallbackList(callbackList l, int argLength, void *args, OSCTimeTag when, + NetworkReturnAddressPtr returnAddr) { + /* In a multithreaded application, this might run in a different thread + than the thread that deals with the priority queue. */ + + callbackList next; + + while (l != 0) { + (*(l->callback))(l->context, argLength, args, when, returnAddr); + next = l->next; + FreeCallbackListNode(l); + l = next; + } +} + +static void InsertBundleOrMessage(char *buf, int n, OSCPacketBuffer packet, OSCTimeTag enclosingTimeTag) { + Boolean IsBundle; + queuedData *qd; + + /* We add the reference first thing so in case any of the upcoming + potential failure situations come we can call PacketRemoveRef, thereby + freeing the packet if necessary. */ + PacketAddRef(packet); + + if ((n % 4) != 0) { + OSCProblem("OSC message or bundle size (%d bytes) not a multiple of 4.", n); + DropMessage(buf, n, packet); + PacketRemoveRef(packet); + return; + } + + if ((n >= 8) && (strncmp(buf, "#bundle", 8) == 0)) { + IsBundle = TRUE; + + if (n < 16) { + OSCProblem("Bundle message too small (%d bytes) for time tag.", n); + DropBundle(buf, n, packet); + PacketRemoveRef(packet); + return; + } + } else { + IsBundle = FALSE; + } + + + qd = AllocQD(); + + if (qd == 0) { + OSCProblem("Not enough memory for queued data!"); + DropBundle(buf, n, packet); + PacketRemoveRef(packet); + return; + } + + qd->myPacket = packet; + qd->type = IsBundle ? BUNDLE : MESSAGE; + + if (IsBundle) { + /* Be careful of 8-byte alignment when copying the time tag. Here's a good + way to get a bus error when buf happens not to be 8-byte aligned: + qd->timetag = *((OSCTimeTag *)(buf+8)); + */ + memcpy(&(qd->timetag), buf+8, sizeof(OSCTimeTag)); + + if (OSCTT_Compare(qd->timetag, enclosingTimeTag) < 0) { + OSCProblem("Time tag of sub-bundle is before time tag of enclosing bundle."); + DropBundle(buf, n, packet); + PacketRemoveRef(packet); + FreeQD(qd); + return; + } + qd->data.bundle.bytes = buf + 16; + qd->data.bundle.length = n - 16; + } else { + qd->timetag = enclosingTimeTag; + qd->data.message.messageName = buf; + qd->data.message.length = n; + qd->data.message.callbacks = NOT_DISPATCHED_YET; + } + + OSCQueueInsert(globals.TheQueue, (OSCSchedulableObject) qd); +} + + +static void ParseBundle(queuedData *qd) { + /* A queued bundle has been removed from the scheduler queue, and now it's + time to parse all the stuff inside it and schedule the enclosed + messages and bundles. Once all the contents of the bundle have been + parsed and scheduled, we trash the bundle, decrementing the packet + count and freeing the QD. */ + + int size; + int i = 0; + + if (qd->type != BUNDLE) { + fatal_error("This can't happen: bundle isn't a bundle!"); + } + + while (i < qd->data.bundle.length) { + size = *((int *) (qd->data.bundle.bytes + i)); + if ((size % 4) != 0) { + OSCProblem("Bad size count %d in bundle (not a multiple of 4).", size); + DropBundle(qd->data.bundle.bytes, qd->data.bundle.length, qd->myPacket); + goto bag; + } + if ((size + i + 4) > qd->data.bundle.length) { + OSCProblem("Bad size count %d in bundle (only %d bytes left in entire bundle).", + size, qd->data.bundle.length-i-4); + DropBundle(qd->data.bundle.bytes, qd->data.bundle.length, qd->myPacket); + goto bag; + } + + /* Recursively handle element of bundle */ + InsertBundleOrMessage(qd->data.bundle.bytes+i+4, size, qd->myPacket, qd->timetag); + i += 4 + size; + } + + if (i != qd->data.bundle.length) { + fatal_error("This can't happen: internal logic error parsing bundle"); + } + +bag: + /* If we got here successfully, we've added to the packet's reference count for + each message or subbundle by calling InsertBundleOrMessage(), so we remove the one + reference for bundle that we just parsed. If we got here by "goto bag", there's a + problem with the bundle so we also want to lose the reference count. */ + + PacketRemoveRef(qd->myPacket); + FreeQD(qd); +} + + +static Boolean ParseMessage(queuedData *qd) { + /* Fill in all the information we'll need to execute the message as + quickly as possible when the time comes. This means figuring out where + the address ends and the arguments begin, and also pattern matching the + address to find the callbacks associated with it. + + The message may be something we have to invoke now, or it may be some + message scheduled for the future that's just waiting on the queue; this + procedure doesn't care. */ + + + char *args; /* char * so we can do pointer subtraction */ + int messageLen; + char *DAAS_errormsg; + + + if (qd->type != MESSAGE) { + fatal_error("This can't happen: message isn't a message!"); + } + + args = OSCDataAfterAlignedString(qd->data.message.messageName, + qd->data.message.messageName+qd->data.message.length, + &DAAS_errormsg); + + if (args == 0) { + OSCProblem("Bad message name string: %s\n", DAAS_errormsg); + DropMessage(qd->data.message.messageName, qd->data.message.length, qd->myPacket); + return FALSE; + } + + qd->data.message.args = args; + messageLen = args - qd->data.message.messageName; + qd->data.message.argLength = qd->data.message.length - messageLen; + + qd->data.message.callbacks = OSCDispatchMessage(qd->data.message.messageName); + + if (qd->data.message.callbacks == 0) { + OSCWarning("Message pattern \"%s\" did not correspond to any address in the synth.", + qd->data.message.messageName); + return FALSE; + } + + return TRUE; +} + +static void PacketAddRef(OSCPacketBuffer packet) { + ++(packet->refcount); +} + +static void PacketRemoveRef(OSCPacketBuffer packet) { + --(packet->refcount); + if (packet->refcount == 0) { + OSCFreePacket(packet); + } +} + + + +/************************************************** + Implementation of procedures declared in + OSC-internal-messages.h + **************************************************/ + +#include + +Boolean OSCSendInternalMessage(char *address, int arglen, void *args) { + return OSCSendInternalMessageWithRSVP(address, arglen, args, 0); +} + +Boolean OSCSendInternalMessageWithRSVP(char *address, int arglen, void *args, + NetworkReturnAddressPtr returnAddr) { + callbackList l = OSCDispatchMessage(address); + + if (l == 0) return FALSE; + + CallWholeCallbackList(l, arglen, args, OSCTT_Immediately(), returnAddr); + return TRUE; +} + + + +Boolean OSCScheduleInternalMessages(OSCTimeTag when, int numMessages, + char **addresses, int *arglens, void **args) { + int i, bufSizeNeeded; + OSCPacketBuffer p; + queuedData *qd; + char *bufPtr; + + + + /* Figure out how big of a buffer we'll need to hold this huge bundle. + We don't store the "#bundle" string or the time tag, just the 4-byte + size counts, the addresses, possible extra null padding for the + addresses, and the arguments. */ + + bufSizeNeeded = 0; + for (i = 0; i < numMessages; ++i) { + bufSizeNeeded += 4 + OSCPaddedStrlen(addresses[i]) + arglens[i]; + } + + if (bufSizeNeeded > OSCGetReceiveBufferSize()) { + return FALSE; + } + + + /* Now try to allocate the data objects to hold these messages */ + qd = AllocQD(); + if (qd == 0) return FALSE; + + p = OSCAllocPacketBuffer(); + if (p == 0) { + FreeQD(qd); + return FALSE; + } + + /* Now fill in the buffer with a fake #bundle message. This is almost like + putting a real #bundle message in the buffer and then calling OSCAcceptPacket, + except that we save a little time and memory by not writing "#bundle" or the time tag, + and by pre-parsing the messages a little. Thus, this code duplicates a lot + of what's in InsertBundleOrMessage() */ + + bufPtr = p->buf; + + for (i = 0; i < numMessages; ++i) { + /* First the size count of this bundle element */ + *((int4 *) bufPtr) = OSCPaddedStrlen(addresses[i]) + arglens[i]; + bufPtr += sizeof(int4); + + /* Then the address */ + bufPtr = OSCPaddedStrcpy(bufPtr, addresses[i]); + + /* Then the arguments */ + memcpy(bufPtr, args[i], arglens[i]); + bufPtr += arglens[i]; + } + +#ifdef PARANOID + if (bufPtr != p->buf+bufSizeNeeded) { + fatal_error("OSCScheduleInternalMessages: internal error"); + } +#endif + + /* Fill in the rest of the packet fields */ + p->n = bufSizeNeeded; + p->returnAddrOK = FALSE; + PacketAddRef(p); + + /* Now fill in the queuedData object */ + qd->timetag = when; + qd->myPacket = p; + qd->type = BUNDLE; + qd->data.bundle.length = bufSizeNeeded; + qd->data.bundle.bytes = p->buf; + + /* Now we can put it into the scheduling queue. */ + OSCQueueInsert(globals.TheQueue, (OSCSchedulableObject) qd); + + return TRUE; +} + +Boolean NetworkPacketWaiting(OSCPacketBuffer packet) { + int n; + NetworkReturnAddressPtr na = OSCPacketBufferGetClientAddr(packet); + +// if( use_mcast_ ) +// { + fd_set fds; + struct timeval no_wait; + int status; + memset( &no_wait, 0, sizeof(no_wait)); + FD_ZERO(&fds); + FD_SET( na->sockfd , &fds ); + status = select( na->sockfd + 1, &fds, 0, 0, &no_wait ); + if(status <= 0) + return FALSE; + if(FD_ISSET( na->sockfd, &fds )) + return TRUE; +// } +// else +// { +// if( ioctl( na->sockfd, FIONREAD, &n, 0)==-1) return FALSE; +// if( n==0 ) return FALSE; +// } +// return TRUE; + return FALSE; +} + +Boolean NetworkReceivePacket( OSCPacketBuffer packet ) { + int n; + NetworkReturnAddressPtr na = OSCPacketBufferGetClientAddr(packet); + + if( use_mcast_ ) + { + n = recv( na->sockfd, packet->buf, 100, 0 ); + if( n<= 0) + return FALSE; + packet->n = n; + } + else + { + n = recvfrom( na->sockfd, packet->buf, 100, 0, + (struct sockaddr*) &(na->cl_addr), &(na->clilen)); + if(n<=0) { + return FALSE; + } + packet->n = n; + } + + return TRUE; +} + +void GoMultiCast( const char *group_name ) +{ + use_mcast_ = 1; + strncpy( mcast_groupname, group_name, strlen(group_name )); +} + +int IsMultiCast( char *dst ) +{ + if(use_mcast_) + sprintf(dst, "%s", mcast_groupname ); + return use_mcast_; +} + +Boolean NetworkStartUDPServer(OSCPacketBuffer packet, int port_id) { + struct sockaddr_in my_addr; + my_addr.sin_family = AF_INET; + my_addr.sin_port = htons(port_id); + my_addr.sin_addr.s_addr = INADDR_ANY; + + memset( &(my_addr.sin_zero), 0, 8); + + if( use_mcast_ ) + { + struct ip_mreq mcast_req; + int on = 1; + int err= 0; + memset( &mcast_req, 0, sizeof(mcast_req)); + packet->returnAddr->sockfd = socket( AF_INET, SOCK_DGRAM, 0); +#ifdef SO_REUSEADDR + setsockopt( packet->returnAddr->sockfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); +#endif +#ifdef SO_REUSEPORT + setsockopt( packet->returnAddr->sockfd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)); +#endif + err = bind( packet->returnAddr->sockfd, (struct sockaddr*) &my_addr, sizeof( my_addr )); + if( err < 0 ) + return FALSE; + + mcast_req.imr_multiaddr.s_addr = inet_addr( mcast_groupname ); + mcast_req.imr_interface.s_addr = htonl( INADDR_ANY ); + setsockopt( packet->returnAddr->sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, + &mcast_req, sizeof(mcast_req) ); + } + else + { + packet->returnAddr->sockfd = socket(AF_INET, SOCK_DGRAM, 0); + if( bind( packet->returnAddr->sockfd, + (struct sockaddr*) &my_addr, + sizeof(struct sockaddr)) == -1) return FALSE; + + packet->returnAddr->clilen = sizeof(struct sockaddr); + } + return TRUE; +} diff --git a/veejay-server/libOSC/OSC-receive.h b/veejay-server/libOSC/OSC-receive.h new file mode 100644 index 00000000..d231390e --- /dev/null +++ b/veejay-server/libOSC/OSC-receive.h @@ -0,0 +1,242 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + + +/* + OSC-receive.h + Matt Wright, 11/18/97 + + include OSC-timetag.h and NetworkReturnAddress.h before this file. +*/ + + +/************************************************** + Initialization and memory pre-allocation + **************************************************/ + +/* The memory model used by this module is pre-allocation of fixed-size + objects for network buffers and other internal objects. This preallocated + memory is dynamically managed internally by a custom high-performance memory + allocator. When the preallocated memory runs out, this module calls an + optional realtime memory allocator that you provide. If your memory + allocator gives this module more memory, it will add it to the pool of + objects and never free the memory. If your system does not have a realtime + memory allocator, provide a procedure that always returns 0. + + You will fill an OSCReceiveMemoryTuner struct with the parameters that + determine how memory will be allocated. + + The MemoryAllocator fields are procedures you will provide that allocate + memory. Like malloc(), they take the number of bytes as arguments and return + either a pointer to the new memory or 0 for failure. This memory will never + be freed. + +- The InitTimeMemoryAllocator will be called only at initialization time, + i.e., before OSCInitAddressSpace() returns. If it ever returns 0, that's + a fatal error. + +- The RealTimeMemoryAllocator will be called if, while the application is + running, the address space grows larger than can fit in what was allocated + at initialization time. If the RealTimeMemoryAllocator() returns 0, the + operation attempting to grow the address space will fail. If your system + does not have real-time memory allocation, RealTimeMemoryAllocator should + be a procedure that always returns 0. + + The remaining fields say how much memory to allocate at initialization time: + +- receiveBufferSize is the maximum packet size that can be received. Is the + maximum UDP packet size 4096? OSC clients can send a query to this system + asking for this maximum packet size. + +- numReceiveBuffers determines how many packets at a time can be sitting + on the scheduler with messages waiting to take effect. If all the + receive buffers are tied up like this, you won't be able to receive + new packets. + +- numQueuedObjects is the number of messages and packets that can be sitting + on the scheduler waiting to take effect. + +- Because a message pattern may be dispatched before the message takes effect, + we need memory to store the callback pointers corresponding to a message. + numCallbackListNodes is the number of callbacks that may be stored in this + fashion. It must be at least as large as the maximum number of methods that + any one message pattern may match, but if you want to take advantage of + pre-dispatching, this should be large enough to hold all the callbacks for + all the messages waiting in the scheduler. + +*/ + +struct OSCReceiveMemoryTuner { + void *(*InitTimeMemoryAllocator)(int numBytes); + void *(*RealTimeMemoryAllocator)(int numBytes); + int receiveBufferSize; + int numReceiveBuffers; + int numQueuedObjects; + int numCallbackListNodes; +}; + +/* Given an OSCReceiveMemoryTuner, return the number of bytes of + memory that would be allocated if OSCInitReceive() were called + on it. */ +int OSCReceiveMemoryThatWouldBeAllocated(struct OSCReceiveMemoryTuner *t); + +/* Returns FALSE if it fails to initialize */ +Boolean OSCInitReceive(struct OSCReceiveMemoryTuner *t); + +/************************************************** + Managing packet data structures + **************************************************/ + + +/* You don't get to know what's in an OSCPacketBuffer. */ +typedef struct OSCPacketBuffer_struct *OSCPacketBuffer; + +/* Get an unused packet. Returns 0 if none are free. If you get a packet + with this procedure, it is your responsibility either to call + OSCAcceptPacket() on it (in which case the internals of the OSC Kit free + the OSCPacketBuffer after the last message in it takes effect) or to call + OSCFreePacket() on it. */ +OSCPacketBuffer OSCAllocPacketBuffer(void); + +/* Free. This is called automatically after the last message that was + in the packet is invoked. You shouldn't need to call this unless + you get a packet with OSCAllocPacketBuffer() and then for some reason + decide not to call OSCAcceptPacket() on it. */ +void OSCFreePacket(OSCPacketBuffer p); + +void OSCFreeReceiver(void); + +/* Whatever code actually gets packets from the network should use these + three selectors to access the fields in the packet structure that need + to be filled in with the data from the network. */ + +/* Selector to get the buffer from a packet. This buffer's size will be + equal to the receiveBufferSize you passed to OSCInitReceive(). */ +char *OSCPacketBufferGetBuffer(OSCPacketBuffer p); + +/* Selector to get a pointer to the int that's the size count for the + data currently in a packet. (Not the capacity of the packet's buffer, + but the size of the packet that's actually stored in the buffer.) */ +int *OSCPacketBufferGetSize(OSCPacketBuffer); + +/* Selector to get the client's network address from a packet. This buffer's + size will be equal to the clientAddrSize you passed to OSCInitReceive(). + Note that the NetworkReturnAddressPtr type is full of "const"s, so your + code that fills in the return address will probably have to cast the return + value of this procedure to some non-const type to be able to write into it. */ +NetworkReturnAddressPtr OSCPacketBufferGetClientAddr(OSCPacketBuffer p); + +/* Returns the capacity of packet buffers (the receiveBufferSize you passed + to OSCInitReceive()). */ +int OSCGetReceiveBufferSize(void); + + +/************************************************** + Dealing with OpenSoundControl packets and + making the messages take effect. + **************************************************/ + +/* Call this as soon as a packet comes in from the network. + It will take care of anything that has to happen immediately, + but put off as much as possible of the work of parsing the + packet. (This tries to be as fast as possible in case a + lot of packets come in.) */ +void OSCAcceptPacket(OSCPacketBuffer packet); + +/* Call this during an otherwise idle time. It goes through + everything that's sitting in the OSC scheduler waiting to + happen and does some of the work of parsing, pattern + matching, dispatching, etc., that will have to be done + at some point before the scheduled messages can take + effect. + + The return value indicates whether there is more work of + this sort that could be done. (Each time you call this, + it does only a small unit of this kind of work. If it + returns TRUE and you still have time before the next thing + you have to do, call it again.) */ +Boolean OSCBeProductiveWhileWaiting(void); + +/* Call this whenever enough time has passed that you want to see which + messages are now ready and have them take effect. (For example, in a + synthesizer, you might call this once per synthesis frame, just before + synthesizing the audio for that frame.) + + This procedure finds the earliest time tag of all the queued messages + and invokes *all* of the queued messages with that time tag. (OSC + guarantees that messages with the same tag take effect atomically.) + If there are more messages that are ready, but with a different time + tag, this procedure does not invoke them, but returns TRUE to indicate + that more messages are ready. +*/ +Boolean OSCInvokeMessagesThatAreReady(OSCTimeTag now); + +/* Same thing, but invokes all of the messages whose time has come. */ +void OSCInvokeAllMessagesThatAreReady(OSCTimeTag now); + +Boolean NetworkReceivePacket(OSCPacketBuffer packet); + +Boolean NetworkStartUDPServer(OSCPacketBuffer packet, int port_id); + +Boolean NetworkPacketWaiting(OSCPacketBuffer packet); + +void GoMultiCast(const char *groupname); + +int IsMultiCast( char *dst); + +/************************************************** + How to use this stuff + **************************************************/ + +/* Here's a gross approximation of how your application will invoke the + procedures in this module: + +while (1) { + OSCTimeTag now = CurrentTime(); + do { + if (WeAreSoLateThatWeNeedToDelayOSCMessagesToAvoidACrisis()) break; + } while (OSCInvokeMessagesThatAreReady(now) == TRUE); + + SynthesizeSomeSound(); + if (NetworkPacketWaiting()) { + OSCPacketBuffer p = OSCAllocPacketBuffer(); + if (!p) { + Bummer(); + } else { + NetworkReceivePacket(p); + OSCAcceptPacket(p); + } + } + while (TimeLeftBeforeWeHaveDoSomething()) { + if (!OSCBeProductiveWhileWaiting()) break; + } +} + +*/ + diff --git a/veejay-server/libOSC/OSC-string-help.c b/veejay-server/libOSC/OSC-string-help.c new file mode 100644 index 00000000..f42086e8 --- /dev/null +++ b/veejay-server/libOSC/OSC-string-help.c @@ -0,0 +1,123 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* OSC-string-help.c + Procedures that could be useful to programmers writing OSC methods that + take string arguments. + + by Matt Wright, 3/19/98 +*/ + +#include /* For Boolean */ +#include +#include +#define STRING_ALIGN_PAD 4 + +char *OSCDataAfterAlignedString(const char *string, const char *boundary, char **errorMsg) { + + int i; + + if ((boundary - string) %4 != 0) { + fatal_error("DataAfterAlignedString: bad boundary\n"); + } + + for (i = 0; string[i] != '\0'; i++) { + if (string + i >= boundary) { + (*errorMsg) = "DataAfterAlignedString: Unreasonably long string"; + return 0; + } + } + + /* Now string[i] is the first null character */ + i++; + + for (; (i % STRING_ALIGN_PAD) != 0; i++) { + if (string + i >= boundary) { + (*errorMsg) = "Unreasonably long string"; + return 0; + } + if (string[i] != '\0') { + (*errorMsg) = "Incorrectly padded string."; + return 0; + } + } + + return (char *) (string+i); +} + +int OSCPaddedStrlen(const char *s) { + int i; + + for (i = 0; *s != '\0'; s++, i++) { + /* do nothing */ + } + + /* Now i is the length with no null bytes. We need 1-4 null bytes, + to make the total length a multiple of 4. So we add 4, as if + we need 4 null bytes, then & 0xfffffffc to round down to the nearest + multiple of 4. */ + + return (i + 4) & 0xfffffffc; +} + +char *OSCPaddedStrcpy(char *target, const char *source) { + while ( (*target++) = (*source++)) { + /* do nothing */ + } + + /* That copied one null byte */ + while (((int) target) % 4 != 0) { + *target = '\0'; + target++; + } + return target; +} + +Boolean OSCParseStringList(const char *result[], int *numStrings, int maxStrings, + const char *args, int numBytes) { + int numFound; + const char *p; + const char *boundary = args + numBytes; + char *errorMessage; + + p = args; + + for (numFound = 0; numFound < maxStrings; ++numFound) { + if (p == boundary) { + *numStrings = numFound; + return TRUE; + } + + result[numFound] = p; + p = OSCDataAfterAlignedString(p, boundary, &errorMessage); + if (p == 0) return FALSE; + } + return FALSE; +} + diff --git a/veejay-server/libOSC/OSC-string-help.h b/veejay-server/libOSC/OSC-string-help.h new file mode 100644 index 00000000..03cd79c5 --- /dev/null +++ b/veejay-server/libOSC/OSC-string-help.h @@ -0,0 +1,70 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* OSC-string-help.h + Procedures that could be useful to programmers writing OSC methods that + take string arguments. + + by Matt Wright, 3/19/98 +*/ + +/* Use this to deal with OSC null-padded 4 byte-aligned strings + + The argument is a block of data beginning with a string. The string + has (presumably) been padded with extra null characters so that the + overall length is a multiple of 4 bytes. Return a pointer to the next + byte after the null byte(s). The boundary argument points to the + character after the last valid character in the buffer---if the string + hasn't ended by there, something's wrong. + + If the data looks wrong, return 0, and set *errorMsg */ + +char *OSCDataAfterAlignedString(const char *string, const char *boundary, char **errorMsg); + + +/* Given a normal C-style string with a single padding byte, return the + length of the string including the necessary 1-4 padding bytes. + (Basically strlen()+1 rounded up to the next multiple of 4.) */ +int OSCPaddedStrlen(const char *s); + +/* Copy a given C-style string into the given destination, including the + requisite padding byte(s). Unlike strcpy(), this returns a pointer to + the next character after the copied string's null bytes, like + what OSCDataAfterAlignedString() returns. */ +char *OSCPaddedStrcpy(char *target, const char *source); + + +/* Given an args pointer that should be nothing but a list of strings, fill + result[] with pointers to the beginnings of each string, and set + *numStrings to be the number of strings found. maxStrings gives the size + of the result array. Return FALSE if any strings are malformatted or if + there are more than maxStrings many strings. */ + +Boolean OSCParseStringList(const char *result[], int *numStrings, int maxStrings, + const char *args, int numBytes); diff --git a/veejay-server/libOSC/OSC-struct.h b/veejay-server/libOSC/OSC-struct.h new file mode 100644 index 00000000..6e17b15d --- /dev/null +++ b/veejay-server/libOSC/OSC-struct.h @@ -0,0 +1,56 @@ +#include +#include +#include +#include + +#ifndef OSCH +#define OSCH +#ifndef TRUE +typedef int Boolean; +#define TRUE 1 +#define FALSE 0 +#endif + + +/* Fixed byte width types */ +typedef int int4; /* 4 byte int */ +typedef struct NetworkReturnAddressStruct_t { + struct sockaddr_in cl_addr; /* client information */ + struct sockaddr_in my_addr; /* us */ + int clilen; + int sockfd; + fd_set readfds; + struct timeval tv; + int fdmax; +} NetworkReturnAddressStruct; + + +typedef struct OSCPacketBuffer_struct { + char *buf; /* Contents of network packet go here */ + int n; /* Overall size of packet */ + int refcount; /* # queued things using memory from this buffer */ + struct OSCPacketBuffer_struct *nextFree; /* For linked list of free packets */ + + Boolean returnAddrOK; /* Because returnAddr points to memory we need to + store future return addresses, we set this + field to FALSE in situations where a packet + buffer "has no return address" instead of + setting returnAddr to 0 */ + + void *returnAddr; /* Addr of client this packet is from */ + /* This was of type NetworkReturnAddressPtr, but the constness + was making it impossible for me to initialize it. There's + probably a better way that I don't understand. */ + +} OSCPacketBuffer; + +struct OSCReceiveMemoryTuner { + void *(*InitTimeMemoryAllocator)(int numBytes); + void *(*RealTimeMemoryAllocator)(int numBytes); + int receiveBufferSize; + int numReceiveBuffers; + int numQueuedObjects; + int numCallbackListNodes; +}; + +#endif diff --git a/veejay-server/libOSC/OSC-timetag.c b/veejay-server/libOSC/OSC-timetag.c new file mode 100644 index 00000000..22140691 --- /dev/null +++ b/veejay-server/libOSC/OSC-timetag.c @@ -0,0 +1,174 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* + + OSC_timeTag.c: library for manipulating OSC time tags + Matt Wright, 5/29/97 + + Version 0.2 (9/11/98): cleaned up so no explicit type names in the .c file. + +*/ + +#include +#include +#include + +#ifdef HAS8BYTEINT +#define TWO_TO_THE_32_FLOAT 4294967296.0f + +OSCTimeTag OSCTT_Immediately(void) { + return (OSCTimeTag) 1; +} + +OSCTimeTag OSCTT_BiggestPossibleTimeTag(void) { + return (OSCTimeTag) 0xffffffffffffffff; +} + +OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) { + int8 offset = (int8) (secondsOffset * TWO_TO_THE_32_FLOAT); + +/* printf("* OSCTT_PlusSeconds %llx plus %f seconds (i.e., %lld offset) is %llx\n", original, + secondsOffset, offset, original + offset); */ + + return original + offset; +} + +int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right) { +#if 0 + printf("***** OSCTT_Compare(%llx, %llx): %d\n", left, right, + (left + +#define SECONDS_FROM_1900_to_1970 2208988800 /* 17 leap years */ +#define TWO_TO_THE_32_OVER_ONE_MILLION 4295 + + +OSCTimeTag OSCTT_CurrentTime(void) { + uint8 result; + uint4 usecOffset; + struct timeval tv; + struct timezone tz; + + BSDgettimeofday(&tv, &tz); + + /* First get the seconds right */ + result = (unsigned) SECONDS_FROM_1900_to_1970 + + (unsigned) tv.tv_sec - + (unsigned) 60 * tz.tz_minuteswest + + (unsigned) (tz.tz_dsttime ? 3600 : 0); + +#if 0 + /* No timezone, no DST version ... */ + result = (unsigned) SECONDS_FROM_1900_to_1970 + + (unsigned) tv.tv_sec; +#endif + + + /* make seconds the high-order 32 bits */ + result = result << 32; + + /* Now get the fractional part. */ + usecOffset = (unsigned) tv.tv_usec * (unsigned) TWO_TO_THE_32_OVER_ONE_MILLION; + /* printf("** %ld microsec is offset %x\n", tv.tv_usec, usecOffset); */ + + result += usecOffset; + +/* printf("* OSCTT_CurrentTime is %llx\n", result); */ + return result; +} + +#else /* __sgi */ + +/* Instead of asking your operating system what time it is, it might be + clever to find out the current time at the instant your application + starts audio processing, and then keep track of the number of samples + output to know how much time has passed. */ + +/* Loser version for systems that have no ability to tell the current time: */ +OSCTimeTag OSCTT_CurrentTime(void) { + return (OSCTimeTag) 1; +} + +#endif /* __sgi */ + + +#else /* Not HAS8BYTEINT */ + +OSCTimeTag OSCTT_CurrentTime(void) { + OSCTimeTag result; + result.seconds = 0; + result.fraction = 1; + return result; +} + +OSCTimeTag OSCTT_BiggestPossibleTimeTag(void) { + OSCTimeTag result; + result.seconds = 0xffffffff; + result.fraction = 0xffffffff; + return result; +} + +OSCTimeTag OSCTT_Immediately(void) { + OSCTimeTag result; + result.seconds = 0; + result.fraction = 1; + return result; +} + +OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) { + OSCTimeTag result; + result.seconds = 0; + result.fraction = 1; + return result; +} + +int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right) { + /* Untested! */ + int highResult = left.seconds - right.seconds; + + if (highResult != 0) return highResult; + + return left.fraction - right.fraction; +} + + +#endif /* HAS8BYTEINT */ + diff --git a/veejay-server/libOSC/OSC-timetag.h b/veejay-server/libOSC/OSC-timetag.h new file mode 100644 index 00000000..7e6cbe62 --- /dev/null +++ b/veejay-server/libOSC/OSC-timetag.h @@ -0,0 +1,91 @@ +/* +Copyright 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + + +/* + OSC_timeTag.h: library for manipulating OSC time tags + Matt Wright, 5/29/97 + + Time tags in OSC have the same format as in NTP: 64 bit fixed point, with the + top 32 bits giving number of seconds sinve midnight 1/1/1900 and the bottom + 32 bits giving fractional parts of a second. We represent this by an 8-byte + unsigned long if possible, or else a struct. + + NB: On many architectures with 8-byte ints, it's illegal (like maybe a bus error) + to dereference a pointer to an 8 byte int that's not 8-byte aligned. +*/ + +#ifndef OSC_TIMETAG +#define OSC_TIMETAG + +#ifdef __sgi + #define HAS8BYTEINT + /* You may have to change this typedef if there's some other + way to specify 8 byte ints on your system */ + typedef long long int8; + typedef unsigned long long uint8; + typedef unsigned long uint4; +#else + /* You may have to redefine this typedef if ints on your system + aren't 4 bytes. */ + typedef unsigned int uint4; +#endif + + +#ifdef HAS8BYTEINT + typedef uint8 OSCTimeTag; +#else + typedef struct { + uint4 seconds; + uint4 fraction; + } OSCTimeTag; +#endif + + + +/* Return a time tag representing the current time (as of when this + procedure is called). */ +OSCTimeTag OSCTT_CurrentTime(void); + +/* Return the time tag 0x0000000000000001, indicating to the receiving device + that it should process the message immediately. */ +OSCTimeTag OSCTT_Immediately(void); + +/* Return the time tag 0xffffffffffffffff, a time so far in the future that + it's effectively infinity. */ +OSCTimeTag OSCTT_BiggestPossibleTimeTag(void); + +/* Given a time tag and a number of seconds to add to the time tag, return + the new time tag */ +OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset); + +/* Compare two time tags. Return negative if first is < second, 0 if + they're equal, and positive if first > second. */ +int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right); + +#endif /* OSC_TIMETAG */ diff --git a/veejay-server/libOSC/libosc.h b/veejay-server/libOSC/libosc.h new file mode 100644 index 00000000..ed890b0a --- /dev/null +++ b/veejay-server/libOSC/libosc.h @@ -0,0 +1,26 @@ +#ifndef _LIBOSC_H_INCLUDED +#define _LIBOSC_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/veejay-server/libel/Makefile.am b/veejay-server/libel/Makefile.am new file mode 100644 index 00000000..0e9e28fd --- /dev/null +++ b/veejay-server/libel/Makefile.am @@ -0,0 +1,12 @@ +# Makefile for veejay + +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem \ + -I$(top_srcdir)/vjmsg \ + $(MJPEGTOOLS_CFLAGS) $(FFMPEG_CFLAGS) $(PIXBUF_CFLAGS) \ + $(LIBQUICKTIME_CFLAGS) + +VJEL_LIB_FILE = libel.la +noinst_LTLIBRARIES = $(VJEL_LIB_FILE) +libel_la_SOURCES = vj-mmap.c elcache.c avilib.c lav_io.c vj-dv.c rawdv.c pixbuf.c vj-avcodec.c vj-el.c diff --git a/veejay-server/libel/Makefile.in b/veejay-server/libel/Makefile.in new file mode 100644 index 00000000..7635889e --- /dev/null +++ b/veejay-server/libel/Makefile.in @@ -0,0 +1,520 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Makefile for veejay + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libel +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libel_la_LIBADD = +am_libel_la_OBJECTS = vj-mmap.lo elcache.lo avilib.lo lav_io.lo \ + vj-dv.lo rawdv.lo pixbuf.lo vj-avcodec.lo vj-el.lo +libel_la_OBJECTS = $(am_libel_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libel_la_SOURCES) +DIST_SOURCES = $(libel_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem \ + -I$(top_srcdir)/vjmsg \ + $(MJPEGTOOLS_CFLAGS) $(FFMPEG_CFLAGS) $(PIXBUF_CFLAGS) \ + $(LIBQUICKTIME_CFLAGS) + +VJEL_LIB_FILE = libel.la +noinst_LTLIBRARIES = $(VJEL_LIB_FILE) +libel_la_SOURCES = vj-mmap.c elcache.c avilib.c lav_io.c vj-dv.c rawdv.c pixbuf.c vj-avcodec.c vj-el.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libel/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libel/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libel.la: $(libel_la_OBJECTS) $(libel_la_DEPENDENCIES) + $(LINK) $(libel_la_OBJECTS) $(libel_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avilib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elcache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lav_io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawdv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-avcodec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-dv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-el.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-mmap.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/libel/avilib.c b/veejay-server/libel/avilib.c new file mode 100644 index 00000000..c579eb18 --- /dev/null +++ b/veejay-server/libel/avilib.c @@ -0,0 +1,3785 @@ +/* + * avilib.c + * + * Copyright (C) Thomas streich - June 2001 + * multiple audio track support Copyright (C) 2002 Thomas streich + * + * Original code: + * Copyright (C) 1999 Rainer Johanni + * + * This file is part of transcode, a video stream processing tool + * + * transcode is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * transcode 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 Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include +#include +#include +#include +#include "avilib.h" +#ifdef STRICT_CHECKING +#include +#endif +#define INFO_LIST + +// add a new riff chunk after XX MB +//#define NEW_RIFF_THRES (1900*1024*1024) +#define NEW_RIFF_THRES (1900*1024*1024) +//#define NEW_RIFF_THRES (10*1024*1024) + +// Maximum number of indices per stream +#define NR_IXNN_CHUNKS 32 +/* There is an experimental kernel patch available at + * http://www.tech9.net/rml/linux/ + * that adds the O_STREAMING flag for open(). Files opened this way will + * bypass the linux buffer cache entirely, so that writing multi-gigabyte files + * with lavrec will not cause everything in memory to get swapped to disk. + * This is highly desirable, hopefuly it will be merged with the mainstream + * kernel. + * + * we leave it out if it's unknown, since its value differs per arch... + */ + + +#ifndef O_STREAMING +#define O_STREAMING 0 +#endif + + +#define DEBUG_ODML +#undef DEBUG_ODML + +/* The following variable indicates the kind of error */ + +long AVI_errno = 0; + +#define MAX_INFO_STRLEN 64 +static char id_str[MAX_INFO_STRLEN]; + +#define FRAME_RATE_SCALE 1000000 + +extern int vj_el_get_decoder_from_fourcc( const char *fourcc ); + + +/******************************************************************* + * * + * Utilities for writing an AVI File * + * * + *******************************************************************/ + +static ssize_t avi_read(int fd, char *buf, size_t len) +{ + ssize_t n = 0; + ssize_t r = 0; + + while (r < len) { + n = read (fd, buf + r, len - r); + if (n == 0) + break; + if (n < 0) { + if (errno == EINTR) + continue; + else + break; + } + + r += n; + } + + return r; +} + +static ssize_t avi_write (int fd, char *buf, size_t len) +{ + ssize_t n = 0; + ssize_t r = 0; + + while (r < len) { + n = write (fd, buf + r, len - r); + if (n < 0) + return n; + + r += n; + } + return r; +} + +/* HEADERBYTES: The number of bytes to reserve for the header */ + +#define HEADERBYTES 2048 + +/* AVI_MAX_LEN: The maximum length of an AVI file, we stay a bit below + the 2GB limit (Remember: 2*10^9 is smaller than 2 GB) */ + +#define AVI_MAX_LEN (UINT_MAX-(1<<20)*16-HEADERBYTES) + +#define PAD_EVEN(x) ( ((x)+1) & ~1 ) + + +/* Copy n into dst as a 4 or 2 byte, little endian number. + Should also work on big endian machines */ + +static void long2str(unsigned char *dst, int32_t n) +{ + dst[0] = (n )&0xff; + dst[1] = (n>> 8)&0xff; + dst[2] = (n>>16)&0xff; + dst[3] = (n>>24)&0xff; +} + +#ifdef WORDS_BIGENDIAN +static void short2str(unsigned char *dst, int32_t n) +{ + dst[0] = (n )&0xff; + dst[1] = (n>> 8)&0xff; +} +#endif + +/* Convert a string of 4 or 2 bytes to a number, + also working on big endian machines */ + +static uint64_t str2ullong(unsigned char *str) +{ + uint64_t r = (str[0] | (str[1]<<8) | (str[2]<<16) | (str[3]<<24)); + uint64_t s = (str[4] | (str[5]<<8) | (str[6]<<16) | (str[7]<<24)); + return ((s<<32)&0xffffffff00000000ULL)|(r&0xffffffffULL); +} + +static uint32_t str2ulong(unsigned char *str) +{ + return ( str[0] | (str[1]<<8) | (str[2]<<16) | (str[3]<<24) ); +} +static uint32_t str2ushort(unsigned char *str) +{ + return ( str[0] | (str[1]<<8) ); +} + +// bit 31 denotes a keyframe +static uint32_t str2ulong_len (unsigned char *str) +{ + return str2ulong(str) & 0x7fffffff; +} + + +// if bit 31 is 0, its a keyframe +static uint32_t str2ulong_key (unsigned char *str) +{ + uint32_t c = str2ulong(str); + c &= 0x80000000; + if (c == 0) return 0x10; + else return 0; +} + +/* Calculate audio sample size from number of bits and number of channels. + This may have to be adjusted for eg. 12 bits and stereo */ + +static int avi_sampsize(avi_t *AVI, int j) +{ + int s; + s = ((AVI->track[j].a_bits+7)/8)*AVI->track[j].a_chans; + // if(s==0) s=1; /* avoid possible zero divisions */ + if(s<4) s=4; /* avoid possible zero divisions */ + return s; +} + +/* Add a chunk (=tag and data) to the AVI file, + returns -1 on write error, 0 on success */ + +static int avi_add_chunk(avi_t *AVI, unsigned char *tag, unsigned char *data, int length) +{ + unsigned char c[8]; + char p=0; + + /* Copy tag and length int c, so that we need only 1 write system call + for these two values */ + + veejay_memcpy(c,tag,4); + long2str(c+4,length); + + /* Output tag, length and data, restore previous position + if the write fails */ + + if( avi_write(AVI->fdes,(char *)c,8) != 8 || + avi_write(AVI->fdes,(char *)data,length) != length || + avi_write(AVI->fdes,&p,length&1) != (length&1)) // if len is uneven, write a pad byte + { + lseek(AVI->fdes,AVI->pos,SEEK_SET); + AVI_errno = AVI_ERR_WRITE; + return -1; + } + + /* Update file position */ + + AVI->pos += 8 + PAD_EVEN(length); + + //fprintf(stderr, "pos=%lu %s\n", AVI->pos, tag); + + return 0; +} + +#define OUTD(n) long2str(ix00+bl,n); bl+=4 +#define OUTW(n) ix00[bl] = (n)&0xff; ix00[bl+1] = (n>>8)&0xff; bl+=2 +#define OUTC(n) ix00[bl] = (n)&0xff; bl+=1 +#define OUTS(s) veejay_memcpy(ix00+bl,s,4); bl+=4 + +// this does the physical writeout of the ix## structure +static int avi_ixnn_entry(avi_t *AVI, avistdindex_chunk *ch, avisuperindex_entry *en) +{ + int bl, k; + unsigned int max = ch->nEntriesInUse * sizeof (uint32_t) * ch->wLongsPerEntry + 24; // header + char *ix00 = vj_malloc (max); + char dfcc[5]; + veejay_memcpy (dfcc, ch->fcc, 4); + dfcc[4] = 0; + + bl = 0; + + if (en) { + en->qwOffset = AVI->pos; + en->dwSize = max; + //en->dwDuration = ch->nEntriesInUse -1; // NUMBER OF stream ticks == frames for video/samples for audio + } + +#ifdef DEBUG_ODML + //printf ("ODML Write %s: Entries %ld size %d \n", dfcc, ch->nEntriesInUse, max); +#endif + + //OUTS(ch->fcc); + //OUTD(max); + OUTW(ch->wLongsPerEntry); + OUTC(ch->bIndexSubType); + OUTC(ch->bIndexType); + OUTD(ch->nEntriesInUse); + OUTS(ch->dwChunkId); + OUTD(ch->qwBaseOffset&0xffffffff); + OUTD((ch->qwBaseOffset>>32)&0xffffffff); + OUTD(ch->dwReserved3); + + for (k = 0; k < ch->nEntriesInUse; k++) { + OUTD(ch->aIndex[k].dwOffset); + OUTD(ch->aIndex[k].dwSize); + + } + avi_add_chunk (AVI, ch->fcc, ix00, max); + + free(ix00); + + return 0; +} +#undef OUTS +#undef OUTW +#undef OUTD +#undef OUTC + +// inits a super index structure including its enclosed stdindex +static int avi_init_super_index(avi_t *AVI, unsigned char *idxtag, avisuperindex_chunk **si) +{ + int k; + + avisuperindex_chunk *sil = NULL; + + if ((sil = (avisuperindex_chunk *) vj_malloc (sizeof (avisuperindex_chunk))) == NULL) { + AVI_errno = AVI_ERR_NO_MEM; + return -1; + } + veejay_memset(sil, 0, sizeof (avisuperindex_chunk)); + veejay_memcpy (sil->fcc, "indx", 4); + sil->dwSize = 0; // size of this chunk + sil->wLongsPerEntry = 4; + sil->bIndexSubType = 0; + sil->bIndexType = AVI_INDEX_OF_INDEXES; + sil->nEntriesInUse = 0; // none are in use + veejay_memcpy (sil->dwChunkId, idxtag, 4); + veejay_memset (sil->dwReserved, 0, sizeof (sil->dwReserved)); + + // NR_IXNN_CHUNKS == allow 32 indices which means 32 GB files -- arbitrary + sil->aIndex = vj_malloc (sil->wLongsPerEntry * NR_IXNN_CHUNKS * sizeof (uint32_t)); + if (!sil->aIndex) { + AVI_errno = AVI_ERR_NO_MEM; + return -1; + } + veejay_memset (sil->aIndex, 0, sil->wLongsPerEntry * NR_IXNN_CHUNKS * sizeof (uint32_t)); + + sil->stdindex = vj_malloc (NR_IXNN_CHUNKS * sizeof (avistdindex_chunk *)); + if (!sil->stdindex) { + AVI_errno = AVI_ERR_NO_MEM; + return -1; + } + for (k = 0; k < NR_IXNN_CHUNKS; k++) { + sil->stdindex[k] = vj_malloc (sizeof (avistdindex_chunk)); + veejay_memset(sil->stdindex[k], 0, sizeof (avistdindex_chunk)); + // gets rewritten later + sil->stdindex[k]->qwBaseOffset = (uint64_t)k * NEW_RIFF_THRES; + } + + *si = sil; + + return 0; +} + +// fills an alloc'ed stdindex structure and vj_mallocs some entries for the actual chunks +static int avi_add_std_index(avi_t *AVI, unsigned char *idxtag, unsigned char *strtag, + avistdindex_chunk *stdil) +{ + + veejay_memcpy (stdil->fcc, idxtag, 4); + stdil->dwSize = 4096; + stdil->wLongsPerEntry = 2; //sizeof(avistdindex_entry)/sizeof(uint32_t); + stdil->bIndexSubType = 0; + stdil->bIndexType = AVI_INDEX_OF_CHUNKS; + stdil->nEntriesInUse = 0; + + // cp 00db ChunkId + veejay_memcpy(stdil->dwChunkId, strtag, 4); + + //stdil->qwBaseOffset = AVI->video_superindex->aIndex[ cur_std_idx ]->qwOffset; + + stdil->aIndex = vj_malloc(stdil->dwSize * sizeof (uint32_t) * stdil->wLongsPerEntry); + + if (!stdil->aIndex) { + AVI_errno = AVI_ERR_NO_MEM; + return -1; + } + + + return 0; +} + +static int avi_add_odml_index_entry_core(avi_t *AVI, long flags, off_t pos, unsigned long len, avistdindex_chunk *si) +{ + int cur_chunk_idx; + // put new chunk into index + si->nEntriesInUse++; + cur_chunk_idx = si->nEntriesInUse-1; + + // need to fetch more memory + if (cur_chunk_idx >= si->dwSize) { + si->dwSize += 4096; + si->aIndex = realloc ( si->aIndex, si->dwSize * sizeof (uint32_t) * si->wLongsPerEntry); + } + + if(len>AVI->max_len) AVI->max_len=len; + + // if bit 31 is set, it is NOT a keyframe + if (flags != 0x10) { + len |= 0x80000000; + } + + si->aIndex [ cur_chunk_idx ].dwSize = len; + si->aIndex [ cur_chunk_idx ].dwOffset = + pos - si->qwBaseOffset + 8; + + //printf("ODML: POS: 0x%lX\n", si->aIndex [ cur_chunk_idx ].dwOffset); + + return 0; +} + +static int avi_add_odml_index_entry(avi_t *AVI, unsigned char *tag, long flags, off_t pos, unsigned long len) +{ + char fcc[5]; + + int audio = (strchr (tag, 'w')?1:0); + int video = !audio; + + unsigned int cur_std_idx; + int audtr; + off_t towrite = 0LL; + + if (video) { + + if (!AVI->video_superindex) { + if (avi_init_super_index(AVI, "ix00", &AVI->video_superindex) < 0) return -1; + AVI->video_superindex->nEntriesInUse++; + cur_std_idx = AVI->video_superindex->nEntriesInUse-1; + + if (avi_add_std_index (AVI, "ix00", "00db", AVI->video_superindex->stdindex[ cur_std_idx ]) < 0) + return -1; + } // init + + } // video + + if (audio) { + + fcc[0] = 'i'; fcc[1] = 'x'; fcc[2] = tag[0]; fcc[3] = tag[1]; fcc[4] = '\0'; + if (!AVI->track[AVI->aptr].audio_superindex) { + +#ifdef DEBUG_ODML + printf("ODML: fcc = %s\n", fcc); +#endif + if (avi_init_super_index(AVI, fcc, &AVI->track[AVI->aptr].audio_superindex) < 0) return -1; + + + AVI->track[AVI->aptr].audio_superindex->nEntriesInUse++; + + snprintf(fcc, sizeof(fcc), "ix%02d", AVI->aptr+1); + if (avi_add_std_index (AVI, fcc, tag, AVI->track[AVI->aptr].audio_superindex->stdindex[ + AVI->track[AVI->aptr].audio_superindex->nEntriesInUse - 1 ]) < 0 + ) return -1; + } // init + + } + + towrite = 0; + if (AVI->video_superindex) { + + cur_std_idx = AVI->video_superindex->nEntriesInUse-1; + towrite += AVI->video_superindex->stdindex[cur_std_idx]->nEntriesInUse*8 + + 4+4+2+1+1+4+4+8+4; + if (cur_std_idx == 0) { + towrite += AVI->n_idx*16 + 8; + towrite += HEADERBYTES; + } + } + + for (audtr=0; audtranum; audtr++) { + if (AVI->track[audtr].audio_superindex) { + cur_std_idx = AVI->track[audtr].audio_superindex->nEntriesInUse-1; + towrite += AVI->track[audtr].audio_superindex->stdindex[cur_std_idx]->nEntriesInUse*8 + + 4+4+2+1+1+4+4+8+4; + } + } + towrite += len + (len&1) + 8; + + //printf("ODML: towrite = 0x%llX = %lld\n", towrite, towrite); + + if (AVI->video_superindex && + (off_t)(AVI->pos+towrite) > (off_t)((off_t)NEW_RIFF_THRES*AVI->video_superindex->nEntriesInUse)) { + +// fprintf(stderr, "Adding a new RIFF chunk: %d\n", AVI->video_superindex->nEntriesInUse); + veejay_msg( 2, "Adding a new RIFF chunk: %d", AVI->video_superindex->nEntriesInUse ); + + // rotate ALL indices + AVI->video_superindex->nEntriesInUse++; + cur_std_idx = AVI->video_superindex->nEntriesInUse-1; + + if (AVI->video_superindex->nEntriesInUse > NR_IXNN_CHUNKS) { + veejay_msg(0, "Internal error in avilib - redefine NR_IXNN_CHUNKS (needed=%d, current=%d)", + AVI->video_superindex->nEntriesInUse, NR_IXNN_CHUNKS); + veejay_msg(0, "[avilib dump] cur_std_idx=%d NR_IXNN_CHUNKS=%d" + "POS=%lld towrite=%lld", + cur_std_idx,NR_IXNN_CHUNKS, AVI->pos, towrite); + return -1; + } + + if (avi_add_std_index (AVI, "ix00", "00db", AVI->video_superindex->stdindex[ cur_std_idx ]) < 0) + return -1; + + for (audtr = 0; audtr < AVI->anum; audtr++) { + char aud[5]; + if (!AVI->track[audtr].audio_superindex) { + // not initialized -> no index + continue; + } + AVI->track[audtr].audio_superindex->nEntriesInUse++; + + snprintf(fcc, sizeof(fcc), "ix%02d", audtr+1); + snprintf(aud, sizeof(aud), "0%01dwb", audtr+1); + if (avi_add_std_index (AVI, fcc, aud, AVI->track[audtr].audio_superindex->stdindex[ + AVI->track[audtr].audio_superindex->nEntriesInUse - 1 ]) < 0 + ) return -1; + } + + // write the new riff; + if (cur_std_idx > 0) { + + // dump the _previous_ == already finished index + avi_ixnn_entry (AVI, AVI->video_superindex->stdindex[cur_std_idx - 1], + &AVI->video_superindex->aIndex[cur_std_idx - 1]); + AVI->video_superindex->aIndex[cur_std_idx - 1].dwDuration = + AVI->video_superindex->stdindex[cur_std_idx - 1]->nEntriesInUse - 1; + + for (audtr = 0; audtr < AVI->anum; audtr++) { + + if (!AVI->track[audtr].audio_superindex) { + // not initialized -> no index + continue; + } + avi_ixnn_entry (AVI, AVI->track[audtr].audio_superindex->stdindex[cur_std_idx - 1], + &AVI->track[audtr].audio_superindex->aIndex[cur_std_idx - 1]); + + AVI->track[audtr].audio_superindex->aIndex[cur_std_idx - 1].dwDuration = + AVI->track[audtr].audio_superindex->stdindex[cur_std_idx - 1]->nEntriesInUse - 1; + if (AVI->track[audtr].a_fmt == 0x1) { + AVI->track[audtr].audio_superindex->aIndex[cur_std_idx - 1].dwDuration *= + AVI->track[audtr].a_bits*AVI->track[audtr].a_rate*AVI->track[audtr].a_chans/800; + } + } + + // XXX: dump idx1 structure + if (cur_std_idx == 1) { + avi_add_chunk(AVI, (unsigned char *)"idx1", (unsigned char *)AVI->idx, AVI->n_idx*16); + // qwBaseOffset will contain the start of the second riff chunk + } + // Fix the Offsets later at closing time + avi_add_chunk(AVI, (unsigned char *)"RIFF", "AVIXLIST\0\0\0\0movi", 16); + + AVI->video_superindex->stdindex[ cur_std_idx ]->qwBaseOffset = AVI->pos -16 -8; +#ifdef DEBUG_ODML + printf("ODML: RIFF No.%02d at Offset 0x%llX\n", cur_std_idx, AVI->pos -16 -8); +#endif + + for (audtr = 0; audtr < AVI->anum; audtr++) { + if (AVI->track[audtr].audio_superindex) + AVI->track[audtr].audio_superindex->stdindex[ cur_std_idx ]->qwBaseOffset = + AVI->pos -16 -8; + + } + + // now we can be sure + AVI->is_opendml++; + } + + } + + + if (video) { + avi_add_odml_index_entry_core(AVI, flags, AVI->pos, len, + AVI->video_superindex->stdindex[ AVI->video_superindex->nEntriesInUse-1 ]); + + AVI->total_frames++; + } // video + + if (audio) { + avi_add_odml_index_entry_core(AVI, flags, AVI->pos, len, + AVI->track[AVI->aptr].audio_superindex->stdindex[ + AVI->track[AVI->aptr].audio_superindex->nEntriesInUse-1 ]); + } + + + return 0; +} + +// #undef NR_IXNN_CHUNKS + +static int avi_add_index_entry(avi_t *AVI, unsigned char *tag, long flags, unsigned long pos, unsigned long len) +{ + void *ptr; + + if(AVI->n_idx>=AVI->max_idx) { + ptr = realloc((void *)AVI->idx,(AVI->max_idx+4096)*16); + + if(ptr == 0) { + AVI_errno = AVI_ERR_NO_MEM; + return -1; + } + AVI->max_idx += 4096; + AVI->idx = (unsigned char((*)[16]) ) ptr; + } + + /* Add index entry */ + + veejay_memcpy(AVI->idx[AVI->n_idx],tag,4); + long2str(AVI->idx[AVI->n_idx]+ 4,flags); + long2str(AVI->idx[AVI->n_idx]+ 8, pos); + long2str(AVI->idx[AVI->n_idx]+12, len); + + /* Update counter */ + + AVI->n_idx++; + + if(len>AVI->max_len) AVI->max_len=len; + + return 0; +} + +/* Returns 1 if more audio is in that video junk */ +int AVI_can_read_audio(avi_t *AVI) +{ + if(AVI->mode==AVI_MODE_WRITE) { return -1; } + if(!AVI->video_index) { return -1; } + if(!AVI->track[AVI->aptr].audio_index) { return -1; } + + // is it -1? the last ones got left out --tibit + //if (AVI->track[AVI->aptr].audio_posc>=AVI->track[AVI->aptr].audio_chunks-1) { + if (AVI->track[AVI->aptr].audio_posc>=AVI->track[AVI->aptr].audio_chunks) { + return 0; + } + + if (AVI->video_pos >= AVI->video_frames) return 1; + + if (AVI->track[AVI->aptr].audio_index[AVI->track[AVI->aptr].audio_posc].pos < AVI->video_index[AVI->video_pos].pos) return 1; + else return 0; +} +/* + AVI_open_output_file: Open an AVI File and write a bunch + of zero bytes as space for the header. + + returns a pointer to avi_t on success, a zero pointer on error +*/ + +avi_t* AVI_open_output_file(char * filename) +{ + avi_t *AVI; + int i; + + unsigned char AVI_header[HEADERBYTES]; + + /* Allocate the avi_t struct and zero it */ + + AVI = (avi_t *) vj_malloc(sizeof(avi_t)); + if(AVI==0) + { + AVI_errno = AVI_ERR_NO_MEM; + return 0; + } + veejay_memset((void *)AVI,0,sizeof(avi_t)); + + /* Since Linux needs a long time when deleting big files, + we do not truncate the file when we open it. + Instead it is truncated when the AVI file is closed */ + + // AVI->fdes = open(filename, O_RDWR|O_CREAT|O_BINARY, + // S_IRUSR | S_IWUSR | S_IGRP | S_IROTH); + + AVI->fdes = open(filename, O_RDWR | O_CREAT | O_STREAMING, 0644 ); + + if (AVI->fdes < 0) + { + AVI_errno = AVI_ERR_OPEN; + free(AVI); + return 0; + } + + /* Write out HEADERBYTES bytes, the header will go here + when we are finished with writing */ + + for (i=0;ifdes,(char *)AVI_header,HEADERBYTES); + if (i != HEADERBYTES) + { + close(AVI->fdes); + AVI_errno = AVI_ERR_WRITE; + free(AVI); + return 0; + } + + AVI->pos = HEADERBYTES; + AVI->mode = AVI_MODE_WRITE; /* open for writing */ + + //init + AVI->anum = 0; + AVI->aptr = 0; + + return AVI; +} + +void AVI_set_video(avi_t *AVI, int width, int height, double fps, char *compressor) +{ + /* may only be called if file is open for writing */ + + if(AVI->mode==AVI_MODE_READ) return; + + AVI->width = width; + AVI->height = height; + AVI->fps = fps; + + if(strncmp(compressor, "RGB", 3)==0) { + veejay_memset(AVI->compressor, 0, 4); + } else { + veejay_memcpy(AVI->compressor,compressor,4); + } + + AVI->compressor[4] = 0; + + avi_update_header(AVI); +} + +int AVI_set_audio(avi_t *AVI, int channels, long rate, int bits, int format) +{ + /* may only be called if file is open for writing */ + + if(AVI->mode==AVI_MODE_READ) return -1; + + //inc audio tracks + AVI->aptr=AVI->anum; + ++AVI->anum; + + if(AVI->anum > AVI_MAX_TRACKS) { + veejay_msg(0, "error - only %d audio tracks supported\n", AVI_MAX_TRACKS); + return -1; + } + + AVI->track[AVI->aptr].a_chans = channels; + AVI->track[AVI->aptr].a_rate = rate; + AVI->track[AVI->aptr].a_bits = bits; + AVI->track[AVI->aptr].a_fmt = format; +// AVI->track[AVI->aptr].mp3rate = mp3rate; + + return avi_update_header(AVI); +} + +#define OUT4CC(s) \ + if(nhb<=HEADERBYTES-4) veejay_memcpy(AVI_header+nhb,s,4); nhb += 4 + +#define OUTLONG(n) \ + if(nhb<=HEADERBYTES-4) long2str(AVI_header+nhb,n); nhb += 4 + +#define OUTSHRT(n) \ + if(nhb<=HEADERBYTES-2) { \ + AVI_header[nhb ] = (n )&0xff; \ + AVI_header[nhb+1] = (n>>8)&0xff; \ + } \ + nhb += 2 + +#define OUTCHR(n) \ + if(nhb<=HEADERBYTES-1) { \ + AVI_header[nhb ] = (n )&0xff; \ + } \ + nhb += 1 + +#define OUTMEM(d, s) \ + { \ + unsigned int s_ = (s); \ + if(nhb <= HEADERBYTES-s_) \ + veejay_memcpy(AVI_header+nhb, (d), s_); \ + nhb += s_; \ + } + + +//ThOe write preliminary AVI file header: 0 frames, max vid/aud size +int avi_update_header(avi_t *AVI) +{ + int njunk, sampsize, hasIndex, ms_per_frame, frate, flag; + int movi_len, hdrl_start, strl_start, j; + unsigned char AVI_header[HEADERBYTES]; + long nhb; + unsigned long xd_size, xd_size_align2; + + //assume max size + movi_len = AVI_MAX_LEN - HEADERBYTES + 4; + + //assume index will be written + hasIndex=1; + + if(AVI->fps < 0.001) { + frate=0; + ms_per_frame=0; + } else { + frate = (int) (FRAME_RATE_SCALE*AVI->fps + 0.5); + ms_per_frame=(int) (1000000/AVI->fps + 0.5); + } + + /* Prepare the file header */ + + nhb = 0; + + /* The RIFF header */ + + OUT4CC ("RIFF"); + OUTLONG(movi_len); // assume max size + OUT4CC ("AVI "); + + /* Start the header list */ + + OUT4CC ("LIST"); + OUTLONG(0); /* Length of list in bytes, don't know yet */ + hdrl_start = nhb; /* Store start position */ + OUT4CC ("hdrl"); + + /* The main AVI header */ + + /* The Flags in AVI File header */ + +#define AVIF_HASINDEX 0x00000010 /* Index at end of file */ +#define AVIF_MUSTUSEINDEX 0x00000020 +#define AVIF_ISINTERLEAVED 0x00000100 +#define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames */ +#define AVIF_WASCAPTUREFILE 0x00010000 +#define AVIF_COPYRIGHTED 0x00020000 + + OUT4CC ("avih"); + OUTLONG(56); /* # of bytes to follow */ + OUTLONG(ms_per_frame); /* Microseconds per frame */ + //ThOe ->0 + // OUTLONG(10000000); /* MaxBytesPerSec, I hope this will never be used */ + OUTLONG(0); + OUTLONG(0); /* PaddingGranularity (whatever that might be) */ + /* Other sources call it 'reserved' */ + flag = AVIF_ISINTERLEAVED; + if(hasIndex) flag |= AVIF_HASINDEX; + if(hasIndex && AVI->must_use_index) flag |= AVIF_MUSTUSEINDEX; + OUTLONG(flag); /* Flags */ + OUTLONG(0); // no frames yet + OUTLONG(0); /* InitialFrames */ + + OUTLONG(AVI->anum+1); + + OUTLONG(0); /* SuggestedBufferSize */ + OUTLONG(AVI->width); /* Width */ + OUTLONG(AVI->height); /* Height */ + /* MS calls the following 'reserved': */ + OUTLONG(0); /* TimeScale: Unit used to measure time */ + OUTLONG(0); /* DataRate: Data rate of playback */ + OUTLONG(0); /* StartTime: Starting time of AVI data */ + OUTLONG(0); /* DataLength: Size of AVI data chunk */ + + + /* Start the video stream list ---------------------------------- */ + + OUT4CC ("LIST"); + OUTLONG(0); /* Length of list in bytes, don't know yet */ + strl_start = nhb; /* Store start position */ + OUT4CC ("strl"); + + /* The video stream header */ + + OUT4CC ("strh"); + OUTLONG(56); /* # of bytes to follow */ + OUT4CC ("vids"); /* Type */ + OUT4CC (AVI->compressor); /* Handler */ + OUTLONG(0); /* Flags */ + OUTLONG(0); /* Reserved, MS says: wPriority, wLanguage */ + OUTLONG(0); /* InitialFrames */ + OUTLONG(FRAME_RATE_SCALE); /* Scale */ + OUTLONG(frate); /* Rate: Rate/Scale == samples/second */ + OUTLONG(0); /* Start */ + OUTLONG(0); // no frames yet + OUTLONG(0); /* SuggestedBufferSize */ + OUTLONG(-1); /* Quality */ + OUTLONG(0); /* SampleSize */ + OUTLONG(0); /* Frame */ + OUTLONG(0); /* Frame */ + // OUTLONG(0); /* Frame */ + //OUTLONG(0); /* Frame */ + + /* The video stream format */ + + xd_size = AVI->extradata_size; + xd_size_align2 = (AVI->extradata_size+1) & ~1; + + OUT4CC ("strf"); + OUTLONG(40 + xd_size_align2);/* # of bytes to follow */ + OUTLONG(40 + xd_size); /* Size */ + OUTLONG(AVI->width); /* Width */ + OUTLONG(AVI->height); /* Height */ + OUTSHRT(1); OUTSHRT(24); /* Planes, Count */ + OUT4CC (AVI->compressor); /* Compression */ + // ThOe (*3) + OUTLONG(AVI->width*AVI->height*3); /* SizeImage (in bytes?) */ + OUTLONG(0); /* XPelsPerMeter */ + OUTLONG(0); /* YPelsPerMeter */ + OUTLONG(0); /* ClrUsed: Number of colors used */ + OUTLONG(0); /* ClrImportant: Number of colors important */ + + // write extradata + if (xd_size > 0 && AVI->extradata) { + OUTMEM(AVI->extradata, xd_size); + if (xd_size != xd_size_align2) { + OUTCHR(0); + } + } + + /* Finish stream list, i.e. put number of bytes in the list to proper pos */ + + long2str(AVI_header+strl_start-4,nhb-strl_start); + + + /* Start the audio stream list ---------------------------------- */ + + for(j=0; janum; ++j) { + + sampsize = avi_sampsize(AVI, j); + + OUT4CC ("LIST"); + OUTLONG(0); /* Length of list in bytes, don't know yet */ + strl_start = nhb; /* Store start position */ + OUT4CC ("strl"); + + /* The audio stream header */ + + OUT4CC ("strh"); + OUTLONG(56); /* # of bytes to follow */ + OUT4CC ("auds"); + + // ----------- + // ThOe + OUTLONG(0); /* Format (Optionally) */ + // ----------- + + OUTLONG(0); /* Flags */ + OUTLONG(0); /* Reserved, MS says: wPriority, wLanguage */ + OUTLONG(0); /* InitialFrames */ + + // ThOe /4 + OUTLONG(sampsize/4); /* Scale */ + OUTLONG(1000*AVI->track[j].mp3rate/8); + OUTLONG(0); /* Start */ + OUTLONG(4*AVI->track[j].audio_bytes/sampsize); /* Length */ + OUTLONG(0); /* SuggestedBufferSize */ + OUTLONG(-1); /* Quality */ + + // ThOe /4 + OUTLONG(sampsize/4); /* SampleSize */ + + OUTLONG(0); /* Frame */ + OUTLONG(0); /* Frame */ + // OUTLONG(0); /* Frame */ + //OUTLONG(0); /* Frame */ + + /* The audio stream format */ + + OUT4CC ("strf"); + OUTLONG(16); /* # of bytes to follow */ + OUTSHRT(AVI->track[j].a_fmt); /* Format */ + OUTSHRT(AVI->track[j].a_chans); /* Number of channels */ + OUTLONG(AVI->track[j].a_rate); /* SamplesPerSec */ + // ThOe + OUTLONG(1000*AVI->track[j].mp3rate/8); + //ThOe (/4) + + OUTSHRT(sampsize/4); /* BlockAlign */ + + + OUTSHRT(AVI->track[j].a_bits); /* BitsPerSample */ + + /* Finish stream list, i.e. put number of bytes in the list to proper pos */ + + long2str(AVI_header+strl_start-4,nhb-strl_start); + } + + /* Finish header list */ + + long2str(AVI_header+hdrl_start-4,nhb-hdrl_start); + + + /* Calculate the needed amount of junk bytes, output junk */ + + njunk = HEADERBYTES - nhb - 8 - 12; + + /* Safety first: if njunk <= 0, somebody has played with + HEADERBYTES without knowing what (s)he did. + This is a fatal error */ + + if(njunk<=0) + { + veejay_msg(0, "%s: # of header bytes too small",__FUNCTION__); + veejay_msg(0, "Somebody has played with HEADERBYTES of this AVI without knowing what (s)he did"); + return -1; + } + + OUT4CC ("JUNK"); + OUTLONG(njunk); + veejay_memset(AVI_header+nhb,0,njunk); + + nhb += njunk; + + /* Start the movi list */ + + OUT4CC ("LIST"); + OUTLONG(movi_len); /* Length of list in bytes */ + OUT4CC ("movi"); + + /* Output the header, truncate the file to the number of bytes + actually written, report an error if someting goes wrong */ + + if ( lseek(AVI->fdes,0,SEEK_SET)<0 || + avi_write(AVI->fdes,(char *)AVI_header,HEADERBYTES)!=HEADERBYTES || + lseek(AVI->fdes,AVI->pos,SEEK_SET)<0) + { + AVI_errno = AVI_ERR_CLOSE; + return -1; + } + + return 0; +} + +static int valid_info_tag(char *c) +{ + if (!strncmp(c, "IARL", 4)) return 1; + else if (!strncmp(c, "IART", 4)) return 1; + else if (!strncmp(c, "ICMS", 4)) return 1; + else if (!strncmp(c, "ICMT", 4)) return 1; + else if (!strncmp(c, "ICOP", 4)) return 1; + else if (!strncmp(c, "ICRD", 4)) return 1; + else if (!strncmp(c, "ICRP", 4)) return 1; + else if (!strncmp(c, "IDIM", 4)) return 1; + else if (!strncmp(c, "IDPI", 4)) return 1; + else if (!strncmp(c, "IENG", 4)) return 1; + else if (!strncmp(c, "IGNR", 4)) return 1; + else if (!strncmp(c, "IKEY", 4)) return 1; + else if (!strncmp(c, "ILGT", 4)) return 1; + else if (!strncmp(c, "IMED", 4)) return 1; + else if (!strncmp(c, "INAM", 4)) return 1; + else if (!strncmp(c, "IPLT", 4)) return 1; + else if (!strncmp(c, "IPRD", 4)) return 1; + else if (!strncmp(c, "ISBJ", 4)) return 1; + else if (!strncmp(c, "ISHP", 4)) return 1; + else if (!strncmp(c, "ISRC", 4)) return 1; + else if (!strncmp(c, "ISRF", 4)) return 1; + else if (!strncmp(c, "ITCH", 4)) return 1; + else return 0; + + return 0; +} +// see ../docs/avi_comments.txt +// returns the length of written stream (-1 on error) +static int avi_parse_comments (int fd, char *buf, int space_left) +{ + int len=0, readlen=0, k; + char *data, *c, *d; + struct stat st; + + // safety checks + if (fd<=0 || !buf || space_left<=0) + return -1; + + veejay_memset (buf, 0, space_left); + if (fstat (fd, &st) == -1) { + perror ("stat"); + return -1; + } + + if ( !(data = vj_malloc(st.st_size*sizeof(char)+1)) ) { + fprintf(stderr, "vj_malloc failed\n"); + return -1; + } + + readlen = avi_read ( fd, data, st.st_size); + + //printf("Read %d bytes from %d\n", readlen, fd); + + c = data; + space_left--; + + while (len < space_left) { + if ( !c || *c == '\0') + break; // eof; + else if (*c == '#') { // comment, ignore + c = strchr(c, '\n')+1; + } + else if (*c == '\n') { // empty, ignore + c++; + } + else if (*c == 'I') { + + // do not write ISFT -- this is written by transcode + // and important for debugging. + if (!valid_info_tag(c)) { + // skip this line + while (c && *c && *c != '\n' ) { + c++; + } + continue; + } + + // set d after TAG + d = c+4; + + // find first non-blank (!space or !TAB) + while ( d && *d && (*d == ' ' || *d == ' ')) ++d; + if (!d) break; + + // TAG without argument is fine but ignored + if (*d == '\n' || *d == '\r') { + c = d+1; + if (*c == '\n') ++c; + continue; + } + + k = 0; + while (d[k] != '\r' && d[k] != '\n' && d[k] != '\0') ++k; + if (k>=space_left) return len; + + // write TAG + veejay_memcpy(buf+len,c,4); + len += 4; + + // write length + '\0' + long2str(buf+len, k+1); len += 4; + + // write comment string + veejay_memcpy (buf+len, d, k); + // must be null terminated + *(buf+len+k+1) = '\0'; + + // PAD + if ((k+1)&1) { + k++; + *(buf+len+k+1) = '\0'; + } + len += k+1; + + // advance c + while (*c != '\n' && *c != '\0') ++c; + if (*c != '\0') ++c; + else break; + + } else { + + // ignore junk lines + while (c && *c && *c != '\n' ) { + if (*c == ' ' || *c == ' ') { c++; break; } + c++; + } + if (!c) break; + } + + } + free(data); + + return len; +} + +//SLM +#ifndef S_IRUSR +#define S_IRWXU 00700 /* read, write, execute: owner */ +#define S_IRUSR 00400 /* read permission: owner */ +#define S_IWUSR 00200 /* write permission: owner */ +#define S_IXUSR 00100 /* execute permission: owner */ +#define S_IRWXG 00070 /* read, write, execute: group */ +#define S_IRGRP 00040 /* read permission: group */ +#define S_IWGRP 00020 /* write permission: group */ +#define S_IXGRP 00010 /* execute permission: group */ +#define S_IRWXO 00007 /* read, write, execute: other */ +#define S_IROTH 00004 /* read permission: other */ +#define S_IWOTH 00002 /* write permission: other */ +#define S_IXOTH 00001 /* execute permission: other */ +#endif + +/* + Write the header of an AVI file and close it. + returns 0 on success, -1 on write error. +*/ + +static int avi_close_output_file(avi_t *AVI) +{ + + int ret, njunk, sampsize, hasIndex, ms_per_frame, frate, idxerror, flag; + unsigned long movi_len; + int hdrl_start, strl_start, j; + unsigned char AVI_header[HEADERBYTES]; + long nhb; + unsigned long xd_size, xd_size_align2; + +#ifdef INFO_LIST + long info_len; + long id_len, real_id_len; + long info_start_pos; +// time_t calptr; +#endif + + /* Calculate length of movi list */ + + // dump the rest of the index + if (AVI->is_opendml) { + int cur_std_idx = AVI->video_superindex->nEntriesInUse-1; + int audtr; + +#ifdef DEBUG_ODML + printf("ODML dump the rest indices\n"); +#endif + avi_ixnn_entry (AVI, AVI->video_superindex->stdindex[cur_std_idx], + &AVI->video_superindex->aIndex[cur_std_idx]); + + AVI->video_superindex->aIndex[cur_std_idx].dwDuration = + AVI->video_superindex->stdindex[cur_std_idx]->nEntriesInUse - 1; + + for (audtr = 0; audtr < AVI->anum; audtr++) { + if (!AVI->track[audtr].audio_superindex) { + // not initialized -> no index + continue; + } + avi_ixnn_entry (AVI, AVI->track[audtr].audio_superindex->stdindex[cur_std_idx], + &AVI->track[audtr].audio_superindex->aIndex[cur_std_idx]); + AVI->track[audtr].audio_superindex->aIndex[cur_std_idx].dwDuration = + AVI->track[audtr].audio_superindex->stdindex[cur_std_idx]->nEntriesInUse - 1; + if (AVI->track[audtr].a_fmt == 0x1) { + AVI->track[audtr].audio_superindex->aIndex[cur_std_idx].dwDuration *= + AVI->track[audtr].a_bits*AVI->track[audtr].a_rate*AVI->track[audtr].a_chans/800; + } + } + // The AVI->video_superindex->nEntriesInUse contains the offset + AVI->video_superindex->stdindex[ cur_std_idx+1 ]->qwBaseOffset = AVI->pos; + } + + if (AVI->is_opendml) { + // Correct! + movi_len = AVI->video_superindex->stdindex[ 1 ]->qwBaseOffset - HEADERBYTES+4 - AVI->n_idx*16 - 8; + } else { + movi_len = AVI->pos - HEADERBYTES + 4; + } + + + /* Try to ouput the index entries. This may fail e.g. if no space + is left on device. We will report this as an error, but we still + try to write the header correctly (so that the file still may be + readable in the most cases */ + + idxerror = 0; + hasIndex = 1; + if (!AVI->is_opendml) { + // fprintf(stderr, "pos=%lu, index_len=%ld \n", AVI->pos, AVI->n_idx*16); + ret = avi_add_chunk(AVI, (unsigned char *)"idx1", (unsigned char *)AVI->idx, AVI->n_idx*16); + hasIndex = (ret==0); + //fprintf(stderr, "pos=%lu, index_len=%d\n", AVI->pos, hasIndex); + + if(ret) { + idxerror = 1; + AVI_errno = AVI_ERR_WRITE_INDEX; + } + } + + /* Calculate Microseconds per frame */ + + if(AVI->fps < 0.001) { + frate=0; + ms_per_frame=0; + } else { + frate = (int) (FRAME_RATE_SCALE*AVI->fps + 0.5); + ms_per_frame=(int) (1000000/AVI->fps + 0.5); + } + + /* Prepare the file header */ + + nhb = 0; + + /* The RIFF header */ + + OUT4CC ("RIFF"); + if (AVI->is_opendml) { + OUTLONG(AVI->video_superindex->stdindex[ 1 ]->qwBaseOffset - 8); /* # of bytes to follow */ + } else { + OUTLONG(AVI->pos - 8); /* # of bytes to follow */ + } + + OUT4CC ("AVI "); + + /* Start the header list */ + + OUT4CC ("LIST"); + OUTLONG(0); /* Length of list in bytes, don't know yet */ + hdrl_start = nhb; /* Store start position */ + OUT4CC ("hdrl"); + + /* The main AVI header */ + + /* The Flags in AVI File header */ + +#define AVIF_HASINDEX 0x00000010 /* Index at end of file */ +#define AVIF_MUSTUSEINDEX 0x00000020 +#define AVIF_ISINTERLEAVED 0x00000100 +#define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames */ +#define AVIF_WASCAPTUREFILE 0x00010000 +#define AVIF_COPYRIGHTED 0x00020000 + + OUT4CC ("avih"); + OUTLONG(56); /* # of bytes to follow */ + OUTLONG(ms_per_frame); /* Microseconds per frame */ + //ThOe ->0 + // OUTLONG(10000000); /* MaxBytesPerSec, I hope this will never be used */ + OUTLONG(0); + OUTLONG(0); /* PaddingGranularity (whatever that might be) */ + /* Other sources call it 'reserved' */ + flag = AVIF_ISINTERLEAVED; + if(hasIndex) flag |= AVIF_HASINDEX; + if(hasIndex && AVI->must_use_index) flag |= AVIF_MUSTUSEINDEX; + OUTLONG(flag); /* Flags */ + OUTLONG(AVI->video_frames); /* TotalFrames */ + OUTLONG(0); /* InitialFrames */ + + OUTLONG(AVI->anum+1); +// if (AVI->track[0].audio_bytes) +// { OUTLONG(2); } /* Streams */ +// else +// { OUTLONG(1); } /* Streams */ + + OUTLONG(0); /* SuggestedBufferSize */ + OUTLONG(AVI->width); /* Width */ + OUTLONG(AVI->height); /* Height */ + /* MS calls the following 'reserved': */ + OUTLONG(0); /* TimeScale: Unit used to measure time */ + OUTLONG(0); /* DataRate: Data rate of playback */ + OUTLONG(0); /* StartTime: Starting time of AVI data */ + OUTLONG(0); /* DataLength: Size of AVI data chunk */ + + + /* Start the video stream list ---------------------------------- */ + + OUT4CC ("LIST"); + OUTLONG(0); /* Length of list in bytes, don't know yet */ + strl_start = nhb; /* Store start position */ + OUT4CC ("strl"); + + /* The video stream header */ + + OUT4CC ("strh"); + OUTLONG(56); /* # of bytes to follow */ + OUT4CC ("vids"); /* Type */ + OUT4CC (AVI->compressor); /* Handler */ + OUTLONG(0); /* Flags */ + OUTLONG(0); /* Reserved, MS says: wPriority, wLanguage */ + OUTLONG(0); /* InitialFrames */ + OUTLONG(FRAME_RATE_SCALE); /* Scale */ + OUTLONG(frate); /* Rate: Rate/Scale == samples/second */ + OUTLONG(0); /* Start */ + OUTLONG(AVI->video_frames); /* Length */ + OUTLONG(AVI->max_len); /* SuggestedBufferSize */ + OUTLONG(0); /* Quality */ + OUTLONG(0); /* SampleSize */ + OUTLONG(0); /* Frame */ + OUTLONG(0); /* Frame */ + //OUTLONG(0); /* Frame */ + //OUTLONG(0); /* Frame */ + + /* The video stream format */ + + xd_size = AVI->extradata_size; + xd_size_align2 = (AVI->extradata_size+1) & ~1; + + OUT4CC ("strf"); + OUTLONG(40 + xd_size_align2);/* # of bytes to follow */ + OUTLONG(40 + xd_size); /* Size */ + OUTLONG(AVI->width); /* Width */ + OUTLONG(AVI->height); /* Height */ + OUTSHRT(1); OUTSHRT(24); /* Planes, Count */ + OUT4CC (AVI->compressor); /* Compression */ + // ThOe (*3) + OUTLONG(AVI->width*AVI->height*3); /* SizeImage (in bytes?) */ + OUTLONG(0); /* XPelsPerMeter */ + OUTLONG(0); /* YPelsPerMeter */ + OUTLONG(0); /* ClrUsed: Number of colors used */ + OUTLONG(0); /* ClrImportant: Number of colors important */ + + // write extradata if present + if (xd_size > 0 && AVI->extradata) { + OUTMEM(AVI->extradata, xd_size); + if (xd_size != xd_size_align2) { + OUTCHR(0); + } + } + + // dump index of indices for audio + if (AVI->is_opendml) { + + int k; + + OUT4CC(AVI->video_superindex->fcc); + OUTLONG(2+1+1+4+4+3*4 + AVI->video_superindex->nEntriesInUse * (8+4+4)); + OUTSHRT(AVI->video_superindex->wLongsPerEntry); + OUTCHR(AVI->video_superindex->bIndexSubType); + OUTCHR(AVI->video_superindex->bIndexType); + OUTLONG(AVI->video_superindex->nEntriesInUse); + OUT4CC(AVI->video_superindex->dwChunkId); + OUTLONG(0); + OUTLONG(0); + OUTLONG(0); + + + for (k = 0; k < AVI->video_superindex->nEntriesInUse; k++) { + uint32_t r = (AVI->video_superindex->aIndex[k].qwOffset >> 32) & 0xffffffff; + uint32_t s = (AVI->video_superindex->aIndex[k].qwOffset) & 0xffffffff; + + printf("VID NrEntries %d/%ld (%c%c%c%c) |0x%llX|%ld|%ld|\n", k, + (unsigned long)AVI->video_superindex->nEntriesInUse, + AVI->video_superindex->dwChunkId[0], + AVI->video_superindex->dwChunkId[1], + AVI->video_superindex->dwChunkId[2], + AVI->video_superindex->dwChunkId[3], + (unsigned long long)AVI->video_superindex->aIndex[k].qwOffset, + (unsigned long)AVI->video_superindex->aIndex[k].dwSize, + (unsigned long)AVI->video_superindex->aIndex[k].dwDuration + ); + /* + */ + + OUTLONG(s); + OUTLONG(r); + OUTLONG(AVI->video_superindex->aIndex[k].dwSize); + OUTLONG(AVI->video_superindex->aIndex[k].dwDuration); + } + + } + + /* Finish stream list, i.e. put number of bytes in the list to proper pos */ + + long2str(AVI_header+strl_start-4,nhb-strl_start); + + /* Start the audio stream list ---------------------------------- */ + + for(j=0; janum; ++j) { + + //if (AVI->track[j].a_chans && AVI->track[j].audio_bytes) + { + unsigned long nBlockAlign = 0; + unsigned long avgbsec = 0; + unsigned long scalerate = 0; + + sampsize = avi_sampsize(AVI, j); + sampsize = AVI->track[j].a_fmt==0x1?sampsize*4:sampsize; + + nBlockAlign = (AVI->track[j].a_rate<32000)?576:1152; + /* + printf("XXX sampsize (%d) block (%ld) rate (%ld) audio_bytes (%ld) mp3rate(%ld,%ld)\n", + sampsize, nBlockAlign, AVI->track[j].a_rate, + (long int)AVI->track[j].audio_bytes, + 1000*AVI->track[j].mp3rate/8, AVI->track[j].mp3rate); + */ + + if (AVI->track[j].a_fmt==0x1) { + sampsize = (AVI->track[j].a_chans<2)?sampsize/2:sampsize; + avgbsec = AVI->track[j].a_rate*sampsize/4; + scalerate = AVI->track[j].a_rate*sampsize/4; + } else { + avgbsec = 1000*AVI->track[j].mp3rate/8; + scalerate = 1000*AVI->track[j].mp3rate/8; + } + + OUT4CC ("LIST"); + OUTLONG(0); /* Length of list in bytes, don't know yet */ + strl_start = nhb; /* Store start position */ + OUT4CC ("strl"); + + /* The audio stream header */ + + OUT4CC ("strh"); + OUTLONG(56); /* # of bytes to follow */ + OUT4CC ("auds"); + + // ----------- + // ThOe + OUTLONG(0); /* Format (Optionally) */ + // ----------- + + OUTLONG(0); /* Flags */ + OUTLONG(0); /* Reserved, MS says: wPriority, wLanguage */ + OUTLONG(0); /* InitialFrames */ + + // VBR + if (AVI->track[j].a_fmt == 0x55 && AVI->track[j].a_vbr) { + OUTLONG(nBlockAlign); /* Scale */ + OUTLONG(AVI->track[j].a_rate); /* Rate */ + OUTLONG(0); /* Start */ + OUTLONG(AVI->track[j].audio_chunks); /* Length */ + OUTLONG(0); /* SuggestedBufferSize */ + OUTLONG(0); /* Quality */ + OUTLONG(0); /* SampleSize */ + OUTLONG(0); /* Frame */ + OUTLONG(0); /* Frame */ + } else { + OUTLONG(sampsize/4); /* Scale */ + OUTLONG(scalerate); /* Rate */ + OUTLONG(0); /* Start */ + OUTLONG(4*AVI->track[j].audio_bytes/sampsize); /* Length */ + OUTLONG(0); /* SuggestedBufferSize */ + OUTLONG(0xffffffff); /* Quality */ + OUTLONG(sampsize/4); /* SampleSize */ + OUTLONG(0); /* Frame */ + OUTLONG(0); /* Frame */ + } + + /* The audio stream format */ + + OUT4CC ("strf"); + + if (AVI->track[j].a_fmt == 0x55 && AVI->track[j].a_vbr) { + + OUTLONG(30); /* # of bytes to follow */ // mplayer writes 28 + OUTSHRT(AVI->track[j].a_fmt); /* Format */ // 2 + OUTSHRT(AVI->track[j].a_chans); /* Number of channels */ // 2 + OUTLONG(AVI->track[j].a_rate); /* SamplesPerSec */ // 4 + //ThOe/tibit + OUTLONG(1000*AVI->track[j].mp3rate/8); /* maybe we should write an avg. */ // 4 + OUTSHRT(nBlockAlign); /* BlockAlign */ // 2 + OUTSHRT(AVI->track[j].a_bits); /* BitsPerSample */ // 2 + + OUTSHRT(12); /* cbSize */ // 2 + OUTSHRT(1); /* wID */ // 2 + OUTLONG(2); /* fdwFlags */ // 4 + OUTSHRT(nBlockAlign); /* nBlockSize */ // 2 + OUTSHRT(1); /* nFramesPerBlock */ // 2 + OUTSHRT(0); /* nCodecDelay */ // 2 + + } else if (AVI->track[j].a_fmt == 0x55 && !AVI->track[j].a_vbr) { + + OUTLONG(30); /* # of bytes to follow */ + OUTSHRT(AVI->track[j].a_fmt); /* Format */ + OUTSHRT(AVI->track[j].a_chans); /* Number of channels */ + OUTLONG(AVI->track[j].a_rate); /* SamplesPerSec */ + //ThOe/tibit + OUTLONG(1000*AVI->track[j].mp3rate/8); + OUTSHRT(sampsize/4); /* BlockAlign */ + OUTSHRT(AVI->track[j].a_bits); /* BitsPerSample */ + + OUTSHRT(12); /* cbSize */ + OUTSHRT(1); /* wID */ + OUTLONG(2); /* fdwFlags */ + OUTSHRT(nBlockAlign); /* nBlockSize */ + OUTSHRT(1); /* nFramesPerBlock */ + OUTSHRT(0); /* nCodecDelay */ + + } else { + + OUTLONG(18); /* # of bytes to follow */ + OUTSHRT(AVI->track[j].a_fmt); /* Format */ + OUTSHRT(AVI->track[j].a_chans); /* Number of channels */ + OUTLONG(AVI->track[j].a_rate); /* SamplesPerSec */ + //ThOe/tibit + OUTLONG(avgbsec); /* Avg bytes/sec */ + OUTSHRT(sampsize/4); /* BlockAlign */ + OUTSHRT(AVI->track[j].a_bits); /* BitsPerSample */ + OUTSHRT(0); /* cbSize */ + + } + } + if (AVI->is_opendml) { + + int k ; + + if (!AVI->track[j].audio_superindex) { + // not initialized -> no index + continue; + } + + OUT4CC(AVI->track[j].audio_superindex->fcc); /* "indx" */ + OUTLONG(2+1+1+4+4+3*4 + AVI->track[j].audio_superindex->nEntriesInUse * (8+4+4)); + OUTSHRT(AVI->track[j].audio_superindex->wLongsPerEntry); + OUTCHR(AVI->track[j].audio_superindex->bIndexSubType); + OUTCHR(AVI->track[j].audio_superindex->bIndexType); + OUTLONG(AVI->track[j].audio_superindex->nEntriesInUse); + OUT4CC(AVI->track[j].audio_superindex->dwChunkId); + OUTLONG(0); OUTLONG(0); OUTLONG(0); + + for (k = 0; k < AVI->track[j].audio_superindex->nEntriesInUse; k++) { + uint32_t r = (AVI->track[j].audio_superindex->aIndex[k].qwOffset >> 32) & 0xffffffff; + uint32_t s = (AVI->track[j].audio_superindex->aIndex[k].qwOffset) & 0xffffffff; + + /* + printf("AUD[%d] NrEntries %d/%ld (%c%c%c%c) |0x%llX|%ld|%ld| \n", j, k, + AVI->track[j].audio_superindex->nEntriesInUse, + AVI->track[j].audio_superindex->dwChunkId[0], AVI->track[j].audio_superindex->dwChunkId[1], + AVI->track[j].audio_superindex->dwChunkId[2], AVI->track[j].audio_superindex->dwChunkId[3], + AVI->track[j].audio_superindex->aIndex[k].qwOffset, + AVI->track[j].audio_superindex->aIndex[k].dwSize, + AVI->track[j].audio_superindex->aIndex[k].dwDuration + ); + */ + + OUTLONG(s); + OUTLONG(r); + OUTLONG(AVI->track[j].audio_superindex->aIndex[k].dwSize); + OUTLONG(AVI->track[j].audio_superindex->aIndex[k].dwDuration); + } + } + /* Finish stream list, i.e. put number of bytes in the list to proper pos */ + long2str(AVI_header+strl_start-4,nhb-strl_start); + } + + if (AVI->is_opendml) { + OUT4CC("LIST"); + OUTLONG(16); + OUT4CC("odml"); + OUT4CC("dmlh"); + OUTLONG(4); + OUTLONG(AVI->total_frames); + } + + /* Finish header list */ + + long2str(AVI_header+hdrl_start-4,nhb-hdrl_start); + + + // add INFO list --- (0.6.0pre4) + +#ifdef INFO_LIST + OUT4CC ("LIST"); + + info_start_pos = nhb; + info_len = MAX_INFO_STRLEN + 12; + OUTLONG(info_len); // rewritten later + OUT4CC ("INFO"); + + OUT4CC ("ISFT"); + //OUTLONG(MAX_INFO_STRLEN); + veejay_memset(id_str, 0, MAX_INFO_STRLEN); + + snprintf(id_str, sizeof(id_str), "%s-%s", PACKAGE, VERSION); + real_id_len = id_len = strlen(id_str)+1; + if (id_len&1) id_len++; + + OUTLONG(real_id_len); + + veejay_memset(AVI_header+nhb, 0, id_len); + veejay_memcpy(AVI_header+nhb, id_str, id_len); + nhb += id_len; + + info_len = avi_parse_comments (AVI->comment_fd, AVI_header+nhb, HEADERBYTES - nhb - 8 - 12); + if (info_len <= 0) info_len=0; + + // write correct len + long2str(AVI_header+info_start_pos, info_len + id_len + 4+4+4); + + nhb += info_len; + +// OUT4CC ("ICMT"); +// OUTLONG(MAX_INFO_STRLEN); + +// calptr=time(NULL); +// snprintf(id_str, sizeof(id_str), "\t%s %s", ctime(&calptr), ""); +// veejay_memset(AVI_header+nhb, 0, MAX_INFO_STRLEN); +// veejay_memcpy(AVI_header+nhb, id_str, 25); +// nhb += MAX_INFO_STRLEN; +#endif + + // ---------------------------- + + /* Calculate the needed amount of junk bytes, output junk */ + + njunk = HEADERBYTES - nhb - 8 - 12; + + /* Safety first: if njunk <= 0, somebody has played with + HEADERBYTES without knowing what (s)he did. + This is a fatal error */ + + if(njunk<=0) + { + fprintf(stderr,"AVI_close_output_file: # of header bytes too small\n"); + exit(1); + } + + OUT4CC ("JUNK"); + OUTLONG(njunk); + veejay_memset(AVI_header+nhb,0,njunk); + + nhb += njunk; + + /* Start the movi list */ + + OUT4CC ("LIST"); + OUTLONG(movi_len); /* Length of list in bytes */ + OUT4CC ("movi"); + + /* Output the header, truncate the file to the number of bytes + actually written, report an error if someting goes wrong */ + + if ( lseek(AVI->fdes,0,SEEK_SET)<0 || + avi_write(AVI->fdes,(char *)AVI_header,HEADERBYTES)!=HEADERBYTES || + ftruncate(AVI->fdes,AVI->pos)<0 ) + { + AVI_errno = AVI_ERR_CLOSE; + return -1; + } + + + // Fix up the empty additional RIFF and LIST chunks + if (AVI->is_opendml) { + int k = 0; + char f[4]; + unsigned int len; + + for (k=1; kvideo_superindex->nEntriesInUse; k++) { + // the len of the RIFF Chunk + lseek(AVI->fdes, AVI->video_superindex->stdindex[k]->qwBaseOffset+4, SEEK_SET); + len = AVI->video_superindex->stdindex[k+1]->qwBaseOffset - + AVI->video_superindex->stdindex[k]->qwBaseOffset - 8; + long2str(f, len); + avi_write(AVI->fdes, f, 4); + + // len of the LIST/movi chunk + lseek(AVI->fdes, 8, SEEK_CUR); + len -= 12; + long2str(f, len); + avi_write(AVI->fdes, f, 4); + } + } + + + if(idxerror) return -1; + + return 0; +} + +/* + AVI_write_data: + Add video or audio data to the file; + + Return values: + 0 No error; + -1 Error, AVI_errno is set appropriatly; + +*/ + +static int avi_write_data(avi_t *AVI, char *data, unsigned long length, int audio, int keyframe) +{ + int n = 0; + + unsigned char astr[5]; + + // transcode core itself checks for the size -- unneeded and + // does harm to xvid 2pass encodes where the first pass can get + // _very_ large -- tibit. + +#if 0 + /* Check for maximum file length */ + + if ( (AVI->pos + 8 + length + 8 + (AVI->n_idx+1)*16) > AVI_MAX_LEN ) { + AVI_errno = AVI_ERR_SIZELIM; + return -1; + } +#endif + + /* Add index entry */ + + //set tag for current audio track + snprintf((char *)astr, sizeof(astr), "0%1dwb", (int)(AVI->aptr+1)); + + if(audio) { + if (!AVI->is_opendml) n = avi_add_index_entry(AVI,astr,0x10,AVI->pos,length); + n += avi_add_odml_index_entry(AVI,astr,0x10,AVI->pos,length); + } else { + if (!AVI->is_opendml) n = avi_add_index_entry(AVI,(unsigned char *)"00db",((keyframe)?0x10:0x0),AVI->pos,length); + n += avi_add_odml_index_entry(AVI,(unsigned char *)"00db",((keyframe)?0x10:0x0),AVI->pos,length); + } + + if(n) return -1; + + /* Output tag and data */ + + if(audio) + n = avi_add_chunk(AVI,(unsigned char *)astr,data,length); + else + n = avi_add_chunk(AVI,(unsigned char *)"00db",data,length); + + if (n) return -1; + + return 0; +} + +int AVI_write_frame(avi_t *AVI, char *data, long bytes) +{ + int keyframe = 1; //@everything is a keyframe in veejay + off_t pos; + + if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + + pos = AVI->pos; + + if(avi_write_data(AVI,data,bytes,0,keyframe)) return -1; + + AVI->last_pos = pos; + AVI->last_len = bytes; + AVI->video_frames++; + return 0; +} + +int AVI_dup_frame(avi_t *AVI) +{ + if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + + if(AVI->last_pos==0) return 0; /* No previous real frame */ + if(avi_add_index_entry(AVI,(unsigned char *)"00db",0x10,AVI->last_pos,AVI->last_len)) return -1; + AVI->video_frames++; + AVI->must_use_index = 1; + return 0; +} + +int AVI_write_audio(avi_t *AVI, char *data, long bytes) +{ + if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + + if( avi_write_data(AVI,data,bytes,1,0) ) return -1; + AVI->track[AVI->aptr].audio_bytes += bytes; + AVI->track[AVI->aptr].audio_chunks++; + return 0; +} + + +int AVI_append_audio(avi_t *AVI, char *data, long bytes) +{ + + // won't work for >2gb + long i, length, pos; + unsigned char c[4]; + + if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + + // update last index entry: + + --AVI->n_idx; + length = str2ulong(AVI->idx[AVI->n_idx]+12); + pos = str2ulong(AVI->idx[AVI->n_idx]+8); + + //update; + long2str(AVI->idx[AVI->n_idx]+12,length+bytes); + + ++AVI->n_idx; + + AVI->track[AVI->aptr].audio_bytes += bytes; + + //update chunk header + lseek(AVI->fdes, pos+4, SEEK_SET); + long2str(c, length+bytes); + avi_write(AVI->fdes, (char *)c, 4); + + lseek(AVI->fdes, pos+8+length, SEEK_SET); + + i=PAD_EVEN(length + bytes); + + bytes = i - length; + avi_write(AVI->fdes, data, bytes); + AVI->pos = pos + 8 + i; + + return 0; +} + + +long AVI_bytes_remain(avi_t *AVI) +{ + if(AVI->mode==AVI_MODE_READ) return 0; + + return ( AVI_MAX_LEN - (AVI->pos + 8 + 16*AVI->n_idx)); +} + +long AVI_bytes_written(avi_t *AVI) +{ + if(AVI->mode==AVI_MODE_READ) return 0; + + return (AVI->pos + 8 + 16*AVI->n_idx); +} + +int AVI_set_audio_track(avi_t *AVI, int track) +{ + + if(track < 0 || track + 1 > AVI->anum) return(-1); + + //this info is not written to file anyway + AVI->aptr=track; + return 0; +} + +int AVI_get_audio_track(avi_t *AVI) +{ + return(AVI->aptr); +} + +void AVI_set_audio_vbr(avi_t *AVI, long is_vbr) +{ + AVI->track[AVI->aptr].a_vbr = is_vbr; +} + +long AVI_get_audio_vbr(avi_t *AVI) +{ + return(AVI->track[AVI->aptr].a_vbr); +} + +void AVI_set_comment_fd(avi_t *AVI, int fd) +{ + AVI->comment_fd = fd; +} +int AVI_get_comment_fd(avi_t *AVI) +{ + return AVI->comment_fd; +} + + +/******************************************************************* + * * + * Utilities for reading video and audio from an AVI File * + * * + *******************************************************************/ + +int AVI_close(avi_t *AVI) +{ + int ret; + int j,k; + + /* If the file was open for writing, the header and index still have + to be written */ + + if(AVI->mode == AVI_MODE_WRITE) + ret = avi_close_output_file(AVI); + else + ret = 0; + + /* Even if there happened an error, we first clean up */ + if( AVI->mmap_region ) + mmap_free( AVI->mmap_region ); + + if (AVI->comment_fd>0) + close(AVI->comment_fd); + AVI->comment_fd = -1; + close(AVI->fdes); + if(AVI->idx) free(AVI->idx); + if(AVI->video_index) free(AVI->video_index); + if(AVI->video_superindex && AVI->video_superindex->stdindex) { + for (j = 0; j < NR_IXNN_CHUNKS; j++) { + if (AVI->video_superindex->stdindex[j]) { + if (AVI->video_superindex->stdindex[j]->aIndex) { + free(AVI->video_superindex->stdindex[j]->aIndex); + } + free(AVI->video_superindex->stdindex[j]); + } + } + if(AVI->video_superindex->stdindex) free(AVI->video_superindex->stdindex); + if(AVI->video_superindex->aIndex) free(AVI->video_superindex->aIndex); + free(AVI->video_superindex); + } + + for (j=0; janum; j++) + { + if(AVI->track[j].audio_index) free(AVI->track[j].audio_index); + if(AVI->track[j].audio_superindex) { + // shortcut + avisuperindex_chunk *a = AVI->track[j].audio_superindex; + for (k = 0; k < NR_IXNN_CHUNKS; k++) { + if (a->stdindex && a->stdindex[k]) { + if (a->stdindex[k]->aIndex) { + free(a->stdindex[k]->aIndex); + } + free(a->stdindex[k]); + } + } + if(a->stdindex) free(a->stdindex); + if(a->aIndex) free(a->aIndex); + free(a); + } + } + + if (AVI->bitmap_info_header) + free(AVI->bitmap_info_header); + for (j = 0; j < AVI->anum; j++) + if (AVI->wave_format_ex[j]) + free(AVI->wave_format_ex[j]); + + free(AVI); + AVI=NULL; + + return ret; +} + + +#define ERR_EXIT(x) \ +{ \ + AVI_close(AVI); \ + AVI_errno = x; \ + return 0; \ +} + +avi_t *AVI_open_input_indexfile(char *filename, int getIndex, char *indexfile) +{ + avi_t *AVI=NULL; + + /* Create avi_t structure */ + + AVI = (avi_t *) vj_malloc(sizeof(avi_t)); + if(AVI==NULL) + { + AVI_errno = AVI_ERR_NO_MEM; + return 0; + } + veejay_memset((void *)AVI,0,sizeof(avi_t)); + + AVI->mode = AVI_MODE_READ; /* open for reading */ + + /* Open the file */ + +#if defined(SYS_WINDOWS) + AVI->fdes = open(filename,O_RDONLY|O_BINARY); +#else + AVI->fdes = open(filename,O_RDONLY); +#endif + if(AVI->fdes < 0) + { + AVI_errno = AVI_ERR_OPEN; + free(AVI); + return 0; + } + + off_t len = lseek( AVI->fdes, 0, SEEK_END ); + if( len <= (HEADERBYTES+16)) + { + AVI_errno = AVI_ERR_EMPTY; + free(AVI); + return 0; + } + lseek( AVI->fdes,0,SEEK_SET ); + + + AVI->index_file=strdup(indexfile); + AVI_errno = 0; + avi_parse_input_file(AVI, getIndex); + + if (AVI != NULL && !AVI_errno) { + AVI->aptr=0; //reset + } + + if (AVI_errno) + return AVI=NULL; + else + return AVI; +} + +avi_t *AVI_open_indexfd(int fd, int getIndex, char *indexfile) +{ + avi_t *AVI=NULL; + + /* Create avi_t structure */ + + AVI = (avi_t *) vj_malloc(sizeof(avi_t)); + if(AVI==NULL) + { + AVI_errno = AVI_ERR_NO_MEM; + return 0; + } + veejay_memset((void *)AVI,0,sizeof(avi_t)); + + AVI->mode = AVI_MODE_READ; /* open for reading */ + + // file alread open + AVI->fdes = fd; + + AVI->index_file=strdup(indexfile); + AVI_errno = 0; + avi_parse_input_file(AVI, getIndex); + + if (AVI != NULL && !AVI_errno) { + AVI->aptr=0; //reset + } + + if (AVI_errno) + return AVI=NULL; + else + return AVI; +} + + +avi_t *AVI_open_input_file(char *filename, int getIndex, int mmap_size) +{ + avi_t *AVI=NULL; + + /* Create avi_t structure */ + + AVI = (avi_t *) vj_calloc(sizeof(avi_t)); + if(AVI==NULL) + { + AVI_errno = AVI_ERR_NO_MEM; + return 0; + } + + AVI->mode = AVI_MODE_READ; /* open for reading */ + + /* Open the file */ + + AVI->fdes = open(filename,O_RDONLY); + if(AVI->fdes < 0) + { + AVI_errno = AVI_ERR_OPEN; + free(AVI); + return 0; + } + + AVI_errno = 0; + avi_parse_input_file(AVI, getIndex); + + if (AVI != NULL && !AVI_errno) { + AVI->aptr=0; //reset + } + + if (AVI_errno) + return AVI=NULL; + else + return AVI; +} + +avi_t *AVI_open_fd(int fd, int getIndex, int mmap_size) +{ + avi_t *AVI=NULL; + + /* Create avi_t structure */ + + AVI = (avi_t *) vj_malloc(sizeof(avi_t)); + if(AVI==NULL) + { + AVI_errno = AVI_ERR_NO_MEM; + return 0; + } + veejay_memset((void *)AVI,0,sizeof(avi_t)); + + AVI->mode = AVI_MODE_READ; /* open for reading */ + + // file alread open + AVI->fdes = fd; + + AVI_errno = 0; + avi_parse_input_file(AVI, getIndex); + + if (AVI != NULL && !AVI_errno) { + AVI->aptr=0; //reset + } + + + if(!AVI_errno) + { + long file_size = (long)lseek( AVI->fdes, 0, SEEK_END ); + lseek( AVI->fdes, AVI->movi_start, SEEK_SET ); + AVI->mmap_size = AVI->width * AVI->height * mmap_size; + if(AVI->mmap_size > 0 ) + { + AVI->mmap_region = + mmap_file( AVI->fdes,0,AVI->mmap_size,file_size ); + } + } + + + if (AVI_errno) + return AVI=NULL; + else + return AVI; +} + +// transcode-0.6.8 +// reads a file generated by aviindex and builds the index out of it. + +int avi_parse_index_from_file(avi_t *AVI, char *filename) +{ + char data[100]; // line buffer + FILE *fd = NULL; // read from + off_t pos, len, f_pos, tot_chunks[AVI_MAX_TRACKS]; + int key=0, type; + int vid_chunks=0, aud_chunks[AVI_MAX_TRACKS]; + long line_count=0; + char *c, d; + int i,j; + + for (i=0; ivideo_index) { + free(AVI->video_index); + AVI->video_index = NULL; + } + + for(j=0; janum; ++j) { + if(AVI->track[j].audio_index) { + free(AVI->track[j].audio_index); + } + AVI->track[j].audio_index = NULL; + AVI->track[j].audio_chunks = 0; + } + + if (!(fd = fopen(filename, "r"))) { perror ("avi_parse_index_from_file: fopen"); return -1; } + + // read header + fgets(data, 100, fd); + + if ( strncasecmp(data, "AVIIDX1", 7) != 0) { + fprintf(stderr, "%s: Not an AVI index file\n", filename); + return -1; + } + + // read comment + fgets(data, 100, fd); + f_pos = ftell(fd); + while (fgets(data, 100, fd)) { + d = data[5] - '1'; + if (d == 0) { + vid_chunks++; + } else if (d == 1 || d == 2 || d == 3 || d == 4 || + d == 5 || d == 6 || d == 7 || d == 8 ) { + aud_chunks[d-1]++; + } else + continue; + + line_count++; + } + + AVI->video_frames = vid_chunks; + for(j=0; janum; ++j) AVI->track[j].audio_chunks = aud_chunks[j]; + + if(AVI->video_frames==0) ERR_EXIT(AVI_ERR_NO_VIDS); + AVI->video_index = (video_index_entry *) vj_malloc(vid_chunks*sizeof(video_index_entry)); + if(AVI->video_index==0) ERR_EXIT(AVI_ERR_NO_MEM); + + for(j=0; janum; ++j) { + if(AVI->track[j].audio_chunks) { + AVI->track[j].audio_index = (audio_index_entry *) vj_malloc(aud_chunks[j]*sizeof(audio_index_entry)); + if(AVI->track[j].audio_index==0) ERR_EXIT(AVI_ERR_NO_MEM); + } + } + + // reset after header + fseek(fd, f_pos, SEEK_SET); + + vid_chunks = 0; + for(j=0; janum; ++j) aud_chunks[j] = tot_chunks[j] = 0; + + while (fgets(data, 100, fd)) { + // this is very slow + // sscanf(data, "%*s %d %*d %*d %lld %lld %d %*f", &type, &pos, &len, &key); + c = strchr (data, ' '); + type = strtol(c+1, &c, 10); + //ch = strtol(c+1, &c, 10); + c = strchr(c+1, ' '); + //chtype= strtol(c+1, &c, 10); + c = strchr(c+1, ' '); + pos = strtoll(c+1, &c, 10); + len = strtol(c+1, &c, 10); + key = strtol(c+1, &c, 10); + //ms = strtod(c+1, NULL); + i = type-1; + + switch (i) { + case 0: // video + AVI->video_index[vid_chunks].key = (off_t)(key?0x10:0); + AVI->video_index[vid_chunks].pos = pos+8; + AVI->video_index[vid_chunks].len = len; + vid_chunks++; + break; + case 1: case 2: case 3: case 4: + case 5: case 6: case 7: case 8: + j=i-1; + AVI->track[j].audio_index[aud_chunks[j]].pos = pos+8; + AVI->track[j].audio_index[aud_chunks[j]].len = len; + AVI->track[j].audio_index[aud_chunks[j]].tot = tot_chunks[j]; + tot_chunks[j] += AVI->track[j].audio_index[aud_chunks[j]].len; + aud_chunks[j]++; + break; + default: + continue; + } + + } + for(j=0; janum; ++j) AVI->track[j].audio_bytes = tot_chunks[j]; + + fclose (fd); + + return 0; +} + +int avi_parse_input_file(avi_t *AVI, int getIndex) +{ + long i, rate, scale, idx_type; + off_t n; + unsigned char *hdrl_data; + long header_offset=0, hdrl_len=0; + long nvi, nai[AVI_MAX_TRACKS], ioff; + long tot[AVI_MAX_TRACKS]; + int j; + int lasttag = 0; + int vids_strh_seen = 0; + int vids_strf_seen = 0; + int auds_strh_seen = 0; + // int auds_strf_seen = 0; + int num_stream = 0; + char data[256]; + off_t oldpos=-1, newpos=-1; + + /* Read first 12 bytes and check that this is an AVI file */ + + if( avi_read(AVI->fdes,data,12) != 12 ) ERR_EXIT(AVI_ERR_READ) + + if( strncasecmp(data ,"RIFF",4) !=0 || + strncasecmp(data+8,"AVI ",4) !=0 ) ERR_EXIT(AVI_ERR_NO_AVI) + + /* Go through the AVI file and extract the header list, + the start position of the 'movi' list and an optionally + present idx1 tag */ + + hdrl_data = 0; + + + while(1) + { + if( avi_read(AVI->fdes,data,8) != 8 ) break; /* We assume it's EOF */ + newpos=lseek(AVI->fdes,0,SEEK_CUR); + if(oldpos==newpos) { + /* This is a broken AVI stream... */ + return -1; + } + oldpos=newpos; + + n = str2ulong((unsigned char *)data+4); + n = PAD_EVEN(n); + + if(strncasecmp(data,"LIST",4) == 0) + { + if( avi_read(AVI->fdes,data,4) != 4 ) ERR_EXIT(AVI_ERR_READ) + n -= 4; + if(strncasecmp(data,"hdrl",4) == 0) + { + hdrl_len = n; + hdrl_data = (unsigned char *) vj_malloc(n); + if(hdrl_data==0) ERR_EXIT(AVI_ERR_NO_MEM); + + // offset of header + + header_offset = lseek(AVI->fdes,0,SEEK_CUR); + + if( avi_read(AVI->fdes,(char *)hdrl_data,n) != n ) ERR_EXIT(AVI_ERR_READ) + } + else if(strncasecmp(data,"movi",4) == 0) + { + AVI->movi_start = lseek(AVI->fdes,0,SEEK_CUR); + if (lseek(AVI->fdes,n,SEEK_CUR)==(off_t)-1) break; + } + else + if (lseek(AVI->fdes,n,SEEK_CUR)==(off_t)-1) break; + } + else if(strncasecmp(data,"idx1",4) == 0) + { + /* n must be a multiple of 16, but the reading does not + break if this is not the case */ + + AVI->n_idx = AVI->max_idx = n/16; + AVI->idx = (unsigned char((*)[16]) ) vj_malloc(n); + if(AVI->idx==0) ERR_EXIT(AVI_ERR_NO_MEM) + if(avi_read(AVI->fdes, (char *) AVI->idx, n) != n ) { + free ( AVI->idx); AVI->idx=NULL; + AVI->n_idx = 0; + } + } + else + lseek(AVI->fdes,n,SEEK_CUR); + } + + if(!hdrl_data ) ERR_EXIT(AVI_ERR_NO_HDRL) + if(!AVI->movi_start) ERR_EXIT(AVI_ERR_NO_MOVI) + + /* Interpret the header list */ + + for(i=0;icompressor,hdrl_data+i+4,4); + AVI->compressor[4] = 0; + + // ThOe + AVI->v_codech_off = header_offset + i+4; + + scale = str2ulong(hdrl_data+i+20); + rate = str2ulong(hdrl_data+i+24); + if(scale!=0) AVI->fps = (double)rate/(double)scale; + AVI->video_frames = str2ulong(hdrl_data+i+32); + AVI->video_strn = num_stream; + AVI->max_len = 0; + vids_strh_seen = 1; + lasttag = 1; /* vids */ + } + else if (strncasecmp ((char *)hdrl_data+i,"auds",4) ==0 && ! auds_strh_seen) + { + + //inc audio tracks + AVI->aptr=AVI->anum; + ++AVI->anum; + + if(AVI->anum > AVI_MAX_TRACKS) { + fprintf(stderr, "error - only %d audio tracks supported\n", AVI_MAX_TRACKS); + return(-1); + } + + AVI->track[AVI->aptr].audio_bytes = str2ulong(hdrl_data+i+32)*avi_sampsize(AVI, 0); + AVI->track[AVI->aptr].audio_strn = num_stream; + + // if samplesize==0 -> vbr + AVI->track[AVI->aptr].a_vbr = !str2ulong(hdrl_data+i+44); + + AVI->track[AVI->aptr].padrate = str2ulong(hdrl_data+i+24); + + // auds_strh_seen = 1; + lasttag = 2; /* auds */ + + // ThOe + AVI->track[AVI->aptr].a_codech_off = header_offset + i; + + } + else if (strncasecmp (hdrl_data+i,"iavs",4) ==0 && ! auds_strh_seen) { + fprintf(stderr, "AVILIB: error - DV AVI Type 1 no supported\n"); + return (-1); + } + else + lasttag = 0; + num_stream++; + } + else if(strncasecmp(hdrl_data+i,"dmlh",4) == 0) { + AVI->total_frames = str2ulong(hdrl_data+i+8); +#ifdef DEBUG_ODML + fprintf(stderr, "real number of frames %d\n", AVI->total_frames); +#endif + i += 8; + } + else if(strncasecmp((char *)hdrl_data+i,"strf",4)==0) + { + i += 8; + if(lasttag == 1) + { + alBITMAPINFOHEADER bih; + + veejay_memcpy(&bih, hdrl_data + i, sizeof(alBITMAPINFOHEADER)); + AVI->bitmap_info_header = (alBITMAPINFOHEADER *) + vj_malloc(str2ulong((unsigned char *)&bih.bi_size)); + if (AVI->bitmap_info_header != NULL) + veejay_memcpy(AVI->bitmap_info_header, hdrl_data + i, + str2ulong((unsigned char *)&bih.bi_size)); + + AVI->width = str2ulong(hdrl_data+i+4); + AVI->height = str2ulong(hdrl_data+i+8); + vids_strf_seen = 1; + //ThOe + AVI->v_codecf_off = header_offset + i+16; + + veejay_memcpy(AVI->compressor2, hdrl_data+i+16, 4); + AVI->compressor2[4] = 0; + + } + else if(lasttag == 2) + { + alWAVEFORMATEX *wfe; + char *nwfe; + int wfes; + + if ((hdrl_len - i) < sizeof(alWAVEFORMATEX)) + wfes = hdrl_len - i; + else + wfes = sizeof(alWAVEFORMATEX); + wfe = (alWAVEFORMATEX *)vj_malloc(sizeof(alWAVEFORMATEX)); + if (wfe != NULL) { + veejay_memset(wfe, 0, sizeof(alWAVEFORMATEX)); + veejay_memcpy(wfe, hdrl_data + i, wfes); + if (str2ushort((unsigned char *)&wfe->cb_size) != 0) { + nwfe = (char *) + realloc(wfe, sizeof(alWAVEFORMATEX) + + str2ushort((unsigned char *)&wfe->cb_size)); + if (nwfe != 0) { + off_t lpos = lseek(AVI->fdes, 0, SEEK_CUR); + lseek(AVI->fdes, header_offset + i + sizeof(alWAVEFORMATEX), + SEEK_SET); + wfe = (alWAVEFORMATEX *)nwfe; + nwfe = &nwfe[sizeof(alWAVEFORMATEX)]; + avi_read(AVI->fdes, nwfe, + str2ushort((unsigned char *)&wfe->cb_size)); + lseek(AVI->fdes, lpos, SEEK_SET); + } + } + AVI->wave_format_ex[AVI->aptr] = wfe; + } + + AVI->track[AVI->aptr].a_fmt = str2ushort(hdrl_data+i ); + + //ThOe + AVI->track[AVI->aptr].a_codecf_off = header_offset + i; + + AVI->track[AVI->aptr].a_chans = str2ushort(hdrl_data+i+2); + AVI->track[AVI->aptr].a_rate = str2ulong (hdrl_data+i+4); + //ThOe: read mp3bitrate + AVI->track[AVI->aptr].mp3rate = 8*str2ulong(hdrl_data+i+8)/1000; + //:ThOe + AVI->track[AVI->aptr].a_bits = str2ushort(hdrl_data+i+14); + // auds_strf_seen = 1; + } + } + else if(strncasecmp(hdrl_data+i,"indx",4) == 0) { + char *a; + int j; + + if(lasttag == 1) // V I D E O + { + + a = hdrl_data+i; + + AVI->video_superindex = (avisuperindex_chunk *) vj_calloc (sizeof (avisuperindex_chunk)); + veejay_memcpy (AVI->video_superindex->fcc, a, 4); a += 4; + AVI->video_superindex->dwSize = str2ulong(a); a += 4; + AVI->video_superindex->wLongsPerEntry = str2ushort(a); a += 2; + AVI->video_superindex->bIndexSubType = *a; a += 1; + AVI->video_superindex->bIndexType = *a; a += 1; + AVI->video_superindex->nEntriesInUse = str2ulong(a); a += 4; + veejay_memcpy (AVI->video_superindex->dwChunkId, a, 4); a += 4; + + // 3 * reserved + a += 4; a += 4; a += 4; + + if (AVI->video_superindex->bIndexSubType != 0) {fprintf(stderr, "Invalid Header, bIndexSubType != 0\n"); } + + AVI->video_superindex->aIndex = + vj_malloc (AVI->video_superindex->wLongsPerEntry * AVI->video_superindex->nEntriesInUse * sizeof (uint32_t)); + + // position of ix## chunks + for (j=0; jvideo_superindex->nEntriesInUse; ++j) { + AVI->video_superindex->aIndex[j].qwOffset = str2ullong (a); a += 8; + AVI->video_superindex->aIndex[j].dwSize = str2ulong (a); a += 4; + AVI->video_superindex->aIndex[j].dwDuration = str2ulong (a); a += 4; + +#ifdef DEBUG_ODML + printf("[%d] 0x%llx 0x%lx %lu\n", j, + (unsigned long long)AVI->video_superindex->aIndex[j].qwOffset, + (unsigned long)AVI->video_superindex->aIndex[j].dwSize, + (unsigned long)AVI->video_superindex->aIndex[j].dwDuration); +#endif + } + + +#ifdef DEBUG_ODML + printf("FOURCC \"%c%c%c%c\"\n", AVI->video_superindex->fcc[0], AVI->video_superindex->fcc[1], + AVI->video_superindex->fcc[2], AVI->video_superindex->fcc[3]); + printf("LEN \"%ld\"\n", (long)AVI->video_superindex->dwSize); + printf("wLongsPerEntry \"%d\"\n", AVI->video_superindex->wLongsPerEntry); + printf("bIndexSubType \"%d\"\n", AVI->video_superindex->bIndexSubType); + printf("bIndexType \"%d\"\n", AVI->video_superindex->bIndexType); + printf("nEntriesInUse \"%ld\"\n", (long)AVI->video_superindex->nEntriesInUse); + printf("dwChunkId \"%c%c%c%c\"\n", AVI->video_superindex->dwChunkId[0], AVI->video_superindex->dwChunkId[1], + AVI->video_superindex->dwChunkId[2], AVI->video_superindex->dwChunkId[3]); + printf("--\n"); +#endif + + AVI->is_opendml = 1; + + } + else if(lasttag == 2) // A U D I O + { + + a = hdrl_data+i; + + AVI->track[AVI->aptr].audio_superindex = (avisuperindex_chunk *) vj_malloc (sizeof (avisuperindex_chunk)); + veejay_memcpy (AVI->track[AVI->aptr].audio_superindex->fcc, a, 4); a += 4; + AVI->track[AVI->aptr].audio_superindex->dwSize = str2ulong(a); a += 4; + AVI->track[AVI->aptr].audio_superindex->wLongsPerEntry = str2ushort(a); a += 2; + AVI->track[AVI->aptr].audio_superindex->bIndexSubType = *a; a += 1; + AVI->track[AVI->aptr].audio_superindex->bIndexType = *a; a += 1; + AVI->track[AVI->aptr].audio_superindex->nEntriesInUse = str2ulong(a); a += 4; + veejay_memcpy (AVI->track[AVI->aptr].audio_superindex->dwChunkId, a, 4); a += 4; + + // 3 * reserved + a += 4; a += 4; a += 4; + + if (AVI->track[AVI->aptr].audio_superindex->bIndexSubType != 0) {fprintf(stderr, "Invalid Header, bIndexSubType != 0\n"); } + + AVI->track[AVI->aptr].audio_superindex->aIndex = + vj_malloc (AVI->track[AVI->aptr].audio_superindex->wLongsPerEntry * + AVI->track[AVI->aptr].audio_superindex->nEntriesInUse * sizeof (uint32_t)); + + // position of ix## chunks + for (j=0; jtrack[AVI->aptr].audio_superindex->nEntriesInUse; ++j) { + AVI->track[AVI->aptr].audio_superindex->aIndex[j].qwOffset = str2ullong (a); a += 8; + AVI->track[AVI->aptr].audio_superindex->aIndex[j].dwSize = str2ulong (a); a += 4; + AVI->track[AVI->aptr].audio_superindex->aIndex[j].dwDuration = str2ulong (a); a += 4; + +#ifdef DEBUG_ODML + printf("[%d] 0x%llx 0x%lx %lu\n", j, + (unsigned long long)AVI->track[AVI->aptr].audio_superindex->aIndex[j].qwOffset, + (unsigned long)AVI->track[AVI->aptr].audio_superindex->aIndex[j].dwSize, + (unsigned long)AVI->track[AVI->aptr].audio_superindex->aIndex[j].dwDuration); +#endif + } + +#ifdef DEBUG_ODML + printf("FOURCC \"%.4s\"\n", AVI->track[AVI->aptr].audio_superindex->fcc); + printf("LEN \"%ld\"\n", (long)AVI->track[AVI->aptr].audio_superindex->dwSize); + printf("wLongsPerEntry \"%d\"\n", AVI->track[AVI->aptr].audio_superindex->wLongsPerEntry); + printf("bIndexSubType \"%d\"\n", AVI->track[AVI->aptr].audio_superindex->bIndexSubType); + printf("bIndexType \"%d\"\n", AVI->track[AVI->aptr].audio_superindex->bIndexType); + printf("nEntriesInUse \"%ld\"\n", (long)AVI->track[AVI->aptr].audio_superindex->nEntriesInUse); + printf("dwChunkId \"%.4s\"\n", AVI->track[AVI->aptr].audio_superindex->dwChunkId[0]); + printf("--\n"); +#endif + + } + i += 8; + } + else if((strncasecmp(hdrl_data+i,"JUNK",4) == 0) || + (strncasecmp(hdrl_data+i,"strn",4) == 0) || + (strncasecmp(hdrl_data+i,"vprp",4) == 0)){ + i += 8; + // do not reset lasttag + } else + { + i += 8; + lasttag = 0; + } + //printf("adding %ld bytes\n", (long int)n); + + i += n; + } + + free(hdrl_data); + + if(!vids_strh_seen || !vids_strf_seen) ERR_EXIT(AVI_ERR_NO_VIDS) + + AVI->video_tag[0] = AVI->video_strn/10 + '0'; + AVI->video_tag[1] = AVI->video_strn%10 + '0'; + AVI->video_tag[2] = 'd'; + AVI->video_tag[3] = 'b'; + + /* Audio tag is set to "99wb" if no audio present */ + if(!AVI->track[0].a_chans) AVI->track[0].audio_strn = 99; + + { + int i=0; + for(j=0; janum+1; ++j) { + if (j == AVI->video_strn) continue; + AVI->track[i].audio_tag[0] = j/10 + '0'; + AVI->track[i].audio_tag[1] = j%10 + '0'; + AVI->track[i].audio_tag[2] = 'w'; + AVI->track[i].audio_tag[3] = 'b'; + ++i; + } + } + + lseek(AVI->fdes,AVI->movi_start,SEEK_SET); + + /* get index if wanted */ + + if(AVI->index_file && !getIndex) { + int ret; + + ret = avi_parse_index_from_file(AVI, AVI->index_file); + + /* Reposition the file */ + + lseek(AVI->fdes,AVI->movi_start,SEEK_SET); + AVI->video_pos = 0; + return (ret); + + } + if(!getIndex) return(0); + + /* if the file has an idx1, check if this is relative + to the start of the file or to the start of the movi list */ + + idx_type = 0; + + if(AVI->idx) + { + off_t pos, len; + + /* Search the first videoframe in the idx1 and look where + it is in the file */ + + for(i=0;in_idx;i++) + if( strncasecmp((char *)AVI->idx[i],(char *)AVI->video_tag,3)==0 ) break; + if(i>=AVI->n_idx) ERR_EXIT(AVI_ERR_NO_VIDS) + + pos = str2ulong(AVI->idx[i]+ 8); + len = str2ulong(AVI->idx[i]+12); + + lseek(AVI->fdes,pos,SEEK_SET); + if(avi_read(AVI->fdes,data,8)!=8) ERR_EXIT(AVI_ERR_READ) + if( strncasecmp(data,(char *)AVI->idx[i],4)==0 && str2ulong((unsigned char *)data+4)==len ) + { + idx_type = 1; /* Index from start of file */ + } + else + { + lseek(AVI->fdes,pos+AVI->movi_start-4,SEEK_SET); + if(avi_read(AVI->fdes,data,8)!=8) ERR_EXIT(AVI_ERR_READ) + if( strncasecmp(data,(char *)AVI->idx[i],4)==0 && str2ulong((unsigned char *)data+4)==len ) + { + idx_type = 2; /* Index from start of movi list */ + } + } + /* idx_type remains 0 if neither of the two tests above succeeds */ + } + + + if(idx_type == 0 && !AVI->is_opendml && !AVI->total_frames) + { + /* we must search through the file to get the index */ + + lseek(AVI->fdes, AVI->movi_start, SEEK_SET); + + + AVI->n_idx = 0; + + while(1) + { + if( avi_read(AVI->fdes,data,8) != 8 ) break; + n = str2ulong((unsigned char *)data+4); + + /* The movi list may contain sub-lists, ignore them */ + + if(strncasecmp(data,"LIST",4)==0) + { + lseek(AVI->fdes,4,SEEK_CUR); + continue; + } + + /* Check if we got a tag ##db, ##dc or ##wb */ + + if( ( (data[2]=='d' || data[2]=='D') && + (data[3]=='b' || data[3]=='B' || data[3]=='c' || data[3]=='C') ) + || ( (data[2]=='w' || data[2]=='W') && + (data[3]=='b' || data[3]=='B') ) ) + { + avi_add_index_entry(AVI,(unsigned char *)data,0,lseek(AVI->fdes,0,SEEK_CUR)-8,n); + } + + lseek(AVI->fdes,PAD_EVEN(n),SEEK_CUR); + } + idx_type = 1; + } + + // ************************ + // OPENDML + // ************************ + + // read extended index chunks + if (AVI->is_opendml) { + uint64_t offset = 0; + int hdrl_len = 4+4+2+1+1+4+4+8+4; + char *en, *chunk_start; + int k = 0, audtr = 0; + uint32_t nrEntries = 0; + + AVI->video_index = NULL; + + nvi = 0; + for(audtr=0; audtranum; ++audtr) nai[audtr] = tot[audtr] = 0; + + // ************************ + // VIDEO + // ************************ + + for (j=0; jvideo_superindex->nEntriesInUse; j++) { + + // read from file + chunk_start = en = vj_malloc (AVI->video_superindex->aIndex[j].dwSize+hdrl_len); + + if (lseek(AVI->fdes, AVI->video_superindex->aIndex[j].qwOffset, SEEK_SET) == (off_t)-1) { + fprintf(stderr, "(%s) cannot seek to 0x%llx\n", __FILE__, + (unsigned long long)AVI->video_superindex->aIndex[j].qwOffset); + free(chunk_start); + continue; + } + + if (avi_read(AVI->fdes, en, AVI->video_superindex->aIndex[j].dwSize+hdrl_len) <= 0) { + fprintf(stderr, "(%s) cannot read from offset 0x%llx %ld bytes; broken (incomplete) file?\n", + __FILE__, (unsigned long long)AVI->video_superindex->aIndex[j].qwOffset, + (unsigned long)AVI->video_superindex->aIndex[j].dwSize+hdrl_len); + free(chunk_start); + continue; + } + + nrEntries = str2ulong(en + 12); +#ifdef DEBUG_ODML + //printf("[%d:0] Video nrEntries %ld\n", j, nrEntries); +#endif + offset = str2ullong(en + 20); + + // skip header + en += hdrl_len; + nvi += nrEntries; + AVI->video_index = (video_index_entry *) realloc (AVI->video_index, nvi * sizeof (video_index_entry)); + if (!AVI->video_index) { + fprintf(stderr, "AVILIB: out of mem (size = %ld)\n", nvi * sizeof (video_index_entry)); + exit(1); + } + + while (k < nvi) { + + AVI->video_index[k].pos = offset + str2ulong(en); en += 4; + AVI->video_index[k].len = str2ulong_len(en); + AVI->video_index[k].key = str2ulong_key(en); en += 4; + + // completely empty chunk + if (AVI->video_index[k].pos-offset == 0 && AVI->video_index[k].len == 0) { + k--; + nvi--; + } + +#ifdef DEBUG_ODML + /* + printf("[%d] POS 0x%llX len=%d key=%s offset (%llx) (%ld)\n", k, + AVI->video_index[k].pos, + (int)AVI->video_index[k].len, + AVI->video_index[k].key?"yes":"no ", offset, + AVI->video_superindex->aIndex[j].dwSize); + */ +#endif + + k++; + } + + free(chunk_start); + } + + AVI->video_frames = nvi; + // this should deal with broken 'rec ' odml files. + if (AVI->video_frames == 0) { + AVI->is_opendml=0; + goto multiple_riff; + } + + // ************************ + // AUDIO + // ************************ + + for(audtr=0; audtranum; ++audtr) { + + k = 0; + if (!AVI->track[audtr].audio_superindex) { + fprintf(stderr, "(%s) cannot read audio index for track %d\n", __FILE__, audtr); + continue; + } + for (j=0; jtrack[audtr].audio_superindex->nEntriesInUse; j++) { + + // read from file + chunk_start = en = vj_malloc (AVI->track[audtr].audio_superindex->aIndex[j].dwSize+hdrl_len); + + if (lseek(AVI->fdes, AVI->track[audtr].audio_superindex->aIndex[j].qwOffset, SEEK_SET) == (off_t)-1) { + fprintf(stderr, "(%s) cannot seek to 0x%llx\n", __FILE__, (unsigned long long)AVI->track[audtr].audio_superindex->aIndex[j].qwOffset); + free(chunk_start); + continue; + } + + if (avi_read(AVI->fdes, en, AVI->track[audtr].audio_superindex->aIndex[j].dwSize+hdrl_len) <= 0) { + fprintf(stderr, "(%s) cannot read from offset 0x%llx; broken (incomplete) file?\n", + __FILE__,(unsigned long long) AVI->track[audtr].audio_superindex->aIndex[j].qwOffset); + free(chunk_start); + continue; + } + + nrEntries = str2ulong(en + 12); + //if (nrEntries > 50) nrEntries = 2; // XXX +#ifdef DEBUG_ODML + //printf("[%d:%d] Audio nrEntries %ld\n", j, audtr, nrEntries); +#endif + offset = str2ullong(en + 20); + + // skip header + en += hdrl_len; + nai[audtr] += nrEntries; + AVI->track[audtr].audio_index = (audio_index_entry *) realloc (AVI->track[audtr].audio_index, nai[audtr] * sizeof (audio_index_entry)); + + while (k < nai[audtr]) { + + AVI->track[audtr].audio_index[k].pos = offset + str2ulong(en); en += 4; + AVI->track[audtr].audio_index[k].len = str2ulong_len(en); en += 4; + AVI->track[audtr].audio_index[k].tot = tot[audtr]; + tot[audtr] += AVI->track[audtr].audio_index[k].len; + +#ifdef DEBUG_ODML + /* + printf("[%d:%d] POS 0x%llX len=%d offset (%llx) (%ld)\n", k, audtr, + AVI->track[audtr].audio_index[k].pos, + (int)AVI->track[audtr].audio_index[k].len, + offset, AVI->track[audtr].audio_superindex->aIndex[j].dwSize); + */ +#endif + + ++k; + } + + free(chunk_start); + } + + AVI->track[audtr].audio_chunks = nai[audtr]; + AVI->track[audtr].audio_bytes = tot[audtr]; + } + } // is opendml + + else if (AVI->total_frames && !AVI->is_opendml && idx_type==0) { + + // ********************* + // MULTIPLE RIFF CHUNKS (and no index) + // ********************* + + long aud_chunks = 0; +multiple_riff: + + lseek(AVI->fdes, AVI->movi_start, SEEK_SET); + + AVI->n_idx = 0; + + fprintf(stderr, "[avilib] Reconstructing index..."); + + // Number of frames; only one audio track supported + nvi = AVI->video_frames = AVI->total_frames; + nai[0] = AVI->track[0].audio_chunks = AVI->total_frames; + for(j=1; janum; ++j) AVI->track[j].audio_chunks = 0; + + AVI->video_index = (video_index_entry *) vj_malloc(nvi*sizeof(video_index_entry)); + + if(AVI->video_index==0) ERR_EXIT(AVI_ERR_NO_MEM); + + for(j=0; janum; ++j) { + if(AVI->track[j].audio_chunks) { + AVI->track[j].audio_index = (audio_index_entry *) vj_malloc((nai[j]+1)*sizeof(audio_index_entry)); + veejay_memset(AVI->track[j].audio_index, 0, (nai[j]+1)*(sizeof(audio_index_entry))); + if(AVI->track[j].audio_index==0) ERR_EXIT(AVI_ERR_NO_MEM); + } + } + + nvi = 0; + for(j=0; janum; ++j) nai[j] = tot[j] = 0; + + aud_chunks = AVI->total_frames; + + while(1) + { + if (nvi >= AVI->total_frames) break; + + if( avi_read(AVI->fdes,data,8) != 8 ) break; + n = str2ulong((unsigned char *)data+4); + + + j=0; + + if (aud_chunks - nai[j] -1 <= 0) { + aud_chunks += AVI->total_frames; + AVI->track[j].audio_index = (audio_index_entry *) + realloc( AVI->track[j].audio_index, (aud_chunks+1)*sizeof(audio_index_entry)); + if (!AVI->track[j].audio_index) { + fprintf(stderr, "Internal error in avilib -- no mem\n"); + AVI_errno = AVI_ERR_NO_MEM; + return -1; + } + } + + /* Check if we got a tag ##db, ##dc or ##wb */ + + // VIDEO + if( + (data[0]=='0' || data[1]=='0') && + (data[2]=='d' || data[2]=='D') && + (data[3]=='b' || data[3]=='B' || data[3]=='c' || data[3]=='C') ) { + + AVI->video_index[nvi].key = 0x0; + AVI->video_index[nvi].pos = lseek(AVI->fdes,0,SEEK_CUR); + AVI->video_index[nvi].len = n; + + /* + fprintf(stderr, "Frame %ld pos %lld len %lld key %ld\n", + nvi, AVI->video_index[nvi].pos, AVI->video_index[nvi].len, (long)AVI->video_index[nvi].key); + */ + nvi++; + lseek(AVI->fdes,PAD_EVEN(n),SEEK_CUR); + } + + //AUDIO + else if( + (data[0]=='0' || data[1]=='1') && + (data[2]=='w' || data[2]=='W') && + (data[3]=='b' || data[3]=='B') ) { + + + AVI->track[j].audio_index[nai[j]].pos = lseek(AVI->fdes,0,SEEK_CUR); + AVI->track[j].audio_index[nai[j]].len = n; + AVI->track[j].audio_index[nai[j]].tot = tot[j]; + tot[j] += AVI->track[j].audio_index[nai[j]].len; + nai[j]++; + + lseek(AVI->fdes,PAD_EVEN(n),SEEK_CUR); + } + else { + lseek(AVI->fdes,-4,SEEK_CUR); + } + + } + if (nvi < AVI->total_frames) { + fprintf(stderr, "\n[avilib] Uh? Some frames seems missing (%ld/%d)\n", + nvi, AVI->total_frames); + } + + + AVI->video_frames = nvi; + AVI->track[0].audio_chunks = nai[0]; + + for(j=0; janum; ++j) AVI->track[j].audio_bytes = tot[j]; + idx_type = 1; + fprintf(stderr, "done. nvi=%ld nai=%ld tot=%ld\n", nvi, nai[0], tot[0]); + + } // total_frames but no indx chunk (xawtv does this) + + else + + { + // ****************** + // NO OPENDML + // ****************** + + /* Now generate the video index and audio index arrays */ + + nvi = 0; + for(j=0; janum; ++j) nai[j] = 0; + + for(i=0;in_idx;i++) { + + if(strncasecmp((char *)AVI->idx[i],AVI->video_tag,3) == 0) nvi++; + + for(j=0; janum; ++j) if(strncasecmp((char *)AVI->idx[i], AVI->track[j].audio_tag,4) == 0) nai[j]++; + } + + AVI->video_frames = nvi; + for(j=0; janum; ++j) AVI->track[j].audio_chunks = nai[j]; + + + if(AVI->video_frames==0) ERR_EXIT(AVI_ERR_NO_VIDS); + AVI->video_index = (video_index_entry *) vj_malloc(nvi*sizeof(video_index_entry)); + if(AVI->video_index==0) ERR_EXIT(AVI_ERR_NO_MEM); + + for(j=0; janum; ++j) { + if(AVI->track[j].audio_chunks) { + AVI->track[j].audio_index = (audio_index_entry *) vj_malloc((nai[j]+1)*sizeof(audio_index_entry)); + veejay_memset(AVI->track[j].audio_index, 0, (nai[j]+1)*(sizeof(audio_index_entry))); + if(AVI->track[j].audio_index==0) ERR_EXIT(AVI_ERR_NO_MEM); + } + } + + nvi = 0; + for(j=0; janum; ++j) nai[j] = tot[j] = 0; + + ioff = idx_type == 1 ? 8 : AVI->movi_start+4; + + for(i=0;in_idx;i++) { + + //video + if(strncasecmp((char *)AVI->idx[i],AVI->video_tag,3) == 0) { + AVI->video_index[nvi].key = str2ulong(AVI->idx[i]+ 4); + AVI->video_index[nvi].pos = str2ulong(AVI->idx[i]+ 8)+ioff; + AVI->video_index[nvi].len = str2ulong(AVI->idx[i]+12); + nvi++; + } + + //audio + for(j=0; janum; ++j) { + + if(strncasecmp((char *)AVI->idx[i],AVI->track[j].audio_tag,4) == 0) { + AVI->track[j].audio_index[nai[j]].pos = str2ulong(AVI->idx[i]+ 8)+ioff; + AVI->track[j].audio_index[nai[j]].len = str2ulong(AVI->idx[i]+12); + AVI->track[j].audio_index[nai[j]].tot = tot[j]; + tot[j] += AVI->track[j].audio_index[nai[j]].len; + nai[j]++; + } + } + } + + + for(j=0; janum; ++j) AVI->track[j].audio_bytes = tot[j]; + + } // is no opendml + + /* Reposition the file */ + + lseek(AVI->fdes,AVI->movi_start,SEEK_SET); + AVI->video_pos = 0; + + AVI->ffmpeg_codec_id = + vj_el_get_decoder_from_fourcc( AVI->compressor ); + + return(0); +} + +long AVI_video_frames(avi_t *AVI) +{ + return AVI->video_frames; +} +int AVI_video_width(avi_t *AVI) +{ + return AVI->width; +} +int AVI_video_height(avi_t *AVI) +{ + return AVI->height; +} +double AVI_frame_rate(avi_t *AVI) +{ + return AVI->fps; +} +char* AVI_video_compressor(avi_t *AVI) +{ + return AVI->compressor2; +} + +long AVI_max_video_chunk(avi_t *AVI) +{ + return AVI->max_len; +} + +int AVI_audio_tracks(avi_t *AVI) +{ + return(AVI->anum); +} + +int AVI_audio_channels(avi_t *AVI) +{ + return AVI->track[AVI->aptr].a_chans; +} + +long AVI_audio_mp3rate(avi_t *AVI) +{ + return AVI->track[AVI->aptr].mp3rate; +} + +long AVI_audio_padrate(avi_t *AVI) +{ + return AVI->track[AVI->aptr].padrate; +} + +int AVI_audio_bits(avi_t *AVI) +{ + return AVI->track[AVI->aptr].a_bits; +} + +int AVI_audio_format(avi_t *AVI) +{ + return AVI->track[AVI->aptr].a_fmt; +} + +long AVI_audio_rate(avi_t *AVI) +{ + return AVI->track[AVI->aptr].a_rate; +} + +long AVI_audio_bytes(avi_t *AVI) +{ + return AVI->track[AVI->aptr].audio_bytes; +} + +long AVI_audio_chunks(avi_t *AVI) +{ + return AVI->track[AVI->aptr].audio_chunks; +} + +long AVI_audio_codech_offset(avi_t *AVI) +{ + return AVI->track[AVI->aptr].a_codech_off; +} + +long AVI_audio_codecf_offset(avi_t *AVI) +{ + return AVI->track[AVI->aptr].a_codecf_off; +} + +long AVI_video_codech_offset(avi_t *AVI) +{ + return AVI->v_codech_off; +} + +long AVI_video_codecf_offset(avi_t *AVI) +{ + return AVI->v_codecf_off; +} + +long AVI_frame_size(avi_t *AVI, long frame) +{ + if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + if(!AVI->video_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } + + if(frame < 0 || frame >= AVI->video_frames) return 0; + return(AVI->video_index[frame].len); +} + +long AVI_audio_size(avi_t *AVI, long frame) +{ + if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + if(!AVI->track[AVI->aptr].audio_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } + + if(frame < 0 || frame >= AVI->track[AVI->aptr].audio_chunks) return -1; + return(AVI->track[AVI->aptr].audio_index[frame].len); +} + +long AVI_get_video_position(avi_t *AVI, long frame) +{ + if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + if(!AVI->video_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } + + if(frame < 0 || frame >= AVI->video_frames) return 0; + return(AVI->video_index[frame].pos); +} + + +int AVI_seek_start(avi_t *AVI) +{ + if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + + lseek(AVI->fdes,AVI->movi_start,SEEK_SET); + AVI->video_pos = 0; + return 0; +} + +int AVI_set_video_position(avi_t *AVI, long frame) +{ +#ifdef STRICT_CHECKING + assert( AVI->mode != AVI_MODE_WRITE ); + assert( AVI->video_index ); + assert( frame >= 0 && frame < AVI->video_frames); +#endif +// if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } +// if(!AVI->video_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } +// if (frame < 0 ) frame = 0; + AVI->video_pos = frame; + return 0; +} + +int AVI_set_audio_bitrate(avi_t *AVI, long bitrate) +{ + if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + + AVI->track[AVI->aptr].mp3rate = bitrate; + return 0; +} + + +long AVI_read_frame(avi_t *AVI, char *vidbuf, int *keyframe) +{ + long n; +#ifdef STRICT_CHECKING + assert( AVI->mode != AVI_MODE_WRITE ); + assert( AVI->video_index ); + assert( AVI->video_pos >= 0 && AVI->video_pos < AVI->video_frames ); +#endif +// if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } +// if(!AVI->video_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } +// if(AVI->video_pos < 0 || AVI->video_pos >= AVI->video_frames) return -1; + n = AVI->video_index[AVI->video_pos].len; + + *keyframe = (AVI->video_index[AVI->video_pos].key==0x10) ? 1:0; + + if (vidbuf == NULL) { + AVI->video_pos++; + return n; + } + + if( AVI->mmap_region == NULL ) + { + lseek(AVI->fdes, AVI->video_index[AVI->video_pos].pos, SEEK_SET); + if (avi_read(AVI->fdes,vidbuf,n) != n) + { + AVI_errno = AVI_ERR_READ; + return -1; + } + } + else + { + n = mmap_read( AVI->mmap_region, AVI->video_index[ AVI->video_pos].pos, + n, vidbuf ); + } + + + AVI->video_pos++; + + return n; +} + +long AVI_get_audio_position_index(avi_t *AVI) +{ + if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + if(!AVI->track[AVI->aptr].audio_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } + + return (AVI->track[AVI->aptr].audio_posc); +} + +int AVI_set_audio_position_index(avi_t *AVI, long indexpos) +{ + if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + if(!AVI->track[AVI->aptr].audio_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } + if(indexpos > AVI->track[AVI->aptr].audio_chunks) { AVI_errno = AVI_ERR_NO_IDX; return -1; } + + AVI->track[AVI->aptr].audio_posc = indexpos; + AVI->track[AVI->aptr].audio_posb = 0; + + return 0; +} + + +int AVI_set_audio_position(avi_t *AVI, long byte) +{ + long n0, n1, n; + + if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } + if(!AVI->track[AVI->aptr].audio_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } + + if(byte < 0) byte = 0; + + /* Binary search in the audio chunks */ + + n0 = 0; + n1 = AVI->track[AVI->aptr].audio_chunks; + + while(n0track[AVI->aptr].audio_index[n].tot>byte) + n1 = n; + else + n0 = n; + } + + AVI->track[AVI->aptr].audio_posc = n0; + AVI->track[AVI->aptr].audio_posb = byte - AVI->track[AVI->aptr].audio_index[n0].tot; + + return 0; +} + +long AVI_read_audio(avi_t *AVI, char *audbuf, long bytes) +{ + long nr, left, todo; + off_t pos; + +// if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } +// if(!AVI->track[AVI->aptr].audio_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } +#ifdef STRICT_CHECKING + assert( AVI->mode != AVI_MODE_WRITE ); + assert( AVI->track[AVI->aptr].audio_index ); +#endif + nr = 0; /* total number of bytes read */ + + if (bytes==0) { + AVI->track[AVI->aptr].audio_posc++; + AVI->track[AVI->aptr].audio_posb = 0; + lseek(AVI->fdes, 0LL, SEEK_CUR); + } + while(bytes>0) + { + off_t ret; + left = AVI->track[AVI->aptr].audio_index[AVI->track[AVI->aptr].audio_posc].len - AVI->track[AVI->aptr].audio_posb; + if(left==0) + { + if(AVI->track[AVI->aptr].audio_posc>=AVI->track[AVI->aptr].audio_chunks-1) return nr; + AVI->track[AVI->aptr].audio_posc++; + AVI->track[AVI->aptr].audio_posb = 0; + continue; + } + if(bytestrack[AVI->aptr].audio_index[AVI->track[AVI->aptr].audio_posc].pos + AVI->track[AVI->aptr].audio_posb; + if( pos < 0 ) + { + AVI_errno = AVI_ERR_READ; + return -1; + } + if(lseek(AVI->fdes, pos, SEEK_SET) == -1) + { + AVI_errno = AVI_ERR_READ; + return -1; + } + if ( (ret = avi_read(AVI->fdes,audbuf+nr,todo)) != todo) + { + AVI_errno = AVI_ERR_READ; + return -1; + } + bytes -= todo; + nr += todo; + AVI->track[AVI->aptr].audio_posb += todo; + } + + return nr; +} + +long AVI_read_audio_chunk(avi_t *AVI, char *audbuf) +{ + long left; + off_t pos; + +// if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } +// if(!AVI->track[AVI->aptr].audio_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } + +// if (AVI->track[AVI->aptr].audio_posc+1>AVI->track[AVI->aptr].audio_chunks) return -1; + +#ifdef STRICT_CHECKING + assert( AVI->mode != AVI_MODE_WRITE ); + assert( AVI->track[AVI->aptr].audio_index ); + assert( AVI->track[AVI->aptr].audio_posc+1 <= AVI->track[AVI->aptr].audio_chunks ); +#endif + + left = AVI->track[AVI->aptr].audio_index[AVI->track[AVI->aptr].audio_posc].len - AVI->track[AVI->aptr].audio_posb; + + if (audbuf == NULL) return left; + + if(left==0) { + AVI->track[AVI->aptr].audio_posc++; + AVI->track[AVI->aptr].audio_posb = 0; + return 0; + } + + pos = AVI->track[AVI->aptr].audio_index[AVI->track[AVI->aptr].audio_posc].pos + AVI->track[AVI->aptr].audio_posb; + lseek(AVI->fdes, pos, SEEK_SET); + if (avi_read(AVI->fdes,audbuf,left) != left) + { + AVI_errno = AVI_ERR_READ; + return -1; + } + AVI->track[AVI->aptr].audio_posc++; + AVI->track[AVI->aptr].audio_posb = 0; + + return left; +} + +/* AVI_read_data: Special routine for reading the next audio or video chunk + without having an index of the file. */ + +int AVI_read_data(avi_t *AVI, char *vidbuf, long max_vidbuf, + char *audbuf, long max_audbuf, + long *len) +{ + +/* + * Return codes: + * + * 1 = video data read + * 2 = audio data read + * 0 = reached EOF + * -1 = video buffer too small + * -2 = audio buffer too small + */ + + off_t n; + char data[8]; + +// if(AVI->mode==AVI_MODE_WRITE) return 0; +#ifdef STRICT_CHECKING + assert( AVI->mode != AVI_MODE_WRITE ); +#endif + while(1) + { + /* Read tag and length */ + + if( avi_read(AVI->fdes,data,8) != 8 ) return 0; + + /* if we got a list tag, ignore it */ + + if(strncasecmp(data,"LIST",4) == 0) + { + lseek(AVI->fdes,4,SEEK_CUR); + continue; + } + + n = PAD_EVEN(str2ulong((unsigned char *)data+4)); + + if(strncasecmp(data,AVI->video_tag,3) == 0) + { + *len = n; + AVI->video_pos++; + if(n>max_vidbuf) + { + lseek(AVI->fdes,n,SEEK_CUR); + return -1; + } + if(avi_read(AVI->fdes,vidbuf,n) != n ) return 0; + return 1; + } + else if(strncasecmp(data,AVI->track[AVI->aptr].audio_tag,4) == 0) + { + *len = n; + if(n>max_audbuf) + { + lseek(AVI->fdes,n,SEEK_CUR); + return -2; + } + if(avi_read(AVI->fdes,audbuf,n) != n ) return 0; + return 2; + break; + } + else + if(lseek(AVI->fdes,n,SEEK_CUR)<0) return 0; + } +} + +/* AVI_print_error: Print most recent error (similar to perror) */ + +char *(avi_errors[]) = +{ + /* 0 */ "avilib - No Error", + /* 1 */ "avilib - AVI file size limit reached", + /* 2 */ "avilib - Error opening AVI file", + /* 3 */ "avilib - Error reading from AVI file", + /* 4 */ "avilib - Error writing to AVI file", + /* 5 */ "avilib - Error writing index (file may still be useable)", + /* 6 */ "avilib - Error closing AVI file", + /* 7 */ "avilib - Operation (read/write) not permitted", + /* 8 */ "avilib - Out of memory (vj_malloc failed)", + /* 9 */ "avilib - Not an AVI file", + /* 10 */ "avilib - AVI file has no header list (corrupted?)", + /* 11 */ "avilib - AVI file has no MOVI list (corrupted?)", + /* 12 */ "avilib - AVI file has no video data", + /* 13 */ "avilib - operation needs an index", + /* 14 */ "avilib - Unkown Error" +}; +static int num_avi_errors = sizeof(avi_errors)/sizeof(char*); + +static char error_string[4096]; + +void AVI_print_error(char *str) +{ + int aerrno; + + aerrno = (AVI_errno>=0 && AVI_errno=0 && AVI_errnoriff.id ,buf+0, 4); + veejay_memcpy(&wave->riff.len ,buf+4, 4); + veejay_memcpy(&wave->riff.wave_id ,buf+8, 4); + + veejay_memcpy(&wave->format.id ,buf+12, 4); + veejay_memcpy(&wave->format.len ,buf+16, 4); + + veejay_memcpy(&wave->common.wFormatTag ,buf+20, 2); + veejay_memcpy(&wave->common.wChannels ,buf+22, 2); + veejay_memcpy(&wave->common.dwSamplesPerSec ,buf+24, 4); + veejay_memcpy(&wave->common.dwAvgBytesPerSec ,buf+28, 4); + veejay_memcpy(&wave->common.wBlockAlign ,buf+32, 2); + veejay_memcpy(&wave->common.wBitsPerSample ,buf+34, 2); + + veejay_memcpy(&wave->data.id ,buf+36, 4); + veejay_memcpy(&wave->data.len ,buf+40, 4); + + + /* + fprintf(stderr, "RIFF: %c%c%c%c| (%d) (%d)\n", + wave->riff.id[0], wave->riff.id[1], wave->riff.id[2], wave->riff.id[3], + sizeof (*wave), sizeof (struct wave_header)); + fprintf(stderr, "WAVE: %c%c%c%c|\n", + wave->riff.wave_id[0], wave->riff.wave_id[1], wave->riff.wave_id[2], wave->riff.wave_id[3]); + fprintf(stderr, "fmt : %c%c%c%c|\n", + wave->format.id[0], wave->format.id[1], wave->format.id[2], wave->format.id[3]); + fprintf(stderr, "data: %c%c%c%c|\n", + wave->data.id[0], wave->data.id[1], wave->data.id[2], wave->data.id[3]); + */ + + if( strncasecmp(wave->riff.id , "RIFF",4) != 0 || + strncasecmp(wave->riff.wave_id, "WAVE",4) != 0 || + strncasecmp(wave->format.id , "fmt ",4) != 0 ) + { + AVI_errno = AVI_ERR_NO_AVI; + return -1; + } + +#ifdef WORDS_BIGENDIAN +#define x_FIXUP(field) \ + ((field) = (sizeof(field) == 4 ? str2ulong((unsigned char*)&(field)) \ + : str2ushort((unsigned char*)&(field)))) + + x_FIXUP(wave->riff.len); + x_FIXUP(wave->format.len); + x_FIXUP(wave->common.wFormatTag); + x_FIXUP(wave->common.wChannels); + x_FIXUP(wave->common.dwSamplesPerSec); + x_FIXUP(wave->common.dwAvgBytesPerSec); + x_FIXUP(wave->common.wBlockAlign); + x_FIXUP(wave->common.wBitsPerSample); + x_FIXUP(wave->data.len); + +#undef x_FIXUP +#endif + + return 0; +} + +int AVI_write_wave_header( int fd, const struct wave_header * wave ) +{ + char buf[44]; + struct wave_header buffer = *wave; + + + +#ifdef WORDS_BIGENDIAN +#define x_FIXUP(field) \ + ((sizeof(field) == 4 ? long2str((unsigned char*)&(field),(field)) \ + : short2str((unsigned char*)&(field),(field)))) + + x_FIXUP(buffer.riff.len); + x_FIXUP(buffer.format.len); + x_FIXUP(buffer.common.wFormatTag); + x_FIXUP(buffer.common.wChannels); + x_FIXUP(buffer.common.dwSamplesPerSec); + x_FIXUP(buffer.common.dwAvgBytesPerSec); + x_FIXUP(buffer.common.wBlockAlign); + x_FIXUP(buffer.common.wBitsPerSample); + x_FIXUP(buffer.data.len); + +#undef x_FIXUP +#endif + + veejay_memcpy(buf+ 0, &buffer.riff.id, 4); + veejay_memcpy(buf+ 4, &buffer.riff.len, 4); + veejay_memcpy(buf+ 8, &buffer.riff.wave_id, 4); + + veejay_memcpy(buf+12, &buffer.format.id, 4); + veejay_memcpy(buf+16, &buffer.format.len, 4); + + veejay_memcpy(buf+20, &buffer.common.wFormatTag, 2); + veejay_memcpy(buf+22, &buffer.common.wChannels, 2); + veejay_memcpy(buf+24, &buffer.common.dwSamplesPerSec, 4); + veejay_memcpy(buf+28, &buffer.common.dwAvgBytesPerSec, 4); + veejay_memcpy(buf+32, &buffer.common.wBlockAlign, 2); + veejay_memcpy(buf+34, &buffer.common.wBitsPerSample, 2); + + veejay_memcpy(buf+36, &buffer.data.id, 4); + veejay_memcpy(buf+40, &buffer.data.len, 4); + + + // write raw data + if( avi_write (fd, buf, sizeof(buf)) != sizeof(buf) ) + { + AVI_errno = AVI_ERR_WRITE; + return -1; + } + + return 0; +} + +size_t AVI_read_wave_pcm_data( int fd, void * buffer, size_t buflen ) +{ + int doneread = avi_read(fd, buffer, buflen); + +#ifdef WORDS_BIGENDIAN + { + char * bufptr = buffer; + size_t i; + char tmp; + + for( i=0; i0 ) + { + buflen = datalen; + if( buflen > sizeof(buffer) ) + { + buflen = sizeof(buffer); + } + + for( i=0; ifdes; +} + +int AVI_video_compressor_type(avi_t *AVI) +{ + return AVI->ffmpeg_codec_id; +} diff --git a/veejay-server/libel/avilib.h b/veejay-server/libel/avilib.h new file mode 100644 index 00000000..ec53cc4b --- /dev/null +++ b/veejay-server/libel/avilib.h @@ -0,0 +1,464 @@ +/* + * avilib.h + * + * Copyright (C) Thomas streich - June 2001 + * multiple audio track support Copyright (C) 2002 Thomas streich + * + * Original code: + * Copyright (C) 1999 Rainer Johanni + * + * This file is part of transcode, a video stream processing tool + * + * transcode is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * transcode 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 Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#ifndef AVILIB_H +#define AVILIB_H + +#define AVI_MAX_TRACKS 8 + +typedef struct +{ + off_t key; + off_t pos; + off_t len; +} video_index_entry; + +typedef struct +{ + off_t pos; + off_t len; + off_t tot; +} audio_index_entry; + + +// Index types + + +#define AVI_INDEX_OF_INDEXES 0x00 // when each entry in aIndex + // array points to an index chunk +#define AVI_INDEX_OF_CHUNKS 0x01 // when each entry in aIndex + // array points to a chunk in the file +#define AVI_INDEX_IS_DATA 0x80 // when each entry is aIndex is + // really the data +// bIndexSubtype codes for INDEX_OF_CHUNKS +// +#define AVI_INDEX_2FIELD 0x01 // when fields within frames + // are also indexed + + + +typedef struct _avisuperindex_entry { + uint64_t qwOffset; // absolute file offset + uint32_t dwSize; // size of index chunk at this offset + uint32_t dwDuration; // time span in stream ticks +} avisuperindex_entry; + +typedef struct _avistdindex_entry { + uint32_t dwOffset; // qwBaseOffset + this is absolute file offset + uint32_t dwSize; // bit 31 is set if this is NOT a keyframe +} avistdindex_entry; + +// Standard index +typedef struct _avistdindex_chunk { + char fcc[4]; // ix## + uint32_t dwSize; // size of this chunk + uint16_t wLongsPerEntry; // must be sizeof(aIndex[0])/sizeof(DWORD) + uint8_t bIndexSubType; // must be 0 + uint8_t bIndexType; // must be AVI_INDEX_OF_CHUNKS + uint32_t nEntriesInUse; // + char dwChunkId[4]; // '##dc' or '##db' or '##wb' etc.. + uint64_t qwBaseOffset; // all dwOffsets in aIndex array are relative to this + uint32_t dwReserved3; // must be 0 + avistdindex_entry *aIndex; +} avistdindex_chunk; + + +// Base Index Form 'indx' +typedef struct _avisuperindex_chunk { + char fcc[4]; + uint32_t dwSize; // size of this chunk + uint16_t wLongsPerEntry; // size of each entry in aIndex array (must be 8 for us) + uint8_t bIndexSubType; // future use. must be 0 + uint8_t bIndexType; // one of AVI_INDEX_* codes + uint32_t nEntriesInUse; // index of first unused member in aIndex array + char dwChunkId[4]; // fcc of what is indexed + uint32_t dwReserved[3]; // meaning differs for each index type/subtype. + // 0 if unused + avisuperindex_entry *aIndex; // where are the ix## chunks + avistdindex_chunk **stdindex; // the ix## chunks itself (array) +} avisuperindex_chunk; + + + +typedef struct track_s +{ + + long a_fmt; /* Audio format, see #defines below */ + long a_chans; /* Audio channels, 0 for no audio */ + long a_rate; /* Rate in Hz */ + long a_bits; /* bits per audio sample */ + long mp3rate; /* mp3 bitrate kbs*/ + long a_vbr; /* 0 == no Variable BitRate */ + long padrate; /* byte rate used for zero padding */ + + long audio_strn; /* Audio stream number */ + off_t audio_bytes; /* Total number of bytes of audio data */ + long audio_chunks; /* Chunks of audio data in the file */ + + char audio_tag[4]; /* Tag of audio data */ + long audio_posc; /* Audio position: chunk */ + long audio_posb; /* Audio position: byte within chunk */ + + off_t a_codech_off; /* absolut offset of audio codec information */ + off_t a_codecf_off; /* absolut offset of audio codec information */ + + audio_index_entry *audio_index; + avisuperindex_chunk *audio_superindex; + +} track_t; + +typedef struct +{ + uint32_t bi_size; + uint32_t bi_width; + uint32_t bi_height; + uint16_t bi_planes; + uint16_t bi_bit_count; + uint32_t bi_compression; + uint32_t bi_size_image; + uint32_t bi_x_pels_per_meter; + uint32_t bi_y_pels_per_meter; + uint32_t bi_clr_used; + uint32_t bi_clr_important; +} alBITMAPINFOHEADER; + +typedef struct __attribute__((__packed__)) +{ + uint16_t w_format_tag; + uint16_t n_channels; + uint32_t n_samples_per_sec; + uint32_t n_avg_bytes_per_sec; + uint16_t n_block_align; + uint16_t w_bits_per_sample; + uint16_t cb_size; +} alWAVEFORMATEX; + +typedef struct __attribute__((__packed__)) +{ + uint32_t fcc_type; + uint32_t fcc_handler; + uint32_t dw_flags; + uint32_t dw_caps; + uint16_t w_priority; + uint16_t w_language; + uint32_t dw_scale; + uint32_t dw_rate; + uint32_t dw_start; + uint32_t dw_length; + uint32_t dw_initial_frames; + uint32_t dw_suggested_buffer_size; + uint32_t dw_quality; + uint32_t dw_sample_size; + uint32_t dw_left; + uint32_t dw_top; + uint32_t dw_right; + uint32_t dw_bottom; + uint32_t dw_edit_count; + uint32_t dw_format_change_count; + char sz_name[64]; +} alAVISTREAMINFO; + +typedef struct +{ + + long fdes; /* File descriptor of AVI file */ + long mode; /* 0 for reading, 1 for writing */ + + long width; /* Width of a video frame */ + long height; /* Height of a video frame */ + double fps; /* Frames per second */ + char compressor[8]; /* Type of compressor, 4 bytes + padding for 0 byte */ + char compressor2[8]; /* Type of compressor, 4 bytes + padding for 0 byte */ + long video_strn; /* Video stream number */ + long video_frames; /* Number of video frames */ + char video_tag[4]; /* Tag of video data */ + long video_pos; /* Number of next frame to be read + (if index present) */ + + uint32_t max_len; /* maximum video chunk present */ + + track_t track[AVI_MAX_TRACKS]; // up to AVI_MAX_TRACKS audio tracks supported + + off_t pos; /* position in file */ + long n_idx; /* number of index entries actually filled */ + long max_idx; /* number of index entries actually allocated */ + + off_t v_codech_off; /* absolut offset of video codec (strh) info */ + off_t v_codecf_off; /* absolut offset of video codec (strf) info */ + + uint8_t (*idx)[16]; /* index entries (AVI idx1 tag) */ + + video_index_entry *video_index; + avisuperindex_chunk *video_superindex; /* index of indices */ + int is_opendml; /* set to 1 if this is an odml file with multiple index chunks */ + + off_t last_pos; /* Position of last frame written */ + uint32_t last_len; /* Length of last frame written */ + int must_use_index; /* Flag if frames are duplicated */ + off_t movi_start; + int total_frames; /* total number of frames if dmlh is present */ + + int anum; // total number of audio tracks + int aptr; // current audio working track + int comment_fd; // Read avi header comments from this fd + char *index_file; // read the avi index from this file + + alBITMAPINFOHEADER *bitmap_info_header; + alWAVEFORMATEX *wave_format_ex[AVI_MAX_TRACKS]; + + void* extradata; + unsigned long extradata_size; + + mmap_region_t *mmap_region; + off_t mmap_offset; + size_t mmap_size; + int ffmpeg_codec_id; +} avi_t; + +#define AVI_MODE_WRITE 0 +#define AVI_MODE_READ 1 + +/* The error codes delivered by avi_open_input_file */ + +#define AVI_ERR_SIZELIM 1 /* The write of the data would exceed + the maximum size of the AVI file. + This is more a warning than an error + since the file may be closed safely */ + +#define AVI_ERR_OPEN 2 /* Error opening the AVI file - wrong path + name or file nor readable/writable */ + +#define AVI_ERR_READ 3 /* Error reading from AVI File */ + +#define AVI_ERR_WRITE 4 /* Error writing to AVI File, + disk full ??? */ + +#define AVI_ERR_WRITE_INDEX 5 /* Could not write index to AVI file + during close, file may still be + usable */ + +#define AVI_ERR_CLOSE 6 /* Could not write header to AVI file + or not truncate the file during close, + file is most probably corrupted */ + +#define AVI_ERR_NOT_PERM 7 /* Operation not permitted: + trying to read from a file open + for writing or vice versa */ + +#define AVI_ERR_NO_MEM 8 /* malloc failed */ + +#define AVI_ERR_NO_AVI 9 /* Not an AVI file */ + +#define AVI_ERR_NO_HDRL 10 /* AVI file has no has no header list, + corrupted ??? */ + +#define AVI_ERR_NO_MOVI 11 /* AVI file has no has no MOVI list, + corrupted ??? */ + +#define AVI_ERR_NO_VIDS 12 /* AVI file contains no video data */ + +#define AVI_ERR_NO_IDX 13 /* The file has been opened with + getIndex==0, but an operation has been + performed that needs an index */ + +#define AVI_ERR_EMPTY 14 /* AVI file is empty (header only)*/ + +/* Possible Audio formats */ + +#ifndef WAVE_FORMAT_PCM +#define WAVE_FORMAT_UNKNOWN (0x0000) +#define WAVE_FORMAT_PCM (0x0001) +#define WAVE_FORMAT_ADPCM (0x0002) +#define WAVE_FORMAT_IBM_CVSD (0x0005) +#define WAVE_FORMAT_ALAW (0x0006) +#define WAVE_FORMAT_MULAW (0x0007) +#define WAVE_FORMAT_OKI_ADPCM (0x0010) +#define WAVE_FORMAT_DVI_ADPCM (0x0011) +#define WAVE_FORMAT_DIGISTD (0x0015) +#define WAVE_FORMAT_DIGIFIX (0x0016) +#define WAVE_FORMAT_YAMAHA_ADPCM (0x0020) +#define WAVE_FORMAT_DSP_TRUESPEECH (0x0022) +#define WAVE_FORMAT_GSM610 (0x0031) +#define IBM_FORMAT_MULAW (0x0101) +#define IBM_FORMAT_ALAW (0x0102) +#define IBM_FORMAT_ADPCM (0x0103) +#endif + +avi_t* AVI_open_output_file(char * filename); +void AVI_set_video(avi_t *AVI, int width, int height, double fps, char *compressor); +int AVI_set_audio(avi_t *AVI, int channels, long rate, int bits, int format); +int AVI_write_frame(avi_t *AVI, char *data, long bytes); +int AVI_dup_frame(avi_t *AVI); +int AVI_write_audio(avi_t *AVI, char *data, long bytes); +int AVI_append_audio(avi_t *AVI, char *data, long bytes); +long AVI_bytes_remain(avi_t *AVI); +int AVI_close(avi_t *AVI); +long AVI_bytes_written(avi_t *AVI); + +avi_t *AVI_open_input_file(char *filename, int getIndex, int mmap_size); +avi_t *AVI_open_input_indexfile(char *filename, int getIndex, char *indexfile); +avi_t *AVI_open_fd(int fd, int getIndex, int mmap_size); +avi_t *AVI_open_indexfd(int fd, int getIndex, char *indexfile); +int avi_parse_input_file(avi_t *AVI, int getIndex); +int avi_parse_index_from_file(avi_t *AVI, char *filename); +long AVI_audio_mp3rate(avi_t *AVI); +long AVI_audio_padrate(avi_t *AVI); +long AVI_video_frames(avi_t *AVI); +int AVI_video_width(avi_t *AVI); +int AVI_video_height(avi_t *AVI); +double AVI_frame_rate(avi_t *AVI); +char* AVI_video_compressor(avi_t *AVI); + +int AVI_audio_channels(avi_t *AVI); +int AVI_audio_bits(avi_t *AVI); +int AVI_audio_format(avi_t *AVI); +long AVI_audio_rate(avi_t *AVI); +long AVI_audio_bytes(avi_t *AVI); +long AVI_audio_chunks(avi_t *AVI); +int AVI_can_read_audio(avi_t *AVI); + +long AVI_max_video_chunk(avi_t *AVI); + +long AVI_frame_size(avi_t *AVI, long frame); +long AVI_audio_size(avi_t *AVI, long frame); +int AVI_seek_start(avi_t *AVI); +int AVI_set_video_position(avi_t *AVI, long frame); +long AVI_get_video_position(avi_t *AVI, long frame); +long AVI_read_frame(avi_t *AVI, char *vidbuf, int *keyframe); + +int AVI_set_audio_position(avi_t *AVI, long byte); +int AVI_set_audio_bitrate(avi_t *AVI, long bitrate); + +long AVI_get_audio_position_index(avi_t *AVI); +int AVI_set_audio_position_index(avi_t *AVI, long indexpos); + +long AVI_read_audio(avi_t *AVI, char *audbuf, long bytes); +long AVI_read_audio_chunk(avi_t *AVI, char *audbuf); + +long AVI_audio_codech_offset(avi_t *AVI); +long AVI_audio_codecf_offset(avi_t *AVI); +long AVI_video_codech_offset(avi_t *AVI); +long AVI_video_codecf_offset(avi_t *AVI); + +int AVI_read_data(avi_t *AVI, char *vidbuf, long max_vidbuf, + char *audbuf, long max_audbuf, + long *len); + +void AVI_print_error(char *str); +char *AVI_strerror(void); +char *AVI_syserror(void); + +int AVI_scan(char *name); +int AVI_dump(char *name, int mode); + +char *AVI_codec2str(short cc); +int AVI_file_check(char *import_file); + +void AVI_info(avi_t *avifile); +uint64_t AVI_max_size(void); +int avi_update_header(avi_t *AVI); + +int AVI_set_audio_track(avi_t *AVI, int track); +int AVI_get_audio_track(avi_t *AVI); +int AVI_audio_tracks(avi_t *AVI); + +void AVI_set_audio_vbr(avi_t *AVI, long is_vbr); +long AVI_get_audio_vbr(avi_t *AVI); + +void AVI_set_comment_fd(avi_t *AVI, int fd); +int AVI_get_comment_fd(avi_t *AVI); + +struct riff_struct +{ + uint8_t id[4]; /* RIFF */ + uint32_t len; + uint8_t wave_id[4]; /* WAVE */ +}; + + +struct chunk_struct +{ + uint8_t id[4]; + uint32_t len; +}; + +struct common_struct +{ + uint16_t wFormatTag; + uint16_t wChannels; + uint32_t dwSamplesPerSec; + uint32_t dwAvgBytesPerSec; + uint16_t wBlockAlign; + uint16_t wBitsPerSample; /* Only for PCM */ +}; + +struct wave_header +{ + struct riff_struct riff; + struct chunk_struct format; + struct common_struct common; + struct chunk_struct data; +}; + +// Simple WAV IO +int AVI_read_wave_header( int fd, struct wave_header * wave ); +int AVI_write_wave_header( int fd, const struct wave_header * wave ); +size_t AVI_read_wave_pcm_data( int fd, void * buffer, size_t buflen ); +size_t AVI_write_wave_pcm_data( int fd, const void * buffer, size_t buflen ); +int AVI_video_compressor_type(avi_t *AVI); +int AVI_fileno(avi_t *AVI); + +struct AVIStreamHeader { + long fccType; + long fccHandler; + long dwFlags; + long dwPriority; + long dwInitialFrames; + long dwScale; + long dwRate; + long dwStart; + long dwLength; + long dwSuggestedBufferSize; + long dwQuality; + long dwSampleSize; +}; + +#endif diff --git a/veejay-server/libel/elcache.c b/veejay-server/libel/elcache.c new file mode 100644 index 00000000..7907472b --- /dev/null +++ b/veejay-server/libel/elcache.c @@ -0,0 +1,207 @@ +/* + * Copyright (C) 2002-2006 Niels Elburg + * + * 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. + * + */ + +/* + Cache frames from file to memory + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif + +typedef struct +{ + int size; + int fmt; + long num; + void *buffer; +} cache_slot_t; + +typedef struct +{ + cache_slot_t **cache; + int len; + long *index; +} cache_t; + +static int cache_free_slot(cache_t *v) +{ + int i; + for( i = 0; i < v->len; i ++ ) + if( v->index[i] == -1 ) return i; + return -1; +} + +static long total_mem_used_ = 0; + +static void cache_claim_slot(cache_t *v, int free_slot, uint8_t *linbuf, long frame_num,int buf_len, int decoder_id) +{ + // create new node + cache_slot_t *data = (cache_slot_t*) vj_malloc(sizeof(cache_slot_t)); + data->size = buf_len; + data->num = frame_num; + data->fmt = decoder_id; + data->buffer = vj_malloc( buf_len ); +#ifdef STRICT_CHECKING + assert( v->index[free_slot] != frame_num ); +#endif + // clear old buffer + if( v->index[free_slot] >= 0 ) + { + cache_slot_t *del_slot = v->cache[free_slot]; + total_mem_used_ -= del_slot->size; + free( del_slot->buffer ); + free( del_slot ); + v->cache[free_slot] = NULL; + } + + veejay_memcpy( data->buffer, linbuf, buf_len ); + v->index[ free_slot ] = frame_num; + v->cache[ free_slot ] = data; + total_mem_used_ += buf_len; +} + +static int cache_find_slot( cache_t *v, long frame_num ) +{ + int i; + int k = 0; + long n = 0; + for( i = 0; i < v->len ; i ++ ) + { + long d = abs( v->index[i] - frame_num ); + if( d > n ) + { n = d; k = i ; } + } + return k; +} + +static int cache_locate_slot( cache_t *v, long frame_num) +{ + int i; + for( i = 0; i < v->len ; i ++ ) + if( v->index[i] == frame_num ) + return i; + return -1; +} + + +void *init_cache( unsigned int n_slots ) +{ + if(n_slots <= 0) + return NULL; + cache_t *v = (cache_t*) vj_calloc(sizeof(cache_t)); + v->len = n_slots; + v->cache = (cache_slot_t**) vj_calloc(sizeof(cache_slot_t*) * v->len ); + if(!v->cache) + { + free(v); + return NULL; + } + v->index = (long*) vj_malloc(sizeof(long) * v->len ); + int n; + for( n = 0; n < v->len ; n ++ ) + v->index[n] = -1; + return (void*) v; +} + +void reset_cache(void *cache) +{ + int i = 0; + cache_t *v = (cache_t*) cache; + + for( i = 0; i < v->len; i ++ ) + { + v->index[i] = -1; + if( v->cache[i] ) + { + total_mem_used_ -= v->cache[i]->size; + if(v->cache[i]->buffer) + free(v->cache[i]->buffer); + free(v->cache[i]); + v->cache[i] = NULL; + } + } +} + +int cache_avail_mb() +{ + return ( total_mem_used_ == 0 ? 0 : total_mem_used_ / (1024 * 1024 )); +} + + +void free_cache(void *cache) +{ + cache_t *v = (cache_t*) cache; + reset_cache( cache ); + free(v->cache); + free(v->index); + free(v); + v = NULL; +} + +void cache_frame( void *cache, uint8_t *linbuf, int buflen, long frame_num , int decoder_id) +{ + cache_t *v = (cache_t*) cache; +#ifdef STRICT_CHECKING + assert( cache != NULL ); + assert( linbuf != NULL ); + assert( buflen > 0 ); + assert( frame_num >= 0 ); +#else + if( buflen <= 0 ) + return; +#endif + int slot_num = cache_free_slot( cache ); + if( slot_num == -1 ) + slot_num = cache_find_slot( v, frame_num ); + +#ifdef STRICT_CHECKING + assert(slot_num >= 0 ); +#endif + cache_claim_slot(v, slot_num, linbuf, frame_num, buflen, decoder_id); +} + +uint8_t *get_cached_frame( void *cache, long frame_num, int *buf_len, int *decoder_id ) +{ + cache_t *v = (cache_t*) cache; + int slot = cache_locate_slot( v, frame_num ); + if( slot == -1 ) + return NULL; + + cache_slot_t *data = v->cache[ slot ]; +#ifdef STRICT_CHECKING + assert( data->size > 0 ); + assert( data->buffer != NULL ); +#endif + + *buf_len = data->size; + *decoder_id = data->fmt; +#ifdef STRICT_CHECKING + assert( data->num == frame_num ); +#endif + return (uint8_t*) data->buffer; +} diff --git a/veejay-server/libel/elcache.h b/veejay-server/libel/elcache.h new file mode 100644 index 00000000..3ef5e2ec --- /dev/null +++ b/veejay-server/libel/elcache.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2002-2006 Niels Elburg + * + * 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. + * + */ + +#ifndef ELCACHE_H +#define ELCACHE_H + +uint8_t *get_cached_frame( void *cache, long frame_num, int *buf_len, int *decoder_id ); +void cache_frame( void *cache, uint8_t *linbuf, int buflen, long frame_num , int decoder_id); +void free_cache(void *cache); +void *init_cache( unsigned int n_slots ); +void reset_cache(void *cache); +int cache_avail_mb(); + +#endif diff --git a/veejay-server/libel/lav_io.c b/veejay-server/libel/lav_io.c new file mode 100644 index 00000000..e48ea20a --- /dev/null +++ b/veejay-server/libel/lav_io.c @@ -0,0 +1,1866 @@ +/* + * Some routines for handling I/O from/to different video + * file formats (currently AVI, Quicktime and movtar). + * + * These routines are isolated here in an extra file + * in order to be able to handle more formats in the future. + * + * Copyright (C) 2000 Rainer Johanni + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#ifdef USE_GDK_PIXBUF +#include +#endif +#include AVCODEC_INC +#ifdef HAVE_LIBQUICKTIME +#include +#include +#endif +#include +#include +#include +#define QUICKTIME_MJPG_TAG 0x6d6a7067 +extern int vj_el_get_decoder_from_fourcc( const char *fourcc ); + + +extern int AVI_errno; +static int _lav_io_default_chroma = CHROMAUNKNOWN; +static char video_format=' '; +static int internal_error=0; + +#define ERROR_JPEG 1 +#define ERROR_MALLOC 2 +#define ERROR_FORMAT 3 +#define ERROR_NOAUDIO 4 + +static unsigned long jpeg_field_size = 0; +static unsigned long jpeg_quant_offset = 0; +static unsigned long jpeg_huffman_offset = 0; +static unsigned long jpeg_image_offset = 0; +static unsigned long jpeg_scan_offset = 0; +static unsigned long jpeg_data_offset = 0; +static unsigned long jpeg_padded_len = 0; +static unsigned long jpeg_app0_offset = 0; +static unsigned long jpeg_app1_offset = 0; + +uint16_t reorder_16(uint16_t todo, int big_endian); + +#ifdef USE_GDK_PIXBUF +static int output_scale_width = 0; +static int output_scale_height = 0; +static float output_fps = 25.0; +static int output_yuv = 1; // 422 + +void lav_set_project(int w, int h, float f, int fmt) +{ + output_scale_width = w; + output_scale_height = h; + output_fps = f; + output_yuv = fmt; +} +#else +void lav_set_project(int w, int h, float f, int fmt) +{ +} +#endif + +#define M_SOF0 0xC0 +#define M_SOF1 0xC1 +#define M_DHT 0xC4 +#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ +#define M_EOI 0xD9 /* End Of Image (end of datastream) */ +#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ +#define M_DQT 0xDB +#define M_APP0 0xE0 +#define M_APP1 0xE1 + + +#ifdef HAVE_LIBQUICKTIME +/* + put_int4: + Put a 4 byte integer value into a character array as big endian number +*/ + +static void put_int4(unsigned char *buf, int val) +{ + buf[0] = (val >> 24); + buf[1] = (val >> 16); + buf[2] = (val >> 8 ); + buf[3] = (val ); +} +#endif + +//#ifdef SUPPORT_READ_DV2 +//static int check_DV2_input(lav_file_t *lav_fd); +//#endif + +#define TMP_EXTENSION ".tmp" + +/* + get_int2: + get a 2 byte integer value from a character array as big endian number + */ + +static int get_int2(unsigned char *buff) +{ + return (buff[0]*256 + buff[1]); +} + +/* + scan_jpeg: + Scan jpeg data for markers, needed for Quicktime MJPA format + and partly for AVI files. + Taken mostly from Adam Williams' quicktime library + */ + +static int scan_jpeg(unsigned char * jpegdata, long jpeglen, int header_only) +{ + int marker, length; + long p; + + jpeg_field_size = 0; + jpeg_quant_offset = 0; + jpeg_huffman_offset = 0; + jpeg_image_offset = 0; + jpeg_scan_offset = 0; + jpeg_data_offset = 0; + jpeg_padded_len = 0; + jpeg_app0_offset = 0; + jpeg_app1_offset = 0; + + /* The initial marker must be SOI */ + + if (jpegdata[0] != 0xFF || jpegdata[1] != M_SOI) return -1; + + /* p is the pointer within the jpeg data */ + + p = 2; + + /* scan through the jpeg data */ + + while(p=jpeglen) return -1; + } + + /* Get marker code byte, swallowing any duplicate FF bytes */ + while(jpegdata[p] == 0xFF) + { + p++; + if(p>=jpeglen) return -1; + } + + marker = jpegdata[p++]; + + if(p<=jpeglen-2) + length = get_int2(jpegdata+p); + else + length = 0; + + /* We found a marker - check it */ + + if(marker == M_EOI) { jpeg_field_size = p; break; } + + switch(marker) + { + case M_SOF0: + case M_SOF1: + jpeg_image_offset = p-2; + break; + case M_DQT: + if(jpeg_quant_offset==0) jpeg_quant_offset = p-2; + break; + case M_DHT: + if(jpeg_huffman_offset==0) jpeg_huffman_offset = p-2; + break; + case M_SOS: + jpeg_scan_offset = p-2; + jpeg_data_offset = p+length; + if(header_only) return 0; /* we are done with the headers */ + break; + case M_APP0: + if(jpeg_app0_offset==0) jpeg_app0_offset = p-2; + break; + case M_APP1: + if(jpeg_app1_offset==0) jpeg_app1_offset = p-2; + break; + } + + /* The pseudo marker as well as the markers M_TEM (0x01) + and M_RST0 ... M_RST7 (0xd0 ... 0xd7) have no paramters. + M_SOI and M_EOI also have no parameters, but we should + never come here in that case */ + + if(marker == 0 || marker == 1 || (marker >= 0xd0 && marker <= 0xd7)) + continue; + + /* skip length bytes */ + + if(p+length<=jpeglen) + p += length; + else + return -1; + } + + /* We are through parsing the jpeg data, we should have seen M_EOI */ + + if(!jpeg_field_size) return -1; + + /* Check for trailing garbage until jpeglen is reached or a new + M_SOI is seen */ + + while(pavi_fd = 0; + lav_fd->format = format; + lav_fd->interlacing = interlaced ? lav_query_polarity(format) : + LAV_NOT_INTERLACED; + lav_fd->has_audio = (asize>0 && achans>0); + lav_fd->bps = (asize*achans+7)/8; + lav_fd->is_MJPG = 1; + lav_fd->MJPG_chroma = _lav_io_default_chroma; + + char fourcc[16]; + + int is_avi = 1; + + switch(format) + { + case 'a': + case 'A': + /* Open AVI output file */ + veejay_msg(VEEJAY_MSG_DEBUG, "\tWriting output file in AVI MJPEG"); + sprintf(fourcc, "MJPG" ); + break; + case 'L': + veejay_msg(VEEJAY_MSG_DEBUG, "\tWriting output file in AVI LZO"); + sprintf(fourcc, "MLZO" ); + break; + case 'Y': + veejay_msg(VEEJAY_MSG_DEBUG, "\tWriting output file in AVI IYUV"); + sprintf(fourcc, "IYUV" ); + break; + case 'P': + veejay_msg(VEEJAY_MSG_DEBUG, "\tWriting output file in AVI YV16"); + sprintf(fourcc, "YV16"); + break; + case 'D': + veejay_msg(VEEJAY_MSG_DEBUG, "\tWriting output file in AVI DIV3"); + sprintf(fourcc, "DIV3"); + break; + case 'M': + veejay_msg(VEEJAY_MSG_DEBUG, "\tWriting output file in AVI MP4V"); + sprintf(fourcc,"MP4V"); + break; + case 'b': + case 'd': + veejay_msg(VEEJAY_MSG_DEBUG, "\tWriting output file in AVI DVSD"); + sprintf(fourcc, "DVSD"); + break; + + case 'q': + case 'Q': + veejay_msg(VEEJAY_MSG_DEBUG, "\tWriting output file in Quicktime MJPA/JPEG"); + is_avi = 0; + break; + } + + if( is_avi ) + { + lav_fd->avi_fd = AVI_open_output_file(filename); + if(!lav_fd->avi_fd) + { + free(lav_fd); + return NULL; + } + AVI_set_video(lav_fd->avi_fd, width, height, fps, fourcc ); + if (asize) + { + if(AVI_set_audio(lav_fd->avi_fd, achans, arate, asize, WAVE_FORMAT_PCM)==-1) + { + veejay_msg(0, "Too many channels or invalid AVI file"); + lav_close( lav_fd ); + return NULL; + } + } + return lav_fd; + } else { +#ifdef HAVE_LIBQUICKTIME + /* open quicktime output file */ + + /* since the documentation says that the file should be empty, + we try to remove it first */ + remove(filename); + + lav_fd->qt_fd = quicktime_open(filename, 0, 1); + if(!lav_fd->qt_fd) + { + veejay_msg(VEEJAY_MSG_ERROR, "\tCannot open '%s' for writing", filename); + free(lav_fd); + return NULL; + } + if(format=='q') + quicktime_set_video(lav_fd->qt_fd, 1, width, height, fps, + (interlaced ? QUICKTIME_MJPA : QUICKTIME_JPEG)); + else + quicktime_set_video(lav_fd->qt_fd,1, width,height,fps, + QUICKTIME_DV ); + if (asize) + quicktime_set_audio(lav_fd->qt_fd, achans, arate, asize, QUICKTIME_TWOS); + + int has_kf = quicktime_has_keyframes( lav_fd->qt_fd, 0 ); + char *copyright = quicktime_get_copyright( lav_fd->qt_fd ); + char *name = quicktime_get_name( lav_fd->qt_fd ); + char *info = quicktime_get_info( lav_fd->qt_fd ); + + veejay_msg(VEEJAY_MSG_DEBUG, + "(C) %s by %s, %s, has keyframes = %d", copyright,name,info,has_kf ); + + return lav_fd; +#else + veejay_msg(0,"Quicktime not compiled in, cannot use Quicktime."); + internal_error = ERROR_FORMAT; + return NULL; +#endif + + } + if(lav_fd) free(lav_fd); + return NULL; +} + +int lav_close(lav_file_t *lav_file) +{ + int ret = 0; + video_format = lav_file->format; internal_error = 0; /* for error messages */ + switch(video_format) + { +#ifdef SUPPORT_READ_DV2 + case 'd': + case 'b': + if( lav_file->dv_fd ) + { + veejay_msg(VEEJAY_MSG_DEBUG,"\tClosing raw dv file"); + ret = rawdv_close(lav_file->dv_fd); + } + break; +#endif +#ifdef USE_GDK_PIXBUF + case 'x': + if( lav_file->picture ) + { + veejay_msg(VEEJAY_MSG_DEBUG,"\tClosing image file"); + vj_picture_cleanup( lav_file->picture ); + ret = 1; + } + break; +#endif +#ifdef HAVE_LIBQUICKTIME + case 'q': + if( lav_file->qt_fd ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "\tClosing Quicktime file"); + ret = quicktime_close( lav_file->qt_fd ); + } + break; +#endif + default: + if( lav_file->avi_fd ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "\tClosing AVI file"); + ret = AVI_close(lav_file->avi_fd); + } + break; + } + + if(lav_file) free(lav_file); + + lav_file = NULL; + + return ret; +} + +int lav_write_frame(lav_file_t *lav_file, uint8_t *buff, long size, long count) +{ + int res, n; + uint8_t *jpgdata = NULL; + long jpglen = 0; + + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return -1; +#endif + /* For interlaced video insert the apropriate APPn markers */ +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return -1; +#endif + if(lav_file->interlacing!=LAV_NOT_INTERLACED) + { + switch( lav_file->format ) + { + case 'a': + case 'A': + jpgdata = buff; + jpglen = size; + + /* Loop over both fields */ + + for(n=0;n<2;n++) + { + /* For first field scan entire field, for second field + scan the JPEG header, put in AVI1 + polarity. + Be generous on errors */ + + res = scan_jpeg(jpgdata, size, n); + if (res) + { + internal_error=ERROR_JPEG; + return -1; + } + + if(!jpeg_app0_offset) continue; + + /* APP0 marker should be at least 14+2 bytes */ + if(get_int2(jpgdata+jpeg_app0_offset+2) < 16 ) continue; + + jpgdata[jpeg_app0_offset+4] = 'A'; + jpgdata[jpeg_app0_offset+5] = 'V'; + jpgdata[jpeg_app0_offset+6] = 'I'; + jpgdata[jpeg_app0_offset+7] = '1'; + jpgdata[jpeg_app0_offset+8] = lav_file->format=='a' ? n+1 : 2-n; + + /* Update pointer and len for second field */ + jpgdata += jpeg_padded_len; + jpglen -= jpeg_padded_len; + } + break; +#ifdef HAVE_LIBQUICKTIME + case 'q': + + jpgdata = buff; + jpglen = size; + + /* Loop over both fields */ + + for(n=0;n<2;n++) + { + /* Scan the entire JPEG field data - APP1 marker MUST be present */ + res = scan_jpeg(jpgdata,jpglen,0); + if(res || !jpeg_app1_offset) { internal_error=ERROR_JPEG; return -1; } + + /* Length of APP1 marker must be at least 40 + 2 bytes */ + if ( get_int2(jpgdata+jpeg_app1_offset+2) < 42) + { internal_error=ERROR_JPEG; return -1; } + + /* Fill in data */ + put_int4(jpgdata+jpeg_app1_offset+ 4,0); + put_int4(jpgdata+jpeg_app1_offset+ 8,QUICKTIME_MJPG_TAG); + put_int4(jpgdata+jpeg_app1_offset+12,jpeg_field_size); + put_int4(jpgdata+jpeg_app1_offset+16,jpeg_padded_len); + put_int4(jpgdata+jpeg_app1_offset+20,n==0?jpeg_padded_len:0); + put_int4(jpgdata+jpeg_app1_offset+24,jpeg_quant_offset); + put_int4(jpgdata+jpeg_app1_offset+28,jpeg_huffman_offset); + put_int4(jpgdata+jpeg_app1_offset+32,jpeg_image_offset); + put_int4(jpgdata+jpeg_app1_offset+36,jpeg_scan_offset); + put_int4(jpgdata+jpeg_app1_offset+40,jpeg_data_offset); + + /* Update pointer and len for second field */ + jpgdata += jpeg_padded_len; + jpglen -= jpeg_padded_len; + } + break; +#endif + + } + } + res = 0; /* Silence gcc */ + for(n=0;nformat) + { + case 'a': + case 'A': + case 'M': + case 'P': + case 'D': + case 'Y': + case 'L': + if(n==0) + res = AVI_write_frame( lav_file->avi_fd, buff, size ); + else + res = AVI_dup_frame( lav_file->avi_fd ); + break; + +#ifdef HAVE_LIBQUICKTIME + case 'q': + res = quicktime_write_frame( lav_file->qt_fd, buff, size, 0 ); + break; +#endif + default: + res = -1; + break; + + } + } + return res; +} + +int lav_write_audio(lav_file_t *lav_file, uint8_t *buff, long samps) +{ + int res; +#ifdef HAVE_LIBQUICKTIME + int i, j; + int16_t *qt_audio = (int16_t *)buff, **qt_audion; + int channels = lav_audio_channels(lav_file); + + qt_audion = malloc(channels * sizeof (int16_t **)); + for (i = 0; i < channels; i++) + qt_audion[i] = (int16_t *)malloc(samps * lav_file->bps); +#endif + switch(lav_file->format ) + { +#ifdef HAVE_LIBQUICKTIME + case 'q': + /* Deinterleave the audio into the two channels. */ + for (i = 0; i < samps; i++) + { + for (j = 0; j < channels; j++) + qt_audion[j][i] = qt_audio[(channels*i) + j]; + } + res = lqt_encode_audio_track(lav_file->qt_fd, qt_audion, NULL,samps,0); + for (j = 0; j < channels; j++) + free(qt_audion[j]); + free(qt_audion); + return res; + break; +#endif +#ifdef SUPPORT_READ_DV2 + case 'b': + return 0; +#endif +#ifdef USE_GDK_PIXBUF + case 'x': + return 0; +#endif + case 'a': + case 'A': + case 'L': + return AVI_write_audio( lav_file->avi_fd, buff, samps*lav_file->bps); + } + return 0; +} + +void lav_bogus_set_length( lav_file_t *lav_file , int len ) +{ + lav_file->bogus_len = len; +} + +int lav_bogus_video_length( lav_file_t *lav_file ) +{ + video_format = lav_file->format; + if( lav_file->format == 'x' ) + return lav_file->bogus_len; + return 0; +} + + + +long lav_video_frames(lav_file_t *lav_file) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ + switch(lav_file->format) + { + case 'P': + case 'Y': + case 'D': + case 'M': + case 'L': + case 'A': + case 'a': + return AVI_video_frames( lav_file->avi_fd ); +#ifdef SUPPORT_READ_DV2 + case 'b': + return rawdv_video_frames(lav_file->dv_fd); +#endif +#ifdef USE_GDK_PIXBUF + case 'x': + return lav_file->bogus_len; +#endif +#ifdef HAVE_LIBQUICKTIME + case 'q': + return quicktime_video_length(lav_file->qt_fd,0); +#endif + } + return -1; +} + +int lav_video_width(lav_file_t *lav_file) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ + switch(lav_file->format) + { + case 'a': + case 'A': + case 'P': + case 'M': + case 'L': + case 'D': + case 'Y': + return AVI_video_width(lav_file->avi_fd); +#ifdef SUPPORT_READ_DV2 + case 'b': + return rawdv_width(lav_file->dv_fd); +#endif +#ifdef USE_GDK_PIXBUF + case 'x': + return output_scale_width; +#endif +#ifdef HAVE_LIBQUICKTIME + case 'q': + return quicktime_video_width(lav_file->qt_fd,0); +#endif + } + return -1; +} + +int lav_video_height(lav_file_t *lav_file) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ + switch( lav_file->format ) + { + case 'a': + case 'A': + case 'P': + case 'M': + case 'L': + case 'D': + case 'Y': + return AVI_video_height(lav_file->avi_fd); +#ifdef SUPPORT_READ_DV2 + case 'b': + return rawdv_height( lav_file->dv_fd ); +#endif +#ifdef USE_GDK_PIXBUF + case 'x': + return output_scale_height; +#endif +#ifdef HAVE_LIBQUICKTIME + case 'q': + return quicktime_video_height(lav_file->qt_fd,0); +#endif + } + return -1; +} + +double lav_frame_rate(lav_file_t *lav_file) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ + switch(lav_file->format) + { +#ifdef SUPPORT_READ_DV2 + case 'b': + return rawdv_fps(lav_file->dv_fd); +#endif +#ifdef USE_GDK_PIXBUF + case 'x': + return output_fps; +#endif +#ifdef HAVE_LIBQUICKTIME + case 'q': + return quicktime_frame_rate(lav_file->qt_fd,0); +#endif + default: + return AVI_frame_rate( lav_file->avi_fd ); + } + return -1; +} + +int lav_video_interlacing(lav_file_t *lav_file) +{ +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return rawdv_interlacing(lav_file->dv_fd); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return LAV_NOT_INTERLACED; +#endif + return lav_file->interlacing; +} + +void lav_video_clipaspect(lav_file_t *lav_file, int *sar_w, int *sar_h) +{ + *sar_w = lav_file->sar_w; + *sar_h = lav_file->sar_h; + return; +} + +int lav_video_is_MJPG(lav_file_t *lav_file) +{ + return lav_file->is_MJPG; +} + +int lav_video_MJPG_chroma(lav_file_t *lav_file) +{ + return lav_file->MJPG_chroma; +} + +int lav_is_yuv_planar( int pix_fmt ) +{ + switch(pix_fmt){ + case PIX_FMT_YUVJ420P: + case PIX_FMT_YUVJ422P: + case PIX_FMT_YUVJ444P: + case PIX_FMT_YUV420P: + case PIX_FMT_YUV422P: + case PIX_FMT_YUV444P: + return 1; + } + return 0; +} + +int lav_video_cmodel( lav_file_t *lav_file) +{ + switch(lav_file->MJPG_chroma) + { + case CHROMA411: + return PIX_FMT_YUV411P; + case CHROMA420: + return PIX_FMT_YUV420P; + case CHROMA422: + return PIX_FMT_YUV422P; + case CHROMA444: + return PIX_FMT_YUV444P; + default: + return -1; + } + + return -1; +} + +int lav_video_is_qt( lav_file_t *lav_file) +{ +#ifdef HAVE_LIBQUICK_TIME + if( lav_file->qt_fd) + return 1; +#endif + return 0; +} + + + +int lav_video_compressor_type(lav_file_t *lav_file) +{ +#ifdef SUPPORT_READ_DV2 + if(lav_file->format == 'b') + return rawdv_compressor( lav_file->dv_fd ); +#endif +#ifdef USE_GDK_PIXBUF + if(lav_file->format == 'x') + return 0xffff; +#endif +#ifdef HAVE_LIBQUICKTIME + if(lav_file->format == 'q') + { + const char *compressor = quicktime_video_compressor(lav_file->qt_fd,0); + return vj_el_get_decoder_from_fourcc( compressor ); + } + // return quicktime_video_compressor(lav_file->qt_fd,0); +#endif + return AVI_video_compressor_type( lav_file->avi_fd ); +} + +const char *lav_video_compressor(lav_file_t *lav_file) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if( video_format == 'b' ) + { + const char *tmp = (const char*) strdup("dvsd"); + return tmp; + } +#endif +#ifdef USE_GDK_PIXBUF + if( video_format == 'x') + { + const char *tmp = (const char*) strdup("PICT"); + return tmp; + } +#endif + if( video_format == 'L' ) + { + return (strdup("mlzo")); + } +#ifdef HAVE_LIBQUICKTIME + if(lav_file->format == 'q') + return quicktime_video_compressor(lav_file->qt_fd,0); +#endif + return AVI_video_compressor(lav_file->avi_fd); +} + +int lav_audio_channels(lav_file_t *lav_file) +{ + if(!lav_file->has_audio) return 0; + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return rawdv_audio_channels(lav_file->dv_fd); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return 0; +#endif +#ifdef HAVE_LIBQUICKTIME + if(video_format == 'q') + return quicktime_track_channels(lav_file->qt_fd,0); +#endif + return AVI_audio_channels(lav_file->avi_fd); +} + +int lav_audio_bits(lav_file_t *lav_file) +{ + if(!lav_file->has_audio) return 0; + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return rawdv_audio_bits(lav_file->dv_fd); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x' ) + return 0; +#endif +#ifdef HAVE_LIBQUICKTIME + if(video_format == 'q') + return quicktime_audio_bits(lav_file->qt_fd,0); +#endif + return (AVI_audio_bits(lav_file->avi_fd)); +} + +long lav_audio_rate(lav_file_t *lav_file) +{ + if(!lav_file->has_audio) return 0; + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format=='b') + return rawdv_audio_rate(lav_file->dv_fd); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return 0; +#endif +#ifdef HAVE_LIBQUICKTIME + if( video_format == 'q') + return quicktime_sample_rate(lav_file->qt_fd,0); +#endif + return (AVI_audio_rate(lav_file->avi_fd)); +} + +long lav_audio_clips(lav_file_t *lav_file) +{ + if(!lav_file->has_audio) return 0; + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format=='b') + return rawdv_audio_bps(lav_file->dv_fd); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return 0; +#endif +#ifdef HAVE_LIBQUICKTIME + if(video_format == 'q') + return quicktime_audio_length(lav_file->qt_fd,0); +#endif + return (AVI_audio_bytes(lav_file->avi_fd)/lav_file->bps); +} + +long lav_frame_size(lav_file_t *lav_file, long frame) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return rawdv_frame_size( lav_file->dv_fd ); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return 1; +#endif +#ifdef HAVE_LIBQUICKTIME + if( video_format == 'q') + return quicktime_frame_size(lav_file->qt_fd,frame,0); +#endif + return (AVI_frame_size(lav_file->avi_fd,frame)); +} + +int lav_seek_start(lav_file_t *lav_file) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return rawdv_set_position( lav_file->dv_fd, 0 ); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return 1; +#endif +#ifdef HAVE_LIBQUICKTIME + return quicktime_seek_start(lav_file->qt_fd); +#endif + return (AVI_seek_start(lav_file->avi_fd)); +} + +int lav_set_video_position(lav_file_t *lav_file, long frame) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return rawdv_set_position( lav_file->dv_fd, frame ); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return 1; +#endif +#ifdef HAVE_LIBQUICKTIME + if(video_format == 'q') + return quicktime_set_video_position(lav_file->qt_fd,(int64_t)frame,0); +#endif + return (AVI_set_video_position(lav_file->avi_fd,frame)); +} + +int lav_read_frame(lav_file_t *lav_file, uint8_t *vidbuf) +{ + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(lav_file->format == 'b') + { + return rawdv_read_frame( lav_file->dv_fd, vidbuf ); + } +#endif +#ifdef USE_GDK_PIXBUF + if(lav_file->format == 'x') + return -1; +#endif +#ifdef HAVE_LIBQUICKTIME + if(lav_file->format == 'q') + return quicktime_read_frame(lav_file->qt_fd,vidbuf,0); +#endif + int kf = 1; + int ret = (AVI_read_frame(lav_file->avi_fd,vidbuf,&kf)); +/* + if(!kf) + { +// veejay_msg(0, "Requested frame is not a keyframe"); + return ret; + } +*/ + return ret; + +} + +#ifdef USE_GDK_PIXBUF +VJFrame *lav_get_frame_ptr( lav_file_t *lav_file ) +{ + if(lav_file->format == 'x') + return vj_picture_get( lav_file->picture ); + return NULL; +} +#else +uint8_t *lav_get_frame_ptr( lav_file_t *lav_file) +{ + return NULL; +} +#endif + +int lav_is_DV(lav_file_t *lav_file) +{ +#ifdef SUPPORT_READ_DV2 + if(lav_file->format == 'b') + return 1; +#endif + return 0; +} + +int lav_set_audio_position(lav_file_t *lav_file, long clip) +{ + if(!lav_file->has_audio) return 0; + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return 0; +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return 0; +#endif +#ifdef HAVE_LIBQUICKTIME + if(video_format =='q') + quicktime_set_audio_position(lav_file->qt_fd,clip,0); +#endif + return (AVI_set_audio_position(lav_file->avi_fd,clip*lav_file->bps)); +} + +int lav_read_audio(lav_file_t *lav_file, uint8_t *audbuf, long samps) +{ + if(!lav_file->has_audio) + { + internal_error = ERROR_NOAUDIO; + return -1; + } +#ifdef SUPPORT_READ_DV2 + if(video_format == 'b') + return rawdv_read_audio_frame( lav_file->dv_fd, audbuf ); +#endif +#ifdef USE_GDK_PIXBUF + if(video_format == 'x') + return 0; +#endif + video_format = lav_file->format; internal_error = 0; /* for error messages */ +#ifdef HAVE_LIBQUICKTIME + if( video_format == 'q') + { + int64_t last_pos, start_pos; + int res, i, j; + int16_t *qt_audio = (int16_t *)audbuf, **qt_audion; + int channels = lav_audio_channels(lav_file); + uint8_t b0, b1; + qt_audion = malloc(channels * sizeof (int16_t **)); + for (i = 0; i < channels; i++) + qt_audion[i] = (int16_t *)malloc(samps * lav_file->bps); + + start_pos = quicktime_audio_position(lav_file->qt_fd, 0); + lqt_decode_audio_track(lav_file->qt_fd, qt_audion, NULL, samps, 0); + last_pos = lqt_last_audio_position(lav_file->qt_fd, 0); + res = last_pos - start_pos; + if (res <= 0) + goto out; + /* Interleave the channels of audio into the one buffer provided */ + for (i =0; i < res; i++) + { + for (j = 0; j < channels; j++) + qt_audio[(channels*i) + j] = qt_audion[j][i]; + } + + if (lav_detect_endian()) + { + i= 0; + while (i < (2*res) ) + { + b0 = 0; + b1 = 0; + b0 = (qt_audio[i] & 0x00FF); + b1 = (qt_audio[i] & 0xFF00) >> 8; + qt_audio[i] = (b0 <<8) + b1; + i = i +1; + } + } +out: + for (j = 0; j < channels; j++) + free(qt_audion[j]); + free(qt_audion); + return(res); + } +#endif + + int res = AVI_read_audio( lav_file->avi_fd, audbuf, + (samps * lav_file->bps) ); + return res; +} + +int lav_filetype(lav_file_t *lav_file) +{ + return lav_file->format; +} + +lav_file_t *lav_open_input_file(char *filename, int mmap_size) +{ + int n; + char *video_comp = NULL; + unsigned char *frame = NULL; /* Make sure un-init segfaults! */ + long len; + int jpg_height, jpg_width, ncomps, hf[3], vf[3]; + int ierr; + + lav_file_t *lav_fd = (lav_file_t*) vj_malloc(sizeof(lav_file_t)); + + if(lav_fd==0) { internal_error=ERROR_MALLOC; return 0; } + + /* Set lav_fd */ + +#ifdef HAVE_LIBQUICKTIME + char *audio_comp; +#endif + lav_fd->avi_fd = 0; +#ifdef SUPPORT_READ_DV2 + lav_fd->dv_fd = 0; +#endif +#ifdef USE_GDK_PIXBUF + lav_fd->picture = NULL; +#endif + lav_fd->format = 0; + lav_fd->interlacing = LAV_INTER_UNKNOWN; + lav_fd->sar_w = 0; /* (0,0) == unknown */ + lav_fd->sar_h = 0; + lav_fd->has_audio = 0; + lav_fd->bps = 0; + lav_fd->is_MJPG = 0; + lav_fd->MJPG_chroma = CHROMAUNKNOWN; + lav_fd->mmap_size = mmap_size; + + int ret = 0; + + /* open file, check if file is a file */ + struct stat s; + if( stat(filename, &s ) != 0 ) + { + if(lav_fd) free(lav_fd); + veejay_msg(VEEJAY_MSG_ERROR, "Invalid file '%s'. Proper permissions?",filename); + return NULL; + } + + if(!S_ISREG( s.st_mode) ) + { + veejay_msg(VEEJAY_MSG_ERROR, "'%s' is not a regular file",filename); + if(lav_fd) free(lav_fd); + return NULL; + } + + + lav_fd->avi_fd = AVI_open_input_file(filename,1,mmap_size); + + if( lav_fd->avi_fd && AVI_errno == AVI_ERR_EMPTY ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Empty AVI file"); + if(lav_fd) free(lav_fd); + return NULL; + } + else if ( lav_fd->avi_fd && AVI_errno == 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, + "\tFile is AVI" ); + ret =1; + } + + int alt = 0; + + if(lav_fd->avi_fd) + { + ret = 1; + alt = 1; + lav_fd->format = 'a'; + lav_fd->has_audio = (AVI_audio_bits(lav_fd->avi_fd)>0 && + AVI_audio_format(lav_fd->avi_fd)==WAVE_FORMAT_PCM); + video_comp = AVI_video_compressor(lav_fd->avi_fd); + if(video_comp == NULL || strlen(video_comp) <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to read FOURCC from AVI"); + if(lav_fd) free(lav_fd); + return 0; + } + veejay_msg(VEEJAY_MSG_DEBUG, "\tFOURCC is %s", video_comp ); + } + else if( AVI_errno==AVI_ERR_NO_AVI || !lav_fd->avi_fd) + { +#ifdef HAVE_LIBQUICKTIME + if(quicktime_check_sig(filename)) + { + quicktime_pasp_t pasp; + int nfields, detail; + lav_fd->qt_fd = quicktime_open(filename,1,0); + video_format = 'q'; /* for error messages */ + if (!lav_fd->qt_fd) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to open quicktime file"); + free(lav_fd); + return 0; + } + else + veejay_msg(VEEJAY_MSG_DEBUG, "\tOpening Quicktime file"); + lav_fd->avi_fd = NULL; + lav_fd->format = 'q'; + video_comp = quicktime_video_compressor(lav_fd->qt_fd,0); + veejay_msg(VEEJAY_MSG_DEBUG,"\tFile has fourcc '%s'", + video_comp ); + /* We want at least one video track */ + if (quicktime_video_tracks(lav_fd->qt_fd) < 1) + { + veejay_msg(VEEJAY_MSG_ERROR, "At least one video track required"); + lav_close(lav_fd); + internal_error = ERROR_FORMAT; + return 0; + } + /* + * If the quicktime file has the sample aspect atom then use it to set + * the sar values in the lav_fd structure. Hardwired (like everywhere else) + * to only look at track 0. + */ + /* + if (lqt_get_pasp(lav_fd->qt_fd, 0, &pasp) != 0) + { + lav_fd->sar_w = pasp.hSpacing; + lav_fd->sar_h = pasp.vSpacing; + }*/ + /* + * If a 'fiel' atom is present (not guaranteed) then use it to set the + * interlacing type. + */ + + if (lqt_get_fiel(lav_fd->qt_fd, 0, &nfields, &detail) != 0) + { + if (nfields == 2) + { + if (detail == 14 || detail == 6) + lav_fd->interlacing = LAV_INTER_BOTTOM_FIRST; + else if (detail == 9 || detail == 1) + lav_fd->interlacing = LAV_INTER_TOP_FIRST; + else + veejay_msg(VEEJAY_MSG_DEBUG, "Unknown 'detail' in 'fiel' atom: %d", detail); + } + else + lav_fd->interlacing = LAV_NOT_INTERLACED; + } + /* Check for audio tracks */ + lav_fd->has_audio = 0; + if (quicktime_audio_tracks(lav_fd->qt_fd)) + { + audio_comp = quicktime_audio_compressor(lav_fd->qt_fd,0); + if (strncasecmp(audio_comp, QUICKTIME_TWOS,4)==0) + lav_fd->has_audio = 1; + else + veejay_msg(VEEJAY_MSG_WARNING, "Audio compressor '%s' not supported", + audio_comp ); + } + alt = 1; + ret = 1; + } + else + veejay_msg(VEEJAY_MSG_DEBUG, "\tNot a Quicktime file"); +#endif +#ifdef USE_GDK_PIXBUF + if(!alt) + { + lav_fd->picture = vj_picture_open( (const char*) filename, + output_scale_width, output_scale_height, get_ffmpeg_pixfmt(output_yuv) ); + if(lav_fd->picture) + { + lav_fd->format = 'x'; + lav_fd->has_audio = 0; + lav_fd->bogus_len = (int) output_fps; + video_comp = strdup( "PICT" ); + ret = 1; + alt = 1; + veejay_msg(VEEJAY_MSG_DEBUG, + "\tLoaded image file"); + } + else + veejay_msg(VEEJAY_MSG_DEBUG, + "\tNot a Image file"); + } +#endif + +#ifdef SUPPORT_READ_DV2 + if(!alt) + { + ret = 0; + lav_fd->dv_fd = rawdv_open_input_file(filename,mmap_size); + if(lav_fd->dv_fd > 0) + { + lav_fd->MJPG_chroma = rawdv_sampling( lav_fd->dv_fd ); + video_comp = rawdv_video_compressor( lav_fd->dv_fd ); + lav_fd->format = 'b'; + lav_fd->has_audio = 0; + ret = 1; + alt = 1; + veejay_msg(VEEJAY_MSG_DEBUG, + "RAW DV file '%s'", + video_comp ); + } + else + veejay_msg(VEEJAY_MSG_DEBUG, "\tNot a raw dv file"); + } +#endif + } + + if(ret == 0 || video_comp == NULL || alt == 0) + { + free(lav_fd); + internal_error = ERROR_FORMAT; /* Format not recognized */ + veejay_msg(VEEJAY_MSG_ERROR, "Unable to load file '%s', code=%x, video=%s", filename,ret,video_comp); + return 0; + } + + lav_fd->bps = (lav_audio_channels(lav_fd)*lav_audio_bits(lav_fd)+7)/8; + + if(lav_fd->bps==0) lav_fd->bps=1; /* make it save since we will divide by that value */ + + +#ifdef USE_GDK_PIXBUF + if(strncasecmp(video_comp, "PICT",4) == 0 ) + { + switch(output_yuv) + { + case FMT_420: + case FMT_420F: + lav_fd->MJPG_chroma = CHROMA420; + break; + case FMT_422: + case FMT_422F: + lav_fd->MJPG_chroma = CHROMA422; + break; + default: + lav_fd->MJPG_chroma = CHROMAUNKNOWN; + break; + } + lav_fd->format = 'x'; + lav_fd->interlacing = LAV_NOT_INTERLACED; + return lav_fd; + } +#endif + + + if( strncasecmp(video_comp, "div3",4)==0 || + strncasecmp(video_comp, "mp43",4)==0 || + strncasecmp(video_comp, "mp42",4)==0 ) + { + lav_fd->MJPG_chroma = CHROMA420; + lav_fd->interlacing = LAV_NOT_INTERLACED; + veejay_msg(VEEJAY_MSG_WARNING, "Playing MS MPEG4v3 DivX Video. (Every frame should be an intra frame)" ); + return lav_fd; + } + + if( strncasecmp(video_comp,"mp4v",4 )==0 || + strncasecmp(video_comp,"fmp4",4 )==0 || + strncasecmp(video_comp,"divx",4 ) == 0 || + strncasecmp(video_comp,"xvid",4 ) == 0 || + strncasecmp(video_comp,"dxsd",4 ) == 0 || + strncasecmp(video_comp,"mp4s",4 ) == 0 || + strncasecmp(video_comp,"m4s2",4 ) == 0 ) + { + lav_fd->format = 'D'; + lav_fd->MJPG_chroma = CHROMA420; + lav_fd->interlacing = LAV_NOT_INTERLACED; + veejay_msg(VEEJAY_MSG_WARNING, "Playing MPEG4 Video (Every frame should be an intra frame)"); + return lav_fd; + } + + if ( strncasecmp(video_comp,"iyuv",4)==0 || + strncasecmp(video_comp,"i420",4)==0) + { + lav_fd->MJPG_chroma = CHROMA420; + lav_fd->format = 'Y'; + lav_fd->interlacing = LAV_NOT_INTERLACED; + return lav_fd; + } + + if ( strncasecmp(video_comp,"yv16",4)==0 || + strncasecmp(video_comp,"i422",4)==0 || + strncasecmp(video_comp,"hfyu",4)==0) + { + lav_fd->MJPG_chroma = CHROMA422; + lav_fd->format = 'P'; + lav_fd->interlacing = LAV_NOT_INTERLACED; + return lav_fd; + } + + if( strncasecmp(video_comp, "avc1", 4 ) == 0 || + strncasecmp(video_comp, "h264", 4 ) == 0 || + strncasecmp(video_comp, "x264", 4 ) == 0 || + strncasecmp(video_comp, "davc", 4 ) == 0 ) + { + lav_fd->MJPG_chroma = CHROMA420; + lav_fd->interlacing = LAV_NOT_INTERLACED; + return lav_fd; + } + + if( strncasecmp( video_comp, "mlzo", 4 ) == 0 ) + { + lav_fd->MJPG_chroma = CHROMA422; + lav_fd->interlacing = LAV_NOT_INTERLACED; + return lav_fd; + } + + if ( strncasecmp(video_comp,"dvsd",4)==0 || + strncasecmp(video_comp,"dvcp",4) ==0 || + strncasecmp(video_comp,"dxsd",4) == 0 || + strncasecmp(video_comp, "dvp",3) == 0 || + strncasecmp(video_comp, "dvhd",4) == 0 || + strncasecmp(video_comp, "dv",2 ) == 0) + { + int gw = lav_video_height( lav_fd ); + if( gw == 480 ) + lav_fd->MJPG_chroma = CHROMA411; + else + lav_fd->MJPG_chroma = CHROMA422; + + lav_fd->interlacing = LAV_INTER_BOTTOM_FIRST; + return lav_fd; + } + + if( strncasecmp(video_comp, "png", 3 ) == 0 || + strncasecmp(video_comp, "mpng",4) == 0 ) + { + lav_fd->MJPG_chroma = CHROMA420; + lav_fd->interlacing = LAV_INTER_UNKNOWN; + return lav_fd; + } + + if( strncasecmp(video_comp, "svq1", 4 ) == 0 || + strncasecmp(video_comp, "svq3", 4 ) == 0 || + strncasecmp(video_comp, "rpza", 4 ) == 0 || + strncasecmp(video_comp, "cyuv", 4 ) == 0 ) + { + lav_fd->MJPG_chroma = CHROMA420; + lav_fd->interlacing = LAV_INTER_UNKNOWN; + return lav_fd; + } + + if ( strncasecmp(video_comp,"mjpg", 4) == 0 || + strncasecmp(video_comp,"mjpa", 4) == 0 || + strncasecmp(video_comp,"jpeg", 4) == 0 || + strncasecmp(video_comp,"mjpb" ,4) == 0 || + strncasecmp(video_comp,"sp5x", 4) == 0 || + strncasecmp(video_comp,"jpgl", 4) == 0 || + strncasecmp(video_comp , "jfif", 4 ) == 0 || + strncasecmp(video_comp, "dmb1", 4)==0 ) + { + lav_fd->MJPG_chroma = CHROMA420; + lav_fd->interlacing = LAV_INTER_UNKNOWN; + lav_fd->is_MJPG = 1; + + /* Make some checks on the video source, we read the first frame for that */ + + ierr = 0; + frame = NULL; + if ( lav_set_video_position(lav_fd,0) ) goto ERREXIT; + if ( (len = lav_frame_size(lav_fd,0)) <=0 ) goto ERREXIT; + if ( (frame = (unsigned char*) malloc(len)) == 0 ) { ierr=ERROR_MALLOC; goto ERREXIT; } + + if ( lav_read_frame(lav_fd,frame) <= 0 ) goto ERREXIT; + /* reset video position to 0 */ + if ( lav_set_video_position(lav_fd,0) ) goto ERREXIT; + if( scan_jpeg(frame, len, 1) ) { ierr=ERROR_JPEG; goto ERREXIT; } + + /* We have to look to the JPEG SOF marker for further information + The SOF marker has the following format: + + FF + C0 + len_hi + len_lo + data_precision + height_hi + height_lo + width_hi + width_lo + num_components + + And then 3 bytes for each component: + + Component id + H, V sampling factors (as nibbles) + Quantization table number + */ + + /* Check if the JPEG has the special 4:2:2 format needed for + some HW JPEG decompressors (the Iomega Buz, for example) */ + + ncomps = frame[jpeg_image_offset + 9]; + if(ncomps==3) + { + for(n=0;n<3;n++) + { + hf[n] = frame[jpeg_image_offset + 10 + 3*n + 1]>>4; + vf[n] = frame[jpeg_image_offset + 10 + 3*n + 1]&0xf; + } + + /* Identify chroma sub-sampling format only 420 and 422 supported + at present...*/ + + + if( hf[0] == 2*hf[1] && hf[0] == 2*hf[2] ) + { + if( vf[0] == vf[1] && vf[0] == vf[2] ) + { + lav_fd->MJPG_chroma = CHROMA422; + } + else if( vf[0] == 2*vf[1] && vf[0] == 2*vf[2] ) + { + lav_fd->MJPG_chroma = CHROMA420; + } + else + { lav_fd->MJPG_chroma = CHROMAUNKNOWN; + } + } + else + { + lav_fd->MJPG_chroma = CHROMAUNKNOWN; + } + } // ncomps + /* Check if video is interlaced */ + + /* height and width are encoded in the JPEG SOF marker at offsets 5 and 7 */ + + jpg_height = get_int2(frame + jpeg_image_offset + 5); + jpg_width = get_int2(frame + jpeg_image_offset + 7); + + /* check height */ + + if( jpg_height == lav_video_height(lav_fd)) + { + lav_fd->interlacing = LAV_NOT_INTERLACED; + } + else if ( jpg_height == lav_video_height(lav_fd)/2 ) + { + + /* Video is interlaced */ + if(lav_fd->format == 'a') + { + /* Check the APP0 Marker, if present */ + + if(jpeg_app0_offset && + get_int2(frame + jpeg_app0_offset + 2) >= 5 && + strncasecmp((char*)(frame + jpeg_app0_offset + 4),"AVI1",4)==0 ) + { + if (frame[jpeg_app0_offset+8]==1) + { + lav_fd->interlacing = LAV_INTER_TOP_FIRST; + } + else + { + lav_fd->interlacing = LAV_INTER_BOTTOM_FIRST; + } + } + else + { + /* There is no default, it really depends on the + application which produced the AVI */ + lav_fd->interlacing = LAV_INTER_TOP_FIRST; + } + lav_fd->format = lav_fd->interlacing == LAV_INTER_BOTTOM_FIRST ? 'A' : 'a'; + } // end of interlaced + } + else + { + ierr=ERROR_JPEG; + goto ERREXIT; + } + + if(frame) free(frame); + + return lav_fd; + } + + ierr = ERROR_FORMAT; + veejay_msg(VEEJAY_MSG_ERROR, "Unrecognized format '%s'", video_comp); + +ERREXIT: + lav_close(lav_fd); + if(frame) free(frame); + internal_error = ierr; + veejay_msg(VEEJAY_MSG_ERROR, "%s", lav_strerror()); + return 0; +} + +/* Get size of first field of for a data array containing + (possibly) two jpeg fields */ + +int lav_get_field_size(uint8_t * jpegdata, long jpeglen) +{ + int res; + + res = scan_jpeg(jpegdata,jpeglen,0); + if(res<0) return jpeglen; /* Better than nothing */ + + /* we return jpeg_padded len since this routine is used + for field exchange where alignment might be important */ + + return jpeg_padded_len; +} + +static char error_string[4096]; + +const char *lav_strerror(void) +{ + + switch(internal_error) + { + case ERROR_JPEG: + sprintf(error_string,"Internal: broken JPEG format"); + internal_error = 0; + return error_string; + case ERROR_MALLOC: + sprintf(error_string,"Internal: Out of memory"); + internal_error = 0; + return error_string; + case ERROR_FORMAT: + sprintf(error_string,"Input file format not recognized"); + internal_error = 0; + return error_string; + case ERROR_NOAUDIO: + sprintf(error_string,"Trying to read audio from a video only file"); + internal_error = 0; + return error_string; + } + + switch(video_format) + { + case 'a': + case 'A': + case 'Y': + case 'M': + case 'P': + case 'L': + case 'D': + return AVI_strerror(); + default: + /* No or unknown video format */ + if(errno) strerror(errno); + else sprintf(error_string,"No or unknown video format"); + return error_string; + } +} + + +/* +static int check_DV2_input(lav_file_t *lav_fd) +{ + int ierr = 0; + double len = 0; + unsigned char *frame = NULL; + + lav_fd->is_MJPG = 0; + + + if ( lav_set_video_position(lav_fd,0) ) goto ERREXIT; + if ( (len = lav_frame_size(lav_fd,0)) <=0 ) goto ERREXIT; + if ( (frame = (unsigned char*) malloc(len)) == 0 ) { ierr=ERROR_MALLOC; goto ERREXIT; } + + if ( lav_read_frame(lav_fd,frame) <= 0 ) goto ERREXIT; + { + dv_decoder_t *decoder = dv_decoder_new(0,0,0); + dv_parse_header(decoder, frame); + + switch (decoder->system) { + case e_dv_system_525_60: + if (dv_format_wide(decoder)) { + lav_fd->sar_w = 40; + lav_fd->sar_h = 33; + } else { + lav_fd->sar_w = 10; + lav_fd->sar_h = 11; + } + break; + case e_dv_system_625_50: + if (dv_format_wide(decoder)) { + lav_fd->sar_w = 118; + lav_fd->sar_h = 81; + } else { + lav_fd->sar_w = 59; + lav_fd->sar_h = 54; + } + break; + default: + lav_fd->sar_w = 0; + lav_fd->sar_h = 0; + break; + } + veejay_msg(VEEJAY_MSG_DEBUG, "DV System %s (sar w %d sar h %d)", + (decoder->system == e_dv_system_525_60 ? "525-60" : ( decoder->system == e_dv_system_625_50 ? "625-50" : "unknown!")),lav_fd->sar_w,lav_fd->sar_h); + dv_decoder_free(decoder); + } + + if ( lav_set_video_position(lav_fd,0) ) goto ERREXIT; + return 0; + +ERREXIT: + lav_close(lav_fd); + if(frame) free(frame); + if (ierr) internal_error = ierr; + return 1; +} + +*/ + +int lav_fileno(lav_file_t *lav_file) +{ + int res; + + video_format = lav_file->format; + + switch(lav_file->format) + { + case 'a': + case 'A': + case 'P': + case 'D': + case 'Y': + case 'M': + res = AVI_fileno( lav_file->avi_fd ); + break; +#ifdef HAVE_LIBQUICKTIME + case 'q': + { + res = lqt_fileno( (quicktime_t*) lav_file->qt_fd ); + } + break; +#endif + default: + res = -1; + } + + return res; +} + +/* We need this to reorder the 32 bit values for big endian systems */ +uint32_t reorder_32(uint32_t todo, int big_endian) +{ + unsigned char b0, b1, b2, b3; + unsigned long reversed; + + if( big_endian ) + { + b0 = (todo & 0x000000FF); + b1 = (todo & 0x0000FF00) >> 8; + b2 = (todo & 0x00FF0000) >> 16; + b3 = (todo & 0xFF000000) >> 24; + + reversed = (b0 << 24) + (b1 << 16) + (b2 << 8) +b3; + return reversed; + } + return todo; +} +int lav_detect_endian (void) +{ + unsigned int fred; + char *pfred; + + fred = 2 | (1 << (sizeof(int)*8-8)); + pfred = (char *)&fred; + + if (*pfred == 1) + return 1; + else if(*pfred == 2) + return 0; + else + return -1; +} + + + + + + + + + + + + + diff --git a/veejay-server/libel/lav_io.h b/veejay-server/libel/lav_io.h new file mode 100644 index 00000000..04bfb76e --- /dev/null +++ b/veejay-server/libel/lav_io.h @@ -0,0 +1,120 @@ +/* + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef LAV_IO_H +#define LAV_IO_H + +#include +#include +#include +#ifdef SUPPORT_READ_DV2 +#include +#endif +// play with mlt here, avformat producer/several consumers (we can write to) +// for normalized output (720x576/480) , dv1394 capture and playback + +#include + +#define LAV_INTER_UNKNOWN Y4M_UNKNOWN +#define LAV_NOT_INTERLACED Y4M_ILACE_NONE +#define LAV_INTER_TOP_FIRST Y4M_ILACE_TOP_FIRST +#define LAV_INTER_BOTTOM_FIRST Y4M_ILACE_BOTTOM_FIRST + + +/* chroma_format */ +#define CHROMAUNKNOWN 0 +#define CHROMA420 1 +#define CHROMA422 2 +#define CHROMA444 3 +#define CHROMA411 4 + +/* raw data format of a single frame */ +#define DATAFORMAT_MJPG 0 +#define DATAFORMAT_DV2 1 +#define DATAFORMAT_YUV420 2 +#define DATAFORMAT_YUV422 3 +#define DATAFORMAT_DIVX 4 +#define DATAFORMAT_MPEG4 5 + +typedef struct +{ + avi_t *avi_fd; +#ifdef SUPPORT_READ_DV2 + dv_t *dv_fd; +#endif + void *qt_fd; + int jpeg_fd; + char *jpeg_filename; +#ifdef USE_GDK_PIXBUF + void *picture; +#endif + int format; + int interlacing; + int sar_w; /* "clip aspect ratio" width */ + int sar_h; /* "clip aspect ratio" height */ + int has_audio; + int bps; + int is_MJPG; + int MJPG_chroma; + int mmap_size; + int bogus_len; +} lav_file_t; + + +int lav_detect_endian (void); +int lav_query_APP_marker(char format); +int lav_query_APP_length(char format); +int lav_query_polarity(char format); +lav_file_t *lav_open_output_file(char *filename, char format, + int width, int height, int interlaced, double fps, + int asize, int achans, long arate); +int lav_close(lav_file_t *lav_file); +int lav_write_frame(lav_file_t *lav_file, uint8_t *buff, long size, long count); +int lav_write_audio(lav_file_t *lav_file, uint8_t *buff, long samps); +long lav_video_frames(lav_file_t *lav_file); +int lav_video_width(lav_file_t *lav_file); +int lav_video_height(lav_file_t *lav_file); +double lav_frame_rate(lav_file_t *lav_file); +int lav_video_interlacing(lav_file_t *lav_file); +void lav_video_clipaspect(lav_file_t *lav_file, int *sar_w, int *sar_h); +int lav_video_is_MJPG(lav_file_t *lav_file); +int lav_is_DV(lav_file_t *lav_file); +int lav_video_MJPG_chroma(lav_file_t *lav_file); +const char *lav_video_compressor(lav_file_t *lav_file); +int lav_video_compressor_type(lav_file_t *lav_file); +int lav_audio_channels(lav_file_t *lav_file); +int lav_audio_bits(lav_file_t *lav_file); +long lav_audio_rate(lav_file_t *lav_file); +long lav_audio_clips(lav_file_t *lav_file); +long lav_frame_size(lav_file_t *lav_file, long frame); +int lav_seek_start(lav_file_t *lav_file); +int lav_set_video_position(lav_file_t *lav_file, long frame); +int lav_read_frame(lav_file_t *lav_file, uint8_t *vidbuf); +int lav_set_audio_position(lav_file_t *lav_file, long clip); +int lav_read_audio(lav_file_t *lav_file, uint8_t *audbuf, long samps); +int lav_filetype(lav_file_t *lav_file); +lav_file_t *lav_open_input_file(char *filename, int mmap_size); +int lav_get_field_size(uint8_t * jpegdata, long jpeglen); +const char *lav_strerror(void); +int lav_fileno( lav_file_t *lav_file ); +void lav_set_default_chroma(int c); +int lav_bogus_video_length( lav_file_t *lav_file ); +void lav_bogus_set_length( lav_file_t *lav_file , int len ); +#ifdef USE_GDK_PIXBUF +VJFrame *lav_get_frame_ptr( lav_file_t *lav_file ); +void lav_set_project( int w, int h, float fps, int shift ); +#endif +#endif diff --git a/veejay-server/libel/pixbuf.c b/veejay-server/libel/pixbuf.c new file mode 100644 index 00000000..a0368738 --- /dev/null +++ b/veejay-server/libel/pixbuf.c @@ -0,0 +1,449 @@ +/* veejay - Linux VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#ifdef USE_GDK_PIXBUF +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include AVCODEC_INC +#include SWSCALE_INC +#include +#ifdef STRICT_CHECKING +#include +#endif +#define RUP8(num)(((num)+8)&~8) + +typedef struct +{ + char *filename; + VJFrame *picA; + VJFrame *picB; + VJFrame *img; + uint8_t *space; + int display_w; + int display_h; + int real_w; + int real_h; + int fmt; +} vj_pixbuf_t; + + +typedef struct +{ + char *filename; + char *type; + int out_w; + int out_h; +} vj_pixbuf_out_t; + +static int __initialized = 0; + +extern int get_ffmpeg_pixfmt(int id); + +extern uint8_t *vj_perform_get_preview_buffer(); + +static VJFrame *open_pixbuf( const char *filename, int dst_w, int dst_h, int dst_fmt, + uint8_t *dY, uint8_t *dU, uint8_t *dV ) +{ + GdkPixbuf *image = + gdk_pixbuf_new_from_file( filename, NULL ); + if(!image) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to load image '%s'", filename); + return NULL; + } + + /* convert image to veejay frame in proper dimensions, free image */ + + int img_fmt = PIX_FMT_RGB24; + if( gdk_pixbuf_get_has_alpha( image )) + img_fmt = PIX_FMT_RGBA; + + VJFrame *dst = yuv_yuv_template( dY, dU, dV, dst_w, dst_h, dst_fmt ); + VJFrame *src = yuv_rgb_template( + (uint8_t*) gdk_pixbuf_get_pixels( image ), + gdk_pixbuf_get_width( image ), + gdk_pixbuf_get_height( image ), + img_fmt // PIX_FMT_RGB24 + ); + int stride = gdk_pixbuf_get_rowstride(image); + + if( stride != src->stride[0] ) + src->stride[0] = stride; + + veejay_msg(VEEJAY_MSG_DEBUG,"Image is %dx%d (src=%d, stride=%d, dstfmt=%d), scaling to %dx%d", + src->width,src->height,img_fmt, stride,dst_fmt,dst->width,dst->height ); + + yuv_convert_any_ac( src, dst, src->format, dst->format ); + + gdk_pixbuf_unref( image ); + + free(src); + + + return dst; +} + +void vj_picture_cleanup( void *pic ) +{ + vj_pixbuf_t *picture = ( vj_pixbuf_t*) pic; + if(picture) + { + if( picture->filename ) + free(picture->filename ); + if(picture->img) + free( picture->img ); + if(picture->space) + free(picture->space); + if( picture ) + free(picture); + } + picture = NULL; +} + + +VJFrame *vj_picture_get(void *pic) +{ + if(!pic) + return NULL; + vj_pixbuf_t *picture = (vj_pixbuf_t*) pic; + return picture->img; +} + +int vj_picture_get_height( void *pic ) +{ + vj_pixbuf_t *picture = (vj_pixbuf_t*) pic; + if(!picture) + return 0; + return picture->real_h; +} + +int vj_picture_get_width( void *pic ) +{ + vj_pixbuf_t *picture = (vj_pixbuf_t*) pic; + if(!picture) + return 0; + return picture->real_w; +} + +void *vj_picture_open( const char *filename, int v_outw, int v_outh, int v_outf ) +{ + vj_pixbuf_t *pic = NULL; + if(filename == NULL ) + { + veejay_msg(0, "No image filename given"); + return NULL; + } + + if(v_outw <= 0 || v_outh <= 0 ) + { + veejay_msg(0, "No image dimensions setup"); + return NULL; + } + + pic = (vj_pixbuf_t*) vj_calloc(sizeof(vj_pixbuf_t)); + if(!pic) + { + veejay_msg(0, "Memory allocation error in %s", __FUNCTION__ ); + return NULL; + } + pic->filename = strdup( filename ); + pic->display_w = v_outw; + pic->display_h = v_outh; + pic->fmt = v_outf; + + int len = v_outw * v_outh; + int ulen = len; + switch( v_outf ) + { + case PIX_FMT_YUV420P: + case PIX_FMT_YUVJ420P: + ulen = len / 4; + break; + case PIX_FMT_YUV422P: + case PIX_FMT_YUVJ422P: + ulen = len / 2; + break; + default: +#ifdef STRICT_CHECKING + assert(0); +#endif + break; + } + + pic->space = (uint8_t*) vj_malloc( sizeof(uint8_t) * (3 * len)); +#ifdef STRICT_CHECKING + assert(pic->space != NULL ); +#endif + pic->img = open_pixbuf( + filename, + v_outw, + v_outh, + v_outf, + pic->space, + pic->space + len, + pic->space + len + ulen ); + + return (void*) pic; +} + +int vj_picture_probe( const char *filename ) +{ + int ret = 0; + GdkPixbuf *image = + gdk_pixbuf_new_from_file( filename, NULL ); + if(image) + { + ret = 1; + gdk_pixbuf_unref( image ); + } + return ret; +} + +/* image saving */ + +static void add_if_writeable( GdkPixbufFormat *data, GSList **list) +{ + if( gdk_pixbuf_format_is_writable( data )) + *list = g_slist_prepend( *list, data ); + gchar *name = gdk_pixbuf_format_get_name( data ); + if(name) g_free(name); +} + +char *vj_picture_get_filename( void *pic ) +{ + vj_pixbuf_out_t *p = (vj_pixbuf_out_t*) pic; + if(!p) return NULL; + return p->filename; +} + +void * vj_picture_prepare_save( + const char *filename, char *type, int out_w, int out_h) +{ + if(!type || !filename ) + { + veejay_msg(0, "Missing filename or file extension"); + return NULL; + } + + vj_pixbuf_out_t *pic = (vj_pixbuf_out_t*) vj_calloc(sizeof(vj_pixbuf_out_t)); + + if(!pic) + return NULL; + + if(filename) + pic->filename = strdup( filename ); + else + pic->filename = NULL; + + if(strncasecmp(type,"jpg",3 ) == 0) + pic->type = strdup("jpeg"); + else + pic->type = strdup( type ); + + pic->out_w = out_w; + pic->out_h = out_h; + + return (void*) pic; +} + + + +static void display_if_writeable( GdkPixbufFormat *data, GSList **list) +{ + if( gdk_pixbuf_format_is_writable( data )) + *list = g_slist_prepend( *list, data ); + gchar *name = gdk_pixbuf_format_get_name( data ); + if( name ) g_free(name); +} +void vj_picture_display_formats() +{ + GSList *f = gdk_pixbuf_get_formats(); + GSList *res = NULL; + + g_slist_foreach( f, display_if_writeable, &res); + + g_slist_free( f ); + g_slist_free( res ); +} + +static void vj_picture_out_cleanup( vj_pixbuf_out_t *pic ) +{ + if(pic) + { + if(pic->filename) + free(pic->filename); + if(pic->type) + free(pic->type); + free(pic); + } + pic = NULL; +} + +static void *pic_scaler_ = NULL; +static int pic_data_[3] = { 0,0,0}; +static int pic_changed_ = 0; +static sws_template *pic_template_ = NULL; + +void vj_picture_init( void *templ ) +{ + if(!__initialized) + { + //@ we call this so gdk works EVIL + g_type_init(); + veejay_msg(VEEJAY_MSG_DEBUG, "Using gdk pixbuf %s", gdk_pixbuf_version ); + __initialized = 1; + } + + pic_template_ = (sws_template*) templ; + +} + +int vj_picture_save( void *picture, uint8_t **frame, int w, int h , int fmt ) +{ + int ret = 0; + vj_pixbuf_out_t *pic = (vj_pixbuf_out_t*) picture; + + GdkPixbuf *img_ = gdk_pixbuf_new( GDK_COLORSPACE_RGB, FALSE, 8, w, h ); + if(!img_) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cant allocate buffer for RGB"); + return 0; + } + + // convert frame to yuv + VJFrame *src = yuv_yuv_template( frame[0],frame[1],frame[2],w,h, fmt ); + VJFrame *dst = yuv_rgb_template( + (uint8_t*) gdk_pixbuf_get_pixels( img_ ), + gdk_pixbuf_get_width( img_ ), + gdk_pixbuf_get_height( img_ ), + PIX_FMT_RGB24 + ); + + yuv_convert_any_ac( src, dst, fmt, PIX_FMT_RGB24 ); + + if( gdk_pixbuf_savev( img_, pic->filename, pic->type, NULL, NULL, NULL )) + { + veejay_msg(VEEJAY_MSG_INFO, "Save frame as %s of type %s", + pic->filename, pic->type ); + ret = 1; + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, + "Cant save file as %s (%s) size %d x %d", pic->filename,pic->type, pic->out_w, pic->out_h); + } + + if( img_ ) + gdk_pixbuf_unref( img_ ); + + free(src); + free(dst); + + vj_picture_out_cleanup( pic ); + + return ret; +} + +void vj_picture_free() +{ + +} + +#define pic_has_changed(a,b,c) ( (a == pic_data_[0] && b == pic_data_[1] && c == pic_data_[2] ) ? 0: 1) +#define update_pic_data(a,b,c) { pic_data_[0] = a; pic_data_[1] = b; pic_data_[2] = c;} + +void vj_fast_picture_save_to_mem( VJFrame *frame, int out_w, int out_h, int fmt ) +{ + int pixfmt = get_ffmpeg_pixfmt( fmt ); + + VJFrame *src1 = yuv_yuv_template( frame->data[0],frame->data[1],frame->data[2], + frame->width,frame->height, pixfmt ); + + uint8_t *dest[3]; + dest[0] = vj_perform_get_preview_buffer(); + dest[1] = dest[0] + (out_w * out_h); + dest[2] = dest[1] + ( (out_w * out_h)/4 ); + + VJFrame *dst1 = yuv_yuv_template( dest[0], dest[1], dest[2], out_w, out_h, PIX_FMT_YUV420P ); + + pic_changed_ = pic_has_changed( out_w,out_h, pixfmt ); + + if(pic_changed_ ) + { + if(pic_scaler_) + yuv_free_swscaler( pic_scaler_ ); + pic_scaler_ = yuv_init_swscaler( src1,dst1, pic_template_, yuv_sws_get_cpu_flags()); + update_pic_data( out_w, out_h, pixfmt ); + } + + if( frame->width == out_w && frame->height == out_h ) + yuv_convert_any_ac( src1, dst1, src1->format, dst1->format ); + else + yuv_convert_and_scale( pic_scaler_, src1,dst1); + + free(src1); + free(dst1); +} + +void vj_fastbw_picture_save_to_mem( VJFrame *frame, int out_w, int out_h, int fmt ) +{ + int pixfmt = get_ffmpeg_pixfmt( fmt ); + + VJFrame *src1 = yuv_yuv_template( frame->data[0],frame->data[1],frame->data[2], + frame->width,frame->height, pixfmt ); + + uint8_t *planes[3]; + + planes[0] = vj_perform_get_preview_buffer(); + planes[1] = planes[0] + (out_w * out_h ); + planes[2] = planes[1] + (out_w * out_h ); + + VJFrame *dst1 = yuv_yuv_template( planes[0], planes[1], planes[2], + out_w , out_h, PIX_FMT_GRAY8 ); + pic_changed_ = pic_has_changed( out_w,out_h, pixfmt ); + + if(pic_changed_ ) + { + if(pic_scaler_) + yuv_free_swscaler( pic_scaler_ ); + pic_scaler_ = yuv_init_swscaler( src1,dst1, pic_template_, yuv_sws_get_cpu_flags()); + update_pic_data( out_w, out_h, pixfmt ); + } + + + if( frame->width == out_w && frame->height == out_h ) + yuv_convert_any_ac( src1,dst1,src1->format, dst1->format ); + else + yuv_convert_and_scale( pic_scaler_, src1, dst1); + + free(src1); + free(dst1); +} + +#endif diff --git a/veejay-server/libel/pixbuf.h b/veejay-server/libel/pixbuf.h new file mode 100644 index 00000000..e9b7d3ae --- /dev/null +++ b/veejay-server/libel/pixbuf.h @@ -0,0 +1,53 @@ +/* veejay - Linux VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_PIXBUF_H +#define VJ_PIXBUF_H +#include +#include +typedef struct +{ + int w; + int h; +} veejay_image_t; + +#ifdef USE_GDK_PIXBUF +void vj_picture_init(void *templ); +void vj_picture_cleanup( void *pic ); +VJFrame *vj_picture_get( void *pic ); +int vj_picture_probe( const char *filename ); +void *vj_picture_open( const char *filename, int v_outw, int v_outh, int v_outf ); +int vj_picture_get_width(void *pic); +int vj_picture_get_height(void *pic); +void vj_picture_display_formats(void); +char *vj_picture_get_filename( void *pic ); +void * vj_picture_prepare_save( const char *filename, char *type, int out_w, int out_h); +int vj_picture_save( void *picture, uint8_t **frame, int w, int h , int fmt ); +void vj_picture_display_formats(void); + +veejay_image_t *vj_picture_save_bw_to_memory( uint8_t **frame, int w, int h , int out_w, int out_h, int fmt ); +veejay_image_t *vj_picture_save_to_memory( uint8_t **frame, int w, int h , int out_w, int out_h, int fmt ); +void vj_fastbw_picture_save_to_mem( VJFrame *f, int out_w, int out_h, int fmt ); +void vj_fast_picture_save_to_mem(VJFrame *f, int out_w, int out_h, int fmt ); + +void vj_picture_free(); + +#endif + + +#endif diff --git a/veejay-server/libel/rawdv.c b/veejay-server/libel/rawdv.c new file mode 100644 index 00000000..6ea1bc83 --- /dev/null +++ b/veejay-server/libel/rawdv.c @@ -0,0 +1,329 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#ifdef SUPPORT_READ_DV2 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#define DV_PAL_SIZE 144000 +#define DV_NTSC_SIZE 120000 + +static void rawdv_free(dv_t *dv) +{ + if(dv->filename) free(dv->filename); + if(dv->buf) free(dv->buf); + if(dv) free(dv); +} + +int rawdv_close(dv_t *dv) +{ + close(dv->fd); + mmap_free(dv->mmap_region); + rawdv_free( dv); + return 1; +} + +int rawdv_sampling(dv_t *dv) +{ + switch(dv->fmt) + { + case e_dv_sample_411: return 4; + case e_dv_sample_422: return 2; + case e_dv_sample_420: return 1; + } + return 3; +} + +#define DV_HEADER_SIZE 120000 +dv_t *rawdv_open_input_file(const char *filename, int mmap_size) +{ + dv_t *dv = (dv_t*) vj_malloc(sizeof(dv_t)); + if(!dv) return NULL; + memset(dv, 0, sizeof(dv_t)); + dv_decoder_t *decoder = NULL; + + uint8_t *tmp = (uint8_t*) vj_malloc(sizeof(uint8_t) * DV_HEADER_SIZE); + memset( tmp, 0, sizeof(uint8_t) * DV_HEADER_SIZE); + off_t file_size = 0; + int n = 0; + + decoder = dv_decoder_new( 1,0,0); + dv->fd = open( filename, O_RDONLY ); + + if(!dv->fd) + { + dv_decoder_free(decoder); + rawdv_free(dv); + veejay_msg(VEEJAY_MSG_ERROR, "Cannot open '%s'",filename); + if(tmp)free(tmp); + return NULL; + } + /* fseek sometimes lies about filesize - seek to end (lseek returns file offset from start)*/ + file_size = lseek( dv->fd, 0, SEEK_END ); + if( file_size < DV_HEADER_SIZE) + { + dv_decoder_free(decoder); + veejay_msg(VEEJAY_MSG_ERROR, "% is too small! ", filename); + rawdv_free(dv); + if(tmp) free(tmp); + return NULL; + } + /* And back to start offset */ + if( lseek(dv->fd,0, SEEK_SET ) < 0) + { + dv_decoder_free(decoder); + veejay_msg(VEEJAY_MSG_ERROR, "Seek errror"); + rawdv_free(dv); + if(tmp) free(tmp); + return NULL; + } + + dv->mmap_region = NULL; + if( mmap_size > 0 ) // user wants mmap + { + dv->mmap_region = mmap_file( dv->fd, 0, (mmap_size * 720 * 576 * 3), + file_size ); + } + + if( dv->mmap_region == NULL ) + { + if(mmap_size>0) + veejay_msg(VEEJAY_MSG_DEBUG, "Mmap failed - fallback to read"); + n = read( dv->fd, tmp, DV_HEADER_SIZE ); + } + else + { + n = mmap_read( dv->mmap_region, 0, DV_HEADER_SIZE, tmp ); + } + + if( n <= 0 ) + { + dv_decoder_free(decoder); + rawdv_free(dv); + if(tmp) free(tmp); + veejay_msg(VEEJAY_MSG_ERROR, "Cannot read from '%s'", filename); + return NULL; + } + + if( dv_parse_header( decoder, tmp) < 0 ) + { + dv_decoder_free( decoder ); + rawdv_free(dv); + if(tmp) free(tmp); + veejay_msg(VEEJAY_MSG_ERROR, "Cannot parse header"); + return NULL; + } +/* if(decoder->sampling == e_dv_sample_411) + { + dv_decoder_free( decoder ); + rawdv_free(dv); + if(tmp) free(tmp); + return NULL; + }*/ + + + if(dv_is_PAL( decoder ) ) + dv->chunk_size = DV_PAL_SIZE; + else + dv->chunk_size = DV_NTSC_SIZE; + + dv->width = decoder->width; + dv->height = decoder->height; + dv->audio_rate = decoder->audio->frequency; + dv->audio_chans = decoder->audio->num_channels; + dv->audio_qbytes = decoder->audio->quantization; + dv->fps = ( dv_is_PAL( decoder) ? 25.0 : 29.97 ); + dv->size = decoder->frame_size; + dv->num_frames = (file_size - DV_HEADER_SIZE) / dv->size; + dv->fmt = decoder->sampling; +// dv->fmt = ( decoder->sampling == e_dv_sample_422 ? 1 : 0); + dv->buf = (uint8_t*) vj_malloc(sizeof(uint8_t*) * dv->size); + dv->offset = 0; + + veejay_msg(VEEJAY_MSG_DEBUG, + "DV properties %d x %d, %f, %d frames, %d sampling", + dv->width,dv->height, dv->fps, dv->num_frames, + dv->fmt ); + + dv_decoder_free( decoder ); + + if(tmp) + free(tmp); + +/* if(dv->audio_rate) + { + int i; + for( i = 0; i < 4; i ++ ) + dv->audio_buffers[i] = (int16_t*) vj_malloc(sizeof(int16_t) * 2 * DV_AUDIO_MAX_SAMPLES); + }*/ + +/* + veejay_msg(VEEJAY_MSG_DEBUG, + "rawDV: num frames %ld, dimensions %d x %d, at %2.2f in %s", + dv->num_frames, + dv->width, + dv->height, + dv->fps, + (dv->fmt==1?"422":"420")); + veejay_msg(VEEJAY_MSG_DEBUG, + "rawDV: frame size %d, rate %d, channels %d, bits %d", + dv->size, + dv->audio_rate, + dv->audio_chans, + dv->audio_qbytes);*/ + + return dv; +} + + +int rawdv_set_position(dv_t *dv, long nframe) +{ + off_t offset = nframe * dv->size; + + if(nframe <= 0 ) + offset = 0; + else + if(nframe > dv->num_frames) + offset = dv->num_frames * dv->size; + + dv->offset = offset; + + if( lseek( dv->fd, offset, SEEK_SET ) < 0 ) + return -1; + return 0; +} + +int rawdv_read_frame(dv_t *dv, uint8_t *buf ) +{ + int n = 0; + if(dv->mmap_region == NULL) + { + n = read( dv->fd, dv->buf, dv->size ); + memcpy( buf, dv->buf, dv->size ); + } + else + { + n = mmap_read( dv->mmap_region, dv->offset, dv->size, buf ); + } + return n; +} + +int rawdv_read_audio_frame(dv_t *dv, uint8_t *audio ) +{ + + return 0; +/* + int n = dv_decode_full_audio( dv->decoder, dv->buf, dv->audio_buffers ); + // interleave buffers to audio + int n_samples = dv_get_num_samples( dv->decoder ); + int n_chans = dv->audio_chans; + int16_t *ch0 = dv->audio_buffers[0]; + int16_t *ch1 = dv->audio_buffers[1]; + int i,j; + for( i = 0; i < n_samples; i ++ ) + { + *(audio) = *(ch0) & 0xff; + *(audio+1) = (*(ch0) << 8) & 0xff; + *(audio+2) = *(ch1) & 0xff; + *(audio+3) = (*(ch1)<<8) & 0xff; + *(ch0) ++; + *(ch1) ++; + *(audio) += 4; + } + return n_samples * 4; +*/ +} + +int rawdv_video_frames(dv_t *dv) +{ + return dv->num_frames; +} + +int rawdv_width(dv_t *dv) +{ + return dv->width; +} + +int rawdv_height(dv_t *dv) +{ + return dv->height; +} + +double rawdv_fps(dv_t *dv) +{ + return (double) dv->fps; +} + +int rawdv_compressor(dv_t *dv) +{ + return CODEC_ID_DVVIDEO; +} + +char *rawdv_video_compressor(dv_t *dv) +{ + char *res = "dvsd\0"; + return res; +} + +int rawdv_audio_channels(dv_t *dv) +{ + return dv->audio_chans; +} + +int rawdv_audio_bits(dv_t *dv) +{ + return dv->audio_qbytes; +} + +int rawdv_audio_format(dv_t *dv) +{ + // pcm wave format + return (0x0001); +} + +int rawdv_audio_rate(dv_t *dv) +{ + return dv->audio_rate; +} + +int rawdv_audio_bps(dv_t *dv) +{ + return 4; +} + +int rawdv_frame_size(dv_t *dv) +{ + return dv->size; +} + +int rawdv_interlacing(dv_t *dv) +{ + return 0; +} +#endif diff --git a/veejay-server/libel/rawdv.h b/veejay-server/libel/rawdv.h new file mode 100644 index 00000000..f2b09714 --- /dev/null +++ b/veejay-server/libel/rawdv.h @@ -0,0 +1,67 @@ +#ifndef RAWDV_H +#define RAWDV_H +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#include +typedef struct +{ + int fd; + char *filename; + long num_frames; + int width; + int height; + float fps; + int chunk_size; + long audio_rate; + int audio_chans; + int audio_qbytes; + dv_decoder_t *decoder; + int16_t *audio_buffers[4]; + off_t offset; + uint8_t *buf; + int size; + int fmt; + mmap_region_t *mmap_region; +} dv_t; + +int rawdv_sampling(dv_t *dv); +int rawdv_close(dv_t *dv); +dv_t *rawdv_open_input_file(const char *filename, int mmap_size); +int rawdv_set_position(dv_t *dv, long nframe); +int rawdv_read_frame(dv_t *dv, uint8_t *buf ); +int rawdv_read_audio_frame(dv_t *dv, uint8_t *buf); +int rawdv_video_frames(dv_t *dv); +int rawdv_width(dv_t *dv); +int rawdv_height(dv_t *dv); +double rawdv_fps(dv_t *dv); +int rawdv_compressor(dv_t *dv); +char *rawdv_video_compressor(dv_t *dv); +int rawdv_audio_channels(dv_t *dv); +int rawdv_audio_bits(dv_t *dv); +int rawdv_audio_format(dv_t *dv); +int rawdv_audio_rate(dv_t *dv); +int rawdv_audio_bps(dv_t *dv); +int rawdv_frame_size(dv_t *dv); +int rawdv_interlacing(dv_t *dv); + +#endif diff --git a/veejay-server/libel/vj-avcodec.c b/veejay-server/libel/vj-avcodec.c new file mode 100644 index 00000000..cd2cfc3f --- /dev/null +++ b/veejay-server/libel/vj-avcodec.c @@ -0,0 +1,475 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef SUPPORT_READ_DV2 +#define __FALLBACK_LIBDV +#include +#endif +#include AVCODEC_INC +#include AVUTIL_INC +#define YUV420_ONLY_CODEC(id) ( ( id == CODEC_ID_MJPEG || id == CODEC_ID_MJPEGB || id == CODEC_ID_MSMPEG4V3 || id == CODEC_ID_MPEG4) ? 1: 0) + + +static int out_pixel_format = FMT_420; + +char* vj_avcodec_get_codec_name(int codec_id ) +{ + char name[20]; + switch(codec_id) + { + case CODEC_ID_MJPEG: sprintf(name, "MJPEG"); break; + case CODEC_ID_MPEG4: sprintf(name, "MPEG4"); break; + case CODEC_ID_MSMPEG4V3: sprintf(name, "DIVX"); break; + case CODEC_ID_DVVIDEO: sprintf(name, "DVVideo"); break; + case 999 : sprintf(name, "RAW YUV 4:2:0 Planar"); break; + case 998 : sprintf(name, "RAW YUV 4:2:2 Planar"); break; + case 900 : sprintf(name, "LZO YUV 4:2:2 Planar"); break; + default: + sprintf(name, "Unknown"); break; + } + char *res = strdup(name); + return res; +} + +static vj_encoder *vj_avcodec_new_encoder( int id, editlist *el, int pixel_format) +{ + vj_encoder *e = (vj_encoder*) vj_calloc(sizeof(vj_encoder)); + if(!e) return NULL; + + if( YUV420_ONLY_CODEC(id )) + { + e->data[0] = (uint8_t*) vj_calloc(sizeof(uint8_t) * + el->video_width * el->video_height ); + e->data[1] = (uint8_t*) vj_calloc(sizeof(uint8_t) * + el->video_width * el->video_height /2 ); + e->data[2] = (uint8_t*) vj_calloc(sizeof(uint8_t) * + el->video_width * el->video_height /2); + } + + if( id == 900 ) + { + e->lzo = lzo_new(); + } + + if(id != 998 && id != 999 && id != 900) + { +#ifdef __FALLBACK_LIBDV + if(id != CODEC_ID_DVVIDEO) + { +#endif + e->codec = avcodec_find_encoder( id ); + if(!e->codec) + { + char *descr = vj_avcodec_get_codec_name(id); + veejay_msg(VEEJAY_MSG_ERROR, "Cannot find Encoder codec %s", descr ); + free(descr); + } +#ifdef __FALLBACK_LIBDV + } +#endif + + } + + if( id != 998 && id != 999 && id!= 900) + { +#ifdef __FALLBACK_LIBDV + if(id != CODEC_ID_DVVIDEO ) + { +#endif + e->context = avcodec_alloc_context(); + e->context->bit_rate = 2750 * 1024; + e->context->width = el->video_width; + e->context->height = el->video_height; +#if LIBAVCODEC_BUILD > 5010 + e->context->time_base = (AVRational) { 1, el->video_fps }; +#else + e->context->frame_rate = el->video_fps; + e->context->frame_rate_base = 1; +#endif + e->context->qcompress = 0.0; + e->context->qblur = 0.0; + e->context->max_b_frames = 0; + e->context->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; + e->context->flags = CODEC_FLAG_QSCALE; + e->context->gop_size = 0; + e->context->sub_id = 0; + e->context->me_method = 0; // motion estimation algorithm + e->context->workaround_bugs = FF_BUG_AUTODETECT; + e->context->prediction_method = 0; + e->context->dct_algo = FF_DCT_AUTO; //global_quality? + + switch(pixel_format) + { + case FMT_420: + e->context->pix_fmt = PIX_FMT_YUV420P; + break; + case FMT_420F: + e->context->pix_fmt = PIX_FMT_YUVJ420P; + break; + case FMT_422F: + e->context->pix_fmt = PIX_FMT_YUVJ422P; + break; + default: + e->context->pix_fmt = PIX_FMT_YUV422P; + break; + } + char *descr = vj_avcodec_get_codec_name( id ); + + if ( avcodec_open( e->context, e->codec ) < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot open codec '%s'" , descr ); + if(e->context) free(e->context); + if(e) free(e); + if(descr) free(descr); + return NULL; + } + else + { + veejay_msg(VEEJAY_MSG_DEBUG, "\tOpened encoder %s", descr ); + free(descr); + } +#ifdef __FALLBACK_LIBDV + } +#endif + } + + e->len = el->video_width * el->video_height; + + if(el->pixel_format == FMT_422 || el->pixel_format == FMT_422F) + e->uv_len = e->len / 2; + else + e->uv_len = e->len / 4; + e->width = el->video_width; + e->height = el->video_height; + + e->out_fmt = el->pixel_format; + e->encoder_id = id; + +/* + if( el->has_audio ) + { + e->audiocodec = avcodec_find_encoder( CODEC_ID_PCM_U8 ); + if(!e->audiocodec) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error initializing audio codec"); + if(e) free(e); + } + e->context->sample_rate = el->audio_rate; + e->context->channels = el->audio_chans; + if( avcodec_open( e->context, e->audiocodec ) < 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot open audio context"); + if(e) free(e); + return NULL; + } + + } +*/ + return e; +} +void vj_avcodec_close_encoder( vj_encoder *av ) +{ + if(av) + { + if(av->context) + { + avcodec_close( av->context ); + free(av->context); + av->context = NULL; + } + if(av->data[0]) + free(av->data[0]); + if(av->data[1]) + free(av->data[1]); + if(av->data[2]) + free(av->data[2]); + if(av->lzo) + lzo_free(av->lzo); + free(av); + } + av = NULL; +} + +int vj_avcodec_find_codec( int encoder ) +{ + switch( encoder) + { + case ENCODER_MJPEG: + case ENCODER_QUICKTIME_MJPEG: + return CODEC_ID_MJPEG; + case ENCODER_DVVIDEO: + case ENCODER_QUICKTIME_DV: + return CODEC_ID_DVVIDEO; + case ENCODER_YUV420: + return 999; + case ENCODER_YUV422: + return 998; + case ENCODER_MPEG4: + return CODEC_ID_MPEG4; + case ENCODER_DIVX: + return CODEC_ID_MSMPEG4V3; + case ENCODER_LZO: + return 900; + default: + veejay_msg(VEEJAY_MSG_DEBUG, "Unknown format %d selected", encoder ); + return 0; + } + return 0; +} + + +int vj_avcodec_stop( void *encoder , int fmt) +{ + if(!encoder) + return 0; +#ifdef SUPPORT_READ_DV2 + if( fmt == CODEC_ID_DVVIDEO ) + { + vj_dv_free_encoder(encoder); + encoder = NULL; + return 1; + } +#endif + if( fmt == 900 ) + { + return 1; + } + vj_encoder *env = (vj_encoder*) encoder; + vj_avcodec_close_encoder( env ); + encoder = NULL; + return 1; +} + +void *vj_avcodec_start( editlist *el, int encoder ) +{ + int codec_id = vj_avcodec_find_codec( encoder ); + void *ee = NULL; +#ifdef SUPPORT_READ_DV2 + if(codec_id == CODEC_ID_DVVIDEO ) + { + if(!is_dv_resolution(el->video_width, el->video_height )) + { + veejay_msg(VEEJAY_MSG_ERROR,"\tVideo dimensions do not match required resolution"); + return NULL; + } + else + { + ee = (void*)vj_dv_init_encoder( (void*)el , out_pixel_format); + return ee; + } + } +#else + if( codec_id == CODEC_ID_DVVIDEO ) + return NULL; +#endif + ee = vj_avcodec_new_encoder( codec_id, el , encoder ); + if(!ee) + { + veejay_msg(VEEJAY_MSG_ERROR, "\tFailed to start encoder %x",encoder); + return NULL; + } + return ee; +} + + +int vj_avcodec_init( int pixel_format, int verbose) +{ + out_pixel_format = pixel_format; + if( !verbose ) + av_log_set_level( AV_LOG_QUIET); + else + av_log_set_level( AV_LOG_VERBOSE ); + + av_register_all(); + + veejay_msg(VEEJAY_MSG_INFO, "FFmpeg AVCodec initialized (http://ffmpeg.sourceforge.net)"); + + return 1; +} + +int vj_avcodec_free() +{ + return 1; +} + +static void long2str(unsigned char *dst, int32_t n) +{ + dst[0] = (n )&0xff; + dst[1] = (n>> 8)&0xff; + dst[2] = (n>>16)&0xff; + dst[3] = (n>>24)&0xff; +} + + +static int vj_avcodec_lzo( vj_encoder *av, uint8_t *src[3], uint8_t *dst , int buf_len ) +{ + uint8_t *dstI = dst + (3 * 4); + int size1 = 0, size2=0,size3=0; + int i; + + i = lzo_compress( av->lzo, src[0], dstI, &size1 , av->len); + if( i == 0 ) + { + veejay_msg(0,"\tunable to compress Y plane"); + return 0; + } + dstI += size1; + + i = lzo_compress( av->lzo, src[1], dstI, &size2 , av->uv_len ); + if( i == 0 ) + { + veejay_msg(0,"\tunable to compress U plane"); + return 0; + } + + dstI += size2; + i = lzo_compress( av->lzo, src[2], dstI, &size3 , av->uv_len ); + if( i == 0 ) + { + veejay_msg(0,"\tunable to compress V plane"); + return 0; + } + + + long2str( dst, size1 ); + long2str( dst+4,size2); + long2str( dst+8,size3); + + return (size1 + size2 + size3 + 12); +} +static int vj_avcodec_copy_frame( vj_encoder *av, uint8_t *src[3], uint8_t *dst ) +{ + if(!av) + { + veejay_msg(VEEJAY_MSG_ERROR, "No encoder !!"); + return 0; + } + + if( (av->encoder_id == 999 && (av->out_fmt == FMT_420 ||av->out_fmt == FMT_420F)) || (av->encoder_id == 998 && (av->out_fmt == FMT_422||av->out_fmt == FMT_422F))) + { + /* copy */ + veejay_memcpy( dst, src[0], av->len ); + veejay_memcpy( dst+(av->len), src[1], av->uv_len ); + veejay_memcpy( dst+(av->len+av->uv_len) , src[2], av->uv_len); + return ( av->len + av->uv_len + av->uv_len ); + } + /* copy by converting */ + if( av->encoder_id == 999 && (av->out_fmt == FMT_422 || av->out_fmt==FMT_422F)) + { + VJFrame *srci= yuv_yuv_template( src[0],src[1],src[2], av->width,av->height, get_ffmpeg_pixfmt( av->out_fmt)); + VJFrame *dsti= yuv_yuv_template( dst,dst+av->len,dst+av->len+(av->len/4), av->width,av->height, PIX_FMT_YUV420P ); + + yuv_convert_any_ac( srci,dsti, srci->format, dsti->format ); + + free(srci); + free(dsti); + + return ( av->len + (av->len/4) + (av->len/4)); + } + + if( av->encoder_id == 998 && (av->out_fmt == FMT_420||av->out_fmt==FMT_420F)) + { + VJFrame *srci = yuv_yuv_template( src[0],src[1],src[2], av->width,av->height,get_ffmpeg_pixfmt(av->out_fmt)); + VJFrame *dsti = yuv_yuv_template( dst, dst + av->len, dst + (av->len + (av->len/2)), + av->width,av->height, PIX_FMT_YUV422P); + + free(srci); + free(dsti); + + return ( av->len + av->len ); + } + + + return 0; +} + + + +int vj_avcodec_encode_frame(void *encoder, int nframe,int format, uint8_t *src[3], uint8_t *buf, int buf_len) +{ + AVFrame pict; + int res=0; + memset( &pict, 0, sizeof(pict)); + + if(format == ENCODER_LZO ) + return vj_avcodec_lzo( encoder, src, buf, buf_len ); + + if(format == ENCODER_YUV420 || format == ENCODER_YUV422) // no compression, just copy + return vj_avcodec_copy_frame( encoder,src, buf ); + +#ifdef __FALLBACK_LIBDV + if(format == ENCODER_DVVIDEO || format == ENCODER_QUICKTIME_DV ) + return vj_dv_encode_frame( encoder,src, buf ); +#endif + + vj_encoder *av = (vj_encoder*) encoder; + + pict.quality = 1; + pict.pts = (int64_t)( (int64_t)nframe ); + + int src_fmt = get_ffmpeg_pixfmt( out_pixel_format ); + + if(av->context->pix_fmt != src_fmt ) + { + pict.data[0] = av->data[0]; + pict.data[1] = av->data[1]; + pict.data[2] = av->data[2]; + pict.linesize[0] = av->context->width; + pict.linesize[1] = av->context->width >> 1; + pict.linesize[2] = av->context->width >> 1; + + VJFrame *srci = yuv_yuv_template( src[0],src[1],src[2], av->context->width,av->context->height, src_fmt ); + VJFrame *dsti = yuv_yuv_template( av->data[0],av->data[1],av->data[2],av->context->width,av->context->height, + av->context->pix_fmt ); + + yuv_convert_any_ac( srci,dsti, srci->format, dsti->format ); + + free(srci); + free(dsti); + } + else + { + pict.data[0] = src[0]; + pict.data[1] = src[1]; + pict.data[2] = src[2]; + pict.linesize[0] = av->context->width; + pict.linesize[1] = pict.linesize[0]>>1; + pict.linesize[2] = pict.linesize[0]>>1; + } + + res = avcodec_encode_video( av->context, buf, buf_len, &pict ); + return res; +} + +int vj_avcodec_encode_audio( void *encoder, int format, uint8_t *src, uint8_t *dst, int len, int nsamples ) +{ + if(format == ENCODER_YUV420 || ENCODER_YUV422 == format) + return 0; + vj_encoder *av = encoder; + int ret = avcodec_encode_audio( av->context, src, len, nsamples ); + return ret; +} diff --git a/veejay-server/libel/vj-avcodec.h b/veejay-server/libel/vj-avcodec.h new file mode 100644 index 00000000..24779dc3 --- /dev/null +++ b/veejay-server/libel/vj-avcodec.h @@ -0,0 +1,82 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_AVCODEC_H +#define VJ_AVCODEC_H +//bad +#include AVCODEC_INC +#include "vj-el.h" + +#define ENCODER_MJPEG 0 +#define ENCODER_DVVIDEO 1 +#define ENCODER_DIVX 2 +#define ENCODER_MPEG4 3 +#define ENCODER_YUV420 4 +#define ENCODER_YUV422 5 +#define ENCODER_QUICKTIME_DV 6 +#define ENCODER_QUICKTIME_MJPEG 7 +#define ENCODER_LZO 8 +#define NUM_ENCODERS 9 + +typedef struct +{ + AVCodec *codec; + AVCodec *audiocodec; + AVFrame *frame; + AVCodecContext *context; + int out_fmt; + int uv_len; + int len; + int sub_sample; + int super_sample; + int encoder_id; + int width; + int height; + uint8_t *data[3]; + void *lzo; +} vj_encoder; + +int vj_avcodec_init(int pix, int verbose); + +int vj_avcodec_encode_frame(void *encoder,int nframe, int format, uint8_t *src[3], uint8_t *dst, int dst_len); + +int vj_avcodec_free(); + +/* color space conversion routines, should go somewhere else someday + together with subsample.c/colorspace.c into some lib + */ + +void yuv_planar_to_rgb24(uint8_t *src[3], int fmt, uint8_t *dst, int w, int h ); + +// from yuv 4:2:0 planar to yuv 4:2:2 planar +int yuv420p_to_yuv422p( uint8_t *Y, uint8_t *Cb, uint8_t *Cr, uint8_t *dst[3], int w, int h ); + +void yuv422p_to_yuv420p2( uint8_t *src[3], uint8_t *dst[3], int w, int h, int f ); + +int yuv420p_to_yuv422p2( uint8_t *sY,uint8_t *sCb, uint8_t *sCr, uint8_t *dst[3], int w, int h ); + +void yuv422p_to_yuv420p3( uint8_t *src, uint8_t *dst[3], int w, int h); + +void *vj_avcodec_start( editlist *el, int encoder ); + +int vj_avcodec_stop( void *encoder , int fmt); + +void vj_avcodec_close_encoder( vj_encoder *av ); + + +#endif diff --git a/veejay-server/libel/vj-dv.c b/veejay-server/libel/vj-dv.c new file mode 100644 index 00000000..1d4912e5 --- /dev/null +++ b/veejay-server/libel/vj-dv.c @@ -0,0 +1,370 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#ifdef SUPPORT_READ_DV2 +#include +#include +#include +#include +#include +#include +#include + +#define NTSC_W 720 +#define NTSC_H 480 +#define PAL_W 720 +#define PAL_H 576 +#define DV_PAL_SIZE 144000 +#define DV_NTSC_SIZE 120000 +#define DV_AUDIO_MAX_SAMPLES 1944 + +#ifdef STRICT_CHECKING +#include +#endif + +int is_dv_resolution(int w, int h) +{ + if( h == NTSC_H && w == NTSC_W ) + return 1; + if( h == PAL_H && w == PAL_W ) + return 1; + return 0; +} + +/* init the dv decoder and decode buffer*/ +vj_dv_decoder *vj_dv_decoder_init(int quality, int width, int height, int pixel_format) +{ + int dv_q = DV_QUALITY_COLOR; + vj_dv_decoder *d = (vj_dv_decoder*)vj_malloc(sizeof(vj_dv_decoder)); + if(!d) return NULL; + d->decoder = dv_decoder_new( 1,1,0 ); + if( quality == 0 ) + dv_q = DV_QUALITY_FASTEST; + if( quality == 1 ) + dv_q = DV_QUALITY_BEST; + + d->decoder->quality = dv_q; + d->dv_video = (uint8_t*) vj_malloc(sizeof(uint8_t) * width * height * 4); + memset( d->dv_video, 0, (width*height*4)); + d->fmt = pixel_format; + d->audio = 0; // audio off + return d; +} + +/* init the dv encoder and encode buffer */ +vj_dv_encoder *vj_dv_init_encoder(void * edl, int pixel_format) +{ + editlist *el = (editlist*) edl; + vj_dv_encoder *e = (vj_dv_encoder*) vj_malloc(sizeof(vj_dv_encoder)); + if(!e) return NULL; + e->encoder = dv_encoder_new(0,0,0); + e->encoder->isPAL = (el->video_norm == 'p' ? 1 : 0); + e->encoder->is16x9 = (el->video_width / el->video_height >= 1.777 ? 1: 0); + e->encoder->vlc_encode_passes = 3; + e->encoder->static_qno = 0; + e->encoder->force_dct = DV_DCT_AUTO; + e->fmt = pixel_format; + + e->dv_video = + (uint8_t *) vj_malloc(sizeof(uint8_t) * + (e->encoder->isPAL ? + DV_PAL_SIZE : DV_NTSC_SIZE)); + memset( e->dv_video, 0 , + (e->encoder->isPAL ? DV_PAL_SIZE: DV_NTSC_SIZE ) ); + return e; +} + + +/* encode frame to dv format, dv frame will be in output_buf */ +int vj_dv_encode_frame(vj_dv_encoder *encoder, uint8_t *input_buf[3], uint8_t *output_buf) +{ + + time_t now = time(NULL); + uint8_t *pixels[3]; + int w=0; int h = 0; + if (!input_buf) + return 0; + + pixels[0] = (uint8_t *) encoder->dv_video; + + if (encoder->encoder->isPAL) + { + h = PAL_H; + w = PAL_W; + } + else + { + h = NTSC_H; + w = NTSC_W; + } + + if( encoder->fmt == FMT_420 || encoder->fmt == FMT_420F) + { + pixels[1] = (uint8_t *) encoder->dv_video + (w * h); + pixels[2] = (uint8_t *) encoder->dv_video + (w * h * 5) / 4; + yuv420p_to_yuv422(input_buf, encoder->dv_video, w, h ); + } + else + { // convert 422 planar to packed + int off = w * h / 2; + pixels[1] = (uint8_t *) encoder->dv_video + (w * h ); + pixels[2] = (uint8_t *) encoder->dv_video + (w * h) + off; + yuv422p_to_yuv422(input_buf,encoder->dv_video,w,h); + } + + dv_encode_full_frame( encoder->encoder, pixels, e_dv_color_yuv, + output_buf); + dv_encode_metadata(output_buf, encoder->encoder->isPAL, + encoder->encoder->is16x9, &now, 0); + dv_encode_timecode(output_buf, encoder->encoder->isPAL, 0); + + if(encoder->encoder->isPAL) return DV_PAL_SIZE; + return DV_NTSC_SIZE; +} + +void vj_dv_free_encoder(vj_dv_encoder *e) +{ + if(e) + { + if(e->encoder) + dv_encoder_free( e->encoder); + if(e->dv_video) + free(e->dv_video); + free(e); + } +} + +void vj_dv_free_decoder(vj_dv_decoder *d) { + if(d->decoder) + dv_decoder_free( d->decoder ); + if(d->dv_video) + free(d->dv_video); + if(d) + free(d); +} + +void vj_dv_decoder_set_audio(vj_dv_decoder *d, int audio) +{ +} + +void vj_dv_decoder_get_audio(vj_dv_decoder *d, uint8_t *audio_buf) +{ + + if(!d->audio) return; + + int n_samples = dv_get_num_samples( d->decoder); +// int channels = dv_get_num_channels( d->decoder ); + int i; + int16_t *ch0 = d->audio_buffers[0]; + int16_t *ch1 = d->audio_buffers[1]; + // convert short to uint8_t, + // interleave audio into single buffer + for(i = 0; i < n_samples; i ++ ) + { + *(audio_buf) = ch0[i] & 0xff; //lo + *(audio_buf+1) = (ch0[i] >> 8) & 0xff; //hi + *(audio_buf+2) = ch1[i] & 0xff; //lo + *(audio_buf+3) = (ch1[i] >> 8) & 0xff; //hi + } + + +} +/* + * Unpack libdv's 4:2:2-packed into our 4:2:0-planar or 4:2:2-planar, + * treating each interlaced field independently + * + */ +static inline void frame_YUV422_to_planar(uint8_t **output, uint8_t *input, + int width, int height, int chroma422) +{ + int i, j, w2; + uint8_t *y, *cb, *cr; + + w2 = width/2; + y = output[0]; + cb = output[1]; + cr = output[2]; + + for (i=0; idecoder, input_buf) < 0) + { + veejay_msg(0, "Unable to read DV header"); + return -1; + } + if( d->decoder->system == e_dv_system_none ) + { + veejay_msg(0, "No valid PAL or NTSC video frame detected"); + return -1; + } + + char sampling[8]; + switch( d->decoder->sampling ) + { + case e_dv_sample_411: + veejay_msg(0, "YUV 4:1:1 not supported."); + return -1; + case e_dv_sample_420: + sprintf(sampling, "4:2:0"); break; + case e_dv_sample_422: + sprintf(sampling, "4:2:2"); break; + case e_dv_sample_none: + veejay_msg(0 ,"No sampling format, cant handle this file (yet)"); + return -1; + default: + veejay_msg(0, "Unknown sampling format in DV file"); + return -1; + } + + veejay_msg( VEEJAY_MSG_DEBUG, "\tDetected DV sampling format %s", sampling ); + + if ( d->decoder->sampling == e_dv_sample_422) + return FMT_422; + if( d->decoder->sampling == e_dv_sample_420 ) + return FMT_420; + return -1; +} + +int vj_dv_decode_frame(vj_dv_decoder *d, uint8_t * input_buf, uint8_t * Y, + uint8_t * Cb, uint8_t * Cr, int width, int height, int fmt) +{ + + int pitches[3]; + if (!input_buf) + return 0; + + if (dv_parse_header(d->decoder, input_buf) < 0) + { + veejay_msg(0, "Unable to read DV header"); + return 0; + } + + if( d->decoder->system == e_dv_system_none ) + { + veejay_msg(0, "No valid PAL or NTSC video frame detected"); + return 0; + } + + if( d->decoder->system == e_dv_system_625_50 ) + { + d->yuy2 = 0; + } + else + { + d->yuy2 = 1; + } + + if (!((d->decoder->num_dif_seqs == 10) + || (d->decoder->num_dif_seqs == 12))) + { + veejay_msg(0, "Dont know how to handle %d dif seqs", + d->decoder->num_dif_seqs ); + return 0; + } +#ifdef STRICT_CHECKING +// if ( d->decoder->sampling == e_dv_sample_420 ) +// assert( d->fmt == FMT_420 || d->fmt == FMT_420F ); +// if ( d->decoder->sampling == e_dv_sample_422 ) +// assert( d->fmt == FMT_422 || d->fmt == FMT_422F ); +#endif + + if ( d->decoder->sampling == e_dv_sample_422) + { + pitches[0] = width * 2; + pitches[1] = 0; + pitches[2] = 0; + uint8_t *pixels[3] = { Y , Cb, Cr }; + + dv_decode_full_frame(d->decoder, input_buf, + e_dv_color_yuv, pixels, pitches); + + frame_YUV422_to_planar( pixels, pixels[0], width, height, fmt ); + + return 1; + } else if( d->decoder->sampling == e_dv_sample_420 ) + { + uint8_t *pixels[3]; + pixels[0] = d->dv_video; + pixels[1] = d->dv_video + (width * height); + pixels[2] = d->dv_video + (width * height * 5)/4; + pitches[0] = width * 2; + pitches[1] = 0; + pitches[2] = 0; + + dv_decode_full_frame( d->decoder, input_buf, e_dv_color_yuv, pixels,pitches); + + if(fmt==FMT_422 || fmt == FMT_422F) + yuy2toyv16( Y,Cb,Cr, d->dv_video, width ,height ); + else //@ FIXME broken! + vj_yuy2toyv12( Y,Cb,Cr, d->dv_video, width, height ); + + return 1; + } + + return 0; +} + +#endif diff --git a/veejay-server/libel/vj-dv.h b/veejay-server/libel/vj-dv.h new file mode 100644 index 00000000..f7bd2ecd --- /dev/null +++ b/veejay-server/libel/vj-dv.h @@ -0,0 +1,61 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#ifndef VJ_DV_H +#define VJ_DV_H +#include +#ifdef SUPPORT_READ_DV2 +#include +typedef struct +{ + dv_decoder_t *decoder; + uint8_t *dv_video; + int fmt; + int yuy2; + int audio; + int16_t **audio_buffers; +} vj_dv_decoder; + +typedef struct +{ + dv_encoder_t *encoder; + uint8_t *dv_video; + int fmt; +} vj_dv_encoder; + + +vj_dv_decoder *vj_dv_decoder_init(int quality,int width, int height, int pixel_format); + +vj_dv_encoder *vj_dv_init_encoder(void * el, int pixel_format); + +void vj_dv_decoder_get_audio(vj_dv_decoder *d, uint8_t *audio_buf); + +int vj_dv_scan_frame( vj_dv_decoder *d, uint8_t * input_buf ); + +void vj_dv_decoder_set_audio(vj_dv_decoder *d, int audio); + + +int vj_dv_decode_frame(vj_dv_decoder *d,uint8_t * in, uint8_t * Y, + uint8_t * Cb, uint8_t * Cr, int w, int h, int fmt); + +int vj_dv_encode_frame(vj_dv_encoder *e,uint8_t * in[3], uint8_t * out); +void vj_dv_free_encoder(vj_dv_encoder *e); +void vj_dv_free_decoder(vj_dv_decoder *d); +int is_dv_resolution( int w, int h ); +#endif +#endif diff --git a/veejay-server/libel/vj-el.c b/veejay-server/libel/vj-el.c new file mode 100644 index 00000000..8b2aabc4 --- /dev/null +++ b/veejay-server/libel/vj-el.c @@ -0,0 +1,2447 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* + + + This file contains code-snippets from the mjpegtools' EditList + (C) The Mjpegtools project + + http://mjpeg.sourceforge.net +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include AVCODEC_INC +#include AVFORMAT_INC +#include +#include +#include +#include +#include +#include +#ifdef SUPPORT_READ_DV2 +#include "rawdv.h" +#include "vj-dv.h" +#endif +#define MAX_CODECS 50 +#define CODEC_ID_YUV420 999 +#define CODEC_ID_YUV422 998 +#define CODEC_ID_YUVLZO 900 +#define DUMMY_FRAMES 2 + +//@@ ! +#ifdef STRICT_CHECKING +#include +#endif +static struct +{ + const char *name; +} _chroma_str[] = +{ + { "Unknown" }, // CHROMAUNKNOWN + { "4:2:0" }, + { "4:2:2" }, + { "4:4:4" }, + { "4:1:1" }, +}; + + +static struct +{ + const char *name; + int id; + int pf; +} _supported_codecs[] = +{ + { "mjpg" , CODEC_ID_MJPEG , 0 }, + { "mjpg" , CODEC_ID_MJPEG , 1 }, + { "mjpb", CODEC_ID_MJPEGB, 0 }, + { "mjpb", CODEC_ID_MJPEGB, 1 }, + { "msmpeg4",CODEC_ID_MPEG4, -1}, + { "fmp4", CODEC_ID_MPEG4, 1}, + { "fmp4", CODEC_ID_MPEG4, 0}, + { "divx" ,CODEC_ID_MSMPEG4V3, -1 }, + { "i420", CODEC_ID_YUV420, -1 }, + { "i422", CODEC_ID_YUV422, -1 }, + { "dmb1", CODEC_ID_MJPEG, 0 }, + { "dmb1", CODEC_ID_MJPEG, 1 }, + { "jpeg", CODEC_ID_MJPEG, 0 }, + { "jpeg", CODEC_ID_MJPEG, 1 }, + { "mjpa", CODEC_ID_MJPEG, 0 }, + { "mjpb", CODEC_ID_MJPEG, 1 }, + { "jfif", CODEC_ID_MJPEG, 0 }, + { "jfif", CODEC_ID_MJPEG, 1 }, + { "png", CODEC_ID_PNG, -1 }, + { "mpng", CODEC_ID_PNG, -1 }, +#if LIBAVCODEC_BUILD > 4680 + { "sp5x", CODEC_ID_SP5X, -1 }, /* sunplus motion jpeg video */ +#endif + { "jpgl", CODEC_ID_MJPEG, 0}, + { "jpgl", CODEC_ID_MJPEG, 1}, + { "dvsd", CODEC_ID_DVVIDEO, -1}, + { "dvcp", CODEC_ID_DVVIDEO, -1}, + { "dv", CODEC_ID_DVVIDEO, -1}, + { "dvhd", CODEC_ID_DVVIDEO, -1}, + { "dvp", CODEC_ID_DVVIDEO, -1}, + { "mp4v", CODEC_ID_MPEG4, -1}, + { "xvid", CODEC_ID_MPEG4, -1}, + { "divx", CODEC_ID_MPEG4, -1}, + { "dxsd", CODEC_ID_MPEG4, -1}, + { "mp4s", CODEC_ID_MPEG4, -1}, + { "m4s2", CODEC_ID_MPEG4, -1}, + { "avc1", CODEC_ID_H264, -1}, + { "h264", CODEC_ID_H264, -1}, + { "x264", CODEC_ID_H264, -1}, + { "davc", CODEC_ID_H264, -1}, + { "div3", CODEC_ID_MSMPEG4V3, -1}, + { "mp43", CODEC_ID_MSMPEG4V3, -1}, + { "mp42", CODEC_ID_MSMPEG4V2, -1}, + { "mpg4", CODEC_ID_MSMPEG4V1, -1}, + { "yuv", CODEC_ID_YUV420, -1}, + { "iyuv", CODEC_ID_YUV420, -1}, + { "i420", CODEC_ID_YUV420, -1}, + { "yv16", CODEC_ID_YUV422, -1}, + { "mlzo", CODEC_ID_YUVLZO, -1}, + { "pict", 0xffff, -1}, + { "hfyu", CODEC_ID_HUFFYUV, -1}, + { "cyuv", CODEC_ID_CYUV, -1}, + { "svq1", CODEC_ID_SVQ1, -1}, + { "svq3", CODEC_ID_SVQ3, -1}, + { "rpza", CODEC_ID_RPZA, -1}, + { NULL , 0, -1}, +}; + +static struct +{ + const char *name; + int id; +} _supported_fourcc[] = +{ + { "mjpg", CODEC_ID_MJPEG }, + { "mjpb", CODEC_ID_MJPEGB }, + { "dmb1", CODEC_ID_MJPEG }, + { "jpeg", CODEC_ID_MJPEG }, + { "mjpa", CODEC_ID_MJPEG }, + { "jfif", CODEC_ID_MJPEG }, + { "png", CODEC_ID_PNG }, + { "mpng", CODEC_ID_PNG }, +#if LIBAVCODEC_BUILD > 4680 + { "sp5x", CODEC_ID_SP5X }, /* sunplus motion jpeg video */ +#endif + { "jpgl", CODEC_ID_MJPEG }, + { "dvsd", CODEC_ID_DVVIDEO}, + { "dv", CODEC_ID_DVVIDEO}, + { "dvhd", CODEC_ID_DVVIDEO}, + { "dvp", CODEC_ID_DVVIDEO}, + { "mp4v", CODEC_ID_MPEG4 }, + { "xvid", CODEC_ID_MPEG4 }, + { "divx", CODEC_ID_MPEG4 }, + { "dxsd", CODEC_ID_MPEG4 }, + { "mp4s", CODEC_ID_MPEG4 }, + { "m4s2", CODEC_ID_MPEG4 }, + { "fmp4", CODEC_ID_MPEG4 }, + { "fmp4", CODEC_ID_MPEG4 }, + { "avc1", CODEC_ID_H264 }, + { "h264", CODEC_ID_H264 }, + { "x264", CODEC_ID_H264 }, + { "davc", CODEC_ID_H264 }, + { "div3", CODEC_ID_MSMPEG4V3 }, + { "divx", CODEC_ID_MPEG4 }, + { "mp43", CODEC_ID_MSMPEG4V3 }, + { "mp42", CODEC_ID_MSMPEG4V2 }, + { "mpg4", CODEC_ID_MSMPEG4V1 }, + { "yuv", CODEC_ID_YUV420 }, + { "iyuv", CODEC_ID_YUV420 }, + { "i420", CODEC_ID_YUV420 }, + { "mlzo", CODEC_ID_YUVLZO }, + { "yv16", CODEC_ID_YUV422 }, + { "pict", 0xffff }, /* invalid fourcc */ + { "hfyu", CODEC_ID_HUFFYUV}, + { "cyuv", CODEC_ID_CYUV }, + { "svq1", CODEC_ID_SVQ1 }, + { "svq3", CODEC_ID_SVQ3 }, + { "rpza", CODEC_ID_RPZA }, + { NULL, 0 } +}; + +static int mmap_size = 0; + +typedef struct +{ + AVCodec *codec; // veejay supports only 2 yuv formats internally + AVFrame *frame; + AVCodecContext *context; + uint8_t *tmp_buffer; + uint8_t *deinterlace_buffer[3]; + VJFrame *img; + int fmt; + int ref; + void *sampler; +} vj_decoder; + +#ifdef SUPPORT_READ_DV2 +static vj_dv_decoder *dv_decoder_ = NULL; +#endif + +static void *lzo_decoder_ = NULL; + +static vj_decoder *el_codecs[MAX_CODECS]; + +static int _el_get_codec(int id, int in_pix_fmt ) +{ + int i; + for( i = 0; _supported_codecs[i].name != NULL ; i ++ ) + { + if( _supported_codecs[i].id == id) + { + if( _supported_codecs[i].pf == -1) { + return i; + } else if ( _supported_codecs[i].pf == 0 && (in_pix_fmt == FMT_420F || in_pix_fmt == FMT_420)) { + return i; + } else if ( _supported_codecs[i].pf == 1 && (in_pix_fmt == FMT_422F || in_pix_fmt == FMT_422)) { + return i; + } + } + } + return -1; +} +static int _el_get_codec_id( const char *fourcc ) +{ + int i; + for( i = 0; _supported_fourcc[i].name != NULL ; i ++ ) + if( strncasecmp( fourcc, _supported_fourcc[i].name, strlen(_supported_fourcc[i].name) ) == 0 ) + return _supported_fourcc[i].id; + return -1; +} + +int vj_el_get_decoder_from_fourcc( const char *fourcc ) +{ + return _el_get_codec_id( fourcc ); +} + +static void _el_free_decoder( vj_decoder *d ) +{ + if(d) + { + if(d->tmp_buffer) + free( d->tmp_buffer ); + if(d->deinterlace_buffer[0]) + free(d->deinterlace_buffer[0]); + + if(d->context) + { + avcodec_close( d->context ); + free( d->context ); + d->context = NULL; + } + if(d->frame) + free(d->frame); + + if(d->sampler) + subsample_free(d->sampler); + + if(d->img) + free(d->img); + + free(d); + } + d = NULL; +} +#define LARGE_NUM (256*256*256*64) +/* +static int get_buffer(AVCodecContext *context, AVFrame *av_frame){ + vj_decoder *this = (vj_decoder *)context->opaque; + int width = context->width; + int height = context->height; + VJFrame *img = this->img; + avcodec_align_dimensions(context, &width, &height); + + av_frame->opaque = img; + + av_frame->data[0]= img->data[0]; + av_frame->data[1]= img->data[1]; + av_frame->data[2]= img->data[2]; + + av_frame->linesize[0] = img->width; + av_frame->linesize[1] = img->uv_width; + av_frame->linesize[2] = img->uv_width; + + av_frame->age = LARGE_NUM; + + av_frame->type= FF_BUFFER_TYPE_USER; + + return 0; +} +static void release_buffer(struct AVCodecContext *context, AVFrame *av_frame){ + VJFrame *img = (VJFrame*)av_frame->opaque; + av_frame->opaque = NULL; +}*/ + +static int el_pixel_format_ = 1; +static int el_len_ = 0; +static int el_uv_len_ = 0; +static int el_uv_wid_ = 0; +static int mem_chunk_ = 0; +void vj_el_init_chunk(int size) +{ +//@@ chunk size per editlist + mem_chunk_ = 1024 * size; +} +void vj_el_init(int pf) +{ + int i; + for( i = 0; i < MAX_CODECS ;i ++ ) + el_codecs[i] = NULL; + el_pixel_format_ =pf; +#ifdef STRICT_CHECKING + assert( pf == FMT_420 || pf == FMT_420F || pf == FMT_422 || pf == FMT_422F ); +#endif +} + +int vj_el_is_dv(editlist *el) +{ +#ifdef SUPPORT_READ_DV2 + return is_dv_resolution(el->video_width, el->video_height); +#else + return 0; +#endif +} + + +void vj_el_prepare() +{ +// reset_cache( el->cache ); +} + +void vj_el_break_cache( editlist *el ) +{ + if(el) { + if( el->cache ) + free_cache( el->cache ); + el->cache = NULL; + } +} + +static int never_cache_ = 0; +void vj_el_set_caching(int status) +{ + never_cache_ = status; +} + +//@ iterateovers over sample fx chain +void vj_el_setup_cache( editlist *el ) +{ +//@ FIXME: user setting to prevent cache setup! + if(!el->cache && !never_cache_) + { + int n_slots = mem_chunk_ / el->max_frame_size; +// if( n_slots < (el->video_frames - 1) ) + if( n_slots < el->total_frames ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Not caching this EDL to memory (Cachesize too small)"); + veejay_msg(VEEJAY_MSG_DEBUG, "try increasing cache size with -m commandline parameter"); + } + else if( el->max_frame_size > 1024 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "EditList caches at most %d slots (chunk=%d, framesize=%d)", n_slots, mem_chunk_, el->max_frame_size ); + el->cache = init_cache( n_slots ); + } + } +} + +void vj_el_clear_cache( editlist *el ) +{ + if(el->cache) + reset_cache(el->cache); +} + +void vj_el_deinit() +{ + int i; + for( i = 0; i < MAX_CODECS ;i ++ ) + { + if( el_codecs[i] ) + _el_free_decoder( el_codecs[i] ); + } +} + +int vj_el_cache_size() +{ + return cache_avail_mb(); +} + +//@ pixel_format = input pixel format FIXME +vj_decoder *_el_new_decoder( int id , int width, int height, float fps, int pixel_format, int out_fmt) +{ + vj_decoder *d = (vj_decoder*) vj_calloc(sizeof(vj_decoder)); + if(!d) + return NULL; + +#ifdef SUPPORT_READ_DV2 + if( id == CODEC_ID_DVVIDEO ) + dv_decoder_ = vj_dv_decoder_init(1, width, height, pixel_format ); +#endif + if( id == CODEC_ID_YUVLZO ) + { + lzo_decoder_ = lzo_new(); + d->sampler = subsample_init( width ); + } else if( id != CODEC_ID_YUV422 && id != CODEC_ID_YUV420 ) + { + d->codec = avcodec_find_decoder( id ); + d->context = avcodec_alloc_context(); + d->context->width = width; + d->context->height = height; + d->context->opaque = d; + d->context->palctrl = NULL; + d->frame = avcodec_alloc_frame(); + d->img = (VJFrame*) vj_calloc(sizeof(VJFrame)); + d->img->width = width; + if ( avcodec_open( d->context, d->codec ) < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error initializing decoder %d",id); + _el_free_decoder( d ); + return NULL; + } + } + + d->tmp_buffer = (uint8_t*) vj_malloc(sizeof(uint8_t) * width * height * 4 ); + if(!d->tmp_buffer) + { + free(d); + return NULL; + } + d->fmt = id; + veejay_memset( d->tmp_buffer, 0, width * height * 4 ); + + d->deinterlace_buffer[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * width * height * 3); + if(!d->deinterlace_buffer[0]) { if(d) free(d); return NULL; } + + d->deinterlace_buffer[1] = d->deinterlace_buffer[0] + (width * height ); + d->deinterlace_buffer[2] = d->deinterlace_buffer[0] + (2 * width * height ); + + veejay_memset( d->deinterlace_buffer[0], 0, width * height * 3 ); + + return d; +} + +void vj_el_set_image_output_size(editlist *el, int dw, int dh, float fps, int pf) +{ + if( el->video_width <= 0 || el->video_height <= 0 ) + lav_set_project( dw,dh, fps, pf ); + else + lav_set_project( + el->video_width, el->video_height, el->video_fps , el_pixel_format_ ); + +} + +static int _el_probe_for_pixel_fmt( lav_file_t *fd ) +{ +// int old = lav_video_cmodel( fd ); + + int new = test_video_frame( fd, el_pixel_format_ ); + + switch(new) + { + case FMT_420: + veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: YUV Planar 4:2:0 [16-235][16-240]"); + break; + case FMT_422: + veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: YUV Planar 4:2:2 [16-235][16-240]"); + break; + case FMT_420F: + veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: YUV Planar 4:2:0 [JPEG full range]"); + break; + case FMT_422F: + veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: YUV Planar 4:2:2 [JPEG full range]"); + break; + } + + return new; +} + +int get_ffmpeg_pixfmt( int pf ) +{ + switch( pf ) + { + case FMT_420: + return PIX_FMT_YUV420P; + case FMT_422: + return PIX_FMT_YUV422P; + case FMT_420F: + return PIX_FMT_YUVJ420P; + case FMT_422F: + return PIX_FMT_YUVJ422P; + case 4: + return PIX_FMT_YUV444P; + + } + return PIX_FMT_YUV422P; +} +int get_ffmpeg_shift_size(int fmt) +{ + switch(fmt) + { + case FMT_420: + case FMT_420F: + return 1; + case FMT_422: + case FMT_422F: + return 0; + case 4: + return 0; + default: + break; + } + return 0; +} + + +int open_video_file(char *filename, editlist * el, int preserve_pathname, int deinter, int force, char override_norm) +{ + int i, n, nerr; + int chroma=0; + int _fc; + int decoder_id = 0; + const char *compr_type; + int pix_fmt = -1; + char *realname = NULL; + + if( filename == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "No files to open!"); + return -1; + } + + if (preserve_pathname) + realname = strdup(filename); + else + realname = canonicalize_file_name( filename ); + + if(realname == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot get full path of '%s'", filename); + return -1; + } + + for (i = 0; i < el->num_video_files; i++) + { + if (strncmp(realname, el->video_file_list[i], strlen( el->video_file_list[i])) == 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "File %s already in editlist", realname); + if(realname) free(realname); + return i; + } + } + + if (el->num_video_files >= MAX_EDIT_LIST_FILES) + { + // mjpeg_error_exit1("Maximum number of video files exceeded"); + veejay_msg(VEEJAY_MSG_ERROR,"Maximum number of video files exceeded\n"); + if(realname) free(realname); + return -1; + } + + if (el->num_video_files >= 1) + chroma = el->MJPG_chroma; + + int in_pixel_format = detect_pixel_format_with_ffmpeg( filename ); + + + n = el->num_video_files; + lav_file_t *elfd = lav_open_input_file(filename,mmap_size ); + + el->lav_fd[n] = NULL; + + if (elfd == NULL) + { + veejay_msg(VEEJAY_MSG_ERROR,"Error loading videofile '%s'", realname); + veejay_msg(VEEJAY_MSG_ERROR,"%s",lav_strerror()); + if(realname) free(realname); + return -1; + } + + if(lav_video_frames(elfd) < 2) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cowardly refusing to load video files that contain less than 2 frames"); + if(realname) free(realname); + lav_close(elfd); + return -1; + } + + + _fc = lav_video_MJPG_chroma(elfd); +#ifdef STRICT_CHECKING + if( in_pixel_format >= 0 ) + { + if ( _fc == CHROMA422 ) + assert( (in_pixel_format == FMT_422 || in_pixel_format == FMT_422F ) ); + if ( _fc == CHROMA420 ) + assert( (in_pixel_format == FMT_420 || in_pixel_format == FMT_420F ) ); + } +#endif + + if( !(_fc == CHROMA422 || _fc == CHROMA420 || _fc == CHROMA444 || _fc == CHROMAUNKNOWN || _fc == CHROMA411 )) + { + veejay_msg(VEEJAY_MSG_ERROR,"Input file %s is not in a valid format (%d)",filename,_fc); + if(realname) free(realname); + lav_close( elfd ); + return -1; + + } + + if(chroma == CHROMAUNKNOWN) + { /* set chroma */ + el->MJPG_chroma = _fc; + chroma = _fc; + } + + pix_fmt = _el_probe_for_pixel_fmt( elfd ); +#ifdef STRICT_CHECKING + if( in_pixel_format >= 0 ) + assert( pix_fmt == in_pixel_format ); +#endif + + if(pix_fmt < 0 && in_pixel_format < 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to determine pixel format"); + if(elfd) lav_close( elfd ); + if(realname) free(realname); + return -1; + } + + if( pix_fmt < 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING, "(!) Using pixelformat detected by FFmpeg (fallback)"); + pix_fmt = in_pixel_format; + } + + el->yuv_taste[n] = pix_fmt; + el->lav_fd[n] = elfd; + el->num_frames[n] = lav_video_frames(el->lav_fd[n]); + el->video_file_list[n] = strndup(realname, strlen(realname)); + + /* Debug Output */ + if(n == 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG,"\tFull name: %s", filename, realname); + veejay_msg(VEEJAY_MSG_DEBUG,"\tFrames: %ld", lav_video_frames(el->lav_fd[n])); + veejay_msg(VEEJAY_MSG_DEBUG,"\tWidth: %d", lav_video_width(el->lav_fd[n])); + veejay_msg(VEEJAY_MSG_DEBUG,"\tHeight: %d", lav_video_height(el->lav_fd[n])); + + const char *int_msg; + switch (lav_video_interlacing(el->lav_fd[n])) + { + case LAV_NOT_INTERLACED: + int_msg = "Not interlaced"; + break; + case LAV_INTER_TOP_FIRST: + int_msg = "Top field first"; + break; + case LAV_INTER_BOTTOM_FIRST: + int_msg = "Bottom field first"; + break; + default: + int_msg = "Unknown!"; + break; + } + + if( deinter == 1 && (lav_video_interlacing(el->lav_fd[n]) != LAV_NOT_INTERLACED)) + el->auto_deinter = 1; + + veejay_msg(VEEJAY_MSG_DEBUG,"\tInterlacing: %s", int_msg); + veejay_msg(VEEJAY_MSG_DEBUG,"\tFrames/sec: %f", lav_frame_rate(el->lav_fd[n])); + veejay_msg(VEEJAY_MSG_DEBUG,"\tSampling format: %s", _chroma_str[ lav_video_MJPG_chroma(el->lav_fd[n])].name); + veejay_msg(VEEJAY_MSG_DEBUG,"\tFOURCC: %s",lav_video_compressor(el->lav_fd[n])); + veejay_msg(VEEJAY_MSG_DEBUG,"\tAudio samps: %ld", lav_audio_clips(el->lav_fd[n])); + veejay_msg(VEEJAY_MSG_DEBUG,"\tAudio chans: %d", lav_audio_channels(el->lav_fd[n])); + veejay_msg(VEEJAY_MSG_DEBUG,"\tAudio bits: %d", lav_audio_bits(el->lav_fd[n])); + veejay_msg(VEEJAY_MSG_DEBUG,"\tAudio rate: %ld", lav_audio_rate(el->lav_fd[n])); + } + else + { + veejay_msg(VEEJAY_MSG_DEBUG, "\tFull name %s",realname); + veejay_msg(VEEJAY_MSG_DEBUG, "\tFrames %d", lav_video_frames(el->lav_fd[n])); + veejay_msg(VEEJAY_MSG_DEBUG, "\tDecodes into %s", _chroma_str[ lav_video_MJPG_chroma( el->lav_fd[n]) ]); + } + + nerr = 0; + if (n == 0) { + /* First file determines parameters */ + if(el->is_empty) + { /* Dummy determines parameters */ + if(el->video_height != lav_video_height(el->lav_fd[n])) + nerr++; + if(el->video_width != lav_video_width(el->lav_fd[n])) + nerr++; + } + else + { + el->video_height = lav_video_height(el->lav_fd[n]); + el->video_width = lav_video_width(el->lav_fd[n]); + el->video_inter = lav_video_interlacing(el->lav_fd[n]); + el->video_fps = lav_frame_rate(el->lav_fd[n]); + } + lav_video_clipaspect(el->lav_fd[n], + &el->video_sar_width, + &el->video_sar_height); + + if (!el->video_norm) + { + /* TODO: This guessing here is a bit dubious but it can be over-ridden */ + if (el->video_fps > 24.95 && el->video_fps < 25.05) + el->video_norm = 'p'; + else if (el->video_fps > 29.92 && el->video_fps <= 30.02) + el->video_norm = 'n'; + } + + if (!el->video_norm) + { + if(override_norm == 'p' || override_norm == 'n') + el->video_norm = override_norm; + else + { + veejay_msg(VEEJAY_MSG_ERROR, + "Invalid video norm - override with -N / --norm"); + nerr++; + } + } + + if(!el->is_empty) + { + el->audio_chans = lav_audio_channels(el->lav_fd[n]); + if (el->audio_chans > 2) { + veejay_msg(VEEJAY_MSG_ERROR, "File %s has %d audio channels - cant play that!", + filename,el->audio_chans); + nerr++; + } + + el->has_audio = (el->audio_chans == 0 ? 0: 1); + el->audio_bits = lav_audio_bits(el->lav_fd[n]); + el->audio_rate = lav_audio_rate(el->lav_fd[n]); + el->audio_bps = (el->audio_bits * el->audio_chans + 7) / 8; + } + else + { + if(lav_audio_channels(el->lav_fd[n]) != el->audio_chans || + lav_audio_rate(el->lav_fd[n]) != el->audio_rate || + lav_audio_bits(el->lav_fd[n]) != el->audio_bits ) + nerr++; + else + el->has_audio = 1; + } + } else { + /* All files after first have to match the paramters of the first */ + + if (el->video_height != lav_video_height(el->lav_fd[n]) || + el->video_width != lav_video_width(el->lav_fd[n])) { + veejay_msg(VEEJAY_MSG_ERROR,"File %s: Geometry %dx%d does not match %dx%d.", + filename, lav_video_width(el->lav_fd[n]), + lav_video_height(el->lav_fd[n]), el->video_width, + el->video_height); + nerr++; + + } + if (el->video_inter != lav_video_interlacing(el->lav_fd[n])) { + if(force) + veejay_msg(VEEJAY_MSG_WARNING,"File %s: Interlacing is %d should be %d", + filename, lav_video_interlacing(el->lav_fd[n]), + el->video_inter); + else + veejay_msg(VEEJAY_MSG_ERROR, "File %s: Interlacing is %d should be %d", + filename, lav_video_interlacing(el->lav_fd[n]), + el->video_inter); + + + if(!el->auto_deinter) + { + if(force) + { + veejay_msg(VEEJAY_MSG_WARNING, "(Force loading video) Auto deinterlacing enabled"); + el->auto_deinter = 1; + } + else + { + nerr++; + } + } + } + /* give a warning on different fps instead of error , this is better + for live performances */ + if (fabs(el->video_fps - lav_frame_rate(el->lav_fd[n])) > + 0.0000001) { + veejay_msg(VEEJAY_MSG_WARNING,"File %s: fps is %3.2f , but playing at %3.2f", filename, + lav_frame_rate(el->lav_fd[n]), el->video_fps); + } + /* If first file has no audio, we don't care about audio */ + + if (el->has_audio) { + if( el->audio_rate < 44000 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "File %s: Cannot play %d Hz audio. Use at least 44100 Hz or start with -a0", filename, el->audio_rate); + nerr++; + } + else { + if (el->audio_chans != lav_audio_channels(el->lav_fd[n]) || + el->audio_bits != lav_audio_bits(el->lav_fd[n]) || + el->audio_rate != lav_audio_rate(el->lav_fd[n])) { + veejay_msg(VEEJAY_MSG_ERROR,"File %s: Mismatched audio properties: %d channels , %d bit %ld Hz", + filename, lav_audio_channels(el->lav_fd[n]), + lav_audio_bits(el->lav_fd[n]), + lav_audio_rate(el->lav_fd[n]) ); + nerr++; + } + } + } + + + + + if (nerr) { + if(el->lav_fd[n]) + lav_close( el->lav_fd[n] ); + el->lav_fd[n] = NULL; + if(realname) free(realname); + if(el->video_file_list[n]) + free(el->video_file_list[n]); + el->video_file_list[n] = NULL; + return -1; + } + } + + compr_type = (const char*) lav_video_compressor(el->lav_fd[n]); + + if(!compr_type) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot get codec information from lav file"); + if(el->lav_fd[n]) + lav_close( el->lav_fd[n] ); + el->lav_fd[n] = NULL; + if(realname) free(realname); + if(el->video_file_list[n]) + free(el->video_file_list[n]); + el->video_file_list[n] = NULL; + return -1; + } + // initialze a decoder if needed + decoder_id = _el_get_codec_id( compr_type ); + if(decoder_id > 0 && decoder_id != 0xffff) + { + int c_i = _el_get_codec(decoder_id, el->yuv_taste[n] ); + if(c_i == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unsupported codec %s",compr_type); + if( el->lav_fd[n] ) + lav_close( el->lav_fd[n] ); + el->lav_fd[n] = NULL; + if( realname ) free(realname ); + if( el->video_file_list[n]) + free(el->video_file_list[n]); + el->video_file_list[n] = NULL; + return -1; + } + if( el_codecs[c_i] == NULL ) + { + // el_codecs[c_i] = _el_new_decoder( decoder_id, el->video_width, el->video_height, el->video_fps, pix_fmt ); + int ff_pf = get_ffmpeg_pixfmt( el_pixel_format_ ); + el_codecs[c_i] = _el_new_decoder( decoder_id, el->video_width, el->video_height, el->video_fps, el->yuv_taste[ n ],ff_pf ); + if(!el_codecs[c_i]) + { + veejay_msg(VEEJAY_MSG_ERROR,"Cannot initialize %s codec", compr_type); + if( el->lav_fd[n] ) + lav_close( el->lav_fd[n] ); + el->lav_fd[n] = NULL; + if(realname) free(realname); + if( el->video_file_list[n]) + free(el->video_file_list[n]); + el->video_file_list[n] = NULL; + return -1; + } + } + } + + if(decoder_id <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Dont know how to handle %s (fmt %d) %x", compr_type, pix_fmt,decoder_id); + if(realname) free(realname); + if( el->video_file_list[n]) free( el->video_file_list[n] ); + if( el->lav_fd[n] ) + lav_close( el->lav_fd[n]); + el->lav_fd[n] = NULL; + el->video_file_list[n] = NULL; + return -1; + } + + if(realname) + free(realname); + + if(el->is_empty) + { + el->video_frames = el->num_frames[0]; + el->video_frames -= DUMMY_FRAMES; + } + el->is_empty = 0; + el->has_video = 1; + el->num_video_files ++; + el->total_frames = el->video_frames - 1; + return n; +} + +void vj_el_show_formats(void) +{ +#ifdef SUPPORT_READ_DV2 + veejay_msg(VEEJAY_MSG_INFO, + "Video containers: AVI (up to 32gb), RAW DV and Quicktime"); +#else + veejay_msg(VEEJAY_MSG_INFO, + "Video containers: AVI (up to 32gb) and Quicktime"); +#endif + veejay_msg(VEEJAY_MSG_INFO, + "Video fourcc (preferred): mjpg, mjpb, mjpa, dv, dvsd,sp5x,dmb1,dvcp,dvhd, yv16,i420"); + veejay_msg(VEEJAY_MSG_INFO, + "Video codecs (preferred): YV16, I420, Motion Jpeg or Digital Video"); + veejay_msg(VEEJAY_MSG_INFO, + "If the video file is made up out of only I-frames (whole images), you can also decode:"); + veejay_msg(VEEJAY_MSG_INFO, + " mpg4,mp4v,svq3,svq1,rpza,hfyu,mp42,mpg43,davc,div3,x264,h264,avc1,m4s2,divx,xvid"); + veejay_msg(VEEJAY_MSG_INFO, + "Use veejay's internal format YV16 to reduce CPU usage"); + +#ifdef USE_GDK_PIXBUF + veejay_msg(VEEJAY_MSG_INFO, + "Image types supported:"); + vj_picture_display_formats(); +#endif + + + +} + + +static int vj_el_dummy_frame( uint8_t *dst[3], editlist *el ,int pix_fmt) +{ + const int uv_len = (el->video_width * el->video_height) / ( ( (pix_fmt==FMT_422||pix_fmt==FMT_422F) ? 2 : 4)); + const int len = el->video_width * el->video_height; + veejay_memset( dst[0], 16, len ); + veejay_memset( dst[1],128, uv_len ); + veejay_memset( dst[2],128, uv_len ); + return 1; +} + +void vj_el_get_video_fourcc(editlist *el, int num, char *fourcc) +{ + uint64_t n; +// if( num < 0 ) num = 0; else if (num >= el->video_frames ) num = el->video_frames - 1; +#ifdef STRICT_CHECKING + assert( num >= 0 && num <= el->total_frames ); +#else + if (num < 0) + num = 0; + else if (num >= el->video_frames) + num = el->video_frames-1; +#endif + n = el->frame_list[ num ]; + + const char *compr = lav_video_compressor( el->lav_fd[ N_EL_FILE(n) ] ); + snprintf(fourcc,4,"%s", compr ); +} + + +int vj_el_get_file_fourcc(editlist *el, int num, char *fourcc) +{ + if(num >= el->num_video_files) + return 0; + if( fourcc == NULL) + return 0; + + const char *compr = lav_video_compressor( el->lav_fd[num] ); + if(compr == NULL) + return 0; + snprintf(fourcc,4,"%s", compr ); + fourcc[5] = '\0'; + return 1; +} + + +int vj_el_bogus_length( editlist *el, long nframe ) +{ + uint64_t n = 0; + + if( !el->has_video || el->is_empty ) + return 0; + + if( nframe < 0 ) + nframe = 0; + else if (nframe >= el->video_frames ) + nframe = el->video_frames - 1; + + n = el->frame_list[nframe]; + + return lav_bogus_video_length( el->lav_fd[ N_EL_FILE(n) ] ); +} + +int vj_el_set_bogus_length( editlist *el, long nframe, int len ) +{ + uint64_t n = 0; + + if( len <= 0 ) + return 0; + + if( !el->has_video || el->is_empty ) + return 0; +#ifdef STRICT_CHECKING + assert( nframe >= 0 && nframe <= el->total_frames ); +#else + if (nframe < 0) + nframe = 0; + + if (nframe >= el->video_frames) + nframe = el->video_frames-1; + +#endif + + n = el->frame_list[nframe]; + + if( !lav_bogus_video_length( el->lav_fd[N_EL_FILE(n)] ) ) + return 0; + + lav_bogus_set_length( el->lav_fd[N_EL_FILE(n)], len ); + + return 1; +} + +int vj_el_get_video_frame(editlist *el, long nframe, uint8_t *dst[3]) +{ + if( el->has_video == 0 || el->is_empty ) + { + vj_el_dummy_frame( dst, el, el->pixel_format ); + return 2; + } + + int res = 0; + uint64_t n; + int decoder_id =0; + int c_i = 0; + vj_decoder *d = NULL; + int out_pix_fmt = el->pixel_format; + int in_pix_fmt = out_pix_fmt; + +#ifdef STRICT_CHECKING + if( nframe > el->total_frames ) + veejay_msg(0, "Fatal: %ld requested, have only %ld", + nframe, el->total_frames); + assert( nframe >= 0 && nframe < el->video_frames ); +#else + if (nframe < 0) + nframe = 0; + + if (nframe >= el->video_frames) + nframe = el->video_frames-1; + +#endif + n = el->frame_list[nframe]; + + in_pix_fmt = el->yuv_taste[N_EL_FILE(n)]; + + uint8_t *in_cache = NULL; + if(el->cache) + in_cache = get_cached_frame( el->cache, nframe, &res, &decoder_id ); + + if(! in_cache ) + { + res = lav_set_video_position(el->lav_fd[N_EL_FILE(n)], N_EL_FRAME(n)); + decoder_id = lav_video_compressor_type( el->lav_fd[N_EL_FILE(n)] ); + + if (res < 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"Error setting video position: %s", + lav_strerror()); + return -1; + } + } + + if( decoder_id == 0xffff ) + { + VJFrame *srci = lav_get_frame_ptr( el->lav_fd[ N_EL_FILE(n) ] ); + if( srci == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error decoding Image %ld", + N_EL_FRAME(n)); + return -1; + } +#ifdef STRICT_CHECKING + assert( dst[0] != NULL && dst[1] != NULL && dst[2] != NULL ); +#endif + veejay_memcpy( dst[0], srci->data[0], el_len_ ); + veejay_memcpy( dst[1], srci->data[1], el_uv_len_ ); + veejay_memcpy( dst[2], srci->data[2], el_uv_len_ ); + return 1; + } + + c_i = _el_get_codec( decoder_id , in_pix_fmt); + if(c_i >= 0 && c_i < MAX_CODECS && el_codecs[c_i] != NULL) + d = el_codecs[c_i]; + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Choked on decoder %x (%d), slot %d",decoder_id,decoder_id, c_i ); + return -1; + } + + if(!in_cache) + { + if( d == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Codec not initlaized"); + return -1; + } + if(lav_filetype( el->lav_fd[N_EL_FILE(n)] ) != 'x') + { + res = lav_read_frame(el->lav_fd[N_EL_FILE(n)], d->tmp_buffer); + if(res > 0 && el->cache) + cache_frame( el->cache, d->tmp_buffer, res, nframe, decoder_id ); + } + } + + uint8_t *data = ( in_cache == NULL ? d->tmp_buffer: in_cache ); + int inter = 0; + int got_picture = 0; + + switch( decoder_id ) + { + case CODEC_ID_YUV420: + if(out_pix_fmt == FMT_420 || out_pix_fmt == FMT_420F) + { + veejay_memcpy( dst[0], data, el_len_); + veejay_memcpy( dst[1], data+el_len_,el_uv_len_); + veejay_memcpy( dst[2], data+(el_len_+el_uv_len_), el_uv_len_); + } + else + { + VJFrame *srci = yuv_yuv_template( data,data+el_len_,data+el_len_+el_uv_len_,el->video_width, + el->video_height, PIX_FMT_YUV420P ); + VJFrame *dsti = yuv_yuv_template( dst[0],dst[1],dst[2], el->video_width, + el->video_height, get_ffmpeg_pixfmt( out_pix_fmt)); + yuv_convert_any_ac( srci, dsti, srci->format, dsti->format ); + + free(srci); + free(dsti); + } + return 1; + break; + case CODEC_ID_YUV422: + if(out_pix_fmt == FMT_420 || out_pix_fmt == FMT_420F) + { + VJFrame *srci = yuv_yuv_template( data,data+el_len_,data+el_len_+el_uv_len_, el->video_width, + el->video_height, PIX_FMT_YUV422P ); + VJFrame *dsti = yuv_yuv_template( dst[0],dst[1], dst[2], el->video_width, + el->video_height, get_ffmpeg_pixfmt( out_pix_fmt)); + yuv_convert_any_ac( srci,dsti, srci->format, dsti->format ); + free(srci); + free(dsti); + } + else + { + veejay_memcpy( dst[0], data, el_len_); + veejay_memcpy( dst[1], data+el_len_,el_uv_len_); + veejay_memcpy( dst[2], data+el_len_+el_uv_len_, el_uv_len_); + } + return 1; + break; + case CODEC_ID_DVVIDEO: +#ifdef SUPPORT_READ_DV2 + return vj_dv_decode_frame( dv_decoder_, data, dst[0], dst[1], dst[2], el->video_width,el->video_height, + out_pix_fmt); +#else + return 0; +#endif + break; + case CODEC_ID_YUVLZO: + + inter = lzo_decompress( lzo_decoder_, data,res, dst ); + if( inter == 0 ) + return 0; + + if( in_pix_fmt != out_pix_fmt ) + { + if( out_pix_fmt > in_pix_fmt ) + chroma_supersample( SSM_420_422, d->sampler, dst, el->video_width,el->video_height ); + else + chroma_subsample( SSM_420_422, d->sampler, dst, el->video_width,el->video_height ); + } + return inter; + + break; + default: + inter = lav_video_interlacing(el->lav_fd[N_EL_FILE(n)]); + d->img->width = el->video_width; + d->img->uv_width = el->video_width / 2; + d->img->data[0] = dst[0]; + d->img->data[1] = dst[1]; + d->img->data[2] = dst[2]; + + int decode_len = avcodec_decode_video( + d->context, + d->frame, + &got_picture, + data, + res + ); + + if(!got_picture) + { + veejay_msg(0, "Cannot decode frame ,unable to get whole picture"); + return 0; + } + + if( decode_len <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot decode frame"); + return 0; + } + + int dst_fmt = get_ffmpeg_pixfmt( el_pixel_format_ ); + int src_fmt = d->context->pix_fmt; + if(!d->frame->opaque) + { + if( el->auto_deinter && inter != LAV_NOT_INTERLACED) + { + AVPicture pict2; + veejay_memset(&pict2,0,sizeof(AVPicture)); + pict2.data[0] = d->deinterlace_buffer[0]; + pict2.data[1] = d->deinterlace_buffer[1]; + pict2.data[2] = d->deinterlace_buffer[2]; + pict2.linesize[1] = el->video_width >> 1; + pict2.linesize[2] = el->video_width >> 1; + pict2.linesize[0] = el->video_width; + avpicture_deinterlace( + &pict2, + (const AVPicture*) d->frame, + src_fmt, + el->video_width, + el->video_height); + + VJFrame *src1 = yuv_yuv_template( d->deinterlace_buffer[0], + d->deinterlace_buffer[1], d->deinterlace_buffer[2], + el->video_width, el->video_height, + src_fmt ); + VJFrame *dst1 = yuv_yuv_template( dst[0],dst[1],dst[2], + el->video_width, el->video_height, + dst_fmt ); + + + yuv_convert_any3( src1,d->frame->linesize,dst1,src1->format,dst1->format); + + free(src1); + free(dst1); + + } + else + { + VJFrame *src1 = yuv_yuv_template( d->frame->data[0], + d->frame->data[1], d->frame->data[2], + el->video_width,el->video_height, + src_fmt ); + VJFrame *dst1 = yuv_yuv_template( dst[0],dst[1],dst[2], + el->video_width,el->video_height, + dst_fmt ); + + yuv_convert_any3( src1,d->frame->linesize,dst1,src1->format,dst1->format); + free(src1); + free(dst1); + } + } + else + { + dst[0] = d->frame->data[0]; + dst[1] = d->frame->data[1]; + dst[2] = d->frame->data[2]; + } + return 1; + break; + } + + veejay_msg(VEEJAY_MSG_ERROR, "Error decoding frame %ld", nframe); + return 0; +} + +int detect_pixel_format_with_ffmpeg( const char *filename ) +{ + AVCodec *codec = NULL; + AVCodecContext *codec_ctx = NULL; + AVFormatContext *avformat_ctx = NULL; + AVStream *avformat_stream = NULL; + AVInputFormat *av_input_format = NULL; + AVFormatParameters avf; + AVFrame *av_frame = NULL; + AVPacket pkt; + +// int err = av_open_input_file( &avformat_ctx,filename, av_input_format,0,&avf); + int err = av_open_input_file( &avformat_ctx,filename,NULL,0,NULL ); + if(err < 0 ) { + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg: Unable to open %s: %d",filename,err ); + return -1; + } + err = av_find_stream_info( avformat_ctx ); + if(err < 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg: Stream information found in %s",filename); + av_close_input_file( avformat_ctx ); + return -1; + } + av_read_play(avformat_ctx); + + int i,j; + int n = avformat_ctx->nb_streams; + int vi = -1; + + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg: File has %d %s", n, ( n == 1 ? "stream" : "streams") ); + + for( i=0; i < n; i ++ ) + { + if( avformat_ctx->streams[i]->codec ) + { + if( avformat_ctx->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO ) + { + int sup_codec = 0; + for( j = 0; _supported_codecs[j].name != NULL; j ++ ) { + if( avformat_ctx->streams[i]->codec->codec_id == _supported_codecs[j].id ) { + sup_codec = 1; + goto further; + } + } +further: + if( !sup_codec ) { + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg: Unrecognized file %s", + avformat_ctx->streams[i]->codec->codec_name ); + av_close_input_file( avformat_ctx ); + return -1; + } + codec = avcodec_find_decoder( avformat_ctx->streams[i]->codec->codec_id ); + if( codec == NULL ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg: Unable to find decoder for codec %s", + avformat_ctx->streams[i]->codec->codec_name); + av_close_input_file( avformat_ctx ); + return -1; + } + vi = i; + break; + } + } + } + + if( vi == -1 ) { + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg: No video streams found"); + av_close_input_file( avformat_ctx ); + return -1; + } + + codec_ctx = avformat_ctx->streams[vi]->codec; + avformat_stream=avformat_ctx->streams[vi]; + if ( avcodec_open( codec_ctx, codec ) < 0 ) { + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg: Unable to open %s decoder (codec %x)", + codec_ctx->codec_name, codec_ctx->codec_id); + return -1; + } + + veejay_memset( &pkt, 0, sizeof(AVPacket)); + AVFrame *f = avcodec_alloc_frame(); + int input_pix_fmt = -1; + + int got_picture = 0; + while( (av_read_frame(avformat_ctx, &pkt) >= 0 ) ) { + avcodec_decode_video( codec_ctx,f,&got_picture, pkt.data, pkt.size ); + + if( got_picture ) { + break; + } + } + + if(!got_picture) { + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg: Error while reading %s", filename ); + av_free(f); + av_free_packet(&pkt); + avcodec_close( codec_ctx ); + av_close_input_file( avformat_ctx ); + return -1; + } + + veejay_msg(VEEJAY_MSG_DEBUG, "FFmpeg reports Video [%s] %dx%d. Pixel format: %x Has B frames: %s (%s)", + codec_ctx->codec_name, codec_ctx->width,codec_ctx->height, codec_ctx->pix_fmt, + (codec_ctx->has_b_frames ? "Yes" : "No"), filename ); + + av_free_packet(&pkt); + avcodec_close( codec_ctx ); + av_close_input_file( avformat_ctx ); + av_free(f); + + switch( input_pix_fmt ) { + case PIX_FMT_YUV420P: input_pix_fmt = FMT_420; break; + case PIX_FMT_YUV422P: input_pix_fmt = FMT_422; break; + case PIX_FMT_YUVJ420P: input_pix_fmt = FMT_420F; break; + case PIX_FMT_YUVJ422P: input_pix_fmt = FMT_422F; break; + } + + return input_pix_fmt; +} + +int test_video_frame( lav_file_t *lav,int out_pix_fmt) +{ + int in_pix_fmt = 0; + + int res = lav_set_video_position( lav, 0); + if( res < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error setting frame 0: %s", lav_strerror()); + return -1; + } + + int decoder_id = lav_video_compressor_type( lav ); + + if( decoder_id < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot play that file, unsupported codec"); + return -1; + } + + if(lav_filetype( lav ) == 'x') + { + veejay_msg(VEEJAY_MSG_INFO,"\tFile is an image"); + return out_pix_fmt; + } + + switch( lav->MJPG_chroma ) + { + case CHROMA420: + in_pix_fmt = FMT_420; break; + case CHROMA422: + case CHROMA411: + in_pix_fmt = FMT_422; break; + default: + veejay_msg(0 ,"Unsupported pixel format"); + break; + } + vj_decoder *d = _el_new_decoder( + decoder_id, + lav_video_width( lav), + lav_video_height( lav), + (float) lav_frame_rate( lav ), + in_pix_fmt, + out_pix_fmt ); + + if(!d) + { + veejay_msg(VEEJAY_MSG_ERROR, "Choked on decoder %x", decoder_id); + return -1; + } + + res = lav_read_frame( lav, d->tmp_buffer); + + if( res <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error reading frame: %s", lav_strerror()); + _el_free_decoder( d ); + return -1; + } + + int got_picture = 0; + int ret = -1; + int len = 0; + switch( decoder_id ) + { + case CODEC_ID_YUV420: + if( out_pix_fmt == FMT_422 ) { + ret = FMT_420; + } else if( out_pix_fmt == FMT_420 ) { + ret = FMT_420; + } else if( out_pix_fmt == FMT_422F ) { + ret = FMT_420F; + } else + ret = FMT_420F; + break; + case CODEC_ID_YUV422: + if( out_pix_fmt == FMT_422 ) { + ret = FMT_422; + } else if( out_pix_fmt == FMT_420 ) { + ret = FMT_422; + } else if( out_pix_fmt == FMT_420F ) { + ret = FMT_422F; + } else + ret = FMT_422F; + break; + case CODEC_ID_DVVIDEO: +#ifdef SUPPORT_READ_DV2 + ret = vj_dv_scan_frame( dv_decoder_, d->tmp_buffer ); + if( ret == FMT_420 || ret == FMT_420F ) + lav->MJPG_chroma = CHROMA420; + else + lav->MJPG_chroma = CHROMA422; +#endif + break; + case CODEC_ID_YUVLZO: + ret = FMT_422; + if ( in_pix_fmt != ret ) + { + //@ correct chroma + if( ret == FMT_420 || ret == FMT_420F ) + lav->MJPG_chroma = CHROMA420; + else + lav->MJPG_chroma = CHROMA422; + } + + break; + default: + + len = avcodec_decode_video( + d->context, + d->frame, + &got_picture, + d->tmp_buffer, + res + ); + + if(!got_picture || len <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to get whole picture"); + ret = -1; + } + else + switch( d->context->pix_fmt ) + { + case PIX_FMT_YUV420P: ret = FMT_420; break; + case PIX_FMT_YUV422P: ret = FMT_422; break; + case PIX_FMT_YUVJ420P:ret = FMT_420F;break; + case PIX_FMT_YUVJ422P:ret = FMT_422F;break; + default: + ret= d->context->pix_fmt; + break; + } + + break; + + } + + _el_free_decoder( d ); + + return ret; +} + + + +int vj_el_get_audio_frame(editlist *el, uint32_t nframe, uint8_t *dst) +{ + long pos, asize; + int ret = 0; + uint64_t n; + int ns0, ns1; + + if(el->is_empty) + { + int ns = el->audio_rate / el->video_fps; + veejay_memset( dst, 0, sizeof(uint8_t) * ns * el->audio_bps ); + return 1; + } + + if (!el->has_audio) + return 0; +#ifdef STRICT_CHECKING + assert( nframe >= 0 && nframe < el->video_frames ); +#else + if (nframe < 0) + nframe = 0; + + if (nframe >= el->video_frames) + nframe = el->video_frames-1; + +#endif + + n = el->frame_list[nframe]; + + /*if( lav_is_DV( el->lav_fd[N_EL_FILE(n)] ) ) + { + lav_set_video_position( el->lav_fd[N_EL_FILE(n)] , nframe ); + return lav_read_audio( el->lav_fd[N_EL_FILE(n)], dst, 0 ); + }*/ + + ns1 = (double) (N_EL_FRAME(n) + 1) * el->audio_rate / el->video_fps; + ns0 = (double) N_EL_FRAME(n) * el->audio_rate / el->video_fps; + + //asize = el->audio_rate / el->video_fps; + pos = nframe * asize; + + ret = lav_set_audio_position(el->lav_fd[N_EL_FILE(n)], ns0); + + if (ret < 0) + { + veejay_msg(0,"Unable to seek to frame position %ld", ns0); + return -1; + } + //mlt need int16_t + ret = lav_read_audio(el->lav_fd[N_EL_FILE(n)], dst, (ns1 - ns0)); + if (ret < 0) + return -1; + return (ns1 - ns0); + +} + +int vj_el_init_420_frame(editlist *el, VJFrame *frame) +{ + if(!el) return 0; + frame->data[0] = NULL; + frame->data[1] = NULL; + frame->data[2] = NULL; + frame->uv_len = (el->video_width>>1) * (el->video_height>>1); + frame->uv_width = el->video_width >> 1; + frame->uv_height = el->video_height >> 1; + frame->len = el->video_width * el->video_height; + frame->shift_v = 1; + frame->shift_h = 1; + frame->width = el->video_width; + frame->height = el->video_height; + frame->ssm = 0; + frame->stride[0] = el->video_width; + frame->stride[1] = frame->stride[2] = frame->stride[0]/2; + frame->format = el_pixel_format_; + return 1; +} + + +int vj_el_init_422_frame(editlist *el, VJFrame *frame) +{ + if(!el) return 0; + frame->data[0] = NULL; + frame->data[1] = NULL; + frame->data[2] = NULL; + frame->uv_len = (el->video_width>>1) * (el->video_height); + frame->uv_width = el->video_width >> 1; + frame->uv_height = el->video_height; + frame->len = el->video_width * el->video_height; + frame->shift_v = 0; + frame->shift_h = 1; + frame->width = el->video_width; + frame->height = el->video_height; + frame->ssm = 0; + frame->stride[0] = el->video_width; + frame->stride[1] = frame->stride[2] = frame->stride[0]/2; + frame->format = el_pixel_format_; + return 1; +} + +int vj_el_get_audio_frame_at(editlist *el, uint32_t nframe, uint8_t *dst, int num ) +{ + // get audio from current frame + n frames + long pos, asize; + int ret = 0; + uint64_t n; + int ns0, ns1; + + if (!el->has_audio) + return 0; + + if (!el->has_video) + { + int size = el->audio_rate / el->video_fps * el->audio_bps; + veejay_memset(dst,0,size); + return size; + } +#ifdef STRICT_CHECKING + assert( nframe >= 0 && nframe < el->video_frames ); +#else + if (nframe < 0) + nframe = 0; + + if (nframe >= el->video_frames) + nframe = el->video_frames-1; + +#endif + + n = el->frame_list[nframe]; + + ns1 = (double) (N_EL_FRAME(n) + num) * el->audio_rate / el->video_fps; + ns0 = (double) N_EL_FRAME(n) * el->audio_rate / el->video_fps; + + //asize = el->audio_rate / el->video_fps; + pos = nframe * asize; + ret = lav_set_audio_position(el->lav_fd[N_EL_FILE(n)], ns0); + + if (ret < 0) + return -1; + + //mlt need int16_t + ret = lav_read_audio(el->lav_fd[N_EL_FILE(n)], dst, (ns1 - ns0)); + if (ret < 0) + return -1; + + return (ns1 - ns0); + +} + + +editlist *vj_el_dummy(int flags, int deinterlace, int chroma, char norm, int width, int height, float fps, int fmt) +{ + editlist *el = vj_calloc(sizeof(editlist)); + if(!el) return NULL; + el->MJPG_chroma = chroma; + el->video_norm = norm; + el->is_empty = 1; + el->is_clone = 1; + el->has_audio = 0; + el->audio_rate = 0; + el->audio_bits = 0; + el->audio_bps = 0; + el->audio_chans = 0; + el->num_video_files = 0; + el->video_width = width; + el->video_height = height; + el->video_frames = DUMMY_FRAMES; /* veejay needs at least 2 frames (play and queue next)*/ + el->total_frames = DUMMY_FRAMES-1; + el->video_fps = fps; + el->video_inter = LAV_NOT_INTERLACED; + + /* output pixel format */ + if( fmt == -1 ) + el->pixel_format = el_pixel_format_; + + el->pixel_format = fmt; + + el->auto_deinter = deinterlace; + el->max_frame_size = width*height*3; + el->last_afile = -1; + el->last_apos = 0; + el->frame_list = NULL; + el->has_video = 0; + el->cache = NULL; + el_len_ = el->video_width * el->video_height; + el_uv_len_ = el_len_; + + switch(fmt) + { + case FMT_420: + case FMT_420F: + el_uv_len_ = el_len_ / 4; + el_uv_wid_ = el->video_width/2; + break; + case FMT_422: + case FMT_422F: + el_uv_len_ = el_len_ / 2; + el_uv_wid_ = el->video_width; + break; + } + + return el; +} + +editlist *vj_el_init_with_args(char **filename, int num_files, int flags, int deinterlace, int force ,char norm , int fmt) +{ + editlist *el = vj_calloc(sizeof(editlist)); + FILE *fd; + char line[1024]; + uint64_t index_list[MAX_EDIT_LIST_FILES]; + int num_list_files; + long i,nf=0; + int n1=0; + int n2=0; + long nl=0; + uint64_t n =0; + bzero(line,1024); + if(!el) return NULL; + veejay_memset( el, 0, sizeof(editlist) ); + + el->has_video = 1; //assume we get it + el->MJPG_chroma = CHROMA420; + /* Check if a norm parameter is present */ + if(!filename[0] || filename == NULL) + { + veejay_msg(VEEJAY_MSG_ERROR,"\tInvalid filename given"); + vj_el_free(el); + return NULL; + } + + if (strcmp(filename[0], "+p") == 0 || strcmp(filename[0], "+n") == 0) + { + el->video_norm = filename[0][1]; + nf = 1; + veejay_msg(VEEJAY_MSG_DEBUG,"Norm set to %s", el->video_norm == 'n' ? "NTSC" : "PAL"); + } + + if(force) + { + veejay_msg(VEEJAY_MSG_WARNING, "Forcing load on interlacing and gop_size"); + } + + for (; nf < num_files; nf++) + { + /* Check if file really exists, is mounted etc... */ + struct stat fileinfo; + if(stat( filename[nf], &fileinfo)!= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to access file '%s'",filename[nf] ); + vj_el_free(el); + return NULL; + } + fd = fopen(filename[nf], "r"); + if (fd <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"Error opening %s:", filename[nf]); + vj_el_free(el); + return NULL; + } + + fgets(line, 1024, fd); + if (strcmp(line, "LAV Edit List\n") == 0) + { + /* Ok, it is a edit list */ + veejay_msg(VEEJAY_MSG_DEBUG, "Edit list %s opened", filename[nf]); + /* Read second line: Video norm */ + fgets(line, 1024, fd); + if (line[0] != 'N' && line[0] != 'n' && line[0] != 'P' && line[0] != 'p') + { + veejay_msg(VEEJAY_MSG_ERROR,"Edit list second line is not NTSC/PAL"); + vj_el_free(el); + return NULL; + } + veejay_msg(VEEJAY_MSG_DEBUG,"Edit list norm is %s", line[0] =='N' || line[0] == 'n' ? "NTSC" : "PAL" ); + if (line[0] == 'N' || line[0] == 'n') + { + if (el->video_norm == 'p') + { + veejay_msg(VEEJAY_MSG_WARNING, "Norm already set to PAL, ignoring new norm 'NTSC'"); + } + else el->video_norm = 'n'; + } + else + { + if (el->video_norm == 'n') + { + veejay_msg(VEEJAY_MSG_WARNING,"Norm allready set to NTSC, ignoring new norm PAL"); + } + else + el->video_norm = 'p'; + } + /* read third line: Number of files */ + fgets(line, 1024, fd); + sscanf(line, "%d", &num_list_files); + + veejay_msg(VEEJAY_MSG_DEBUG, "Edit list contains %d files", num_list_files); + /* read files */ + + for (i = 0; i < num_list_files; i++) + { + fgets(line, 1024, fd); + n = strlen(line); + + if (line[n - 1] != '\n') + { + veejay_msg(VEEJAY_MSG_ERROR, "Filename in edit list too long"); + vj_el_free(el); + return NULL; + } + + line[n - 1] = 0; /* Get rid of \n at end */ + + index_list[i] = + open_video_file(line, el, flags, deinterlace,force,norm); + + if(index_list[i]< 0) + { + vj_el_free(el); + return NULL; + } + + /* el->frame_list = (uint64_t *) realloc(el->frame_list, + (el->video_frames + + el->num_frames[i]) * + sizeof(uint64_t)); + if (el->frame_list==NULL) + { + veejay_msg(VEEJAY_MSG_ERROR, "Insufficient memory to allocate frame_list"); + vj_el_free(el); + return NULL; + } + + long x = el->num_frames[i] + el->total_frames; + long j; + for (j = el->video_frames; j < x; j++) + { + el->frame_list[el->video_frames] = EL_ENTRY(n, j); + el->video_frames++; + }*/ + + + } + + /* Read edit list entries */ + + while (fgets(line, 1024, fd)) + { + if (line[0] != ':') + { /* ignore lines starting with a : */ + sscanf(line, "%ld %d %d", &nl, &n1, &n2); + + if (nl < 0 || nl >= num_list_files) + { + veejay_msg(VEEJAY_MSG_ERROR,"Wrong file number in edit list entry"); + vj_el_free(el); + return NULL; + } + if (n1 < 0) + n1 = 0; + if (n2 >= el->num_frames[index_list[nl]]) + n2 = el->num_frames[index_list[nl]]; + if (n2 < n1) + continue; + + el->frame_list = (uint64_t *) realloc(el->frame_list, + (el->video_frames + + n2 - n1 + + 1) * sizeof(uint64_t)); + + if (el->frame_list==NULL) + { + veejay_msg(VEEJAY_MSG_ERROR, "Insufficient memory to allocate frame_list"); + vj_el_free(el); + return NULL; + } + + + for (i = n1; i <= n2; i++) + { + el->frame_list[el->video_frames] = EL_ENTRY( index_list[ nl], i); + + el->video_frames++; + } + } + } /* done reading editlist entries */ + fclose(fd); + } + else + { + /* Not an edit list - should be a ordinary video file */ + fclose(fd); + + n = open_video_file(filename[nf], el, flags, deinterlace,force,norm); + if(n >= 0 ) + { + el->frame_list = (uint64_t *) realloc(el->frame_list, + (el->video_frames + + el->num_frames[n]) * + sizeof(uint64_t)); + if (el->frame_list==NULL) + { + veejay_msg(VEEJAY_MSG_ERROR, "Insufficient memory to allocate frame_list"); + vj_el_free(el); + return NULL; + } + + for (i = 0; i < el->num_frames[n]; i++) + { + el->frame_list[el->video_frames] = EL_ENTRY(n, i); + el->video_frames++; + } + } + } + } + + if( el->num_video_files == 0 || + el->video_width == 0 || el->video_height == 0 || el->video_frames < 2) + { + if( el->video_frames < 2 ) { + veejay_msg(VEEJAY_MSG_ERROR, "\tFile has only %d frame(s)", el->video_frames ); + vj_el_free(el); return NULL; + } + if( el->num_video_files == 0 ) { + veejay_msg(VEEJAY_MSG_ERROR, "\tNo videofiles in EDL"); + vj_el_free(el); return NULL; + } + if( el->video_height == 0 || el->video_width == 0 ) { + veejay_msg(VEEJAY_MSG_ERROR, "\tImage dimensions unknown"); + vj_el_free(el); return NULL; + } + vj_el_free(el); + return NULL; + } + + /* do we have anything? */ + + /* Calculate maximum frame size */ + + for (i = 0; i < el->video_frames; i++) + { + n = el->frame_list[i]; + if(!el->lav_fd[N_EL_FILE(n)] ) + { + veejay_msg(VEEJAY_MSG_ERROR, "\tUnable to read file"); + vj_el_free(el); + return NULL; + } + if (lav_frame_size(el->lav_fd[N_EL_FILE(n)], N_EL_FRAME(n)) > + el->max_frame_size) + el->max_frame_size = + lav_frame_size(el->lav_fd[N_EL_FILE(n)], N_EL_FRAME(n)); + + + } + + /* Pick a pixel format */ + + el->pixel_format = el_pixel_format_; + + /* Help for audio positioning */ + + el->last_afile = -1; + + + //el->auto_deinter = auto_deinter; + //if(el->video_inter != 0 ) el->auto_deinter = 0; + el->auto_deinter = 0; + el->total_frames = el->video_frames - 1; + + el_len_ = el->video_width * el->video_height; + el_uv_len_ = el_len_; + + switch( el_pixel_format_ ) + { + case FMT_420: + case FMT_420F: + el_uv_len_ = el_len_ / 4; + el_uv_wid_ = el->video_width/2; + break; + case FMT_422: + case FMT_422F: + el_uv_len_ = el_len_ / 2; + el_uv_wid_ = el->video_width; + break; + } + + return el; +} + + +void vj_el_free(editlist *el) +{ + if(!el) + return; + + int i; + if(el->is_clone) + { + for( i = 0; i < el->num_video_files; i ++ ) + { + if( el->video_file_list[i]) + free(el->video_file_list[i] ); + } + } + else + { + for ( i = 0; i < el->num_video_files; i ++ ) + { + if( el->lav_fd[i] ) + { + lav_close( el->lav_fd[i] ); + el->lav_fd[i] = NULL; + } + if( el->video_file_list[i]) { + free(el->video_file_list[i]); + el->video_file_list[i] = NULL; + } + } + } + + if( el->cache ) + free_cache( el->cache ); + if( el->frame_list ) + free(el->frame_list ); + free(el); + + el = NULL; +} + +void vj_el_print(editlist *el) +{ + int i; + char timecode[64]; + char interlacing[64]; + MPEG_timecode_t ttc; + veejay_msg(VEEJAY_MSG_INFO,"EditList settings: Video:%dx%d@%2.2f %s\tAudio:%d Hz/%d channels/%d bits", + el->video_width,el->video_height,el->video_fps,(el->video_norm=='p' ? "PAL" :"NTSC"), + el->audio_rate, el->audio_chans, el->audio_bits); + for(i=0; i < el->num_video_files ; i++) + { + long num_frames = lav_video_frames(el->lav_fd[i]); + MPEG_timecode_t tc; + switch( lav_video_interlacing(el->lav_fd[i])) + { + case LAV_NOT_INTERLACED: + sprintf(interlacing, "Not interlaced"); break; + case LAV_INTER_TOP_FIRST: + sprintf(interlacing,"Top field first"); break; + case LAV_INTER_BOTTOM_FIRST: + sprintf(interlacing, "Bottom field first"); break; + default: + sprintf(interlacing, "Unknown !"); break; + } + + mpeg_timecode(&tc, num_frames, + mpeg_framerate_code( mpeg_conform_framerate( el->video_fps )), + el->video_fps ); + + sprintf( timecode, "%2d:%2.2d:%2.2d:%2.2d", tc.h, tc.m, tc.s, tc.f ); + + veejay_msg(VEEJAY_MSG_INFO, "\tFile %s (%s) with %ld frames (total duration %s)", + el->video_file_list[i], + interlacing, + num_frames, + timecode ); + + } + + mpeg_timecode(&ttc, el->video_frames, + mpeg_framerate_code( mpeg_conform_framerate( el->video_fps )), + el->video_fps ); + + sprintf( timecode, "%2d:%2.2d:%2.2d:%2.2d", ttc.h, ttc.m, ttc.s, ttc.f ); + + + veejay_msg(VEEJAY_MSG_INFO, "\tDuration: %s (%2d hours, %2d minutes)(%ld frames)", timecode,ttc.h,ttc.m,el->video_frames); + + + + +} + +MPEG_timecode_t get_timecode(editlist *el, long num_frames) +{ + MPEG_timecode_t tc; + veejay_memset(&tc,0,sizeof(tc)); + mpeg_timecode(&tc, num_frames, + mpeg_framerate_code( mpeg_conform_framerate( el->video_fps )), + el->video_fps ); + return tc; +} + +int vj_el_get_file_entry(editlist *el, long *start_pos, long *end_pos, long entry ) +{ + if(entry >= el->num_video_files) + return 0; + + int64_t n = (int64_t) entry; + int64_t i = 0; + + if( el->video_file_list[ n ] == NULL ) + return 0; + + *start_pos = 0; + + for( i = 0;i < n ; i ++ ) + *start_pos += el->num_frames[i]; + + *end_pos = (*start_pos + el->num_frames[n] - 1); + + return 1; +} + + + +char *vj_el_write_line_ascii( editlist *el, int *bytes_written ) +{ + if(el->is_empty) + return NULL; + + int num_files; + int64_t oldfile, oldframe; + int64_t index[MAX_EDIT_LIST_FILES]; + int64_t n; + char *result = NULL; + int64_t n1 = 0; + int64_t j = 0; + int64_t n2 = el->video_frames-1; + /* get which files are actually referenced in the edit list entries */ + int est_len = 0; + for (j = 0; j < MAX_EDIT_LIST_FILES; j++) + index[j] = -1; + + for (j = n1; j <= n2; j++) + { + n = el->frame_list[j]; + index[N_EL_FILE(n)] = 1; + } + + num_files = 0; + for (j = 0; j < MAX_EDIT_LIST_FILES; j++) + { + if (index[j] > 0 ) + index[j] = (int64_t)num_files++; + } + int nnf = 0; + for ( j = 0; j < MAX_EDIT_LIST_FILES ; j ++ ) + if(index[j] >= 0 && el->video_file_list[j] != NULL) + { + nnf ++; + } + n = el->frame_list[n1]; + oldfile = index[ N_EL_FILE(n) ]; + oldframe = N_EL_FRAME(n); + + + est_len = nnf * 1024; + result = (char*) vj_calloc(sizeof(char) * est_len ); + sprintf(result, "%04d",nnf ); + + for (j = 0; j < MAX_EDIT_LIST_FILES; j++) + { + if (index[j] >= 0 && el->video_file_list[j] != NULL) + { + char filename[400]; + char fourcc[6]; + sprintf(fourcc, "%s", "????"); + vj_el_get_file_fourcc( el, j, fourcc ); + sprintf(filename ,"%03d%s%04d%010ld%02d%s", + strlen( el->video_file_list[j] ), + el->video_file_list[j], + (unsigned long) j, + el->num_frames[j], + strlen(fourcc), + fourcc + ); + sprintf(fourcc, "%04d", strlen( filename )); + veejay_strncat( result, fourcc, strlen(fourcc )); + veejay_strncat ( result, filename, strlen(filename)); + } + } + + char first[33]; + sprintf(first, "%016lld%016lld",oldfile, oldframe); + veejay_strncat( result, first, strlen(first) ); + + for (j = n1+1; j <= n2; j++) + { + n = el->frame_list[j]; + if ( index[ N_EL_FILE(n) ] != oldfile || + N_EL_FRAME(n) != oldframe + 1 ) + { + int len = 20 + (16 * 3 ) + strlen( el->video_file_list[ index[N_EL_FILE(n)] ] ); + char *tmp = (char*) vj_calloc(sizeof(char) * len ); + sprintf( tmp, "%016lld%016lld%016lld", + oldframe, + index[N_EL_FILE(n)], + N_EL_FRAME(n) ); + veejay_strncat( result, tmp, strlen(tmp) ); + free(tmp); + } + oldfile = index[N_EL_FILE(n)]; + oldframe = N_EL_FRAME(n); + } + + char last_word[16]; + sprintf(last_word,"%016lld", oldframe); + veejay_strncat( result, last_word, 16 ); + *bytes_written = strlen( result ); + el->total_frames = el->video_frames - 1; + return result; +} + +int vj_el_write_editlist( char *name, long _n1, long _n2, editlist *el ) +{ + FILE *fd; + int num_files; + int64_t oldfile, oldframe; + int64_t index[MAX_EDIT_LIST_FILES]; + int64_t n; + int64_t n1 = (uint64_t) _n1; + int64_t n2 = (uint64_t) _n2; + int64_t i; + + if(!el) + return 0; + + if(el->is_empty) + { + veejay_msg(VEEJAY_MSG_ERROR, "No frames in EditList" ); + return 0; + } + + if (n1 < 0) + n1 = 0; + + if (n2 >= el->video_frames || n2 < n1) + n2 = el->video_frames - 1; + + fd = fopen(name, "w"); + + if (!fd) + { + veejay_msg(VEEJAY_MSG_ERROR,"Can not open %s - no edit list written!", name); + return 0; + } + + fprintf(fd, "LAV Edit List\n"); + fprintf(fd, "%s\n", el->video_norm == 'n' ? "NTSC" : "PAL"); + + /* get which files are actually referenced in the edit list entries */ + + for (i = 0; i < MAX_EDIT_LIST_FILES; i++) + index[i] = -1; + + for (i = n1; i <= n2; i++) + index[N_EL_FILE(el->frame_list[i])] = 1; + + num_files = 0; + for (i = 0; i < MAX_EDIT_LIST_FILES; i++) + if (index[i] > 0) index[i] = (int64_t)num_files++; + + fprintf(fd, "%d\n", num_files); + for (i = 0; i < MAX_EDIT_LIST_FILES; i++) + if (index[i] >= 0 && el->video_file_list[i] != NULL) + { + fprintf(fd, "%s\n", el->video_file_list[i]); + } + + n = el->frame_list[ n1 ]; + oldfile = index[N_EL_FILE(n)]; + oldframe = N_EL_FRAME(n); + + fprintf(fd, "%lld %lld ", oldfile, oldframe); + for (i = n1 + 1; i <= n2; i++) + { + n = el->frame_list[i]; + if (index[N_EL_FILE(n)] != oldfile + || N_EL_FRAME(n) != oldframe + 1) + { + fprintf(fd, "%lld\n", oldframe); + fprintf(fd, "%lld %lld ",index[N_EL_FILE(n)], N_EL_FRAME(n)); + } + oldfile = index[N_EL_FILE(n)]; + oldframe = N_EL_FRAME(n); + } + n = fprintf(fd, "%lld\n", oldframe); + + /* We did not check if all our prints succeeded, so check at least the last one */ + if (n <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"Error writing edit list: "); + return 0; + } + el->total_frames = el->video_frames - 1; + fclose(fd); + + return 1; +} + +void vj_el_frame_cache(int n ) +{ + if(n > 1 || n < 1000) + { + mmap_size = n; + } +} + +editlist *vj_el_soft_clone(editlist *el) +{ + editlist *clone = (editlist*) vj_calloc(sizeof(editlist)); + if(!clone) + return NULL; + clone->is_empty = el->is_empty; + clone->has_video = el->has_video; + clone->video_width = el->video_width; + clone->video_height = el->video_height; + clone->video_fps = el->video_fps; + clone->video_sar_width = el->video_sar_width; + clone->video_sar_height = el->video_sar_height; + clone->video_norm = el->video_norm; + clone->has_audio = el->has_audio; + clone->audio_rate = el->audio_rate; + clone->audio_chans = el->audio_chans; + clone->audio_bits = el->audio_bits; + clone->audio_bps = el->audio_bps; + clone->video_frames = el->video_frames; + clone->total_frames = el->video_frames-1; + clone->num_video_files = el->num_video_files; + clone->max_frame_size = el->max_frame_size; + clone->MJPG_chroma = el->MJPG_chroma; + clone->frame_list = NULL; + clone->last_afile = el->last_afile; + clone->last_apos = el->last_apos; + clone->auto_deinter = el->auto_deinter; + clone->pixel_format = el->pixel_format; + clone->is_clone = 1; + int i; + for( i = 0; i < MAX_EDIT_LIST_FILES; i ++ ) + { + clone->video_file_list[i] = NULL; + clone->lav_fd[i] = NULL; + clone->num_frames[i] = 0; + clone->yuv_taste[i] = 0; + if( el->lav_fd[i] && el->video_file_list[i]) + { + clone->video_file_list[i] = strdup( el->video_file_list[i] ); + clone->lav_fd[i] = el->lav_fd[i]; + clone->num_frames[i] = el->num_frames[i]; + clone->yuv_taste[i] =el->yuv_taste[i]; + } + } + + return clone; +} + +int vj_el_framelist_clone( editlist *src, editlist *dst) +{ + if(!src || !dst) return 0; + if(dst->frame_list) + return 0; + dst->frame_list = (uint64_t*) vj_malloc(sizeof(uint64_t) * src->video_frames ); + if(!dst->frame_list) + return 0; + + veejay_memcpy( + dst->frame_list, + src->frame_list, + (sizeof(uint64_t) * src->video_frames ) + ); + + return 1; +} + +editlist *vj_el_clone(editlist *el) +{ + editlist *clone = (editlist*) vj_el_soft_clone(el); + if(!clone) + return NULL; + + if( vj_el_framelist_clone( el, clone ) ) + return clone; + else + { + if(clone) vj_el_free(clone); + veejay_msg(VEEJAY_MSG_ERROR, "Cannot clone: Memory error?!"); + } + + return clone; +} diff --git a/veejay-server/libel/vj-el.h b/veejay-server/libel/vj-el.h new file mode 100644 index 00000000..f56a0040 --- /dev/null +++ b/veejay-server/libel/vj-el.h @@ -0,0 +1,151 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_MLT_EL_H +#define VJ_MLT_EL_H +#include +#include +#include +#include +#define N_EL_FRAME(x) ( (x)&0xfffffffffffffLLU ) +#define N_EL_FILE(x) (uint32_t) ( ((x)>>52)&0xfffU ) +/* ((file)&0xfff<<52) */ +#define EL_ENTRY(file,frame) ( ((file)<<52) | ((frame)& 0xfffffffffffffLLU) ) + +//#define FMT_420 0 +//#define FMT_422 1 +//#define MAX_EDITLIST_FILES 4096 + + +typedef struct +{ + int has_video; + int is_empty; + int video_width; + int video_height; + int video_inter; + float video_fps; + int video_sar_width; + int video_sar_height; + char video_norm; + + int has_audio; + long audio_rate; + int audio_chans; + int audio_bits; + int audio_bps; + + long video_frames; + long total_frames; + long num_video_files; + + long max_frame_size; + int MJPG_chroma; + + char *(video_file_list[MAX_EDIT_LIST_FILES]); + lav_file_t *(lav_fd[MAX_EDIT_LIST_FILES]); + int yuv_taste[MAX_EDIT_LIST_FILES]; + + long num_frames[MAX_EDIT_LIST_FILES]; + uint64_t *frame_list; + + int last_afile; + long last_apos; + int auto_deinter; + + int pixel_format; + void *cache; + + int is_clone; +} editlist; + +int test_video_frame( lav_file_t *lav,int out_pix_fmt); + + +editlist *vj_el_init_with_args(char **filenames, int n, int flags, int deinter, int force, char norm, int fmt); + +int vj_el_cache_size(); + +void vj_el_prepare(void); // reset cache + +void vj_el_init(int out); + +void vj_el_init_chunk(int n); + +int vj_el_is_dv(editlist *el); + + +void vj_el_free(editlist *el); + +int vj_el_get_audio_frame_at(editlist *el, uint32_t nframe, uint8_t *dst, int speed ); + +int vj_el_append_video_file(editlist *el, char *filename); + +int vj_el_write_editlist( char *filename, long start, long end, editlist *el ); + +int vj_el_get_video_frame(editlist *el, long nframe, uint8_t *dst[3]); + +void vj_el_break_cache( editlist *el ); + +void vj_el_setup_cache( editlist *el ); + +int vj_el_get_audio_frame(editlist *el, uint32_t nframe, uint8_t *dst); + +int vj_el_get_file_fourcc(editlist *el, int num, char *buf); + +void vj_el_print(editlist *el); + +int vj_el_init_420_frame(editlist *el, VJFrame *frame); +int vj_el_init_422_frame(editlist *el, VJFrame *frame); + +void vj_el_frame_cache(int n); + +void vj_el_show_formats(void); + +editlist *vj_el_dummy(int flags, int deinterlace, int chroma, char norm, int width, int height, float fps, int fmt); + +int vj_el_get_file_entry( editlist *el,long *start_pos, long *end_pos, long entry ); + +editlist *vj_el_clone(editlist *el); + +editlist *vj_el_soft_clone(editlist *el); + +int vj_el_framelist_clone( editlist *src, editlist *dst); + +char *vj_el_write_line_ascii( editlist *el, int *bytes_written ); + +void vj_el_deinit(); + +void vj_el_clear_cache( editlist *el ); + +int get_ffmpeg_pixfmt( int pf ); + +void vj_el_set_image_output_size(editlist *el,int w, int h, float fps, int pf); + +int open_video_file(char *filename, editlist * el, int preserve_pathname, int deinter, int force, char override_norm); + +void vj_el_set_caching(int status); + +int vj_el_bogus_length( editlist *el, long nframe ); + +int vj_el_set_bogus_length( editlist *el, long nframe, int len ); + +void vj_el_get_video_fourcc(editlist *el, int num, char *fourcc); + + +#endif diff --git a/veejay-server/libel/vj-mmap.c b/veejay-server/libel/vj-mmap.c new file mode 100644 index 00000000..f1dce5c2 --- /dev/null +++ b/veejay-server/libel/vj-mmap.c @@ -0,0 +1,139 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#include +#include +#include +#include +#define PADDED(a,m) ( a > 0 ? (a / m->page_size) * m->page_size : 0) + +void mmap_free(mmap_region_t *map) +{ + if(map) + { + if(map->map_start) + munmap_file(map); + free(map); + } + map = NULL; +} + +mmap_region_t * mmap_file(int fd, int offset, int length, int fs) +{ + mmap_region_t *map = (mmap_region_t*) malloc(sizeof( mmap_region_t )); + memset( map, 0, sizeof( mmap_region_t )); + + map->fd = fd; + map->page_size = getpagesize(); + map->map_length = length; + map->map_start = NULL; + map->eof = fs; + map->mem_offset = offset; + remap_file( map, offset ); + veejay_msg(VEEJAY_MSG_DEBUG, "Memory map region is %f Mb", + ( (float) length / 1048576.0 ) ); + return map; +} + + +int is_mapped( mmap_region_t *map, int offset, int size ) +{ + // check if memory is in mapped region + off_t real_offset = PADDED( offset, map ); + size_t padding = offset % map->page_size; + + long rel_o = (map->mem_offset > 0 ? offset - map->mem_offset : offset ); + + if( (rel_o + size) > map->map_length ) + { + return 0; + } + + if( real_offset >= map->start_region && + real_offset + size <= map->end_region ) + return 1; + + return 0; +} + +int remap_file( mmap_region_t *map, int offset ) +{ + size_t padding = offset % map->page_size; + size_t new_length = map->map_length; + size_t real_length = 0; + off_t real_offset = PADDED( offset, map ); + + real_length = (padding + new_length); + if( real_length > map->eof ) + { + real_length = PADDED(map->eof ,map); + } + if(map->map_start != NULL) + { + munmap_file( map ); + } + + map->mem_offset = offset; + map->map_start = mmap( 0, real_length, PROT_READ, MAP_SHARED, map->fd, real_offset ); + if( map->map_start == MAP_FAILED) + { + veejay_msg(VEEJAY_MSG_ERROR, "mmap error %s", strerror(errno)); + return 0; + } + + map->data_start = map->map_start + padding; + + map->start_region = real_offset; + map->end_region = real_length + real_offset; + + return 1; +} + +int munmap_file( mmap_region_t *map ) +{ + if(map->map_start == NULL) + return 1; + + int n = munmap( map->map_start, map->map_length ); + if(n==-1) + { + veejay_msg(VEEJAY_MSG_ERROR, "leaving garbage %s", + strerror(errno)); + } + map->map_start = NULL; + return n; +} + +int mmap_read( mmap_region_t *map,int offset, int bytes, uint8_t *buf ) +{ + size_t padding = offset % map->page_size; + if( !is_mapped( map, offset, bytes )) + { + remap_file( map, offset ); + } + + int rel_offset = (map->mem_offset > 0 ? offset - map->mem_offset : offset ); + + uint8_t *d1 = map->data_start + rel_offset; + veejay_memcpy( buf, d1, bytes ); + return bytes; +} diff --git a/veejay-server/libel/vj-mmap.h b/veejay-server/libel/vj-mmap.h new file mode 100644 index 00000000..d88219e6 --- /dev/null +++ b/veejay-server/libel/vj-mmap.h @@ -0,0 +1,53 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#ifndef VJ_MMAP_H +#define VJ_MMAP_H +#include +#include +#include +typedef struct +{ + unsigned char *map_start; /* result of mmap() */ + unsigned char *data_start; /* start of data */ + uint64_t start_region; + uint64_t end_region; + off_t mem_offset; /* start of image */ + int fd; /* file descriptor */ + size_t page_size; /* page size */ + size_t map_length; /* requested map size */ + long eof; /* file size */ +} mmap_region_t; + +// map file portion to memory, return mapped region +mmap_region_t * mmap_file(int fd, int offset, int length, int fs); + +// see if requested boundaries is mapped in memory +int is_mapped( mmap_region_t *map, int offset, int size ); + +// remap a portion of a file in memory +int remap_file( mmap_region_t *map, int offset ); + +// unmap memory +int munmap_file( mmap_region_t *map ); + +void mmap_free(mmap_region_t *map ); + +int mmap_read( mmap_region_t *map, int offset, int bytes, uint8_t *buf); + +#endif diff --git a/veejay-server/libgoom/AUTHORS b/veejay-server/libgoom/AUTHORS new file mode 100644 index 00000000..af63c2f2 --- /dev/null +++ b/veejay-server/libgoom/AUTHORS @@ -0,0 +1,9 @@ +What a GOOM! +============ + +Copyright (c)2000-2004, Jean-Christophe Hoelt +Programmer and Software Designer at iOS software. + +iTunes port/PowerPC/Core-Hacking: Guillaume Borios +WINAMP/WMP port: Fred + diff --git a/veejay-server/libgoom/COPYING b/veejay-server/libgoom/COPYING new file mode 100644 index 00000000..a76126bf --- /dev/null +++ b/veejay-server/libgoom/COPYING @@ -0,0 +1,3 @@ +This program is under the LGPL. +You can find the terms of this licence somewhere on the internet. +(for exemple, search "LGPL" on your favorite search engine). diff --git a/veejay-server/libgoom/ChangeLog b/veejay-server/libgoom/ChangeLog new file mode 100644 index 00000000..2d761d32 --- /dev/null +++ b/veejay-server/libgoom/ChangeLog @@ -0,0 +1,89 @@ + +Imported goom from freej respository, 14th November 2006 + + +ChangeLogs for GOOM +------------------- + +.10/03/2004: version 2k4-dev12 + - A Goom Scripting Language embedded in. It allows hi level of + configuration and easy hacking of the effect's behaviour. + - Zoom filter now works on relative screen coordinates. +.04/12/2003: version 2k4-dev2 + A long time since last entry here but some work has been done during + this year, Goom v2 is now on the track and working pretty well. + Added: + - Configurability. + - A particule system for rain, fireworks and fountains. + - Dynamic brightness changes to make gooms more impressive. + - Cleaning the code. +.30/12/2002: + Auto-CPU detection. New font.. now stored in the binary file. +.28/12/2002: + Optimisation of the asm loop in ExtendedMMX +.30/11/2002: + Added tentacle3d. +.15/11/2002: + Dirty Hack to make inline asm compile well : + remove the -fPIC flag (by modifying ltconfig) +.11/11/2002: + Partial rewriting of the sound evaluator. +.10/11/2002: + bug fixes (crash with some song title, ...) + display/hide of the fps. + show information messages. +.10/08/2002: + xmms-goom now uses SDL. +.**/07/2002: + display the title. +.07/06/2002: version 1.9 + Slow change between FX. +.20/04/2002: version 1.8.1 + Hypercos effect. + - added a param to goom_core to force the fx change + - fullscreen for xmms works well + - keyboard input for xmms + - xmms-ctrl (control xmms from goom) + - auto-change fx after a large number of cycle with the same one +.11/04/2002: version 1.8.0 + IFS point effect.. +.10/12/2001: + Adding some new stuff from iGoom (circle line) + removing the init-close bug. + adding the oportunity to double the size of the pixel. +.11/07/2001: + Hello mister proper.. The code is more portable now. +.16/06/2001: + Fixing a little bug with the initial config loading. + Using the 2 new FX of the zoom filter. + + +ChangeLogs for KOP2ZEDEMO: the zoom filter +------------------------------------------ + +.16/06/2001: + NEW FX -> vPlane & hPlane. (to do rotations) + NEW FX -> noisify ; to add noise to the transformation buffer. +.03/01/2001: + All buffers are now created by a malloc + reduction of the performances... but it is now more configurable... + .(MMX version is now 50 clocks per pixel) +.28/12/2000: + Optimizing a little the sinFilter +.27/12/2000: + Optimizing the buffer generator + .(previous : 767 clocks/pixel => now : 234 clk/pxl) + Adding two effect: AMULETTE and SCRUNCH +.22/12/2000: + Good optimization : reducing mem access + .(MMX version is now 45 clocks per pixel) +.13/12/2000: + Unrolling loop +.12/12/2000: + Optimisation of the ASM code -> 64bits RAM access + .(MMX version is now 55 clocks per pixel) +.10/12/2000: + MMX version of the zoomer + .(MMX version is now 70 clocks per pixel) + +author: Jean-Christophe Hoelt diff --git a/veejay-server/libgoom/DOCODE.TXT b/veejay-server/libgoom/DOCODE.TXT new file mode 100644 index 00000000..76c820af --- /dev/null +++ b/veejay-server/libgoom/DOCODE.TXT @@ -0,0 +1,55 @@ +Les diffrentes donnes.. +----- + +typedef struct { + int32 * buf; + int32 width; + int32 height; + int32 size; + + int32 * realstart; +} Surface; +----- + +>> taille du buffer de zoom +guint32 mmx_zoom_size; +----- + +>> les buffers bruts contiennent les px et py de chaque point +>> => brutS[0] = px0, brutS[1] = py0, brutS[2] = px1, [...] + +signed int *brutS = 0, *freebrutS = 0; // source +signed int *brutD = 0, *freebrutD = 0; // dest +signed int *brutT = 0, *freebrutT = 0; // temp (en cours de gnration) + +>> pointeur vers p1 +guint32 *expix1 = 0; +>> pointeur vers p2 +guint32 *expix2 = 0; + +>> largeur d'une ligne = prevX +guint32 zoom_width; + +>> largeur et hauteur des differents buffers. +int prevX=0,prevY=0; +----- + +>> buffratio est un fixpoint : 16,16 +>> valeur normalement comprise entre 0 et 1, +>> soit 0<=buffratio<=BUFFPOINTMASK + +int buffratio = 0; + +#define BUFFPOINTNB 16 +#define BUFFPOINTMASK 0xffff +#define BUFFINCR 0xff +----- + +#define sqrtperte 16 +>> faire : a % sqrtperte <=> a & pertemask +#define PERTEMASK 0xf +>> faire : a / sqrtperte <=> a >> PERTEDEC +#define PERTEDEC 4 +----- + +int precalCoef[16][16]; diff --git a/veejay-server/libgoom/KNOWNBUGS b/veejay-server/libgoom/KNOWNBUGS new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/veejay-server/libgoom/KNOWNBUGS @@ -0,0 +1 @@ + diff --git a/veejay-server/libgoom/Makefile.am b/veejay-server/libgoom/Makefile.am new file mode 100644 index 00000000..bd86e089 --- /dev/null +++ b/veejay-server/libgoom/Makefile.am @@ -0,0 +1,16 @@ +MAINTAINERCLEANFILES=Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libgoom +GOOM_LIB_FILE = libgoom.la +noinst_LTLIBRARIES = $(GOOM_LIB_FILE) +libgoom_la_SOURCES = goomsl_yacc.y goomsl_lex.l goomsl.c goomsl_hash.c goomsl_heap.c \ + goom_tools.c \ + config_param.c convolve_fx.c filters.c \ + flying_stars_fx.c gfontlib.c gfontrle.c \ + goom_core.c graphic.c ifs.c lines.c \ + mathtools.c sound_tester.c surf3d.c \ + tentacle3d.c plugin_info.c \ + v3d.c drawmethods.c \ + cpu_info.c + + diff --git a/veejay-server/libgoom/Makefile.in b/veejay-server/libgoom/Makefile.in new file mode 100644 index 00000000..d765f62b --- /dev/null +++ b/veejay-server/libgoom/Makefile.in @@ -0,0 +1,560 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libgoom +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + AUTHORS COPYING ChangeLog NEWS TODO goomsl_lex.c goomsl_yacc.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgoom_la_LIBADD = +am_libgoom_la_OBJECTS = goomsl_yacc.lo goomsl_lex.lo goomsl.lo \ + goomsl_hash.lo goomsl_heap.lo goom_tools.lo config_param.lo \ + convolve_fx.lo filters.lo flying_stars_fx.lo gfontlib.lo \ + gfontrle.lo goom_core.lo graphic.lo ifs.lo lines.lo \ + mathtools.lo sound_tester.lo surf3d.lo tentacle3d.lo \ + plugin_info.lo v3d.lo drawmethods.lo cpu_info.lo +libgoom_la_OBJECTS = $(am_libgoom_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || +LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) +YLWRAP = $(top_srcdir)/ylwrap +@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || +YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) +SOURCES = $(libgoom_la_SOURCES) +DIST_SOURCES = $(libgoom_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libgoom +GOOM_LIB_FILE = libgoom.la +noinst_LTLIBRARIES = $(GOOM_LIB_FILE) +libgoom_la_SOURCES = goomsl_yacc.y goomsl_lex.l goomsl.c goomsl_hash.c goomsl_heap.c \ + goom_tools.c \ + config_param.c convolve_fx.c filters.c \ + flying_stars_fx.c gfontlib.c gfontrle.c \ + goom_core.c graphic.c ifs.c lines.c \ + mathtools.c sound_tester.c surf3d.c \ + tentacle3d.c plugin_info.c \ + v3d.c drawmethods.c \ + cpu_info.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .l .lo .o .obj .y +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libgoom/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libgoom/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgoom.la: $(libgoom_la_OBJECTS) $(libgoom_la_DEPENDENCIES) + $(LINK) $(libgoom_la_OBJECTS) $(libgoom_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_param.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convolve_fx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu_info.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawmethods.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filters.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flying_stars_fx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfontlib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfontrle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goom_core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goom_tools.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goomsl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goomsl_hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goomsl_heap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goomsl_lex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goomsl_yacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lines.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathtools.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_info.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sound_tester.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/surf3d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tentacle3d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v3d.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +.l.c: + $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + +.y.c: + $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f goomsl_lex.c + -rm -f goomsl_yacc.c + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/libgoom/NEWS b/veejay-server/libgoom/NEWS new file mode 100644 index 00000000..38a7ad03 --- /dev/null +++ b/veejay-server/libgoom/NEWS @@ -0,0 +1 @@ +see ChangeLog diff --git a/veejay-server/libgoom/README b/veejay-server/libgoom/README new file mode 100644 index 00000000..161ecb62 --- /dev/null +++ b/veejay-server/libgoom/README @@ -0,0 +1,25 @@ +************************** +* What a GOOM! version 2 * +************************** +copyright 2000-2004, by Jean-Christophe Hoelt + +This is my first visual plugins for XMMS, and I think that it's the best +I have ever done ! + + /-----------------\\ +--< where to get Goom >-- + \\-----------------/ + +You can find the last version on the website of +iOS software: +http://www.ios-software.com/ + + /------\\ +--< thanks >-- + \\------/ + +Skal for the code of IFS +Burkhard for the initial fullscreen patch +Gyom for the iTunes version +Fred for the Windows version and a lot of other Goom Stuff + diff --git a/veejay-server/libgoom/TODO b/veejay-server/libgoom/TODO new file mode 100644 index 00000000..63a13f57 --- /dev/null +++ b/veejay-server/libgoom/TODO @@ -0,0 +1,32 @@ +Idees: + +- Flash lights (Phosphor) + --> --> --> + <-- <-- <-- + +- Re-remplir RAND regulierement (1/tour) + +- Un effect qui affecte la displacement map: + +- Enregistrer l'etat de la config, s'en servir pour definir un etat de goom. + +- PluginParam de type Button, avec juste un listener en donnee. + +- PluginParam de type TextField. + +- Liste des modes possibles pour l'effet de BG. + +- Goom lui-meme : liste des effets actifs. + mode automatique / manuel (plus de changement aleatoires) + +- Possibilite d'envoyer des commandes format text au Core. exemples : +" BRIGHT_FLASH.SCREEN_BRIGHTNESS=200.0 + if SOUND.GOOM_DETECTION > 0 + 3D_TENTACLES.ENABLED = 1 + endif + CORE.MAIN_SCRIPT="..." +" + void goom_execute_script(const char *cmds); + void goom_set_main_script(const char *script); /// peut retourner un message d'erreur ? + char *goom_create_state_script(); /* retourne un script permettant de remettre goom dans l'etat actuel */ + diff --git a/veejay-server/libgoom/config_param.c b/veejay-server/libgoom/config_param.c new file mode 100644 index 00000000..c6402834 --- /dev/null +++ b/veejay-server/libgoom/config_param.c @@ -0,0 +1,110 @@ +/*---------------------------------------------------------------------------*/ +/* +** config_param.c +** Goom Project +** +** Created by Jean-Christophe Hoelt on Sat Jul 19 2003 +** Copyright (c) 2003 iOS. All rights reserved. +*/ +/*---------------------------------------------------------------------------*/ + +#include "goom_config_param.h" +#include + +/* TODO: Ajouter goom_ devant ces fonctions */ + +static void empty_fct(PluginParam *dummy) { +} + +PluginParam goom_secure_param() { + PluginParam p; + p.changed = empty_fct; + p.change_listener = empty_fct; + p.user_data = 0; + p.name = p.desc = 0; + p.rw = 1; + return p; +} + +PluginParam goom_secure_f_param(char *name) { + PluginParam p = secure_param(); + p.name = name; + p.type = PARAM_FLOATVAL; + FVAL(p) = 0.5f; + FMIN(p) = 0.0f; + FMAX(p) = 1.0f; + FSTEP(p) = 0.01f; + return p; +} + +PluginParam goom_secure_f_feedback(char *name) { + PluginParam p = secure_f_param(name); + p.rw = 0; + return p; +} + +PluginParam goom_secure_s_param(char *name) { + PluginParam p = secure_param(); + p.name = name; + p.type = PARAM_STRVAL; + SVAL(p) = 0; + return p; +} + +PluginParam goom_secure_b_param(char *name, int value) { + PluginParam p = secure_param(); + p.name = name; + p.type = PARAM_BOOLVAL; + BVAL(p) = value; + return p; +} + +PluginParam goom_secure_i_param(char *name) { + PluginParam p = secure_param(); + p.name = name; + p.type = PARAM_INTVAL; + IVAL(p) = 50; + IMIN(p) = 0; + IMAX(p) = 100; + ISTEP(p) = 1; + return p; +} + +PluginParam goom_secure_i_feedback(char *name) { + PluginParam p = secure_i_param(name); + p.rw = 0; + return p; +} + +PluginParameters goom_plugin_parameters(const char *name, int nb) { + PluginParameters p; + p.name = (char *)name; + p.desc = ""; + p.nbParams = nb; + p.params = (PluginParam**)malloc(nb*sizeof(PluginParam*)); + return p; +} + +/*---------------------------------------------------------------------------*/ + +void goom_set_str_param_value(PluginParam *p, const char *str) { + int len = strlen(str); + if (SVAL(*p)) + SVAL(*p) = (char*)realloc(SVAL(*p), len+1); + else + SVAL(*p) = (char*)malloc(len+1); + memcpy(SVAL(*p), str, len+1); +} + +void goom_set_list_param_value(PluginParam *p, const char *str) { + int len = strlen(str); +#ifdef VERBOSE + printf("%s: %d\n", str, len); +#endif + if (LVAL(*p)) + LVAL(*p) = (char*)realloc(LVAL(*p), len+1); + else + LVAL(*p) = (char*)malloc(len+1); + memcpy(LVAL(*p), str, len+1); +} + diff --git a/veejay-server/libgoom/convolve_fx.c b/veejay-server/libgoom/convolve_fx.c new file mode 100644 index 00000000..9924b6a4 --- /dev/null +++ b/veejay-server/libgoom/convolve_fx.c @@ -0,0 +1,323 @@ +#include "goom_fx.h" +#include "goom_plugin_info.h" +#include "goomsl.h" +#include "goom_config.h" +#include +#include +#include +#include + +//#define CONV_MOTIF_W 32 +//#define CONV_MOTIF_WMASK 0x1f + +#define CONV_MOTIF_W 128 +#define CONV_MOTIF_WMASK 0x7f + +typedef char Motif[CONV_MOTIF_W][CONV_MOTIF_W]; + +#include "motif_goom1.h" +#include "motif_goom2.h" + +#define NB_THETA 512 + +#define MAX 2.0f + +typedef struct _CONV_DATA{ + PluginParam light; + PluginParam factor_adj_p; + PluginParam factor_p; + PluginParameters params; + + GoomSL *script; + + /* rotozoom */ + int theta; + float ftheta; + int h_sin[NB_THETA]; + int h_cos[NB_THETA]; + int h_height; + float visibility; + Motif conv_motif; + int inverse_motif; + +} ConvData; + +/* init rotozoom tables */ +static void compute_tables(VisualFX *_this, PluginInfo *info) +{ + ConvData *data = (ConvData*)_this->fx_data; + double screen_coef; + int i; + double h; + double radian; + + if (data->h_height == info->screen.height) return; + + screen_coef = 2.0 * 300.0 / (double)info->screen.height; + data->h_height = info->screen.height; + + for ( i=0 ; ih_cos[i] = 0x10000 * (-h * cos (radian) * cos(radian)); + data->h_sin[i] = 0x10000 * (h * sin (radian + 1.57) * sin(radian)); + } +} + +static void set_motif(ConvData *data, Motif motif) +{ + int i,j; + for (i=0;iconv_motif[i][j] = motif[CONV_MOTIF_W-i-1][CONV_MOTIF_W-j-1]; +} + +static void convolve_init(VisualFX *_this, PluginInfo *info) { + ConvData *data; + data = (ConvData*)malloc(sizeof(ConvData)); + _this->fx_data = (void*)data; + + data->light = secure_f_param("Screen Brightness"); + data->light.param.fval.max = 300.0f; + data->light.param.fval.step = 1.0f; + data->light.param.fval.value = 100.0f; + + data->factor_adj_p = secure_f_param("Flash Intensity"); + data->factor_adj_p.param.fval.max = 200.0f; + data->factor_adj_p.param.fval.step = 1.0f; + data->factor_adj_p.param.fval.value = 70.0f; + + data->factor_p = secure_f_feedback("Factor"); + + data->params = plugin_parameters ("Bright Flash", 5); + data->params.params[0] = &data->light; + data->params.params[1] = &data->factor_adj_p; + data->params.params[2] = 0; + data->params.params[3] = &data->factor_p; + data->params.params[4] = 0; + + /* init rotozoom tables */ + compute_tables(_this, info); + data->theta = 0; + data->ftheta = 0.0; + data->visibility = 1.0; + set_motif(data, CONV_MOTIF2); + data->inverse_motif = 0; + + _this->params = &data->params; +} + +static void convolve_free(VisualFX *_this) { + free (_this->fx_data); +} + +static void create_output_with_brightness(VisualFX *_this, Pixel *src, Pixel *dest, + PluginInfo *info, int iff) +{ + ConvData *data = (ConvData*)_this->fx_data; + + int x,y; + int i = 0;//info->screen.height * info->screen.width - 1; + + const int c = data->h_cos [data->theta]; + const int s = data->h_sin [data->theta]; + + const int xi = -(info->screen.width/2) * c; + const int yi = (info->screen.width/2) * s; + + const int xj = -(info->screen.height/2) * s; + const int yj = -(info->screen.height/2) * c; + + int xprime = xj; + int yprime = yj; + + int ifftab[16]; + if (data->inverse_motif) { + int i; + for (i=0;i<16;++i) + ifftab[i] = (double)iff * (1.0 + data->visibility * (15.0 - i) / 15.0); + } + else { + int i; + for (i=0;i<16;++i) + ifftab[i] = (double)iff / (1.0 + data->visibility * (15.0 - i) / 15.0); + } + for (y=info->screen.height;y--;) { + int xtex,ytex; + + xtex = xprime + xi + CONV_MOTIF_W * 0x10000 / 2; + xprime += s; + + ytex = yprime + yi + CONV_MOTIF_W * 0x10000 / 2; + yprime += c; +#ifdef HAVE_MMX + __asm__ __volatile__ + ("\n\t pxor %%mm7, %%mm7" + "\n\t movd %[xtex], %%mm2" + "\n\t movd %[ytex], %%mm3" + "\n\t punpckldq %%mm3, %%mm2" + "\n\t movd %[c], %%mm4" + "\n\t movd %[s], %%mm6" + "\n\t pxor %%mm5, %%mm5" + "\n\t psubd %%mm6, %%mm5" + "\n\t punpckldq %%mm5, %%mm4" + "\n\t movd %[motif], %%mm6" + + ::[xtex]"g"(xtex) ,[ytex]"g"(ytex) + , [c]"g"(c), [s]"g"(s) + , [motif] "g"(&data->conv_motif[0][0])); + + for (x=info->screen.width;x--;) + { + __asm__ __volatile__ + ( + "\n\t movd %[src], %%mm0" + "\n\t paddd %%mm4, %%mm2" + "\n\t movd %%esi, %%mm5" + "\n\t movq %%mm2, %%mm3" + "\n\t psrld $16, %%mm3" + "\n\t movd %%mm3, %%eax" + + "\n\t psrlq $25, %%mm3" + "\n\t movd %%mm3, %%ecx" + + "\n\t andl $127, %%eax" + "\n\t andl $16256, %%ecx" + + "\n\t addl %%ecx, %%eax" + "\n\t movd %%mm6, %%esi" + "\n\t xorl %%ecx, %%ecx" + "\n\t movb (%%eax,%%esi), %%cl" + + "\n\t movl %[ifftab], %%eax" + "\n\t movd %%mm5, %%esi" + "\n\t movd (%%eax,%%ecx,4), %%mm1" + + "\n\t punpcklwd %%mm1, %%mm1" + "\n\t punpcklbw %%mm7, %%mm0" + "\n\t punpckldq %%mm1, %%mm1" + "\n\t psrlw $1, %%mm0" + "\n\t psrlw $2, %%mm1" + "\n\t pmullw %%mm1, %%mm0" + "\n\t psrlw $5, %%mm0" + "\n\t packuswb %%mm7, %%mm0" + "\n\t movd %%mm0, %[dest]" + : [dest] "=g" (dest[i].val) + : [src] "g" (src[i].val) + , [ifftab]"g"(&ifftab[0]) + : "eax","ecx"); + + i++; + } +#else + for (x=info->screen.width;x--;) { + + int iff2; + unsigned int f0,f1,f2,f3; + + xtex += c; + ytex -= s; + + iff2 = ifftab[data->conv_motif[(ytex >>16) & CONV_MOTIF_WMASK][(xtex >> 16) & CONV_MOTIF_WMASK]]; + +#define sat(a) ((a)>0xFF?0xFF:(a)) + f0 = src[i].val; + f1 = ((f0 >> R_OFFSET) & 0xFF) * iff2 >> 8; + f2 = ((f0 >> G_OFFSET) & 0xFF) * iff2 >> 8; + f3 = ((f0 >> B_OFFSET) & 0xFF) * iff2 >> 8; + dest[i].val = (sat(f1) << R_OFFSET) | (sat(f2) << G_OFFSET) | (sat(f3) << B_OFFSET); + + i++; + } +#endif + + } +#ifdef HAVE_MMX + __asm__ __volatile__ ("\n\t emms"); +#endif + compute_tables(_this, info); +} + + +/*#include + +static uint64_t GetTick() +{ + uint64_t x; + asm volatile ("RDTSC" : "=A" (x)); + return x; +}*/ + + +static void convolve_apply(VisualFX *_this, Pixel *src, Pixel *dest, PluginInfo *info) { + + ConvData *data = (ConvData*)_this->fx_data; + float ff; + int iff; + + ff = (FVAL(data->factor_p) * FVAL(data->factor_adj_p) + FVAL(data->light) ) / 100.0f; + iff = (unsigned int)(ff * 256); + + { + double fcycle = (double)info->cycle; + double rotate_param, rotate_coef; + float INCREASE_RATE = 1.5; + float DECAY_RATE = 0.955; + if (FVAL(info->sound.last_goom_p) > 0.8) + FVAL(data->factor_p) += FVAL(info->sound.goom_power_p) * INCREASE_RATE; + FVAL(data->factor_p) *= DECAY_RATE; + + rotate_param = FVAL(info->sound.last_goom_p); + if (rotate_param < 0.0) + rotate_param = 0.0; + rotate_param += FVAL(info->sound.goom_power_p); + + rotate_coef = 4.0 + FVAL(info->sound.goom_power_p) * 6.0; + data->ftheta = (data->ftheta + rotate_coef * sin(rotate_param * 6.3)); + data->theta = ((unsigned int)data->ftheta) % NB_THETA; + data->visibility = (cos(fcycle * 0.001 + 1.5) * sin(fcycle * 0.008) + cos(fcycle * 0.011 + 5.0) - 0.8 + info->sound.speedvar) * 1.5; + if (data->visibility < 0.0) data->visibility = 0.0; + data->factor_p.change_listener(&data->factor_p); + } + + if (data->visibility < 0.01) { + switch (goom_irand(info->gRandom, 300)) + { + case 1: + set_motif(data, CONV_MOTIF1); data->inverse_motif = 1; break; + case 2: + set_motif(data, CONV_MOTIF2); data->inverse_motif = 0; break; + } + } + + if ((ff > 0.98f) && (ff < 1.02f)) + memcpy(dest, src, info->screen.size * sizeof(Pixel)); + else + create_output_with_brightness(_this,src,dest,info,iff); +/* +// Benching suite... + { + uint64_t before, after; + double timed; + static double stimed = 10000.0; + before = GetTick(); + data->visibility = 1.0; + create_output_with_brightness(_this,src,dest,info,iff); + after = GetTick(); + timed = (double)((after-before) / info->screen.size); + if (timed < stimed) { + stimed = timed; + printf ("CLK = %3.0f CPP\n", stimed); + } + } +*/ +} + +VisualFX convolve_create(void) { + VisualFX vfx = { + init: convolve_init, + free: convolve_free, + apply: convolve_apply, + fx_data: 0 + }; + return vfx; +} diff --git a/veejay-server/libgoom/convolve_fx.c.jc b/veejay-server/libgoom/convolve_fx.c.jc new file mode 100644 index 00000000..e2acbceb --- /dev/null +++ b/veejay-server/libgoom/convolve_fx.c.jc @@ -0,0 +1,333 @@ +#include "goom_fx.h" +#include "goom_plugin_info.h" +#include "goomsl.h" +#include "goom_config.h" +#include +#include +#include +#include + +//#define CONV_MOTIF_W 32 +//#define CONV_MOTIF_WMASK 0x1f + +#define CONV_MOTIF_W 128 +#define CONV_MOTIF_WMASK 0x7f + +typedef char Motif[CONV_MOTIF_W][CONV_MOTIF_W]; + +#include "motif_goom1.h" +#include "motif_goom2.h" + +#define NB_THETA 512 + +#define MAX 2.0f + +typedef struct _CONV_DATA{ + PluginParam light; + PluginParam factor_adj_p; + PluginParam factor_p; + PluginParameters params; + + GoomSL *script; + + /* rotozoom */ + int theta; + float ftheta; + int h_sin[NB_THETA]; + int h_cos[NB_THETA]; + int h_height; + float visibility; + Motif conv_motif; + int inverse_motif; + +} ConvData; + +/* init rotozoom tables */ +static void compute_tables(VisualFX *_this, PluginInfo *info) +{ + ConvData *data = (ConvData*)_this->fx_data; + double screen_coef; + int i; + double h; + double radian; + + if (data->h_height == info->screen.height) return; + + screen_coef = 2.0 * 300.0 / (double)info->screen.height; + data->h_height = info->screen.height; + + for ( i=0 ; ih_cos[i] = 0x10000 * (-h * cos (radian) * cos(radian)); + data->h_sin[i] = 0x10000 * (h * sin (radian + 1.57) * sin(radian)); + } +} + +static void set_motif(ConvData *data, Motif motif) +{ + int i,j; + for (i=0;iconv_motif[i][j] = motif[CONV_MOTIF_W-i-1][CONV_MOTIF_W-j-1]; +} + +static void convolve_init(VisualFX *_this, PluginInfo *info) { + ConvData *data; + data = (ConvData*)malloc(sizeof(ConvData)); + _this->fx_data = (void*)data; + + data->light = secure_f_param("Screen Brightness"); + data->light.param.fval.max = 300.0f; + data->light.param.fval.step = 1.0f; + data->light.param.fval.value = 100.0f; + + data->factor_adj_p = secure_f_param("Flash Intensity"); + data->factor_adj_p.param.fval.max = 200.0f; + data->factor_adj_p.param.fval.step = 1.0f; + data->factor_adj_p.param.fval.value = 70.0f; + + data->factor_p = secure_f_feedback("Factor"); + + data->params = plugin_parameters ("Bright Flash", 5); + data->params.params[0] = &data->light; + data->params.params[1] = &data->factor_adj_p; + data->params.params[2] = 0; + data->params.params[3] = &data->factor_p; + data->params.params[4] = 0; + + /* init rotozoom tables */ + compute_tables(_this, info); + data->theta = 0; + data->ftheta = 0.0; + data->visibility = 1.0; + //set_motif(data, CONV_MOTIF2); + data->inverse_motif = 0; + + _this->params = &data->params; +} + +static void convolve_free(VisualFX *_this) { + free (_this->fx_data); +} + +static void create_output_with_brightness(VisualFX *_this, Pixel *src, Pixel *dest, + PluginInfo *info, int iff) +{ + ConvData *data = (ConvData*)_this->fx_data; + + int x,y; + int i = 0;//info->screen.height * info->screen.width - 1; + + const int c = data->h_cos [data->theta]; + const int s = data->h_sin [data->theta]; + + const int xi = -(info->screen.width/2) * c; + const int yi = (info->screen.width/2) * s; + + const int xj = -(info->screen.height/2) * s; + const int yj = -(info->screen.height/2) * c; + + int xprime = xj; + int yprime = yj; + + int ifftab[16]; + if (data->inverse_motif) { + int i; + for (i=0;i<16;++i) + ifftab[i] = (double)iff * (1.0 + data->visibility * (15.0 - i) / 15.0); + } + else { + int i; + for (i=0;i<16;++i) + ifftab[i] = (double)iff / (1.0 + data->visibility * (15.0 - i) / 15.0); + } + + for (y=info->screen.height;y--;) { + int xtex,ytex; + + xtex = xprime + xi + CONV_MOTIF_W * 0x10000 / 2; + xprime += s; + + ytex = yprime + yi + CONV_MOTIF_W * 0x10000 / 2; + yprime += c; + +#ifdef HAVE_MMX + __asm__ __volatile__ + ("\n\t pxor %%mm7, %%mm7" /* mm7 = 0 */ + "\n\t movd %[xtex], %%mm2" + "\n\t movd %[ytex], %%mm3" + "\n\t punpckldq %%mm3, %%mm2" /* mm2 = [ ytex | xtex ] */ + "\n\t movd %[c], %%mm4" + "\n\t movd %[s], %%mm6" + "\n\t pxor %%mm5, %%mm5" + "\n\t psubd %%mm6, %%mm5" + "\n\t punpckldq %%mm5, %%mm4" /* mm4 = [ -s | c ] */ + "\n\t movd %[motif], %%mm6" /* mm6 = motif */ + + ::[xtex]"g"(xtex) ,[ytex]"g"(ytex) + , [c]"g"(c), [s]"g"(s) + , [motif] "g"(&data->conv_motif[0][0])); + + for (x=info->screen.width;x--;) + { + __asm__ __volatile__ + ( + "\n\t movd %[src], %%mm0" /* mm0 = src */ + "\n\t paddd %%mm4, %%mm2" /* [ ytex | xtex ] += [ -s | s ] */ + "\n\t movd %%esi, %%mm5" /* save esi into mm5 */ + "\n\t movq %%mm2, %%mm3" + "\n\t psrld $16, %%mm3" /* mm3 = [ (ytex>>16) | (xtex>>16) ] */ + "\n\t movd %%mm3, %%eax" /* eax = xtex' */ + + "\n\t psrlq $25, %%mm3" + "\n\t movd %%mm3, %%ecx" /* ecx = ytex' << 7 */ + + "\n\t andl $127, %%eax" + "\n\t andl $16256, %%ecx" + + "\n\t addl %%ecx, %%eax" + "\n\t movd %%mm6, %%esi" /* esi = motif */ + "\n\t xorl %%ecx, %%ecx" + "\n\t movb (%%eax,%%esi), %%cl" + + "\n\t movl %[ifftab], %%eax" + "\n\t movd %%mm5, %%esi" /* restore esi from mm5 */ + "\n\t movd (%%eax,%%ecx,4), %%mm1" /* mm1 = [0|0|0|iff2] */ + + "\n\t punpcklwd %%mm1, %%mm1" + "\n\t punpcklbw %%mm7, %%mm0" + "\n\t punpckldq %%mm1, %%mm1" + "\n\t psrlw $1, %%mm0" + "\n\t psrlw $1, %%mm1" + "\n\t pmullw %%mm1, %%mm0" + "\n\t psrlw $6, %%mm0" + "\n\t packuswb %%mm7, %%mm0" + "\n\t movd %%mm0, %[dest]" + : [dest] "=g" (dest[i].val) + : [src] "g" (src[i].val) + , [ifftab]"g"(&ifftab[0]) + : "eax","ecx"); + + i++; + } +#else + for (x=info->screen.width;x--;) { + + int iff2; + unsigned int f0,f1,f2,f3; + + xtex += c; + ytex -= s; + + iff2 = ifftab[data->conv_motif[(ytex >>16) & CONV_MOTIF_WMASK][(xtex >> 16) & CONV_MOTIF_WMASK]]; + +#define sat(a) ((a)>0xFF?0xFF:(a)) + f0 = src[i].val; + f1 = ((f0 >> R_OFFSET) & 0xFF) * iff2 >> 8; + f2 = ((f0 >> G_OFFSET) & 0xFF) * iff2 >> 8; + f3 = ((f0 >> B_OFFSET) & 0xFF) * iff2 >> 8; + dest[i].val = (sat(f1) << R_OFFSET) | (sat(f2) << G_OFFSET) | (sat(f3) << B_OFFSET); +/* + f0 = (src[i].cop[0] * iff2) >> 8; + f1 = (src[i].cop[1] * iff2) >> 8; + f2 = (src[i].cop[2] * iff2) >> 8; + f3 = (src[i].cop[3] * iff2) >> 8; + + dest[i].cop[0] = (f0 & 0xffffff00) ? 0xff : (unsigned char)f0; + dest[i].cop[1] = (f1 & 0xffffff00) ? 0xff : (unsigned char)f1; + dest[i].cop[2] = (f2 & 0xffffff00) ? 0xff : (unsigned char)f2; + dest[i].cop[3] = (f3 & 0xffffff00) ? 0xff : (unsigned char)f3; +*/ + i++; + } +#endif + } + __asm__ __volatile__ ("\n\t emms"); + + compute_tables(_this, info); +} + +/* +#include + +static uint64_t GetTick() +{ + uint64_t x; + asm volatile ("RDTSC" : "=A" (x)); + return x; +} +*/ + +static void convolve_apply(VisualFX *_this, Pixel *src, Pixel *dest, PluginInfo *info) { + + ConvData *data = (ConvData*)_this->fx_data; + float ff; + int iff; + + ff = (FVAL(data->factor_p) * FVAL(data->factor_adj_p) + FVAL(data->light) ) / 100.0f; + iff = (unsigned int)(ff * 256); + + { + double fcycle = (double)info->cycle; + double rotate_param, rotate_coef; + float INCREASE_RATE = 1.5; + float DECAY_RATE = 0.955; + if (FVAL(info->sound.last_goom_p) > 0.8) + FVAL(data->factor_p) += FVAL(info->sound.goom_power_p) * INCREASE_RATE; + FVAL(data->factor_p) *= DECAY_RATE; + + rotate_param = FVAL(info->sound.last_goom_p); + if (rotate_param < 0.0) + rotate_param = 0.0; + rotate_param += FVAL(info->sound.goom_power_p); + + rotate_coef = 4.0 + FVAL(info->sound.goom_power_p) * 6.0; + data->ftheta = (data->ftheta + rotate_coef * sin(rotate_param * 6.3)); + data->theta = ((unsigned int)data->ftheta) % NB_THETA; + data->visibility = (cos(fcycle * 0.001 + 1.5) * sin(fcycle * 0.008) + cos(fcycle * 0.011 + 5.0) - 0.8 + info->sound.speedvar) * 1.5; + if (data->visibility < 0.0) data->visibility = 0.0; + data->factor_p.change_listener(&data->factor_p); + } + + /*if (data->visibility < 0.01) { + switch (goom_irand(info->gRandom, 300)) + { + case 1: + set_motif(data, CONV_MOTIF1); data->inverse_motif = 1; break; + case 2: + set_motif(data, CONV_MOTIF2); data->inverse_motif = 0; break; + } + }*/ + + if ((ff > 0.96f) && (ff < 1.04f)) + memcpy(dest, src, info->screen.size * sizeof(Pixel)); + else + create_output_with_brightness(_this,src,dest,info,iff); +/* + Benching suite... + { + uint64_t before, after; + double timed; + static double stimed = 10000.0; + before = GetTick(); + data->visibility = 1.0; + create_output_with_brightness(_this,src,dest,info,iff); + after = GetTick(); + timed = (double)((after-before) / info->screen.size); + if (timed < stimed) { + stimed = timed; + printf ("CLK = %3.0f CPP\n", stimed); + } + } +*/ +} + +VisualFX convolve_create(void) { + VisualFX vfx = { + init: convolve_init, + free: convolve_free, + apply: convolve_apply, + fx_data: 0 + }; + return vfx; +} diff --git a/veejay-server/libgoom/cpu_info.c b/veejay-server/libgoom/cpu_info.c new file mode 100644 index 00000000..14e150e1 --- /dev/null +++ b/veejay-server/libgoom/cpu_info.c @@ -0,0 +1,71 @@ +/* + * cpu_info.c + * Goom + * + * Created by Guillaume Borios on Sun Dec 28 2003. + * Copyright (c) 2003 iOS. All rights reserved. + * + */ + +#include "cpu_info.h" + +#ifdef CPU_X86 +#include "mmx.h" +#endif + +#ifdef CPU_POWERPC +#include +#include +#endif + +static unsigned int CPU_FLAVOUR = 0; +static unsigned int CPU_NUMBER = 1; +static unsigned int CPU_DETECTED = 0; + +static void autoset_cpu_info (void) +{ + CPU_DETECTED = 1; + +#ifdef CPU_POWERPC + int result; + size_t size; + + result = 0; + size = 4; + if (sysctlbyname("hw.optional.altivec",&result,&size,NULL,NULL) == 0) + { + if (result != 0) CPU_FLAVOUR |= CPU_OPTION_ALTIVEC; + } + + result = 0; + size = 4; + if (sysctlbyname("hw.optional.64bitops",&result,&size,NULL,NULL) == 0) + { + if (result != 0) CPU_FLAVOUR |= CPU_OPTION_64_BITS; + } + + result = 0; + size = 4; + if (sysctlbyname("hw.ncpu",&result,&size,NULL,NULL) == 0) + { + if (result != 0) CPU_NUMBER = result; + } +#endif /* CPU_POWERPC */ + +#ifdef CPU_X86 + if (mmx_supported()) CPU_FLAVOUR |= CPU_OPTION_MMX; + if (xmmx_supported()) CPU_FLAVOUR |= CPU_OPTION_XMMX; +#endif /* CPU_X86 */ +} + +unsigned int cpu_flavour (void) +{ + if (CPU_DETECTED == 0) autoset_cpu_info(); + return CPU_FLAVOUR; +} + +unsigned int cpu_number (void) +{ + if (CPU_DETECTED == 0) autoset_cpu_info(); + return CPU_NUMBER; +} diff --git a/veejay-server/libgoom/cpu_info.h b/veejay-server/libgoom/cpu_info.h new file mode 100644 index 00000000..81e66b5f --- /dev/null +++ b/veejay-server/libgoom/cpu_info.h @@ -0,0 +1,34 @@ +#ifndef CPU_INFO_H +#define CPU_INFO_H + +/* + * cpu_info.h + * Goom + * + * Created by Guillaume Borios on Sun Dec 28 2003. + * Copyright (c) 2003 iOS. All rights reserved. + * + */ + +#ifdef HAVE_MMX +#ifndef CPU_X86 +#define CPU_X86 +#endif +#endif + +/* Returns the CPU flavour described with the constants below */ +unsigned int cpu_flavour (void); + +#define CPU_OPTION_ALTIVEC 0x1 +#define CPU_OPTION_64_BITS 0x2 +#define CPU_OPTION_MMX 0x4 +#define CPU_OPTION_XMMX 0x8 +#define CPU_OPTION_SSE 0x10 +#define CPU_OPTION_SSE2 0x20 +#define CPU_OPTION_3DNOW 0x40 + + +/* Returns the CPU number */ +unsigned int cpu_number (void); + +#endif diff --git a/veejay-server/libgoom/default_script.goom b/veejay-server/libgoom/default_script.goom new file mode 100644 index 00000000..be64141a --- /dev/null +++ b/veejay-server/libgoom/default_script.goom @@ -0,0 +1,34 @@ +/* + * specify here high-level properties of a flash. + */ + +flash_occurs when (Sound.Goom_Detection > 50%) and (Sound.Sound_Speed > 14%); + +max_flash = 200%; +slow_down_coef = 96%; + +/* + * Here you have the fx's state machin behaviour. + */ + +(locked) ? locked--; + +(not locked) and (flash_occurs) ? +{ + cur_power = Sound_Speed.Goom_Detection; + start flashing_up; +} + +(not locked) and (flashing_up) ? +{ + factor += cur_power * 2 * (speedvar / 4 + 0.95); + if (factor > max_flash) factor = max_flash; + + (not flash_occurs) ? + { + locked = 200; + stop flashing_up; + } +} + +factor *= slow_down_coef; diff --git a/veejay-server/libgoom/default_scripts.h b/veejay-server/libgoom/default_scripts.h new file mode 100644 index 00000000..5984d705 --- /dev/null +++ b/veejay-server/libgoom/default_scripts.h @@ -0,0 +1,6 @@ +#ifndef _DEFAULT_SCRIPTS_H +#define _DEFAULT_SCRIPTS_H + +#define GOOM_MAIN_SCRIPT "" + +#endif diff --git a/veejay-server/libgoom/drawmethods.c b/veejay-server/libgoom/drawmethods.c new file mode 100644 index 00000000..f5cdec4f --- /dev/null +++ b/veejay-server/libgoom/drawmethods.c @@ -0,0 +1,203 @@ +#include "drawmethods.h" + +#define DRAWMETHOD_PLUS(_out,_backbuf,_col) \ +{\ + int tra=0,i=0;\ + unsigned char *bra = (unsigned char*)&(_backbuf);\ + unsigned char *dra = (unsigned char*)&(_out);\ + unsigned char *cra = (unsigned char*)&(_col);\ + for (;i<4;i++) {\ + tra = *cra;\ + tra += *bra;\ + if (tra>255) tra=255;\ + *dra = tra;\ + ++dra;++cra;++bra;\ + }\ +} + +#define DRAWMETHOD DRAWMETHOD_PLUS(*p,*p,col) + +void draw_line (Pixel *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny) +{ + int x, y, dx, dy, yy, xx; + Pixel *p; + + if ((y1 < 0) || (y2 < 0) || (x1 < 0) || (x2 < 0) || (y1 >= screeny) || (y2 >= screeny) || (x1 >= screenx) || (x2 >= screenx)) return; + + /* clip to top edge + if ((y1 < 0) && (y2 < 0)) + return; + + if (y1 < 0) { + x1 += (y1 * (x1 - x2)) / (y2 - y1); + y1 = 0; + } + if (y2 < 0) { + x2 += (y2 * (x1 - x2)) / (y2 - y1); + y2 = 0; + } + + clip to bottom edge + if ((y1 >= screeny) && (y2 >= screeny)) + return; + if (y1 >= screeny) { + x1 -= ((screeny - y1) * (x1 - x2)) / (y2 - y1); + y1 = screeny - 1; + } + if (y2 >= screeny) { + x2 -= ((screeny - y2) * (x1 - x2)) / (y2 - y1); + y2 = screeny - 1; + } + clip to left edge + if ((x1 < 0) && (x2 < 0)) + return; + if (x1 < 0) { + y1 += (x1 * (y1 - y2)) / (x2 - x1); + x1 = 0; + } + if (x2 < 0) { + y2 += (x2 * (y1 - y2)) / (x2 - x1); + x2 = 0; + } + clip to right edge + if ((x1 >= screenx) && (x2 >= screenx)) + return; + if (x1 >= screenx) { + y1 -= ((screenx - x1) * (y1 - y2)) / (x2 - x1); + x1 = screenx - 1; + } + if (x2 >= screenx) { + y2 -= ((screenx - x2) * (y1 - y2)) / (x2 - x1); + x2 = screenx - 1; + } + */ + + dx = x2 - x1; + dy = y2 - y1; + if (x1 > x2) { + int tmp; + + tmp = x1; + x1 = x2; + x2 = tmp; + tmp = y1; + y1 = y2; + y2 = tmp; + dx = x2 - x1; + dy = y2 - y1; + } + + /* vertical line */ + if (dx == 0) { + if (y1 < y2) { + p = &(data[(screenx * y1) + x1]); + for (y = y1; y <= y2; y++) { + DRAWMETHOD; + p += screenx; + } + } + else { + p = &(data[(screenx * y2) + x1]); + for (y = y2; y <= y1; y++) { + DRAWMETHOD; + p += screenx; + } + } + return; + } + /* horizontal line */ + if (dy == 0) { + if (x1 < x2) { + p = &(data[(screenx * y1) + x1]); + for (x = x1; x <= x2; x++) { + DRAWMETHOD; + p++; + } + return; + } + else { + p = &(data[(screenx * y1) + x2]); + for (x = x2; x <= x1; x++) { + DRAWMETHOD; + p++; + } + return; + } + } + /* 1 */ + /* \ */ + /* \ */ + /* 2 */ + if (y2 > y1) { + /* steep */ + if (dy > dx) { + dx = ((dx << 16) / dy); + x = x1 << 16; + for (y = y1; y <= y2; y++) { + xx = x >> 16; + p = &(data[(screenx * y) + xx]); + DRAWMETHOD; + if (xx < (screenx - 1)) { + p++; + /* DRAWMETHOD; */ + } + x += dx; + } + return; + } + /* shallow */ + else { + dy = ((dy << 16) / dx); + y = y1 << 16; + for (x = x1; x <= x2; x++) { + yy = y >> 16; + p = &(data[(screenx * yy) + x]); + DRAWMETHOD; + if (yy < (screeny - 1)) { + p += screeny; + /* DRAWMETHOD; */ + } + y += dy; + } + } + } + /* 2 */ + /* / */ + /* / */ + /* 1 */ + else { + /* steep */ + if (-dy > dx) { + dx = ((dx << 16) / -dy); + x = (x1 + 1) << 16; + for (y = y1; y >= y2; y--) { + xx = x >> 16; + p = &(data[(screenx * y) + xx]); + DRAWMETHOD; + if (xx < (screenx - 1)) { + p--; + /* DRAWMETHOD; */ + } + x += dx; + } + return; + } + /* shallow */ + else { + dy = ((dy << 16) / dx); + y = y1 << 16; + for (x = x1; x <= x2; x++) { + yy = y >> 16; + p = &(data[(screenx * yy) + x]); + DRAWMETHOD; + if (yy < (screeny - 1)) { + p += screeny; + /* DRAWMETHOD; */ + } + y += dy; + } + return; + } + } +} + diff --git a/veejay-server/libgoom/drawmethods.h b/veejay-server/libgoom/drawmethods.h new file mode 100644 index 00000000..76ad6ca0 --- /dev/null +++ b/veejay-server/libgoom/drawmethods.h @@ -0,0 +1,9 @@ +#ifndef _DRAWMETHODS_H +#define _DRAWMETHODS_H + +#include "goom_config.h" +#include "goom_graphic.h" + +void draw_line (Pixel *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny); + +#endif /* _DRAWMETHODS_H */ diff --git a/veejay-server/libgoom/empty_script.goom b/veejay-server/libgoom/empty_script.goom new file mode 100644 index 00000000..e69de29b diff --git a/veejay-server/libgoom/filter_test/mmx.h b/veejay-server/libgoom/filter_test/mmx.h new file mode 100644 index 00000000..7067bf34 --- /dev/null +++ b/veejay-server/libgoom/filter_test/mmx.h @@ -0,0 +1,705 @@ +/* mmx.h + + MultiMedia eXtensions GCC interface library for IA32. + + To use this library, simply include this header file + and compile with GCC. You MUST have inlining enabled + in order for mmx_ok() to work; this can be done by + simply using -O on the GCC command line. + + Compiling with -DMMX_TRACE will cause detailed trace + output to be sent to stderr for each mmx operation. + This adds lots of code, and obviously slows execution to + a crawl, but can be very useful for debugging. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR ANY PARTICULAR PURPOSE. + + 1997-99 by H. Dietz and R. Fisher + + Notes: + It appears that the latest gas has the pand problem fixed, therefore + I'll undefine BROKEN_PAND by default. +*/ + +#ifndef _MMX_H +#define _MMX_H + +/* Warning: at this writing, the version of GAS packaged + with most Linux distributions does not handle the + parallel AND operation mnemonic correctly. If the + symbol BROKEN_PAND is defined, a slower alternative + coding will be used. If execution of mmxtest results + in an illegal instruction fault, define this symbol. +*/ +#undef BROKEN_PAND + + +/* The type of an value that fits in an MMX register + (note that long long constant values MUST be suffixed + by LL and unsigned long long values by ULL, lest + they be truncated by the compiler) +*/ +typedef union { + long long q; /* Quadword (64-bit) value */ + unsigned long long uq; /* Unsigned Quadword */ + int d[2]; /* 2 Doubleword (32-bit) values */ + unsigned int ud[2]; /* 2 Unsigned Doubleword */ + short w[4]; /* 4 Word (16-bit) values */ + unsigned short uw[4]; /* 4 Unsigned Word */ + char b[8]; /* 8 Byte (8-bit) values */ + unsigned char ub[8]; /* 8 Unsigned Byte */ + float s[2]; /* Single-precision (32-bit) value */ +} __attribute__ ((aligned (8))) mmx_t; /* On an 8-byte (64-bit) boundary */ + + + +/* Function to test if multimedia instructions are supported... +*/ +inline extern int +mm_support(void) +{ + /* Returns 1 if MMX instructions are supported, + 3 if Cyrix MMX and Extended MMX instructions are supported + 5 if AMD MMX and 3DNow! instructions are supported + 0 if hardware does not support any of these + */ + register int rval = 0; + + __asm__ __volatile__ ( + /* See if CPUID instruction is supported ... */ + /* ... Get copies of EFLAGS into eax and ecx */ + "pushf\n\t" + "popl %%eax\n\t" + "movl %%eax, %%ecx\n\t" + + /* ... Toggle the ID bit in one copy and store */ + /* to the EFLAGS reg */ + "xorl $0x200000, %%eax\n\t" + "push %%eax\n\t" + "popf\n\t" + + /* ... Get the (hopefully modified) EFLAGS */ + "pushf\n\t" + "popl %%eax\n\t" + + /* ... Compare and test result */ + "xorl %%eax, %%ecx\n\t" + "testl $0x200000, %%ecx\n\t" + "jz NotSupported1\n\t" /* CPUID not supported */ + + + /* Get standard CPUID information, and + go to a specific vendor section */ + "movl $0, %%eax\n\t" + "cpuid\n\t" + + /* Check for Intel */ + "cmpl $0x756e6547, %%ebx\n\t" + "jne TryAMD\n\t" + "cmpl $0x49656e69, %%edx\n\t" + "jne TryAMD\n\t" + "cmpl $0x6c65746e, %%ecx\n" + "jne TryAMD\n\t" + "jmp Intel\n\t" + + /* Check for AMD */ + "\nTryAMD:\n\t" + "cmpl $0x68747541, %%ebx\n\t" + "jne TryCyrix\n\t" + "cmpl $0x69746e65, %%edx\n\t" + "jne TryCyrix\n\t" + "cmpl $0x444d4163, %%ecx\n" + "jne TryCyrix\n\t" + "jmp AMD\n\t" + + /* Check for Cyrix */ + "\nTryCyrix:\n\t" + "cmpl $0x69727943, %%ebx\n\t" + "jne NotSupported2\n\t" + "cmpl $0x736e4978, %%edx\n\t" + "jne NotSupported3\n\t" + "cmpl $0x64616574, %%ecx\n\t" + "jne NotSupported4\n\t" + /* Drop through to Cyrix... */ + + + /* Cyrix Section */ + /* See if extended CPUID level 80000001 is supported */ + /* The value of CPUID/80000001 for the 6x86MX is undefined + according to the Cyrix CPU Detection Guide (Preliminary + Rev. 1.01 table 1), so we'll check the value of eax for + CPUID/0 to see if standard CPUID level 2 is supported. + According to the table, the only CPU which supports level + 2 is also the only one which supports extended CPUID levels. + */ + "cmpl $0x2, %%eax\n\t" + "jne MMXtest\n\t" /* Use standard CPUID instead */ + + /* Extended CPUID supported (in theory), so get extended + features */ + "movl $0x80000001, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%eax\n\t" /* Test for MMX */ + "jz NotSupported5\n\t" /* MMX not supported */ + "testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */ + "jnz EMMXSupported\n\t" + "movl $1, %0:\n\n\t" /* MMX Supported */ + "jmp Return\n\n" + "EMMXSupported:\n\t" + "movl $3, %0:\n\n\t" /* EMMX and MMX Supported */ + "jmp Return\n\t" + + + /* AMD Section */ + "AMD:\n\t" + + /* See if extended CPUID is supported */ + "movl $0x80000000, %%eax\n\t" + "cpuid\n\t" + "cmpl $0x80000000, %%eax\n\t" + "jl MMXtest\n\t" /* Use standard CPUID instead */ + + /* Extended CPUID supported, so get extended features */ + "movl $0x80000001, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%edx\n\t" /* Test for MMX */ + "jz NotSupported6\n\t" /* MMX not supported */ + "testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */ + "jnz ThreeDNowSupported\n\t" + "movl $1, %0:\n\n\t" /* MMX Supported */ + "jmp Return\n\n" + "ThreeDNowSupported:\n\t" + "movl $5, %0:\n\n\t" /* 3DNow! and MMX Supported */ + "jmp Return\n\t" + + + /* Intel Section */ + "Intel:\n\t" + + /* Check for MMX */ + "MMXtest:\n\t" + "movl $1, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%edx\n\t" /* Test for MMX */ + "jz NotSupported7\n\t" /* MMX Not supported */ + "movl $1, %0:\n\n\t" /* MMX Supported */ + "jmp Return\n\t" + + /* Nothing supported */ + "\nNotSupported1:\n\t" + "#movl $101, %0:\n\n\t" + "\nNotSupported2:\n\t" + "#movl $102, %0:\n\n\t" + "\nNotSupported3:\n\t" + "#movl $103, %0:\n\n\t" + "\nNotSupported4:\n\t" + "#movl $104, %0:\n\n\t" + "\nNotSupported5:\n\t" + "#movl $105, %0:\n\n\t" + "\nNotSupported6:\n\t" + "#movl $106, %0:\n\n\t" + "\nNotSupported7:\n\t" + "#movl $107, %0:\n\n\t" + "movl $0, %0:\n\n\t" + + "Return:\n\t" + : "=a" (rval) + : /* no input */ + : "eax", "ebx", "ecx", "edx" + ); + + /* Return */ + return(rval); +} + +/* Function to test if mmx instructions are supported... +*/ +inline extern int +mmx_ok(void) +{ + /* Returns 1 if MMX instructions are supported, 0 otherwise */ + return ( mm_support() & 0x1 ); +} + + +/* Helper functions for the instruction macros that follow... + (note that memory-to-register, m2r, instructions are nearly + as efficient as register-to-register, r2r, instructions; + however, memory-to-memory instructions are really simulated + as a convenience, and are only 1/3 as efficient) +*/ +#ifdef MMX_TRACE + +/* Include the stuff for printing a trace to stderr... +*/ + +#include + +#define mmx_i2r(op, imm, reg) \ + { \ + mmx_t mmx_trace; \ + mmx_trace.uq = (imm); \ + printf(#op "_i2r(" #imm "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#reg "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (imm)); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#reg "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_m2r(op, mem, reg) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (mem); \ + printf(#op "_m2r(" #mem "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#reg "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (mem)); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#reg "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_r2m(op, reg, mem) \ + { \ + mmx_t mmx_trace; \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#op "_r2m(" #reg "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + mmx_trace = (mem); \ + printf(#mem "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=X" (mem) \ + : /* nothing */ ); \ + mmx_trace = (mem); \ + printf(#mem "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_r2r(op, regs, regd) \ + { \ + mmx_t mmx_trace; \ + __asm__ __volatile__ ("movq %%" #regs ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#op "_r2r(" #regs "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #regd ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#regd "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd); \ + __asm__ __volatile__ ("movq %%" #regd ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#regd "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_m2m(op, mems, memd) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (mems); \ + printf(#op "_m2m(" #mems "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + mmx_trace = (memd); \ + printf(#memd "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (memd) \ + : "X" (mems)); \ + mmx_trace = (memd); \ + printf(#memd "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#else + +/* These macros are a lot simpler without the tracing... +*/ + +#define mmx_i2r(op, imm, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (imm) ) + +#define mmx_m2r(op, mem, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (mem)) + +#define mmx_r2m(op, reg, mem) \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=X" (mem) \ + : /* nothing */ ) + +#define mmx_r2r(op, regs, regd) \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd) + +#define mmx_m2m(op, mems, memd) \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (memd) \ + : "X" (mems)) + +#endif + + +/* 1x64 MOVe Quadword + (this is both a load and a store... + in fact, it is the only way to store) +*/ +#define movq_m2r(var, reg) mmx_m2r(movq, var, reg) +#define movq_r2m(reg, var) mmx_r2m(movq, reg, var) +#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) +#define movq(vars, vard) \ + __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + +/* 1x32 MOVe Doubleword + (like movq, this is both load and store... + but is most useful for moving things between + mmx registers and ordinary registers) +*/ +#define movd_m2r(var, reg) mmx_m2r(movd, var, reg) +#define movd_r2m(reg, var) mmx_r2m(movd, reg, var) +#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) +#define movd(vars, vard) \ + __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ + "movd %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + +/* 2x32, 4x16, and 8x8 Parallel ADDs +*/ +#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg) +#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd) +#define paddd(vars, vard) mmx_m2m(paddd, vars, vard) + +#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg) +#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd) +#define paddw(vars, vard) mmx_m2m(paddw, vars, vard) + +#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg) +#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd) +#define paddb(vars, vard) mmx_m2m(paddb, vars, vard) + + +/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic +*/ +#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg) +#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd) +#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard) + +#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg) +#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd) +#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard) + + +/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic +*/ +#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg) +#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd) +#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard) + +#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg) +#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd) +#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel SUBs +*/ +#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg) +#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd) +#define psubd(vars, vard) mmx_m2m(psubd, vars, vard) + +#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg) +#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd) +#define psubw(vars, vard) mmx_m2m(psubw, vars, vard) + +#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg) +#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd) +#define psubb(vars, vard) mmx_m2m(psubb, vars, vard) + + +/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic +*/ +#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg) +#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd) +#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard) + +#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg) +#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd) +#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard) + + +/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic +*/ +#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg) +#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd) +#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard) + +#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg) +#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd) +#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard) + + +/* 4x16 Parallel MULs giving Low 4x16 portions of results +*/ +#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg) +#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd) +#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard) + + +/* 4x16 Parallel MULs giving High 4x16 portions of results +*/ +#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg) +#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd) +#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard) + + +/* 4x16->2x32 Parallel Mul-ADD + (muls like pmullw, then adds adjacent 16-bit fields + in the multiply result to make the final 2x32 result) +*/ +#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg) +#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd) +#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard) + + +/* 1x64 bitwise AND +*/ +#ifdef BROKEN_PAND +#define pand_m2r(var, reg) \ + { \ + mmx_m2r(pandn, (mmx_t) -1LL, reg); \ + mmx_m2r(pandn, var, reg); \ + } +#define pand_r2r(regs, regd) \ + { \ + mmx_m2r(pandn, (mmx_t) -1LL, regd); \ + mmx_r2r(pandn, regs, regd) \ + } +#define pand(vars, vard) \ + { \ + movq_m2r(vard, mm0); \ + mmx_m2r(pandn, (mmx_t) -1LL, mm0); \ + mmx_m2r(pandn, vars, mm0); \ + movq_r2m(mm0, vard); \ + } +#else +#define pand_m2r(var, reg) mmx_m2r(pand, var, reg) +#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd) +#define pand(vars, vard) mmx_m2m(pand, vars, vard) +#endif + + +/* 1x64 bitwise AND with Not the destination +*/ +#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg) +#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd) +#define pandn(vars, vard) mmx_m2m(pandn, vars, vard) + + +/* 1x64 bitwise OR +*/ +#define por_m2r(var, reg) mmx_m2r(por, var, reg) +#define por_r2r(regs, regd) mmx_r2r(por, regs, regd) +#define por(vars, vard) mmx_m2m(por, vars, vard) + + +/* 1x64 bitwise eXclusive OR +*/ +#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg) +#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd) +#define pxor(vars, vard) mmx_m2m(pxor, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality + (resulting fields are either 0 or -1) +*/ +#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg) +#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd) +#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard) + +#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg) +#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd) +#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard) + +#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg) +#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd) +#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than + (resulting fields are either 0 or -1) +*/ +#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg) +#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd) +#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard) + +#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg) +#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd) +#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard) + +#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg) +#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd) +#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard) + + +/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical +*/ +#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg) +#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg) +#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd) +#define psllq(vars, vard) mmx_m2m(psllq, vars, vard) + +#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg) +#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg) +#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd) +#define pslld(vars, vard) mmx_m2m(pslld, vars, vard) + +#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg) +#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg) +#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd) +#define psllw(vars, vard) mmx_m2m(psllw, vars, vard) + + +/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical +*/ +#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg) +#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg) +#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd) +#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard) + +#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg) +#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg) +#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd) +#define psrld(vars, vard) mmx_m2m(psrld, vars, vard) + +#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg) +#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg) +#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd) +#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard) + + +/* 2x32 and 4x16 Parallel Shift Right Arithmetic +*/ +#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg) +#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg) +#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd) +#define psrad(vars, vard) mmx_m2m(psrad, vars, vard) + +#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg) +#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg) +#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd) +#define psraw(vars, vard) mmx_m2m(psraw, vars, vard) + + +/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate + (packs source and dest fields into dest in that order) +*/ +#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg) +#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd) +#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard) + +#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg) +#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd) +#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard) + + +/* 4x16->8x8 PACK and Unsigned Saturate + (packs source and dest fields into dest in that order) +*/ +#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg) +#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd) +#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard) + + +/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low + (interleaves low half of dest with low half of source + as padding in each result field) +*/ +#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg) +#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd) +#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard) + +#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg) +#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd) +#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard) + +#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg) +#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd) +#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard) + + +/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High + (interleaves high half of dest with high half of source + as padding in each result field) +*/ +#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg) +#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd) +#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard) + +#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg) +#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd) +#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard) + +#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg) +#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd) +#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard) + + +/* Empty MMx State + (used to clean-up when going from mmx to float use + of the registers that are shared by both; note that + there is no float-to-mmx operation needed, because + only the float tag word info is corruptible) +*/ +#ifdef MMX_TRACE + +#define emms() \ + { \ + printf("emms()\n"); \ + __asm__ __volatile__ ("emms"); \ + } + +#else + +#define emms() __asm__ __volatile__ ("emms") + +#endif + +#endif + diff --git a/veejay-server/libgoom/filter_test/px_py_calc.c b/veejay-server/libgoom/filter_test/px_py_calc.c new file mode 100644 index 00000000..b2cf2d5c --- /dev/null +++ b/veejay-server/libgoom/filter_test/px_py_calc.c @@ -0,0 +1,94 @@ +#include "mmx.h" + +int testD [] = {0x1200, 0x2011, 0, 0x12, 0x5331, 0x8000}; +int testS [] = {0x1205, 0x11, 0x4210, 0x412, 0x121, 0x1211}; + +int ratios [] = {0x8000, 0x4000, 0x1234, 0x6141, 0xffff, 0}; + +int main () { + int nbERROR = 0; + int i,j; + volatile mmx_t ratiox; + + volatile mmx_t sortie; + + /* creation des variables de test */ + volatile int buffratio = 0x8000; + volatile int loop = 0; + volatile int *buffS; + volatile int *buffD; + buffS = malloc (256); + buffD = malloc (256); + + buffS = buffS + (unsigned)buffS % 64; + buffD = buffD + (unsigned)buffD % 64; + + for (j=0;j<6;j++) + for (i=0;i<3;i++) { + + buffratio = ratios[j]; + + buffS[0] = testS[i<<1]; + buffS[1] = testS[(i<<1)+1]; + + buffD[0] = testD[i*2]; + buffD[1] = testD[i*2+1]; + + /* code */ + + ratiox.d[0] = buffratio; + ratiox.d[1] = buffratio; + movq_m2r (ratiox, mm6); + pslld_i2r (16,mm6); + + /* |0hhhhhhh|llllvvvv| + x |00000000|bbbbbbbb| + ================= + |.bl.high|..bl.low| + + |..bh.low|00000000| + ================= + result1 + */ + + /* + * pre : mm6 = [buffratio<<16|buffratio<<16] + */ + + movq_m2r (buffS[loop],mm0); /* mm0 = S */ + movq_m2r (buffD[loop],mm1); /* mm1 = D */ + psubd_r2r (mm0,mm1); /* mm1 = D - S */ + movq_r2r (mm1, mm2); /* mm2 = D - S */ + + pslld_i2r (16,mm1); + mmx_r2r (pmulhuw, mm6, mm1); /* mm1 = ?? */ + pmullw_r2r (mm6, mm2); + + paddd_r2r (mm2, mm1); /* mm1 = (D - S) * buffratio >> 16 */ + pslld_i2r (16,mm0); + + paddd_r2r (mm1, mm0); /* mm0 = S + mm1 */ + psrld_i2r (16, mm0); + movq_r2m (mm0, sortie); + + /* + * post : mm0 = S + ((D-S)*buffratio)>>16 + * modified = mm0,mm1,mm2 + */ + + if ( + (buffS[0] + (((buffD[0]-buffS[0]) * buffratio)>>16) != sortie.d[0]) + | (buffS[1] + (((buffD[1]-buffS[1]) * buffratio)>>16) != sortie.d[1])) + { + nbERROR++; + printf ("\ns : (0x%08x,0x%08x)\n", buffS[0], buffS[1]); + printf ("d : (0x%08x,0x%08x)\n", buffD[0], buffD[1]); + printf ("ratio : (0x%08x,0x%08x)\n", buffratio, buffratio); + + printf ("en mmx : (0x%08x,0x%08x)\n", sortie.d[0], sortie.d[1]); + printf ("en c : (0x%08x,0x%08x)\n", + buffS[0] + (((buffD[0]-buffS[0]) * buffratio)>>16), + buffS[1] + (((buffD[1]-buffS[1]) * buffratio)>>16)); + } + } + printf ("%d errors\n",nbERROR); +} diff --git a/veejay-server/libgoom/filter_test/zoom_filter_mmx-v0.c b/veejay-server/libgoom/filter_test/zoom_filter_mmx-v0.c new file mode 100644 index 00000000..41c5bc5b --- /dev/null +++ b/veejay-server/libgoom/filter_test/zoom_filter_mmx-v0.c @@ -0,0 +1,202 @@ + +#define BUFFPOINTNB 16 +#define BUFFPOINTMASK 0xffff +#define BUFFINCR 0xff + +#define sqrtperte 16 +// faire : a % sqrtperte <=> a & pertemask +#define PERTEMASK 0xf +// faire : a / sqrtperte <=> a >> PERTEDEC +#define PERTEDEC 4 + +//#define MMX_TRACE +#include "mmx.h" + +void zoom_filter_mmx (int prevX, int prevY, + unsigned int *expix1, unsigned int *expix2, + int *lbruS, int *lbruD, int buffratio, + int precalCoef[16][16]) +{ + int bufsize = prevX * prevY; /* taille du buffer */ + volatile int loop; /* variable de boucle */ + + mmx_t *brutS = (mmx_t*)lbruS; /* buffer de transformation source */ + mmx_t *brutD = (mmx_t*)lbruD; /* buffer de transformation dest */ + + volatile mmx_t prevXY; + volatile mmx_t ratiox; + volatile mmx_t interpix; + + volatile mmx_t mask; /* masque des nombres a virgules */ + mask.ud[0] = BUFFPOINTMASK; + mask.ud[1] = BUFFPOINTMASK; + + prevXY.ud[0] = (prevX-1)<>16 format [X|Y] + * modified = mm0,mm1,mm2 + */ + + __asm__ __volatile__ ( + "movq %0,%%mm0\n" + "movq %1,%%mm1\n" + : :"X"(brutS[loop]),"X"(brutD[loop]) + ); /* mm0 = S */ + + psubd_r2r (mm0,mm1); /* mm1 = D - S */ + movq_r2r (mm1, mm2); /* mm2 = D - S */ + + pslld_i2r (16,mm1); + mmx_r2r (pmulhuw, mm6, mm1); /* mm1 = ?? */ + pmullw_r2r (mm6, mm2); + + paddd_r2r (mm2, mm1); /* mm1 = (D - S) * buffratio >> 16 */ + pslld_i2r (16,mm0); + + paddd_r2r (mm1, mm0); /* mm0 = S + mm1 */ + psrld_i2r (16, mm0); + + /* + * pre : mm0 : position vector on screen + * prevXY : coordinate of the lower-right point on screen + * post : clipped mm0 + * modified : mm0,mm1,mm2 + */ + movq_m2r (prevXY,mm1); + pcmpgtd_r2r (mm0, mm1); /* mm0 en X contient : + 1111 si prevXY > px + 0000 si prevXY <= px + (idem pour y) */ + movq_r2r (mm1,mm2); + punpckldq_r2r (mm1,mm1); + punpckhdq_r2r (mm2,mm2); + pand_r2r (mm1, mm0); /* on met a zero la partie qui deborde */ + pand_r2r (mm2, mm0); /* on met a zero la partie qui deborde */ + + /* + * pre : mm0 : clipped position on screen + * post : mm6 : coefs for this position + * mm1 : X vector [0|X] + * modif : eax,ebx + */ + __asm__ __volatile__ ( + "movq %%mm0,%%mm1\n" + "movd %%mm0,%%ebx\n" + "psrlq $32,%%mm1\n" + "movd %%mm1,%%eax\n" + "andl $15,%%eax\n" + "andl $15,%%ebx\n" + + "shll $2,%%eax\n" + "shll $3,%%ebx\n" + + "addl %0,%%eax\n" + + "movd (%%eax,%%ebx,8),%%mm6\n" + ::"X"(precalCoef):"eax","ebx"); + + /* + * pre : mm0 : Y pos [*|Y] + * mm1 : X pos [*|X] + * post : eax : absolute position of the source pixel. + * modif : ebx + */ + psrld_i2r (PERTEDEC,mm0); + psrld_i2r (PERTEDEC,mm1); + __asm__ __volatile__ ( + "movd %%mm1,%%eax\n" + "mull %1\n" + "movd %%mm0,%%ebx\n" + "addl %%ebx,%%eax\n" + "movl %0,%%ebx\n" + "movq (%%ebx,%%eax,4),%%mm0\n" + "addl %1,%%eax\n" + "movq (%%ebx,%%eax,4),%%mm2\n" + + : : "X"(expix1), "X"(prevX):"eax","ebx" + ); + + /* + * coeffs = precalCoef [px & PERTEMASK][py & PERTEMASK]; + * coef en modulo 15 * + * pos = ((px>>PERTEMASK) + prevX * (py>>PERTEMASK)); + */ + + /* recuperation des deux premiers pixels dans mm0 et mm1 */ +// movq_m2r (expix1[pos], mm0); /* b1-v1-r1-a1-b2-v2-r2-a2 */ + movq_r2r (mm0, mm1); /* b1-v1-r1-a1-b2-v2-r2-a2 */ + + /* recuperation des 2 derniers pixels */ +// movq_m2r (expix1[pos+prevX], mm2); + + /* depackage du premier pixel */ + punpcklbw_r2r (mm7, mm0); /* 00-b2-00-v2-00-r2-00-a2 */ + + movq_r2r (mm6, mm5); /* ??-??-??-??-c4-c3-c2-c1 */ + /* depackage du 2ieme pixel */ + punpckhbw_r2r (mm7, mm1); /* 00-b1-00-v1-00-r1-00-a1 */ + + /* extraction des coefficients... */ + punpcklbw_r2r (mm5, mm6); /* c4-c4-c3-c3-c2-c2-c1-c1 */ + movq_r2r (mm6, mm4); /* c4-c4-c3-c3-c2-c2-c1-c1 */ + movq_r2r (mm6, mm5); /* c4-c4-c3-c3-c2-c2-c1-c1 */ + + punpcklbw_r2r (mm5, mm6); /* c2-c2-c2-c2-c1-c1-c1-c1 */ + punpckhbw_r2r (mm5, mm4); /* c4-c4-c4-c4-c3-c3-c3-c3 */ + + movq_r2r (mm6, mm3); /* c2-c2-c2-c2-c1-c1-c1-c1 */ + punpcklbw_r2r (mm7, mm6); /* 00-c1-00-c1-00-c1-00-c1 */ + punpckhbw_r2r (mm7, mm3); /* 00-c2-00-c2-00-c2-00-c2 */ + + /* multiplication des pixels par les coefficients */ + pmullw_r2r (mm6, mm0); /* c1*b2-c1*v2-c1*r2-c1*a2 */ + pmullw_r2r (mm3, mm1); /* c2*b1-c2*v1-c2*r1-c2*a1 */ + paddw_r2r (mm1, mm0); + + /* ...extraction des 2 derniers coefficients */ + movq_r2r (mm4, mm5); /* c4-c4-c4-c4-c3-c3-c3-c3 */ + punpcklbw_r2r (mm7, mm4); /* 00-c3-00-c3-00-c3-00-c3 */ + punpckhbw_r2r (mm7, mm5); /* 00-c4-00-c4-00-c4-00-c4 */ + + /* recuperation des 2 derniers pixels */ + movq_r2r (mm2, mm1); + + /* depackage des pixels */ + punpcklbw_r2r (mm7, mm1); + punpckhbw_r2r (mm7, mm2); + + /* multiplication pas les coeffs */ + pmullw_r2r (mm4, mm1); + pmullw_r2r (mm5, mm2); + + /* ajout des valeurs obtenues la valeur finale */ + paddw_r2r (mm1, mm0); + paddw_r2r (mm2, mm0); + + /* division par 256 = 16+16+16+16, puis repackage du pixel final */ + psrlw_i2r (8, mm0); + packuswb_r2r (mm7, mm0); + + movd_r2m (mm0,expix2[loop]); + + // expix2[loop] = couleur; + ++loop; + } + emms(); /* __asm__ __volatile__ ("emms"); */ +} diff --git a/veejay-server/libgoom/filter_test/zoom_filter_mmx.c b/veejay-server/libgoom/filter_test/zoom_filter_mmx.c new file mode 100644 index 00000000..dd2d022a --- /dev/null +++ b/veejay-server/libgoom/filter_test/zoom_filter_mmx.c @@ -0,0 +1,186 @@ + +#define BUFFPOINTNB 16 +#define BUFFPOINTMASK 0xffff +#define BUFFINCR 0xff + +#define sqrtperte 16 +// faire : a % sqrtperte <=> a & pertemask +#define PERTEMASK 0xf +// faire : a / sqrtperte <=> a >> PERTEDEC +#define PERTEDEC 4 + +//#define MMX_TRACE +#include "mmx.h" + +void zoom_filter_mmx (int prevX, int prevY, + unsigned int *expix1, unsigned int *expix2, + int *lbruS, int *lbruD, int buffratio, + int precalCoef[16][16]) +{ + int bufsize = prevX * prevY; /* taille du buffer */ + volatile int loop; /* variable de boucle */ + + mmx_t *brutS = (mmx_t*)lbruS; /* buffer de transformation source */ + mmx_t *brutD = (mmx_t*)lbruD; /* buffer de transformation dest */ + + int pos; + + volatile mmx_t prevXY; + volatile mmx_t ratiox; + volatile mmx_t interpix; + + volatile mmx_t mask; /* masque des nombres a virgules */ + mask.ud[0] = BUFFPOINTMASK; + mask.ud[1] = BUFFPOINTMASK; + + prevXY.ud[0] = (prevX-1)<>16 format [X|Y] + * modified = mm0,mm1,mm2 + */ + + movq_m2r (brutS[loop],mm0); /* mm0 = S */ + movq_m2r (brutD[loop],mm1); /* mm1 = D */ + psubd_r2r (mm0,mm1); /* mm1 = D - S */ + movq_r2r (mm1, mm2); /* mm2 = D - S */ + + pslld_i2r (16,mm1); + mmx_r2r (pmulhuw, mm6, mm1); /* mm1 = ?? */ + pmullw_r2r (mm6, mm2); + + paddd_r2r (mm2, mm1); /* mm1 = (D - S) * buffratio >> 16 */ + pslld_i2r (16,mm0); + + paddd_r2r (mm1, mm0); /* mm0 = S + mm1 */ + psrld_i2r (16, mm0); + + /* + * pre : mm0 : position vector on screen + * prevXY : coordinate of the lower-right point on screen + * post : clipped mm0 + * modified : mm0,mm1 + */ + movq_m2r (prevXY,mm1); + pcmpgtd_r2r (mm0, mm1); /* mm0 en X contient : + 1111 si prevXY > px + 0000 si prevXY <= px + (idem pour y) */ + pand_r2r (mm1, mm0); /* on met a zero la partie qui deborde */ + + + /* + * pre : mm0 : clipped position on screen + * post : mm6 : coefs for this position + * mm1 : X vector [0|X] + * modif : eax,ebx + */ + __asm__ __volatile__ ( + "movq %%mm0,%%mm1\n" + "movd %%mm0,%%eax\n" + "psrlq $32,%%mm1\n" + "movd %%mm1,%%ebx\n" + "and $15,%%eax\n" + "and $15,%%ebx\n" + "add %0,%%eax\n" + "movd (%%eax,%%ebx,$16),%%mm6\n" + ::"X"(precalCoef):"eax","ebx"); + + /* + * pre : mm0 : Y pos [*|Y] + * mm1 : X pos [*|X] + * post : eax : absolute position of the source pixel. + * modif : ebx + */ + psrld_i2r (PERTEDEC,mm0); + psrld_i2r (PERTEDEC,mm1); + __asm__ __volatile__ ( + "movd %%mm1,%%eax\n" +// "movl %1,%%ebx\n" + "mull %1\n" + "movd %%mm0,%%ebx\n" + "addl %%ebx,%%eax\n" + "movl %%eax,%0\n" + :"=X"(pos):"X"(prevX):"eax","ebx" + ); + + expix2[loop] = expix1[pos]; + /* + * coeffs = precalCoef [px & PERTEMASK][py & PERTEMASK]; + * coef en modulo 15 * + * pos = ((px>>PERTEMASK) + prevX * (py>>PERTEMASK)); + */ +// precal + eax + ebx * 16 + +// movd_m2r (precalCoef[interpix.d[0]][interpix.d[1]],mm6); + + /* recuperation des deux premiers pixels dans mm0 et mm1 */ +// movq_m2r (/*expix1[pos]*/a, mm0); /* b1-v1-r1-a1-b2-v2-r2-a2 */ +// movq_r2r (mm0, mm1); /* b1-v1-r1-a1-b2-v2-r2-a2 */ + + /* depackage du premier pixel */ +// punpcklbw_r2r (mm7, mm0); /* 00-b2-00-v2-00-r2-00-a2 */ + +// movq_r2r (mm6, mm5); /* ??-??-??-??-c4-c3-c2-c1 */ + /* depackage du 2ieme pixel */ +// punpckhbw_r2r (mm7, mm1); /* 00-b1-00-v1-00-r1-00-a1 */ + + /* extraction des coefficients... */ +// punpcklbw_r2r (mm5, mm6); /* c4-c4-c3-c3-c2-c2-c1-c1 */ +// movq_r2r (mm6, mm4); /* c4-c4-c3-c3-c2-c2-c1-c1 */ +// movq_r2r (mm6, mm5); /* c4-c4-c3-c3-c2-c2-c1-c1 */ + +// punpcklbw_r2r (mm5, mm6); /* c2-c2-c2-c2-c1-c1-c1-c1 */ +// punpckhbw_r2r (mm5, mm4); /* c4-c4-c4-c4-c3-c3-c3-c3 */ + +// movq_r2r (mm6, mm3); /* c2-c2-c2-c2-c1-c1-c1-c1 */ +// punpcklbw_r2r (mm7, mm6); /* 00-c1-00-c1-00-c1-00-c1 */ +// punpckhbw_r2r (mm7, mm3); /* 00-c2-00-c2-00-c2-00-c2 */ + + /* multiplication des pixels par les coefficients */ +// pmullw_r2r (mm6, mm0); /* c1*b2-c1*v2-c1*r2-c1*a2 */ +// pmullw_r2r (mm3, mm1); /* c2*b1-c2*v1-c2*r1-c2*a1 */ +// paddw_r2r (mm1, mm0); + + /* ...extraction des 2 derniers coefficients */ +// movq_r2r (mm4, mm5); /* c4-c4-c4-c4-c3-c3-c3-c3 */ +// punpcklbw_r2r (mm7, mm4); /* 00-c3-00-c3-00-c3-00-c3 */ +// punpckhbw_r2r (mm7, mm5); /* 00-c4-00-c4-00-c4-00-c4 */ + + /* recuperation des 2 derniers pixels */ +// movq_m2r (a/*expix1[pos+largeur]*/, mm1); +// movq_r2r (mm1, mm2); + + /* depackage des pixels */ +// punpcklbw_r2r (mm7, mm1); +// punpckhbw_r2r (mm7, mm2); + + /* multiplication pas les coeffs */ +// pmullw_r2r (mm4, mm1); +// pmullw_r2r (mm5, mm2); + + /* ajout des valeurs obtenues la valeur finale */ +// paddw_r2r (mm1, mm0); +// paddw_r2r (mm2, mm0); + + /* division par 256 = 16+16+16+16, puis repackage du pixel final */ +// psrlw_i2r (8, mm0); +// packuswb_r2r (mm7, mm0); + +// movd_r2m (mm0,expix2[loop]); + + // expix2[loop] = couleur; + } + emms(); /* __asm__ __volatile__ ("emms"); */ +} diff --git a/veejay-server/libgoom/filters.c b/veejay-server/libgoom/filters.c new file mode 100644 index 00000000..5e8522bf --- /dev/null +++ b/veejay-server/libgoom/filters.c @@ -0,0 +1,767 @@ +// --- CHUI EN TRAIN DE SUPPRIMER LES EXTERN RESOLX ET C_RESOLY --- + +/* filter.c version 0.7 +* contient les filtres applicable a un buffer +* creation : 01/10/2000 +* -ajout de sinFilter() +* -ajout de zoomFilter() +* -copie de zoomFilter() en zoomFilterRGB(), gerant les 3 couleurs +* -optimisation de sinFilter (utilisant une table de sin) +* -asm +* -optimisation de la procedure de generation du buffer de transformation +* la vitesse est maintenant comprise dans [0..128] au lieu de [0..100] +*/ + +/* #define _DEBUG_PIXEL */ + +#include +#include +#include +#include +#include + +#include "goom_filters.h" +#include "goom_graphic.h" +#include "goom_tools.h" +#include "goom_plugin_info.h" +#include "goom_fx.h" +#include "v3d.h" + +/* TODO : MOVE THIS AWAY !!! */ +/* jeko: j'ai essayer de le virer, mais si on veut les laisser inline c'est un peu lourdo... */ +static inline void setPixelRGB (PluginInfo *goomInfo, Pixel *buffer, Uint x, Uint y, Color c) +{ + Pixel i; + + i.channels.b = c.b; + i.channels.g = c.v; + i.channels.r = c.r; + *(buffer + (x + y * goomInfo->screen.width)) = i; +} + +static inline void setPixelRGB_ (Pixel *buffer, Uint x, Color c) +{ + buffer[x].channels.r = c.r; + buffer[x].channels.g = c.v; + buffer[x].channels.b = c.b; +} + +static inline void getPixelRGB (PluginInfo *goomInfo, Pixel *buffer, Uint x, Uint y, Color * c) +{ + Pixel i = *(buffer + (x + y * goomInfo->screen.width)); + c->b = i.channels.b; + c->v = i.channels.g; + c->r = i.channels.r; +} + +static inline void getPixelRGB_ (Pixel *buffer, Uint x, Color * c) +{ + Pixel i = *(buffer + x); + c->b = i.channels.b; + c->v = i.channels.g; + c->r = i.channels.r; +} +/* END TODO */ + + +/* DEPRECATED */ +// retourne x>>s , en testant le signe de x +//#define ShiftRight(_x,_s) (((_x)<0) ? -(-(_x)>>(_s)) : ((_x)>>(_s))) +//#define EFFECT_DISTORS 4 +//#define EFFECT_DISTORS_SL 2 +//#define INTERLACE_ADD 9 +//#define INTERLACE_AND 0xf +/* END DEPRECATED */ + +#define BUFFPOINTNB 16 +#define BUFFPOINTNBF 16.0f +#define BUFFPOINTMASK 0xffff + +#define sqrtperte 16 +/* faire : a % sqrtperte <=> a & pertemask */ +#define PERTEMASK 0xf +/* faire : a / sqrtperte <=> a >> PERTEDEC */ +#define PERTEDEC 4 + +/* pure c version of the zoom filter */ +static void c_zoom (Pixel *expix1, Pixel *expix2, unsigned int prevX, unsigned int prevY, signed int *brutS, signed int *brutD, int buffratio, int precalCoef[BUFFPOINTNB][BUFFPOINTNB]); + +/* simple wrapper to give it the same proto than the others */ +void zoom_filter_c (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]) { + c_zoom(src, dest, sizeX, sizeY, brutS, brutD, buffratio, precalCoef); +} + +static void generatePrecalCoef (int precalCoef[BUFFPOINTNB][BUFFPOINTNB]); + + +typedef struct _ZOOM_FILTER_FX_WRAPPER_DATA { + + PluginParam enabled_bp; + PluginParameters params; + + unsigned int *coeffs, *freecoeffs; + + signed int *brutS, *freebrutS; /* source */ + signed int *brutD, *freebrutD; /* dest */ + signed int *brutT, *freebrutT; /* temp (en cours de generation) */ + + guint32 zoom_width; + + unsigned int prevX, prevY; + + float general_speed; + int reverse; /* reverse the speed */ + char theMode; + int waveEffect; + int hypercosEffect; + int vPlaneEffect; + int hPlaneEffect; + char noisify; + int middleX, middleY; + + int mustInitBuffers; + int interlace_start; + + /** modif by jeko : fixedpoint : buffration = (16:16) (donc 0<=buffration<=2^16) */ + int buffratio; + int *firedec; + + /** modif d'optim by Jeko : precalcul des 4 coefs resultant des 2 pos */ + int precalCoef[BUFFPOINTNB][BUFFPOINTNB]; + + /** calculatePXandPY statics */ + int wave; + int wavesp; + +} ZoomFilterFXWrapperData; + + + + +static inline v2g zoomVector(ZoomFilterFXWrapperData *data, float X, float Y) +{ + v2g vecteur; + float vx, vy; + float sq_dist = X*X + Y*Y; + + /* sx = (X < 0.0f) ? -1.0f : 1.0f; + sy = (Y < 0.0f) ? -1.0f : 1.0f; + */ + float coefVitesse = (1.0f+ data->general_speed) / 50.0f; + + // Effects + + /* Centralized FX */ + + switch (data->theMode) { + case CRYSTAL_BALL_MODE: + coefVitesse -= (sq_dist-0.3f)/15.0f; + break; + case AMULETTE_MODE: + coefVitesse += sq_dist * 3.5f; + break; + case WAVE_MODE: + coefVitesse += sin(sq_dist*20.0f) / 100.0f; + break; + case SCRUNCH_MODE: + coefVitesse += sq_dist / 10.0f; + break; + //case HYPERCOS1_MODE: + break; + //case HYPERCOS2_MODE: + break; + //case YONLY_MODE: + break; + case SPEEDWAY_MODE: + coefVitesse *= 4.0f * Y; + break; + default: + break; + } + + if (coefVitesse < -2.01f) + coefVitesse = -2.01f; + if (coefVitesse > 2.01f) + coefVitesse = 2.01f; + + vx = coefVitesse * X; + vy = coefVitesse * Y; + + /* Amulette 2 */ + // vx = X * tan(dist); + // vy = Y * tan(dist); + + /* Rotate */ + //vx = (X+Y)*0.1; + //vy = (Y-X)*0.1; + + + // Effects adds-on + + /* Noise */ + if (data->noisify) + { + vx += (((float)random()) / ((float)RAND_MAX) - 0.5f) / 50.0f; + vy += (((float)random()) / ((float)RAND_MAX) - 0.5f) / 50.0f; + } + + /* Hypercos */ + if (data->hypercosEffect) + { + vx += sin(Y*10.0f)/120.0f; + vy += sin(X*10.0f)/120.0f; + } + + /* H Plane */ + if (data->hPlaneEffect) vx += Y * 0.0025f * data->hPlaneEffect; + + /* V Plane */ + if (data->vPlaneEffect) vy += X * 0.0025f * data->vPlaneEffect; + + /* TODO : Water Mode */ + // if (data->waveEffect) + + vecteur.x = vx; + vecteur.y = vy; + + return vecteur; +} + + +/* + * Makes a stripe of a transform buffer (brutT) + * + * The transform is (in order) : + * Translation (-data->middleX, -data->middleY) + * Homothetie (Center : 0,0 Coeff : 2/data->prevX) + */ +static void makeZoomBufferStripe(ZoomFilterFXWrapperData * data, int INTERLACE_INCR) +{ + // Position of the pixel to compute in pixmap coordinates + Uint x, y; + // Where (verticaly) to stop generating the buffer stripe + int maxEnd = (data->interlace_start + INTERLACE_INCR); + // Ratio from pixmap to normalized coordinates + float ratio = 2.0f/((float)data->prevX); + // Ratio from normalized to virtual pixmap coordinates + float inv_ratio = BUFFPOINTNBF/ratio; + float min = ratio/BUFFPOINTNBF; + // Y position of the pixel to compute in normalized coordinates + float Y = ((float)(data->interlace_start - data->middleY)) * ratio; + + maxEnd = data->prevY; + if (maxEnd > (data->interlace_start + INTERLACE_INCR)) + maxEnd = (data->interlace_start + INTERLACE_INCR); + + for (y = data->interlace_start; (y < data->prevY) && ((signed int)yprevX * 2; + float X = - ((float)data->middleX) * ratio; + for (x = 0; x < data->prevX; x++) + { + v2g vector = zoomVector (data, X, Y); + + /* Finish and avoid null displacement */ + if (fabs(vector.x) < min) vector.x = (vector.x < 0.0f) ? -min : min; + if (fabs(vector.y) < min) vector.y = (vector.y < 0.0f) ? -min : min; + + data->brutT[premul_y_prevX] = ((int)((X-vector.x)*inv_ratio)+((int)(data->middleX*BUFFPOINTNB))); + data->brutT[premul_y_prevX+1] = ((int)((Y-vector.y)*inv_ratio)+((int)(data->middleY*BUFFPOINTNB))); + premul_y_prevX += 2; + X += ratio; + } + Y += ratio; + } + data->interlace_start += INTERLACE_INCR; + if (y >= data->prevY-1) data->interlace_start = -1; +} + + +/* + * calculer px et py en fonction de x,y,middleX,middleY et theMode + * px et py indique la nouvelle position (en sqrtperte ieme de pixel) + * (valeur * 16) + + inline void calculatePXandPY (PluginInfo *goomInfo, ZoomFilterFXWrapperData *data, int x, int y, int *px, int *py) + { + if (data->theMode == WATER_MODE) { + int yy; + + yy = y + goom_irand(goomInfo->gRandom, 4) - goom_irand(goomInfo->gRandom, 4) + data->wave / 10; + if (yy < 0) + yy = 0; + if (yy >= (signed int)goomInfo->screen.height) + yy = goomInfo->screen.height - 1; + + *px = (x << 4) + data->firedec[yy] + (data->wave / 10); + *py = (y << 4) + 132 - ((data->vitesse < 131) ? data->vitesse : 130); + + data->wavesp += goom_irand(goomInfo->gRandom, 3) - goom_irand(goomInfo->gRandom, 3); + if (data->wave < -10) + data->wavesp += 2; + if (data->wave > 10) + data->wavesp -= 2; + data->wave += (data->wavesp / 10) + goom_irand(goomInfo->gRandom, 3) - goom_irand(goomInfo->gRandom, 3); + if (data->wavesp > 100) + data->wavesp = (data->wavesp * 9) / 10; + } + else { + int dist = 0, vx9, vy9; + int vx, vy; + int ppx, ppy; + int fvitesse = data->vitesse << 4; + + if (data->noisify) { + x += goom_irand(goomInfo->gRandom, data->noisify) - goom_irand(goomInfo->gRandom, data->noisify); + y += goom_irand(goomInfo->gRandom, data->noisify) - goom_irand(goomInfo->gRandom, data->noisify); + } + vx = (x - data->middleX) << 9; + vy = (y - data->middleY) << 9; + + if (data->hPlaneEffect) + vx += data->hPlaneEffect * (y - data->middleY); + + if (data->vPlaneEffect) + vy += data->vPlaneEffect * (x - data->middleX); + + if (data->waveEffect) { + fvitesse *= + 1024 + + ShiftRight (goomInfo->sintable + [(unsigned short) (dist * 0xffff + EFFECT_DISTORS)], 6); + fvitesse /= 1024; + } + + if (data->hypercosEffect) { + vx += ShiftRight (goomInfo->sintable[(-vy + dist) & 0xffff], 1); + vy += ShiftRight (goomInfo->sintable[(vx + dist) & 0xffff], 1); + } + + vx9 = ShiftRight (vx, 9); + vy9 = ShiftRight (vy, 9); + dist = vx9 * vx9 + vy9 * vy9; + + switch (data->theMode) { + case WAVE_MODE: + fvitesse *= + 1024 + + ShiftRight (goomInfo->sintable + [(unsigned short) (dist * 0xffff * EFFECT_DISTORS)], 6); + fvitesse>>=10; + break; + case CRYSTAL_BALL_MODE: + fvitesse += (dist >> (10-EFFECT_DISTORS_SL)); + break; + case AMULETTE_MODE: + fvitesse -= (dist >> (4 - EFFECT_DISTORS_SL)); + break; + case SCRUNCH_MODE: + fvitesse -= (dist >> (10 - EFFECT_DISTORS_SL)); + break; + case HYPERCOS1_MODE: + vx = vx + ShiftRight (goomInfo->sintable[(-vy + dist) & 0xffff], 1); + vy = vy + ShiftRight (goomInfo->sintable[(vx + dist) & 0xffff], 1); + break; + case HYPERCOS2_MODE: + vx = + vx + ShiftRight (goomInfo->sintable[(-ShiftRight (vy, 1) + dist) & 0xffff], 0); + vy = + vy + ShiftRight (goomInfo->sintable[(ShiftRight (vx, 1) + dist) & 0xffff], 0); + fvitesse = 128 << 4; + break; + case YONLY_MODE: + fvitesse *= 1024 + ShiftRight (goomInfo->sintable[vy & 0xffff], 6); + fvitesse >>= 10; + break; + case SPEEDWAY_MODE: + fvitesse -= (ShiftRight(vy,10-EFFECT_DISTORS_SL)); + break; + } + + if (fvitesse < -3024) + fvitesse = -3024; + + if (vx < 0) // pb avec decalage sur nb negatif + ppx = -(-(vx * fvitesse) >> 16); + // 16 = 9 + 7 (7 = nb chiffre virgule de vitesse * (v = 128 => immobile) + // * * * * * 9 = nb chiffre virgule de vx) + else + ppx = ((vx * fvitesse) >> 16); + + if (vy < 0) + ppy = -(-(vy * fvitesse) >> 16); + else + ppy = ((vy * fvitesse) >> 16); + + *px = (data->middleX << 4) + ppx; + *py = (data->middleY << 4) + ppy; + } + } + */ + + + +static void c_zoom (Pixel *expix1, Pixel *expix2, unsigned int prevX, unsigned int prevY, signed int *brutS, signed int *brutD, + int buffratio, int precalCoef[16][16]) +{ + int myPos, myPos2; + Color couleur; + + unsigned int ax = (prevX - 1) << PERTEDEC, ay = (prevY - 1) << PERTEDEC; + + int bufsize = prevX * prevY * 2; + int bufwidth = prevX; + + expix1[0].val=expix1[prevX-1].val=expix1[prevX*prevY-1].val=expix1[prevX*prevY-prevX].val=0; + + for (myPos = 0; myPos < bufsize; myPos += 2) { + Color col1, col2, col3, col4; + int c1, c2, c3, c4, px, py; + int pos; + int coeffs; + + int brutSmypos = brutS[myPos]; + + myPos2 = myPos + 1; + + px = brutSmypos + (((brutD[myPos] - brutSmypos) * buffratio) >> BUFFPOINTNB); + brutSmypos = brutS[myPos2]; + py = brutSmypos + (((brutD[myPos2] - brutSmypos) * buffratio) >> BUFFPOINTNB); + + if ((py >= ay) || (px >= ax)) { + pos = coeffs = 0; + } else { + pos = ((px >> PERTEDEC) + prevX * (py >> PERTEDEC)); + /* coef en modulo 15 */ + coeffs = precalCoef[px & PERTEMASK][py & PERTEMASK]; + } + getPixelRGB_ (expix1, pos, &col1); + getPixelRGB_ (expix1, pos + 1, &col2); + getPixelRGB_ (expix1, pos + bufwidth, &col3); + getPixelRGB_ (expix1, pos + bufwidth + 1, &col4); + + c1 = coeffs; + c2 = (c1 >> 8) & 0xFF; + c3 = (c1 >> 16) & 0xFF; + c4 = (c1 >> 24) & 0xFF; + c1 = c1 & 0xff; + + couleur.r = col1.r * c1 + col2.r * c2 + col3.r * c3 + col4.r * c4; + if (couleur.r > 5) + couleur.r -= 5; + couleur.r >>= 8; + + couleur.v = col1.v * c1 + col2.v * c2 + col3.v * c3 + col4.v * c4; + if (couleur.v > 5) + couleur.v -= 5; + couleur.v >>= 8; + + couleur.b = col1.b * c1 + col2.b * c2 + col3.b * c3 + col4.b * c4; + if (couleur.b > 5) + couleur.b -= 5; + couleur.b >>= 8; + + setPixelRGB_ (expix2, myPos >> 1, couleur); + } +} + +/** generate the water fx horizontal direction buffer */ +static void generateTheWaterFXHorizontalDirectionBuffer(PluginInfo *goomInfo, ZoomFilterFXWrapperData *data) { + + int loopv; + int decc = goom_irand(goomInfo->gRandom, 8) - 4; + int spdc = goom_irand(goomInfo->gRandom, 8) - 4; + int accel = goom_irand(goomInfo->gRandom, 8) - 4; + + for (loopv = data->prevY; loopv != 0;) { + + loopv--; + data->firedec[loopv] = decc; + decc += spdc / 10; + spdc += goom_irand(goomInfo->gRandom, 3) - goom_irand(goomInfo->gRandom, 3); + + if (decc > 4) + spdc -= 1; + if (decc < -4) + spdc += 1; + + if (spdc > 30) + spdc = spdc - goom_irand(goomInfo->gRandom, 3) + accel / 10; + if (spdc < -30) + spdc = spdc + goom_irand(goomInfo->gRandom, 3) + accel / 10; + + if (decc > 8 && spdc > 1) + spdc -= goom_irand(goomInfo->gRandom, 3) - 2; + + if (decc < -8 && spdc < -1) + spdc += goom_irand(goomInfo->gRandom, 3) + 2; + + if (decc > 8 || decc < -8) + decc = decc * 8 / 9; + + accel += goom_irand(goomInfo->gRandom, 2) - goom_irand(goomInfo->gRandom, 2); + if (accel > 20) + accel -= 2; + if (accel < -20) + accel += 2; + } +} + + + +/** +* Main work for the dynamic displacement map. + * + * Reads data from pix1, write to pix2. + * + * Useful datas for this FX are stored in ZoomFilterData. + * + * If you think that this is a strange function name, let me say that a long time ago, + * there has been a slow version and a gray-level only one. Then came these function, + * fast and workin in RGB colorspace ! nice but it only was applying a zoom to the image. + * So that is why you have this name, for the nostalgy of the first days of goom + * when it was just a tiny program writen in Turbo Pascal on my i486... + */ +void zoomFilterFastRGB (PluginInfo *goomInfo, Pixel * pix1, Pixel * pix2, ZoomFilterData * zf, Uint resx, Uint resy, int switchIncr, float switchMult) +{ + Uint x, y; + + ZoomFilterFXWrapperData *data = (ZoomFilterFXWrapperData*)goomInfo->zoomFilter_fx.fx_data; + + if (!BVAL(data->enabled_bp)) return; + + /** changement de taille **/ + if ((data->prevX != resx) || (data->prevY != resy)) { + data->prevX = resx; + data->prevY = resy; + + if (data->brutS) free (data->freebrutS); + data->brutS = 0; + if (data->brutD) free (data->freebrutD); + data->brutD = 0; + if (data->brutT) free (data->freebrutT); + data->brutT = 0; + + data->middleX = resx / 2; + data->middleY = resy / 2; + data->mustInitBuffers = 1; + if (data->firedec) free (data->firedec); + data->firedec = 0; + } + + if (data->interlace_start != -2) + zf = NULL; + + /** changement de config **/ + if (zf) { + data->reverse = zf->reverse; + data->general_speed = (float)(zf->vitesse-128)/128.0f; + if (data->reverse) data->general_speed = -data->general_speed; + data->middleX = zf->middleX; + data->middleY = zf->middleY; + data->theMode = zf->mode; + data->hPlaneEffect = zf->hPlaneEffect; + data->vPlaneEffect = zf->vPlaneEffect; + data->waveEffect = zf->waveEffect; + data->hypercosEffect = zf->hypercosEffect; + data->noisify = zf->noisify; + data->interlace_start = 0; + } + + + if (data->mustInitBuffers) { + + data->mustInitBuffers = 0; + data->freebrutS = (signed int *) calloc (resx * resy * 2 + 128, sizeof(unsigned int)); + data->brutS = (gint32 *) ((1 + ((uintptr_t) (data->freebrutS)) / 128) * 128); + + data->freebrutD = (signed int *) calloc (resx * resy * 2 + 128, sizeof(unsigned int)); + data->brutD = (gint32 *) ((1 + ((uintptr_t) (data->freebrutD)) / 128) * 128); + + data->freebrutT = (signed int *) calloc (resx * resy * 2 + 128, sizeof(unsigned int)); + data->brutT = (gint32 *) ((1 + ((uintptr_t) (data->freebrutT)) / 128) * 128); + + data->buffratio = 0; + + data->firedec = (int *) malloc (data->prevY * sizeof (int)); + generateTheWaterFXHorizontalDirectionBuffer(goomInfo, data); + + data->interlace_start = 0; + makeZoomBufferStripe(data,resy); + + /* Copy the data from temp to dest and source */ + memcpy(data->brutS,data->brutT,resx * resy * 2 * sizeof(int)); + memcpy(data->brutD,data->brutT,resx * resy * 2 * sizeof(int)); + } + + /* generation du buffer de trans */ + if (data->interlace_start == -1) { + + /* sauvegarde de l'etat actuel dans la nouvelle source + * TODO: write that in MMX (has been done in previous version, but did not follow some new fonctionnalities) */ + y = data->prevX * data->prevY * 2; + for (x = 0; x < y; x += 2) { + int brutSmypos = data->brutS[x]; + int x2 = x + 1; + + data->brutS[x] = brutSmypos + (((data->brutD[x] - brutSmypos) * data->buffratio) >> BUFFPOINTNB); + brutSmypos = data->brutS[x2]; + data->brutS[x2] = brutSmypos + (((data->brutD[x2] - brutSmypos) * data->buffratio) >> BUFFPOINTNB); + } + data->buffratio = 0; + } + + if (data->interlace_start == -1) { + signed int * tmp; + tmp = data->brutD; + data->brutD=data->brutT; + data->brutT=tmp; + tmp = data->freebrutD; + data->freebrutD=data->freebrutT; + data->freebrutT=tmp; + data->interlace_start = -2; + } + + if (data->interlace_start>=0) + { + /* creation de la nouvelle destination */ + makeZoomBufferStripe(data,resy/16); + } + + if (switchIncr != 0) { + data->buffratio += switchIncr; + if (data->buffratio > BUFFPOINTMASK) + data->buffratio = BUFFPOINTMASK; + } + + if (switchMult != 1.0f) { + data->buffratio = (int) ((float) BUFFPOINTMASK * (1.0f - switchMult) + + (float) data->buffratio * switchMult); + } + + data->zoom_width = data->prevX; + + goomInfo->methods.zoom_filter (data->prevX, data->prevY, pix1, pix2, + data->brutS, data->brutD, data->buffratio, data->precalCoef); +} + +static void generatePrecalCoef (int precalCoef[16][16]) +{ + int coefh, coefv; + + for (coefh = 0; coefh < 16; coefh++) { + for (coefv = 0; coefv < 16; coefv++) { + + int i; + int diffcoeffh; + int diffcoeffv; + + diffcoeffh = sqrtperte - coefh; + diffcoeffv = sqrtperte - coefv; + + if (!(coefh || coefv)) { + i = 255; + } + else { + int i1, i2, i3, i4; + + i1 = diffcoeffh * diffcoeffv; + i2 = coefh * diffcoeffv; + i3 = diffcoeffh * coefv; + i4 = coefh * coefv; + + // TODO: faire mieux... + if (i1) i1--; + if (i2) i2--; + if (i3) i3--; + if (i4) i4--; + + i = (i1) | (i2 << 8) | (i3 << 16) | (i4 << 24); + } + precalCoef[coefh][coefv] = i; + } + } +} + +/* VisualFX Wrapper */ + +static void zoomFilterVisualFXWrapper_init (struct _VISUAL_FX *_this, PluginInfo *info) +{ + ZoomFilterFXWrapperData *data = (ZoomFilterFXWrapperData*)malloc(sizeof(ZoomFilterFXWrapperData)); + + data->coeffs = 0; + data->freecoeffs = 0; + data->brutS = 0; + data->freebrutS = 0; + data->brutD = 0; + data->freebrutD = 0; + data->brutT = 0; + data->freebrutT = 0; + data->prevX = 0; + data->prevY = 0; + + data->mustInitBuffers = 1; + data->interlace_start = -2; + + data->general_speed = 0.0f; + data->reverse = 0; + data->theMode = AMULETTE_MODE; + data->waveEffect = 0; + data->hypercosEffect = 0; + data->vPlaneEffect = 0; + data->hPlaneEffect = 0; + data->noisify = 2; + + /** modif by jeko : fixedpoint : buffration = (16:16) (donc 0<=buffration<=2^16) */ + data->buffratio = 0; + data->firedec = 0; + + data->wave = data->wavesp = 0; + + data->enabled_bp = secure_b_param("Enabled", 1); + + data->params = plugin_parameters ("Zoom Filter", 1); + data->params.params[0] = &data->enabled_bp; + + _this->params = &data->params; + _this->fx_data = (void*)data; + + /** modif d'optim by Jeko : precalcul des 4 coefs resultant des 2 pos */ + generatePrecalCoef(data->precalCoef); +} + +static void zoomFilterVisualFXWrapper_free (struct _VISUAL_FX *_this) +{ + free(_this->fx_data); +} + +static void zoomFilterVisualFXWrapper_apply (struct _VISUAL_FX *_this, Pixel *src, Pixel *dest, PluginInfo *info) +{ +} + +VisualFX zoomFilterVisualFXWrapper_create(void) +{ + VisualFX fx; + fx.init = zoomFilterVisualFXWrapper_init; + fx.free = zoomFilterVisualFXWrapper_free; + fx.apply = zoomFilterVisualFXWrapper_apply; + return fx; +} + + +/* TODO : MOVE THIS AWAY */ + +void pointFilter (PluginInfo *goomInfo, Pixel * pix1, Color c, float t1, float t2, float t3, float t4, Uint cycle) +{ + Uint x = (Uint) ((int) (goomInfo->screen.width / 2) + + (int) (t1 * cos ((float) cycle / t3))); + Uint y = (Uint) ((int) (goomInfo->screen.height/2) + + (int) (t2 * sin ((float) cycle / t4))); + + if ((x > 1) && (y > 1) && (x < goomInfo->screen.width - 2) && (y < goomInfo->screen.height - 2)) { + setPixelRGB (goomInfo, pix1, x + 1, y, c); + setPixelRGB (goomInfo, pix1, x, y + 1, c); + setPixelRGB (goomInfo, pix1, x + 1, y + 1, WHITE); + setPixelRGB (goomInfo, pix1, x + 2, y + 1, c); + setPixelRGB (goomInfo, pix1, x + 1, y + 2, c); + } +} diff --git a/veejay-server/libgoom/filters_mmx.s b/veejay-server/libgoom/filters_mmx.s new file mode 100644 index 00000000..765f1588 --- /dev/null +++ b/veejay-server/libgoom/filters_mmx.s @@ -0,0 +1,200 @@ +;// file : mmx_zoom.s +;// author : JC Hoelt +;// +;// history +;// 07/01/2001 : Changing FEMMS to EMMS : slower... but run on intel machines +;// 03/01/2001 : WIDTH and HEIGHT are now variable +;// 28/12/2000 : adding comments to the code, suppress some useless lines +;// 27/12/2000 : reducing memory access... improving performance by 20% +;// coefficients are now on 1 byte +;// 22/12/2000 : Changing data structure +;// 16/12/2000 : AT&T version +;// 14/12/2000 : unrolling loop +;// 12/12/2000 : 64 bits memory access + + +.data + +chaine: + .string "pos = %d\n\0" + .long 0x0 + +thezero: + .long 0x00000000 + .long 0x00000000 + +.text + +.globl mmx_zoom ;// name of the function to call by C program +/* .extern coeffs ;// the transformation buffer */ +.extern expix1,expix2 ;// the source and destination buffer +.extern mmx_zoom_size, zoom_width ;// size of the buffers + +.extern brutS,brutD,buffratio,precalCoef,prevX,prevY + +#define PERTEMASK 15 +/* faire : a / sqrtperte <=> a >> PERTEDEC*/ +#define PERTEDEC 4 + +.align 16 +mmx_zoom: + + pushl %ebp + movl %esp,%ebp + subl $12,%esp + + movl prevX,%eax + decl %eax + sarl $4,%eax + movl %eax,-4(%ebp) + + movl prevY,%eax + decl %eax + sarl $4,%eax + movl %eax,-8(%ebp) + +;// initialisation du mm7 zero + movq (thezero), %mm7 + +movl mmx_zoom_size, %ecx +decl %ecx + +.while: + ;// esi <- nouvelle position + movl brutS, %eax + leal (%eax, %ecx, 8),%eax + + movl (%eax),%edx /* = brutS.px (brutSmypos) */ + movl 4(%eax),%eax /* = brutS.py */ + + movl brutD,%ebx + leal (%ebx, %ecx, 8),%ebx + movl (%ebx),%esi + subl %edx, %esi + imull buffratio,%esi + sarl $16,%esi + addl %edx,%esi /* esi = px */ + + /* eax contient deja brutS.py = le nouveau brutSmypos*/ + /* ebx pointe sur brutD[myPos] */ + movl 4(%ebx),%edi + subl %eax,%edi + imull buffratio,%edi + sarl $16,%edi + addl %eax,%edi /* edi = py */ + +/* pushl %eax + pushl %ebx*/ +/* popl %ebx + popl %eax*/ + + movl %esi,%eax + andl $15,%eax /* eax = coefh */ + movl %edi,%ebx + andl $15,%ebx /* ebx = coefv */ + + leal 0(,%ebx,4),%ebx + sall $6,%eax + addl %ebx,%eax + movl $precalCoef,%ebx +/* movd (%eax,%ebx),%mm6*/ /* mm6 = coeffs */ + + cmpl -8(%ebp),%edi + jge .then1 + cmpl -4(%ebp),%esi + jge .then1 + + sarl $4,%esi + sarl $4,%edi + imull zoom_width,%edi + leal (%esi,%edi),%esi + jmp .finsi1 + +.then1: + movl $0,%esi +.finsi1: + + /** apres ce calcul, %esi = pos, %mm6 = coeffs **/ +/* pushl %esi + pushl $chaine + call printf + addl $8,%esp*/ + + movl expix1,%eax + + ;// recuperation des deux premiers pixels dans mm0 et mm1 +/* movq (%eax,%esi,4), %mm0 /* b1-v1-r1-a1-b2-v2-r2-a2 */ + movq %mm0, %mm1 /* b1-v1-r1-a1-b2-v2-r2-a2 */ + + ;// depackage du premier pixel + punpcklbw %mm7, %mm0 /* 00-b2-00-v2-00-r2-00-a2 */ + + movq %mm6, %mm5 /* ??-??-??-??-c4-c3-c2-c1 */ + ;// depackage du 2ieme pixel + punpckhbw %mm7, %mm1 /* 00-b1-00-v1-00-r1-00-a1 */ + + ;// extraction des coefficients... + punpcklbw %mm5, %mm6 /* c4-c4-c3-c3-c2-c2-c1-c1 */ + movq %mm6, %mm4 /* c4-c4-c3-c3-c2-c2-c1-c1 */ + movq %mm6, %mm5 /* c4-c4-c3-c3-c2-c2-c1-c1 */ + + punpcklbw %mm5, %mm6 /* c2-c2-c2-c2-c1-c1-c1-c1 */ + punpckhbw %mm5, %mm4 /* c4-c4-c4-c4-c3-c3-c3-c3 */ + + movq %mm6, %mm3 /* c2-c2-c2-c2-c1-c1-c1-c1 */ + punpcklbw %mm7, %mm6 /* 00-c1-00-c1-00-c1-00-c1 */ + punpckhbw %mm7, %mm3 /* 00-c2-00-c2-00-c2-00-c2 */ + + ;// multiplication des pixels par les coefficients + pmullw %mm6, %mm0 /* c1*b2-c1*v2-c1*r2-c1*a2 */ + pmullw %mm3, %mm1 /* c2*b1-c2*v1-c2*r1-c2*a1 */ + paddw %mm1, %mm0 + + ;// ...extraction des 2 derniers coefficients + movq %mm4, %mm5 /* c4-c4-c4-c4-c3-c3-c3-c3 */ + punpcklbw %mm7, %mm4 /* 00-c3-00-c3-00-c3-00-c3 */ + punpckhbw %mm7, %mm5 /* 00-c4-00-c4-00-c4-00-c4 */ + + /* ajouter la longueur de ligne a esi */ + addl prevX,%esi + + ;// recuperation des 2 derniers pixels +/* movq (%eax,%esi,4), %mm1*/ + movq %mm1, %mm2 + + ;// depackage des pixels + punpcklbw %mm7, %mm1 + punpckhbw %mm7, %mm2 + + ;// multiplication pas les coeffs + pmullw %mm4, %mm1 + pmullw %mm5, %mm2 + + ;// ajout des valeurs obtenues la valeur finale + paddw %mm1, %mm0 + paddw %mm2, %mm0 + + ;// division par 256 = 16+16+16+16, puis repackage du pixel final + psrlw $8, %mm0 + packuswb %mm7, %mm0 + + ;// passage au suivant + + ;// enregistrement du resultat + movl expix2,%eax +/* movd %mm0,(%eax,%ecx,4)*/ + + decl %ecx + ;// test de fin du tantque + cmpl $0, %ecx ;// 400x300 + + jz .fin_while + jmp .while + +.fin_while: + emms + + movl %ebp,%esp + popl %ebp + + ret ;//The End diff --git a/veejay-server/libgoom/flying_stars_fx.c b/veejay-server/libgoom/flying_stars_fx.c new file mode 100644 index 00000000..0f1e0e73 --- /dev/null +++ b/veejay-server/libgoom/flying_stars_fx.c @@ -0,0 +1,314 @@ +#include "goom_fx.h" +#include "goom_plugin_info.h" +#include "goom_tools.h" + +#include "mathtools.h" + +/* TODO:-- FAIRE PROPREMENT... BOAH... */ +#define NCOL 15 + +/*static const int colval[] = { +0xfdf6f5, +0xfae4e4, +0xf7d1d1, +0xf3b6b5, +0xefa2a2, +0xec9190, +0xea8282, +0xe87575, +0xe46060, +0xe14b4c, +0xde3b3b, +0xdc2d2f, +0xd92726, +0xd81619, +0xd50c09, +0 +}; +*/ +static const int colval[] = { + 0x1416181a, + 0x1419181a, + 0x141f181a, + 0x1426181a, + 0x142a181a, + 0x142f181a, + 0x1436181a, + 0x142f1819, + 0x14261615, + 0x13201411, + 0x111a100a, + 0x0c180508, + 0x08100304, + 0x00050101, + 0x0 +}; + + +/* The different modes of the visual FX. + * Put this values on fx_mode */ +#define FIREWORKS_FX 0 +#define RAIN_FX 1 +#define FOUNTAIN_FX 2 +#define LAST_FX 3 + +typedef struct _FS_STAR { + float x,y; + float vx,vy; + float ax,ay; + float age,vage; +} Star; + +typedef struct _FS_DATA{ + + int fx_mode; + int nbStars; + + int maxStars; + Star *stars; + + float min_age; + float max_age; + + PluginParam min_age_p; + PluginParam max_age_p; + PluginParam nbStars_p; + PluginParam nbStars_limit_p; + PluginParam fx_mode_p; + + PluginParameters params; +} FSData; + +static void fs_init(VisualFX *_this, PluginInfo *info) { + + FSData *data; + data = (FSData*)malloc(sizeof(FSData)); + + data->fx_mode = FIREWORKS_FX; + data->maxStars = 4096; + data->stars = (Star*)malloc(data->maxStars * sizeof(Star)); + data->nbStars = 0; + + data->max_age_p = secure_i_param ("Fireworks Smallest Bombs"); + IVAL(data->max_age_p) = 80; + IMIN(data->max_age_p) = 0; + IMAX(data->max_age_p) = 100; + ISTEP(data->max_age_p) = 1; + + data->min_age_p = secure_i_param ("Fireworks Largest Bombs"); + IVAL(data->min_age_p) = 99; + IMIN(data->min_age_p) = 0; + IMAX(data->min_age_p) = 100; + ISTEP(data->min_age_p) = 1; + + data->nbStars_limit_p = secure_i_param ("Max Number of Particules"); + IVAL(data->nbStars_limit_p) = 512; + IMIN(data->nbStars_limit_p) = 0; + IMAX(data->nbStars_limit_p) = data->maxStars; + ISTEP(data->nbStars_limit_p) = 64; + + data->fx_mode_p = secure_i_param ("FX Mode"); + IVAL(data->fx_mode_p) = data->fx_mode; + IMIN(data->fx_mode_p) = 1; + IMAX(data->fx_mode_p) = 3; + ISTEP(data->fx_mode_p) = 1; + + data->nbStars_p = secure_f_feedback ("Number of Particules (% of Max)"); + + data->params = plugin_parameters ("Particule System", 7); + data->params.params[0] = &data->fx_mode_p; + data->params.params[1] = &data->nbStars_limit_p; + data->params.params[2] = 0; + data->params.params[3] = &data->min_age_p; + data->params.params[4] = &data->max_age_p; + data->params.params[5] = 0; + data->params.params[6] = &data->nbStars_p; + + _this->params = &data->params; + _this->fx_data = (void*)data; +} + +static void fs_free(VisualFX *_this) { + free (_this->fx_data); +} + + +/** + * Cree une nouvelle 'bombe', c'est a dire une particule appartenant a une fusee d'artifice. + */ +static void addABomb (FSData *fs, int mx, int my, float radius, float vage, float gravity, PluginInfo *info) { + + int i = fs->nbStars; + float ro; + int theta; + + if (fs->nbStars >= fs->maxStars) + return; + fs->nbStars++; + + fs->stars[i].x = mx; + fs->stars[i].y = my; + + ro = radius * (float)goom_irand(info->gRandom,100) / 100.0f; + ro *= (float)goom_irand(info->gRandom,100)/100.0f + 1.0f; + theta = goom_irand(info->gRandom,256); + + fs->stars[i].vx = ro * cos256[theta]; + fs->stars[i].vy = -0.2f + ro * sin256[theta]; + + fs->stars[i].ax = 0; + fs->stars[i].ay = gravity; + + fs->stars[i].age = 0; + if (vage < fs->min_age) + vage=fs->min_age; + fs->stars[i].vage = vage; +} + + +/** + * Met a jour la position et vitesse d'une particule. + */ +static void updateStar (Star *s) { + s->x+=s->vx; + s->y+=s->vy; + s->vx+=s->ax; + s->vy+=s->ay; + s->age+=s->vage; +} + + +/** + * Ajoute de nouvelles particules au moment d'un evenement sonore. + */ +static void fs_sound_event_occured(VisualFX *_this, PluginInfo *info) { + + FSData *data = (FSData*)_this->fx_data; + int i; + + int max = (int)((1.0f+info->sound.goomPower)*goom_irand(info->gRandom,150)) + 100; + float radius = (1.0f+info->sound.goomPower) * (float)(goom_irand(info->gRandom,150)+50)/300; + int mx; + int my; + float vage, gravity = 0.02f; + + switch (data->fx_mode) { + case FIREWORKS_FX: + { + double dx,dy; + do { + mx = goom_irand(info->gRandom,info->screen.width); + my = goom_irand(info->gRandom,info->screen.height); + dx = (mx - info->screen.width/2); + dy = (my - info->screen.height/2); + } while (dx*dx + dy*dy < (info->screen.height/2)*(info->screen.height/2)); + vage = data->max_age * (1.0f - info->sound.goomPower); + } + break; + case RAIN_FX: + mx = goom_irand(info->gRandom,info->screen.width); + if (mx > info->screen.width/2) + mx = info->screen.width; + else + mx = 0; + my = -(info->screen.height/3)-goom_irand(info->gRandom,info->screen.width/3); + radius *= 1.5; + vage = 0.002f; + break; + case FOUNTAIN_FX: + my = info->screen.height+2; + vage = 0.001f; + radius += 1.0f; + mx = info->screen.width / 2; + gravity = 0.04f; + break; + default: + return; + /* my = i R A N D (info->screen.height); vage = 0.01f; */ + } + + radius *= info->screen.height / 200.0f; /* why 200 ? because the FX was developped on 320x200 */ + max *= info->screen.height / 200.0f; + + if (info->sound.timeSinceLastBigGoom < 1) { + radius *= 1.5; + max *= 2; + } + for (i=0;ifx_data; + + /* Get the new parameters values */ + data->min_age = 1.0f - (float)IVAL(data->min_age_p)/100.0f; + data->max_age = 1.0f - (float)IVAL(data->max_age_p)/100.0f; + FVAL(data->nbStars_p) = (float)data->nbStars / (float)data->maxStars; + data->nbStars_p.change_listener(&data->nbStars_p); + data->maxStars = IVAL(data->nbStars_limit_p); + data->fx_mode = IVAL(data->fx_mode_p); + + /* look for events */ + if (info->sound.timeSinceLastGoom < 1) { + fs_sound_event_occured(_this, info); + if (goom_irand(info->gRandom,20)==1) { + IVAL(data->fx_mode_p) = goom_irand(info->gRandom,(LAST_FX*3)); + data->fx_mode_p.change_listener(&data->fx_mode_p); + } + } + + /* update particules */ + for (i=0;inbStars;++i) { + updateStar(&data->stars[i]); + + /* dead particule */ + if (data->stars[i].age>=NCOL) + continue; + + /* choose the color of the particule */ + col = colval[(int)data->stars[i].age]; + + /* draws the particule */ + info->methods.draw_line(dest,(int)data->stars[i].x,(int)data->stars[i].y, + (int)(data->stars[i].x-data->stars[i].vx*6), + (int)(data->stars[i].y-data->stars[i].vy*6), + col, + (int)info->screen.width, (int)info->screen.height); + info->methods.draw_line(dest,(int)data->stars[i].x,(int)data->stars[i].y, + (int)(data->stars[i].x-data->stars[i].vx*2), + (int)(data->stars[i].y-data->stars[i].vy*2), + col, + (int)info->screen.width, (int)info->screen.height); + } + + /* look for dead particules */ + for (i=0;inbStars;) { + + if ((data->stars[i].x > info->screen.width + 64) + ||((data->stars[i].vy>=0)&&(data->stars[i].y - 16*data->stars[i].vy > info->screen.height)) + ||(data->stars[i].x < -64) + ||(data->stars[i].age>=NCOL)) { + data->stars[i] = data->stars[data->nbStars-1]; + data->nbStars--; + } + else ++i; + } +} + +VisualFX flying_star_create(void) { + VisualFX vfx = { + init: fs_init, + free: fs_free, + apply: fs_apply, + fx_data: 0 + }; + return vfx; +} diff --git a/veejay-server/libgoom/gfontlib.c b/veejay-server/libgoom/gfontlib.c new file mode 100644 index 00000000..710c2352 --- /dev/null +++ b/veejay-server/libgoom/gfontlib.c @@ -0,0 +1,229 @@ +#include "goom_config.h" +#include "gfontrle.h" +#include "gfontlib.h" +#include +#include + +static Pixel ***font_chars; +static int *font_width; +static int *font_height; +static Pixel ***small_font_chars; +static int *small_font_width; +static int *small_font_height; + +void gfont_load (void) { + unsigned char *gfont; + unsigned int i = 0, j = 0; + unsigned int nba = 0; + unsigned int current = 32; + int *font_pos; + /* decompress le rle */ + + + + gfont = malloc (the_font.width*the_font.height*the_font.bytes_per_pixel); + while (i>2)<<(ROUGE*8))| + (((g1 + g2 + g3 + g4)>>2)<<(VERT*8))| + (((b1 + b2 + b3 + b4)>>2)<<(BLEU*8))| + (((a1 + a2 + a3 + a4)>>2)<<(ALPHA*8)); + } + } + } + + /* definir les lettres restantes */ + + for (i=0;i<256;i++) { + if (font_chars[i]==0) { + font_chars[i]=font_chars[42]; + small_font_chars[i]=small_font_chars[42]; + font_width[i]=font_width[42]; + font_pos[i]=font_pos[42]; + font_height[i]=font_height[42]; + small_font_width[i]=small_font_width[42]; + small_font_height[i]=small_font_height[42]; + } + } + + font_width [32] = (the_font.height / 2) - 1; + small_font_width [32] = font_width [32]/2; + font_chars [32] = 0; + small_font_chars [32] = 0; +} + +void goom_draw_text (Pixel * buf,int resolx,int resoly, + int x, int y, + const char *str, float charspace, int center) { + float fx = (float) x; + int fin = 0; + + Pixel ***cur_font_chars; + int *cur_font_width; + int *cur_font_height; + + if (resolx>320) + { + /* printf("use big\n"); */ + cur_font_chars = font_chars; + cur_font_width = font_width; + cur_font_height = font_height; + } + else + { + /* printf ("use small\n"); */ + cur_font_chars = small_font_chars; + cur_font_width = small_font_width; + cur_font_height = small_font_height; + } + + if (cur_font_chars == NULL) + return ; + + if (center) { + unsigned char *tmp = (unsigned char*)str; + float lg = -charspace; + + while (*tmp != '\0') + lg += cur_font_width[*(tmp++)] + charspace; + + fx -= lg / 2; + } + + while (!fin) { + unsigned char c = *str; + + x = (int) fx; + + if (c == '\0') + fin = 1; + else if (cur_font_chars[c]==0) { + fx += cur_font_width[c] + charspace; + } + else { + int xx, yy; + int xmin = x; + int xmax = x + cur_font_width[c]; + int ymin = y - cur_font_height[c]; + int ymax = y; + + yy = ymin; + + if (xmin < 0) + xmin = 0; + + if (xmin >= resolx - 1) + return; + + if (xmax >= (int) resolx) + xmax = resolx - 1; + + if (yy < 0) + yy = 0; + + if (yy <= (int) resoly - 1) { + if (ymax >= (int) resoly - 1) + ymax = resoly - 1; + + for (; yy < ymax; yy++) + for (xx = xmin; xx < xmax; xx++) + { + Pixel color = cur_font_chars[c][yy - ymin][xx - x]; + Pixel transparency; + transparency.val = color.val & A_CHANNEL; + if (transparency.val) + { + if (transparency.val==A_CHANNEL) buf[yy * resolx + xx] = color; + else + { + Pixel back = buf[yy * resolx + xx]; + unsigned int a1 = color.channels.a; + unsigned int a2 = 255 - a1; + buf[yy * resolx + xx].channels.r = (unsigned char)((((unsigned int)color.channels.r * a1) + ((unsigned int)back.channels.r * a2)) >> 8); + buf[yy * resolx + xx].channels.g = (unsigned char)((((unsigned int)color.channels.g * a1) + ((unsigned int)back.channels.g * a2)) >> 8); + buf[yy * resolx + xx].channels.b = (unsigned char)((((unsigned int)color.channels.b * a1) + ((unsigned int)back.channels.b * a2)) >> 8); + } + } + } + } + fx += cur_font_width[c] + charspace; + } + str++; + } +} diff --git a/veejay-server/libgoom/gfontlib.h b/veejay-server/libgoom/gfontlib.h new file mode 100644 index 00000000..0520b7da --- /dev/null +++ b/veejay-server/libgoom/gfontlib.h @@ -0,0 +1,10 @@ +#ifndef _GFONTLIB_H +#define _GFONTLIB_H + +#include "goom_graphic.h" + +void gfont_load (void); +void goom_draw_text (Pixel * buf,int resolx,int resoly, int x, int y, + const char *str, float chspace, int center); + +#endif diff --git a/veejay-server/libgoom/gfontrle.c b/veejay-server/libgoom/gfontrle.c new file mode 100644 index 00000000..8a4b32cd --- /dev/null +++ b/veejay-server/libgoom/gfontrle.c @@ -0,0 +1,2500 @@ +/* RGBA C-Source image dump (with zRLE compression) */ + +const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; + unsigned int rle_size; + unsigned char rle_pixel [49725]; +} the_font = { +1277, 21, 4, 49725, { +121,17,164,255,121,17,164,255,121,17,164,255,121,17,164,255,0,8,121,17, +164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,36,121,17,164, +0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,52,121,17,164,0, +1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1, +121,17,164,255,121,17,164,255,121,17,164,255,0,52,121,17,164,0,1,121, +17,164,255,121,17,164,255,121,17,164,255,0,52,121,17,164,0,1,121,17, +164,255,121,17,164,255,121,17,164,255,0,12,121,17,164,0,1,121,17,164, +255,121,17,164,255,121,17,164,255,0,20,121,17,164,0,1,121,17,164,255, +121,17,164,255,121,17,164,255,0,20,121,17,164,0,1,121,17,164,255,121, +17,164,255,121,17,164,255,0,52,121,17,164,0,1,121,17,164,255,121,17, +164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164, +255,121,17,164,255,0,12,121,17,164,0,1,121,17,164,255,121,17,164,255, +121,17,164,255,0,36,121,17,164,0,1,121,17,164,255,121,17,164,255,121, +17,164,255,0,12,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17, +164,255,0,36,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164, +255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255, +0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0, +44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44, +121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121, +17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17, +164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164, +0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0, +1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1, +121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121, +17,164,255,121,17,164,255,121,17,164,255,0,12,121,17,164,0,1,121,17, +164,255,121,17,164,255,121,17,164,255,0,12,121,17,164,0,1,121,17,164, +255,121,17,164,255,121,17,164,255,0,36,121,17,164,0,1,121,17,164,255, +121,17,164,255,121,17,164,255,0,36,121,17,164,0,1,121,17,164,255,121, +17,164,255,121,17,164,255,0,36,121,17,164,0,1,121,17,164,255,121,17, +164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164, +255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255, +121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121, +17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17, +164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164, +255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255, +0,36,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0, +36,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44, +121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121, +17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,12,121,17, +164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164, +0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0, +1,121,17,164,255,121,17,164,255,121,17,164,255,0,36,121,17,164,0,1, +121,17,164,255,121,17,164,255,121,17,164,255,0,52,121,17,164,0,1,121, +17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17, +164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164, +255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255, +121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121, +17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17, +164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164, +255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255, +121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121, +17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17, +164,255,0,52,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164, +255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255, +0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0, +44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,20, +121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,36,121, +17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,20,121,17, +164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,36,121,17,164, +0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,36,121,17,164,0, +1,121,17,164,255,121,17,164,255,121,17,164,255,0,12,121,17,164,0,1, +121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121, +17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17, +164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164, +255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255, +121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121, +17,164,255,121,17,164,255,0,28,121,17,164,0,1,121,17,164,255,121,17, +164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164, +255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255, +121,17,164,255,0,12,121,17,164,0,1,121,17,164,255,121,17,164,255,121, +17,164,255,0,28,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17, +164,255,0,44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164, +255,0,12,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255, +0,52,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0, +44,121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44, +121,17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121, +17,164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17, +164,0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164, +0,1,121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0, +1,121,17,164,255,121,17,164,255,121,17,164,255,0,28,121,17,164,0,1, +121,17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121, +17,164,255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17, +164,255,121,17,164,255,121,17,164,255,0,52,121,17,164,0,1,121,17,164, +255,121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255, +121,17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121, +17,164,255,121,17,164,255,0,44,121,17,164,0,1,121,17,164,255,121,17, +164,255,121,17,164,255,0,28,121,17,164,0,1,121,17,164,255,121,17,164, +255,121,17,164,255,0,12,121,17,164,0,1,121,17,164,255,121,17,164,255, +121,17,164,255,0,28,121,17,164,0,1,121,17,164,255,121,17,164,255,121, +17,164,255,121,17,164,255,121,17,164,255,0,56,121,17,164,0,1,121,17, +164,255,121,17,164,255,13,4,17,0,1,13,4,17,0,1,13,4,17,0, +1,16,5,22,0,13,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +41,16,5,22,0,1,14,4,19,0,1,16,5,22,0,57,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,57,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +57,16,5,22,0,1,14,4,19,0,1,16,5,22,0,17,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,25,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,25,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +57,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,17,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,41,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +17,16,5,22,0,1,14,4,19,0,1,16,5,22,0,41,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +17,16,5,22,0,1,14,4,19,0,1,16,5,22,0,17,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,41,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,41,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +41,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,41,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +41,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,17,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,41,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,57,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,57,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,25,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,41,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,25,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +41,16,5,22,0,1,14,4,19,0,1,16,5,22,0,41,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,17,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +33,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,17,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +33,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,17,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,57,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,49,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,33,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,57,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,49,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,49,16,5,22,0,1,14,4,19,0,1,16,5,22,0, +49,16,5,22,0,1,14,4,19,0,1,16,5,22,0,33,16,5,22,0, +1,14,4,19,0,1,16,5,22,0,17,16,5,22,0,1,14,4,19,0, +1,16,5,22,0,33,16,5,22,0,1,14,4,19,0,1,13,4,17,0, +1,13,4,17,0,1,16,5,22,0,61,16,5,22,0,1,14,4,19,0, +255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, +255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, +25,8,6,3,57,10,8,5,85,9,7,4,76,0,12,8,6,3,54,9, +8,4,96,9,7,4,85,0,12,8,6,3,57,9,8,4,96,9,7,4, +85,0,24,8,6,3,57,11,8,4,85,9,7,4,79,0,12,8,6,3, +51,10,8,5,85,8,6,3,85,0,40,8,6,3,57,11,8,4,85,8, +6,3,85,0,32,8,6,3,57,10,8,5,85,9,7,4,85,0,28,5, +4,2,14,8,6,3,85,9,7,4,85,0,24,8,6,3,74,9,7,4, +113,8,6,3,167,8,6,3,139,9,7,4,85,5,4,2,14,0,36,8, +6,3,57,9,8,4,110,9,7,4,85,0,24,5,4,2,20,9,7,4, +85,9,8,4,85,0,16,9,8,4,57,9,8,4,85,6,5,3,48,0, +255,0,29,5,4,2,17,8,6,3,85,9,7,4,82,0,20,5,4,2, +3,8,6,3,85,9,7,4,93,8,6,3,153,8,6,3,161,8,6,3, +110,9,8,4,85,8,6,3,85,6,5,3,31,0,32,5,4,2,3,8, +6,3,85,10,8,5,85,10,7,5,85,0,36,5,4,2,57,8,6,3, +85,9,7,4,91,8,6,3,153,8,6,3,170,8,6,3,164,8,6,3, +108,8,6,3,85,6,5,3,71,0,24,5,4,2,42,8,6,3,85,9, +7,4,91,8,6,3,153,8,6,3,170,8,6,3,164,8,6,3,108,8, +6,3,85,6,5,3,71,0,48,5,4,2,3,8,6,3,85,9,8,4, +85,9,7,4,74,0,16,8,6,3,42,9,7,4,85,8,6,3,85,9, +7,4,85,8,6,3,125,8,6,3,170,7,6,4,170,9,7,4,170,12, +9,7,170,19,14,10,170,19,13,10,142,8,6,5,28,0,16,5,4,2, +51,8,6,3,85,9,7,4,91,8,6,3,153,8,6,3,170,8,6,3, +164,8,6,3,108,8,6,3,85,6,5,3,71,0,20,10,8,5,57,9, +7,4,170,8,6,3,170,8,6,3,170,8,6,3,161,8,6,3,142,9, +7,4,96,9,7,4,85,8,6,3,85,9,7,4,85,9,7,4,74,0, +20,5,4,2,42,8,6,3,85,9,7,4,91,8,6,3,153,8,6,3, +170,8,6,3,164,8,6,3,108,8,6,3,85,6,5,3,76,0,24,8, +6,5,82,10,8,7,133,12,9,7,170,15,11,8,170,15,11,8,170,15, +11,8,170,13,10,8,170,10,8,7,161,10,8,7,85,6,5,5,28,0, +96,8,6,3,74,9,8,4,85,8,6,3,57,0,68,7,6,4,28,9, +7,4,85,9,7,4,85,5,4,2,17,0,40,5,4,2,42,8,6,3, +85,9,7,4,91,8,6,3,153,8,6,3,170,8,6,3,164,8,6,3, +108,8,6,3,85,6,5,3,85,0,24,8,6,5,85,10,8,7,133,12, +9,7,170,15,10,8,170,15,11,8,170,15,11,8,170,13,10,8,170,10, +8,7,150,8,6,5,62,0,24,8,6,5,82,10,8,7,133,12,9,7, +170,15,10,8,170,14,10,7,170,9,7,4,170,8,6,5,147,10,8,5, +85,7,6,4,85,5,4,4,3,0,16,12,9,7,57,11,8,6,161,9, +7,6,170,10,8,7,170,13,10,8,170,14,10,7,170,13,10,8,170,12, +9,7,170,10,8,7,156,10,8,7,85,6,5,5,25,0,20,6,5,3, +57,8,7,5,85,9,7,4,110,9,7,4,170,10,8,5,170,10,8,5, +170,11,8,6,170,10,8,7,150,10,8,7,85,6,5,5,25,0,16,15, +11,8,57,11,8,6,170,9,7,6,170,10,8,7,170,13,10,8,170,15, +11,8,170,15,11,8,170,13,10,8,170,10,8,7,159,10,8,7,85,6, +5,5,25,0,16,15,11,8,59,11,9,6,170,9,7,4,125,10,8,5, +85,8,6,3,133,8,6,3,167,8,6,3,170,8,6,3,170,9,8,4, +113,0,16,8,6,3,42,10,8,5,85,10,7,5,85,9,7,4,125,10, +8,5,170,12,10,7,170,14,11,7,170,19,14,10,170,19,14,10,142,8, +6,5,28,0,16,8,6,5,82,10,8,7,133,12,9,7,170,15,11,8, +170,15,11,8,170,15,11,8,170,13,10,8,170,10,8,7,161,10,8,7, +85,6,5,5,25,0,16,12,10,7,74,14,10,7,170,12,9,7,139,7, +6,4,28,0,16,10,8,7,110,14,10,7,170,13,10,8,125,0,16,13, +10,8,71,15,11,8,170,13,10,8,130,5,5,4,8,0,44,11,8,6, +85,9,7,4,170,10,8,5,93,0,16,12,9,7,57,10,8,5,167,11, +8,6,110,6,5,3,8,0,16,11,8,6,57,10,7,5,159,11,8,6, +102,0,16,8,6,3,51,10,8,5,85,9,7,4,85,0,40,10,7,5, +57,11,9,6,85,7,6,4,57,0,28,7,5,4,28,10,8,5,85,11, +8,6,85,0,16,8,6,3,48,10,8,5,85,8,6,3,85,0,20,8, +6,3,57,11,8,4,85,9,7,4,79,0,20,5,4,2,45,8,6,3, +85,9,7,4,85,9,7,4,88,9,7,4,108,9,8,4,93,9,7,4, +85,8,6,3,85,6,5,3,74,0,20,8,6,3,45,9,7,4,85,8, +6,3,85,9,7,4,85,8,6,3,125,8,6,3,170,8,6,3,164,8, +6,3,108,8,6,3,85,6,5,3,74,0,24,6,5,3,57,8,7,5, +85,10,8,5,85,9,7,4,119,8,6,3,142,9,7,4,130,10,8,5, +91,10,7,5,85,6,5,3,85,0,20,9,7,4,57,10,8,5,85,10, +7,5,85,10,8,5,85,8,6,3,144,8,6,3,170,8,6,3,164,8, +6,3,108,8,6,3,85,6,5,3,71,0,24,5,4,2,45,8,6,3, +85,9,7,4,91,8,6,3,153,8,6,3,170,8,6,3,164,9,7,4, +105,8,6,3,85,6,5,3,74,0,20,11,8,4,59,9,7,4,170,8, +6,3,164,9,7,4,91,8,6,3,85,8,6,3,85,8,6,3,85,9, +7,4,85,8,6,3,142,9,6,4,170,9,8,4,116,0,16,8,6,3, +48,10,8,5,85,9,7,4,85,0,20,8,6,3,57,11,8,4,85,9, +7,4,76,0,16,8,6,3,48,10,8,5,85,9,7,4,85,0,20,8, +6,3,57,11,8,4,85,9,7,4,76,0,16,8,6,3,48,10,8,5, +85,9,7,4,85,0,28,8,6,3,57,11,8,4,85,9,7,4,76,0, +16,8,6,3,54,9,8,4,96,9,7,4,85,0,20,8,6,3,57,9, +8,4,96,9,7,4,85,0,16,10,8,5,57,10,7,5,153,10,8,5, +93,0,20,10,8,7,93,14,11,7,170,13,10,8,136,0,16,11,8,6, +91,11,8,6,170,9,7,4,170,9,7,4,170,8,6,5,170,8,6,3, +119,9,7,4,85,8,6,3,85,8,6,3,85,9,7,4,85,9,7,4, +76,0,16,8,6,3,42,9,7,4,85,8,6,3,85,8,6,3,122,9, +8,4,102,0,16,8,6,3,51,9,7,4,85,6,5,3,45,0,40,12, +8,5,57,8,6,3,156,10,7,5,93,11,8,6,85,11,8,6,85,0, +28,6,5,5,14,13,10,8,85,8,7,5,45,0,80,10,8,5,57,10, +7,5,156,10,8,5,96,0,76,9,7,4,57,10,8,5,93,10,8,5, +85,0,140,10,8,7,110,13,10,8,170,12,9,7,133,5,5,4,6,0, +84,8,6,5,79,10,8,7,127,13,10,8,170,16,12,9,142,8,7,5, +28,0,72,8,6,3,57,10,8,5,85,9,6,4,85,0,48,15,11,8, +113,25,18,12,170,20,15,11,142,8,7,5,28,0,28,15,11,8,130,22, +16,11,170,20,15,11,142,7,6,6,23,0,12,13,10,8,68,12,9,7, +170,11,8,6,116,6,5,3,8,0,44,12,9,7,82,15,10,8,170,13, +10,8,130,5,5,4,8,0,255,0,197,6,5,3,57,8,6,3,85,0, +255,0,149,5,4,2,6,8,6,3,85,8,6,3,156,9,8,4,113,0, +16,8,6,3,48,9,8,4,91,9,7,4,76,0,16,10,8,5,57,9, +6,4,170,8,6,3,99,5,4,2,34,0,36,8,6,3,71,9,8,4, +93,9,8,4,96,8,6,3,85,6,5,3,45,0,12,8,6,3,76,0, +44,8,6,3,57,58,31,9,255,93,50,12,255,88,45,11,255,12,10,5, +113,0,4,7,6,4,28,54,29,9,255,93,46,12,255,88,45,11,255,12, +9,5,122,0,4,7,5,4,37,54,29,9,255,93,46,12,255,88,45,11, +255,14,10,5,142,0,16,8,6,3,85,58,31,9,255,93,50,12,255,88, +44,11,255,9,7,4,170,0,4,5,4,2,85,52,28,9,255,93,48,12, +255,88,44,11,255,12,10,5,170,0,32,7,6,4,85,58,31,9,255,93, +50,12,255,88,45,11,255,12,9,5,170,0,24,8,6,3,57,58,31,9, +255,93,50,12,255,88,45,11,255,14,10,5,142,0,20,6,5,3,28,19, +12,6,227,76,37,11,255,88,45,11,255,14,10,5,139,0,16,9,8,4, +170,69,35,10,255,92,47,11,255,92,47,11,255,88,45,11,255,88,45,11, +255,16,11,5,227,7,5,4,28,0,28,8,6,3,57,58,31,9,255,93, +46,12,255,88,45,11,255,14,10,5,142,0,16,6,5,3,28,19,12,6, +227,82,39,11,255,92,47,11,255,14,10,5,105,0,8,7,5,4,20,54, +29,9,255,100,50,13,255,30,19,7,255,8,6,3,85,0,255,0,21,6, +5,3,28,19,12,6,227,76,37,11,255,88,45,11,255,14,10,5,130,0, +12,7,6,4,65,17,11,6,227,71,37,10,255,88,45,11,255,92,47,11, +255,92,47,11,255,88,45,11,255,88,44,11,255,88,44,11,255,25,16,6, +255,8,6,3,142,0,24,7,5,4,85,17,12,6,229,77,39,12,255,107, +51,14,255,113,55,16,255,20,14,9,178,0,28,14,11,7,170,29,18,8, +255,74,39,11,255,88,45,11,255,88,45,11,255,92,47,11,255,92,47,11, +255,88,45,11,255,88,44,11,255,41,23,8,255,12,9,5,227,5,5,4, +23,0,12,9,7,4,170,26,17,6,255,74,39,11,255,88,45,11,255,88, +45,11,255,92,47,11,255,92,47,11,255,88,45,11,255,88,44,11,255,41, +24,8,255,12,9,5,227,6,5,3,28,0,36,6,5,3,85,16,11,5, +227,71,37,10,255,88,45,11,255,88,44,11,255,12,10,5,113,0,8,8, +6,3,28,54,29,9,255,92,47,11,255,88,44,11,255,88,45,11,255,92, +46,13,255,100,52,13,255,109,53,16,255,121,63,20,255,158,74,23,255,180, +88,27,255,183,90,28,255,26,17,11,142,0,12,10,7,5,170,26,17,6, +255,74,39,11,255,88,45,11,255,92,47,11,255,92,47,11,255,92,47,11, +255,88,45,11,255,88,45,11,255,41,24,8,255,12,9,5,227,6,5,3, +28,0,8,7,6,4,8,61,32,10,255,102,51,13,255,92,46,13,255,92, +46,13,255,92,46,13,255,92,46,13,255,92,46,13,255,90,45,11,255,84, +44,11,255,88,45,11,255,88,44,11,255,14,10,5,119,0,12,9,7,4, +153,26,17,6,255,74,39,11,255,88,45,11,255,92,47,11,255,92,47,11, +255,92,47,11,255,88,45,11,255,88,44,11,255,45,25,8,255,13,10,6, +227,7,6,4,28,0,12,17,13,10,170,64,39,21,255,155,78,26,255,169, +83,26,255,165,80,24,255,161,79,24,255,145,71,22,255,136,70,21,255,134, +69,21,255,88,50,23,255,22,17,11,232,9,8,6,31,0,84,4,4,3, +23,12,9,5,173,71,34,10,255,92,43,13,255,33,20,8,255,10,8,5, +57,0,64,20,14,7,227,83,42,12,255,92,46,13,255,19,13,6,227,6, +5,3,34,0,32,10,8,5,170,26,17,6,255,76,37,11,255,90,46,11, +255,92,46,13,255,92,46,13,255,90,45,11,255,90,45,11,255,88,44,11, +255,46,26,9,255,18,13,9,227,8,7,5,28,0,12,15,12,8,170,58, +35,19,255,134,73,23,255,153,76,24,255,142,69,21,255,131,64,20,255,121, +59,18,255,121,59,18,255,121,62,18,255,43,27,12,255,11,9,6,170,0, +16,17,13,10,170,64,39,21,255,164,85,27,255,177,86,26,255,154,75,23, +255,121,62,18,255,115,56,16,255,119,61,18,255,123,61,20,255,80,45,19, +255,22,16,11,227,8,7,5,28,0,8,13,10,8,57,96,48,19,255,165, +80,24,255,159,78,24,255,159,78,24,255,165,80,24,255,165,80,24,255,165, +80,24,255,159,78,24,255,164,81,25,255,91,52,24,255,22,17,11,227,8, +7,5,28,0,12,13,10,8,170,38,24,11,255,99,47,16,255,116,59,17, +255,126,65,21,255,142,69,21,255,153,76,24,255,157,74,24,255,155,76,24, +255,91,52,24,255,23,18,12,227,8,7,5,28,0,8,13,10,8,57,104, +52,21,255,171,84,26,255,155,76,24,255,164,81,25,255,173,81,26,255,180, +88,27,255,180,88,27,255,177,86,26,255,169,80,26,255,92,55,25,255,22, +17,11,227,8,7,5,28,0,8,13,10,8,57,114,63,25,255,177,86,26, +255,114,56,17,255,92,46,13,255,92,47,11,255,93,46,12,255,92,46,13, +255,96,48,13,255,92,46,13,255,18,12,5,91,0,8,8,6,3,40,55, +29,10,255,108,50,15,255,114,56,17,255,130,67,21,255,153,76,24,255,161, +82,24,255,171,84,26,255,179,84,26,255,179,84,26,255,25,17,10,142,0, +12,15,12,8,170,64,39,21,255,162,84,27,255,179,88,28,255,183,90,28, +255,181,89,28,255,181,89,28,255,172,88,27,255,156,77,25,255,88,50,23, +255,22,17,11,227,8,7,5,28,0,8,13,9,6,57,96,48,19,255,153, +71,22,255,134,69,21,255,20,14,9,193,0,12,11,8,6,113,124,62,25, +255,185,91,28,255,169,80,26,255,22,15,9,142,0,8,11,8,6,57,111, +61,24,255,184,90,27,255,177,86,26,255,23,16,10,173,0,40,11,8,6, +113,114,59,23,255,144,73,21,255,126,63,21,255,20,14,9,142,0,8,11, +9,6,57,97,51,20,255,152,71,23,255,134,69,21,255,20,14,9,187,0, +12,12,9,7,96,97,48,18,255,140,71,21,255,138,71,21,255,20,15,9, +142,0,8,8,6,3,40,52,28,9,255,93,50,12,255,88,45,11,255,14, +10,5,142,0,32,13,10,8,82,91,48,16,255,132,71,21,255,63,36,18, +255,10,8,7,136,0,20,7,6,6,62,31,21,12,244,124,66,23,255,134, +69,21,255,20,15,9,142,0,8,8,6,3,28,54,29,9,255,93,46,12, +255,80,39,11,255,14,10,5,142,0,12,8,6,3,57,58,31,9,255,93, +50,12,255,88,44,11,255,14,10,5,116,0,12,9,7,4,153,26,17,6, +255,74,39,11,255,88,45,11,255,88,45,11,255,88,45,11,255,88,45,11, +255,88,44,11,255,88,44,11,255,41,23,8,255,12,9,5,227,5,4,4, +17,0,8,8,6,3,34,54,29,9,255,92,43,11,255,88,44,11,255,88, +45,11,255,92,43,11,255,92,47,11,255,92,47,11,255,88,45,11,255,88, +44,11,255,45,25,8,255,12,10,5,227,6,5,3,28,0,12,13,10,6, +170,40,24,11,255,97,48,16,255,113,55,16,255,115,56,16,255,116,57,17, +255,116,57,17,255,113,55,16,255,113,55,16,255,60,33,13,255,18,14,9, +227,8,6,5,28,0,8,12,9,7,57,77,38,14,255,118,57,17,255,116, +59,17,255,118,60,17,255,109,53,16,255,98,47,13,255,92,47,11,255,88, +45,11,255,88,44,11,255,41,23,8,255,12,9,5,227,6,5,3,28,0, +12,10,8,5,170,28,18,7,255,76,37,11,255,90,45,11,255,92,46,13, +255,94,45,13,255,94,45,13,255,92,46,13,255,92,46,13,255,46,26,9, +255,13,10,6,227,6,5,5,28,0,8,7,6,4,8,61,32,10,255,100, +50,13,255,92,46,13,255,92,46,13,255,92,46,13,255,92,46,13,255,92, +46,13,255,92,46,13,255,94,47,13,255,98,49,13,255,94,47,13,255,18, +12,5,93,0,8,8,6,3,42,60,32,9,255,96,48,13,255,88,45,11, +255,14,10,5,142,0,12,8,6,3,57,58,31,9,255,93,50,12,255,88, +44,11,255,12,10,5,113,0,8,8,6,3,28,54,29,9,255,93,50,12, +255,88,44,11,255,14,10,5,142,0,12,8,6,3,57,58,31,9,255,93, +50,12,255,88,44,11,255,12,10,5,113,0,8,8,6,3,28,54,29,9, +255,93,50,12,255,88,44,11,255,14,10,5,142,0,20,8,6,3,57,58, +31,9,255,93,50,12,255,88,44,11,255,12,10,5,113,0,8,7,6,4, +28,54,29,9,255,93,50,12,255,88,45,11,255,14,10,5,142,0,12,8, +7,3,57,60,31,9,255,96,48,13,255,92,46,13,255,14,10,5,127,0, +8,10,8,5,57,82,42,15,255,135,66,20,255,121,60,20,255,20,15,9, +176,0,12,11,9,6,108,107,56,22,255,172,84,25,255,158,74,23,255,22, +15,9,142,0,8,11,8,6,54,98,51,19,255,142,72,21,255,136,70,21, +255,138,71,21,255,121,59,18,255,100,52,13,255,90,46,11,255,88,44,11, +255,88,44,11,255,88,44,11,255,88,45,11,255,12,10,5,113,0,8,8, +6,3,28,54,29,9,255,92,47,11,255,88,44,11,255,92,47,11,255,92, +47,11,255,18,12,5,85,0,8,7,6,4,45,54,30,9,255,94,47,13, +255,31,20,8,255,9,7,4,85,0,32,8,6,3,48,65,33,10,255,114, +55,15,255,119,58,18,255,126,63,21,255,128,66,21,255,22,15,9,164,0, +20,5,5,4,28,19,14,10,227,141,72,26,255,43,27,16,255,7,6,6, +85,0,72,14,10,7,71,96,49,17,255,138,71,21,255,130,67,21,255,22, +15,9,164,0,68,12,9,7,76,77,39,14,255,118,57,17,255,109,53,16, +255,22,15,9,153,0,132,11,8,6,96,103,53,20,255,144,73,21,255,121, +60,20,255,24,16,9,153,0,80,15,12,8,184,61,36,20,255,141,68,24, +255,168,82,25,255,171,84,26,255,26,18,11,159,0,68,9,7,4,57,60, +32,9,255,96,48,13,255,92,46,13,255,19,12,6,142,0,40,14,10,7, +76,129,67,26,255,190,97,29,255,180,88,27,255,26,17,11,161,0,24,14, +10,7,85,129,67,26,255,190,97,29,255,180,88,27,255,25,17,10,125,0, +8,11,8,6,57,109,60,24,255,175,86,26,255,142,73,23,255,20,14,9, +187,0,40,12,9,7,93,121,65,24,255,183,89,26,255,168,82,25,255,21, +15,10,178,0,255,0,193,10,8,5,170,39,23,8,255,78,41,11,255,16, +11,5,142,0,255,0,141,6,5,3,85,16,11,5,227,71,37,10,255,92, +47,11,255,92,47,11,255,18,12,5,85,0,8,8,6,3,28,54,29,9, +255,93,46,12,255,88,45,11,255,12,10,5,113,0,12,58,31,9,255,93, +50,12,255,88,45,11,255,25,17,6,255,8,6,3,142,0,24,4,4,3, +25,10,8,5,173,65,33,10,255,92,46,13,255,92,46,13,255,67,34,10, +255,27,18,8,255,9,7,4,156,3,3,2,85,10,8,5,184,69,35,10, +255,19,13,6,147,0,40,9,7,4,113,112,55,13,255,141,69,16,255,141, +75,16,255,18,13,5,170,0,4,8,6,3,85,110,54,13,255,143,76,16, +255,139,68,16,255,19,13,6,170,0,4,8,6,3,85,110,54,13,255,143, +76,16,255,141,72,16,255,23,15,6,170,0,12,10,9,5,110,35,21,8, +255,129,63,14,255,141,69,16,255,139,68,16,255,52,27,9,255,9,7,4, +255,27,17,8,255,135,66,16,255,154,75,17,255,155,79,18,255,91,50,16, +255,20,15,9,207,10,9,7,28,0,16,5,4,4,20,8,6,3,127,31, +20,8,255,130,66,15,255,143,76,16,255,143,76,16,255,67,34,10,255,10, +8,5,215,10,8,5,170,13,10,6,142,7,5,4,23,0,8,12,9,5, +85,115,59,14,255,149,72,16,255,143,76,16,255,18,12,5,235,0,16,7, +6,4,28,14,10,5,227,92,46,13,255,143,73,16,255,143,70,16,255,18, +13,5,170,0,12,14,10,5,170,53,28,10,255,114,56,13,255,56,29,9, +255,16,11,5,255,34,20,7,255,112,55,13,255,87,42,12,255,19,13,6, +235,8,7,5,40,0,24,10,8,5,85,114,56,13,255,143,70,16,255,141, +72,16,255,23,15,6,170,0,12,7,6,4,28,14,10,5,227,90,44,13, +255,112,57,13,255,47,26,8,255,11,8,4,57,0,12,25,16,6,227,96, +48,13,255,112,57,13,255,26,16,7,255,8,6,5,85,0,24,13,10,6, +85,8,7,5,57,0,20,6,5,3,28,15,11,6,85,9,7,4,28,0, +36,9,7,4,105,10,8,5,170,10,8,5,130,6,5,3,23,0,156,8, +6,3,136,77,39,12,255,143,73,16,255,139,74,16,255,18,12,5,170,0, +12,21,14,6,227,112,57,13,255,141,69,16,255,80,40,11,255,16,11,5, +255,14,10,5,227,18,13,5,255,72,35,11,255,136,69,15,255,130,66,15, +255,46,26,9,255,8,6,3,105,0,16,8,7,5,57,42,27,13,255,150, +79,21,255,184,94,21,255,195,99,22,255,199,106,24,255,26,18,11,255,0, +24,10,8,7,99,83,45,18,255,144,74,17,255,143,70,16,255,94,47,13, +255,18,13,5,255,16,11,5,173,14,10,5,227,52,27,9,255,132,67,15, +255,139,68,16,255,75,39,12,255,10,7,5,116,0,8,6,5,3,57,52, +27,9,255,137,73,16,255,143,76,16,255,94,47,13,255,18,13,5,255,16, +11,5,173,14,10,5,227,52,27,9,255,132,67,15,255,139,74,16,255,75, +39,12,255,10,8,5,142,0,32,8,6,5,85,22,15,7,255,102,51,13, +255,137,67,16,255,140,71,15,255,141,75,16,255,20,13,5,170,0,8,9, +6,4,85,108,55,13,255,141,69,16,255,139,74,16,255,74,36,11,255,18, +12,7,255,20,13,7,181,22,15,9,207,20,13,9,238,18,13,9,252,23, +16,10,255,31,21,12,218,14,11,7,42,0,8,7,6,4,57,40,22,9, +255,130,66,15,255,141,75,16,255,84,42,11,255,18,12,5,255,16,12,5, +181,14,10,5,241,69,35,10,255,140,69,17,255,154,78,17,255,117,60,18, +255,17,13,8,142,0,12,21,14,8,190,28,18,9,255,23,15,8,255,21, +14,8,255,21,14,8,255,23,15,8,255,38,24,11,255,98,53,17,255,151, +74,18,255,150,76,17,255,141,75,16,255,21,15,6,170,0,8,5,4,2, +28,33,20,8,255,130,66,15,255,141,72,16,255,84,42,11,255,18,12,5, +255,18,12,5,176,14,10,5,235,57,29,10,255,140,72,17,255,165,85,20, +255,121,67,24,255,14,11,7,142,0,8,8,6,5,57,72,46,23,255,198, +113,29,255,200,102,23,255,131,68,22,255,33,21,12,255,17,13,8,255,21, +14,8,255,88,47,19,255,192,99,23,255,203,113,26,255,146,87,29,255,13, +11,8,164,0,12,10,8,5,85,13,10,6,170,11,9,6,142,7,6,4, +28,0,12,13,10,8,113,18,14,9,170,16,13,9,147,10,8,7,28,0, +24,10,8,7,28,20,15,11,227,104,62,21,255,184,94,21,255,117,62,22, +255,17,12,8,227,7,5,4,28,0,64,11,8,6,170,67,35,16,255,164, +85,21,255,115,58,16,255,20,14,7,252,8,6,5,85,0,24,9,7,4, +82,66,37,13,255,145,75,18,255,154,78,17,255,115,58,16,255,29,18,8, +255,14,10,7,255,16,11,7,255,65,34,12,255,150,74,19,255,189,97,22, +255,138,79,27,255,14,12,9,142,0,8,7,6,6,57,55,33,16,255,158, +81,19,255,162,80,19,255,102,53,17,255,24,15,7,255,19,12,6,170,14, +10,5,204,46,26,9,255,137,67,16,255,139,71,16,255,49,27,10,255,7, +6,4,105,0,8,7,6,6,62,72,46,23,255,199,115,32,255,205,111,28, +255,155,84,26,255,41,24,14,255,18,13,9,255,25,16,10,255,110,61,25, +255,199,100,28,255,205,112,30,255,146,87,29,255,13,11,8,142,0,8,10, +8,7,147,180,87,25,255,206,111,27,255,203,105,26,255,164,85,27,255,40, +24,15,255,20,14,9,255,26,17,11,255,121,64,26,255,201,101,28,255,205, +112,30,255,146,87,29,255,14,11,7,142,0,8,8,6,5,57,71,44,22, +255,192,108,25,255,198,101,23,255,150,78,25,255,41,24,14,255,32,21,13, +255,74,41,21,255,184,105,27,255,202,104,25,255,202,118,27,255,174,102,31, +255,17,14,10,142,0,8,11,9,6,136,182,92,25,255,206,112,29,255,205, +111,28,255,166,79,27,255,43,25,16,255,21,15,10,255,29,19,12,255,116, +67,27,255,202,107,31,255,206,113,31,255,146,87,29,255,12,10,7,142,0, +8,11,8,6,144,185,93,26,255,202,103,23,255,157,77,18,255,83,42,12, +255,19,13,6,255,13,10,6,255,20,13,7,255,27,17,8,255,28,18,9, +227,10,8,5,45,0,8,11,9,6,142,139,73,20,255,198,96,21,255,199, +106,24,255,155,78,26,255,41,25,14,255,21,15,10,255,28,18,11,255,38, +24,15,255,40,24,15,227,14,10,7,62,0,8,8,7,5,57,65,41,20, +255,197,108,28,255,205,111,28,255,170,88,27,255,43,27,16,255,19,14,10, +255,29,19,12,255,123,66,24,255,181,84,20,255,170,87,19,255,114,60,17, +255,11,10,6,142,0,8,11,9,6,85,119,60,15,255,154,75,17,255,154, +78,17,255,18,13,7,255,0,12,13,10,8,170,191,102,30,255,209,118,30, +255,207,113,30,255,28,19,11,201,0,8,13,10,8,105,166,87,23,255,198, +101,23,255,198,97,23,255,26,18,11,255,0,40,13,10,8,170,189,100,28, +255,206,111,27,255,204,102,27,255,28,20,11,201,0,8,12,10,7,116,184, +93,27,255,206,107,27,255,203,113,26,255,23,17,10,255,0,8,6,5,5, +28,25,18,12,244,192,105,27,255,206,112,29,255,207,117,30,255,32,22,13, +170,0,8,11,9,6,88,112,57,13,255,143,70,16,255,141,69,16,255,17, +12,6,227,0,32,14,11,9,170,184,92,25,255,206,111,27,255,192,111,31, +255,49,33,18,255,10,8,7,122,0,12,7,7,6,59,22,16,11,232,167, +100,28,255,205,112,30,255,205,116,30,255,26,18,11,210,0,8,8,7,3, +85,110,54,13,255,141,69,16,255,141,75,16,255,25,16,6,255,5,4,4, +40,0,8,10,8,5,85,112,55,13,255,141,75,16,255,141,75,16,255,20, +13,5,170,0,8,5,4,2,28,33,20,8,255,130,66,15,255,141,72,16, +255,112,55,13,255,45,25,8,255,26,17,6,255,33,20,8,255,94,47,13, +255,141,69,16,255,144,71,17,255,80,40,13,255,9,7,4,125,0,8,10, +8,5,85,112,57,13,255,148,79,17,255,141,75,16,255,87,42,12,255,19, +13,6,255,14,10,5,215,15,10,6,255,60,31,11,255,143,71,18,255,160, +82,19,255,96,54,17,255,12,9,7,142,0,8,8,6,5,57,71,44,22, +255,192,100,25,255,199,106,24,255,185,93,26,255,91,50,22,255,58,33,17, +255,72,41,19,255,158,81,25,255,199,106,24,255,199,106,24,255,138,79,27, +255,13,11,8,142,0,8,10,8,7,147,166,87,23,255,203,108,24,255,202, +108,25,255,153,77,26,255,38,22,13,255,15,11,6,255,14,10,5,255,52, +28,9,255,132,70,15,255,141,75,16,255,80,41,13,255,10,8,5,139,0, +8,7,6,6,57,48,29,13,255,154,79,19,255,160,85,19,255,108,56,17, +255,30,18,9,255,16,11,7,255,24,15,9,255,96,51,17,255,167,86,20, +255,181,88,20,255,140,75,23,255,18,14,9,144,0,12,22,14,7,193,22, +13,7,255,20,13,7,255,78,40,15,255,165,81,20,255,177,90,20,255,177, +90,20,255,115,58,20,255,32,20,11,255,24,15,9,255,30,19,9,227,11, +8,6,54,0,8,11,9,6,142,139,68,20,255,166,78,19,255,144,71,17, +255,19,12,6,215,0,12,9,7,4,136,114,56,13,255,143,70,16,255,139, +68,16,255,19,13,6,170,0,8,10,7,5,85,112,55,13,255,143,70,16, +255,139,74,16,255,17,11,6,221,0,12,9,7,4,136,114,56,13,255,143, +70,16,255,141,75,16,255,20,13,5,170,0,8,9,6,4,85,110,54,13, +255,141,69,16,255,141,72,16,255,17,11,6,221,0,20,9,7,4,136,114, +56,13,255,143,73,16,255,139,74,16,255,19,13,6,170,0,8,8,6,3, +85,110,54,13,255,143,76,16,255,141,69,16,255,18,12,5,252,0,12,11, +9,6,170,131,69,18,255,170,87,19,255,168,86,19,255,28,19,9,170,0, +8,11,8,6,85,145,74,26,255,204,102,27,255,203,105,26,255,52,33,17, +255,6,5,5,57,0,8,17,14,10,227,190,107,25,255,204,113,25,255,174, +86,27,255,18,13,9,170,0,12,28,18,11,198,37,23,14,255,32,21,13, +255,21,15,10,255,20,14,9,255,38,23,11,255,87,44,12,255,137,70,16, +255,141,72,16,255,143,70,16,255,141,72,16,255,18,12,5,170,0,8,9, +6,4,85,110,54,13,255,145,74,16,255,141,69,16,255,94,47,13,255,27, +17,8,227,12,8,5,28,0,8,14,10,7,85,121,62,18,255,172,87,19, +255,139,69,18,255,20,15,9,227,0,36,21,14,8,227,117,61,24,255,199, +100,28,255,205,106,26,255,204,110,27,255,26,18,11,255,0,16,8,7,5, +28,20,15,11,227,135,73,22,255,192,97,21,255,165,83,22,255,33,22,12, +255,10,9,7,85,0,68,11,9,6,170,184,97,27,255,206,112,29,255,204, +110,27,255,28,19,11,255,0,68,14,11,7,170,179,93,24,255,202,103,23, +255,198,97,23,255,22,15,9,255,0,132,9,7,6,170,125,63,18,255,158, +77,17,255,146,75,17,255,17,12,6,255,0,76,8,6,5,76,72,46,23, +255,197,108,28,255,201,107,24,255,164,85,27,255,37,22,14,227,13,9,6, +48,0,68,12,9,7,170,138,67,19,255,170,79,19,255,168,86,19,255,20, +14,9,255,0,40,8,7,5,20,21,15,10,184,26,17,11,255,26,17,11, +215,12,9,7,74,0,24,8,7,5,20,21,15,10,184,26,17,11,255,31, +21,12,207,18,13,9,28,0,8,11,9,8,156,184,93,27,255,208,105,29, +255,205,111,28,255,28,19,11,255,0,40,14,11,7,170,184,92,25,255,203, +104,24,255,200,98,23,255,26,18,11,255,0,255,0,189,8,7,5,57,51, +29,12,255,152,75,19,255,162,86,19,255,19,13,8,246,0,255,0,137,6, +5,3,28,19,13,6,249,92,46,13,255,123,63,14,255,78,39,11,255,21, +15,6,227,9,8,4,28,0,8,9,8,4,85,110,59,13,255,141,69,16, +255,141,75,16,255,21,14,6,170,0,12,16,11,5,170,52,28,9,255,115, +59,14,255,116,60,15,255,43,26,10,255,9,7,6,125,0,16,8,7,5, +28,21,17,10,227,109,59,18,255,160,82,19,255,121,64,18,255,62,34,13, +255,94,53,17,255,149,78,20,255,102,54,19,255,32,22,11,255,72,39,15, +255,121,62,18,255,24,17,9,187,0,40,8,6,3,167,128,66,15,255,161, +85,17,255,159,81,18,255,24,15,7,178,0,4,6,5,3,37,48,28,11, +255,173,92,20,255,181,96,20,255,21,15,8,221,0,4,6,5,3,28,40, +24,9,255,143,74,18,255,158,80,17,255,21,15,6,181,0,8,10,8,5, +54,107,51,14,255,157,83,18,255,164,84,19,255,176,89,19,255,189,92,20, +255,191,98,22,255,190,106,23,255,197,110,26,255,203,108,24,255,203,117,24, +255,205,119,26,255,207,122,30,255,199,118,32,255,32,23,13,170,0,12,7, +6,4,85,22,15,7,232,113,54,14,255,146,75,17,255,158,80,17,255,154, +78,17,255,158,80,17,255,148,76,17,255,139,71,16,255,135,66,16,255,135, +66,16,255,21,14,6,136,0,8,10,8,5,85,128,66,15,255,161,85,17, +255,158,80,17,255,25,16,6,204,0,12,7,6,4,28,25,16,8,227,102, +50,15,255,148,76,17,255,142,73,17,255,84,45,13,255,10,8,5,113,0, +8,9,7,4,82,107,53,14,255,146,75,17,255,84,41,13,255,8,7,5, +198,3,2,2,23,5,4,4,136,38,23,9,255,136,70,17,255,140,72,17, +255,21,15,6,178,0,24,7,6,4,57,45,26,10,255,143,74,18,255,158, +80,17,255,26,17,6,170,0,12,24,16,7,227,115,58,16,255,148,76,17, +255,46,26,9,255,7,6,4,156,0,16,5,4,4,71,19,13,6,255,139, +71,16,255,140,72,17,255,43,26,10,255,9,8,4,85,0,16,14,10,5, +85,109,52,14,255,38,23,9,255,6,5,3,85,0,12,4,4,3,28,15, +12,6,227,115,56,16,255,29,19,8,170,0,32,13,10,6,113,122,64,21, +255,164,85,21,255,138,71,17,255,21,15,6,161,0,156,13,10,6,227,137, +67,16,255,154,75,17,255,84,45,13,255,10,8,5,116,0,8,9,7,4, +85,111,55,14,255,158,87,17,255,158,80,17,255,19,13,6,255,4,4,3, +28,0,4,3,3,2,113,17,12,6,255,139,71,16,255,161,85,17,255,146, +75,17,255,20,14,7,210,0,16,16,13,9,110,184,105,27,255,209,123,30, +255,210,124,31,255,208,123,31,255,207,122,30,255,27,20,12,255,0,24,13, +11,8,147,143,75,20,255,161,85,17,255,158,80,17,255,27,18,8,227,5, +4,2,28,0,8,10,7,5,198,131,65,16,255,161,85,17,255,150,76,17, +255,21,14,6,170,0,8,10,8,5,85,123,61,16,255,163,83,18,255,158, +80,17,255,27,18,8,227,5,4,2,28,0,8,9,7,4,198,130,66,15, +255,163,83,18,255,148,76,17,255,21,14,6,193,0,28,7,6,4,85,22, +15,7,255,131,65,16,255,154,78,17,255,154,78,17,255,154,78,17,255,154, +78,17,255,21,15,6,170,0,8,10,8,5,85,129,64,16,255,163,86,18, +255,180,91,19,255,29,20,10,255,3,3,2,93,0,36,10,8,5,122,121, +60,16,255,161,85,17,255,159,81,18,255,24,15,7,255,4,4,3,34,0, +4,2,2,1,6,17,13,8,181,181,93,22,255,203,108,24,255,205,114,26, +255,32,23,13,210,0,36,5,4,4,161,30,22,13,255,198,116,29,255,206, +106,25,255,191,96,20,255,26,17,7,170,0,8,9,7,4,85,116,60,15, +255,161,85,17,255,158,80,17,255,21,14,6,255,5,4,2,28,0,4,2, +2,1,3,12,9,7,215,190,107,25,255,211,124,30,255,208,134,37,255,32, +22,13,178,0,8,13,11,8,96,187,112,32,255,209,123,30,255,191,96,20, +255,28,19,9,255,4,3,3,74,0,4,3,2,2,28,13,10,8,227,196, +120,31,255,211,124,30,255,199,106,24,255,27,19,10,170,0,8,13,10,6, +57,114,61,19,255,178,91,21,255,182,102,23,255,23,17,10,173,0,8,11, +9,6,91,146,85,25,255,198,113,29,255,196,120,31,255,27,20,12,207,0, +20,5,5,4,28,21,17,12,227,190,118,33,255,209,131,40,255,161,100,34, +255,17,14,10,227,5,5,4,28,0,72,9,8,6,170,91,59,28,255,189, +94,24,255,162,83,19,255,39,25,12,255,7,7,6,85,0,20,13,11,8, +142,183,103,24,255,203,112,24,255,203,112,24,255,42,26,13,249,5,4,4, +62,0,4,3,2,2,25,12,9,7,227,195,115,30,255,212,127,35,255,211, +132,38,255,32,22,13,181,0,8,12,10,7,85,124,65,17,255,161,85,17, +255,159,78,18,255,21,14,6,255,5,4,2,28,0,8,7,6,4,224,133, +68,16,255,159,81,18,255,146,72,17,255,22,14,7,170,0,8,13,11,8, +91,185,111,32,255,210,125,33,255,205,114,26,255,37,26,14,255,4,4,3, +85,0,4,4,4,4,28,13,10,8,227,193,105,26,255,206,111,27,255,202, +118,27,255,32,22,13,170,0,8,11,9,6,127,174,91,23,255,202,102,21, +255,200,105,21,255,36,23,13,255,4,4,3,85,0,4,3,3,2,28,13, +11,8,227,198,118,33,255,212,127,35,255,208,128,33,255,31,22,12,181,0, +8,13,11,8,91,185,114,30,255,211,124,30,255,208,122,29,255,34,24,13, +255,4,4,3,85,0,4,7,6,6,113,32,24,13,255,185,95,22,255,202, +98,21,255,198,97,23,255,33,22,12,170,0,8,10,8,7,156,190,108,27, +255,212,126,33,255,211,127,36,255,40,26,15,255,4,4,3,85,0,4,3, +3,2,28,13,11,8,227,198,118,33,255,214,129,37,255,211,132,38,255,32, +23,13,173,0,8,10,8,7,144,167,87,22,255,185,94,20,255,165,87,18, +255,25,17,8,255,3,3,2,57,0,28,13,11,8,170,195,112,30,255,210, +125,33,255,208,117,29,255,39,26,14,255,4,4,3,85,0,28,12,10,7, +150,184,108,27,255,211,124,30,255,211,127,36,255,40,27,15,255,4,4,3, +85,0,4,3,3,2,28,17,13,8,178,138,71,17,255,161,85,17,255,155, +79,18,255,21,14,6,170,0,8,10,8,5,85,124,61,15,255,169,89,18, +255,180,91,19,255,25,18,10,255,0,12,13,11,8,170,196,113,31,255,211, +124,30,255,205,119,26,255,26,18,11,204,0,8,11,9,6,88,134,70,19, +255,173,87,18,255,168,86,19,255,20,13,7,255,0,40,13,11,8,170,196, +113,31,255,210,125,33,255,207,122,30,255,24,18,11,212,0,8,11,9,6, +119,180,93,23,255,203,108,24,255,202,103,23,255,20,15,9,255,0,8,15, +13,10,195,101,63,26,255,202,117,25,255,206,128,35,255,160,106,35,255,15, +13,10,142,0,8,10,8,5,147,139,70,20,255,191,96,20,255,200,105,21, +255,25,18,10,255,0,32,13,10,8,170,189,99,26,255,206,115,27,255,205, +106,26,255,185,106,28,255,79,52,26,255,10,9,7,122,0,4,7,6,6, +42,36,27,17,244,172,106,35,255,207,128,34,255,211,126,34,255,211,127,36, +255,24,18,11,227,0,8,10,8,5,85,124,64,15,255,159,81,18,255,158, +80,17,255,76,40,13,255,11,8,6,210,0,8,12,9,5,85,129,64,16, +255,161,85,17,255,158,80,17,255,26,16,7,170,0,8,9,7,4,85,115, +56,16,255,161,85,17,255,159,81,18,255,49,27,10,255,7,6,4,170,5, +4,4,85,6,5,3,113,26,19,11,255,185,95,22,255,202,102,21,255,197, +104,22,255,28,20,11,173,0,8,13,10,6,102,167,87,22,255,200,101,21, +255,201,102,22,255,32,21,11,255,4,3,3,65,0,4,2,2,1,17,12, +10,7,221,190,98,23,255,208,116,27,255,204,110,27,255,30,21,11,181,0, +8,13,11,8,91,185,114,30,255,211,124,30,255,209,123,30,255,86,55,25, +255,9,8,6,187,6,6,5,85,7,6,6,130,32,24,15,255,200,122,31, +255,209,123,30,255,206,122,31,255,32,23,13,173,0,8,10,8,7,144,191, +113,30,255,212,127,35,255,210,126,35,255,40,27,15,255,4,4,3,85,0, +4,2,2,1,8,11,9,6,212,157,81,20,255,189,92,20,255,190,97,21, +255,27,19,10,178,0,8,12,10,7,96,183,105,28,255,209,123,30,255,205, +114,26,255,36,24,13,255,4,4,3,85,0,4,4,4,4,28,18,14,9, +187,195,115,30,255,211,124,30,255,210,130,35,255,35,26,14,210,0,20,3, +2,2,28,12,10,7,227,195,115,30,255,211,124,30,255,209,123,30,255,38, +25,15,255,4,4,3,85,0,20,13,11,8,170,194,115,31,255,209,122,28, +255,196,99,21,255,21,15,8,255,0,12,11,9,6,170,153,79,20,255,187, +91,20,255,181,96,20,255,30,20,9,178,0,8,13,10,6,96,151,79,20, +255,187,91,20,255,181,96,20,255,22,16,9,255,0,12,12,9,7,170,146, +76,19,255,167,88,18,255,158,77,17,255,23,15,6,170,0,8,10,8,5, +85,133,66,16,255,167,88,18,255,168,86,19,255,22,16,9,255,0,20,12, +9,7,170,155,80,20,255,185,94,20,255,181,96,20,255,22,16,9,221,0, +8,6,6,5,42,51,29,12,255,150,81,19,255,165,87,18,255,42,26,11, +255,5,5,4,108,0,4,5,5,4,28,18,15,11,255,195,114,28,255,207, +123,32,255,158,94,31,255,17,13,10,142,0,8,6,5,5,57,50,34,19, +255,191,111,32,255,208,117,29,255,113,73,30,255,10,10,9,227,6,6,5, +125,7,7,6,198,42,29,17,255,187,96,22,255,166,87,23,255,42,27,15, +255,8,6,5,110,0,32,5,5,4,184,21,16,8,255,106,54,15,255,154, +78,17,255,151,77,18,255,92,48,15,255,11,9,6,119,0,8,10,8,5, +93,131,69,18,255,189,92,20,255,200,105,21,255,33,22,12,255,5,4,4, +54,0,12,9,8,6,85,76,53,25,255,200,118,31,255,204,114,27,255,65, +43,22,255,6,6,5,113,0,32,4,3,3,17,14,11,9,227,195,111,28, +255,206,115,27,255,204,105,25,255,24,17,11,255,0,12,5,5,4,28,13, +10,6,227,125,66,18,255,165,84,18,255,161,85,17,255,161,85,17,255,155, +79,18,255,28,19,9,255,6,5,3,85,0,64,11,9,8,68,86,56,27, +255,204,126,33,255,210,125,33,255,30,21,13,255,0,68,13,11,8,170,195, +115,30,255,209,123,30,255,207,122,30,255,27,19,12,255,3,3,2,28,0, +128,7,6,4,184,131,65,16,255,161,85,17,255,154,78,17,255,15,11,6, +249,0,76,10,8,7,173,166,87,23,255,198,104,21,255,196,99,21,255,35, +23,12,255,3,3,2,85,0,72,13,11,8,170,194,115,31,255,211,124,30, +255,207,122,30,255,27,19,12,255,3,3,2,28,0,108,13,11,8,170,196, +113,31,255,213,132,36,255,211,127,36,255,30,21,13,255,0,40,11,9,6, +170,155,80,20,255,185,94,20,255,180,91,19,255,21,15,8,255,0,255,0, +189,10,8,7,184,183,100,26,255,208,116,27,255,204,114,27,255,26,18,11, +255,4,4,4,28,0,255,0,133,10,8,5,127,119,60,15,255,160,85,19, +255,91,48,16,255,10,8,5,227,4,4,3,28,0,12,9,7,4,161,131, +67,16,255,159,81,18,255,159,78,18,255,18,13,7,249,0,16,7,6,4, +170,57,34,14,255,176,90,21,255,195,95,22,255,26,19,11,232,0,16,17, +14,10,99,179,106,28,255,207,122,30,255,180,109,33,255,25,20,12,255,7, +6,6,170,20,17,11,255,196,114,27,255,208,117,29,255,203,124,30,255,172, +106,35,255,53,36,20,255,10,9,7,108,0,40,9,8,6,170,159,82,20, +255,202,103,23,255,206,111,27,255,22,17,11,255,0,8,10,9,7,139,115, +74,30,255,213,133,48,255,39,28,16,255,0,8,9,8,4,113,67,39,14, +255,181,92,20,255,24,18,9,255,0,12,28,19,9,227,139,79,26,255,206, +117,31,255,212,123,37,255,214,126,41,255,172,106,35,255,53,34,18,255,122, +78,31,255,211,127,44,255,217,136,50,255,216,135,49,255,190,122,41,255,65, +43,22,255,14,11,7,85,0,8,7,6,4,28,29,21,10,249,153,79,20, +255,174,85,19,255,103,53,16,255,17,12,6,244,19,13,6,170,21,14,6, +170,27,17,6,170,21,14,6,212,21,14,6,255,25,17,6,224,12,9,5, +45,0,12,24,16,7,153,22,15,7,255,26,16,7,210,12,9,5,40,0, +8,8,7,5,28,17,13,8,227,114,61,19,255,174,85,19,255,154,79,19, +255,60,33,13,255,11,9,6,170,0,12,10,8,5,170,146,79,19,255,180, +87,19,255,67,39,14,255,8,6,5,85,0,8,24,17,9,255,143,75,20, +255,162,80,19,255,22,15,7,215,0,28,8,7,5,110,60,33,13,255,166, +78,19,255,22,15,7,227,0,8,7,6,4,85,91,51,16,255,174,88,19, +255,169,78,18,255,25,17,8,255,3,3,2,8,0,20,11,9,6,178,143, +74,18,255,177,89,18,255,138,75,19,255,18,13,7,176,0,16,9,7,4, +28,29,19,8,232,41,25,10,255,17,13,8,255,9,8,6,116,0,4,7, +6,4,59,14,11,7,227,32,21,9,255,40,24,9,255,12,9,5,105,0, +32,14,11,9,170,199,124,36,255,213,119,36,255,202,102,21,255,20,14,7, +246,0,152,8,7,5,142,53,31,12,255,162,86,19,255,121,64,18,255,19, +14,8,252,6,5,3,28,0,8,10,8,5,125,142,74,19,255,180,91,19, +255,183,89,19,255,19,14,8,255,0,4,5,5,4,6,15,13,10,193,69, +42,18,255,171,91,20,255,189,88,20,255,200,101,21,255,31,21,12,255,0, +16,10,8,7,28,30,21,13,227,150,92,35,255,208,121,37,255,211,115,30, +255,208,117,29,255,28,21,13,255,0,24,10,8,7,28,22,15,7,198,26, +17,7,255,24,15,7,221,9,7,4,57,0,12,8,7,5,156,171,89,22, +255,202,107,23,255,202,103,23,255,23,18,10,249,0,12,26,18,9,198,29, +19,8,255,24,16,7,215,10,8,5,51,0,12,10,8,5,85,134,70,19, +255,175,88,18,255,173,87,18,255,20,14,7,255,0,24,10,8,5,85,26, +19,9,255,107,58,18,255,154,83,19,255,168,79,19,255,169,78,18,255,173, +87,18,255,172,80,19,255,26,17,7,170,0,8,11,10,8,136,189,99,26, +255,210,115,31,255,216,129,45,255,143,96,40,255,15,13,10,227,12,12,11, +170,15,13,12,170,13,12,10,170,13,12,10,136,9,8,8,85,0,16,11, +9,6,170,169,91,22,255,202,103,23,255,203,108,24,255,18,15,9,255,0, +12,6,5,5,23,28,19,11,156,31,22,12,255,34,24,13,227,14,11,7, +85,0,36,9,8,8,142,72,54,31,255,215,147,60,255,218,146,61,255,174, +100,35,255,14,11,7,142,0,8,11,8,6,102,142,74,19,255,185,86,20, +255,195,98,20,255,18,14,9,249,0,12,10,8,7,170,202,131,47,255,220, +152,63,255,220,151,61,255,22,19,13,252,0,8,11,9,8,167,203,135,46, +255,217,139,48,255,210,120,33,255,18,14,9,255,0,12,9,8,6,170,198, +117,37,255,211,115,30,255,202,102,21,255,34,22,11,176,0,8,13,11,8, +170,202,122,37,255,218,144,49,255,217,144,50,255,28,21,13,255,0,8,12, +11,9,170,204,122,41,255,217,135,46,255,215,136,42,255,46,33,19,255,0, +16,10,9,7,28,21,19,14,227,153,104,46,255,214,149,55,255,158,103,39, +255,16,14,11,221,7,6,6,28,0,20,20,18,13,142,31,26,18,170,25, +21,16,170,24,20,15,170,24,20,15,170,24,20,15,170,24,21,15,170,31, +26,18,170,25,21,16,170,14,12,9,31,0,20,10,9,7,167,75,51,26, +255,202,117,33,255,186,120,43,255,41,32,20,255,12,11,9,85,0,16,11, +9,8,28,31,22,12,215,49,33,18,255,41,27,16,227,12,10,7,85,0, +12,14,12,9,170,204,137,51,255,220,152,63,255,220,151,61,255,23,19,12, +252,0,8,11,10,6,85,136,70,17,255,175,88,18,255,169,78,18,255,15, +11,6,255,0,8,9,8,6,85,26,19,9,255,153,82,18,255,177,89,18, +255,180,84,19,255,24,17,9,218,0,8,11,9,8,147,196,115,35,255,215, +125,38,255,214,125,39,255,20,16,11,255,0,12,9,8,6,159,165,86,22, +255,197,99,20,255,195,90,20,255,32,21,11,170,0,8,12,10,7,85,145, +76,20,255,189,92,20,255,191,96,20,255,18,14,9,255,0,12,9,8,6, +170,199,126,39,255,217,133,50,255,217,144,50,255,23,18,12,252,0,8,11, +10,8,142,191,105,28,255,206,111,27,255,203,104,24,255,19,15,10,255,0, +12,9,8,6,57,21,15,8,198,28,19,9,255,32,21,11,227,11,9,6, +76,0,8,11,9,8,170,203,125,42,255,220,146,59,255,219,146,60,255,24, +19,13,255,0,12,11,10,8,170,204,136,47,255,220,146,59,255,218,147,55, +255,25,19,12,232,0,8,11,10,8,119,161,87,22,255,195,98,20,255,202, +103,23,255,18,15,9,255,0,32,14,12,9,170,200,125,37,255,214,124,37, +255,205,106,26,255,20,16,9,221,0,32,16,13,9,170,205,130,42,255,219, +144,56,255,219,146,60,255,24,19,13,255,0,12,6,5,3,23,21,14,6, +170,26,16,7,255,26,17,7,224,14,10,5,31,0,8,11,9,6,125,170, +89,23,255,211,115,30,255,214,126,41,255,23,19,12,255,0,12,11,10,8, +170,195,112,30,255,206,106,25,255,200,105,21,255,29,20,10,170,0,8,11, +9,6,85,134,70,19,255,177,85,18,255,172,80,19,255,18,13,7,255,0, +40,14,12,9,170,195,112,30,255,206,111,27,255,202,103,23,255,31,22,10, +170,0,8,13,10,6,85,151,79,20,255,189,92,20,255,183,89,19,255,17, +13,8,255,0,4,8,7,5,59,57,34,16,255,184,97,27,255,198,115,33, +255,114,77,33,255,16,14,11,210,6,5,5,8,0,8,12,10,7,170,195, +113,32,255,215,123,42,255,217,133,50,255,32,24,15,255,0,32,12,11,7, +170,175,90,22,255,198,104,21,255,189,92,20,255,192,97,21,255,189,97,22, +255,45,29,14,255,10,9,7,210,22,17,11,255,183,102,30,255,212,121,41, +255,216,135,49,255,217,137,52,255,214,125,39,255,29,21,12,204,0,8,11, +9,6,85,143,75,20,255,193,97,20,255,195,98,20,255,180,93,23,255,88, +54,23,255,11,10,8,113,0,4,14,12,7,85,170,89,23,255,202,103,23, +255,202,102,21,255,32,22,11,178,0,8,12,10,7,113,176,91,23,255,205, +105,24,255,209,117,28,255,39,28,16,255,5,5,5,28,0,8,15,14,10, +198,206,132,45,255,217,133,50,255,215,133,44,255,25,19,12,232,0,8,11, +10,8,125,198,118,39,255,218,145,51,255,218,146,53,255,20,17,11,255,0, +12,9,8,6,170,198,124,37,255,216,134,45,255,214,139,41,255,22,18,11, +255,0,8,11,10,8,136,191,105,28,255,206,111,27,255,206,106,25,255,36, +26,15,255,5,5,4,28,0,8,15,13,10,198,192,105,27,255,206,106,25, +255,204,105,25,255,23,17,10,232,0,8,12,10,7,125,196,119,37,255,218, +141,51,255,218,139,55,255,20,16,11,255,0,12,9,8,6,170,196,110,33, +255,215,126,40,255,214,125,39,255,23,18,12,252,0,8,11,9,8,167,201, +123,40,255,217,133,50,255,214,136,43,255,20,16,11,255,0,12,6,5,5, +23,29,21,12,153,32,22,13,255,35,25,14,227,15,12,8,85,0,24,12, +10,9,170,198,124,37,255,215,125,38,255,213,124,38,255,23,18,12,255,0, +24,14,12,9,170,204,132,47,255,219,144,56,255,211,127,36,255,28,21,13, +255,0,12,14,12,9,170,198,117,37,255,215,123,42,255,214,125,39,255,25, +20,12,215,0,8,11,10,8,130,198,119,35,255,215,126,40,255,212,123,37, +255,30,22,13,255,0,12,14,12,9,170,196,114,33,255,206,106,25,255,200, +105,21,255,30,21,11,184,0,8,13,11,8,99,184,100,25,255,209,117,28, +255,210,115,31,255,28,21,13,255,0,20,14,12,9,170,198,117,37,255,215, +126,40,255,214,126,41,255,25,19,12,255,0,12,10,9,7,125,61,42,22, +255,190,107,33,255,153,98,38,255,29,23,16,255,13,12,10,255,17,15,10, +255,108,74,37,255,210,144,59,255,153,98,38,255,16,14,11,224,6,6,5, +17,0,12,15,13,8,227,115,67,24,255,197,100,22,255,150,81,25,255,32, +24,13,255,15,13,8,255,19,15,10,255,85,48,18,255,178,95,21,255,115, +65,20,255,15,12,8,255,5,5,4,34,0,32,10,9,7,198,69,46,22, +255,186,103,29,255,195,111,28,255,92,58,25,255,15,12,8,198,0,12,10, +9,7,170,194,112,31,255,215,125,38,255,218,146,53,255,24,19,13,255,0, +20,15,14,10,227,159,103,42,255,212,127,43,255,177,118,48,255,19,17,12, +227,6,6,5,28,0,32,11,10,8,170,182,98,23,255,202,106,21,255,195, +98,20,255,24,17,9,212,0,12,18,14,9,227,102,54,19,255,157,83,18, +255,85,46,14,255,19,13,6,255,47,27,10,255,150,81,19,255,131,67,20, +255,39,26,14,255,12,11,9,85,0,64,10,9,7,170,118,75,33,255,215, +141,54,255,44,33,19,255,0,16,9,9,8,108,19,17,12,170,27,23,16, +170,23,21,16,170,23,21,16,170,24,20,15,170,20,18,13,170,15,14,10, +170,10,9,7,113,7,6,6,28,0,12,12,11,9,170,189,99,26,255,209, +110,30,255,211,118,36,255,141,88,36,255,19,17,12,227,20,18,13,170,24, +20,15,170,21,19,14,170,16,14,11,170,10,9,7,113,6,6,5,28,0, +20,8,7,5,65,11,10,8,142,16,14,11,170,24,21,15,170,25,22,16, +170,23,21,16,170,21,19,14,170,16,14,11,170,11,10,8,113,7,7,6, +28,0,20,8,7,5,62,10,9,5,136,12,10,7,170,14,11,7,170,13, +10,6,170,11,9,6,198,31,21,10,255,153,82,18,255,177,85,18,255,169, +78,18,255,22,15,7,204,0,16,8,7,5,57,11,10,6,142,19,17,12, +170,23,21,16,170,25,22,16,170,23,21,16,170,21,19,14,170,15,14,10, +170,10,10,9,113,7,6,6,28,0,16,12,10,7,153,55,32,14,255,175, +93,20,255,185,94,20,255,183,89,19,255,80,44,17,255,13,11,8,187,7, +6,6,25,0,16,8,7,5,62,11,10,6,142,16,14,11,170,23,19,14, +170,25,22,16,170,23,21,16,170,19,17,12,170,15,14,10,170,17,15,10, +170,19,17,12,142,9,8,8,28,0,8,12,10,9,170,204,137,49,255,220, +146,59,255,218,146,53,255,141,91,38,255,19,17,12,227,19,17,12,170,24, +20,15,170,21,19,14,170,15,14,10,170,10,10,9,113,7,6,6,28,0, +16,12,10,7,57,14,12,7,102,14,11,7,85,0,32,12,10,7,57,13, +11,8,105,15,13,8,85,0,12,12,11,9,170,204,136,47,255,220,146,59, +255,218,153,59,255,24,19,13,255,0,12,8,7,5,82,11,10,6,156,11, +9,6,170,10,9,7,91,0,12,10,8,5,127,144,78,19,255,180,87,19, +255,174,81,19,255,24,15,7,210,0,12,14,11,7,68,12,10,7,170,12, +10,7,170,17,15,10,170,24,20,15,170,19,17,12,170,15,14,10,170,18, +15,11,170,24,21,15,170,21,19,14,170,15,14,10,170,11,10,8,113,7, +7,6,28,0,16,15,13,10,119,17,15,12,170,15,13,10,170,16,14,11, +170,19,17,12,170,21,18,12,170,18,15,11,170,15,13,8,170,11,9,6, +170,10,8,7,88,6,5,5,23,0,20,10,9,7,85,14,12,9,170,19, +17,12,170,21,19,14,170,21,19,14,170,21,19,14,170,19,17,12,170,15, +14,10,170,11,10,8,116,7,7,6,28,0,16,15,14,10,119,18,15,11, +170,15,14,10,170,18,15,11,170,21,19,14,170,25,22,16,170,23,21,16, +170,21,19,14,170,16,14,11,170,11,10,8,113,7,7,6,28,0,20,10, +9,7,85,14,12,9,170,19,17,12,170,20,18,13,170,20,18,13,170,23, +19,14,170,19,17,12,170,15,14,10,170,17,14,10,170,19,17,12,142,10, +9,7,28,0,12,15,13,10,113,18,15,11,170,15,14,10,170,18,15,11, +170,21,19,14,170,25,22,16,170,23,21,16,170,20,18,13,170,16,14,11, +170,11,10,8,113,7,7,6,28,0,20,7,7,6,82,11,10,6,142,16, +13,9,170,19,17,12,170,21,19,14,170,24,21,15,170,25,22,16,170,25, +22,16,170,15,13,10,170,12,11,9,57,0,16,15,13,10,170,97,65,34, +255,209,132,42,255,214,136,43,255,214,127,43,255,159,103,42,255,21,19,14, +227,11,10,8,28,0,12,16,14,11,113,21,19,14,170,18,15,11,153,11, +10,8,28,0,16,15,14,10,125,21,19,14,170,19,17,12,142,10,9,7, +28,0,12,15,14,10,113,21,19,14,170,18,16,11,153,11,10,8,28,0, +16,15,13,10,125,21,19,14,170,19,17,12,142,10,9,7,28,0,12,15, +14,10,113,21,19,14,170,18,16,11,153,11,10,8,28,0,24,15,14,10, +125,21,19,14,170,19,17,12,142,9,9,8,28,0,12,17,14,10,130,27, +24,16,170,21,19,14,142,10,9,7,28,0,16,16,14,11,113,28,24,17, +170,24,21,15,161,12,11,9,28,0,12,16,14,11,113,21,19,14,170,18, +15,11,153,11,10,8,28,0,16,15,13,10,125,21,19,14,170,19,17,12, +142,9,8,6,28,0,12,18,15,11,136,19,16,10,170,16,13,9,170,16, +14,9,170,15,13,8,170,13,11,8,170,12,11,9,170,13,12,8,170,15, +14,10,170,14,13,11,170,11,11,10,113,0,20,13,11,8,170,190,98,23, +255,204,116,31,255,74,52,27,255,9,8,8,113,0,16,13,11,8,170,192, +106,29,255,208,112,27,255,208,117,29,255,27,21,12,255,0,16,5,5,4, +28,27,23,16,255,199,121,44,255,214,139,41,255,31,23,14,255,0,16,13, +11,8,28,32,24,13,227,36,26,15,255,19,16,12,198,8,8,7,51,0, +4,8,8,7,57,29,21,12,218,48,32,17,255,45,30,16,255,20,16,11, +218,10,9,7,105,0,44,14,12,9,170,204,130,51,255,224,153,77,255,225, +169,88,255,33,27,18,255,0,12,21,19,14,215,217,163,86,255,61,46,28, +255,0,12,19,16,12,201,203,121,40,255,51,38,22,255,0,12,4,4,3, +25,16,14,11,227,212,147,71,255,224,160,77,255,223,161,80,255,31,25,16, +255,4,4,4,102,10,10,9,215,206,133,55,255,223,156,70,255,224,164,85, +255,51,39,24,255,5,5,4,82,0,12,15,12,8,110,178,98,27,255,211, +115,30,255,211,121,34,255,36,26,15,255,3,3,2,85,0,60,8,8,5, +28,27,20,10,232,125,73,22,255,190,97,21,255,180,92,21,255,97,56,20, +255,14,11,7,170,0,16,12,10,7,142,165,89,22,255,198,104,21,255,84, +50,19,255,7,6,4,159,0,4,5,5,4,82,32,23,11,255,121,69,22, +255,97,56,20,255,15,13,8,142,0,32,14,12,7,198,172,92,21,255,28, +19,9,207,0,8,11,10,6,85,148,78,21,255,198,104,21,255,192,97,21, +255,21,15,8,255,0,24,10,9,5,170,167,90,22,255,202,93,21,255,202, +103,23,255,21,16,10,255,0,20,4,3,3,133,20,16,9,255,151,80,22, +255,75,42,16,255,10,8,7,255,32,22,11,255,164,86,23,255,60,39,17, +255,5,5,4,252,0,36,12,11,9,198,213,155,80,255,224,166,83,255,211, +121,34,255,20,16,9,255,3,3,2,28,0,144,6,6,5,51,27,20,10, +255,160,84,23,255,198,104,21,255,67,40,16,255,8,7,5,125,0,12,12, +10,9,170,195,112,30,255,215,125,38,255,217,133,50,255,49,35,22,255,5, +5,4,133,13,12,10,210,189,119,50,255,211,127,44,255,212,121,41,255,218, +135,53,255,220,148,63,255,34,27,17,255,0,20,4,4,4,17,13,12,10, +227,196,113,31,255,212,118,35,255,214,123,43,255,33,26,16,255,0,56,12, +11,9,187,208,134,55,255,223,146,70,255,221,152,70,255,34,26,17,255,0, +40,8,7,5,164,165,86,22,255,202,98,21,255,198,96,21,255,22,16,9, +255,0,20,8,8,5,85,32,22,11,255,167,87,22,255,160,84,23,255,93, +54,20,255,120,65,21,255,188,96,21,255,196,99,21,255,200,105,21,255,24, +19,11,207,0,8,15,14,10,110,208,152,71,255,227,174,98,255,228,179,103, +255,225,176,98,255,217,169,94,255,213,166,92,255,215,167,92,255,213,155,80, +255,204,136,55,255,138,89,37,255,25,22,16,227,9,9,8,28,0,8,11, +10,8,170,203,129,50,255,223,149,70,255,222,158,75,255,31,25,16,255,4, +4,4,28,0,60,8,8,7,57,49,40,26,255,206,152,83,255,224,169,91, +255,194,140,71,255,31,27,20,255,9,8,8,28,0,8,12,10,9,161,196, +110,33,255,218,130,51,255,222,158,75,255,31,25,16,255,4,4,4,28,0, +8,11,10,8,198,213,160,84,255,228,180,105,255,227,175,100,255,33,28,18, +207,0,8,12,11,9,130,210,155,77,255,228,169,99,255,226,172,95,255,30, +25,17,255,4,4,4,28,0,8,11,10,8,198,204,129,49,255,214,127,43, +255,213,125,40,255,23,19,12,232,0,8,14,13,9,125,208,152,71,255,223, +159,76,255,218,153,59,255,33,26,16,210,0,8,13,12,10,127,198,118,39, +255,215,127,42,255,213,126,42,255,41,31,18,227,0,12,6,6,5,28,25, +21,16,227,204,150,79,255,223,171,98,255,175,122,60,255,18,15,11,218,5, +4,4,17,0,20,20,18,13,85,177,101,34,255,204,123,37,255,199,117,36, +255,199,117,36,255,202,122,37,255,199,117,36,255,198,114,31,255,198,110,31, +255,202,118,35,255,46,33,21,170,0,24,10,9,7,153,110,78,37,255,213, +162,82,255,218,164,87,255,67,51,30,255,9,8,8,85,0,40,6,5,5, +28,21,19,14,255,217,166,92,255,227,175,100,255,224,169,91,255,31,25,16, +215,0,8,12,10,7,85,154,80,21,255,197,99,20,255,192,97,21,255,28, +20,9,255,4,3,3,110,11,9,6,170,117,63,20,255,184,94,21,255,198, +104,21,255,203,104,24,255,210,122,37,255,21,17,12,252,0,8,10,9,7, +161,203,129,50,255,224,160,77,255,225,169,88,255,30,25,17,255,4,4,4, +28,0,8,8,7,5,190,165,86,22,255,198,104,21,255,196,99,21,255,28, +19,9,170,0,8,13,11,8,85,176,91,23,255,208,112,27,255,210,121,35, +255,27,22,14,255,4,4,4,28,0,8,11,10,8,198,211,149,76,255,224, +168,87,255,224,162,81,255,32,26,17,210,0,8,12,10,7,113,176,91,23, +255,202,107,23,255,202,95,23,255,20,16,9,255,0,40,15,13,10,170,213, +160,84,255,228,180,105,255,227,174,98,255,33,26,18,255,0,12,15,13,10, +170,213,155,80,255,226,172,95,255,224,167,85,255,23,20,14,244,0,8,11, +10,8,127,189,104,28,255,214,127,43,255,221,148,70,255,31,25,16,255,4, +4,4,28,0,28,14,12,9,170,195,113,32,255,209,117,28,255,202,103,23, +255,20,15,9,252,3,3,3,14,0,28,15,14,10,170,213,155,80,255,226, +172,95,255,221,152,70,255,28,24,15,255,0,40,14,12,9,170,208,141,61, +255,225,162,88,255,227,174,98,255,33,26,18,255,4,4,4,28,0,8,10, +8,7,198,182,98,23,255,202,103,23,255,198,104,21,255,28,19,9,170,0, +8,11,10,6,85,154,80,21,255,202,98,21,255,202,103,23,255,25,20,12, +255,0,40,12,10,7,170,186,100,23,255,202,99,23,255,200,105,21,255,30, +21,9,170,0,8,12,9,7,85,154,80,21,255,198,104,21,255,196,99,21, +255,28,20,9,255,4,4,3,113,11,10,6,227,183,100,26,255,212,127,43, +255,167,117,52,255,17,15,12,215,5,5,5,14,0,12,15,13,10,170,211, +149,76,255,224,166,83,255,223,161,80,255,34,26,17,255,0,32,10,9,7, +170,167,87,22,255,198,92,21,255,196,99,21,255,196,95,21,255,198,92,21, +255,195,99,22,255,192,106,29,255,206,127,43,255,217,141,60,255,223,146,70, +255,224,165,81,255,220,148,63,255,212,124,39,255,25,19,12,215,0,8,12, +11,9,116,196,116,37,255,218,141,51,255,218,139,55,255,218,142,61,255,215, +143,58,255,24,19,13,212,0,4,10,9,7,156,203,129,50,255,221,150,66, +255,220,148,63,255,25,21,14,227,0,8,10,10,7,159,204,134,59,255,225, +160,84,255,225,169,88,255,36,29,19,255,0,12,15,14,10,170,204,130,51, +255,220,142,59,255,218,139,55,255,21,18,12,249,0,8,11,10,8,142,206, +145,67,255,226,172,95,255,227,174,98,255,32,26,17,255,4,4,4,28,0, +8,11,10,8,198,198,117,37,255,215,125,38,255,211,122,36,255,28,21,13, +215,0,8,13,11,8,96,174,91,23,255,202,107,23,255,202,103,23,255,22, +17,9,255,0,12,11,10,6,170,176,91,23,255,202,103,23,255,203,108,24, +255,21,15,10,238,0,8,11,10,8,142,206,145,67,255,226,170,91,255,224, +160,85,255,30,24,17,255,4,4,4,28,0,8,11,10,8,198,209,149,70, +255,224,160,77,255,222,158,75,255,31,25,16,212,0,8,12,11,9,127,198, +116,35,255,215,125,38,255,211,122,36,255,28,21,13,255,4,4,4,28,0, +52,13,12,8,170,195,112,30,255,209,110,30,255,207,105,30,255,25,20,12, +255,0,24,15,14,10,170,213,158,80,255,226,172,95,255,224,164,85,255,33, +27,18,255,0,12,15,14,10,170,210,143,65,255,224,168,87,255,224,165,81, +255,25,21,14,232,0,8,10,10,9,153,208,147,67,255,224,166,83,255,222, +158,75,255,34,26,17,255,0,12,15,14,10,170,211,149,76,255,223,149,70, +255,219,146,60,255,25,20,14,235,0,8,10,10,9,150,204,134,59,255,224, +156,83,255,224,165,81,255,33,27,18,255,0,20,15,14,10,170,211,150,70, +255,226,170,91,255,226,172,95,255,33,26,18,255,0,16,9,9,8,150,101, +74,38,255,198,145,77,255,206,157,87,255,202,151,79,255,197,141,74,255,200, +146,75,255,180,126,57,255,21,19,14,227,5,5,4,28,0,16,8,7,5, +113,43,28,14,255,187,96,22,255,181,93,22,255,98,55,21,255,68,42,17, +255,77,46,18,255,129,72,22,255,174,89,21,255,83,47,18,255,11,9,6, +221,0,28,6,6,5,28,16,14,11,195,108,76,35,255,210,141,59,255,218, +162,81,255,167,118,54,255,16,14,11,221,5,5,5,14,0,12,15,13,10, +170,211,149,76,255,224,168,87,255,223,154,80,255,31,25,16,255,0,20,6, +6,5,57,34,27,17,255,203,122,36,255,208,124,41,255,109,76,34,255,13, +12,10,142,0,32,13,11,8,170,176,91,23,255,202,93,21,255,196,99,21, +255,28,19,9,170,0,8,11,9,6,85,132,71,21,255,195,99,22,255,103, +59,20,255,11,10,6,170,3,3,2,25,6,6,5,110,55,35,16,255,198, +113,29,255,212,134,51,255,41,32,20,210,0,68,21,19,14,215,217,163,86, +255,49,38,24,255,0,12,11,10,8,82,54,43,27,255,200,135,59,255,210, +137,59,255,207,131,50,255,205,127,44,255,199,117,36,255,195,111,28,255,187, +101,24,255,93,54,22,255,19,15,10,227,7,6,6,28,0,8,10,9,7, +170,195,109,32,255,218,138,53,255,224,158,81,255,223,173,95,255,219,167,94, +255,217,169,94,255,218,171,97,255,217,166,92,255,208,136,59,255,110,68,27, +255,19,15,10,227,6,6,5,28,0,12,12,11,7,170,61,42,20,255,188, +106,33,255,208,134,55,255,215,163,82,255,217,166,92,255,216,167,88,255,216, +167,89,255,211,150,70,255,146,94,39,255,26,21,15,229,9,8,6,28,0, +12,12,10,7,170,51,32,14,255,151,80,22,255,169,91,22,255,173,86,22, +255,169,88,22,255,173,86,22,255,180,92,21,255,194,98,21,255,196,95,21, +255,192,97,21,255,31,21,10,170,0,12,12,10,7,170,57,37,18,255,189, +107,34,255,212,149,67,255,217,166,92,255,217,166,92,255,218,171,97,255,215, +163,82,255,205,126,48,255,116,72,29,255,20,16,11,227,6,6,5,28,0, +8,11,9,6,68,126,68,21,255,191,98,22,255,194,98,21,255,192,97,21, +255,192,97,21,255,191,98,22,255,177,91,22,255,26,19,9,142,0,12,12, +10,7,170,58,37,17,255,185,107,30,255,208,134,55,255,216,167,88,255,218, +171,97,255,217,166,92,255,213,148,72,255,204,130,51,255,209,141,60,255,211, +159,76,255,30,25,17,170,0,8,10,10,7,167,210,155,77,255,228,178,99, +255,224,165,81,255,221,165,86,255,217,166,92,255,218,169,93,255,217,166,92, +255,214,156,81,255,206,135,51,255,116,72,29,255,20,16,11,227,6,6,5, +28,0,8,13,10,6,57,115,62,20,255,169,91,22,255,165,86,22,255,24, +18,9,167,0,24,12,10,7,88,117,63,20,255,186,100,23,255,191,107,32, +255,35,27,16,144,0,8,10,10,7,170,210,155,77,255,228,178,99,255,221, +152,70,255,24,19,13,255,0,8,12,10,7,170,58,36,15,255,157,79,22, +255,151,80,22,255,58,35,15,255,11,9,6,57,0,8,12,10,7,85,157, +81,20,255,197,99,20,255,192,97,21,255,28,20,9,170,0,8,11,9,6, +57,115,62,20,255,189,94,24,255,198,117,37,255,213,157,76,255,218,171,97, +255,217,169,94,255,214,161,85,255,213,157,76,255,212,149,67,255,208,134,55, +255,205,126,48,255,143,96,40,255,28,26,19,229,8,8,7,28,0,8,13, +12,8,85,141,74,24,255,190,94,23,255,183,95,24,255,183,95,24,255,187, +93,24,255,189,97,22,255,181,93,22,255,177,91,22,255,169,88,22,255,89, +52,20,255,21,18,12,227,9,9,8,28,0,12,18,17,13,181,103,74,40, +255,207,146,74,255,214,156,81,255,210,144,67,255,208,138,55,255,207,129,52, +255,205,133,48,255,205,126,48,255,151,101,42,255,28,26,19,232,9,8,8, +28,0,8,13,12,10,110,186,127,63,255,214,156,81,255,213,158,80,255,213, +155,80,255,214,156,81,255,214,153,75,255,213,148,72,255,213,148,72,255,211, +150,70,255,159,111,54,255,28,25,19,241,9,8,8,31,0,12,18,17,13, +181,103,74,40,255,208,156,81,255,214,156,81,255,208,138,55,255,209,137,60, +255,213,158,80,255,213,155,80,255,213,160,84,255,215,160,88,255,213,163,84, +255,30,24,17,178,0,8,12,11,9,93,178,121,53,255,213,158,80,255,210, +143,65,255,211,146,62,255,213,148,72,255,215,163,82,255,213,158,80,255,212, +149,67,255,209,141,60,255,153,106,49,255,28,25,19,235,9,9,8,31,0, +12,18,15,11,173,66,43,21,255,187,101,32,255,207,132,52,255,210,144,67, +255,213,148,72,255,214,156,81,255,216,167,88,255,214,156,81,255,176,128,65, +255,46,39,27,255,0,12,15,14,10,85,181,111,42,255,215,136,52,255,213, +125,40,255,211,122,36,255,212,123,37,255,210,123,39,255,202,122,37,255,31, +24,14,170,0,8,12,11,9,88,164,89,29,255,203,122,36,255,199,117,36, +255,30,23,15,212,0,12,15,13,10,127,187,133,62,255,213,148,72,255,208, +138,55,255,31,24,16,170,0,8,13,12,10,85,172,104,37,255,209,134,54, +255,206,135,51,255,32,25,17,212,0,12,15,13,10,127,181,116,46,255,211, +143,62,255,210,153,71,255,29,24,16,178,0,8,13,12,10,91,178,121,53, +255,213,154,70,255,208,134,55,255,31,25,16,210,0,20,15,14,10,125,179, +110,42,255,210,135,55,255,208,139,65,255,26,21,15,184,0,8,14,13,9, +85,179,117,44,255,217,165,82,255,213,163,84,255,27,23,16,221,0,12,14, +12,9,136,174,103,39,255,206,127,43,255,199,117,36,255,31,24,14,170,0, +8,12,11,9,88,164,89,29,255,202,118,35,255,196,114,33,255,29,22,14, +210,0,12,14,12,9,125,169,95,30,255,202,119,37,255,199,119,39,255,24, +19,13,190,0,8,14,12,9,85,170,95,29,255,198,113,29,255,199,116,34, +255,204,128,47,255,206,135,51,255,204,129,49,255,204,129,49,255,208,134,55, +255,211,149,76,255,192,140,73,255,95,74,39,255,17,15,12,85,0,16,14, +12,9,198,211,150,70,255,206,152,81,255,31,26,20,255,7,7,6,48,0, +16,15,13,10,170,211,149,76,255,226,170,91,255,226,172,95,255,35,28,18, +255,0,20,15,14,12,218,171,120,60,255,219,154,70,255,41,31,20,255,4, +4,3,28,0,104,17,16,12,170,219,179,116,255,232,193,137,255,232,199,135, +255,40,33,23,255,0,12,10,10,9,76,62,50,31,255,20,18,13,167,0, +12,11,10,8,76,58,46,29,255,20,18,13,167,0,16,13,12,10,170,210, +150,71,255,223,147,72,255,221,150,66,255,26,21,15,210,0,4,11,10,8, +119,211,159,84,255,229,184,114,255,230,186,123,255,30,26,19,255,0,16,12, +11,9,93,137,90,40,255,223,167,94,255,228,180,111,255,167,133,80,255,17, +16,14,227,11,11,10,170,12,11,9,170,12,11,9,170,12,11,9,119,7, +7,6,57,0,36,7,7,6,62,21,18,12,227,157,92,28,255,203,105,26, +255,197,106,26,255,82,48,21,255,14,12,7,173,5,5,4,8,0,16,8, +7,5,28,26,19,11,227,103,68,25,255,158,96,29,255,57,41,22,255,13, +12,10,241,33,26,16,255,146,88,31,255,66,47,23,255,12,10,9,201,6, +5,5,14,0,32,8,7,5,57,30,22,11,255,15,12,8,96,0,8,10, +10,7,130,190,104,27,255,209,118,30,255,211,117,34,255,27,21,14,255,0, +24,13,12,10,170,199,122,39,255,218,130,51,255,223,146,70,255,30,24,17, +255,0,12,23,22,18,139,30,27,21,170,16,15,11,255,89,59,26,255,203, +110,28,255,196,113,31,255,122,81,33,255,186,117,43,255,216,129,51,255,184, +126,57,255,38,34,25,255,24,22,19,221,33,30,24,170,15,15,12,28,0, +12,24,22,19,142,32,31,25,170,21,20,16,198,90,71,45,255,223,179,110, +255,226,172,95,255,221,150,66,255,143,100,44,255,22,21,17,227,28,27,21, +170,29,28,22,170,13,13,12,42,0,36,8,8,8,11,25,24,20,142,39, +35,28,170,30,28,23,170,29,27,22,170,29,27,22,170,29,27,22,170,29, +27,22,170,29,27,20,170,23,21,16,170,14,13,11,34,0,52,13,12,10, +159,142,86,31,255,208,116,35,255,201,119,38,255,32,26,17,255,5,5,4, +28,0,12,14,13,11,170,216,167,97,255,231,184,124,255,231,193,128,255,181, +146,92,255,52,44,33,255,90,71,45,255,201,155,88,255,223,173,102,255,228, +179,115,255,230,183,123,255,230,184,119,255,39,32,22,255,0,24,12,12,11, +170,206,139,61,255,226,164,91,255,228,174,103,255,39,32,22,255,0,48,6, +6,5,28,9,9,8,142,56,46,31,255,222,180,113,255,230,187,119,255,222, +180,113,255,23,21,16,255,0,36,15,14,12,164,79,59,30,255,209,128,42, +255,211,127,44,255,171,117,46,255,18,15,11,170,0,16,9,9,8,116,33, +28,16,255,161,94,28,255,199,107,26,255,65,40,18,255,8,7,5,255,25, +20,12,255,198,113,29,255,210,120,33,255,217,133,50,255,27,23,16,255,0, +8,7,7,6,23,34,28,19,198,46,36,25,255,39,31,22,255,41,33,22, +255,59,46,28,255,51,40,26,255,61,47,28,255,180,133,71,255,227,175,100, +255,226,175,103,255,181,143,88,255,17,16,12,142,0,8,11,11,10,170,214, +166,97,255,229,179,114,255,228,185,111,255,161,121,68,255,23,21,16,227,23, +22,18,170,22,21,17,170,16,15,13,170,11,11,8,147,8,8,7,85,0, +40,14,13,11,170,181,143,88,255,228,185,123,255,218,168,97,255,70,54,35, +255,9,9,8,113,0,12,11,10,8,85,120,87,45,255,223,183,120,255,231, +190,132,255,167,135,80,255,24,22,19,227,19,18,16,170,19,18,16,198,95, +80,46,255,226,193,129,255,228,187,129,255,186,148,87,255,15,14,12,170,0, +8,10,10,9,85,155,113,64,255,229,196,132,255,232,191,133,255,179,142,90, +255,27,25,20,227,18,18,15,170,19,18,16,198,90,71,45,255,222,175,101, +255,227,174,98,255,228,185,111,255,28,25,19,255,0,8,7,7,6,23,34, +28,19,198,49,35,22,255,39,29,18,227,12,11,9,85,0,8,8,7,7, +28,33,26,16,198,52,39,23,255,47,35,22,227,13,12,8,85,0,8,8, +8,7,28,33,30,24,227,201,157,100,255,230,186,123,255,181,137,74,255,16, +15,11,207,6,6,5,23,0,24,11,10,8,28,27,21,12,193,26,19,11, +255,23,18,10,255,23,18,10,255,24,18,11,255,24,18,11,255,26,20,11, +255,35,27,16,255,42,31,19,241,17,14,10,85,0,28,9,9,8,144,91, +67,36,255,217,154,72,255,211,150,70,255,69,55,34,255,15,14,12,85,0, +28,6,6,5,11,11,11,10,142,24,22,19,255,167,135,80,255,225,172,104, +255,224,166,83,255,193,126,54,255,16,14,11,170,0,8,13,12,8,85,185, +97,26,255,207,112,28,255,204,110,27,255,71,46,22,255,8,8,7,255,28, +22,13,255,198,107,27,255,193,111,30,255,126,78,31,255,199,139,62,255,226, +184,111,255,27,24,18,255,0,8,11,10,8,170,214,166,97,255,230,187,119, +255,228,179,103,255,143,102,48,255,17,16,12,227,12,12,9,170,13,12,10, +198,46,33,17,255,199,112,28,255,206,111,27,255,204,110,27,255,32,23,13, +176,0,8,12,11,9,136,204,134,59,255,226,172,95,255,228,181,107,255,162, +125,73,255,24,22,19,227,19,18,16,170,19,18,16,198,95,80,46,255,224, +179,109,255,223,173,95,255,173,117,50,255,15,13,10,156,0,8,12,11,7, +99,185,97,26,255,208,112,27,255,204,110,27,255,22,18,11,255,0,40,16, +15,13,170,219,179,116,255,232,194,133,255,231,193,128,255,40,33,23,255,0, +12,16,15,13,170,219,177,112,255,230,187,119,255,224,159,83,255,24,21,15, +255,0,8,11,10,8,164,211,158,82,255,229,184,114,255,230,191,123,255,166, +127,77,255,22,21,17,227,22,21,17,170,20,19,13,170,14,13,11,28,0, +16,12,11,9,170,195,112,30,255,209,106,30,255,206,111,27,255,101,63,26, +255,16,14,11,227,23,21,16,170,29,27,22,170,13,13,12,42,0,16,16, +15,13,170,216,167,97,255,224,158,87,255,216,125,45,255,24,20,13,255,0, +40,17,16,12,170,219,177,112,255,232,195,137,255,231,189,128,255,162,125,73, +255,22,21,17,227,14,14,11,170,13,12,10,198,50,35,19,255,199,112,28, +255,206,111,27,255,204,110,27,255,32,24,13,170,0,8,13,12,8,93,194, +109,33,255,219,139,54,255,224,158,81,255,39,32,22,255,0,40,11,10,8, +170,190,104,27,255,208,112,27,255,204,110,27,255,32,24,13,170,0,8,13, +12,8,85,184,96,25,255,207,112,28,255,204,102,27,255,129,78,28,255,31, +26,16,255,127,84,34,255,219,147,70,255,173,122,62,255,15,14,12,212,6, +6,5,25,0,16,16,15,13,170,213,155,80,255,221,144,68,255,217,130,52, +255,31,25,16,255,0,32,10,9,7,170,189,99,26,255,208,112,27,255,204, +110,27,255,155,87,26,255,72,46,21,255,179,103,36,255,223,156,76,255,216, +170,97,255,134,96,47,255,174,127,71,255,221,167,90,255,223,147,72,255,222, +158,75,255,23,19,14,252,0,8,11,10,8,170,214,166,97,255,231,187,124, +255,230,191,123,255,228,182,117,255,222,175,101,255,64,50,33,255,7,7,6, +229,26,23,19,255,220,175,105,255,228,183,113,255,228,188,117,255,25,21,16, +255,0,8,11,10,8,170,217,176,112,255,232,197,137,255,232,199,135,255,37, +31,22,255,0,12,13,12,10,170,198,117,37,255,215,127,42,255,217,130,52, +255,21,19,14,255,0,8,11,10,8,167,215,172,104,255,232,191,133,255,231, +190,132,255,166,127,77,255,23,21,16,227,18,17,15,170,17,16,12,198,74, +52,27,255,204,117,33,255,211,111,30,255,173,93,28,255,15,12,8,164,0, +8,13,12,8,88,185,97,26,255,208,112,27,255,204,110,27,255,19,16,10, +255,0,12,10,9,7,170,190,104,27,255,212,118,35,255,216,136,51,255,21, +19,14,252,0,8,11,10,8,167,215,172,104,255,232,194,127,255,231,193,128, +255,166,129,77,255,23,21,16,227,19,18,16,170,19,18,14,198,81,59,34, +255,213,144,62,255,215,140,60,255,165,108,40,255,13,12,10,167,0,8,8, +8,7,85,101,63,26,255,206,114,33,255,212,121,33,255,155,92,36,255,23, +21,16,227,22,21,17,170,28,26,21,170,21,20,18,170,13,13,12,164,10, +10,9,85,6,6,6,6,0,28,12,11,9,170,194,112,31,255,212,119,37, +255,216,134,45,255,35,28,18,255,0,24,16,15,13,170,217,171,106,255,231, +187,124,255,228,181,107,255,39,32,22,255,0,12,16,15,11,170,208,134,55, +255,223,156,70,255,221,148,70,255,23,20,14,238,0,8,11,10,8,170,204, +136,55,255,223,156,70,255,222,158,75,255,34,28,19,255,0,12,14,13,11, +170,217,171,106,255,232,189,127,255,230,186,123,255,25,22,16,255,0,8,10, +10,9,167,210,155,77,255,226,172,95,255,224,165,81,255,31,26,18,255,0, +20,15,13,12,170,217,173,104,255,232,191,133,255,231,195,132,255,40,33,23, +255,0,20,10,9,9,133,73,58,36,255,225,184,120,255,231,193,128,255,228, +180,111,255,147,102,48,255,15,13,10,227,8,7,7,28,0,24,12,11,7, +198,100,59,23,255,169,93,26,255,156,91,27,255,174,96,27,255,180,99,27, +255,168,97,27,255,105,62,24,255,18,15,9,255,7,6,6,48,0,24,7, +7,7,28,15,15,12,227,144,114,67,255,219,177,112,255,223,176,102,255,153, +113,62,255,17,16,12,227,7,7,6,28,0,16,16,15,13,170,213,155,80, +255,223,146,70,255,217,129,50,255,27,22,14,255,0,24,12,10,9,195,161, +94,28,255,207,114,32,255,193,114,36,255,23,20,16,255,0,32,12,11,9, +170,191,105,28,255,207,100,28,255,204,110,27,255,26,20,11,204,0,8,6, +5,5,3,26,19,9,198,24,18,9,246,15,12,8,142,0,12,15,13,10, +91,31,24,16,244,51,39,24,255,21,19,14,91,0,68,10,10,9,76,61, +49,30,255,20,18,13,156,0,16,17,15,12,142,27,22,14,232,30,22,13, +255,25,20,12,255,22,18,11,238,21,16,10,255,99,58,22,255,203,113,26, +255,205,111,28,255,131,80,30,255,12,11,9,142,0,8,11,10,8,170,212, +160,85,255,232,191,127,255,231,195,132,255,196,155,91,255,81,59,34,255,41, +32,20,255,54,43,27,255,180,133,71,255,216,144,59,255,208,115,33,255,129, +78,28,255,12,11,7,142,0,8,8,7,7,57,72,52,29,255,215,155,78, +255,227,174,98,255,207,158,94,255,85,63,34,255,36,29,19,255,57,43,26, +255,189,130,66,255,219,149,66,255,212,121,41,255,172,105,33,255,17,15,10, +147,0,8,7,6,6,54,58,40,21,255,198,113,29,255,206,103,27,255,165, +87,24,255,42,28,13,255,21,16,8,255,27,20,10,255,95,60,22,255,202, +105,27,255,206,100,29,255,204,110,27,255,35,24,12,170,0,8,7,7,6, +54,70,50,27,255,212,145,65,255,227,174,98,255,201,155,88,255,59,44,28, +255,23,20,14,255,34,28,19,255,157,104,48,255,211,126,42,255,208,115,33, +255,132,82,29,255,13,11,8,142,0,12,24,18,9,221,108,61,23,255,201, +112,26,255,207,112,28,255,204,110,27,255,158,91,25,255,46,29,13,249,11, +10,6,57,0,8,8,8,7,57,70,50,27,255,212,142,59,255,226,172,95, +255,207,158,94,255,85,63,34,255,41,32,20,255,57,43,26,255,174,124,59, +255,224,170,93,255,229,184,114,255,231,196,128,255,28,25,19,255,0,8,10, +10,9,167,215,169,102,255,232,191,127,255,231,193,128,255,196,154,87,255,77, +59,34,255,41,31,20,255,54,43,27,255,168,113,49,255,212,121,41,255,206, +114,33,255,132,82,29,255,12,11,9,130,0,8,12,11,7,110,188,98,25, +255,206,111,27,255,206,106,25,255,26,19,11,255,0,24,14,12,9,170,199, +117,36,255,221,148,62,255,227,174,98,255,28,26,19,255,0,8,10,10,9, +167,212,161,89,255,224,166,83,255,217,129,50,255,32,24,15,255,5,5,4, +31,7,7,6,136,65,44,22,255,192,106,29,255,203,108,24,255,114,66,23, +255,17,13,8,221,0,12,10,9,7,139,185,97,26,255,208,112,27,255,208, +117,29,255,32,24,13,170,0,8,15,13,8,91,189,99,26,255,215,123,42, +255,226,172,95,255,198,152,87,255,81,58,34,255,176,133,71,255,224,168,95, +255,197,138,62,255,65,47,26,255,133,81,30,255,208,121,37,255,212,115,37, +255,152,98,35,255,12,11,9,142,0,8,10,9,7,147,190,107,25,255,206, +111,27,255,206,106,25,255,158,91,25,255,42,28,13,255,21,15,8,255,26, +19,9,255,114,66,23,255,204,113,25,255,208,115,33,255,173,122,62,255,16, +15,13,150,0,8,8,8,7,71,110,87,51,255,222,180,113,255,224,166,83, +255,209,137,60,255,133,84,32,255,77,50,24,255,89,59,26,255,181,109,32, +255,210,121,35,255,212,121,41,255,171,116,52,255,15,14,12,142,0,8,14, +13,11,170,219,177,112,255,231,187,124,255,228,180,111,255,205,158,90,255,79, +58,32,255,38,29,19,255,49,35,22,255,167,114,46,255,217,146,62,255,219, +154,70,255,169,117,56,255,15,13,12,156,0,8,8,8,7,71,104,80,45, +255,224,183,119,255,232,191,127,255,210,166,97,255,81,60,32,255,39,30,18, +255,52,40,25,255,175,128,66,255,225,173,98,255,228,180,105,255,226,175,95, +255,29,25,18,255,0,8,12,12,11,170,208,138,55,255,222,145,63,255,220, +139,59,255,193,121,50,255,68,50,29,255,38,28,19,255,48,35,23,255,175, +112,44,255,217,142,54,255,217,144,66,255,191,137,66,255,19,16,12,170,0, +8,9,8,8,74,111,82,40,255,216,155,75,255,226,172,95,255,200,151,81, +255,57,41,26,255,27,23,16,255,35,28,18,255,41,32,20,255,39,30,20, +255,25,22,16,227,15,14,10,142,0,12,10,9,7,28,33,24,14,227,135, +81,28,255,206,117,31,255,210,108,33,255,208,110,31,255,171,92,28,255,49, +33,16,252,13,11,8,68,0,8,11,10,8,170,195,108,30,255,212,118,35, +255,217,137,52,255,42,33,23,255,0,12,20,18,15,170,214,156,81,255,221, +148,62,255,214,127,43,255,23,19,12,238,0,8,10,10,7,159,196,109,31, +255,213,119,36,255,212,123,37,255,31,24,14,255,0,12,15,14,10,170,209, +137,60,255,228,172,99,255,230,189,119,255,28,26,19,255,0,8,12,12,11, +170,208,134,55,255,218,137,51,255,214,127,43,255,35,27,16,255,0,20,16, +14,11,170,199,116,34,255,217,132,48,255,224,166,83,255,32,26,19,255,0, +8,10,10,7,34,81,58,34,255,224,178,105,255,226,172,95,255,129,92,40, +255,9,9,8,170,6,6,6,85,6,6,5,113,35,27,16,255,204,117,33, +255,208,117,29,255,110,69,25,255,14,12,7,108,0,8,10,10,7,170,195, +112,30,255,211,115,30,255,211,115,30,255,30,23,13,255,0,12,14,12,9, +170,196,113,31,255,211,120,32,255,214,126,41,255,33,26,18,255,0,8,9, +8,6,28,44,33,19,212,60,42,23,255,46,35,21,255,74,53,31,255,156, +109,53,255,216,167,97,255,228,179,109,255,229,177,110,255,227,184,108,255,168, +123,69,255,23,21,16,227,9,8,8,28,0,12,17,16,14,170,134,98,51, +255,223,166,92,255,132,100,53,255,9,9,8,133,0,20,16,15,13,170,219, +177,112,255,232,191,133,255,231,195,132,255,40,33,23,255,0,20,6,6,5, +45,39,32,22,255,210,129,49,255,172,106,35,255,20,17,13,227,11,11,8, +28,0,100,17,17,14,170,221,189,132,255,235,205,154,255,234,205,155,255,42, +39,29,255,0,16,9,9,8,25,0,20,9,8,8,25,0,20,14,14,11, +170,208,141,61,255,224,168,87,255,228,174,103,255,31,26,20,221,0,4,13, +12,12,130,218,185,127,255,234,202,147,255,232,198,139,255,40,33,25,255,0, +20,17,17,14,176,140,115,71,255,230,202,147,255,232,202,149,255,218,170,101, +255,200,124,43,255,198,117,37,255,198,117,37,255,196,116,37,255,72,52,27, +255,12,11,9,170,0,28,8,8,7,85,37,31,20,255,174,110,41,255,210, +123,39,255,204,120,37,255,130,87,31,255,15,13,10,190,0,28,5,5,4, +113,28,26,19,255,210,143,65,255,220,163,81,255,217,166,92,255,222,173,97, +255,225,176,98,255,42,37,25,255,4,4,4,74,0,56,13,12,10,170,208, +141,61,255,226,172,95,255,228,183,111,255,40,34,25,255,0,24,17,16,14, +170,219,177,112,255,232,194,133,255,233,202,148,255,27,24,20,255,0,8,16, +15,13,85,199,161,102,255,220,166,89,255,211,143,62,255,217,154,72,255,223, +161,80,255,224,169,91,255,225,185,114,255,229,188,124,255,231,190,132,255,231, +200,143,255,227,195,140,255,227,196,138,255,225,195,136,255,44,37,27,170,0, +8,17,16,14,85,200,165,109,255,227,198,142,255,225,191,132,255,227,195,134, +255,231,199,136,255,231,197,132,255,231,194,124,255,229,191,130,255,225,195,136, +255,225,195,136,255,225,191,132,255,49,42,30,198,0,36,18,17,13,105,193, +135,66,255,221,175,102,255,222,186,123,255,223,190,132,255,224,192,135,255,223, +190,132,255,222,186,123,255,221,178,110,255,218,172,105,255,46,39,27,195,0, +48,6,6,6,28,27,26,20,255,216,170,97,255,225,178,104,255,176,136,83, +255,16,15,13,198,0,16,17,17,14,170,221,188,130,255,235,205,154,255,234, +205,155,255,232,204,149,255,228,199,143,255,171,144,96,255,64,57,41,255,154, +126,81,255,227,189,122,255,230,184,119,255,227,171,98,255,34,30,21,255,0, +24,17,16,14,170,221,186,126,255,234,202,147,255,232,192,135,255,44,39,27, +255,0,44,9,9,8,142,25,24,20,255,114,95,53,255,207,169,102,255,227, +187,118,255,226,188,123,255,178,148,95,255,19,18,16,170,0,32,24,22,19, +85,197,145,84,255,227,187,118,255,231,194,124,255,207,173,114,255,61,55,38, +255,8,8,8,136,0,12,10,10,9,108,45,36,21,255,195,116,38,255,207, +122,38,255,139,90,32,255,13,12,8,170,0,4,10,10,9,198,208,140,59, +255,226,170,91,255,231,193,128,255,40,35,27,255,0,36,4,4,3,28,18, +17,13,227,222,189,131,255,234,201,143,255,229,191,130,255,34,30,23,204,0, +8,11,11,10,170,211,158,82,255,226,170,91,255,224,165,81,255,219,154,70, +255,208,132,51,255,206,128,45,255,204,122,41,255,201,120,40,255,196,116,37, +255,111,74,30,255,20,18,13,227,8,8,7,28,0,28,6,6,6,28,28, +26,21,255,222,186,123,255,229,196,132,255,181,144,92,255,16,15,13,212,0, +16,6,6,6,85,25,24,20,255,180,149,101,255,231,205,154,255,232,204,149, +255,227,198,142,255,223,192,138,255,223,193,136,255,230,199,139,255,232,197,141, +255,211,176,122,255,64,57,41,255,8,8,7,113,0,8,6,6,5,14,33, +31,24,227,186,155,107,255,232,204,149,255,233,205,152,255,227,197,140,255,221, +189,132,255,224,192,135,255,228,198,141,255,232,201,141,255,232,192,135,255,231, +197,132,255,41,35,26,255,0,64,17,16,14,139,211,178,120,255,233,202,148, +255,233,202,148,255,56,48,33,255,4,4,4,85,0,104,11,11,10,255,216, +164,89,255,230,191,123,255,227,195,134,255,40,35,27,227,0,28,16,15,13, +227,126,105,69,255,217,176,112,255,225,175,104,255,223,159,76,255,189,124,49, +255,43,35,20,255,9,8,8,57,0,8,10,10,9,133,194,109,33,255,215, +125,38,255,212,124,39,255,144,93,33,255,29,24,16,255,68,53,29,255,186, +123,49,255,128,95,47,255,25,24,20,255,143,119,78,255,230,201,145,255,33, +30,24,255,0,8,11,11,10,170,217,176,112,255,228,182,109,255,222,158,75, +255,212,134,51,255,204,122,41,255,198,117,37,255,200,118,37,255,208,123,39, +255,212,123,37,255,214,121,39,255,217,133,50,255,24,21,15,244,0,8,11, +11,10,170,218,185,127,255,235,203,148,255,233,202,148,255,230,201,145,255,227, +197,140,255,221,187,128,255,221,184,120,255,224,178,105,255,224,164,85,255,189, +129,58,255,39,32,20,255,7,7,6,85,0,8,11,10,8,125,194,109,33, +255,215,125,38,255,213,125,40,255,29,24,16,255,0,40,17,17,14,170,221, +188,130,255,235,201,152,255,232,201,141,255,42,36,27,255,0,12,17,17,14, +170,219,179,116,255,231,187,124,255,228,183,111,255,24,22,17,255,0,8,11, +11,10,170,218,185,127,255,232,197,137,255,227,179,104,255,219,155,72,255,208, +132,51,255,204,122,41,255,202,120,39,255,38,31,19,170,0,16,12,11,9, +170,196,110,33,255,215,113,38,255,213,122,42,255,215,143,58,255,217,166,92, +255,222,186,123,255,225,195,136,255,52,44,33,198,0,16,17,16,14,170,211, +150,70,255,219,140,56,255,213,126,42,255,25,21,14,255,0,40,17,17,14, +170,221,187,128,255,232,199,141,255,228,180,111,255,219,155,72,255,207,128,44, +255,199,119,39,255,200,118,37,255,208,123,39,255,212,123,37,255,214,125,39, +255,212,124,39,255,34,26,15,181,0,8,11,10,10,161,215,172,104,255,234, +201,143,255,234,206,151,255,42,39,29,255,0,40,12,11,9,170,196,110,33, +255,215,125,38,255,212,124,39,255,36,28,17,170,0,8,15,14,10,85,194, +109,33,255,215,125,38,255,212,124,39,255,210,128,41,255,211,135,54,255,225, +176,98,255,231,197,132,255,56,48,33,255,4,4,4,85,0,20,17,16,14, +170,206,135,51,255,217,133,50,255,213,122,42,255,25,21,14,255,0,32,12, +11,9,170,196,110,33,255,215,125,38,255,213,122,42,255,67,51,28,255,6, +6,5,255,40,34,25,255,226,190,127,255,138,110,69,255,7,7,7,255,25, +24,20,255,221,179,112,255,232,191,127,255,232,201,141,255,26,23,19,255,0, +8,11,11,10,170,214,168,101,255,230,187,119,255,228,188,117,255,212,173,105, +255,150,118,67,255,102,86,47,255,111,90,50,255,185,145,88,255,227,187,118, +255,231,195,132,255,232,201,141,255,26,23,19,255,0,8,11,11,10,170,219, +184,128,255,235,205,154,255,234,206,151,255,42,36,27,255,0,12,15,15,12, +170,213,158,80,255,228,182,109,255,230,191,123,255,27,23,18,255,0,8,11, +11,10,170,219,189,132,255,235,205,154,255,232,197,141,255,225,185,114,255,215, +155,78,255,206,135,51,255,205,126,42,255,209,128,42,255,212,121,41,255,181, +111,36,255,39,30,18,255,8,8,7,57,0,8,10,10,9,136,194,109,33, +255,215,125,38,255,212,124,39,255,24,20,13,255,0,12,15,14,12,170,210, +146,71,255,229,183,110,255,231,197,132,255,26,23,19,255,0,8,11,11,10, +170,218,189,127,255,234,199,143,255,231,197,132,255,225,176,106,255,214,153,75, +255,208,138,55,255,205,133,48,255,210,127,45,255,214,134,49,255,179,119,42, +255,37,30,18,255,7,7,6,85,0,12,23,20,14,227,161,115,50,255,222, +167,89,255,227,186,114,255,225,190,130,255,223,198,136,255,227,198,142,255,224, +196,141,255,221,191,134,255,161,130,86,255,33,30,24,229,10,10,9,42,0, +24,15,15,12,170,211,149,76,255,228,182,109,255,231,189,128,255,44,39,27, +255,0,24,17,17,14,170,216,170,97,255,226,172,95,255,224,165,81,255,31, +26,18,255,0,12,13,12,10,170,201,120,40,255,217,133,50,255,216,125,45, +255,25,21,14,212,0,8,11,10,8,144,203,130,52,255,224,166,83,255,228, +174,103,255,40,34,25,255,0,12,17,16,14,170,221,187,128,255,234,201,143, +255,230,191,123,255,28,25,19,244,0,8,10,10,9,164,203,122,50,255,220, +148,63,255,217,141,52,255,23,20,14,255,0,8,14,13,11,108,10,10,9, +28,0,4,13,13,12,170,221,189,134,255,235,205,154,255,234,206,151,255,42, +37,27,255,0,24,11,11,10,255,222,189,131,255,232,195,131,255,224,162,81, +255,36,29,19,255,4,4,4,54,0,28,7,7,6,28,19,17,12,232,93, +66,30,255,183,112,36,255,209,122,38,255,212,120,39,255,159,102,34,255,22, +19,13,255,7,7,6,85,0,24,6,6,5,28,17,16,14,227,149,122,84, +255,227,195,140,255,227,191,134,255,179,142,90,255,17,16,14,227,5,5,4, +25,0,20,15,14,12,170,204,129,49,255,218,141,51,255,213,126,42,255,25, +21,14,255,0,24,8,7,7,91,68,48,25,255,205,127,44,255,220,153,75, +255,99,78,44,255,8,8,7,113,0,28,12,11,9,170,196,110,33,255,215, +125,38,255,212,124,39,255,24,20,13,255,0,124,9,9,8,25,0,40,2, +2,1,23,9,8,6,255,199,116,34,255,215,125,38,255,212,128,45,255,27, +24,16,207,0,8,11,11,10,170,219,184,128,255,235,205,154,255,234,205,155, +255,58,49,35,255,5,5,4,85,0,4,4,4,3,28,16,15,11,227,204, +122,41,255,215,126,40,255,210,123,39,255,32,25,15,170,0,8,13,13,12, +122,208,168,99,255,234,199,143,255,234,204,151,255,63,54,38,255,5,5,4, +85,0,4,4,4,3,28,18,17,13,215,204,127,45,255,214,125,39,255,212, +121,41,255,34,27,15,170,0,8,13,12,10,85,185,112,34,255,215,125,38, +255,212,123,37,255,35,28,16,255,4,4,3,85,0,4,3,3,2,28,12, +10,9,224,198,117,37,255,215,125,38,255,212,124,39,255,34,27,15,178,0, +8,14,13,11,113,206,162,94,255,232,199,141,255,234,207,155,255,63,53,36, +255,4,4,3,113,0,4,3,3,3,28,10,10,9,255,200,118,37,255,215, +125,38,255,210,123,39,255,27,22,14,227,0,12,3,3,2,6,13,11,8, +221,199,116,34,255,215,125,38,255,212,124,39,255,35,27,16,255,5,4,4, +57,0,12,15,14,12,147,206,154,87,255,232,195,137,255,234,204,151,255,63, +54,38,255,5,5,4,85,0,4,4,4,3,28,18,16,13,227,222,189,131, +255,235,205,152,255,234,205,155,255,27,24,20,255,0,8,11,11,10,170,219, +184,130,255,235,205,152,255,234,205,155,255,58,49,35,255,5,5,4,85,0, +4,4,4,3,28,14,12,9,227,199,117,36,255,215,113,38,255,210,123,39, +255,32,25,15,170,0,8,12,12,9,102,194,109,33,255,215,125,38,255,212, +124,39,255,27,22,14,255,0,24,18,16,13,170,217,176,110,255,234,196,143, +255,234,204,151,255,27,24,20,255,0,8,11,10,10,170,204,134,59,255,219, +136,54,255,213,122,42,255,72,50,27,255,8,8,7,255,25,22,14,255,195, +116,38,255,208,123,39,255,142,91,31,255,16,14,9,193,4,4,3,17,0, +12,11,11,8,170,198,117,37,255,219,133,56,255,221,152,70,255,27,23,16, +221,0,8,13,12,10,99,193,113,34,255,223,156,70,255,231,193,128,255,40, +34,25,255,4,3,3,113,17,16,12,227,208,136,59,255,45,36,21,255,4, +3,3,113,10,9,7,207,196,110,33,255,215,125,38,255,210,128,41,255,32, +25,15,170,0,8,12,11,9,108,194,109,33,255,215,125,38,255,212,124,39, +255,35,27,16,255,4,4,3,85,0,4,3,3,2,28,12,11,9,227,199, +117,36,255,221,150,66,255,229,191,126,255,32,29,23,210,0,8,13,13,12, +122,204,150,79,255,223,159,76,255,217,141,52,255,84,57,29,255,9,8,6, +170,5,5,4,85,6,6,5,113,27,22,14,255,207,128,44,255,223,147,72, +255,227,187,118,255,34,30,23,207,0,8,12,11,11,170,218,180,119,255,229, +184,114,255,224,167,85,255,50,40,25,255,5,5,4,85,0,4,4,4,3, +28,14,12,9,227,203,125,42,255,217,128,48,255,213,128,45,255,35,27,16, +173,0,8,12,12,11,130,209,163,98,255,235,203,148,255,233,202,148,255,63, +54,36,255,5,5,4,85,0,4,4,4,3,28,15,15,12,227,209,137,60, +255,221,151,68,255,219,147,62,255,23,20,14,238,0,8,10,10,9,150,196, +121,41,255,217,128,48,255,215,133,44,255,40,31,19,255,5,5,5,85,0, +4,4,4,3,28,16,14,11,207,201,120,40,255,217,133,50,255,221,161,76, +255,57,44,28,170,0,8,15,14,12,105,211,165,98,255,232,197,137,255,232, +199,141,255,58,49,35,255,4,4,3,113,0,40,3,3,2,17,12,11,9, +227,199,116,34,255,215,125,38,255,212,124,39,255,35,27,16,255,4,4,3, +62,0,12,12,11,9,170,200,120,41,255,223,159,76,255,230,191,123,255,44, +37,27,255,0,12,18,17,15,170,208,140,59,255,217,133,50,255,213,125,40, +255,27,23,14,195,0,8,12,11,9,108,194,109,33,255,215,125,38,255,212, +124,39,255,25,21,14,255,0,12,17,16,14,170,219,179,116,255,235,201,152, +255,234,204,151,255,27,24,20,255,0,8,10,10,9,170,198,122,41,255,215, +127,42,255,213,125,40,255,27,22,14,255,0,20,12,11,9,170,201,120,40, +255,224,156,83,255,231,190,132,255,40,33,25,255,0,12,10,10,9,85,52, +42,29,255,200,142,59,255,183,119,44,255,72,52,27,255,39,30,18,255,49, +37,22,255,150,99,33,255,196,116,37,255,77,50,24,255,10,9,7,144,0, +12,10,10,9,170,196,115,35,255,215,125,38,255,212,124,39,255,25,21,14, +255,0,12,12,11,9,170,196,110,33,255,214,127,43,255,222,158,75,255,41, +34,24,255,0,24,5,5,4,85,11,11,10,255,130,101,59,255,223,176,102, +255,224,176,101,255,177,137,74,255,18,17,13,227,6,5,5,28,0,12,20, +19,15,85,186,120,49,255,217,142,62,255,217,139,56,255,34,29,19,255,4, +4,3,17,0,20,17,17,14,170,221,188,130,255,235,205,152,255,234,205,155, +255,42,39,29,255,0,24,13,13,10,181,199,119,39,255,212,121,41,255,203, +121,40,255,35,29,17,170,0,100,20,18,15,170,222,186,123,255,234,201,143, +255,232,197,135,255,47,40,28,255,0,64,14,13,11,170,213,160,84,255,230, +187,119,255,231,197,132,255,35,30,22,198,0,4,14,13,11,108,217,176,112, +255,232,193,137,255,231,197,132,255,33,28,22,255,0,24,12,12,11,113,31, +29,22,210,40,35,27,255,41,34,24,255,29,24,16,255,32,26,17,255,146, +92,35,255,214,134,49,255,212,128,45,255,123,81,36,255,15,13,10,142,0, +20,7,7,6,85,28,26,19,252,194,140,71,255,212,127,43,255,202,118,35, +255,97,66,30,255,15,14,10,207,6,6,5,25,0,24,6,6,5,8,15, +13,12,227,111,86,50,255,209,168,102,255,176,136,83,255,85,67,44,255,163, +129,80,255,221,186,126,255,83,69,44,255,7,7,6,170,5,5,5,8,0, +4,9,9,8,108,20,18,13,170,13,12,10,51,0,36,16,15,13,170,217, +176,110,255,232,194,133,255,232,198,139,255,36,33,25,255,0,24,15,15,12, +170,219,179,116,255,232,193,137,255,232,199,135,255,31,26,20,255,0,8,11, +11,10,28,56,48,33,227,98,76,45,255,104,80,45,255,195,154,96,255,227, +186,114,255,226,189,125,255,207,173,114,255,222,188,123,255,231,190,132,255,217, +188,124,255,137,109,70,255,99,86,54,255,78,64,43,255,21,20,16,85,0, +8,12,12,11,28,54,48,35,227,86,72,47,255,74,63,43,255,171,137,84, +255,229,191,130,255,230,191,123,255,230,186,123,255,202,164,105,255,97,80,50, +255,75,64,44,255,72,61,39,255,22,21,17,102,0,36,12,11,11,45,55, +45,30,227,90,71,45,255,78,63,41,255,72,61,39,255,74,63,43,255,72, +61,39,255,72,61,39,255,91,74,46,255,78,63,41,255,22,20,17,102,0, +48,12,12,11,176,132,106,61,255,228,188,125,255,210,172,113,255,42,37,29, +255,9,9,8,62,0,16,17,16,14,170,221,186,124,255,234,199,143,255,232, +201,141,255,232,201,141,255,221,189,134,255,52,46,33,255,6,7,6,227,24, +23,17,255,208,132,51,255,215,133,44,255,212,124,39,255,24,20,13,255,0, +24,17,16,12,170,219,177,112,255,231,187,124,255,228,182,109,255,40,33,23, +255,0,36,9,9,8,74,17,15,12,227,67,51,28,255,162,107,43,255,200, +142,67,255,204,157,91,255,177,140,86,255,74,63,43,255,19,17,16,198,9, +9,8,28,0,32,14,14,11,31,56,46,31,227,192,157,103,255,229,194,128, +255,225,188,124,255,146,112,67,255,11,10,8,164,0,8,7,7,6,28,34, +27,17,255,190,107,33,255,210,121,35,255,146,95,35,255,16,14,11,187,0, +8,9,9,8,170,214,164,93,255,232,194,127,255,231,195,132,255,40,34,25, +255,0,40,13,13,10,170,213,157,84,255,224,166,83,255,221,150,66,255,23, +20,14,246,0,8,12,11,9,113,194,109,33,255,212,119,37,255,210,113,35, +255,168,103,33,255,56,42,23,255,27,23,14,255,38,31,19,255,149,92,30, +255,207,118,32,255,207,113,30,255,124,75,27,255,13,11,8,161,0,28,12, +12,11,176,130,99,59,255,229,191,126,255,211,174,116,255,43,37,28,255,9, +9,8,59,0,16,8,8,7,85,68,58,37,255,214,177,119,255,231,196,136, +255,207,171,114,255,97,80,50,255,54,47,35,255,66,59,41,255,178,148,95, +255,228,189,121,255,224,187,123,255,146,112,67,255,12,12,11,170,0,12,10, +10,9,28,16,15,13,147,29,28,22,221,48,42,31,255,70,61,41,255,66, +57,39,255,70,61,41,255,171,140,92,255,224,170,101,255,224,168,87,255,224, +165,81,255,39,32,22,255,0,64,14,13,11,57,100,82,51,255,222,186,123, +255,226,172,95,255,113,82,38,255,9,8,8,127,0,32,11,9,6,102,11, +10,6,170,11,10,8,170,12,11,9,170,15,13,10,170,15,13,10,170,15, +14,10,170,18,15,11,170,18,15,11,156,12,11,9,28,0,28,6,6,5, +65,40,34,25,255,224,183,119,255,229,195,136,255,171,140,92,255,21,20,18, +142,0,24,11,10,8,102,131,92,46,255,213,145,56,255,214,119,43,255,210, +128,41,255,151,94,32,255,23,21,14,255,10,10,9,85,0,12,10,9,7, +170,191,106,30,255,211,115,30,255,208,114,31,255,141,87,30,255,36,31,19, +255,121,90,42,255,217,168,92,255,205,163,102,255,132,102,59,255,213,172,108, +255,231,193,128,255,35,30,22,255,0,8,11,11,10,164,203,129,50,255,215, +127,42,255,211,117,34,255,166,97,29,255,54,40,21,255,29,23,14,255,38, +31,19,255,120,78,29,255,206,118,33,255,214,127,43,255,224,155,81,255,23, +21,16,255,0,8,11,10,10,170,217,183,116,255,234,201,143,255,232,198,139, +255,202,166,109,255,97,78,50,255,52,46,33,255,58,50,33,255,150,96,39, +255,208,121,37,255,195,112,30,255,83,53,24,255,9,8,6,113,0,8,13, +12,8,96,189,104,28,255,210,120,33,255,214,132,45,255,34,29,19,255,0, +40,17,16,12,170,217,172,102,255,228,180,105,255,228,181,107,255,40,33,23, +255,0,12,17,15,12,170,216,171,101,255,232,191,127,255,231,197,132,255,24, +22,17,255,0,8,11,11,10,167,209,146,72,255,221,151,68,255,213,126,42, +255,172,106,35,255,57,41,22,255,42,32,19,255,43,33,20,252,18,15,11, +85,0,16,11,10,8,170,193,111,30,255,215,113,38,255,220,144,63,255,197, +145,84,255,91,71,44,255,75,62,42,255,75,64,44,255,22,21,17,99,0, +16,14,13,11,170,196,110,33,255,210,115,31,255,210,115,31,255,22,19,11, +227,0,8,16,13,9,113,24,21,15,170,17,15,12,170,18,15,13,170,19, +17,12,142,9,8,8,28,0,8,14,13,11,170,210,146,71,255,220,142,59, +255,213,125,40,255,168,103,33,255,54,40,21,255,29,23,14,255,38,31,19, +255,119,78,30,255,204,116,31,255,210,119,31,255,210,115,31,255,26,20,13, +210,0,8,11,11,10,170,217,179,120,255,234,202,147,255,232,201,141,255,40, +35,25,255,0,40,11,10,8,170,193,111,30,255,211,115,30,255,210,115,31, +255,36,25,13,170,0,8,14,12,9,85,190,105,29,255,210,107,31,255,208, +114,31,255,187,124,42,255,143,111,56,255,210,171,109,255,229,187,128,255,131, +99,54,255,8,8,7,156,0,20,13,12,10,170,194,112,31,255,210,107,31, +255,210,115,31,255,22,19,11,255,0,32,11,10,8,170,193,111,30,255,215, +125,38,255,218,141,59,255,39,33,22,255,5,5,5,28,12,12,11,170,156, +126,83,255,27,24,20,227,5,5,5,23,14,13,11,198,219,177,112,255,232, +191,127,255,230,191,123,255,25,22,16,249,0,8,11,10,8,153,200,120,41, +255,214,127,43,255,213,126,42,255,93,66,32,255,11,11,10,255,34,31,23, +255,206,152,81,255,226,179,111,255,231,189,128,255,232,192,135,255,232,201,141, +255,25,22,18,255,0,8,11,10,10,170,215,171,102,255,228,174,105,255,222, +158,75,255,27,24,16,255,0,12,15,15,12,170,219,177,112,255,232,193,137, +255,232,201,141,255,25,22,18,255,0,8,11,10,10,170,215,172,104,255,228, +182,109,255,221,155,70,255,177,114,46,255,55,42,24,255,35,28,18,255,41, +31,18,255,35,28,17,255,27,22,14,255,17,16,12,187,9,9,8,79,0, +12,10,9,7,170,191,106,30,255,211,115,30,255,210,115,31,255,33,25,14, +255,0,12,21,20,16,170,221,180,116,255,232,193,137,255,232,201,141,255,25, +22,18,255,0,8,11,11,10,170,212,160,85,255,224,156,83,255,218,141,59, +255,175,115,44,255,55,42,24,255,31,25,16,255,38,30,19,255,127,82,30, +255,204,116,31,255,195,112,30,255,82,55,25,255,11,10,8,150,0,12,9, +9,8,28,15,14,12,142,28,25,19,221,46,40,29,255,71,60,38,255,66, +57,39,255,70,61,41,255,193,159,106,255,227,184,108,255,221,153,72,255,155, +98,36,255,13,12,10,170,0,24,17,15,12,170,219,180,112,255,232,197,137, +255,232,201,141,255,40,35,25,255,0,24,14,13,11,170,198,117,37,255,213, +124,38,255,210,121,35,255,23,19,12,255,0,12,11,10,8,170,193,111,30, +255,211,115,30,255,208,114,31,255,23,19,12,207,0,8,14,13,11,85,181, +132,68,255,228,185,117,255,231,193,128,255,54,46,31,255,5,5,4,8,0, +8,21,20,16,178,215,160,88,255,223,147,72,255,206,135,51,255,23,20,14, +170,0,8,12,11,9,102,192,111,31,255,210,108,33,255,208,114,31,255,22, +18,11,255,0,4,10,10,9,113,79,61,38,255,17,16,12,198,0,4,16, +15,13,170,219,179,116,255,231,187,124,255,224,169,91,255,33,28,20,255,0, +20,9,8,8,85,39,33,24,255,217,166,92,255,219,140,56,255,210,121,35, +255,66,44,21,255,7,7,6,133,0,32,6,6,5,74,19,18,12,255,183, +102,30,255,207,105,30,255,210,111,31,255,73,51,24,255,8,8,7,116,0, +24,6,6,6,28,15,13,12,227,144,112,61,255,221,180,116,255,224,178,113, +255,152,116,65,255,18,17,13,221,8,8,7,28,0,24,12,10,9,170,193, +111,30,255,210,107,31,255,210,115,31,255,22,19,11,255,0,28,16,15,13, +227,164,122,63,255,225,185,114,255,192,153,97,255,21,19,16,232,7,7,6, +28,0,24,11,10,8,170,193,111,30,255,211,115,30,255,210,115,31,255,23, +19,12,255,0,148,6,6,5,51,11,9,6,85,12,10,7,102,10,8,5, +156,10,8,5,127,8,7,5,184,27,22,12,255,198,105,29,255,211,122,36, +255,220,136,61,255,25,22,16,255,0,8,10,10,9,170,218,181,123,255,234, +202,147,255,232,197,141,255,30,27,21,255,0,12,9,8,6,170,191,106,30, +255,211,115,30,255,210,111,31,255,39,27,14,170,0,8,12,11,11,170,218, +180,119,255,234,196,143,255,232,201,141,255,29,26,20,255,0,12,7,7,6, +28,27,22,14,156,25,22,14,255,32,25,15,210,22,18,11,28,0,8,10, +9,7,150,195,112,30,255,211,115,30,255,210,115,31,255,19,15,10,252,0, +12,9,9,8,170,191,106,30,255,211,111,30,255,208,114,31,255,25,20,12, +204,0,8,12,11,11,170,218,180,119,255,234,202,147,255,232,201,141,255,142, +111,63,255,14,12,9,227,10,9,7,127,8,7,5,181,35,25,14,255,199, +112,28,255,209,118,30,255,209,117,28,255,30,22,13,255,0,16,9,8,6, +167,191,106,30,255,211,115,30,255,210,115,31,255,19,15,10,252,0,16,21, +19,16,170,220,178,113,255,232,197,137,255,232,201,141,255,26,23,19,255,0, +12,11,11,10,170,218,181,123,255,234,201,143,255,231,197,132,255,24,22,17, +255,0,8,11,10,10,170,218,181,123,255,234,201,143,255,231,197,132,255,30, +26,21,255,0,12,9,8,6,167,191,106,30,255,211,115,30,255,210,111,31, +255,39,27,14,170,0,8,13,12,8,85,190,105,29,255,213,119,36,255,214, +132,45,255,32,26,17,255,0,24,17,16,14,170,221,186,124,255,234,202,147, +255,232,199,135,255,25,22,18,252,0,8,11,10,8,127,192,111,31,255,210, +107,31,255,208,114,31,255,161,94,28,255,65,43,20,255,145,85,26,255,207, +117,30,255,122,75,29,255,15,14,10,170,5,5,4,8,0,16,11,10,8, +170,196,115,35,255,223,146,70,255,228,183,111,255,25,22,16,252,0,8,14, +12,9,85,190,105,29,255,215,125,38,255,218,141,59,255,30,24,17,195,0, +4,10,10,7,170,193,111,30,255,20,17,11,252,0,4,11,10,8,85,188, +103,27,255,211,115,30,255,209,106,30,255,39,27,14,170,0,8,13,12,8, +85,190,105,29,255,211,115,30,255,210,115,31,255,19,15,10,255,0,12,9, +8,6,167,192,111,31,255,218,137,51,255,227,175,100,255,27,24,18,255,0, +8,11,10,8,147,196,106,33,255,210,108,33,255,210,115,31,255,30,23,13, +255,4,4,3,14,0,8,15,14,12,195,211,149,76,255,229,184,114,255,232, +199,135,255,28,25,19,255,0,8,11,10,8,167,203,129,50,255,215,127,42, +255,210,121,35,255,20,17,11,232,0,12,9,8,6,139,190,105,29,255,211, +111,30,255,209,114,30,255,30,22,13,198,0,8,13,12,10,170,217,173,104, +255,232,193,137,255,232,194,139,255,25,22,18,255,0,12,9,8,8,156,192, +111,31,255,210,108,33,255,210,115,31,255,32,24,13,173,0,8,13,12,8, +88,190,105,29,255,211,115,30,255,208,114,31,255,19,15,10,255,0,12,7, +7,6,28,27,22,14,198,45,36,21,255,52,43,29,244,14,13,11,85,0, +8,13,13,12,88,177,143,90,255,230,194,131,255,226,172,95,255,137,91,36, +255,10,9,7,227,8,8,5,161,10,9,7,167,10,9,7,136,13,10,6, +85,7,6,6,74,0,24,9,8,6,167,191,106,30,255,211,115,30,255,210, +115,31,255,19,15,10,252,0,16,12,11,9,170,208,141,61,255,230,187,119, +255,232,201,141,255,40,34,25,255,0,12,14,12,9,170,196,109,31,255,210, +107,31,255,210,115,31,255,36,25,13,170,0,8,10,9,7,85,155,91,28, +255,208,114,31,255,209,106,30,255,30,22,13,255,0,12,22,21,17,176,222, +186,123,255,234,199,143,255,226,195,135,255,35,29,22,178,0,8,12,11,9, +105,190,105,29,255,211,115,30,255,208,114,31,255,23,19,12,210,0,8,15, +12,8,59,7,6,4,3,0,4,9,9,8,159,204,134,59,255,230,182,119, +255,232,198,139,255,39,33,24,255,0,16,10,10,9,34,15,14,10,198,52, +40,21,255,165,96,28,255,198,113,29,255,185,102,28,255,80,53,25,255,19, +17,12,227,10,9,7,76,0,16,11,10,8,170,195,112,30,255,211,115,30, +255,210,115,31,255,20,16,11,255,0,12,10,9,7,170,192,111,31,255,215, +125,38,255,224,159,83,255,41,33,24,255,0,24,7,7,6,108,24,20,13, +255,146,88,31,255,195,127,38,255,113,77,34,255,15,14,12,210,7,7,6, +28,0,16,12,12,11,28,37,30,18,227,168,99,31,255,206,114,33,255,51, +34,18,255,6,5,5,71,0,20,17,16,14,170,221,186,124,255,234,202,147, +255,232,201,141,255,40,35,25,255,0,24,17,15,10,227,198,105,29,255,194, +109,33,255,62,44,23,255,16,14,11,85,0,100,19,17,12,142,214,171,97, +255,228,183,113,255,227,186,108,255,50,40,25,227,0,64,12,11,9,198,214, +158,85,255,229,183,110,255,228,181,107,255,21,19,14,249,2,2,1,20,8, +8,7,181,210,156,79,255,226,169,95,255,224,155,81,255,33,26,18,255,4, +4,4,28,0,40,3,3,2,28,11,10,8,255,209,138,62,255,223,154,72, +255,221,164,82,255,27,23,16,249,0,16,7,7,6,79,46,38,25,255,197, +151,84,255,222,161,89,255,209,128,42,255,141,91,32,255,15,13,10,218,5, +5,5,11,0,28,15,13,10,139,191,131,60,255,220,168,93,255,168,123,69, +255,14,13,11,227,5,5,5,85,9,9,8,170,105,78,40,255,162,116,61, +255,88,66,37,255,23,21,16,255,11,11,10,255,78,58,35,255,208,150,75, +255,61,46,28,181,0,36,15,13,10,170,216,170,97,255,230,187,119,255,228, +178,113,255,34,28,19,255,0,24,15,13,10,170,215,167,92,255,229,179,114, +255,228,181,107,255,32,27,19,255,0,16,6,6,6,25,5,5,4,198,52, +42,27,255,220,169,97,255,189,142,76,255,35,31,22,255,134,96,51,255,225, +176,106,255,140,106,53,255,6,6,5,255,6,6,6,51,0,28,5,5,5, +28,15,13,10,227,208,136,59,255,218,138,53,255,213,122,42,255,43,31,18, +255,5,5,4,85,0,136,9,8,8,57,57,47,30,255,212,163,93,255,224, +157,85,255,124,90,45,255,10,10,9,147,0,20,15,13,10,170,216,170,97, +255,228,181,107,255,224,165,81,255,194,136,61,255,58,46,29,255,12,12,11, +85,0,4,10,9,7,156,174,91,23,255,202,103,23,255,202,102,21,255,20, +16,9,255,0,24,15,13,10,170,213,155,80,255,227,175,100,255,227,171,98, +255,35,29,20,255,0,32,7,7,6,85,49,33,18,255,183,108,34,255,209, +128,42,255,209,137,60,255,186,134,67,255,95,74,39,255,22,20,15,229,8, +8,7,105,0,44,5,4,4,28,17,15,12,227,216,167,89,255,228,181,107, +255,223,176,102,255,34,28,19,184,0,8,12,11,9,108,180,106,33,255,214, +125,39,255,217,141,52,255,42,33,21,255,4,4,4,85,0,8,11,10,8, +198,211,149,76,255,224,160,77,255,220,144,63,255,34,27,17,255,0,40,12, +10,7,170,189,99,26,255,206,102,25,255,203,100,24,255,30,21,11,176,0, +8,12,10,7,85,167,87,22,255,202,103,23,255,202,102,21,255,27,20,10, +255,4,4,3,68,0,4,4,4,4,28,12,10,7,215,176,91,23,255,203, +104,24,255,202,105,27,255,28,21,13,249,0,24,9,8,8,57,57,47,30, +255,213,167,94,255,228,184,115,255,126,92,47,255,9,9,8,147,0,20,13, +12,10,167,199,131,58,255,220,148,63,255,219,147,62,255,49,38,24,255,6, +6,6,85,0,4,5,5,5,28,15,14,12,227,217,169,94,255,228,183,111, +255,225,174,102,255,31,25,18,241,0,36,5,5,5,28,15,13,10,227,204, +127,45,255,219,133,56,255,221,150,66,255,35,28,18,255,0,68,10,9,9, +85,45,34,21,255,201,110,30,255,192,100,25,255,57,35,16,255,12,10,7, +85,0,24,13,11,6,79,126,68,21,255,191,100,26,255,198,117,37,255,208, +139,65,255,213,155,80,255,214,161,85,255,215,167,92,255,216,167,89,255,215, +160,88,255,49,38,24,170,0,24,7,7,6,76,45,36,24,249,207,164,90, +255,228,183,111,255,143,111,56,255,13,12,10,170,0,28,13,12,8,142,182, +99,25,255,203,108,24,255,202,102,21,255,112,65,23,255,15,13,8,227,6, +6,5,45,0,16,10,8,7,170,171,89,22,255,202,95,23,255,202,103,23, +255,103,64,26,255,20,18,13,255,79,61,36,255,222,173,97,255,227,179,104, +255,224,172,97,255,226,171,99,255,224,176,93,255,36,29,19,207,0,8,12, +10,7,113,176,91,23,255,202,95,23,255,202,102,21,255,27,20,10,255,4, +4,3,74,0,4,4,4,4,28,11,9,6,215,187,101,24,255,216,134,45, +255,226,172,95,255,23,21,16,241,0,8,10,10,9,161,212,160,85,255,226, +172,95,255,222,158,75,255,51,39,24,255,6,6,6,85,0,4,4,4,3, +28,11,10,6,215,176,91,23,255,202,102,21,255,191,102,22,255,22,17,9, +170,0,8,12,10,7,85,167,87,22,255,204,105,25,255,217,133,50,255,35, +28,18,255,0,40,15,13,10,170,199,116,34,255,212,114,35,255,218,139,55, +255,33,27,18,255,0,12,15,13,10,170,213,160,84,255,227,175,100,255,224, +165,81,255,25,21,14,235,0,8,13,11,8,108,184,96,25,255,203,96,24, +255,202,95,23,255,27,20,10,255,4,4,3,71,0,28,10,9,7,170,187, +101,24,255,216,134,45,255,224,167,85,255,54,42,27,255,6,6,6,85,0, +28,10,9,7,170,171,89,22,255,202,103,23,255,202,102,21,255,29,21,10, +170,0,4,11,9,6,42,137,77,24,255,211,136,56,255,215,167,92,255,216, +166,95,255,213,163,84,255,33,28,18,161,0,8,11,10,8,130,184,100,25, +255,203,100,24,255,202,102,21,255,27,20,10,255,4,4,3,74,0,4,4, +4,4,28,11,9,6,215,176,91,23,255,202,103,23,255,202,95,23,255,28, +21,11,190,0,8,10,10,9,161,212,161,89,255,228,174,105,255,223,161,80, +255,33,28,18,255,0,40,10,9,7,167,171,89,22,255,202,103,23,255,202, +102,21,255,29,21,10,170,0,8,12,10,7,85,167,87,22,255,202,103,23, +255,203,108,24,255,68,47,25,255,6,6,5,255,31,26,20,255,220,168,93, +255,220,177,101,255,110,80,41,255,12,11,9,150,0,16,10,9,7,170,171, +89,22,255,202,103,23,255,202,102,21,255,20,16,9,255,0,32,10,9,7, +170,193,111,30,255,219,136,54,255,224,165,81,255,27,24,16,255,0,4,7, +7,7,28,21,20,16,181,10,10,9,85,0,4,12,11,9,170,204,130,51, +255,218,141,51,255,211,122,36,255,32,23,13,187,0,8,13,11,8,85,167, +87,22,255,203,100,24,255,208,105,29,255,23,19,12,255,4,4,3,28,11, +10,8,181,211,158,82,255,229,183,110,255,228,183,111,255,228,183,113,255,228, +181,107,255,27,23,16,229,0,8,10,10,9,150,192,111,31,255,208,112,27, +255,203,108,24,255,21,17,10,255,0,12,15,13,10,170,216,170,97,255,229, +183,110,255,228,181,107,255,25,21,16,235,0,8,11,10,8,142,194,116,33, +255,209,106,30,255,203,108,24,255,27,20,10,255,4,4,3,74,0,36,10, +8,7,170,171,89,22,255,202,103,23,255,202,102,21,255,42,28,13,255,6, +5,5,48,0,4,6,6,6,28,21,19,14,255,221,175,102,255,229,179,114, +255,228,181,107,255,24,20,15,246,0,8,12,11,9,127,190,104,27,255,206, +106,25,255,202,103,23,255,27,20,10,255,4,4,3,74,0,4,4,4,4, +28,11,10,6,215,176,91,23,255,204,105,25,255,207,122,38,255,28,22,15, +238,0,36,5,5,5,28,15,13,10,227,195,111,28,255,204,105,25,255,197, +100,22,255,22,17,9,224,0,24,15,13,10,170,216,170,97,255,229,184,114, +255,228,181,107,255,34,28,19,255,0,24,10,9,7,170,174,91,23,255,202, +103,23,255,202,102,21,255,20,16,9,252,0,12,10,9,7,170,171,89,22, +255,202,107,23,255,206,111,27,255,22,17,11,252,0,8,8,7,7,45,73, +59,36,255,218,174,105,255,228,178,107,255,89,67,36,255,7,7,6,113,0, +4,5,5,4,28,20,18,13,255,199,110,30,255,202,105,27,255,88,54,23, +255,10,9,7,113,0,8,13,11,6,85,167,87,22,255,202,95,23,255,202, +90,23,255,32,24,13,255,4,4,3,178,19,16,12,238,212,163,93,255,66, +52,31,255,5,5,5,184,14,13,11,255,205,133,48,255,212,114,35,255,208, +117,29,255,29,22,14,255,0,16,12,11,9,85,101,74,38,255,189,121,49, +255,185,104,32,255,180,98,25,255,180,93,23,255,154,82,23,255,75,44,18, +255,11,9,6,144,0,32,10,9,7,170,157,79,22,255,202,102,21,255,202, +102,21,255,22,17,9,255,0,28,14,13,11,224,136,98,53,255,217,165,82, +255,213,145,56,255,150,92,35,255,19,16,12,173,5,5,5,8,0,28,10, +8,7,170,171,89,22,255,202,103,23,255,202,102,21,255,20,16,9,252,0, +28,7,7,6,59,43,35,24,255,221,175,102,255,223,178,106,255,134,98,51, +255,14,13,11,142,0,24,10,9,7,167,171,89,22,255,202,103,23,255,202, +102,21,255,20,16,9,255,0,144,12,10,7,170,46,29,13,255,140,74,21, +255,165,86,22,255,167,87,22,255,165,86,22,255,167,87,22,255,185,95,22, +255,198,97,23,255,206,111,27,255,221,146,66,255,23,19,14,249,0,8,10, +10,9,153,212,161,89,255,229,183,110,255,224,165,81,255,28,23,15,255,0, +12,10,8,7,156,171,89,22,255,202,103,23,255,202,102,21,255,31,21,10, +170,0,8,10,10,9,167,212,160,85,255,228,177,105,255,222,158,75,255,27, +23,16,255,0,40,10,8,7,170,167,87,22,255,202,103,23,255,202,102,21, +255,20,16,9,238,0,12,10,8,7,164,171,89,22,255,202,103,23,255,203, +100,24,255,22,18,11,235,0,8,10,10,9,167,214,164,93,255,228,182,109, +255,223,154,80,255,207,120,36,255,189,94,24,255,167,87,22,255,167,87,22, +255,187,96,22,255,198,93,23,255,202,93,21,255,198,96,21,255,26,19,9, +227,0,16,10,8,7,167,171,89,22,255,202,103,23,255,202,102,21,255,20, +15,9,252,0,16,17,15,12,170,216,170,97,255,229,183,110,255,224,164,85, +255,29,24,16,255,3,3,2,28,0,8,12,11,9,198,211,149,76,255,221, +151,68,255,219,146,60,255,22,19,13,246,0,8,10,10,9,161,210,155,77, +255,223,147,72,255,213,122,42,255,23,18,12,255,0,12,10,8,7,167,171, +89,22,255,202,103,23,255,202,102,21,255,29,21,10,170,0,8,12,10,7, +85,166,87,23,255,209,118,30,255,218,139,55,255,33,27,18,255,0,24,15, +13,10,170,215,159,92,255,226,169,95,255,218,141,59,255,34,26,15,190,0, +8,13,10,6,85,167,87,22,255,202,103,23,255,198,96,21,255,197,96,22, +255,189,97,22,255,198,96,21,255,198,96,21,255,25,19,10,255,4,4,3, +28,0,20,10,9,7,170,178,92,23,255,210,107,31,255,215,128,44,255,33, +24,14,193,0,8,12,10,7,85,167,87,22,255,202,95,23,255,202,103,23, +255,32,22,11,170,0,4,10,8,7,170,171,89,22,255,24,17,9,249,0, +4,12,10,7,85,163,82,22,255,202,103,23,255,202,102,21,255,29,21,10, +170,0,8,12,10,7,85,166,87,23,255,202,103,23,255,202,102,21,255,20, +15,9,255,0,12,10,8,7,167,170,89,23,255,206,106,25,255,208,115,33, +255,28,21,13,207,0,8,13,10,6,85,167,87,22,255,202,95,23,255,202, +102,21,255,20,16,9,255,0,12,15,13,10,170,214,158,85,255,229,183,110, +255,228,185,111,255,24,20,15,249,0,8,12,11,9,108,176,91,23,255,202, +95,23,255,202,102,21,255,18,15,9,255,2,2,1,8,0,8,8,7,5, +184,171,89,22,255,202,95,23,255,202,102,21,255,34,23,11,173,0,8,12, +11,9,136,212,160,85,255,228,180,105,255,225,165,88,255,31,25,18,255,3, +3,2,28,0,8,8,7,5,178,171,89,22,255,202,103,23,255,202,102,21, +255,30,21,11,170,0,8,12,10,7,85,167,87,22,255,202,103,23,255,202, +102,21,255,20,15,9,255,0,40,7,7,6,28,30,27,21,238,167,111,50, +255,206,110,33,255,199,102,24,255,175,90,22,255,165,86,22,255,167,87,22, +255,167,87,22,255,161,87,22,255,84,48,19,255,18,15,9,227,8,7,5, +28,0,16,10,8,7,167,171,89,22,255,202,103,23,255,202,102,21,255,20, +15,9,252,0,16,15,13,10,170,211,159,76,255,229,180,110,255,228,182,109, +255,34,28,19,255,0,12,10,9,7,170,171,89,22,255,202,103,23,255,202, +102,21,255,31,22,10,170,0,8,7,6,6,28,48,31,15,255,189,93,22, +255,202,102,21,255,45,29,14,255,5,5,4,113,0,4,5,5,4,28,22, +20,15,255,220,169,97,255,226,178,103,255,167,118,54,255,15,13,10,133,0, +8,13,11,6,85,167,87,22,255,202,103,23,255,202,102,21,255,19,15,8, +215,0,4,11,9,6,105,121,65,20,255,26,18,9,190,0,4,9,9,8, +167,208,150,75,255,229,183,110,255,228,181,113,255,37,29,20,255,0,24,8, +8,5,218,167,87,22,255,202,93,21,255,198,104,21,255,23,18,10,255,3, +3,2,51,0,20,10,9,7,153,171,89,22,255,202,95,23,255,202,102,21, +255,20,15,9,255,2,2,1,17,0,8,8,7,5,181,184,100,25,255,215, +119,42,255,224,160,85,255,34,28,19,255,0,20,9,8,6,85,31,22,12, +255,166,87,23,255,189,97,22,255,99,60,22,255,15,13,8,170,0,28,4, +3,3,23,13,11,8,227,182,94,23,255,149,87,26,255,19,17,12,227,7, +7,7,23,0,16,15,13,10,170,216,170,97,255,229,179,114,255,228,182,109, +255,34,28,19,255,0,20,9,8,6,130,69,42,18,255,195,95,22,255,35, +24,12,255,5,5,4,76,0,104,10,9,7,28,27,24,16,184,32,27,19, +255,39,29,20,212,13,12,10,85,0,60,13,11,8,170,81,54,28,255,216, +148,67,255,223,161,72,255,220,147,61,255,117,76,32,255,13,11,8,255,44, +33,19,255,207,123,40,255,217,136,50,255,218,142,53,255,156,100,39,255,18, +15,11,227,10,8,7,28,0,12,15,13,8,125,19,14,10,170,14,11,7, +170,10,8,7,170,11,9,6,122,13,10,8,85,8,7,5,153,46,33,21, +255,212,138,51,255,221,151,68,255,191,132,62,255,19,17,12,176,0,12,7, +7,6,76,26,22,15,241,189,129,58,255,219,152,72,255,217,154,72,255,133, +87,38,255,15,13,10,221,6,6,5,28,0,8,15,12,8,113,20,16,11, +170,17,14,10,142,7,6,6,28,0,8,19,16,12,170,200,117,35,255,212, +123,37,255,115,74,30,255,9,8,6,113,0,8,12,11,9,178,104,73,37, +255,206,147,63,255,178,121,53,255,58,46,29,255,46,36,25,255,40,32,21, +252,19,17,12,85,0,36,12,10,9,164,191,131,60,255,223,161,80,255,221, +151,68,255,46,34,21,255,4,4,3,3,0,20,19,16,12,173,208,134,55, +255,223,156,70,255,216,160,81,255,21,19,14,255,0,16,6,5,5,25,17, +14,10,227,67,48,28,255,94,67,35,255,20,17,13,227,6,6,5,113,12, +11,9,198,67,51,30,255,85,62,32,255,25,20,14,255,9,8,6,82,0, +32,10,8,5,170,161,87,22,255,195,90,20,255,187,91,20,255,19,14,8, +255,0,28,15,12,8,119,20,16,11,170,17,14,10,156,10,8,7,28,0, +64,15,12,8,122,18,15,11,170,17,14,10,144,10,8,7,28,0,16,13, +12,10,170,157,96,36,255,211,123,38,255,199,116,34,255,31,24,16,255,6, +6,6,28,0,20,16,13,11,170,197,110,32,255,209,110,30,255,202,103,23, +255,58,36,15,255,8,7,5,113,0,8,10,8,5,85,137,68,18,255,185, +86,20,255,174,88,19,255,18,13,7,255,0,24,12,10,9,170,204,129,49, +255,220,144,63,255,217,133,50,255,26,20,13,255,0,28,7,6,6,76,23, +19,12,244,185,113,36,255,207,129,52,255,173,117,50,255,59,46,28,255,18, +15,13,198,9,9,8,113,6,6,6,11,0,24,15,12,8,133,22,17,11, +170,17,14,10,142,8,7,5,28,0,12,9,8,6,170,202,128,49,255,220, +148,63,255,219,140,56,255,22,19,13,255,0,8,12,10,9,170,200,125,37, +255,218,141,51,255,220,147,61,255,138,86,35,255,13,10,8,227,11,9,6, +170,13,11,8,198,61,41,22,255,202,111,31,255,204,105,25,255,200,105,21, +255,22,17,9,221,0,12,11,9,6,108,14,11,7,170,11,9,6,139,6, +5,3,17,0,12,9,7,6,133,144,75,19,255,185,86,20,255,178,86,19, +255,27,18,8,170,0,8,11,9,6,85,134,70,19,255,181,88,20,255,180, +87,19,255,24,15,7,178,0,12,10,8,5,99,165,86,22,255,206,111,27, +255,213,124,38,255,36,27,17,255,0,24,10,10,9,133,167,112,48,255,222, +166,77,255,223,157,72,255,54,39,23,255,5,5,4,37,0,20,13,11,8, +170,181,93,22,255,206,111,27,255,214,127,43,255,20,16,11,255,0,12,9, +8,8,170,203,129,50,255,222,145,63,255,220,147,61,255,33,26,16,255,0, +12,12,10,7,113,15,12,8,170,13,10,8,122,0,16,10,8,7,170,200, +120,41,255,220,142,59,255,219,146,60,255,27,21,14,255,0,12,13,11,8, +113,18,15,11,170,17,14,10,142,8,7,5,28,0,12,14,12,9,113,20, +15,11,170,17,14,10,153,10,8,7,28,0,16,9,8,6,85,29,21,10, +255,119,62,20,255,153,79,20,255,40,25,11,255,9,8,6,85,0,20,10, +8,7,28,32,24,13,218,68,47,25,255,61,43,24,255,61,46,28,255,61, +47,28,255,61,47,28,255,66,50,29,255,73,55,32,255,66,48,29,255,24, +20,15,85,0,20,7,6,6,79,32,26,17,244,199,132,54,255,208,150,75, +255,122,87,41,255,17,15,10,170,0,32,10,9,7,28,32,23,11,227,53, +33,14,255,34,23,11,255,12,10,7,190,6,5,5,28,0,20,9,7,4, +170,146,76,19,255,197,99,20,255,204,110,27,255,59,41,22,255,6,6,6, +170,10,9,9,113,31,26,18,184,30,25,17,255,29,25,18,255,34,27,19, +255,37,28,18,221,13,11,8,57,0,8,13,10,6,88,144,75,19,255,185, +86,20,255,178,90,19,255,20,14,7,212,0,12,9,7,4,125,157,81,20, +255,212,117,33,255,220,148,63,255,27,21,14,218,0,8,12,10,9,127,192, +111,31,255,208,112,27,255,202,103,23,255,22,16,9,204,0,12,10,8,5, +93,137,68,18,255,185,94,20,255,180,91,19,255,30,20,9,170,0,8,11, +9,6,85,140,67,19,255,202,106,21,255,214,125,39,255,25,20,14,255,0, +12,6,6,5,28,13,11,8,139,20,16,11,170,19,15,10,142,8,7,5, +28,0,8,10,9,5,142,153,79,20,255,195,90,20,255,206,111,27,255,24, +20,13,255,0,12,12,10,9,170,195,113,32,255,211,115,30,255,203,108,24, +255,31,21,10,173,0,8,11,9,6,85,140,70,19,255,185,86,20,255,180, +87,19,255,24,15,7,181,0,32,9,8,6,170,174,91,23,255,215,123,42, +255,221,150,66,255,25,20,14,255,0,32,9,7,4,170,148,77,19,255,181, +92,20,255,180,87,19,255,25,17,8,170,0,8,34,24,13,170,161,102,38, +255,219,154,70,255,220,142,59,255,213,124,38,255,32,24,13,198,0,8,11, +9,6,85,140,70,19,255,185,86,20,255,178,90,19,255,20,14,7,212,0, +12,8,7,5,127,144,78,19,255,185,86,20,255,180,87,19,255,29,19,10, +170,0,8,13,11,8,116,194,116,33,255,209,110,30,255,202,95,23,255,22, +17,9,221,0,12,10,8,5,85,12,9,5,170,10,8,5,130,6,5,3, +8,0,12,10,8,5,110,144,78,19,255,185,86,20,255,178,86,19,255,27, +18,8,170,0,8,11,8,6,85,137,68,18,255,185,86,20,255,200,105,21, +255,29,21,12,255,4,4,4,25,10,9,7,139,154,100,47,255,215,148,70, +255,198,131,45,255,46,34,19,255,11,9,6,88,0,12,10,8,5,119,144, +78,19,255,185,86,20,255,180,87,19,255,21,15,8,210,0,32,13,11,8, +170,199,119,39,255,220,144,63,255,221,155,70,255,27,21,14,255,0,20,10, +9,7,170,171,89,22,255,195,98,20,255,183,89,19,255,29,20,8,170,0, +8,11,9,6,85,139,70,20,255,202,103,23,255,211,118,36,255,28,21,13, +201,0,4,8,8,7,57,118,84,39,255,215,159,86,255,219,149,66,255,216, +129,45,255,211,121,34,255,34,25,13,178,0,8,11,10,6,88,146,76,19, +255,185,94,20,255,178,90,19,255,24,18,9,255,0,12,18,15,11,170,203, +122,42,255,215,126,40,255,209,106,30,255,32,22,13,184,0,8,12,10,7, +85,143,72,20,255,185,94,20,255,178,90,19,255,20,14,7,210,0,40,9, +7,4,170,148,77,19,255,180,87,19,255,178,86,19,255,30,21,9,255,5, +5,4,37,8,7,5,28,20,17,13,227,133,89,38,255,215,142,56,255,216, +129,45,255,209,115,32,255,26,19,11,210,0,8,11,9,6,85,142,74,19, +255,185,86,20,255,178,90,19,255,20,14,7,210,0,12,9,7,4,122,143, +75,20,255,203,108,24,255,216,129,45,255,30,23,15,255,0,12,12,10,7, +110,16,13,9,170,13,10,8,122,0,16,9,8,6,105,142,74,19,255,185, +86,20,255,180,87,19,255,23,16,8,255,0,24,15,13,10,170,203,122,42, +255,215,126,40,255,209,118,30,255,24,17,11,255,0,24,9,8,4,170,148, +77,19,255,181,92,20,255,180,87,19,255,23,16,8,198,0,12,9,7,6, +139,159,82,20,255,203,100,24,255,212,121,33,255,28,21,13,255,0,12,12, +11,9,119,81,59,34,255,216,153,71,255,173,117,50,255,21,18,14,255,10, +10,9,244,11,10,8,255,60,35,15,255,173,85,20,255,84,49,17,255,13, +10,6,170,0,12,10,8,5,130,146,79,19,255,193,89,20,255,203,104,24, +255,120,77,31,255,19,17,12,255,117,80,36,255,219,154,70,255,178,121,53, +255,20,17,13,255,45,33,18,255,184,94,21,255,195,90,20,255,205,106,26, +255,30,22,13,255,0,12,7,7,6,82,35,28,18,255,196,114,33,255,148, +80,25,255,32,22,11,255,20,15,9,255,26,18,9,255,88,49,17,255,149, +78,20,255,40,26,11,255,9,7,4,85,0,28,9,7,4,127,140,70,19, +255,181,88,20,255,180,87,19,255,18,13,7,235,0,24,10,9,7,93,104, +69,35,255,201,131,48,255,194,109,33,255,65,42,20,255,12,10,7,170,0, +36,9,7,4,170,146,79,19,255,181,88,20,255,180,87,19,255,23,16,8, +198,0,32,15,14,10,198,188,133,61,255,219,149,66,255,194,115,37,255,17, +15,10,244,0,24,10,8,5,113,144,78,19,255,185,86,20,255,180,87,19, +255,18,13,7,255,0,140,7,6,4,65,53,31,12,255,162,83,19,255,185, +94,20,255,130,70,21,255,31,22,10,255,25,19,10,198,22,17,9,246,70, +40,15,255,169,87,20,255,200,105,21,255,212,123,37,255,28,21,13,221,0, +8,12,10,9,133,200,127,41,255,210,120,33,255,202,95,23,255,19,14,8, +238,0,12,10,8,5,110,144,78,19,255,185,86,20,255,178,86,19,255,28, +19,9,170,0,8,12,10,9,133,194,112,31,255,209,110,30,255,202,102,21, +255,21,15,8,235,0,16,9,7,4,57,12,10,5,88,10,8,5,85,0, +12,10,8,5,125,146,79,19,255,181,88,20,255,180,87,19,255,25,17,8, +195,0,12,10,8,5,119,144,78,19,255,185,94,20,255,200,105,21,255,23, +18,10,221,0,8,11,9,8,153,200,123,41,255,212,117,33,255,202,103,23, +255,111,63,20,255,27,20,10,255,20,16,9,246,22,17,9,249,28,20,9, +198,30,21,9,170,24,17,9,215,28,20,9,201,10,8,5,85,0,16,9, +7,4,170,146,79,19,255,181,88,20,255,180,87,19,255,18,13,7,255,0, +16,11,10,8,113,152,104,47,255,214,134,49,255,204,105,25,255,98,54,19, +255,18,13,9,227,13,10,8,170,14,12,9,198,60,41,21,255,199,112,28, +255,202,102,21,255,202,103,23,255,26,19,11,204,0,8,12,11,9,116,187, +101,24,255,202,93,21,255,187,91,20,255,18,13,7,255,0,12,9,7,4, +170,146,79,19,255,181,88,20,255,178,90,19,255,27,17,8,170,0,8,11, +9,6,85,139,70,20,255,202,103,23,255,212,123,37,255,32,24,15,255,0, +24,13,12,10,170,196,114,33,255,206,106,25,255,196,99,21,255,28,19,9, +170,0,8,11,8,6,85,137,68,18,255,181,88,20,255,178,86,19,255,164, +85,21,255,138,73,21,255,175,93,20,255,178,86,19,255,46,28,11,255,6, +5,3,108,0,20,9,7,4,170,146,76,19,255,189,88,20,255,189,88,20, +255,28,19,9,170,0,8,11,9,6,85,137,68,18,255,185,86,20,255,178, +90,19,255,27,17,8,170,0,4,9,7,4,167,146,79,19,255,20,14,7, +252,0,4,11,9,6,85,137,68,18,255,185,94,20,255,178,90,19,255,27, +17,8,170,0,8,11,9,6,85,137,68,18,255,185,86,20,255,180,87,19, +255,18,13,7,255,0,12,9,7,4,170,146,79,19,255,185,94,20,255,183, +85,19,255,27,19,8,170,0,8,11,9,6,85,140,73,19,255,181,88,20, +255,178,90,19,255,20,15,7,255,0,12,16,14,11,170,208,143,59,255,223, +156,70,255,216,135,49,255,28,22,13,210,0,8,11,9,6,85,140,70,19, +255,185,94,20,255,178,90,19,255,72,39,13,255,10,8,5,218,8,6,3, +170,9,7,4,193,39,24,10,255,160,82,19,255,185,94,20,255,144,74,23, +255,16,13,9,170,0,8,10,9,7,85,145,101,48,255,218,149,67,255,210, +115,31,255,99,57,19,255,10,8,5,227,8,6,3,170,9,7,4,190,30, +20,9,255,158,81,19,255,185,94,20,255,178,90,19,255,27,17,8,170,0, +8,11,8,6,85,137,68,18,255,185,86,20,255,180,87,19,255,18,13,7, +255,0,44,9,9,8,28,13,12,8,142,27,20,10,170,29,21,10,193,24, +17,9,252,22,17,9,232,22,17,9,255,87,49,18,255,181,88,20,255,178, +90,19,255,100,54,17,255,11,10,6,150,0,16,9,7,4,170,146,79,19, +255,181,88,20,255,180,87,19,255,18,13,7,255,0,16,15,13,10,170,208, +141,55,255,223,156,70,255,217,133,50,255,23,19,12,255,0,12,10,8,5, +122,144,78,19,255,185,86,20,255,180,87,19,255,30,20,9,176,0,12,12, +10,7,85,39,26,12,255,155,80,20,255,99,55,19,255,19,16,12,255,12, +11,9,255,18,15,11,255,119,84,38,255,209,137,60,255,138,86,35,255,18, +15,11,178,0,12,10,8,5,130,144,78,19,255,181,92,20,255,178,90,19, +255,39,24,10,255,6,5,3,210,29,20,8,255,169,87,20,255,97,53,18, +255,8,7,5,255,26,21,15,255,212,142,59,255,221,151,68,255,218,142,53, +255,34,25,15,255,0,20,5,5,4,82,16,12,7,255,160,82,19,255,185, +86,20,255,185,86,20,255,52,29,11,255,7,6,4,170,0,20,8,7,5, +85,83,46,16,255,181,92,20,255,178,86,19,255,87,47,14,255,10,8,5, +224,8,6,3,170,9,7,4,190,29,20,8,255,195,104,24,255,217,136,50, +255,221,155,70,255,30,23,15,255,0,16,8,7,5,85,26,18,9,255,107, +59,20,255,151,80,22,255,60,34,15,255,11,9,6,170,0,36,8,7,5, +170,159,82,20,255,202,118,35,255,66,51,29,255,9,9,8,96,0,16,15, +13,10,170,208,140,59,255,223,156,70,255,215,133,44,255,27,20,12,255,0, +20,14,12,7,244,131,67,20,255,176,89,19,255,17,12,6,255,0,184,17, +14,10,85,171,95,28,255,206,123,33,255,208,123,31,255,207,112,28,255,202, +107,23,255,191,98,22,255,170,91,21,255,195,107,22,255,209,123,30,255,212, +132,37,255,214,134,39,255,211,133,40,255,202,121,35,255,29,21,12,164,0, +8,12,10,7,82,168,98,29,255,202,121,35,255,196,120,31,255,194,115,31, +255,190,115,27,255,185,101,26,255,184,100,25,255,199,107,26,255,208,123,31, +255,168,105,37,255,25,21,14,227,9,8,8,28,0,8,8,8,7,28,39, +30,18,249,183,122,42,255,211,133,40,255,210,133,43,255,161,106,41,255,15, +13,10,221,5,4,4,17,0,8,14,11,7,113,148,83,25,255,193,108,24, +255,180,93,23,255,27,18,10,153,0,8,12,9,7,122,144,78,19,255,180, +91,19,255,83,46,16,255,7,6,4,184,0,8,4,4,3,85,28,21,13, +255,202,121,35,255,209,132,42,255,131,87,36,255,10,9,7,255,5,5,5, +28,0,40,10,9,7,68,86,62,31,255,206,131,43,255,214,130,39,255,76, +50,25,255,7,6,6,113,0,16,5,5,4,28,21,17,12,255,202,121,35, +255,210,135,37,255,157,100,38,255,18,15,11,150,0,16,18,15,9,91,161, +88,24,255,105,64,28,255,11,10,8,170,0,12,8,7,7,85,40,28,17, +255,174,91,23,255,42,27,13,173,0,32,10,8,5,116,133,66,16,255,161, +85,17,255,161,78,17,255,25,16,8,221,0,24,15,12,8,119,170,99,29, +255,203,126,36,255,199,127,34,255,27,20,12,210,0,60,13,11,8,122,170, +99,29,255,204,127,37,255,199,119,34,255,27,20,12,198,0,12,4,4,3, +11,18,13,9,255,154,79,19,255,174,88,19,255,92,51,17,255,12,10,7, +198,0,24,11,9,6,147,142,74,19,255,171,90,18,255,159,81,18,255,17, +12,6,255,0,12,8,7,5,142,133,66,16,255,161,85,17,255,161,85,17, +255,21,14,6,215,0,24,10,9,7,198,190,107,25,255,203,104,24,255,196, +99,21,255,21,15,8,255,2,2,1,14,0,20,9,8,6,37,35,28,18, +255,183,112,36,255,212,132,37,255,178,118,41,255,27,23,16,255,5,5,4, +198,0,32,15,12,8,105,142,79,23,255,189,97,22,255,160,83,21,255,18, +13,7,218,0,12,10,8,7,198,196,114,33,255,214,129,37,255,212,132,37, +255,27,21,12,210,0,8,13,11,8,116,192,114,31,255,210,125,33,255,209, +123,30,255,203,113,26,255,177,91,22,255,159,82,20,255,160,83,21,255,165, +85,20,255,168,89,19,255,163,86,18,255,161,78,17,255,23,15,6,170,0, +8,9,7,4,57,99,48,14,255,142,73,17,255,133,66,16,255,19,13,6, +190,0,12,7,6,4,164,135,66,16,255,161,85,17,255,161,85,17,255,25, +16,6,170,0,8,10,8,5,85,131,65,16,255,161,85,17,255,161,85,17, +255,19,13,6,227,0,12,10,8,5,176,190,107,25,255,212,127,35,255,214, +134,39,255,30,21,13,255,0,24,12,10,7,170,194,109,33,255,213,132,36, +255,208,122,29,255,28,20,11,255,0,24,9,7,4,147,136,70,17,255,202, +98,21,255,211,126,34,255,27,20,12,255,3,3,2,28,0,8,10,8,7, +195,180,93,23,255,202,102,21,255,202,102,21,255,25,17,10,221,0,8,13, +11,8,65,129,70,22,255,172,88,21,255,144,78,19,255,22,15,7,176,0, +12,10,8,7,198,198,124,37,255,215,136,42,255,214,134,39,255,27,21,12, +212,0,8,12,10,7,79,151,88,26,255,198,116,29,255,192,109,27,255,25, +18,10,167,0,8,12,9,7,82,119,62,20,255,174,89,21,255,154,79,19, +255,22,15,7,181,0,20,5,5,4,68,20,14,7,249,142,73,17,255,143, +74,18,255,45,26,10,255,10,8,5,85,0,76,7,6,6,85,39,30,18, +255,196,121,41,255,213,135,42,255,115,72,30,255,10,9,7,170,0,40,5, +5,4,17,6,5,5,85,5,5,4,45,0,28,9,7,4,142,146,79,19, +255,204,108,23,255,212,126,33,255,30,22,13,255,3,3,3,40,0,36,10, +8,5,125,133,66,16,255,161,85,17,255,161,85,17,255,19,13,6,212,0, +12,10,8,5,127,136,70,17,255,193,97,20,255,203,108,24,255,30,21,11, +193,0,8,13,10,6,85,134,70,19,255,171,90,18,255,159,81,18,255,17, +12,6,238,0,12,8,6,5,144,135,66,16,255,161,85,17,255,161,85,17, +255,23,15,6,170,0,8,10,7,5,85,133,66,16,255,185,94,20,255,209, +123,30,255,23,18,12,255,3,3,2,28,0,4,5,5,4,28,18,15,11, +227,134,72,21,255,158,81,19,255,143,74,18,255,22,15,7,142,0,8,10, +8,5,85,131,65,16,255,163,79,18,255,178,90,19,255,22,16,9,255,3, +2,2,20,0,8,9,7,6,176,144,78,19,255,175,88,18,255,163,79,18, +255,26,16,7,170,0,8,10,8,5,85,129,64,16,255,161,85,17,255,161, +78,17,255,19,13,6,229,0,32,8,7,5,156,144,78,19,255,202,102,21, +255,206,111,27,255,27,20,12,255,0,32,10,8,5,133,135,66,16,255,161, +85,17,255,161,85,17,255,19,13,6,227,0,12,8,7,5,255,172,85,21, +255,189,92,20,255,172,87,19,255,24,16,7,170,0,8,10,8,5,85,129, +64,16,255,161,85,17,255,161,85,17,255,19,13,6,212,0,12,10,8,5, +127,135,66,16,255,161,85,17,255,161,85,17,255,26,16,7,170,0,8,11, +9,6,85,134,70,19,255,171,90,18,255,159,78,18,255,23,15,6,170,0, +8,9,7,4,57,98,49,13,255,139,71,16,255,133,66,16,255,19,13,6, +193,0,12,7,6,4,176,133,66,16,255,161,85,17,255,161,85,17,255,23, +15,6,170,0,8,10,8,5,85,129,64,16,255,165,87,18,255,180,91,19, +255,20,15,9,255,0,4,5,5,4,17,26,21,15,227,126,75,25,255,178, +95,21,255,142,74,19,255,46,28,11,255,10,8,5,57,0,8,10,8,5, +85,131,65,16,255,161,85,17,255,161,85,17,255,17,12,6,252,2,1,1, +8,0,28,13,11,8,170,199,119,34,255,215,136,42,255,214,139,41,255,28, +20,13,255,0,20,8,7,5,170,135,66,16,255,161,85,17,255,161,85,17, +255,23,15,6,170,0,8,10,8,5,85,131,67,16,255,202,102,21,255,211, +127,36,255,22,17,11,249,0,8,16,14,11,201,101,67,28,255,191,98,22, +255,185,94,20,255,172,87,19,255,26,17,7,170,0,8,10,8,5,85,129, +64,16,255,161,85,17,255,161,85,17,255,31,20,8,255,5,5,4,102,0, +4,5,4,4,28,16,13,9,255,164,85,21,255,180,91,19,255,165,87,18, +255,26,17,7,170,0,8,10,8,5,85,129,64,16,255,161,85,17,255,161, +85,17,255,19,13,6,212,0,40,10,8,5,133,135,66,16,255,161,85,17, +255,161,85,17,255,26,17,7,255,3,3,2,136,9,7,4,227,131,67,20, +255,197,104,22,255,198,104,21,255,183,93,19,255,172,87,19,255,26,17,7, +170,0,8,10,8,5,85,129,64,16,255,161,85,17,255,161,85,17,255,19, +13,6,212,0,12,10,8,5,127,135,66,16,255,193,97,20,255,209,123,30, +255,19,15,10,252,0,8,13,11,8,65,125,68,22,255,174,86,21,255,146, +76,19,255,22,14,7,178,0,12,8,6,5,144,135,66,16,255,161,85,17, +255,161,85,17,255,19,14,6,238,0,24,13,11,8,170,163,87,20,255,180, +91,19,255,165,87,18,255,17,12,6,255,0,24,9,7,4,139,135,66,16, +255,161,85,17,255,161,85,17,255,15,11,6,246,0,12,9,7,6,184,180, +93,23,255,211,115,30,255,213,133,38,255,28,20,13,255,0,16,12,11,9, +170,152,91,31,255,188,105,31,255,115,66,22,255,91,50,16,255,84,46,15, +255,116,59,17,255,118,62,17,255,15,11,6,221,0,16,10,8,5,116,146, +79,19,255,202,103,23,255,209,128,32,255,200,127,41,255,167,106,40,255,197, +122,42,255,210,130,35,255,186,106,27,255,88,51,19,255,102,55,17,255,157, +83,18,255,189,92,20,255,209,123,30,255,29,21,12,224,0,8,7,6,6, +28,41,31,18,235,160,84,23,255,170,87,19,255,45,26,10,255,5,5,4, +170,4,4,4,8,4,4,3,99,15,12,6,255,140,72,17,255,138,71,17, +255,45,26,10,255,10,8,5,85,0,24,8,7,5,142,133,66,16,255,161, +85,17,255,161,85,17,255,19,13,6,229,0,24,13,11,8,170,160,86,21, +255,185,90,20,255,91,50,16,255,7,6,4,255,0,40,8,7,5,150,133, +66,16,255,161,85,17,255,161,85,17,255,15,11,6,246,0,32,8,8,7, +110,74,52,27,255,191,103,24,255,176,89,19,255,34,22,9,255,6,5,3, +57,0,20,8,6,5,161,133,66,16,255,161,85,17,255,161,78,17,255,15, +11,6,252,0,140,12,10,5,85,123,61,16,255,161,85,17,255,161,85,17, +255,22,15,7,255,2,2,1,85,0,8,7,6,4,244,133,66,16,255,167, +88,18,255,189,92,20,255,27,19,10,195,0,8,12,10,7,110,160,83,21, +255,177,85,18,255,161,78,17,255,15,11,6,252,0,12,7,6,4,161,133, +66,16,255,161,85,17,255,161,85,17,255,23,15,6,170,0,8,11,9,6, +85,134,70,19,255,171,90,18,255,159,78,18,255,15,11,6,249,0,12,10, +8,5,85,98,49,13,255,135,72,16,255,133,66,16,255,19,13,6,139,0, +8,10,8,5,85,131,65,16,255,161,85,17,255,161,85,17,255,15,11,6, +246,0,12,7,6,4,164,133,66,16,255,165,87,18,255,178,90,19,255,24, +17,9,212,0,8,13,11,8,105,165,86,22,255,180,91,19,255,159,81,18, +255,19,14,6,255,2,2,1,79,0,44,8,6,5,167,133,66,16,255,161, +85,17,255,161,85,17,255,15,11,6,252,0,16,7,6,6,28,24,19,13, +227,103,59,20,255,157,83,18,255,154,78,17,255,150,81,19,255,154,79,19, +255,158,81,19,255,162,83,19,255,161,85,17,255,159,81,18,255,163,86,18, +255,27,18,8,170,0,8,11,9,6,85,131,67,16,255,165,87,18,255,161, +85,17,255,15,11,6,252,0,12,8,6,5,167,133,66,16,255,161,85,17, +255,161,85,17,255,23,15,6,170,0,8,10,8,5,85,131,65,16,255,175, +88,18,255,191,96,20,255,25,18,10,255,0,24,11,9,6,170,148,77,19, +255,169,82,18,255,161,85,17,255,23,15,6,170,0,8,10,8,5,85,129, +64,16,255,161,85,17,255,161,85,17,255,87,47,14,255,23,17,8,255,65, +34,12,255,150,76,17,255,132,68,17,255,41,25,10,255,10,8,5,85,0, +16,8,7,5,150,133,66,16,255,161,85,17,255,161,78,17,255,23,15,6, +170,0,8,10,8,5,85,129,64,16,255,161,85,17,255,161,85,17,255,23, +15,6,170,0,4,8,7,5,153,133,66,16,255,19,13,6,238,0,4,10, +8,5,85,129,64,16,255,161,85,17,255,161,85,17,255,23,15,6,170,0, +8,10,8,5,85,129,64,16,255,161,85,17,255,161,85,17,255,15,11,6, +252,0,12,8,6,5,167,133,66,16,255,161,85,17,255,161,85,17,255,23, +15,6,170,0,8,10,8,5,85,129,64,16,255,161,85,17,255,161,85,17, +255,31,20,8,255,5,4,4,85,0,4,5,4,4,40,17,14,10,255,200, +120,35,255,207,112,28,255,195,98,20,255,29,20,8,170,0,8,10,8,5, +85,131,65,16,255,163,86,18,255,159,81,18,255,150,76,17,255,137,70,16, +255,135,72,16,255,135,66,16,255,146,75,17,255,159,81,18,255,131,67,20, +255,42,31,17,255,10,9,7,62,0,8,5,5,4,8,26,21,15,227,137, +79,28,255,174,88,19,255,158,83,17,255,137,70,16,255,135,72,16,255,135, +66,16,255,146,75,17,255,159,81,18,255,161,85,17,255,161,85,17,255,23, +15,6,170,0,8,10,8,5,85,131,67,16,255,163,86,18,255,159,81,18, +255,17,12,6,255,0,68,2,1,1,8,7,6,4,249,137,67,16,255,165, +80,18,255,154,78,17,255,27,18,8,170,0,16,8,6,5,167,133,66,16, +255,161,85,17,255,161,85,17,255,15,11,6,252,0,16,13,11,8,170,199, +124,36,255,211,125,32,255,200,105,21,255,18,13,7,255,0,12,7,6,4, +164,133,66,16,255,161,85,17,255,161,78,17,255,19,13,6,227,0,16,8, +7,5,122,68,38,13,255,150,83,23,255,174,107,35,255,181,112,38,255,190, +117,39,255,193,114,36,255,143,84,26,255,15,12,8,212,4,4,3,6,0, +12,10,8,5,108,135,66,16,255,161,85,17,255,161,85,17,255,125,65,16, +255,90,47,13,255,121,60,16,255,164,84,19,255,189,97,22,255,177,104,32, +255,194,123,39,255,212,134,41,255,210,124,31,255,200,105,21,255,23,17,8, +218,0,16,10,8,5,167,56,31,11,255,110,55,15,255,118,62,17,255,115, +58,16,255,115,58,16,255,120,63,17,255,95,46,14,255,17,13,6,227,7, +6,4,28,0,16,14,12,7,227,87,43,14,255,154,78,17,255,152,77,17, +255,139,71,16,255,135,72,16,255,135,66,16,255,146,75,17,255,200,105,21, +255,211,127,36,255,214,134,39,255,23,18,12,255,0,12,7,6,4,85,26, +16,7,255,131,67,16,255,145,75,18,255,78,43,15,255,7,6,4,255,0, +40,10,8,5,136,157,81,20,255,210,129,33,255,139,89,36,255,10,9,7, +198,0,16,13,11,8,170,196,113,31,255,206,114,25,255,189,92,20,255,18, +13,7,244,0,16,5,4,4,88,27,19,8,255,141,73,18,255,161,85,17, +255,21,14,6,218,0,112,12,9,7,99,11,8,6,170,10,8,5,91,0, +60,11,10,8,28,32,23,13,227,108,57,19,255,153,82,18,255,154,78,17, +255,146,75,17,255,97,47,14,255,36,24,11,255,108,64,25,255,203,111,30, +255,207,118,32,255,207,118,32,255,189,110,32,255,63,41,20,255,15,12,8, +76,0,8,9,8,6,28,38,27,15,218,51,33,18,255,48,32,17,255,131, +74,24,255,182,97,21,255,176,89,19,255,170,87,19,255,134,72,21,255,37, +25,14,255,15,13,8,144,7,7,6,28,0,12,11,9,8,127,171,99,28, +255,208,123,31,255,203,124,30,255,104,63,27,255,15,13,10,212,7,6,6, +28,0,12,14,11,7,170,142,74,19,255,161,85,17,255,159,81,18,255,27, +18,8,184,0,8,6,5,3,28,27,17,8,227,92,46,13,255,111,55,14, +255,31,20,8,255,8,6,3,198,9,7,4,170,10,8,5,227,22,16,9, +255,61,39,18,255,107,64,26,255,108,66,25,255,32,22,11,255,9,7,6, +170,0,44,10,9,7,156,56,36,19,255,191,114,32,255,175,98,30,255,41, +27,16,255,11,9,6,57,0,12,21,15,10,227,100,56,21,255,160,83,21, +255,80,44,17,255,14,12,7,190,7,6,6,28,0,16,13,10,6,28,29, +20,10,212,21,15,10,144,0,20,12,9,7,85,39,24,10,173,16,12,7, +85,0,32,6,5,3,20,19,13,6,173,21,14,6,255,21,15,6,215,10, +8,5,85,0,24,15,12,8,170,190,98,23,255,203,108,24,255,202,111,23, +255,23,17,10,255,0,60,17,13,10,170,195,112,30,255,211,124,30,255,205, +106,26,255,31,21,12,255,0,12,8,6,5,139,44,25,9,255,135,72,16, +255,104,54,13,255,15,11,6,249,7,6,4,28,0,24,7,6,4,57,44, +25,9,255,137,73,16,255,143,70,16,255,49,25,8,255,8,6,3,184,8, +6,3,85,8,6,3,142,23,16,6,255,130,66,15,255,145,77,16,255,87, +44,12,255,10,8,5,142,0,20,11,9,8,164,53,31,14,255,150,74,19, +255,154,78,17,255,148,76,17,255,65,33,10,255,10,8,5,184,6,5,5, +28,0,16,11,9,6,142,175,102,30,255,207,123,32,255,208,114,31,255,196, +114,33,255,89,56,26,255,17,13,10,255,11,8,6,170,9,7,6,170,11, +8,6,170,15,11,8,170,18,13,9,142,8,6,5,28,0,8,10,8,5, +93,102,53,17,255,159,81,18,255,154,78,17,255,72,37,11,255,11,8,6, +227,9,7,6,170,11,8,6,198,61,36,20,255,196,107,27,255,204,114,27, +255,182,102,31,255,19,14,10,170,0,8,6,6,5,20,26,19,11,198,28, +20,11,255,22,16,9,255,23,16,8,255,27,18,8,255,24,16,7,255,24, +16,7,255,74,39,11,255,139,68,16,255,143,70,16,255,143,70,16,255,20, +13,5,170,0,8,7,6,4,74,87,44,12,255,155,79,18,255,151,73,16, +255,67,34,10,255,9,7,4,198,9,7,4,96,8,6,5,159,27,17,8, +255,137,67,16,255,158,80,17,255,112,56,15,255,10,8,5,167,0,8,7, +5,4,85,74,36,11,255,150,83,17,255,145,77,16,255,55,29,10,255,8, +6,3,198,8,6,3,88,7,6,4,153,39,24,12,255,199,112,28,255,210, +115,31,255,184,108,33,255,17,14,10,198,0,24,11,9,6,170,139,69,18, +255,168,86,19,255,154,78,17,255,17,12,6,235,0,24,7,6,4,85,64, +32,11,255,162,80,19,255,198,96,21,255,109,63,26,255,15,11,8,227,10, +8,7,170,8,7,5,195,29,18,8,255,137,67,16,255,154,78,17,255,114, +59,15,255,11,10,6,164,0,8,9,7,6,85,97,50,16,255,159,81,18, +255,152,77,17,255,74,36,11,255,10,8,5,198,7,6,4,125,10,8,5, +198,61,36,20,255,200,105,29,255,209,122,28,255,180,104,29,255,16,12,9, +170,0,8,12,10,7,170,160,83,21,255,183,89,19,255,174,88,19,255,28, +19,9,187,0,8,14,10,7,85,143,75,20,255,195,98,20,255,189,92,20, +255,21,15,8,224,0,24,7,6,4,85,26,16,7,255,111,55,14,255,132, +67,15,255,39,23,8,255,8,6,3,113,0,68,9,7,6,85,32,22,13, +255,188,112,31,255,193,114,30,255,94,57,25,255,17,13,10,170,0,44,9, +7,4,142,10,8,5,255,10,8,5,198,6,5,3,28,0,24,8,7,5, +85,88,48,19,255,204,114,27,255,208,118,31,255,111,62,26,255,11,8,6, +227,8,7,5,150,10,8,5,116,10,8,5,88,9,7,4,85,6,5,3, +74,0,16,10,8,5,99,114,56,13,255,143,70,16,255,143,70,16,255,18, +12,5,215,0,12,8,7,3,130,118,60,13,255,148,76,17,255,150,76,17, +255,24,16,7,170,0,8,9,7,4,85,114,56,13,255,145,74,16,255,143, +70,16,255,52,28,9,255,8,6,3,198,8,6,3,88,8,6,3,144,23, +15,6,255,130,66,15,255,151,80,16,255,111,55,14,255,10,8,5,144,0, +8,6,5,3,59,59,32,10,255,157,83,18,255,185,90,20,255,97,54,22, +255,14,10,7,227,13,10,6,170,13,10,6,255,84,41,13,255,148,76,17, +255,155,82,18,255,135,66,16,255,14,10,5,159,0,8,9,7,4,85,114, +56,13,255,145,77,16,255,145,74,16,255,55,28,10,255,9,7,4,198,8, +6,3,93,8,6,3,147,25,16,6,255,130,64,15,255,151,80,16,255,111, +55,14,255,10,8,5,142,0,8,9,7,4,85,114,56,13,255,145,77,16, +255,143,70,16,255,52,28,9,255,8,6,3,198,8,6,3,102,8,6,3, +139,8,6,3,170,9,8,4,113,0,12,10,8,5,91,114,56,13,255,150, +76,17,255,150,76,17,255,17,12,6,252,0,32,7,6,4,85,64,33,11, +255,145,77,16,255,143,70,16,255,56,29,9,255,8,6,3,198,8,6,3, +85,6,5,3,119,14,11,5,255,128,66,15,255,151,73,16,255,143,76,16, +255,20,13,5,170,0,8,9,7,4,85,114,56,13,255,143,70,16,255,143, +70,16,255,18,12,5,215,0,12,8,7,3,130,114,56,13,255,143,70,16, +255,143,70,16,255,20,13,5,170,0,8,9,7,4,85,114,56,13,255,143, +70,16,255,143,70,16,255,20,13,5,170,0,8,7,6,4,71,87,44,12, +255,158,87,17,255,161,85,17,255,103,53,20,255,15,11,8,227,10,8,7, +170,10,8,7,195,33,20,10,255,137,67,16,255,151,73,16,255,111,55,14, +255,10,8,5,142,0,8,9,7,4,85,114,56,13,255,143,70,16,255,146, +75,17,255,18,13,7,255,0,8,7,6,6,74,24,16,7,255,132,67,15, +255,145,77,16,255,135,72,16,255,14,10,5,170,0,8,9,7,4,85,114, +56,13,255,145,77,16,255,143,70,16,255,58,31,11,255,11,8,6,227,11, +9,6,170,11,8,6,170,10,7,5,170,9,8,4,113,0,12,11,9,6, +161,175,92,24,255,203,108,24,255,198,101,23,255,25,18,10,255,0,20,8, +6,3,147,114,56,13,255,143,70,16,255,143,70,16,255,20,13,5,170,0, +8,9,7,4,85,114,56,13,255,170,87,19,255,199,106,24,255,24,17,11, +255,0,8,6,6,5,28,15,12,6,255,128,66,15,255,145,74,16,255,143, +70,16,255,20,13,5,170,0,8,6,5,3,57,57,31,10,255,145,77,16, +255,143,70,16,255,90,44,13,255,19,13,6,255,10,8,5,255,13,10,6, +255,62,33,11,255,135,72,16,255,151,73,16,255,108,53,13,255,10,8,5, +142,0,8,9,7,4,85,114,56,13,255,143,70,16,255,143,70,16,255,18, +12,5,215,0,40,7,6,4,85,64,33,11,255,145,77,16,255,143,70,16, +255,67,34,10,255,14,10,5,255,49,27,9,255,140,72,17,255,160,85,19, +255,160,85,19,255,110,55,15,255,31,20,8,255,9,7,4,57,0,8,9, +8,4,85,114,56,13,255,143,70,16,255,143,70,16,255,18,12,5,215,0, +12,8,7,3,136,118,60,13,255,154,75,17,255,172,87,19,255,24,17,9, +204,0,8,8,7,5,85,95,49,16,255,161,85,17,255,152,77,17,255,71, +34,10,255,9,7,4,198,8,6,3,88,8,6,3,142,23,15,6,255,130, +66,15,255,151,80,16,255,111,55,14,255,14,10,5,170,0,24,9,7,4, +164,118,56,15,255,145,74,16,255,143,70,16,255,16,12,5,224,0,24,9, +7,4,85,85,43,12,255,151,80,16,255,143,70,16,255,55,29,10,255,8, +6,3,198,8,6,3,93,8,6,5,173,45,27,14,255,199,112,28,255,210, +124,31,255,199,119,34,255,19,15,10,221,0,20,13,11,8,170,46,28,11, +255,131,65,16,255,145,74,16,255,137,67,16,255,70,35,11,255,12,10,5, +224,7,6,4,28,0,16,8,6,5,34,37,25,14,255,181,100,28,255,206, +113,31,255,207,123,32,255,199,119,34,255,107,67,28,255,28,20,11,255,28, +19,9,255,84,41,13,255,141,75,16,255,145,74,16,255,159,82,20,255,88, +53,25,255,13,11,8,99,0,8,13,10,6,85,114,60,17,255,148,76,17, +255,143,70,16,255,21,14,6,255,0,12,10,8,5,170,119,61,14,255,145, +77,16,255,135,72,16,255,19,13,6,170,0,24,8,7,3,142,114,56,13, +255,143,70,16,255,143,70,16,255,16,12,5,218,0,24,11,8,6,170,126, +62,15,255,151,80,16,255,112,57,13,255,19,13,6,255,8,6,3,144,8, +6,3,85,9,7,4,113,8,6,3,167,8,6,3,170,8,6,3,170,9, +8,4,113,0,12,10,8,5,91,114,56,13,255,145,74,16,255,143,70,16, +255,61,32,10,255,9,8,4,170,0,32,12,10,7,207,74,36,11,255,139, +74,16,255,79,40,12,255,10,8,5,210,0,16,9,7,4,85,27,17,6, +255,130,66,15,255,143,70,16,255,143,76,16,255,16,12,5,221,0,140,8, +6,3,85,74,39,11,255,145,77,16,255,143,70,16,255,41,23,8,255,7, +6,4,173,5,5,2,85,6,5,3,113,14,10,5,255,129,65,14,255,145, +74,16,255,145,74,16,255,24,16,7,170,0,8,10,8,5,85,112,57,13, +255,145,77,16,255,143,70,16,255,52,28,9,255,8,6,3,198,8,6,3, +88,8,6,3,144,23,15,6,255,130,66,15,255,151,80,16,255,111,55,14, +255,10,8,5,144,0,8,6,5,3,59,63,34,10,255,145,77,16,255,143, +70,16,255,55,29,10,255,8,6,3,198,8,6,3,85,8,6,3,144,32, +19,7,255,139,74,16,255,155,79,18,255,135,66,16,255,14,10,5,170,0, +8,6,5,3,57,57,31,10,255,145,77,16,255,143,70,16,255,55,29,10, +255,8,6,3,198,8,6,3,88,8,6,3,144,21,15,6,255,130,66,15, +255,143,76,16,255,146,75,17,255,24,15,7,184,0,8,7,6,4,71,66, +33,11,255,148,79,17,255,143,70,16,255,45,25,8,255,7,5,4,176,7, +5,4,85,8,6,3,85,9,7,4,85,8,6,3,82,0,28,8,7,3, +136,114,56,13,255,143,70,16,255,143,70,16,255,16,12,5,221,0,20,7, +6,4,28,10,8,5,130,19,13,6,170,29,19,8,173,24,16,7,212,27, +18,8,193,20,13,7,246,55,29,10,255,139,74,16,255,143,70,16,255,143, +70,16,255,18,13,5,170,0,8,9,7,4,85,115,54,14,255,143,70,16, +255,143,70,16,255,16,12,5,221,0,12,8,7,3,136,114,56,13,255,143, +70,16,255,143,70,16,255,20,13,5,170,0,8,9,7,4,85,114,56,13, +255,145,74,16,255,145,74,16,255,17,11,6,252,0,24,10,8,5,170,119, +61,14,255,145,74,16,255,143,70,16,255,18,13,5,170,0,8,9,7,4, +85,114,56,13,255,143,70,16,255,143,70,16,255,33,20,8,255,5,4,4, +195,8,6,5,198,46,26,9,255,126,62,15,255,132,67,15,255,35,22,8, +255,9,7,4,93,0,12,10,8,5,93,114,56,13,255,143,70,16,255,143, +70,16,255,20,13,5,170,0,8,9,7,4,85,114,56,13,255,143,70,16, +255,143,70,16,255,20,13,5,170,0,4,9,7,4,125,114,56,13,255,21, +13,6,210,0,4,9,7,4,85,114,56,13,255,143,70,16,255,143,70,16, +255,20,13,5,170,0,8,9,7,4,85,114,56,13,255,143,70,16,255,143, +70,16,255,16,12,5,221,0,12,8,7,3,136,114,56,13,255,143,70,16, +255,143,70,16,255,20,13,5,170,0,8,6,5,3,57,57,31,10,255,145, +77,16,255,143,70,16,255,90,44,13,255,17,12,6,255,12,9,5,255,20, +15,9,255,97,51,20,255,169,87,20,255,161,85,17,255,112,54,15,255,10, +8,5,142,0,8,9,7,4,85,121,60,16,255,174,88,19,255,176,89,19, +255,112,59,17,255,37,23,10,255,26,16,7,255,25,18,8,255,24,15,7, +255,23,16,8,255,18,13,9,198,10,9,7,99,0,16,9,8,6,34,12, +10,7,167,20,14,7,210,21,15,6,255,26,17,7,255,24,16,7,255,26, +17,7,255,70,35,11,255,142,73,17,255,148,76,17,255,152,77,17,255,24, +15,7,170,0,8,13,10,6,96,129,65,18,255,170,87,19,255,170,87,19, +255,24,16,9,255,0,48,5,4,2,76,8,6,3,85,8,6,3,85,8, +6,3,85,7,5,4,85,6,5,3,119,16,11,5,255,129,65,14,255,151, +73,16,255,118,61,15,255,14,10,5,170,0,16,8,7,3,136,114,56,13, +255,143,70,16,255,143,70,16,255,16,12,5,221,0,16,10,8,7,113,109, +67,26,255,184,90,21,255,148,76,17,255,52,28,9,255,8,6,3,198,8, +6,3,88,8,6,3,144,21,15,6,255,130,66,15,255,143,76,16,255,143, +76,16,255,16,12,5,227,0,20,9,8,6,170,67,42,20,255,202,124,31, +255,208,128,33,255,205,106,26,255,104,58,21,255,14,11,7,218,6,5,5, +28,0,16,7,6,4,28,27,17,8,229,102,51,13,255,139,68,16,255,143, +73,16,255,145,74,16,255,71,37,12,255,26,18,9,255,80,50,23,255,204, +122,33,255,208,115,33,255,202,104,25,255,149,78,20,255,52,30,11,255,10, +8,5,85,0,12,14,10,5,170,85,43,12,255,137,73,16,255,77,39,12, +255,14,10,5,227,10,8,5,170,10,8,5,198,46,26,9,255,137,73,16, +255,115,59,14,255,25,16,6,232,8,6,3,31,0,12,6,5,3,28,10, +8,5,119,19,13,6,170,29,19,8,173,26,16,7,210,27,18,8,187,17, +12,6,246,58,30,11,255,151,77,18,255,192,97,21,255,192,97,21,255,24, +16,9,207,0,8,4,4,3,3,25,16,6,235,115,59,14,255,143,73,16, +255,145,77,16,255,108,53,13,255,21,14,6,255,7,6,4,164,10,7,5, +85,8,7,5,147,9,7,4,136,8,6,5,76,0,20,8,6,5,57,58, +33,13,255,188,107,27,255,192,111,31,255,85,51,24,255,18,13,9,187,6, +5,5,20,0,8,11,9,6,156,139,69,18,255,158,83,17,255,148,76,17, +255,23,15,6,170,0,12,9,7,4,85,19,13,6,255,102,51,13,255,128, +66,15,255,81,41,12,255,12,9,5,142,0,108,13,10,8,85,115,60,24, +255,162,75,23,255,121,60,20,255,23,15,8,142,0,60,3,3,2,6,10, +8,5,170,93,48,12,255,123,65,14,255,123,60,14,255,14,10,5,227,3, +3,2,85,12,10,7,170,163,83,24,255,199,99,26,255,193,96,24,255,41, +26,14,227,6,6,5,45,0,24,3,3,2,28,11,8,6,170,106,50,13, +255,129,63,14,255,129,63,14,255,29,18,8,227,6,5,5,31,0,20,13, +10,8,136,144,73,21,255,182,89,21,255,99,55,19,255,14,11,7,187,4, +4,3,3,0,16,9,7,4,113,93,46,12,255,131,66,14,255,121,62,14, +255,16,11,5,170,0,12,7,6,4,28,14,10,5,227,100,50,13,255,110, +59,13,255,103,52,14,255,121,59,18,255,134,69,21,255,32,21,11,255,6, +5,5,198,10,8,7,227,46,28,13,255,104,51,15,255,96,46,13,255,14, +10,5,139,0,44,10,8,7,108,63,37,18,255,176,88,23,255,160,80,21, +255,20,14,9,170,0,8,8,6,5,79,85,41,12,255,131,65,16,255,66, +34,11,255,10,8,5,170,0,144,9,7,4,167,115,56,16,255,165,85,20, +255,112,65,23,255,18,13,9,142,0,60,13,10,8,142,132,68,21,255,162, +80,19,255,141,70,18,255,17,12,6,181,0,12,17,12,6,255,103,54,14, +255,130,66,15,255,31,20,8,255,6,5,3,113,0,32,8,6,3,156,35, +22,8,255,114,58,13,255,110,59,13,255,88,45,11,255,88,42,11,255,92, +47,11,255,104,54,13,255,119,58,14,255,61,32,10,255,10,8,5,224,5, +4,4,20,0,16,11,8,6,85,113,58,22,255,180,90,23,255,140,69,17, +255,123,63,14,255,123,60,14,255,119,56,14,255,120,61,17,255,24,15,9, +167,0,16,12,10,7,133,180,88,27,255,203,107,30,255,199,100,28,255,197, +104,28,255,191,93,28,255,167,78,24,255,132,68,21,255,121,62,18,255,117, +60,18,255,118,57,17,255,108,50,15,255,17,12,6,113,0,12,14,10,5, +227,65,33,10,255,115,59,14,255,115,59,14,255,109,52,14,255,116,57,17, +255,121,59,18,255,139,68,20,255,154,73,19,255,115,62,20,255,33,23,12, +255,9,8,6,71,0,36,2,2,1,8,8,6,3,170,93,50,12,255,125, +64,14,255,123,60,14,255,14,10,5,159,0,12,14,10,5,224,65,33,10, +255,115,59,14,255,115,59,14,255,109,52,14,255,119,61,18,255,129,66,20, +255,148,75,21,255,170,84,21,255,129,67,22,255,37,25,14,255,8,7,5, +57,0,8,5,5,4,23,24,17,9,255,103,54,18,255,132,63,17,255,120, +62,15,255,98,49,13,255,90,45,11,255,94,45,13,255,124,60,17,255,172, +81,21,255,150,78,25,255,44,29,17,255,9,8,6,91,0,24,8,7,3, +102,93,46,12,255,125,64,14,255,121,62,14,255,18,12,5,170,0,28,12, +10,5,227,64,33,11,255,132,66,17,255,158,79,21,255,151,70,22,255,130, +67,21,255,110,53,15,255,108,53,13,255,118,60,13,255,85,43,12,255,21, +14,6,255,7,6,4,57,0,12,14,10,5,227,65,33,10,255,131,65,16, +255,149,72,20,255,133,68,20,255,111,54,16,255,110,53,15,255,138,72,19, +255,163,81,20,255,112,58,19,255,28,20,9,255,8,7,5,57,0,8,9, +7,4,91,96,48,13,255,132,70,15,255,123,60,14,255,14,10,5,161,0, +8,13,10,6,85,148,73,23,255,202,101,27,255,129,67,26,255,18,13,9, +142,0,28,6,5,3,48,17,12,6,227,108,55,13,255,112,55,13,255,35, +22,8,255,9,7,4,57,0,64,32,22,13,255,137,68,22,255,154,73,19, +255,45,26,10,255,8,6,5,144,0,44,8,6,3,68,67,34,10,255,115, +56,16,255,109,52,14,255,16,11,5,147,0,24,5,4,4,11,22,17,11, +227,129,76,28,255,195,95,28,255,186,84,23,255,121,59,18,255,107,51,14, +255,96,46,13,255,90,45,11,255,88,45,11,255,41,24,8,255,12,10,5, +176,0,12,8,6,3,76,88,44,11,255,125,66,14,255,123,60,14,255,18, +12,5,170,0,12,9,7,4,85,92,47,11,255,125,64,14,255,123,60,14, +255,16,11,5,150,0,8,8,6,3,62,88,45,11,255,125,64,14,255,123, +60,14,255,114,58,13,255,93,50,12,255,88,44,11,255,92,47,11,255,104, +54,13,255,119,58,14,255,85,43,12,255,21,15,6,255,7,6,4,51,0, +12,12,10,5,221,61,32,10,255,120,62,15,255,123,61,16,255,109,52,14, +255,96,46,13,255,102,51,13,255,115,59,14,255,123,65,14,255,85,43,12, +255,25,16,6,255,7,6,4,51,0,8,8,6,3,74,88,45,11,255,125, +64,14,255,123,60,14,255,114,58,13,255,93,50,12,255,88,45,11,255,92, +47,11,255,104,52,13,255,118,60,13,255,85,43,12,255,21,15,6,255,7, +5,4,40,0,8,8,6,3,74,88,45,11,255,125,64,14,255,123,60,14, +255,114,58,13,255,93,50,12,255,88,45,11,255,92,43,11,255,93,50,12, +255,93,50,12,255,20,13,5,85,0,8,8,6,3,65,88,45,11,255,125, +64,14,255,121,62,14,255,18,13,5,170,0,36,12,10,5,227,59,31,10, +255,115,62,14,255,114,58,13,255,93,50,12,255,88,44,11,255,88,44,11, +255,104,54,13,255,118,60,13,255,123,60,14,255,123,60,14,255,14,10,5, +150,0,8,8,6,3,65,88,45,11,255,125,66,14,255,123,60,14,255,18, +12,5,170,0,12,9,7,4,85,92,47,11,255,125,66,14,255,123,65,14, +255,14,10,5,150,0,8,8,6,3,65,88,45,11,255,125,66,14,255,123, +65,14,255,14,10,5,159,0,12,14,10,5,221,70,35,11,255,155,74,20, +255,193,89,26,255,185,91,28,255,172,85,27,255,165,80,24,255,155,78,22, +255,132,66,17,255,90,44,13,255,21,15,6,255,7,5,4,40,0,8,8, +6,3,74,88,45,11,255,125,64,14,255,121,62,14,255,19,13,6,176,0, +12,9,6,4,133,93,50,12,255,131,66,14,255,123,65,14,255,14,11,5, +150,0,8,8,6,3,62,88,45,11,255,125,64,14,255,123,60,14,255,118, +56,15,255,120,61,17,255,136,67,21,255,118,57,17,255,96,48,13,255,92, +47,11,255,18,12,5,85,0,8,9,7,4,79,104,51,15,255,140,66,17, +255,135,66,16,255,17,12,6,198,0,20,9,7,4,85,92,47,11,255,125, +66,14,255,123,65,14,255,14,10,5,150,0,8,8,6,3,65,88,45,11, +255,135,66,16,255,136,67,17,255,22,14,7,198,0,12,8,6,3,119,88, +45,11,255,125,64,14,255,123,60,14,255,14,10,5,159,0,12,12,10,5, +210,59,31,10,255,115,62,14,255,118,60,13,255,104,54,13,255,100,50,13, +255,100,50,13,255,114,58,13,255,119,63,14,255,85,43,12,255,21,15,6, +255,7,5,4,40,0,8,8,6,3,74,88,45,11,255,125,66,14,255,123, +60,14,255,18,12,5,170,0,44,12,10,5,227,59,31,10,255,115,62,14, +255,114,58,13,255,100,50,13,255,114,56,13,255,133,66,16,255,160,80,21, +255,176,83,21,255,45,27,12,255,6,5,3,170,0,12,8,6,3,82,88, +45,11,255,125,66,14,255,123,60,14,255,18,12,5,170,0,12,9,7,4, +85,92,47,11,255,131,61,14,255,126,62,15,255,17,11,6,170,0,12,14, +10,5,227,65,33,10,255,115,59,14,255,115,62,14,255,93,50,12,255,88, +44,11,255,92,47,11,255,104,54,13,255,119,58,14,255,85,43,12,255,21, +15,6,255,7,6,4,57,0,24,9,7,4,85,92,47,11,255,125,66,14, +255,123,60,14,255,18,12,5,170,0,24,5,5,4,28,19,13,6,255,84, +42,11,255,115,62,14,255,110,59,13,255,93,50,12,255,84,44,11,255,106, +54,15,255,176,84,23,255,199,100,28,255,188,101,31,255,90,54,25,255,13, +10,8,142,0,24,8,6,3,164,72,37,11,255,131,66,14,255,110,54,13, +255,12,9,5,224,3,3,2,17,0,24,7,6,6,85,30,20,13,255,190, +96,27,255,199,98,24,255,121,69,22,255,13,10,6,190,4,3,3,28,5, +4,2,105,27,17,6,255,114,56,13,255,125,64,14,255,45,26,10,255,8, +7,5,153,0,12,10,7,5,85,96,48,13,255,125,64,14,255,123,60,14, +255,16,11,5,195,0,12,8,6,3,110,92,47,11,255,131,66,14,255,123, +65,14,255,18,13,5,170,0,24,9,7,4,85,92,47,11,255,125,66,14, +255,123,60,14,255,18,12,5,170,0,24,8,7,3,99,93,50,12,255,125, +66,14,255,115,59,14,255,104,54,13,255,88,45,11,255,88,44,11,255,92, +43,11,255,92,43,11,255,92,43,11,255,93,50,12,255,93,50,12,255,20, +13,5,85,0,8,8,6,3,65,88,45,11,255,125,64,14,255,123,60,14, +255,115,62,14,255,93,46,12,255,16,11,5,127,0,28,5,4,4,28,12, +10,5,246,104,54,13,255,115,59,14,255,39,23,8,255,8,6,3,82,0, +12,58,31,9,255,114,58,13,255,119,63,14,255,123,60,14,255,123,65,14, +255,18,12,5,170,0,144,14,10,5,227,59,31,10,255,115,62,14,255,110, +59,13,255,88,44,11,255,80,42,11,255,88,44,11,255,104,54,13,255,115, +59,14,255,123,60,14,255,123,60,14,255,16,11,5,150,0,8,8,6,3, +65,88,44,11,255,125,64,14,255,123,60,14,255,114,58,13,255,93,50,12, +255,88,44,11,255,92,47,11,255,104,54,13,255,119,58,14,255,85,43,12, +255,21,15,6,255,7,6,4,51,0,12,12,9,5,224,63,32,10,255,115, +62,14,255,114,56,13,255,93,50,12,255,88,44,11,255,88,45,11,255,110, +59,13,255,119,61,14,255,85,43,12,255,25,16,6,255,7,6,4,57,0, +12,12,10,5,221,59,31,10,255,115,62,14,255,114,56,13,255,93,50,12, +255,88,44,11,255,92,47,11,255,104,54,13,255,115,59,14,255,123,60,14, +255,121,62,14,255,16,11,5,167,0,12,12,10,5,218,59,31,10,255,115, +62,14,255,110,59,13,255,88,44,11,255,80,42,11,255,88,44,11,255,88, +45,11,255,88,44,11,255,16,11,5,105,0,24,9,7,4,85,92,47,11, +255,125,66,14,255,123,60,14,255,18,12,5,170,0,48,7,5,4,198,93, +50,12,255,125,66,14,255,123,60,14,255,12,10,5,170,0,8,8,6,3, +65,88,45,11,255,125,66,14,255,123,65,14,255,18,12,5,170,0,12,9, +7,4,85,92,47,11,255,125,66,14,255,123,65,14,255,14,10,5,150,0, +8,8,6,3,65,88,45,11,255,125,66,14,255,123,60,14,255,18,13,5, +170,0,20,3,3,2,11,9,7,4,227,100,50,13,255,123,60,14,255,123, +60,14,255,12,10,5,170,0,8,8,6,3,62,88,45,11,255,125,66,14, +255,123,60,14,255,14,10,5,198,0,8,8,6,3,170,35,22,8,255,115, +59,14,255,112,55,13,255,33,21,8,255,8,6,3,37,0,8,8,6,3, +74,88,45,11,255,125,66,14,255,123,65,14,255,14,10,5,150,0,8,8, +6,3,65,88,45,11,255,125,66,14,255,123,65,14,255,14,11,5,147,0, +4,9,7,4,85,92,47,11,255,20,13,5,170,0,4,8,6,3,62,88, +45,11,255,125,66,14,255,123,65,14,255,14,10,5,150,0,8,8,6,3, +65,88,45,11,255,125,66,14,255,123,60,14,255,18,12,5,170,0,12,9, +7,4,85,92,47,11,255,125,66,14,255,123,60,14,255,14,10,5,159,0, +12,12,10,5,210,59,31,10,255,115,59,14,255,118,60,13,255,104,54,13, +255,102,51,13,255,112,53,13,255,122,63,15,255,123,58,14,255,85,43,12, +255,21,15,6,255,7,5,4,45,0,8,8,6,3,85,113,55,16,255,196, +92,23,255,195,96,24,255,25,17,10,255,4,3,3,79,0,64,3,2,2, +28,10,8,5,227,138,71,21,255,177,87,20,255,174,86,21,255,24,16,9, +170,0,8,13,10,8,85,142,73,23,255,195,96,24,255,194,91,23,255,24, +17,11,227,0,44,12,9,5,150,35,22,8,255,80,42,11,255,84,44,11, +255,88,44,11,255,80,42,11,255,88,44,11,255,97,50,12,255,118,60,13, +255,85,43,12,255,21,15,6,255,8,6,3,57,0,16,9,7,4,85,92, +47,11,255,125,66,14,255,123,60,14,255,18,12,5,170,0,16,6,5,5, +28,17,13,8,227,68,34,11,255,115,59,14,255,110,59,13,255,93,50,12, +255,88,44,11,255,92,47,11,255,104,54,13,255,115,59,14,255,123,60,14, +255,123,65,14,255,18,12,5,170,0,24,12,9,7,170,131,69,24,255,191, +90,22,255,136,71,19,255,15,11,6,227,4,3,3,17,0,24,7,6,4, +31,16,11,5,227,104,52,13,255,131,66,14,255,98,49,13,255,10,8,5, +193,3,2,2,68,8,7,5,170,121,66,26,255,195,96,24,255,156,74,19, +255,34,21,9,255,9,7,4,85,0,12,8,6,3,51,69,35,10,255,121, +62,14,255,123,60,14,255,16,11,5,227,4,3,3,28,0,8,8,6,3, +170,92,47,11,255,125,64,14,255,108,55,13,255,14,10,5,164,0,40,7, +5,4,198,96,48,13,255,134,65,15,255,133,66,16,255,15,11,6,170,0, +8,7,5,4,85,78,39,11,255,130,64,15,255,130,64,15,255,134,65,15, +255,136,67,17,255,124,62,17,255,114,56,17,255,113,55,16,255,118,60,17, +255,107,55,20,255,48,29,15,255,12,10,7,85,0,20,9,8,6,170,45, +27,12,255,139,70,20,255,131,66,18,255,107,53,14,255,19,13,6,99,0, +8,8,6,5,85,92,46,13,255,131,61,14,255,125,64,14,255,14,10,5, +170,0,12,58,31,9,255,110,59,13,255,115,59,14,255,56,29,9,255,10, +8,5,227,5,4,4,23,0,108,10,8,7,28,28,18,11,212,49,28,16, +255,35,21,12,241,13,10,6,85,0,68,14,10,5,142,20,14,5,170,16, +12,5,164,8,6,3,28,0,8,24,16,9,142,21,15,8,252,23,15,8, +184,11,8,6,34,0,36,14,10,5,142,20,14,5,170,16,11,5,170,10, +8,5,28,0,24,7,6,4,25,20,13,7,147,22,15,7,170,10,8,5, +142,5,4,4,3,0,24,14,10,5,142,20,13,5,170,16,11,5,170,9, +7,4,28,0,16,7,5,4,28,14,10,5,156,14,10,5,229,24,15,9, +255,32,20,11,255,28,18,11,244,12,9,7,108,0,8,10,8,5,142,19, +13,8,235,24,15,7,227,10,8,5,59,0,48,10,8,5,93,23,15,8, +170,28,18,9,173,15,11,6,28,0,12,18,12,5,142,21,14,6,170,9, +7,4,133,0,148,8,6,5,113,89,44,14,255,100,51,21,255,13,10,8, +227,6,5,5,28,0,60,6,5,5,8,17,12,6,142,26,16,7,170,18, +12,5,170,9,7,4,28,0,8,6,5,3,85,54,28,11,255,136,66,19, +255,121,59,18,255,15,10,6,241,0,40,8,6,3,57,12,9,5,170,18, +13,5,178,14,10,5,241,14,10,5,255,14,10,5,252,16,11,5,195,16, +11,5,170,8,6,3,113,0,24,8,6,5,28,24,16,9,204,24,17,9, +255,17,12,6,210,14,10,5,170,16,11,5,170,17,11,6,246,27,17,10, +246,14,10,7,85,0,16,8,6,5,28,21,14,10,195,22,15,11,255,18, +13,9,255,18,13,9,255,22,15,9,255,19,13,8,255,17,12,6,255,17, +11,6,255,15,11,6,255,17,12,6,255,19,13,6,204,12,9,5,28,0, +12,5,4,2,25,8,6,3,122,14,10,5,170,18,13,5,176,14,10,5, +235,15,11,6,255,15,11,6,255,19,12,6,204,19,13,6,170,10,8,5, +170,8,6,5,57,0,48,14,10,5,142,21,13,6,170,16,11,5,170,9, +7,4,28,0,12,5,4,2,25,8,6,3,125,14,10,5,170,14,10,5, +210,23,15,8,255,30,20,11,255,30,20,11,255,23,17,10,255,20,14,9, +244,16,12,9,170,9,8,6,79,0,16,9,7,6,65,15,11,8,170,17, +12,8,232,21,14,8,255,26,16,9,255,23,15,8,255,21,14,8,255,15, +11,6,255,22,15,7,178,11,9,6,170,10,8,7,57,0,32,12,10,5, +142,20,13,5,170,16,11,5,170,9,7,4,28,0,28,5,5,4,28,8, +6,3,133,15,11,6,193,20,15,9,255,28,18,11,255,30,20,11,255,26, +16,9,255,14,10,5,238,16,11,5,170,9,7,4,153,7,5,4,57,0, +16,5,4,2,28,8,6,3,142,18,12,7,207,22,15,9,255,28,18,11, +255,27,18,10,255,18,13,7,255,15,11,6,227,21,13,6,170,10,7,5, +164,7,6,4,57,0,16,14,10,5,142,20,13,5,170,16,12,5,170,9, +7,4,28,0,8,10,8,7,119,149,64,26,255,131,63,26,255,14,11,7, +227,6,5,5,28,0,32,7,5,4,28,14,10,5,156,20,13,5,170,12, +9,5,142,6,5,3,6,0,64,12,10,7,142,24,15,7,170,21,13,6, +170,8,6,3,76,0,48,9,7,6,85,83,43,16,255,176,88,23,255,130, +62,21,255,16,11,7,170,0,28,9,8,6,28,13,10,8,164,23,16,10, +190,16,11,7,252,15,11,6,255,14,10,5,255,14,10,5,255,14,10,5, +255,16,11,5,232,14,10,5,170,8,6,3,85,0,16,14,10,5,142,21, +13,6,170,16,11,5,170,9,7,4,28,0,16,14,10,5,142,20,13,5, +170,16,11,5,170,9,7,4,28,0,12,14,10,5,136,16,12,5,170,16, +11,5,170,18,12,5,170,16,11,5,210,14,10,5,255,14,10,5,249,16, +12,5,193,16,11,5,170,9,7,4,153,7,5,4,57,0,16,5,5,4, +28,8,6,3,125,14,10,5,170,18,12,5,176,14,10,5,238,14,10,5, +246,16,12,5,195,18,13,5,170,16,11,5,170,9,7,4,150,7,5,4, +54,0,16,14,10,5,142,16,12,5,170,16,11,5,170,18,12,5,170,16, +11,5,210,14,10,5,255,14,10,5,249,16,12,5,193,16,11,5,170,9, +7,4,153,7,6,4,57,0,16,14,10,5,142,16,12,5,170,16,11,5, +170,18,12,5,170,16,11,5,210,14,10,5,252,12,9,5,255,16,11,5, +255,20,13,5,201,11,9,4,28,0,12,14,10,5,139,20,13,5,170,16, +11,5,170,9,7,4,28,0,36,5,5,4,28,8,6,3,125,14,10,5, +170,18,13,5,176,14,10,5,238,14,10,5,255,16,11,5,235,18,13,5, +173,16,11,5,170,16,12,5,170,16,11,5,164,9,7,4,28,0,12,12, +9,5,142,21,13,6,170,16,11,5,170,9,7,4,28,0,16,14,10,5, +142,20,13,5,170,16,11,5,170,9,7,4,28,0,12,12,9,5,142,21, +13,6,170,16,11,5,170,9,7,4,28,0,12,6,5,3,28,8,7,5, +139,19,13,8,193,21,15,10,255,31,21,12,255,32,21,13,255,31,20,12, +255,23,17,10,255,18,12,7,212,10,8,5,159,7,6,4,57,0,16,14, +10,5,142,21,13,6,170,16,11,5,170,9,7,4,28,0,16,14,10,5, +142,21,13,6,170,16,12,5,170,9,7,4,28,0,12,14,10,5,136,16, +12,5,170,16,11,5,170,18,12,5,176,17,12,6,252,21,14,8,255,17, +12,6,255,16,11,5,255,20,13,5,204,11,9,4,28,0,12,14,10,5, +142,21,14,6,170,18,12,5,170,9,8,4,28,0,24,14,10,5,142,20, +13,5,170,16,11,5,170,9,7,4,28,0,12,12,9,5,142,21,13,6, +170,16,12,5,170,10,8,5,28,0,16,12,9,5,142,20,13,5,170,16, +11,5,170,9,7,4,28,0,12,5,5,4,28,8,6,3,125,14,10,5, +170,18,12,5,170,20,14,5,173,16,12,5,193,20,13,5,178,20,13,5, +170,16,11,5,170,9,7,4,153,7,6,4,57,0,16,14,10,5,142,21, +13,6,170,16,11,5,170,9,7,4,28,0,44,5,5,4,28,8,6,3, +125,14,10,5,170,18,13,5,170,20,14,5,170,18,12,5,170,13,10,6, +227,72,38,19,255,185,86,32,255,144,64,29,255,20,15,11,232,8,7,7, +28,0,12,14,10,5,142,21,13,6,170,16,11,5,170,9,7,4,28,0, +16,14,10,5,142,20,13,5,170,16,11,5,170,9,7,4,28,0,12,5, +4,2,25,8,6,3,122,14,10,5,170,18,13,5,176,14,10,5,238,14, +10,5,255,14,10,5,249,16,12,5,193,16,11,5,170,9,7,4,153,7, +5,4,57,0,32,14,10,5,142,21,13,6,170,16,11,5,170,9,7,4, +28,0,28,8,6,3,57,9,7,4,164,14,10,5,170,18,13,5,173,14, +10,5,229,14,10,5,255,17,12,6,255,22,15,9,255,20,14,9,252,21, +15,10,176,11,9,6,139,0,32,11,8,4,122,18,12,5,170,14,10,5, +150,7,5,4,28,0,32,8,7,7,57,24,16,11,173,26,18,9,190,13, +10,6,142,5,4,4,11,0,8,8,7,3,68,14,10,5,170,16,11,5, +170,9,7,4,74,0,20,14,10,5,142,20,14,5,170,16,11,5,170,9, +7,4,28,0,16,14,10,5,142,20,14,5,170,16,11,5,170,9,8,4, +28,0,28,14,10,5,142,20,13,5,170,16,11,5,170,9,7,4,28,0, +28,14,10,5,142,18,13,5,170,16,12,5,170,18,13,5,173,14,10,5, +227,14,10,5,255,14,10,5,252,12,9,5,255,12,9,5,255,16,11,5, +255,20,13,5,201,11,9,4,28,0,12,12,10,5,136,16,12,5,170,16, +11,5,170,16,11,5,193,21,15,6,184,14,10,5,31,0,32,8,6,3, +139,54,30,9,255,107,50,12,255,78,39,11,255,9,7,4,161,0,12,20, +13,5,142,18,12,5,210,16,11,5,170,16,11,5,170,16,11,5,170,9, +7,4,28,0,64,13,10,8,57,9,7,6,159,8,6,5,159,10,8,7, +130,10,8,7,119,9,7,6,133,9,7,6,167,10,8,7,170,11,9,8, +113,0,44,5,4,2,28,8,6,3,125,14,10,5,170,18,13,5,176,14, +10,5,238,14,10,5,255,16,11,5,235,18,13,5,173,16,11,5,170,16, +12,5,170,16,11,5,164,9,7,4,28,0,12,14,10,5,136,16,12,5, +170,16,11,5,170,18,12,5,170,16,11,5,210,14,10,5,255,14,10,5, +249,16,12,5,193,16,11,5,170,9,7,4,153,7,5,4,57,0,16,5, +5,4,28,8,6,3,125,14,10,5,170,18,13,5,176,14,10,5,238,14, +10,5,255,14,10,5,249,16,11,5,193,16,11,5,170,9,7,4,150,7, +5,4,57,0,16,5,5,4,28,8,6,3,125,14,10,5,170,18,13,5, +176,14,10,5,238,14,10,5,255,14,10,5,235,18,13,5,173,16,11,5, +170,16,12,5,170,16,11,5,170,9,7,4,28,0,12,5,5,4,28,8, +6,3,125,14,10,5,170,18,13,5,176,14,10,5,235,14,10,5,255,14, +10,5,255,16,11,5,255,20,13,5,207,12,9,5,34,0,28,14,10,5, +142,20,13,5,170,16,11,5,170,9,7,4,28,0,28,6,5,3,85,7, +5,4,85,6,5,3,85,5,4,4,85,5,4,4,105,9,8,4,241,72, +37,11,255,110,54,13,255,67,34,10,255,8,6,3,144,0,12,14,10,5, +142,21,14,6,170,16,12,5,170,9,8,4,28,0,16,14,10,5,142,21, +13,6,170,16,11,5,170,9,7,4,28,0,12,12,9,5,142,21,13,6, +170,16,11,5,170,9,7,4,28,0,12,7,5,2,37,8,6,3,142,8, +6,3,227,25,15,6,255,75,36,10,255,99,51,12,255,66,33,9,255,8, +6,3,130,0,12,14,10,5,139,21,13,6,170,16,11,5,170,9,7,4, +28,0,12,8,6,3,79,14,10,5,170,18,13,5,170,12,9,5,142,0, +16,14,10,5,142,21,13,6,170,16,11,5,170,9,7,4,28,0,12,12, +9,5,142,21,13,6,170,16,11,5,170,9,7,4,28,0,8,20,13,5, +85,11,8,4,28,0,8,12,9,5,142,21,13,6,170,16,11,5,170,9, +7,4,28,0,12,12,9,5,142,21,13,6,170,16,11,5,170,9,7,4, +28,0,16,14,10,5,142,20,13,5,170,16,11,5,170,9,7,4,28,0, +12,5,5,4,28,8,6,3,125,14,10,5,170,18,12,5,170,20,14,5, +173,16,12,5,193,20,13,5,178,20,13,5,170,16,11,5,170,9,7,4, +161,7,6,4,57,0,12,8,6,3,85,84,40,13,255,164,73,23,255,184, +79,27,255,15,11,8,246,0,72,11,10,10,170,176,83,37,255,196,87,33, +255,192,88,31,255,22,15,11,193,0,12,21,15,10,159,26,17,11,255,24, +17,11,221,10,8,7,85,0,44,8,7,3,59,12,9,5,170,16,11,5, +210,14,10,5,255,14,10,5,255,14,10,5,255,14,10,5,246,16,12,5, +193,16,11,5,170,9,7,4,153,6,5,3,57,0,24,14,10,5,142,20, +13,5,170,16,11,5,170,9,7,4,28,0,20,6,5,3,28,8,6,3, +127,14,10,5,170,18,13,5,176,14,10,5,238,14,10,5,255,14,10,5, +235,18,13,5,173,16,11,5,170,16,12,5,170,16,11,5,170,9,7,4, +28,0,28,14,11,7,142,29,19,8,170,17,11,6,159,8,6,3,28,0, +32,7,5,4,28,14,10,5,150,20,13,5,170,12,9,5,142,5,4,2, +14,0,8,15,11,8,142,26,18,9,178,19,13,6,170,8,6,3,68,0, +20,18,12,5,142,16,11,5,238,16,11,5,170,9,7,4,28,0,16,12, +9,5,142,16,11,5,215,18,13,5,187,11,9,4,28,0,16,4,4,3, +6,5,4,2,82,5,4,2,85,5,4,2,85,5,4,2,85,5,4,2, +99,9,7,4,241,72,37,11,255,112,53,13,255,77,39,12,255,10,8,5, +170,0,12,19,13,8,184,20,14,9,255,16,11,7,255,14,11,7,255,17, +12,8,255,22,15,9,255,27,17,10,255,30,19,11,255,28,18,11,255,21, +15,10,255,15,12,8,198,9,7,6,28,0,24,8,6,5,91,15,11,6, +170,14,11,5,238,19,13,6,198,12,9,5,28,0,8,6,5,3,85,54, +29,9,255,100,48,13,255,109,52,14,255,15,11,6,170,0,12,19,13,6, +144,14,10,5,255,16,11,5,178,8,6,3,119,0,255,0,255,0,174,12, +9,7,88,99,44,20,255,26,16,11,232,5,4,4,28,0,92,6,5,3, +57,60,28,11,255,158,67,23,255,88,44,23,255,11,9,6,142,0,255,0, +255,0,150,12,9,7,110,126,51,25,255,25,17,12,232,5,4,4,28,0, +184,6,5,5,28,19,14,10,227,52,29,17,255,30,20,13,255,9,8,6, +82,0,255,0,255,0,255,0,255,0,8,12,10,9,170,172,81,49,255,213, +125,94,255,185,88,58,255,23,16,14,159,0,255,0,255,0,106,5,4,2, +28,16,11,5,244,68,34,9,255,62,33,9,255,9,8,4,139,0,96,10, +8,7,48,71,33,18,255,108,47,23,255,107,48,22,255,113,51,24,255,109, +50,24,255,104,45,21,255,104,45,21,255,113,49,24,255,115,50,24,255,18, +13,9,136,0,255,0,129,9,7,6,34,18,13,9,244,66,31,15,255,84, +37,17,255,83,36,16,255,75,34,14,255,73,35,14,255,91,41,16,255,110, +47,19,255,79,40,16,255,24,16,9,255,8,6,5,57,0,100,22,14,5, +244,40,23,7,255,42,23,7,255,54,28,9,255,60,31,9,255,36,22,7, +255,12,9,5,244,6,5,3,28,0,255,0,29,9,7,6,85,72,34,13, +255,126,56,21,255,148,63,25,255,25,17,14,190,0,72,15,12,12,133,178, +86,57,255,200,89,55,255,194,82,47,255,30,20,17,187,0,255,0,169,9, +7,4,99,17,12,6,255,42,22,9,255,49,25,9,255,54,26,11,255,52, +26,11,255,59,28,12,255,82,37,15,255,111,49,18,255,84,39,17,255,25, +17,10,255,8,7,5,57,0,112,6,5,3,57,38,22,7,255,85,39,12, +255,124,52,21,255,20,13,9,170,0,255,0,255,0,202,8,6,5,28,26, +16,11,170,11,8,6,85,0,100,12,8,5,119,20,14,9,170,12,9,7, +142,0,255,0,255,0,154,9,7,6,28,27,17,12,170,11,9,8,85,0, +192,7,6,6,28,8,7,5,85,8,6,5,57,0,255,0,255,0,255,0, +255,0,16,25,17,16,161,41,27,26,255,40,26,23,235,14,12,11,82,0, +255,0,255,0,110,8,6,3,37,9,7,4,142,9,7,4,136,6,5,3, +6,0,100,23,15,10,153,19,13,10,255,16,11,9,255,16,11,9,255,16, +11,9,255,16,11,9,255,16,11,9,255,18,13,9,255,24,16,11,204,16, +11,9,31,0,255,0,133,10,8,7,142,18,12,9,207,18,13,9,255,16, +11,9,255,15,11,8,255,15,11,8,252,18,13,9,195,18,12,9,170,11, +8,6,167,8,7,5,57,0,104,9,8,4,142,14,10,5,170,13,10,6, +170,13,9,6,170,11,8,6,170,7,6,4,130,6,5,3,28,0,255,0, +37,14,10,7,142,21,14,10,170,19,13,10,170,14,11,9,31,0,72,8, +7,8,14,25,17,16,142,27,18,16,193,26,18,15,170,15,11,10,34,0, +255,0,169,9,7,4,28,11,8,6,170,14,10,7,232,15,10,8,255,15, +10,8,255,15,10,8,255,15,10,8,252,18,12,9,195,18,12,9,170,11, +8,6,167,9,7,6,57,0,120,9,7,4,91,16,11,7,170,20,13,9, +170,13,10,8,28,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, +255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, +255,0,255,0,255}}; + /* Created by MiniCompress.. an iOS RLE compressor. + * Compress Rate : 46.36 % + */ diff --git a/veejay-server/libgoom/gfontrle.h b/veejay-server/libgoom/gfontrle.h new file mode 100644 index 00000000..41e2462f --- /dev/null +++ b/veejay-server/libgoom/gfontrle.h @@ -0,0 +1,7 @@ +extern const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; + unsigned int rle_size; + unsigned char rle_pixel [49725]; +} the_font ; diff --git a/veejay-server/libgoom/goom.h b/veejay-server/libgoom/goom.h new file mode 100644 index 00000000..b0ddab17 --- /dev/null +++ b/veejay-server/libgoom/goom.h @@ -0,0 +1,30 @@ +#ifndef _GOOMCORE_H +#define _GOOMCORE_H + +#include "goom_config.h" +#include "goom_plugin_info.h" +#include "goomsl.h" + +#define NB_FX 10 + +PluginInfo *goom_init (guint32 resx, guint32 resy); +void goom_set_resolution (PluginInfo *goomInfo, guint32 resx, guint32 resy); + +/* + * forceMode == 0 : do nothing + * forceMode == -1 : lock the FX + * forceMode == 1..NB_FX : force a switch to FX n# forceMode + * + * songTitle = pointer to the title of the song... + * - NULL if it is not the start of the song + * - only have a value at the start of the song + */ +guint32 *goom_update (PluginInfo *goomInfo, gint16 data[2][512], int forceMode, float fps, + char *songTitle, char *message); + +/* returns 0 if the buffer wasn't accepted */ +int goom_set_screenbuffer(PluginInfo *goomInfo, void *buffer); + +void goom_close (PluginInfo *goomInfo); + +#endif diff --git a/veejay-server/libgoom/goom_config.h b/veejay-server/libgoom/goom_config.h new file mode 100644 index 00000000..1e6a0943 --- /dev/null +++ b/veejay-server/libgoom/goom_config.h @@ -0,0 +1,34 @@ +#if WORDS_BIGENDIAN +#define COLOR_ARGB +#else +#define COLOR_BGRA +#endif + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + + +#if 1 +/* ndef COLOR_BGRA */ +/** position des composantes **/ + #define BLEU 0 + #define VERT 1 + #define ROUGE 2 + #define ALPHA 3 +#else + #define ROUGE 1 + #define BLEU 3 + #define VERT 2 + #define ALPHA 0 +#endif + +#ifndef guint32 +#define guint8 unsigned char +#define guin16 unsigned short +#define guint32 unsigned int +#define gint8 signed char +#define gint16 signed short int +#define gint32 signed int +#endif diff --git a/veejay-server/libgoom/goom_config_param.h b/veejay-server/libgoom/goom_config_param.h new file mode 100644 index 00000000..3c6838d3 --- /dev/null +++ b/veejay-server/libgoom/goom_config_param.h @@ -0,0 +1,115 @@ +#ifndef _CONFIG_PARAM_H +#define _CONFIG_PARAM_H + +#include + +/** + * File created on 2003-05-24 by Jeko. + * (c)2003, JC Hoelt for iOS-software. + * + * LGPL Licence. + */ + +typedef enum { + PARAM_INTVAL, + PARAM_FLOATVAL, + PARAM_BOOLVAL, + PARAM_STRVAL, + PARAM_LISTVAL, +} ParamType; + +struct IntVal { + int value; + int min; + int max; + int step; +}; +struct FloatVal { + float value; + float min; + float max; + float step; +}; +struct StrVal { + char *value; +}; +struct ListVal { + char *value; + int nbChoices; + char **choices; +}; +struct BoolVal { + int value; +}; + + +typedef struct _PARAM { + char *name; + char *desc; + char rw; + ParamType type; + union { + struct IntVal ival; + struct FloatVal fval; + struct StrVal sval; + struct ListVal slist; + struct BoolVal bval; + } param; + + /* used by the core to inform the GUI of a change */ + void (*change_listener)(struct _PARAM *_this); + + /* used by the GUI to inform the core of a change */ + void (*changed)(struct _PARAM *_this); + + void *user_data; /* can be used by the GUI */ +} PluginParam; + +#define IVAL(p) ((p).param.ival.value) +#define SVAL(p) ((p).param.sval.value) +#define FVAL(p) ((p).param.fval.value) +#define BVAL(p) ((p).param.bval.value) +#define LVAL(p) ((p).param.slist.value) + +#define FMIN(p) ((p).param.fval.min) +#define FMAX(p) ((p).param.fval.max) +#define FSTEP(p) ((p).param.fval.step) + +#define IMIN(p) ((p).param.ival.min) +#define IMAX(p) ((p).param.ival.max) +#define ISTEP(p) ((p).param.ival.step) + +PluginParam goom_secure_param(void); + +PluginParam goom_secure_f_param(char *name); +PluginParam goom_secure_i_param(char *name); +PluginParam goom_secure_b_param(char *name, int value); +PluginParam goom_secure_s_param(char *name); + +PluginParam goom_secure_f_feedback(char *name); +PluginParam goom_secure_i_feedback(char *name); + +void goom_set_str_param_value(PluginParam *p, const char *str); +void goom_set_list_param_value(PluginParam *p, const char *str); + +typedef struct _PARAMETERS { + char *name; + char *desc; + int nbParams; + PluginParam **params; +} PluginParameters; + +PluginParameters goom_plugin_parameters(const char *name, int nb); + +#define secure_param goom_secure_param +#define secure_f_param goom_secure_f_param +#define secure_i_param goom_secure_i_param +#define secure_b_param goom_secure_b_param +#define secure_s_param goom_secure_s_param +#define secure_f_feedback goom_secure_f_feedback +#define secure_i_feedback goom_secure_i_feedback +#define set_list_param_value goom_set_list_param_value +#define set_str_param_value goom_set_str_param_value +#define plugin_parameters goom_plugin_parameters + +#endif diff --git a/veejay-server/libgoom/goom_core.c b/veejay-server/libgoom/goom_core.c new file mode 100644 index 00000000..0ae54051 --- /dev/null +++ b/veejay-server/libgoom/goom_core.c @@ -0,0 +1,856 @@ +/** +* file: goom_core.c + * author: Jean-Christophe Hoelt (which is not so proud of it) + * + * Contains the core of goom's work. + * + * (c)2000-2003, by iOS-software. + */ + +#include +#include +#include +#include +#include + +#include "goom.h" +#include "goom_tools.h" +#include "goom_filters.h" +#include "lines.h" +#include "ifs.h" +#include "tentacle3d.h" +#include "gfontlib.h" + +#include "sound_tester.h" +#include "goom_plugin_info.h" +#include "goom_fx.h" +#include "goomsl.h" + +/* #define VERBOSE */ + +#define STOP_SPEED 128 +/* TODO: put that as variable in PluginInfo */ +#define TIME_BTW_CHG 300 + +static void choose_a_goom_line (PluginInfo *goomInfo, float *param1, float *param2, int *couleur, + int *mode, float *amplitude, int far); + +static void update_message (PluginInfo *goomInfo, char *message); + +static void init_buffers(PluginInfo *goomInfo, int buffsize) +{ + goomInfo->pixel = (guint32 *) malloc (buffsize * sizeof (guint32) + 128); + bzero (goomInfo->pixel, buffsize * sizeof (guint32) + 128); + goomInfo->back = (guint32 *) malloc (buffsize * sizeof (guint32) + 128); + bzero (goomInfo->back, buffsize * sizeof (guint32) + 128); + goomInfo->conv = (Pixel *) malloc (buffsize * sizeof (guint32) + 128); + bzero (goomInfo->conv, buffsize * sizeof (guint32) + 128); + + goomInfo->outputBuf = goomInfo->conv; + + goomInfo->p1 = (Pixel *) ((1 + ((uintptr_t) (goomInfo->pixel)) / 128) * 128); + goomInfo->p2 = (Pixel *) ((1 + ((uintptr_t) (goomInfo->back)) / 128) * 128); +} + +/************************** +* INIT * +**************************/ +PluginInfo *goom_init (guint32 resx, guint32 resy) +{ + PluginInfo *goomInfo = (PluginInfo*)malloc(sizeof(PluginInfo)); + +#ifdef VERBOSE + printf ("GOOM: init (%d, %d);\n", resx, resy); +#endif + + plugin_info_init(goomInfo,4); + + goomInfo->star_fx = flying_star_create(); + goomInfo->star_fx.init(&goomInfo->star_fx, goomInfo); + + goomInfo->zoomFilter_fx = zoomFilterVisualFXWrapper_create (); + goomInfo->zoomFilter_fx.init(&goomInfo->zoomFilter_fx, goomInfo); + + goomInfo->tentacles_fx = tentacle_fx_create(); + goomInfo->tentacles_fx.init(&goomInfo->tentacles_fx, goomInfo); + + + goomInfo->convolve_fx = convolve_create(); + goomInfo->convolve_fx.init(&goomInfo->convolve_fx, goomInfo); + + plugin_info_add_visual (goomInfo, 0, &goomInfo->zoomFilter_fx); + plugin_info_add_visual (goomInfo, 1, &goomInfo->tentacles_fx); + plugin_info_add_visual (goomInfo, 2, &goomInfo->star_fx); + plugin_info_add_visual (goomInfo, 3, &goomInfo->convolve_fx); + + goomInfo->screen.width = resx; + goomInfo->screen.height = resy; + goomInfo->screen.size = resx * resy; + + init_buffers(goomInfo, goomInfo->screen.size); + goomInfo->gRandom = goom_random_init((uintptr_t)goomInfo->pixel); + + goomInfo->cycle = 0; + + goomInfo->ifs_fx = ifs_visualfx_create(); + goomInfo->ifs_fx.init(&goomInfo->ifs_fx, goomInfo); + + goomInfo->gmline1 = goom_lines_init (goomInfo, resx, goomInfo->screen.height, + GML_HLINE, goomInfo->screen.height, GML_BLACK, + GML_CIRCLE, 0.4f * (float) goomInfo->screen.height, GML_VERT); + goomInfo->gmline2 = goom_lines_init (goomInfo, resx, goomInfo->screen.height, + GML_HLINE, 0, GML_BLACK, + GML_CIRCLE, 0.2f * (float) goomInfo->screen.height, GML_RED); + + gfont_load (); + + /* goom_set_main_script(goomInfo, goomInfo->main_script_str); */ + + return goomInfo; +} + + + +void goom_set_resolution (PluginInfo *goomInfo, guint32 resx, guint32 resy) +{ + free (goomInfo->pixel); + free (goomInfo->back); + free (goomInfo->conv); + + goomInfo->screen.width = resx; + goomInfo->screen.height = resy; + goomInfo->screen.size = resx * resy; + + init_buffers(goomInfo, goomInfo->screen.size); + + /* init_ifs (goomInfo, resx, goomInfo->screen.height); */ + goomInfo->ifs_fx.free(&goomInfo->ifs_fx); + goomInfo->ifs_fx.init(&goomInfo->ifs_fx, goomInfo); + + goom_lines_set_res (goomInfo->gmline1, resx, goomInfo->screen.height); + goom_lines_set_res (goomInfo->gmline2, resx, goomInfo->screen.height); +} + +int goom_set_screenbuffer(PluginInfo *goomInfo, void *buffer) +{ + goomInfo->outputBuf = (Pixel*)buffer; + return 1; +} + +/******************************************** +* UPDATE * +******************************************** + +* WARNING: this is a 600 lines function ! (21-11-2003) +*/ +guint32 *goom_update (PluginInfo *goomInfo, gint16 data[2][512], + int forceMode, float fps, char *songTitle, char *message) +{ + Pixel *return_val; + guint32 pointWidth; + guint32 pointHeight; + int i; + float largfactor; /* elargissement de l'intervalle d'volution des points */ + Pixel *tmp; + + ZoomFilterData *pzfd; + + /* test if the config has changed, update it if so */ + pointWidth = (goomInfo->screen.width * 2) / 5; + pointHeight = ((goomInfo->screen.height) * 2) / 5; + + /* ! etude du signal ... */ + evaluate_sound (data, &(goomInfo->sound)); + + /* goom_execute_main_script(goomInfo); */ + + /* ! calcul du deplacement des petits points ... */ + largfactor = goomInfo->sound.speedvar / 150.0f + goomInfo->sound.volume / 1.5f; + + if (largfactor > 1.5f) + largfactor = 1.5f; + + goomInfo->update.decay_ifs--; + if (goomInfo->update.decay_ifs > 0) + goomInfo->update.ifs_incr += 2; + if (goomInfo->update.decay_ifs == 0) + goomInfo->update.ifs_incr = 0; + + if (goomInfo->update.recay_ifs) { + goomInfo->update.ifs_incr -= 2; + goomInfo->update.recay_ifs--; + if ((goomInfo->update.recay_ifs == 0)&&(goomInfo->update.ifs_incr<=0)) + goomInfo->update.ifs_incr = 1; + } + + if (goomInfo->update.ifs_incr > 0) + goomInfo->ifs_fx.apply(&goomInfo->ifs_fx, goomInfo->p2, goomInfo->p1, goomInfo); + + if (goomInfo->curGState->drawPoints) { + for (i = 1; i * 15 <= goomInfo->sound.speedvar*80.0f + 15; i++) { + goomInfo->update.loopvar += goomInfo->sound.speedvar*50 + 1; + + pointFilter (goomInfo, goomInfo->p1, + YELLOW, + ((pointWidth - 6.0f) * largfactor + 5.0f), + ((pointHeight - 6.0f) * largfactor + 5.0f), + i * 152.0f, 128.0f, goomInfo->update.loopvar + i * 2032); + pointFilter (goomInfo, goomInfo->p1, ORANGE, + ((pointWidth / 2) * largfactor) / i + 10.0f * i, + ((pointHeight / 2) * largfactor) / i + 10.0f * i, + 96.0f, i * 80.0f, goomInfo->update.loopvar / i); + pointFilter (goomInfo, goomInfo->p1, VIOLET, + ((pointHeight / 3 + 5.0f) * largfactor) / i + 10.0f * i, + ((pointHeight / 3 + 5.0f) * largfactor) / i + 10.0f * i, + i + 122.0f, 134.0f, goomInfo->update.loopvar / i); + pointFilter (goomInfo, goomInfo->p1, BLACK, + ((pointHeight / 3) * largfactor + 20.0f), + ((pointHeight / 3) * largfactor + 20.0f), + 58.0f, i * 66.0f, goomInfo->update.loopvar / i); + pointFilter (goomInfo, goomInfo->p1, WHITE, + (pointHeight * largfactor + 10.0f * i) / i, + (pointHeight * largfactor + 10.0f * i) / i, + 66.0f, 74.0f, goomInfo->update.loopvar + i * 500); + } + } + + /* par dfaut pas de changement de zoom */ + pzfd = NULL; + + /* + * Test forceMode + */ +#ifdef VERBOSE + if (forceMode != 0) { + printf ("forcemode = %d\n", forceMode); + } +#endif + + + /* diminuer de 1 le temps de lockage */ + /* note pour ceux qui n'ont pas suivis : le lockvar permet d'empecher un */ + /* changement d'etat du plugin juste apres un autre changement d'etat. oki */ + if (--goomInfo->update.lockvar < 0) + goomInfo->update.lockvar = 0; + + /* on verifie qu'il ne se pas un truc interressant avec le son. */ + if ((goomInfo->sound.timeSinceLastGoom == 0) + || (forceMode > 0) + || (goomInfo->update.cyclesSinceLastChange > TIME_BTW_CHG)) { + + /* changement eventuel de mode */ + if (goom_irand(goomInfo->gRandom,16) == 0) + switch (goom_irand(goomInfo->gRandom,34)) { + case 0: + case 10: + goomInfo->update.zoomFilterData.hypercosEffect = goom_irand(goomInfo->gRandom,2); + case 13: + case 20: + case 21: + goomInfo->update.zoomFilterData.mode = WAVE_MODE; + goomInfo->update.zoomFilterData.reverse = 0; + goomInfo->update.zoomFilterData.waveEffect = (goom_irand(goomInfo->gRandom,3) == 0); + if (goom_irand(goomInfo->gRandom,2)) + goomInfo->update.zoomFilterData.vitesse = (goomInfo->update.zoomFilterData.vitesse + 127) >> 1; + break; + case 1: + case 11: + goomInfo->update.zoomFilterData.mode = CRYSTAL_BALL_MODE; + goomInfo->update.zoomFilterData.waveEffect = 0; + goomInfo->update.zoomFilterData.hypercosEffect = 0; + break; + case 2: + case 12: + goomInfo->update.zoomFilterData.mode = AMULETTE_MODE; + goomInfo->update.zoomFilterData.waveEffect = 0; + goomInfo->update.zoomFilterData.hypercosEffect = 0; + break; + case 3: + goomInfo->update.zoomFilterData.mode = WATER_MODE; + goomInfo->update.zoomFilterData.waveEffect = 0; + goomInfo->update.zoomFilterData.hypercosEffect = 0; + break; + case 4: + case 14: + goomInfo->update.zoomFilterData.mode = SCRUNCH_MODE; + goomInfo->update.zoomFilterData.waveEffect = 0; + goomInfo->update.zoomFilterData.hypercosEffect = 0; + break; + case 5: + case 15: + case 22: + goomInfo->update.zoomFilterData.mode = HYPERCOS1_MODE; + goomInfo->update.zoomFilterData.waveEffect = 0; + goomInfo->update.zoomFilterData.hypercosEffect = (goom_irand(goomInfo->gRandom,3) == 0); + break; + case 6: + case 16: + goomInfo->update.zoomFilterData.mode = HYPERCOS2_MODE; + goomInfo->update.zoomFilterData.waveEffect = 0; + goomInfo->update.zoomFilterData.hypercosEffect = 0; + break; + case 7: + case 17: + goomInfo->update.zoomFilterData.mode = CRYSTAL_BALL_MODE; + goomInfo->update.zoomFilterData.waveEffect = (goom_irand(goomInfo->gRandom,4) == 0); + goomInfo->update.zoomFilterData.hypercosEffect = goom_irand(goomInfo->gRandom,2); + break; + case 8: + case 18: + case 19: + goomInfo->update.zoomFilterData.mode = SCRUNCH_MODE; + goomInfo->update.zoomFilterData.waveEffect = 1; + goomInfo->update.zoomFilterData.hypercosEffect = 1; + break; + case 29: + case 30: + goomInfo->update.zoomFilterData.mode = YONLY_MODE; + break; + case 31: + case 32: + case 33: + goomInfo->update.zoomFilterData.mode = SPEEDWAY_MODE; + break; + default: + goomInfo->update.zoomFilterData.mode = NORMAL_MODE; + goomInfo->update.zoomFilterData.waveEffect = 0; + goomInfo->update.zoomFilterData.hypercosEffect = 0; + } + } + + /* tout ceci ne sera fait qu'en cas de non-blocage */ + if (goomInfo->update.lockvar == 0) { + /* reperage de goom (acceleration forte de l'acceleration du volume) */ + /* -> coup de boost de la vitesse si besoin.. */ + if (goomInfo->sound.timeSinceLastGoom == 0) { + + int i; + goomInfo->update.goomvar++; + + /* SELECTION OF THE GOOM STATE */ + if ((!goomInfo->update.stateSelectionBlocker)&&(goom_irand(goomInfo->gRandom,3))) { + goomInfo->update.stateSelectionRnd = goom_irand(goomInfo->gRandom,goomInfo->statesRangeMax); + goomInfo->update.stateSelectionBlocker = 3; + } + else if (goomInfo->update.stateSelectionBlocker) goomInfo->update.stateSelectionBlocker--; + + for (i=0;istatesNumber;i++) + if ((goomInfo->update.stateSelectionRnd >= goomInfo->states[i].rangemin) + && (goomInfo->update.stateSelectionRnd <= goomInfo->states[i].rangemax)) + goomInfo->curGState = &(goomInfo->states[i]); + + if ((goomInfo->curGState->drawIFS) && (goomInfo->update.ifs_incr<=0)) { + goomInfo->update.recay_ifs = 5; + goomInfo->update.ifs_incr = 11; + } + + if ((!goomInfo->curGState->drawIFS) && (goomInfo->update.ifs_incr>0) && (goomInfo->update.decay_ifs<=0)) + goomInfo->update.decay_ifs = 100; + + if (!goomInfo->curGState->drawScope) + goomInfo->update.stop_lines = 0xf000 & 5; + + if (!goomInfo->curGState->drawScope) { + goomInfo->update.stop_lines = 0; + goomInfo->update.lineMode = goomInfo->update.drawLinesDuration; + } + + /* if (goomInfo->update.goomvar % 1 == 0) */ + { + guint32 vtmp; + guint32 newvit; + + goomInfo->update.lockvar = 50; + newvit = STOP_SPEED + 1 - ((float)3.5f * log10(goomInfo->sound.speedvar * 60 + 1)); + /* retablir le zoom avant.. */ + if ((goomInfo->update.zoomFilterData.reverse) && (!(goomInfo->cycle % 13)) && (rand () % 5 == 0)) { + goomInfo->update.zoomFilterData.reverse = 0; + goomInfo->update.zoomFilterData.vitesse = STOP_SPEED - 2; + goomInfo->update.lockvar = 75; + } + if (goom_irand(goomInfo->gRandom,10) == 0) { + goomInfo->update.zoomFilterData.reverse = 1; + goomInfo->update.lockvar = 100; + } + + if (goom_irand(goomInfo->gRandom,10) == 0) + goomInfo->update.zoomFilterData.vitesse = STOP_SPEED - 1; + if (goom_irand(goomInfo->gRandom,12) == 0) + goomInfo->update.zoomFilterData.vitesse = STOP_SPEED + 1; + + /* changement de milieu.. */ + switch (goom_irand(goomInfo->gRandom,25)) { + case 0: + case 3: + case 6: + goomInfo->update.zoomFilterData.middleY = goomInfo->screen.height - 1; + goomInfo->update.zoomFilterData.middleX = goomInfo->screen.width / 2; + break; + case 1: + case 4: + goomInfo->update.zoomFilterData.middleX = goomInfo->screen.width - 1; + break; + case 2: + case 5: + goomInfo->update.zoomFilterData.middleX = 1; + break; + default: + goomInfo->update.zoomFilterData.middleY = goomInfo->screen.height / 2; + goomInfo->update.zoomFilterData.middleX = goomInfo->screen.width / 2; + } + + if ((goomInfo->update.zoomFilterData.mode == WATER_MODE) + || (goomInfo->update.zoomFilterData.mode == YONLY_MODE) + || (goomInfo->update.zoomFilterData.mode == AMULETTE_MODE)) { + goomInfo->update.zoomFilterData.middleX = goomInfo->screen.width / 2; + goomInfo->update.zoomFilterData.middleY = goomInfo->screen.height / 2; + } + + switch (vtmp = (goom_irand(goomInfo->gRandom,15))) { + case 0: + goomInfo->update.zoomFilterData.vPlaneEffect = goom_irand(goomInfo->gRandom,3) + - goom_irand(goomInfo->gRandom,3); + goomInfo->update.zoomFilterData.hPlaneEffect = goom_irand(goomInfo->gRandom,3) + - goom_irand(goomInfo->gRandom,3); + break; + case 3: + goomInfo->update.zoomFilterData.vPlaneEffect = 0; + goomInfo->update.zoomFilterData.hPlaneEffect = goom_irand(goomInfo->gRandom,8) + - goom_irand(goomInfo->gRandom,8); + break; + case 4: + case 5: + case 6: + case 7: + goomInfo->update.zoomFilterData.vPlaneEffect = goom_irand(goomInfo->gRandom,5) + - goom_irand(goomInfo->gRandom,5); + goomInfo->update.zoomFilterData.hPlaneEffect = -goomInfo->update.zoomFilterData.vPlaneEffect; + break; + case 8: + goomInfo->update.zoomFilterData.hPlaneEffect = 5 + goom_irand(goomInfo->gRandom,8); + goomInfo->update.zoomFilterData.vPlaneEffect = -goomInfo->update.zoomFilterData.hPlaneEffect; + break; + case 9: + goomInfo->update.zoomFilterData.vPlaneEffect = 5 + goom_irand(goomInfo->gRandom,8); + goomInfo->update.zoomFilterData.hPlaneEffect = -goomInfo->update.zoomFilterData.hPlaneEffect; + break; + case 13: + goomInfo->update.zoomFilterData.hPlaneEffect = 0; + goomInfo->update.zoomFilterData.vPlaneEffect = goom_irand(goomInfo->gRandom,10) + - goom_irand(goomInfo->gRandom,10); + break; + case 14: + goomInfo->update.zoomFilterData.hPlaneEffect = goom_irand(goomInfo->gRandom,10) + - goom_irand(goomInfo->gRandom,10); + goomInfo->update.zoomFilterData.vPlaneEffect = goom_irand(goomInfo->gRandom,10) + - goom_irand(goomInfo->gRandom,10); + break; + default: + if (vtmp < 10) { + goomInfo->update.zoomFilterData.vPlaneEffect = 0; + goomInfo->update.zoomFilterData.hPlaneEffect = 0; + } + } + + if (goom_irand(goomInfo->gRandom,5) != 0) + goomInfo->update.zoomFilterData.noisify = 0; + else { + goomInfo->update.zoomFilterData.noisify = goom_irand(goomInfo->gRandom,2) + 1; + goomInfo->update.lockvar *= 2; + } + + if (goomInfo->update.zoomFilterData.mode == AMULETTE_MODE) { + goomInfo->update.zoomFilterData.vPlaneEffect = 0; + goomInfo->update.zoomFilterData.hPlaneEffect = 0; + goomInfo->update.zoomFilterData.noisify = 0; + } + + if ((goomInfo->update.zoomFilterData.middleX == 1) || (goomInfo->update.zoomFilterData.middleX == (signed int)goomInfo->screen.width - 1)) { + goomInfo->update.zoomFilterData.vPlaneEffect = 0; + if (goom_irand(goomInfo->gRandom,2)) + goomInfo->update.zoomFilterData.hPlaneEffect = 0; + } + + if ((signed int)newvit < goomInfo->update.zoomFilterData.vitesse) /* on accelere */ + { + pzfd = &goomInfo->update.zoomFilterData; + if (((newvit < STOP_SPEED - 7) && + (goomInfo->update.zoomFilterData.vitesse < STOP_SPEED - 6) && + (goomInfo->cycle % 3 == 0)) || (goom_irand(goomInfo->gRandom,40) == 0)) { + goomInfo->update.zoomFilterData.vitesse = STOP_SPEED - goom_irand(goomInfo->gRandom,2) + + goom_irand(goomInfo->gRandom,2); + goomInfo->update.zoomFilterData.reverse = !goomInfo->update.zoomFilterData.reverse; + } + else { + goomInfo->update.zoomFilterData.vitesse = (newvit + goomInfo->update.zoomFilterData.vitesse * 7) / 8; + } + goomInfo->update.lockvar += 50; + } + } + + if (goomInfo->update.lockvar > 150) { + goomInfo->update.switchIncr = goomInfo->update.switchIncrAmount; + goomInfo->update.switchMult = 1.0f; + } + } + /* mode mega-lent */ + if (goom_irand(goomInfo->gRandom,700) == 0) { + /* + * printf ("coup du sort...\n") ; + */ + pzfd = &goomInfo->update.zoomFilterData; + goomInfo->update.zoomFilterData.vitesse = STOP_SPEED - 1; + goomInfo->update.zoomFilterData.pertedec = 8; + goomInfo->update.zoomFilterData.sqrtperte = 16; + goomInfo->update.goomvar = 1; + goomInfo->update.lockvar += 50; + goomInfo->update.switchIncr = goomInfo->update.switchIncrAmount; + goomInfo->update.switchMult = 1.0f; + } + } + + /* + * gros frein si la musique est calme + */ + if ((goomInfo->sound.speedvar < 0.01f) + && (goomInfo->update.zoomFilterData.vitesse < STOP_SPEED - 4) + && (goomInfo->cycle % 16 == 0)) { + pzfd = &goomInfo->update.zoomFilterData; + goomInfo->update.zoomFilterData.vitesse += 3; + goomInfo->update.zoomFilterData.pertedec = 8; + goomInfo->update.zoomFilterData.sqrtperte = 16; + goomInfo->update.goomvar = 0; + } + + /* + * baisser regulierement la vitesse... + */ + if ((goomInfo->cycle % 73 == 0) && (goomInfo->update.zoomFilterData.vitesse < STOP_SPEED - 5)) { + pzfd = &goomInfo->update.zoomFilterData; + goomInfo->update.zoomFilterData.vitesse++; + } + + /* + * arreter de decrmenter au bout d'un certain temps + */ + if ((goomInfo->cycle % 101 == 0) && (goomInfo->update.zoomFilterData.pertedec == 7)) { + pzfd = &goomInfo->update.zoomFilterData; + goomInfo->update.zoomFilterData.pertedec = 8; + goomInfo->update.zoomFilterData.sqrtperte = 16; + } + + /* + * Permet de forcer un effet. + */ + if ((forceMode > 0) && (forceMode <= NB_FX)) { + pzfd = &goomInfo->update.zoomFilterData; + pzfd->mode = forceMode - 1; + } + + if (forceMode == -1) { + pzfd = NULL; + } + + /* + * Changement d'effet de zoom ! + */ + if (pzfd != NULL) { + int dif; + + goomInfo->update.cyclesSinceLastChange = 0; + + goomInfo->update.switchIncr = goomInfo->update.switchIncrAmount; + + dif = goomInfo->update.zoomFilterData.vitesse - goomInfo->update.previousZoomSpeed; + if (dif < 0) + dif = -dif; + + if (dif > 2) { + goomInfo->update.switchIncr *= (dif + 2) / 2; + } + goomInfo->update.previousZoomSpeed = goomInfo->update.zoomFilterData.vitesse; + goomInfo->update.switchMult = 1.0f; + + if (((goomInfo->sound.timeSinceLastGoom == 0) + && (goomInfo->sound.totalgoom < 2)) || (forceMode > 0)) { + goomInfo->update.switchIncr = 0; + goomInfo->update.switchMult = goomInfo->update.switchMultAmount; + } + } + else { + if (goomInfo->update.cyclesSinceLastChange > TIME_BTW_CHG) { + pzfd = &goomInfo->update.zoomFilterData; + goomInfo->update.cyclesSinceLastChange = 0; + } + else + goomInfo->update.cyclesSinceLastChange++; + } + +#ifdef VERBOSE + if (pzfd) { + printf ("GOOM: pzfd->mode = %d\n", pzfd->mode); + } +#endif + + /* Zoom here ! */ + zoomFilterFastRGB (goomInfo, goomInfo->p1, goomInfo->p2, pzfd, goomInfo->screen.width, goomInfo->screen.height, + goomInfo->update.switchIncr, goomInfo->update.switchMult); + + /* + * Affichage tentacule + */ + + goomInfo->tentacles_fx.apply(&goomInfo->tentacles_fx, goomInfo->p1, goomInfo->p2, goomInfo); + goomInfo->star_fx.apply (&goomInfo->star_fx,goomInfo->p2,goomInfo->p1,goomInfo); + + + + + /* + * Affichage de texte + * @ deleted. + */ + + /* + * arret demande + */ + if ((goomInfo->update.stop_lines & 0xf000)||(!goomInfo->curGState->drawScope)) { + float param1, param2, amplitude; + int couleur; + int mode; + + choose_a_goom_line (goomInfo, ¶m1, ¶m2, &couleur, &mode, &litude,1); + couleur = GML_BLACK; + + goom_lines_switch_to (goomInfo->gmline1, mode, param1, amplitude, couleur); + goom_lines_switch_to (goomInfo->gmline2, mode, param2, amplitude, couleur); + goomInfo->update.stop_lines &= 0x0fff; + } + + /* + * arret aleatore.. changement de mode de ligne.. + */ + if (goomInfo->update.lineMode != goomInfo->update.drawLinesDuration) { + goomInfo->update.lineMode--; + if (goomInfo->update.lineMode == -1) + goomInfo->update.lineMode = 0; + } + else + if ((goomInfo->cycle%80==0)&&(goom_irand(goomInfo->gRandom,5)==0)&&goomInfo->update.lineMode) + goomInfo->update.lineMode--; + + if ((goomInfo->cycle % 120 == 0) + && (goom_irand(goomInfo->gRandom,4) == 0) + && (goomInfo->curGState->drawScope)) { + if (goomInfo->update.lineMode == 0) + goomInfo->update.lineMode = goomInfo->update.drawLinesDuration; + else if (goomInfo->update.lineMode == goomInfo->update.drawLinesDuration) { + float param1, param2, amplitude; + int couleur1,couleur2; + int mode; + + goomInfo->update.lineMode--; + choose_a_goom_line (goomInfo, ¶m1, ¶m2, &couleur1, + &mode, &litude,goomInfo->update.stop_lines); + + couleur2 = 5-couleur1; + if (goomInfo->update.stop_lines) { + goomInfo->update.stop_lines--; + if (goom_irand(goomInfo->gRandom,2)) + couleur2=couleur1 = GML_BLACK; + } + + goom_lines_switch_to (goomInfo->gmline1, mode, param1, amplitude, couleur1); + goom_lines_switch_to (goomInfo->gmline2, mode, param2, amplitude, couleur2); + } + } + + /* + * si on est dans un goom : afficher les lignes... + */ + if ((goomInfo->update.lineMode != 0) || (goomInfo->sound.timeSinceLastGoom < 5)) { + goomInfo->gmline2->power = goomInfo->gmline1->power; + + goom_lines_draw (goomInfo, goomInfo->gmline1, data[0], goomInfo->p2); + goom_lines_draw (goomInfo, goomInfo->gmline2, data[1], goomInfo->p2); + + if (((goomInfo->cycle % 121) == 9) && (goom_irand(goomInfo->gRandom,3) == 1) + && ((goomInfo->update.lineMode == 0) || (goomInfo->update.lineMode == goomInfo->update.drawLinesDuration))) { + float param1, param2, amplitude; + int couleur1,couleur2; + int mode; + + choose_a_goom_line (goomInfo, ¶m1, ¶m2, &couleur1, + &mode, &litude, goomInfo->update.stop_lines); + couleur2 = 5-couleur1; + + if (goomInfo->update.stop_lines) { + goomInfo->update.stop_lines--; + if (goom_irand(goomInfo->gRandom,2)) + couleur2=couleur1 = GML_BLACK; + } + goom_lines_switch_to (goomInfo->gmline1, mode, param1, amplitude, couleur1); + goom_lines_switch_to (goomInfo->gmline2, mode, param2, amplitude, couleur2); + } + } + + return_val = goomInfo->p1; + tmp = goomInfo->p1; + goomInfo->p1 = goomInfo->p2; + goomInfo->p2 = tmp; + + /* affichage et swappage des buffers.. */ + goomInfo->cycle++; + + goomInfo->convolve_fx.apply(&goomInfo->convolve_fx,return_val,goomInfo->outputBuf,goomInfo); + + return (guint32*)goomInfo->outputBuf; +} + +/**************************************** +* CLOSE * +****************************************/ +void goom_close (PluginInfo *goomInfo) +{ + if (goomInfo->pixel != NULL) + free (goomInfo->pixel); + if (goomInfo->back != NULL) + free (goomInfo->back); + if (goomInfo->conv != NULL) + free (goomInfo->conv); + + goomInfo->pixel = goomInfo->back = NULL; + goomInfo->conv = NULL; + goom_random_free(goomInfo->gRandom); + goom_lines_free (&goomInfo->gmline1); + goom_lines_free (&goomInfo->gmline2); + + /* release_ifs (); */ + goomInfo->ifs_fx.free(&goomInfo->ifs_fx); + goomInfo->convolve_fx.free(&goomInfo->convolve_fx); + goomInfo->star_fx.free(&goomInfo->star_fx); + goomInfo->tentacles_fx.free(&goomInfo->tentacles_fx); + goomInfo->zoomFilter_fx.free(&goomInfo->zoomFilter_fx); + + free(goomInfo); +} + + +/* *** */ +void +choose_a_goom_line (PluginInfo *goomInfo, float *param1, float *param2, int *couleur, int *mode, + float *amplitude, int far) +{ + *mode = goom_irand(goomInfo->gRandom,3); + *amplitude = 1.0f; + switch (*mode) { + case GML_CIRCLE: + if (far) { + *param1 = *param2 = 0.47f; + *amplitude = 0.8f; + break; + } + if (goom_irand(goomInfo->gRandom,3) == 0) { + *param1 = *param2 = 0; + *amplitude = 3.0f; + } + else if (goom_irand(goomInfo->gRandom,2)) { + *param1 = 0.40f * goomInfo->screen.height; + *param2 = 0.22f * goomInfo->screen.height; + } + else { + *param1 = *param2 = goomInfo->screen.height * 0.35; + } + break; + case GML_HLINE: + if (goom_irand(goomInfo->gRandom,4) || far) { + *param1 = goomInfo->screen.height / 7; + *param2 = 6.0f * goomInfo->screen.height / 7.0f; + } + else { + *param1 = *param2 = goomInfo->screen.height / 2.0f; + *amplitude = 2.0f; + } + break; + case GML_VLINE: + if (goom_irand(goomInfo->gRandom,3) || far) { + *param1 = goomInfo->screen.width / 7.0f; + *param2 = 6.0f * goomInfo->screen.width / 7.0f; + } + else { + *param1 = *param2 = goomInfo->screen.width / 2.0f; + *amplitude = 1.5f; + } + break; + } + + *couleur = goom_irand(goomInfo->gRandom,6); +} + +#define ECART_VARIATION 1.5 +#define POS_VARIATION 3.0 +#define SCROLLING_SPEED 80 + +/* + * Met a jour l'affichage du message defilant + */ +void update_message (PluginInfo *goomInfo, char *message) { + + int fin = 0; + + if (message) { + int i=1,j=0; + sprintf (goomInfo->update_message.message, message); + for (j=0;goomInfo->update_message.message[j];j++) + if (goomInfo->update_message.message[j]=='\n') + i++; + goomInfo->update_message.numberOfLinesInMessage = i; + goomInfo->update_message.affiche = goomInfo->screen.height + goomInfo->update_message.numberOfLinesInMessage * 25 + 105; + goomInfo->update_message.longueur = strlen(goomInfo->update_message.message); + } + if( goomInfo->update_message.affiche) + goomInfo->update_message.affiche--; + /* + if (goomInfo->update_message.affiche) { + int i = 0; + char *msg = malloc(goomInfo->update_message.longueur + 1); + char *ptr = msg; + int pos; + float ecart; + message = msg; + sprintf (msg, goomInfo->update_message.message); + + while (!fin) { + while (1) { + if (*ptr == 0) { + fin = 1; + break; + } + if (*ptr == '\n') { + *ptr = 0; + break; + } + ++ptr; + } + pos = goomInfo->update_message.affiche - (goomInfo->update_message.numberOfLinesInMessage - i)*25; + pos += POS_VARIATION * (cos((double)pos / 20.0)); + pos -= SCROLLING_SPEED; + ecart = (ECART_VARIATION * sin((double)pos / 20.0)); + if ((fin) && (2 * pos < (int)goomInfo->screen.height)) + pos = (int)goomInfo->screen.height / 2; + pos += 7; + + goom_draw_text(goomInfo->p1,goomInfo->screen.width,goomInfo->screen.height, + goomInfo->screen.width/2, pos, + message, + ecart, + 1); + message = ++ptr; + i++; + } + goomInfo->update_message.affiche --; + free (msg); + } + */ +} + diff --git a/veejay-server/libgoom/goom_filters.h b/veejay-server/libgoom/goom_filters.h new file mode 100644 index 00000000..f015499a --- /dev/null +++ b/veejay-server/libgoom/goom_filters.h @@ -0,0 +1,52 @@ +#ifndef FILTERS_H +#define FILTERS_H + +#include "goom_config.h" +#include "goom_typedefs.h" +#include "goom_visual_fx.h" +#include "goom_graphic.h" + +VisualFX zoomFilterVisualFXWrapper_create(void); + +struct _ZOOM_FILTER_DATA +{ + int vitesse; /* 128 = vitesse nule... * * 256 = en arriere + * hyper vite.. * * 0 = en avant hype vite. */ + unsigned char pertedec; + unsigned char sqrtperte; + int middleX, middleY; /* milieu de l'effet */ + char reverse; /* inverse la vitesse */ + char mode; /* type d'effet appliquer (cf les #define) */ + /** @since June 2001 */ + int hPlaneEffect; /* deviation horitontale */ + int vPlaneEffect; /* deviation verticale */ + /** @since April 2002 */ + int waveEffect; /* applique une "surcouche" de wave effect */ + int hypercosEffect; /* applique une "surcouche de hypercos effect */ + + char noisify; /* ajoute un bruit a la transformation */ +}; + +#define NORMAL_MODE 0 +#define WAVE_MODE 1 +#define CRYSTAL_BALL_MODE 2 +#define SCRUNCH_MODE 3 +#define AMULETTE_MODE 4 +#define WATER_MODE 5 +#define HYPERCOS1_MODE 6 +#define HYPERCOS2_MODE 7 +#define YONLY_MODE 8 +#define SPEEDWAY_MODE 9 + +void pointFilter (PluginInfo *goomInfo, Pixel * pix1, Color c, + float t1, float t2, float t3, float t4, guint32 cycle); + +/* filtre de zoom : + * le contenu de pix1 est copie dans pix2. + * zf : si non NULL, configure l'effet. + * resx,resy : taille des buffers. + */ +void zoomFilterFastRGB (PluginInfo *goomInfo, Pixel * pix1, Pixel * pix2, ZoomFilterData * zf, guint32 resx, + guint32 resy, int switchIncr, float switchMult); + +#endif diff --git a/veejay-server/libgoom/goom_fx.h b/veejay-server/libgoom/goom_fx.h new file mode 100644 index 00000000..e672ece3 --- /dev/null +++ b/veejay-server/libgoom/goom_fx.h @@ -0,0 +1,12 @@ +#ifndef _GOOM_FX_H +#define _GOOM_FX_H + +#include "goom_visual_fx.h" +#include "goom_plugin_info.h" + +VisualFX convolve_create (); +VisualFX flying_star_create (void); + +void zoom_filter_c(int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]); + +#endif diff --git a/veejay-server/libgoom/goom_graphic.h b/veejay-server/libgoom/goom_graphic.h new file mode 100644 index 00000000..9deaf5a9 --- /dev/null +++ b/veejay-server/libgoom/goom_graphic.h @@ -0,0 +1,74 @@ +#ifndef GRAPHIC_H +#define GRAPHIC_H + +typedef unsigned int Uint; + +typedef struct +{ + unsigned short r, v, b; +} +Color; + +extern const Color BLACK; +extern const Color WHITE; +extern const Color RED; +extern const Color BLUE; +extern const Color GREEN; +extern const Color YELLOW; +extern const Color ORANGE; +extern const Color VIOLET; + + +#ifdef COLOR_BGRA + +#define B_CHANNEL 0xFF000000 +#define G_CHANNEL 0x00FF0000 +#define R_CHANNEL 0x0000FF00 +#define A_CHANNEL 0x000000FF +#define B_OFFSET 24 +#define G_OFFSET 16 +#define R_OFFSET 8 +#define A_OFFSET 0 + +typedef union _PIXEL { + struct { + unsigned char b; + unsigned char g; + unsigned char r; + unsigned char a; + } channels; + unsigned int val; + unsigned char cop[4]; +} Pixel; + +#else + +#define A_CHANNEL 0xFF000000 +#define R_CHANNEL 0x00FF0000 +#define G_CHANNEL 0x0000FF00 +#define B_CHANNEL 0x000000FF +#define A_OFFSET 24 +#define R_OFFSET 16 +#define G_OFFSET 8 +#define B_OFFSET 0 + +typedef union _PIXEL { + struct { + unsigned char a; + unsigned char r; + unsigned char g; + unsigned char b; + } channels; + unsigned int val; + unsigned char cop[4]; +} Pixel; + +#endif /* COLOR_BGRA */ + +/* +inline void setPixelRGB (Pixel * buffer, Uint x, Uint y, Color c); +inline void getPixelRGB (Pixel * buffer, Uint x, Uint y, Color * c); +*/ + + +#endif /* GRAPHIC_H */ diff --git a/veejay-server/libgoom/goom_hash.c b/veejay-server/libgoom/goom_hash.c new file mode 100644 index 00000000..f21a6d6c --- /dev/null +++ b/veejay-server/libgoom/goom_hash.c @@ -0,0 +1,100 @@ +#include "goom_hash.h" +#include +#include + +static GoomHashEntry *entry_new(const char *key, HashValue value) { + + GoomHashEntry *entry = (GoomHashEntry*)malloc(sizeof(GoomHashEntry)); + + entry->key = (char *)malloc(strlen(key)+1); + strcpy(entry->key,key); + entry->value = value; + entry->lower = NULL; + entry->upper = NULL; + + return entry; +} + +static void entry_free(GoomHashEntry *entry) { + if (entry!=NULL) { + entry_free(entry->lower); + entry_free(entry->upper); + free(entry->key); + free(entry); + } +} + +static void entry_put(GoomHashEntry *entry, const char *key, HashValue value) { + int cmp = strcmp(key,entry->key); + if (cmp==0) { + entry->value = value; + } + else if (cmp > 0) { + if (entry->upper == NULL) + entry->upper = entry_new(key,value); + else + entry_put(entry->upper, key, value); + } + else { + if (entry->lower == NULL) + entry->lower = entry_new(key,value); + else + entry_put(entry->lower, key, value); + } +} + +static HashValue *entry_get(GoomHashEntry *entry, const char *key) { + + int cmp; + if (entry==NULL) + return NULL; + cmp = strcmp(key,entry->key); + if (cmp > 0) + return entry_get(entry->upper, key); + else if (cmp < 0) + return entry_get(entry->lower, key); + else + return &(entry->value); +} + +GoomHash *goom_hash_new(void) { + GoomHash *_this = (GoomHash*)malloc(sizeof(GoomHash)); + _this->root = NULL; + return _this; +} + +void goom_hash_free(GoomHash *_this) { + entry_free(_this->root); + free(_this); +} + +void goom_hash_put(GoomHash *_this, const char *key, HashValue value) { + if (_this->root == NULL) + _this->root = entry_new(key,value); + else + entry_put(_this->root,key,value); +} + +HashValue *goom_hash_get(GoomHash *_this, const char *key) { + return entry_get(_this->root,key); +} + +void goom_hash_put_int(GoomHash *_this, const char *key, int i) { + HashValue value; + value.i = i; + goom_hash_put(_this,key,value); +} + +void goom_hash_put_float(GoomHash *_this, const char *key, float f) { + HashValue value; + value.f = f; + goom_hash_put(_this,key,value); +} + +void goom_hash_put_ptr(GoomHash *_this, const char *key, void *ptr) { + HashValue value; + value.ptr = ptr; + goom_hash_put(_this,key,value); +} + + diff --git a/veejay-server/libgoom/goom_hash.h b/veejay-server/libgoom/goom_hash.h new file mode 100644 index 00000000..c8eae37e --- /dev/null +++ b/veejay-server/libgoom/goom_hash.h @@ -0,0 +1,34 @@ +#ifndef _GOOM_HASH_H +#define _GOOM_HASH_H + +typedef struct GOOM_HASH_ENTRY GoomHashEntry; +typedef struct GOOM_HASH GoomHash; + +typedef union { + void *ptr; + int i; + float f; +} HashValue; + +struct GOOM_HASH_ENTRY { + char *key; + HashValue value; + GoomHashEntry *lower; + GoomHashEntry *upper; +}; + +struct GOOM_HASH { + GoomHashEntry *root; +}; + +GoomHash *goom_hash_new(void); +void goom_hash_free(GoomHash *gh); + +void goom_hash_put(GoomHash *gh, const char *key, HashValue value); +HashValue *goom_hash_get(GoomHash *gh, const char *key); + +void goom_hash_put_int(GoomHash *_this, const char *key, int i); +void goom_hash_put_float(GoomHash *_this, const char *key, float f); +void goom_hash_put_ptr(GoomHash *_this, const char *key, void *ptr); + +#endif /* _GOOM_HASH_H */ diff --git a/veejay-server/libgoom/goom_plugin_info.h b/veejay-server/libgoom/goom_plugin_info.h new file mode 100644 index 00000000..8d5d098b --- /dev/null +++ b/veejay-server/libgoom/goom_plugin_info.h @@ -0,0 +1,176 @@ +#ifndef _PLUGIN_INFO_H +#define _PLUGIN_INFO_H + +#include "goom_typedefs.h" + +#include "goom_config.h" + +#include "goom_graphic.h" +#include "goom_config_param.h" +#include "goom_visual_fx.h" +#include "goom_filters.h" +#include "goom_tools.h" +#include "goomsl.h" + +typedef struct { + char drawIFS; + char drawPoints; + char drawTentacle; + + char drawScope; + int farScope; + + int rangemin; + int rangemax; +} GoomState; + +#define STATES_MAX_NB 128 + +/** + * Gives informations about the sound. + */ +struct _SOUND_INFO { + + /* nota : a Goom is just a sound event... */ + + int timeSinceLastGoom; /* >= 0 */ + float goomPower; /* power of the last Goom [0..1] */ + + int timeSinceLastBigGoom; /* >= 0 */ + + float volume; /* [0..1] */ + short samples[2][512]; + + /* other "internal" datas for the sound_tester */ + float goom_limit; /* auto-updated limit of goom_detection */ + float bigGoomLimit; + float accelvar; /* acceleration of the sound - [0..1] */ + float speedvar; /* speed of the sound - [0..100] */ + int allTimesMax; + int totalgoom; /* number of goom since last reset + * (a reset every 64 cycles) */ + + float prov_max; /* accel max since last reset */ + + int cycle; + + /* private */ + PluginParam volume_p; + PluginParam speed_p; + PluginParam accel_p; + PluginParam goom_limit_p; + PluginParam goom_power_p; + PluginParam last_goom_p; + PluginParam last_biggoom_p; + PluginParam biggoom_speed_limit_p; + PluginParam biggoom_factor_p; + + PluginParameters params; /* contains the previously defined parameters. */ +}; + + +/** + * Allows FXs to know the current state of the plugin. + */ +struct _PLUGIN_INFO { + + /* public datas */ + + int nbParams; + PluginParameters *params; + + /* private datas */ + + struct _SIZE_TYPE { + int width; + int height; + int size; /* == screen.height * screen.width. */ + } screen; + + SoundInfo sound; + + int nbVisuals; + VisualFX **visuals; /* pointers on all the visual fx */ + + /** The known FX */ + VisualFX convolve_fx; + VisualFX star_fx; + VisualFX zoomFilter_fx; + VisualFX tentacles_fx; + VisualFX ifs_fx; + + /** image buffers */ + guint32 *pixel; + guint32 *back; + Pixel *p1, *p2; + Pixel *conv; + Pixel *outputBuf; + + /** state of goom */ + guint32 cycle; + GoomState states[STATES_MAX_NB]; + int statesNumber; + int statesRangeMax; + + GoomState *curGState; + + /** effet de ligne.. */ + GMLine *gmline1; + GMLine *gmline2; + + /** sinus table */ + int sintable[0x10000]; + + /* INTERNALS */ + + /** goom_update internals. + * I took all static variables from goom_update and put them here.. for the moment. + */ + struct { + int lockvar; /* pour empecher de nouveaux changements */ + int goomvar; /* boucle des gooms */ + int loopvar; /* mouvement des points */ + int stop_lines; + int ifs_incr; /* dessiner l'ifs (0 = non: > = increment) */ + int decay_ifs; /* disparition de l'ifs */ + int recay_ifs; /* dedisparition de l'ifs */ + int cyclesSinceLastChange; /* nombre de Cycle Depuis Dernier Changement */ + int drawLinesDuration; /* duree de la transition entre afficher les lignes ou pas */ + int lineMode; /* l'effet lineaire a dessiner */ + float switchMultAmount; /* SWITCHMULT (29.0f/30.0f) */ + int switchIncrAmount; /* 0x7f */ + float switchMult; /* 1.0f */ + int switchIncr; /* = SWITCHINCR; */ + int stateSelectionRnd; + int stateSelectionBlocker; + int previousZoomSpeed; + int timeOfTitleDisplay; + char titleText[1024]; + ZoomFilterData zoomFilterData; + } update; + + struct { + int numberOfLinesInMessage; + char message[0x800]; + int affiche; + int longueur; + } update_message; + + struct { + void (*draw_line) (Pixel *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny); + void (*zoom_filter) (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]); + } methods; + + GoomRandom *gRandom; + + GoomSL *scanner; + GoomSL *main_scanner; + const char *main_script_str; +}; + +void plugin_info_init(PluginInfo *p, int nbVisual); + +/* i = [0..p->nbVisual-1] */ +void plugin_info_add_visual(PluginInfo *p, int i, VisualFX *visual); + +#endif diff --git a/veejay-server/libgoom/goom_tools.c b/veejay-server/libgoom/goom_tools.c new file mode 100644 index 00000000..8bd6202f --- /dev/null +++ b/veejay-server/libgoom/goom_tools.c @@ -0,0 +1,25 @@ +#include "goom_tools.h" +#include + +GoomRandom *goom_random_init(int i) { + GoomRandom *grandom = (GoomRandom*)malloc(sizeof(GoomRandom)); + srand (i); + grandom->pos = 1; + goom_random_update_array(grandom, GOOM_NB_RAND); + return grandom; +} + +void goom_random_free(GoomRandom *grandom) { + free(grandom); +} + +void goom_random_update_array(GoomRandom *grandom, int numberOfValuesToChange) { + while (numberOfValuesToChange > 0) { +#if RAND_MAX < 0x10000 + grandom->array[grandom->pos++] = ((rand()<<16)+rand()) / 127; +#else + grandom->array[grandom->pos++] = rand() / 127; +#endif + numberOfValuesToChange--; + } +} diff --git a/veejay-server/libgoom/goom_tools.h b/veejay-server/libgoom/goom_tools.h new file mode 100644 index 00000000..31d044e4 --- /dev/null +++ b/veejay-server/libgoom/goom_tools.h @@ -0,0 +1,33 @@ +#ifndef _GOOMTOOLS_H +#define _GOOMTOOLS_H + +/** + * Random number generator wrapper for faster random number. + */ + +#define GOOM_NB_RAND 0x10000 + +typedef struct _GOOM_RANDOM { + int array[GOOM_NB_RAND]; + unsigned short pos; +} GoomRandom; + +GoomRandom *goom_random_init(int i); +void goom_random_free(GoomRandom *grandom); + +inline static int goom_random(GoomRandom *grandom) { + + grandom->pos++; /* works because pos is an unsigned short */ + return grandom->array[grandom->pos]; +} + +inline static int goom_irand(GoomRandom *grandom, int i) { + + grandom->pos++; + return grandom->array[grandom->pos] % i; +} + +/* called to change the specified number of value in the array, so that the array does not remain the same*/ +void goom_random_update_array(GoomRandom *grandom, int numberOfValuesToChange); + +#endif diff --git a/veejay-server/libgoom/goom_typedefs.h b/veejay-server/libgoom/goom_typedefs.h new file mode 100644 index 00000000..76036504 --- /dev/null +++ b/veejay-server/libgoom/goom_typedefs.h @@ -0,0 +1,11 @@ +#ifndef _GOOM_TYPEDEFS_H +#define _GOOM_TYPEDEFS_H + +typedef struct _PLUGIN_INFO PluginInfo; +typedef struct _SOUND_INFO SoundInfo; +typedef struct _GMLINE GMLine; +typedef struct _GMUNITPOINTER GMUnitPointer; +typedef struct _ZOOM_FILTER_DATA ZoomFilterData; +typedef struct _VISUAL_FX VisualFX; + +#endif diff --git a/veejay-server/libgoom/goom_visual_fx.h b/veejay-server/libgoom/goom_visual_fx.h new file mode 100644 index 00000000..6939ac80 --- /dev/null +++ b/veejay-server/libgoom/goom_visual_fx.h @@ -0,0 +1,26 @@ +#ifndef _VISUAL_FX_H +#define _VISUAL_FX_H + +/** + * File created on 2003-05-21 by Jeko. + * (c)2003, JC Hoelt for iOS-software. + * + * LGPL Licence. + * If you use this file on a visual program, + * please make my name being visible on it. + */ + +#include "goom_config_param.h" +#include "goom_graphic.h" +#include "goom_typedefs.h" + +struct _VISUAL_FX { + void (*init) (struct _VISUAL_FX *_this, PluginInfo *info); + void (*free) (struct _VISUAL_FX *_this); + void (*apply) (struct _VISUAL_FX *_this, Pixel *src, Pixel *dest, PluginInfo *info); + void *fx_data; + + PluginParameters *params; +}; + +#endif diff --git a/veejay-server/libgoom/goomsl.c b/veejay-server/libgoom/goomsl.c new file mode 100644 index 00000000..e978506d --- /dev/null +++ b/veejay-server/libgoom/goomsl.c @@ -0,0 +1,1509 @@ +#include +#include +#include +#include +#include "goomsl.h" +#include "goomsl_private.h" +#include "goomsl_yacc.h" + +/*#define TRACE_SCRIPT*/ + + /* {{{ definition of the instructions number */ +#define INSTR_SETI_VAR_INTEGER 1 +#define INSTR_SETI_VAR_VAR 2 +#define INSTR_SETF_VAR_FLOAT 3 +#define INSTR_SETF_VAR_VAR 4 +#define INSTR_NOP 5 +/* #define INSTR_JUMP 6 */ +#define INSTR_SETP_VAR_PTR 7 +#define INSTR_SETP_VAR_VAR 8 +#define INSTR_SUBI_VAR_INTEGER 9 +#define INSTR_SUBI_VAR_VAR 10 +#define INSTR_SUBF_VAR_FLOAT 11 +#define INSTR_SUBF_VAR_VAR 12 +#define INSTR_ISLOWERF_VAR_VAR 13 +#define INSTR_ISLOWERF_VAR_FLOAT 14 +#define INSTR_ISLOWERI_VAR_VAR 15 +#define INSTR_ISLOWERI_VAR_INTEGER 16 +#define INSTR_ADDI_VAR_INTEGER 17 +#define INSTR_ADDI_VAR_VAR 18 +#define INSTR_ADDF_VAR_FLOAT 19 +#define INSTR_ADDF_VAR_VAR 20 +#define INSTR_MULI_VAR_INTEGER 21 +#define INSTR_MULI_VAR_VAR 22 +#define INSTR_MULF_VAR_FLOAT 23 +#define INSTR_MULF_VAR_VAR 24 +#define INSTR_DIVI_VAR_INTEGER 25 +#define INSTR_DIVI_VAR_VAR 26 +#define INSTR_DIVF_VAR_FLOAT 27 +#define INSTR_DIVF_VAR_VAR 28 +/* #define INSTR_JZERO 29 */ +#define INSTR_ISEQUALP_VAR_VAR 30 +#define INSTR_ISEQUALP_VAR_PTR 31 +#define INSTR_ISEQUALI_VAR_VAR 32 +#define INSTR_ISEQUALI_VAR_INTEGER 33 +#define INSTR_ISEQUALF_VAR_VAR 34 +#define INSTR_ISEQUALF_VAR_FLOAT 35 +/* #define INSTR_CALL 36 */ +/* #define INSTR_RET 37 */ +/* #define INSTR_EXT_CALL 38 */ +#define INSTR_NOT_VAR 39 +/* #define INSTR_JNZERO 40 */ +#define INSTR_SETS_VAR_VAR 41 +#define INSTR_ISEQUALS_VAR_VAR 42 +#define INSTR_ADDS_VAR_VAR 43 +#define INSTR_SUBS_VAR_VAR 44 +#define INSTR_MULS_VAR_VAR 45 +#define INSTR_DIVS_VAR_VAR 46 + + /* }}} */ +/* {{{ definition of the validation error types */ +static const char *VALIDATE_OK = "ok"; +#define VALIDATE_ERROR "error while validating " +#define VALIDATE_TODO "todo" +#define VALIDATE_SYNTHAX_ERROR "synthax error" +#define VALIDATE_NO_SUCH_INT "no such integer variable" +#define VALIDATE_NO_SUCH_VAR "no such variable" +#define VALIDATE_NO_SUCH_DEST_VAR "no such destination variable" +#define VALIDATE_NO_SUCH_SRC_VAR "no such src variable" +/* }}} */ + + /***********************************/ + /* PROTOTYPE OF INTERNAL FUNCTIONS */ +/***********************************/ + +/* {{{ */ +static void gsl_instr_free(Instruction *_this); +static const char *gsl_instr_validate(Instruction *_this); +static void gsl_instr_display(Instruction *_this); + +static InstructionFlow *iflow_new(void); +static void iflow_add_instr(InstructionFlow *_this, Instruction *instr); +static void iflow_clean(InstructionFlow *_this); +static void iflow_free(InstructionFlow *_this); +static void iflow_execute(FastInstructionFlow *_this, GoomSL *gsl); +/* }}} */ + + /************************************/ + /* DEFINITION OF INTERNAL FUNCTIONS */ +/************************************/ + +void iflow_free(InstructionFlow *_this) +{ /* {{{ */ + goom_hash_free(_this->labels); + free(_this); /*TODO: finir cette fonction */ +} /* }}} */ + +void iflow_clean(InstructionFlow *_this) +{ /* {{{ */ + /* TODO: clean chaque instruction du flot */ + _this->number = 0; + goom_hash_free(_this->labels); + _this->labels = goom_hash_new(); +} /* }}} */ + +InstructionFlow *iflow_new(void) +{ /* {{{ */ + InstructionFlow *_this = (InstructionFlow*)malloc(sizeof(InstructionFlow)); + _this->number = 0; + _this->tabsize = 6; + _this->instr = (Instruction**)malloc(_this->tabsize * sizeof(Instruction*)); + _this->labels = goom_hash_new(); + + return _this; +} /* }}} */ + +void iflow_add_instr(InstructionFlow *_this, Instruction *instr) +{ /* {{{ */ + if (_this->number == _this->tabsize) { + _this->tabsize *= 2; + _this->instr = (Instruction**)realloc(_this->instr, _this->tabsize * sizeof(Instruction*)); + } + _this->instr[_this->number] = instr; + instr->address = _this->number; + _this->number++; +} /* }}} */ + +void gsl_instr_set_namespace(Instruction *_this, GoomHash *ns) +{ /* {{{ */ + if (_this->cur_param <= 0) { + fprintf(stderr, "ERROR: Line %d, No more params to instructions\n", _this->line_number); + exit(1); + } + _this->vnamespace[_this->cur_param-1] = ns; +} /* }}} */ + +void gsl_instr_add_param(Instruction *instr, char *param, int type) +{ /* {{{ */ + int len; + if (instr==NULL) + return; + if (instr->cur_param==0) + return; + --instr->cur_param; + len = strlen(param); + instr->params[instr->cur_param] = (char*)malloc(len+1); + strcpy(instr->params[instr->cur_param], param); + instr->types[instr->cur_param] = type; + if (instr->cur_param == 0) { + + const char *result = gsl_instr_validate(instr); + if (result != VALIDATE_OK) { + printf("ERROR: Line %d: ", instr->parent->num_lines + 1); + gsl_instr_display(instr); + printf("... %s\n", result); + instr->parent->compilationOK = 0; + exit(1); + } + +#if USE_JITC_X86 + iflow_add_instr(instr->parent->iflow, instr); +#else + if (instr->id != INSTR_NOP) + iflow_add_instr(instr->parent->iflow, instr); + else + gsl_instr_free(instr); +#endif + } +} /* }}} */ + +Instruction *gsl_instr_init(GoomSL *parent, const char *name, int id, int nb_param, int line_number) +{ /* {{{ */ + Instruction *instr = (Instruction*)malloc(sizeof(Instruction)); + instr->params = (char**)malloc(nb_param*sizeof(char*)); + instr->vnamespace = (GoomHash**)malloc(nb_param*sizeof(GoomHash*)); + instr->types = (int*)malloc(nb_param*sizeof(int)); + instr->cur_param = instr->nb_param = nb_param; + instr->parent = parent; + instr->id = id; + instr->name = name; + instr->jump_label = NULL; + instr->line_number = line_number; + return instr; +} /* }}} */ + +void gsl_instr_free(Instruction *_this) +{ /* {{{ */ + int i; + free(_this->types); + for (i=_this->cur_param; i<_this->nb_param; ++i) + free(_this->params[i]); + free(_this->params); + free(_this); +} /* }}} */ + +void gsl_instr_display(Instruction *_this) +{ /* {{{ */ + int i=_this->nb_param-1; + printf("%s", _this->name); + while(i>=_this->cur_param) { + printf(" %s", _this->params[i]); + --i; + } +} /* }}} */ + + /****************************************/ + /* VALIDATION OF INSTRUCTION PARAMETERS */ +/****************************************/ + +static const char *validate_v_v(Instruction *_this) +{ /* {{{ */ + HashValue *dest = goom_hash_get(_this->vnamespace[1], _this->params[1]); + HashValue *src = goom_hash_get(_this->vnamespace[0], _this->params[0]); + + if (dest == NULL) { + return VALIDATE_NO_SUCH_DEST_VAR; + } + if (src == NULL) { + return VALIDATE_NO_SUCH_SRC_VAR; + } + _this->data.udest.var = dest->ptr; + _this->data.usrc.var = src->ptr; + return VALIDATE_OK; +} /* }}} */ + +static const char *validate_v_i(Instruction *_this) +{ /* {{{ */ + HashValue *dest = goom_hash_get(_this->vnamespace[1], _this->params[1]); + _this->data.usrc.value_int = strtol(_this->params[0],NULL,0); + + if (dest == NULL) { + return VALIDATE_NO_SUCH_INT; + } + _this->data.udest.var = dest->ptr; + return VALIDATE_OK; +} /* }}} */ + +static const char *validate_v_p(Instruction *_this) +{ /* {{{ */ + HashValue *dest = goom_hash_get(_this->vnamespace[1], _this->params[1]); + _this->data.usrc.value_ptr = strtol(_this->params[0],NULL,0); + + if (dest == NULL) { + return VALIDATE_NO_SUCH_INT; + } + _this->data.udest.var = dest->ptr; + return VALIDATE_OK; +} /* }}} */ + +static const char *validate_v_f(Instruction *_this) +{ /* {{{ */ + HashValue *dest = goom_hash_get(_this->vnamespace[1], _this->params[1]); + _this->data.usrc.value_float = atof(_this->params[0]); + + if (dest == NULL) { + return VALIDATE_NO_SUCH_VAR; + } + _this->data.udest.var = dest->ptr; + return VALIDATE_OK; +} /* }}} */ + +static const char *validate(Instruction *_this, + int vf_f_id, int vf_v_id, + int vi_i_id, int vi_v_id, + int vp_p_id, int vp_v_id, + int vs_v_id) +{ /* {{{ */ + if ((_this->types[1] == TYPE_FVAR) && (_this->types[0] == TYPE_FLOAT)) { + _this->id = vf_f_id; + return validate_v_f(_this); + } + else if ((_this->types[1] == TYPE_FVAR) && (_this->types[0] == TYPE_FVAR)) { + _this->id = vf_v_id; + return validate_v_v(_this); + } + else if ((_this->types[1] == TYPE_IVAR) && (_this->types[0] == TYPE_INTEGER)) { + _this->id = vi_i_id; + return validate_v_i(_this); + } + else if ((_this->types[1] == TYPE_IVAR) && (_this->types[0] == TYPE_IVAR)) { + _this->id = vi_v_id; + return validate_v_v(_this); + } + else if ((_this->types[1] == TYPE_PVAR) && (_this->types[0] == TYPE_PTR)) { + if (vp_p_id == INSTR_NOP) return VALIDATE_ERROR; + _this->id = vp_p_id; + return validate_v_p(_this); + } + else if ((_this->types[1] == TYPE_PVAR) && (_this->types[0] == TYPE_PVAR)) { + _this->id = vp_v_id; + if (vp_v_id == INSTR_NOP) return VALIDATE_ERROR; + return validate_v_v(_this); + } + else if ((_this->types[1] < FIRST_RESERVED) && (_this->types[1] >= 0) && (_this->types[0] == _this->types[1])) { + _this->id = vs_v_id; + if (vs_v_id == INSTR_NOP) return "Impossible operation to perform between two structs"; + return validate_v_v(_this); + } + return VALIDATE_ERROR; +} /* }}} */ + +const char *gsl_instr_validate(Instruction *_this) +{ /* {{{ */ + if (_this->id != INSTR_EXT_CALL) { + int i = _this->nb_param; + while (i>0) + { + i--; + if (_this->types[i] == TYPE_VAR) { + int type = gsl_type_of_var(_this->vnamespace[i], _this->params[i]); + + if (type == INSTR_INT) + _this->types[i] = TYPE_IVAR; + else if (type == INSTR_FLOAT) + _this->types[i] = TYPE_FVAR; + else if (type == INSTR_PTR) + _this->types[i] = TYPE_PVAR; + else if ((type >= 0) && (type < FIRST_RESERVED)) + _this->types[i] = type; + else fprintf(stderr,"WARNING: Line %d, %s has no namespace\n", _this->line_number, _this->params[i]); + } + } + } + + switch (_this->id) { + + /* set */ + case INSTR_SET: + return validate(_this, + INSTR_SETF_VAR_FLOAT, INSTR_SETF_VAR_VAR, + INSTR_SETI_VAR_INTEGER, INSTR_SETI_VAR_VAR, + INSTR_SETP_VAR_PTR, INSTR_SETP_VAR_VAR, + INSTR_SETS_VAR_VAR); + + /* extcall */ + case INSTR_EXT_CALL: + if (_this->types[0] == TYPE_VAR) { + HashValue *fval = goom_hash_get(_this->parent->functions, _this->params[0]); + if (fval) { + _this->data.udest.external_function = (struct _ExternalFunctionStruct*)fval->ptr; + return VALIDATE_OK; + } + } + return VALIDATE_ERROR; + + /* call */ + case INSTR_CALL: + if (_this->types[0] == TYPE_LABEL) { + _this->jump_label = _this->params[0]; + return VALIDATE_OK; + } + return VALIDATE_ERROR; + + /* ret */ + case INSTR_RET: + return VALIDATE_OK; + + /* jump */ + case INSTR_JUMP: + + if (_this->types[0] == TYPE_LABEL) { + _this->jump_label = _this->params[0]; + return VALIDATE_OK; + } + return VALIDATE_ERROR; + + /* jzero / jnzero */ + case INSTR_JZERO: + case INSTR_JNZERO: + + if (_this->types[0] == TYPE_LABEL) { + _this->jump_label = _this->params[0]; + return VALIDATE_OK; + } + return VALIDATE_ERROR; + + /* label */ + case INSTR_LABEL: + + if (_this->types[0] == TYPE_LABEL) { + _this->id = INSTR_NOP; + _this->nop_label = _this->params[0]; + goom_hash_put_int(_this->parent->iflow->labels, _this->params[0], _this->parent->iflow->number); + return VALIDATE_OK; + } + return VALIDATE_ERROR; + + /* isequal */ + case INSTR_ISEQUAL: + return validate(_this, + INSTR_ISEQUALF_VAR_FLOAT, INSTR_ISEQUALF_VAR_VAR, + INSTR_ISEQUALI_VAR_INTEGER, INSTR_ISEQUALI_VAR_VAR, + INSTR_ISEQUALP_VAR_PTR, INSTR_ISEQUALP_VAR_VAR, + INSTR_ISEQUALS_VAR_VAR); + + /* not */ + case INSTR_NOT: + _this->id = INSTR_NOT_VAR; + return VALIDATE_OK; + + /* islower */ + case INSTR_ISLOWER: + return validate(_this, + INSTR_ISLOWERF_VAR_FLOAT, INSTR_ISLOWERF_VAR_VAR, + INSTR_ISLOWERI_VAR_INTEGER, INSTR_ISLOWERI_VAR_VAR, + INSTR_NOP, INSTR_NOP, INSTR_NOP); + + /* add */ + case INSTR_ADD: + return validate(_this, + INSTR_ADDF_VAR_FLOAT, INSTR_ADDF_VAR_VAR, + INSTR_ADDI_VAR_INTEGER, INSTR_ADDI_VAR_VAR, + INSTR_NOP, INSTR_NOP, + INSTR_ADDS_VAR_VAR); + + /* mul */ + case INSTR_MUL: + return validate(_this, + INSTR_MULF_VAR_FLOAT, INSTR_MULF_VAR_VAR, + INSTR_MULI_VAR_INTEGER, INSTR_MULI_VAR_VAR, + INSTR_NOP, INSTR_NOP, + INSTR_MULS_VAR_VAR); + + /* sub */ + case INSTR_SUB: + return validate(_this, + INSTR_SUBF_VAR_FLOAT, INSTR_SUBF_VAR_VAR, + INSTR_SUBI_VAR_INTEGER, INSTR_SUBI_VAR_VAR, + INSTR_NOP, INSTR_NOP, + INSTR_SUBS_VAR_VAR); + + /* div */ + case INSTR_DIV: + return validate(_this, + INSTR_DIVF_VAR_FLOAT, INSTR_DIVF_VAR_VAR, + INSTR_DIVI_VAR_INTEGER, INSTR_DIVI_VAR_VAR, + INSTR_NOP,INSTR_NOP, + INSTR_DIVS_VAR_VAR); + + default: + return VALIDATE_TODO; + } + return VALIDATE_ERROR; +} /* }}} */ + + /*************/ + /* EXECUTION */ +/*************/ +void iflow_execute(FastInstructionFlow *_this, GoomSL *gsl) +{ /* {{{ */ + int flag = 0; + int ip = 0; + FastInstruction *instr = _this->instr; + int stack[0x10000]; + int stack_pointer = 0; + + stack[stack_pointer++] = -1; + + /* Quelques Macro pour rendre le code plus lisible */ +#define pSRC_VAR instr[ip].data.usrc.var +#define SRC_VAR_INT *instr[ip].data.usrc.var_int +#define SRC_VAR_FLOAT *instr[ip].data.usrc.var_float +#define SRC_VAR_PTR *instr[ip].data.usrc.var_ptr + +#define pDEST_VAR instr[ip].data.udest.var +#define DEST_VAR_INT *instr[ip].data.udest.var_int +#define DEST_VAR_FLOAT *instr[ip].data.udest.var_float +#define DEST_VAR_PTR *instr[ip].data.udest.var_ptr + +#define VALUE_INT instr[ip].data.usrc.value_int +#define VALUE_FLOAT instr[ip].data.usrc.value_float +#define VALUE_PTR instr[ip].data.usrc.value_ptr + +#define JUMP_OFFSET instr[ip].data.udest.jump_offset + +#define SRC_STRUCT_ID instr[ip].data.usrc.var_int[-1] +#define DEST_STRUCT_ID instr[ip].data.udest.var_int[-1] +#define SRC_STRUCT_IBLOCK(i) gsl->gsl_struct[SRC_STRUCT_ID]->iBlock[i] +#define SRC_STRUCT_FBLOCK(i) gsl->gsl_struct[SRC_STRUCT_ID]->fBlock[i] +#define DEST_STRUCT_IBLOCK(i) gsl->gsl_struct[DEST_STRUCT_ID]->iBlock[i] +#define DEST_STRUCT_FBLOCK(i) gsl->gsl_struct[DEST_STRUCT_ID]->fBlock[i] +#define DEST_STRUCT_IBLOCK_VAR(i,j) \ + ((int*)((char*)pDEST_VAR + gsl->gsl_struct[DEST_STRUCT_ID]->iBlock[i].data))[j] +#define DEST_STRUCT_FBLOCK_VAR(i,j) \ + ((float*)((char*)pDEST_VAR + gsl->gsl_struct[DEST_STRUCT_ID]->fBlock[i].data))[j] +#define SRC_STRUCT_IBLOCK_VAR(i,j) \ + ((int*)((char*)pSRC_VAR + gsl->gsl_struct[SRC_STRUCT_ID]->iBlock[i].data))[j] +#define SRC_STRUCT_FBLOCK_VAR(i,j) \ + ((float*)((char*)pSRC_VAR + gsl->gsl_struct[SRC_STRUCT_ID]->fBlock[i].data))[j] +#define DEST_STRUCT_SIZE gsl->gsl_struct[DEST_STRUCT_ID]->size + + while (1) + { + int i; +#ifdef TRACE_SCRIPT + printf("execute "); gsl_instr_display(instr[ip].proto); printf("\n"); +#endif + switch (instr[ip].id) { + + /* SET.I */ + case INSTR_SETI_VAR_INTEGER: + DEST_VAR_INT = VALUE_INT; + ++ip; break; + + case INSTR_SETI_VAR_VAR: + DEST_VAR_INT = SRC_VAR_INT; + ++ip; break; + + /* SET.F */ + case INSTR_SETF_VAR_FLOAT: + DEST_VAR_FLOAT = VALUE_FLOAT; + ++ip; break; + + case INSTR_SETF_VAR_VAR: + DEST_VAR_FLOAT = SRC_VAR_FLOAT; + ++ip; break; + + /* SET.P */ + case INSTR_SETP_VAR_VAR: + DEST_VAR_PTR = SRC_VAR_PTR; + ++ip; break; + + case INSTR_SETP_VAR_PTR: + DEST_VAR_PTR = VALUE_PTR; + ++ip; break; + + /* JUMP */ + case INSTR_JUMP: + ip += JUMP_OFFSET; break; + + /* JZERO */ + case INSTR_JZERO: + ip += (flag ? 1 : JUMP_OFFSET); break; + + case INSTR_NOP: + ++ip; break; + + /* ISEQUAL.P */ + case INSTR_ISEQUALP_VAR_VAR: + flag = (DEST_VAR_PTR == SRC_VAR_PTR); + ++ip; break; + + case INSTR_ISEQUALP_VAR_PTR: + flag = (DEST_VAR_PTR == VALUE_PTR); + ++ip; break; + + /* ISEQUAL.I */ + case INSTR_ISEQUALI_VAR_VAR: + flag = (DEST_VAR_INT == SRC_VAR_INT); + ++ip; break; + + case INSTR_ISEQUALI_VAR_INTEGER: + flag = (DEST_VAR_INT == VALUE_INT); + ++ip; break; + + /* ISEQUAL.F */ + case INSTR_ISEQUALF_VAR_VAR: + flag = (DEST_VAR_FLOAT == SRC_VAR_FLOAT); + ++ip; break; + + case INSTR_ISEQUALF_VAR_FLOAT: + flag = (DEST_VAR_FLOAT == VALUE_FLOAT); + ++ip; break; + + /* ISLOWER.I */ + case INSTR_ISLOWERI_VAR_VAR: + flag = (DEST_VAR_INT < SRC_VAR_INT); + ++ip; break; + + case INSTR_ISLOWERI_VAR_INTEGER: + flag = (DEST_VAR_INT < VALUE_INT); + ++ip; break; + + /* ISLOWER.F */ + case INSTR_ISLOWERF_VAR_VAR: + flag = (DEST_VAR_FLOAT < SRC_VAR_FLOAT); + ++ip; break; + + case INSTR_ISLOWERF_VAR_FLOAT: + flag = (DEST_VAR_FLOAT < VALUE_FLOAT); + ++ip; break; + + /* ADD.I */ + case INSTR_ADDI_VAR_VAR: + DEST_VAR_INT += SRC_VAR_INT; + ++ip; break; + + case INSTR_ADDI_VAR_INTEGER: + DEST_VAR_INT += VALUE_INT; + ++ip; break; + + /* ADD.F */ + case INSTR_ADDF_VAR_VAR: + DEST_VAR_FLOAT += SRC_VAR_FLOAT; + ++ip; break; + + case INSTR_ADDF_VAR_FLOAT: + DEST_VAR_FLOAT += VALUE_FLOAT; + ++ip; break; + + /* MUL.I */ + case INSTR_MULI_VAR_VAR: + DEST_VAR_INT *= SRC_VAR_INT; + ++ip; break; + + case INSTR_MULI_VAR_INTEGER: + DEST_VAR_INT *= VALUE_INT; + ++ip; break; + + /* MUL.F */ + case INSTR_MULF_VAR_FLOAT: + DEST_VAR_FLOAT *= VALUE_FLOAT; + ++ip; break; + + case INSTR_MULF_VAR_VAR: + DEST_VAR_FLOAT *= SRC_VAR_FLOAT; + ++ip; break; + + /* DIV.I */ + case INSTR_DIVI_VAR_VAR: + DEST_VAR_INT /= SRC_VAR_INT; + ++ip; break; + + case INSTR_DIVI_VAR_INTEGER: + DEST_VAR_INT /= VALUE_INT; + ++ip; break; + + /* DIV.F */ + case INSTR_DIVF_VAR_FLOAT: + DEST_VAR_FLOAT /= VALUE_FLOAT; + ++ip; break; + + case INSTR_DIVF_VAR_VAR: + DEST_VAR_FLOAT /= SRC_VAR_FLOAT; + ++ip; break; + + /* SUB.I */ + case INSTR_SUBI_VAR_VAR: + DEST_VAR_INT -= SRC_VAR_INT; + ++ip; break; + + case INSTR_SUBI_VAR_INTEGER: + DEST_VAR_INT -= VALUE_INT; + ++ip; break; + + /* SUB.F */ + case INSTR_SUBF_VAR_FLOAT: + DEST_VAR_FLOAT -= VALUE_FLOAT; + ++ip; break; + + case INSTR_SUBF_VAR_VAR: + DEST_VAR_FLOAT -= SRC_VAR_FLOAT; + ++ip; break; + + /* CALL */ + case INSTR_CALL: + stack[stack_pointer++] = ip + 1; + ip += JUMP_OFFSET; break; + + /* RET */ + case INSTR_RET: + ip = stack[--stack_pointer]; + if (ip<0) return; + break; + + /* EXT_CALL */ + case INSTR_EXT_CALL: + instr[ip].data.udest.external_function->function(gsl, gsl->vars, instr[ip].data.udest.external_function->vars); + ++ip; break; + + /* NOT */ + case INSTR_NOT_VAR: + flag = !flag; + ++ip; break; + + /* JNZERO */ + case INSTR_JNZERO: + ip += (flag ? JUMP_OFFSET : 1); break; + + case INSTR_SETS_VAR_VAR: + memcpy(pDEST_VAR, pSRC_VAR, DEST_STRUCT_SIZE); + ++ip; break; + + case INSTR_ISEQUALS_VAR_VAR: + break; + + case INSTR_ADDS_VAR_VAR: + /* process integers */ + i=0; + while (DEST_STRUCT_IBLOCK(i).size > 0) { + int j=DEST_STRUCT_IBLOCK(i).size; + while (j--) { + DEST_STRUCT_IBLOCK_VAR(i,j) += SRC_STRUCT_IBLOCK_VAR(i,j); + } + ++i; + } + /* process floats */ + i=0; + while (DEST_STRUCT_FBLOCK(i).size > 0) { + int j=DEST_STRUCT_FBLOCK(i).size; + while (j--) { + DEST_STRUCT_FBLOCK_VAR(i,j) += SRC_STRUCT_FBLOCK_VAR(i,j); + } + ++i; + } + ++ip; break; + + case INSTR_SUBS_VAR_VAR: + /* process integers */ + i=0; + while (DEST_STRUCT_IBLOCK(i).size > 0) { + int j=DEST_STRUCT_IBLOCK(i).size; + while (j--) { + DEST_STRUCT_IBLOCK_VAR(i,j) -= SRC_STRUCT_IBLOCK_VAR(i,j); + } + ++i; + } + /* process floats */ + i=0; + while (DEST_STRUCT_FBLOCK(i).size > 0) { + int j=DEST_STRUCT_FBLOCK(i).size; + while (j--) { + DEST_STRUCT_FBLOCK_VAR(i,j) -= SRC_STRUCT_FBLOCK_VAR(i,j); + } + ++i; + } + ++ip; break; + + case INSTR_MULS_VAR_VAR: + /* process integers */ + i=0; + while (DEST_STRUCT_IBLOCK(i).size > 0) { + int j=DEST_STRUCT_IBLOCK(i).size; + while (j--) { + DEST_STRUCT_IBLOCK_VAR(i,j) *= SRC_STRUCT_IBLOCK_VAR(i,j); + } + ++i; + } + /* process floats */ + i=0; + while (DEST_STRUCT_FBLOCK(i).size > 0) { + int j=DEST_STRUCT_FBLOCK(i).size; + while (j--) { + DEST_STRUCT_FBLOCK_VAR(i,j) *= SRC_STRUCT_FBLOCK_VAR(i,j); + } + ++i; + } + ++ip; break; + + case INSTR_DIVS_VAR_VAR: + /* process integers */ + i=0; + while (DEST_STRUCT_IBLOCK(i).size > 0) { + int j=DEST_STRUCT_IBLOCK(i).size; + while (j--) { + DEST_STRUCT_IBLOCK_VAR(i,j) /= SRC_STRUCT_IBLOCK_VAR(i,j); + } + ++i; + } + /* process floats */ + i=0; + while (DEST_STRUCT_FBLOCK(i).size > 0) { + int j=DEST_STRUCT_FBLOCK(i).size; + while (j--) { + DEST_STRUCT_FBLOCK_VAR(i,j) /= SRC_STRUCT_FBLOCK_VAR(i,j); + } + ++i; + } + ++ip; break; + + default: + printf("NOT IMPLEMENTED : %d\n", instr[ip].id); + ++ip; + exit(1); + } + } +} /* }}} */ + +int gsl_malloc(GoomSL *_this, int size) +{ /* {{{ */ + if (_this->nbPtr >= _this->ptrArraySize) { + _this->ptrArraySize *= 2; + _this->ptrArray = (void**)realloc(_this->ptrArray, sizeof(void*) * _this->ptrArraySize); + } + _this->ptrArray[_this->nbPtr] = malloc(size); + return _this->nbPtr++; +} /* }}} */ + +void *gsl_get_ptr(GoomSL *_this, int id) +{ /* {{{ */ + if ((id>=0)&&(id<_this->nbPtr)) + return _this->ptrArray[id]; + fprintf(stderr,"INVALID GET PTR 0x%08x\n", id); + return NULL; +} /* }}} */ + +void gsl_free_ptr(GoomSL *_this, int id) +{ /* {{{ */ + if ((id>=0)&&(id<_this->nbPtr)) { + free(_this->ptrArray[id]); + _this->ptrArray[id] = 0; + } +} /* }}} */ + +void gsl_enternamespace(const char *name) +{ /* {{{ */ + HashValue *val = goom_hash_get(currentGoomSL->functions, name); + if (val) { + ExternalFunctionStruct *function = (ExternalFunctionStruct*)val->ptr; + currentGoomSL->currentNS++; + currentGoomSL->namespaces[currentGoomSL->currentNS] = function->vars; + } + else { + fprintf(stderr, "ERROR: Line %d, Could not find namespace: %s\n", currentGoomSL->num_lines, name); + exit(1); + } +} /* }}} */ + +void gsl_reenternamespace(GoomHash *nsinfo) { + currentGoomSL->currentNS++; + currentGoomSL->namespaces[currentGoomSL->currentNS] = nsinfo; +} + +GoomHash *gsl_leavenamespace(void) +{ /* {{{ */ + currentGoomSL->currentNS--; + return currentGoomSL->namespaces[currentGoomSL->currentNS+1]; +} /* }}} */ + +GoomHash *gsl_find_namespace(const char *name) +{ /* {{{ */ + int i; + for (i=currentGoomSL->currentNS;i>=0;--i) { + if (goom_hash_get(currentGoomSL->namespaces[i], name)) + return currentGoomSL->namespaces[i]; + } + return NULL; +} /* }}} */ + +void gsl_declare_task(const char *name) +{ /* {{{ */ + if (goom_hash_get(currentGoomSL->functions, name)) { + return; + } + else { + ExternalFunctionStruct *gef = (ExternalFunctionStruct*)malloc(sizeof(ExternalFunctionStruct)); + gef->function = 0; + gef->vars = goom_hash_new(); + gef->is_extern = 0; + goom_hash_put_ptr(currentGoomSL->functions, name, (void*)gef); + } +} /* }}} */ + +void gsl_declare_external_task(const char *name) +{ /* {{{ */ + if (goom_hash_get(currentGoomSL->functions, name)) { + fprintf(stderr, "ERROR: Line %d, Duplicate declaration of %s\n", currentGoomSL->num_lines, name); + return; + } + else { + ExternalFunctionStruct *gef = (ExternalFunctionStruct*)malloc(sizeof(ExternalFunctionStruct)); + gef->function = 0; + gef->vars = goom_hash_new(); + gef->is_extern = 1; + goom_hash_put_ptr(currentGoomSL->functions, name, (void*)gef); + } +} /* }}} */ + +static void reset_scanner(GoomSL *gss) +{ /* {{{ */ + gss->num_lines = 0; + gss->instr = NULL; + iflow_clean(gss->iflow); + + /* reset variables */ + goom_hash_free(gss->vars); + gss->vars = goom_hash_new(); + gss->currentNS = 0; + gss->namespaces[0] = gss->vars; + + goom_hash_free(gss->structIDS); + gss->structIDS = goom_hash_new(); + + while (gss->nbStructID > 0) { + int i; + gss->nbStructID--; + for(i=0;igsl_struct[gss->nbStructID]->nbFields;++i) + free(gss->gsl_struct[gss->nbStructID]->fields[i]); + free(gss->gsl_struct[gss->nbStructID]); + } + + gss->compilationOK = 1; + + goom_heap_delete(gss->data_heap); + gss->data_heap = goom_heap_new(); +} /* }}} */ + +static void calculate_labels(InstructionFlow *iflow) +{ /* {{{ */ + int i = 0; + while (i < iflow->number) { + Instruction *instr = iflow->instr[i]; + if (instr->jump_label) { + HashValue *label = goom_hash_get(iflow->labels,instr->jump_label); + if (label) { + instr->data.udest.jump_offset = -instr->address + label->i; + } + else { + fprintf(stderr, "ERROR: Line %d, Could not find label %s\n", instr->line_number, instr->jump_label); + instr->id = INSTR_NOP; + instr->nop_label = 0; + exit(1); + } + } + ++i; + } +} /* }}} */ + +static int powerOfTwo(int i) +{ + int b; + for (b=0;b<31;b++) + if (i == (1<iflow->number; + int i; +#ifdef USE_JITC_X86 + + /* pour compatibilite avec les MACROS servant a execution */ + int ip = 0; + GoomSL *gsl = currentGoomSL; + + JitcX86Env *jitc; + + if (currentGoomSL->jitc != NULL) + jitc_x86_delete(currentGoomSL->jitc); + jitc = currentGoomSL->jitc = jitc_x86_env_new(0xffff); + currentGoomSL->jitc_func = jitc_prepare_func(jitc); + +#if 0 +#define SRC_STRUCT_ID instr[ip].data.usrc.var_int[-1] +#define DEST_STRUCT_ID instr[ip].data.udest.var_int[-1] +#define SRC_STRUCT_IBLOCK(i) gsl->gsl_struct[SRC_STRUCT_ID]->iBlock[i] +#define SRC_STRUCT_FBLOCK(i) gsl->gsl_struct[SRC_STRUCT_ID]->fBlock[i] +#define DEST_STRUCT_IBLOCK(i) gsl->gsl_struct[DEST_STRUCT_ID]->iBlock[i] +#define DEST_STRUCT_FBLOCK(i) gsl->gsl_struct[DEST_STRUCT_ID]->fBlock[i] +#define DEST_STRUCT_IBLOCK_VAR(i,j) \ + ((int*)((char*)pDEST_VAR + gsl->gsl_struct[DEST_STRUCT_ID]->iBlock[i].data))[j] +#define DEST_STRUCT_FBLOCK_VAR(i,j) \ + ((float*)((char*)pDEST_VAR + gsl->gsl_struct[DEST_STRUCT_ID]->fBlock[i].data))[j] +#define SRC_STRUCT_IBLOCK_VAR(i,j) \ + ((int*)((char*)pSRC_VAR + gsl->gsl_struct[SRC_STRUCT_ID]->iBlock[i].data))[j] +#define SRC_STRUCT_FBLOCK_VAR(i,j) \ + ((float*)((char*)pSRC_VAR + gsl->gsl_struct[SRC_STRUCT_ID]->fBlock[i].data))[j] +#define DEST_STRUCT_SIZE gsl->gsl_struct[DEST_STRUCT_ID]->size +#endif + + JITC_JUMP_LABEL(jitc, "__very_end__"); + JITC_ADD_LABEL (jitc, "__very_start__"); + + for (i=0;iiflow->instr[i]; + switch (instr->id) { + case INSTR_SETI_VAR_INTEGER : + jitc_add(jitc, "mov [$d], $d", instr->data.udest.var_int, instr->data.usrc.value_int); + break; + case INSTR_SETI_VAR_VAR : + jitc_add(jitc, "mov eax, [$d]", instr->data.usrc.var_int); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_int); + break; + /* SET.F */ + case INSTR_SETF_VAR_FLOAT : + jitc_add(jitc, "mov [$d], $d", instr->data.udest.var_float, *(int*)(&instr->data.usrc.value_float)); + break; + case INSTR_SETF_VAR_VAR : + jitc_add(jitc, "mov eax, [$d]", instr->data.usrc.var_float); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_float); + break; + case INSTR_NOP : + if (instr->nop_label != 0) + JITC_ADD_LABEL(jitc, instr->nop_label); + break; + case INSTR_JUMP : + JITC_JUMP_LABEL(jitc,instr->jump_label); + break; + case INSTR_SETP_VAR_PTR : + jitc_add(jitc, "mov [$d], $d", instr->data.udest.var_ptr, instr->data.usrc.value_ptr); + break; + case INSTR_SETP_VAR_VAR : + jitc_add(jitc, "mov eax, [$d]", instr->data.usrc.var_ptr); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_ptr); + break; + case INSTR_SUBI_VAR_INTEGER : + jitc_add(jitc, "add [$d], $d", instr->data.udest.var_int, -instr->data.usrc.value_int); + break; + case INSTR_SUBI_VAR_VAR : + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "sub eax, [$d]", instr->data.usrc.var_int); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_int); + break; + case INSTR_SUBF_VAR_FLOAT : + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_SUBF_VAR_VAR : + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_ISLOWERF_VAR_VAR: + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_ISLOWERF_VAR_FLOAT: + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_ISLOWERI_VAR_VAR: + jitc_add(jitc,"mov edx, [$d]", instr->data.udest.var_int); + jitc_add(jitc,"sub edx, [$d]", instr->data.usrc.var_int); + jitc_add(jitc,"shr edx, $d", 31); + break; + case INSTR_ISLOWERI_VAR_INTEGER: + jitc_add(jitc,"mov edx, [$d]", instr->data.udest.var_int); + jitc_add(jitc,"sub edx, $d", instr->data.usrc.value_int); + jitc_add(jitc,"shr edx, $d", 31); + break; + case INSTR_ADDI_VAR_INTEGER: + jitc_add(jitc, "add [$d], $d", instr->data.udest.var_int, instr->data.usrc.value_int); + break; + case INSTR_ADDI_VAR_VAR: + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "add eax, [$d]", instr->data.usrc.var_int); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_int); + break; + case INSTR_ADDF_VAR_FLOAT: + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_ADDF_VAR_VAR: + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_MULI_VAR_INTEGER: + if (instr->data.usrc.value_int != 1) + { + int po2 = powerOfTwo(instr->data.usrc.value_int); + if (po2) { + /* performs (V / 2^n) by doing V >> n */ + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "sal eax, $d", po2); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_int); + } + else { + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "imul eax, $d", instr->data.usrc.value_int); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_int); + } + } + break; + case INSTR_MULI_VAR_VAR: + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "imul eax, [$d]", instr->data.usrc.var_int); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_int); + break; + case INSTR_MULF_VAR_FLOAT: + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_MULF_VAR_VAR: + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_DIVI_VAR_INTEGER: + if ((instr->data.usrc.value_int != 1) && (instr->data.usrc.value_int != 0)) + { + int po2 = powerOfTwo(instr->data.usrc.value_int); + if (po2) { + /* performs (V / 2^n) by doing V >> n */ + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "sar eax, $d", po2); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_int); + } + else { + /* performs (V/n) by doing (V*(32^2/n)) */ + long coef; + double dcoef = (double)4294967296.0 / (double)instr->data.usrc.value_int; + if (dcoef < 0.0) dcoef = -dcoef; + coef = (long)floor(dcoef); + dcoef -= floor(dcoef); + if (dcoef < 0.5) coef += 1; + + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "mov edx, $d", coef); + jitc_add(jitc, "imul edx"); + if (instr->data.usrc.value_int < 0) + jitc_add(jitc, "neg edx"); + jitc_add(jitc, "mov [$d], edx", instr->data.udest.var_int); + } + } + break; + case INSTR_DIVI_VAR_VAR : + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "cdq"); /* sign extend eax into edx */ + jitc_add(jitc, "idiv [$d]", instr->data.usrc.var_int); + jitc_add(jitc, "mov [$d], eax", instr->data.udest.var_int); + break; + case INSTR_DIVF_VAR_FLOAT: + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_DIVF_VAR_VAR: + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_JZERO: + jitc_add(jitc, "cmp edx, $d", 0); + jitc_add(jitc, "je $s", instr->jump_label); + break; + case INSTR_ISEQUALP_VAR_VAR : + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_ptr); + jitc_add(jitc, "mov edx, $d", 0); + jitc_add(jitc, "cmp eax, [$d]", instr->data.usrc.var_ptr); + jitc_add(jitc, "jne $d", 1); + jitc_add(jitc, "inc edx"); + break; + case INSTR_ISEQUALP_VAR_PTR : + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_ptr); + jitc_add(jitc, "mov edx, $d", 0); + jitc_add(jitc, "cmp eax, $d", instr->data.usrc.value_ptr); + jitc_add(jitc, "jne $d", 1); + jitc_add(jitc, "inc edx"); + break; + case INSTR_ISEQUALI_VAR_VAR : + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "mov edx, $d", 0); + jitc_add(jitc, "cmp eax, [$d]", instr->data.usrc.var_int); + jitc_add(jitc, "jne $d", 1); + jitc_add(jitc, "inc edx"); + break; + case INSTR_ISEQUALI_VAR_INTEGER : + jitc_add(jitc, "mov eax, [$d]", instr->data.udest.var_int); + jitc_add(jitc, "mov edx, $d", 0); + jitc_add(jitc, "cmp eax, $d", instr->data.usrc.value_int); + jitc_add(jitc, "jne $d", 1); + jitc_add(jitc, "inc edx"); + break; + case INSTR_ISEQUALF_VAR_VAR : + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_ISEQUALF_VAR_FLOAT : + printf("NOT IMPLEMENTED : %d\n", instr->id); + break; + case INSTR_CALL: + jitc_add(jitc, "call $s", instr->jump_label); + break; + case INSTR_RET: + jitc_add(jitc, "ret"); + break; + case INSTR_EXT_CALL: + jitc_add(jitc, "mov eax, [$d]", &(instr->data.udest.external_function->vars)); + jitc_add(jitc, "push eax"); + jitc_add(jitc, "mov edx, [$d]", &(currentGoomSL->vars)); + jitc_add(jitc, "push edx"); + jitc_add(jitc, "mov eax, [$d]", &(currentGoomSL)); + jitc_add(jitc, "push eax"); + + jitc_add(jitc, "mov eax, [$d]", &(instr->data.udest.external_function)); + jitc_add(jitc, "mov eax, [eax]"); + jitc_add(jitc, "call [eax]"); + jitc_add(jitc, "add esp, $d", 12); + break; + case INSTR_NOT_VAR: + jitc_add(jitc, "mov eax, edx"); + jitc_add(jitc, "mov edx, $d", 1); + jitc_add(jitc, "sub edx, eax"); + break; + case INSTR_JNZERO: + jitc_add(jitc, "cmp edx, $d", 0); + jitc_add(jitc, "jne $s", instr->jump_label); + break; + case INSTR_SETS_VAR_VAR: + { + int loop = DEST_STRUCT_SIZE / sizeof(int); + int dst = (int)pDEST_VAR; + int src = (int)pSRC_VAR; + + while (loop--) { + jitc_add(jitc,"mov eax, [$d]", src); + jitc_add(jitc,"mov [$d], eax", dst); + src += 4; + dst += 4; + } + } + break; + case INSTR_ISEQUALS_VAR_VAR: + break; + case INSTR_ADDS_VAR_VAR: + { + /* process integers */ + int i=0; + while (DEST_STRUCT_IBLOCK(i).size > 0) { + int j=DEST_STRUCT_IBLOCK(i).size; + while (j--) { /* TODO interlace 2 */ + jitc_add(jitc, "mov eax, [$d]", &DEST_STRUCT_IBLOCK_VAR(i,j)); + jitc_add(jitc, "add eax, [$d]", &SRC_STRUCT_IBLOCK_VAR(i,j)); + jitc_add(jitc, "mov [$d], eax", &DEST_STRUCT_IBLOCK_VAR(i,j)); + } + ++i; + } + /* process floats */ + i=0; + while (DEST_STRUCT_FBLOCK(i).size > 0) { + int j=DEST_STRUCT_FBLOCK(i).size; + while (j--) { + /* DEST_STRUCT_FBLOCK_VAR(i,j) += SRC_STRUCT_FBLOCK_VAR(i,j); */ + /* TODO */ + } + ++i; + } + break; + } + case INSTR_SUBS_VAR_VAR: + { + /* process integers */ + int i=0; + while (DEST_STRUCT_IBLOCK(i).size > 0) { + int j=DEST_STRUCT_IBLOCK(i).size; + while (j--) { + jitc_add(jitc, "mov eax, [$d]", &DEST_STRUCT_IBLOCK_VAR(i,j)); + jitc_add(jitc, "sub eax, [$d]", &SRC_STRUCT_IBLOCK_VAR(i,j)); + jitc_add(jitc, "mov [$d], eax", &DEST_STRUCT_IBLOCK_VAR(i,j)); + } + ++i; + } + break; + } + case INSTR_MULS_VAR_VAR: + { + /* process integers */ + int i=0; + while (DEST_STRUCT_IBLOCK(i).size > 0) { + int j=DEST_STRUCT_IBLOCK(i).size; + while (j--) { + jitc_add(jitc, "mov eax, [$d]", &DEST_STRUCT_IBLOCK_VAR(i,j)); + jitc_add(jitc, "imul eax, [$d]", &SRC_STRUCT_IBLOCK_VAR(i,j)); + jitc_add(jitc, "mov [$d], eax", &DEST_STRUCT_IBLOCK_VAR(i,j)); + } + ++i; + } + break; + } + case INSTR_DIVS_VAR_VAR: + { + /* process integers */ + int i=0; + while (DEST_STRUCT_IBLOCK(i).size > 0) { + int j=DEST_STRUCT_IBLOCK(i).size; + while (j--) { + jitc_add(jitc, "mov eax, [$d]", &DEST_STRUCT_IBLOCK_VAR(i,j)); + jitc_add(jitc, "cdq"); + jitc_add(jitc, "idiv [$d]", &SRC_STRUCT_IBLOCK_VAR(i,j)); + jitc_add(jitc, "mov [$d], eax", &DEST_STRUCT_IBLOCK_VAR(i,j)); + } + ++i; + } + break; + } + } + } + + JITC_ADD_LABEL (jitc, "__very_end__"); + jitc_add(jitc, "call $s", "__very_start__"); + jitc_add(jitc, "mov eax, $d", 0); + jitc_validate_func(jitc); +#else + InstructionFlow *iflow = currentGoomSL->iflow; + FastInstructionFlow *fastiflow = (FastInstructionFlow*)malloc(sizeof(FastInstructionFlow)); + fastiflow->mallocedInstr = calloc(number*16, sizeof(FastInstruction)); + /* fastiflow->instr = (FastInstruction*)(((int)fastiflow->mallocedInstr) + 16 - (((int)fastiflow->mallocedInstr)%16)); */ + fastiflow->instr = (FastInstruction*)fastiflow->mallocedInstr; + fastiflow->number = number; + for(i=0;iinstr[i].id = iflow->instr[i]->id; + fastiflow->instr[i].data = iflow->instr[i]->data; + fastiflow->instr[i].proto = iflow->instr[i]; + } + currentGoomSL->fastiflow = fastiflow; +#endif +} /* }}} */ + +void yy_scan_string(const char *str); +void yyparse(void); + +GoomHash *gsl_globals(GoomSL *_this) +{ + return _this->vars; +} + + +/** + * Some native external functions + */ +static void ext_charAt(GoomSL *gsl, GoomHash *global, GoomHash *local) +{ + char *string = GSL_LOCAL_PTR(gsl, local, "value"); + int index = GSL_LOCAL_INT(gsl, local, "index"); + GSL_GLOBAL_INT(gsl, "charAt") = 0; + if (string == NULL) { + return; + } + if (index < strlen(string)) + GSL_GLOBAL_INT(gsl, "charAt") = string[index]; +} + +static void ext_i2f(GoomSL *gsl, GoomHash *global, GoomHash *local) +{ + int i = GSL_LOCAL_INT(gsl, local, "value"); + GSL_GLOBAL_FLOAT(gsl, "i2f") = i; +} + +static void ext_f2i(GoomSL *gsl, GoomHash *global, GoomHash *local) +{ + float f = GSL_LOCAL_FLOAT(gsl, local, "value"); + GSL_GLOBAL_INT(gsl, "f2i") = f; +} + +/** + * + */ +void gsl_compile(GoomSL *_currentGoomSL, const char *script) +{ /* {{{ */ + char *script_and_externals; + static const char *sBinds = + "external : int\n" + "external : int\n" + "external : float\n"; + +#ifdef VERBOSE + printf("\n=== Starting Compilation ===\n"); +#endif + + script_and_externals = malloc(strlen(script) + strlen(sBinds) + 2); + strcpy(script_and_externals, sBinds); + strcat(script_and_externals, script); + + /* 0- reset */ + currentGoomSL = _currentGoomSL; + reset_scanner(currentGoomSL); + + /* 1- create the syntaxic tree */ + yy_scan_string(script_and_externals); + yyparse(); + + /* 2- generate code */ + gsl_commit_compilation(); + + /* 3- resolve symbols */ + calculate_labels(currentGoomSL->iflow); + + /* 4- optimize code */ + gsl_create_fast_iflow(); + + /* 5- bind a few internal functions */ + gsl_bind_function(currentGoomSL, "charAt", ext_charAt); + gsl_bind_function(currentGoomSL, "f2i", ext_f2i); + gsl_bind_function(currentGoomSL, "i2f", ext_i2f); + free(script_and_externals); + +#ifdef VERBOSE + printf("=== Compilation done. # of lines: %d. # of instr: %d ===\n", currentGoomSL->num_lines, currentGoomSL->iflow->number); +#endif +} /* }}} */ + +void gsl_execute(GoomSL *scanner) +{ /* {{{ */ + if (scanner->compilationOK) { +#if USE_JITC_X86 + scanner->jitc_func(); +#else + iflow_execute(scanner->fastiflow, scanner); +#endif + } +} /* }}} */ + +GoomSL *gsl_new(void) +{ /* {{{ */ + GoomSL *gss = (GoomSL*)malloc(sizeof(GoomSL)); + + gss->iflow = iflow_new(); + gss->vars = goom_hash_new(); + gss->functions = goom_hash_new(); + gss->nbStructID = 0; + gss->structIDS = goom_hash_new(); + gss->gsl_struct_size = 32; + gss->gsl_struct = (GSL_Struct**)malloc(gss->gsl_struct_size * sizeof(GSL_Struct*)); + gss->currentNS = 0; + gss->namespaces[0] = gss->vars; + gss->data_heap = goom_heap_new(); + + reset_scanner(gss); + + gss->compilationOK = 0; + gss->nbPtr=0; + gss->ptrArraySize=256; + gss->ptrArray = (void**)malloc(gss->ptrArraySize * sizeof(void*)); +#ifdef USE_JITC_X86 + gss->jitc = NULL; +#endif + return gss; +} /* }}} */ + +void gsl_bind_function(GoomSL *gss, const char *fname, GoomSL_ExternalFunction func) +{ /* {{{ */ + HashValue *val = goom_hash_get(gss->functions, fname); + if (val) { + ExternalFunctionStruct *gef = (ExternalFunctionStruct*)val->ptr; + gef->function = func; + } + else fprintf(stderr, "Unable to bind function %s\n", fname); +} /* }}} */ + +int gsl_is_compiled(GoomSL *gss) +{ /* {{{ */ + return gss->compilationOK; +} /* }}} */ + +void gsl_free(GoomSL *gss) +{ /* {{{ */ + iflow_free(gss->iflow); + free(gss->vars); + free(gss->functions); + free(gss); +} /* }}} */ + + +static int gsl_nb_import; +static char gsl_already_imported[256][256]; + +char *gsl_init_buffer(const char *fname) +{ + char *fbuffer; + fbuffer = (char*)malloc(512); + fbuffer[0]=0; + gsl_nb_import = 0; + if (fname) + gsl_append_file_to_buffer(fname,&fbuffer); + return fbuffer; +} + +static char *gsl_read_file(const char *fname) +{ + FILE *f; + char *buffer; + int fsize; + f = fopen(fname,"rt"); + if (!f) { + fprintf(stderr, "ERROR: Could not load file %s\n", fname); + exit(1); + } + fseek(f,0,SEEK_END); + fsize = ftell(f); + rewind(f); + buffer = (char*)malloc(fsize+512); + fread(buffer,1,fsize,f); + fclose(f); + buffer[fsize]=0; + return buffer; +} + +void gsl_append_file_to_buffer(const char *fname, char **buffer) +{ + char *fbuffer; + int size,fsize,i=0; + char reset_msg[256]; + + /* look if the file have not been already imported */ + for (i=0;iptr) +#define GSL_LOCAL_INT(gsl,local,name) (*(int*)goom_hash_get(local,name)->ptr) +#define GSL_LOCAL_FLOAT(gsl,local,name) (*(float*)goom_hash_get(local,name)->ptr) + +#define GSL_GLOBAL_PTR(gsl,name) gsl_get_ptr(gsl, *(int*)goom_hash_get(gsl_globals(gsl),name)->ptr) +#define GSL_GLOBAL_INT(gsl,name) (*(int*)goom_hash_get(gsl_globals(gsl),name)->ptr) +#define GSL_GLOBAL_FLOAT(gsl,name) (*(float*)goom_hash_get(gsl_globals(gsl),name)->ptr) + +#endif diff --git a/veejay-server/libgoom/goomsl_hash.c b/veejay-server/libgoom/goomsl_hash.c new file mode 100644 index 00000000..af2ec44a --- /dev/null +++ b/veejay-server/libgoom/goomsl_hash.c @@ -0,0 +1,120 @@ +#include "goomsl_hash.h" +#include +#include + +static GoomHashEntry *entry_new(const char *key, HashValue value) { + + int len = strlen(key); + GoomHashEntry *entry = (GoomHashEntry*)malloc(sizeof(GoomHashEntry)); + + entry->key = (char *)malloc(len+1); + memcpy(entry->key,key,len+1); + entry->value = value; + entry->lower = NULL; + entry->upper = NULL; + + return entry; +} + +static void entry_free(GoomHashEntry *entry) { + if (entry!=NULL) { + entry_free(entry->lower); + entry_free(entry->upper); + free(entry->key); + free(entry); + } +} + +static void entry_put(GoomHashEntry *entry, const char *key, HashValue value) { + int cmp = strcmp(key,entry->key); + if (cmp==0) { + entry->value = value; + } + else if (cmp > 0) { + if (entry->upper == NULL) + entry->upper = entry_new(key,value); + else + entry_put(entry->upper, key, value); + } + else { + if (entry->lower == NULL) + entry->lower = entry_new(key,value); + else + entry_put(entry->lower, key, value); + } +} + +static HashValue *entry_get(GoomHashEntry *entry, const char *key) { + + int cmp; + if (entry==NULL) + return NULL; + cmp = strcmp(key,entry->key); + if (cmp > 0) + return entry_get(entry->upper, key); + else if (cmp < 0) + return entry_get(entry->lower, key); + else + return &(entry->value); +} + +GoomHash *goom_hash_new() { + GoomHash *_this = (GoomHash*)malloc(sizeof(GoomHash)); + _this->root = NULL; + _this->number_of_puts = 0; + return _this; +} + +void goom_hash_free(GoomHash *_this) { + entry_free(_this->root); + free(_this); +} + +void goom_hash_put(GoomHash *_this, const char *key, HashValue value) { + _this->number_of_puts += 1; + if (_this->root == NULL) + _this->root = entry_new(key,value); + else + entry_put(_this->root,key,value); +} + +HashValue *goom_hash_get(GoomHash *_this, const char *key) { + if (_this == NULL) return NULL; + return entry_get(_this->root,key); +} + +void goom_hash_put_int(GoomHash *_this, const char *key, int i) { + HashValue value; + value.i = i; + goom_hash_put(_this,key,value); +} + +void goom_hash_put_float(GoomHash *_this, const char *key, float f) { + HashValue value; + value.f = f; + goom_hash_put(_this,key,value); +} + +void goom_hash_put_ptr(GoomHash *_this, const char *key, void *ptr) { + HashValue value; + value.ptr = ptr; + goom_hash_put(_this,key,value); +} + +/* FOR EACH */ + +static void _goom_hash_for_each(GoomHash *_this, GoomHashEntry *entry, GH_Func func) +{ + if (entry == NULL) return; + func(_this, entry->key, &(entry->value)); + _goom_hash_for_each(_this, entry->lower, func); + _goom_hash_for_each(_this, entry->upper, func); +} + +void goom_hash_for_each(GoomHash *_this, GH_Func func) { + _goom_hash_for_each(_this, _this->root, func); +} + +int goom_hash_number_of_puts(GoomHash *_this) { + return _this->number_of_puts; +} diff --git a/veejay-server/libgoom/goomsl_hash.h b/veejay-server/libgoom/goomsl_hash.h new file mode 100644 index 00000000..26f45167 --- /dev/null +++ b/veejay-server/libgoom/goomsl_hash.h @@ -0,0 +1,40 @@ +#ifndef _GOOMSL_HASH_H +#define _GOOMSL_HASH_H + +typedef struct GOOM_HASH_ENTRY GoomHashEntry; +typedef struct GOOM_HASH GoomHash; + +typedef union { + void *ptr; + int i; + float f; +} HashValue; + +struct GOOM_HASH_ENTRY { + char *key; + HashValue value; + GoomHashEntry *lower; + GoomHashEntry *upper; +}; + +struct GOOM_HASH { + GoomHashEntry *root; + int number_of_puts; +}; + +GoomHash *goom_hash_new(); +void goom_hash_free(GoomHash *gh); + +void goom_hash_put(GoomHash *gh, const char *key, HashValue value); +HashValue *goom_hash_get(GoomHash *gh, const char *key); + +void goom_hash_put_int (GoomHash *_this, const char *key, int i); +void goom_hash_put_float(GoomHash *_this, const char *key, float f); +void goom_hash_put_ptr (GoomHash *_this, const char *key, void *ptr); + +typedef void (*GH_Func)(GoomHash *caller, const char *key, HashValue *value); + +void goom_hash_for_each(GoomHash *_this, GH_Func func); +int goom_hash_number_of_puts(GoomHash *_this); + +#endif /* _GOOM_HASH_H */ diff --git a/veejay-server/libgoom/goomsl_heap.c b/veejay-server/libgoom/goomsl_heap.c new file mode 100644 index 00000000..73943bf9 --- /dev/null +++ b/veejay-server/libgoom/goomsl_heap.c @@ -0,0 +1,105 @@ +#include "goomsl_heap.h" +#include + +struct _GOOM_HEAP { + void **arrays; + int number_of_arrays; + int size_of_each_array; + int consumed_in_last_array; +}; + +/* Constructors / Destructor */ +GoomHeap *goom_heap_new(void) +{ + return goom_heap_new_with_granularity(4096); +} + +GoomHeap *goom_heap_new_with_granularity(int granularity) +{ + GoomHeap *_this; + _this = (GoomHeap*)malloc(sizeof(GoomHeap)); + _this->number_of_arrays = 0; + _this->size_of_each_array = granularity; + _this->consumed_in_last_array = 0; + _this->arrays = (void**)malloc(sizeof(void*)); + return _this; +} + +void goom_heap_delete(GoomHeap *_this) +{ + int i; + for (i=0;i<_this->number_of_arrays;++i) { + free(_this->arrays[i]); + } + free(_this->arrays); + free(_this); +} + +static void align_it(GoomHeap *_this, int alignment) +{ + if ((alignment > 1) && (_this->number_of_arrays>0)) { + void *last_array = _this->arrays[_this->number_of_arrays - 1]; + int last_address = (int)last_array + _this->consumed_in_last_array; + int decal = (last_address % alignment); + if (decal != 0) { + _this->consumed_in_last_array += alignment - decal; + } + } +} + +void *goom_heap_malloc_with_alignment_prefixed(GoomHeap *_this, int nb_bytes, + int alignment, int prefix_bytes) +{ + void *retval = NULL; + + /* d'abord on gere les problemes d'alignement */ + _this->consumed_in_last_array += prefix_bytes; + align_it(_this, alignment); + + /* ensuite on verifie que la quantite de memoire demandee tient dans le buffer */ + if ((_this->consumed_in_last_array + nb_bytes >= _this->size_of_each_array) + || (_this->number_of_arrays == 0)) { + + if (prefix_bytes + nb_bytes + alignment >= _this->size_of_each_array) { + + /* Si la zone demandee est plus grosse que la granularitee */ + /* On alloue un buffer plus gros que les autres */ + _this->arrays = (void**)realloc(_this->arrays, sizeof(void*) * (_this->number_of_arrays+2)); + + _this->number_of_arrays += 1; + _this->consumed_in_last_array = prefix_bytes; + + _this->arrays[_this->number_of_arrays - 1] = malloc(prefix_bytes + nb_bytes + alignment); + align_it(_this,alignment); + retval = (void*)((char*)_this->arrays[_this->number_of_arrays - 1] + _this->consumed_in_last_array); + + /* puis on repart sur un nouveau buffer vide */ + _this->number_of_arrays += 1; + _this->consumed_in_last_array = 0; + _this->arrays[_this->number_of_arrays - 1] = malloc(_this->size_of_each_array); + return retval; + } + else { + _this->number_of_arrays += 1; + _this->consumed_in_last_array = prefix_bytes; + _this->arrays = (void**)realloc(_this->arrays, sizeof(void*) * _this->number_of_arrays); + + _this->arrays[_this->number_of_arrays - 1] = malloc(_this->size_of_each_array); + align_it(_this,alignment); + } + } + retval = (void*)((char*)_this->arrays[_this->number_of_arrays - 1] + _this->consumed_in_last_array); + _this->consumed_in_last_array += nb_bytes; + return retval; +} + +void *goom_heap_malloc_with_alignment(GoomHeap *_this, int nb_bytes, int alignment) +{ + return goom_heap_malloc_with_alignment_prefixed(_this, nb_bytes, alignment, 0); +} + +void *goom_heap_malloc(GoomHeap *_this, int nb_bytes) +{ + return goom_heap_malloc_with_alignment(_this,nb_bytes,1); +} + diff --git a/veejay-server/libgoom/goomsl_heap.h b/veejay-server/libgoom/goomsl_heap.h new file mode 100644 index 00000000..a22bac69 --- /dev/null +++ b/veejay-server/libgoom/goomsl_heap.h @@ -0,0 +1,29 @@ +#ifndef GOOMSL_HEAP +#define GOOMSL_HEAP + +/** + * Resizable Array that guarranty that resizes don't change address of + * the stored datas. + * + * This is implemented as an array of arrays... granularity is the size + * of each arrays. + */ + +typedef struct _GOOM_HEAP GoomHeap; + +/* Constructors / Destructor */ +GoomHeap *goom_heap_new(void); +GoomHeap *goom_heap_new_with_granularity(int granularity); +void goom_heap_delete(GoomHeap *_this); + +/* This method behaves like malloc. */ +void *goom_heap_malloc(GoomHeap *_this, int nb_bytes); +/* This adds an alignment constraint. */ +void *goom_heap_malloc_with_alignment(GoomHeap *_this, int nb_bytes, int alignment); + +/* Returns a pointeur on the bytes... prefix is before */ +void *goom_heap_malloc_with_alignment_prefixed(GoomHeap *_this, int nb_bytes, + int alignment, int prefix_bytes); + +#endif + diff --git a/veejay-server/libgoom/goomsl_lex.c b/veejay-server/libgoom/goomsl_lex.c new file mode 100644 index 00000000..988fb99d --- /dev/null +++ b/veejay-server/libgoom/goomsl_lex.c @@ -0,0 +1,2108 @@ +#line 2 "goomsl_lex.c" + +#line 4 "goomsl_lex.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 31 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart(yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +typedef unsigned char YY_CHAR; + +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + +typedef int yy_state_type; + +#define YY_FLEX_LEX_COMPAT +extern int yylineno; + +int yylineno = 1; + +extern char yytext[]; + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + if ( yyleng + (yy_more_offset) >= YYLMAX ) \ + YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ + yy_flex_strncpy( &yytext[(yy_more_offset)], (yytext_ptr), yyleng + 1 ); \ + yyleng += (yy_more_offset); \ + (yy_prev_more_offset) = (yy_more_offset); \ + (yy_more_offset) = 0; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 49 +#define YY_END_OF_BUFFER 50 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_acclist[214] = + { 0, + 50, 48, 49, 47, 48, 49, 4, 49, 48, 49, + 13, 48, 49, 10, 48, 49, 33, 48, 49, 48, + 49, 48, 49, 48, 49, 48, 49, 48, 49, 34, + 48, 49, 34, 48, 49, 48, 49, 48, 49, 33, + 48, 49, 33, 48, 49, 33, 48, 49, 33, 48, + 49, 33, 48, 49, 33, 48, 49, 33, 48, 49, + 33, 48, 49, 33, 48, 49, 33, 48, 49, 47, + 48, 49, 1, 4, 49, 48, 49, 7, 49, 6, + 49, 7, 49, 7, 49, 1, 6, 49, 7, 49, + 3, 49, 1, 3, 49, 17, 49, 49, 16, 17, + + 49, 17, 49, 47, 45, 10, 10, 10, 33, 40, + 39, 41, 11, 12, 42, 38, 37, 34, 43, 46, + 44, 33, 33, 28, 33, 33, 33, 33, 33, 30, + 33, 33, 33, 33, 33, 33, 47, 1, 12, 5, + 15, 14, 10, 10, 35, 37, 36, 33, 33, 33, + 33, 33, 29, 33, 19, 33, 26, 33, 21, 33, + 33, 33, 33, 2, 10, 10, 33, 33, 33, 33, + 33, 33, 33, 31, 33, 33, 10, 10, 33, 33, + 33, 32, 33, 18, 33, 33, 33, 27, 33, 10, + 10, 33, 33, 33, 22, 33, 25, 33, 10, 9, + + 10, 10, 20, 33, 23, 33, 33, 10, 24, 33, + 10, 8, 10 + } ; + +static yyconst flex_int16_t yy_accept[152] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 4, 7, 9, 11, 14, 17, 20, 22, 24, 26, + 28, 30, 33, 36, 38, 40, 43, 46, 49, 52, + 55, 58, 61, 64, 67, 70, 73, 76, 78, 80, + 82, 84, 86, 89, 91, 93, 96, 98, 99, 102, + 104, 105, 106, 107, 108, 109, 110, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 119, 120, 121, + 122, 123, 124, 126, 127, 128, 129, 130, 132, 133, + 134, 135, 136, 137, 138, 139, 139, 140, 141, 141, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + + 151, 152, 153, 155, 157, 159, 161, 162, 163, 164, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 176, 177, 178, 179, 180, 181, 182, 184, 186, + 187, 188, 190, 191, 192, 193, 194, 195, 197, 199, + 200, 202, 203, 205, 207, 208, 209, 211, 212, 214, + 214 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 5, 6, 7, 1, 8, 9, 10, 1, + 1, 11, 12, 1, 13, 14, 15, 16, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 1, 1, 18, + 19, 20, 1, 9, 21, 21, 21, 21, 22, 23, + 21, 21, 24, 21, 21, 25, 21, 26, 21, 21, + 21, 27, 28, 29, 21, 21, 21, 21, 21, 21, + 1, 30, 1, 1, 31, 1, 32, 33, 34, 35, + + 36, 37, 38, 39, 40, 21, 21, 41, 21, 42, + 43, 44, 21, 45, 46, 47, 48, 21, 49, 50, + 21, 21, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[51] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 4, 4, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 + } ; + +static yyconst flex_int16_t yy_base[159] = + { 0, + 0, 49, 51, 54, 221, 57, 60, 64, 223, 225, + 69, 225, 203, 225, 51, 0, 0, 202, 201, 200, + 64, 68, 72, 72, 199, 174, 57, 166, 55, 173, + 171, 166, 165, 166, 171, 99, 225, 93, 225, 225, + 194, 107, 225, 193, 225, 225, 225, 225, 225, 71, + 93, 225, 0, 183, 178, 0, 195, 225, 225, 225, + 225, 225, 225, 225, 89, 107, 0, 225, 225, 225, + 161, 169, 0, 155, 160, 157, 154, 151, 150, 151, + 150, 146, 153, 123, 225, 177, 188, 225, 126, 187, + 225, 225, 164, 159, 225, 100, 0, 146, 145, 149, + + 138, 151, 0, 0, 0, 0, 59, 146, 140, 177, + 225, 157, 147, 141, 144, 130, 138, 126, 130, 137, + 0, 134, 165, 143, 133, 112, 109, 0, 0, 102, + 92, 0, 130, 112, 93, 98, 101, 0, 0, 125, + 124, 94, 0, 0, 78, 59, 0, 61, 0, 225, + 141, 145, 149, 151, 155, 51, 159, 163 + } ; + +static yyconst flex_int16_t yy_def[159] = + { 0, + 150, 1, 151, 151, 151, 151, 152, 152, 150, 150, + 150, 150, 150, 150, 153, 154, 155, 150, 150, 150, + 150, 150, 150, 150, 150, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 153, 153, 153, 154, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 156, 150, 150, 150, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 154, 154, 154, 150, 150, 150, 157, 150, 150, 157, + 150, 150, 153, 153, 150, 150, 156, 154, 154, 154, + + 154, 154, 154, 154, 154, 154, 154, 154, 154, 157, + 150, 153, 153, 154, 154, 154, 154, 154, 154, 154, + 154, 154, 153, 153, 154, 154, 154, 154, 154, 154, + 154, 154, 158, 153, 154, 154, 154, 154, 154, 158, + 158, 153, 154, 154, 154, 153, 154, 153, 153, 0, + 150, 150, 150, 150, 150, 150, 150, 150 + } ; + +static yyconst flex_int16_t yy_nxt[276] = + { 0, + 10, 11, 12, 11, 13, 14, 15, 10, 16, 17, + 18, 19, 20, 10, 21, 22, 23, 24, 10, 25, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 10, + 16, 16, 26, 16, 27, 28, 29, 16, 16, 30, + 16, 31, 16, 32, 16, 33, 34, 16, 35, 16, + 36, 37, 36, 40, 97, 42, 43, 42, 42, 46, + 42, 41, 48, 38, 41, 49, 48, 149, 44, 49, + 51, 44, 51, 54, 61, 64, 91, 55, 62, 64, + 148, 65, 63, 66, 66, 65, 75, 66, 66, 50, + 68, 69, 72, 50, 51, 76, 51, 77, 119, 73, + + 84, 85, 84, 61, 96, 96, 120, 87, 89, 85, + 89, 63, 92, 86, 64, 96, 96, 67, 147, 146, + 65, 86, 66, 66, 84, 85, 84, 89, 85, 89, + 141, 141, 145, 144, 143, 142, 141, 86, 139, 138, + 86, 39, 39, 39, 39, 47, 47, 47, 47, 53, + 137, 53, 53, 56, 56, 57, 136, 57, 57, 110, + 110, 110, 110, 140, 135, 140, 140, 134, 133, 132, + 131, 130, 129, 128, 127, 126, 125, 124, 123, 111, + 122, 121, 118, 117, 116, 115, 114, 113, 112, 111, + 111, 90, 109, 108, 107, 106, 105, 104, 103, 102, + + 101, 100, 99, 98, 95, 94, 93, 90, 88, 83, + 82, 81, 80, 79, 78, 74, 71, 70, 60, 59, + 58, 52, 150, 45, 9, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150 + } ; + +static yyconst flex_int16_t yy_chk[276] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 3, 156, 4, 4, 4, 6, 6, + 6, 3, 7, 2, 4, 7, 8, 148, 4, 8, + 11, 6, 11, 15, 21, 22, 50, 15, 21, 23, + 146, 22, 21, 22, 22, 23, 29, 23, 23, 7, + 24, 24, 27, 8, 51, 29, 51, 29, 107, 27, + + 36, 36, 36, 38, 65, 65, 107, 38, 42, 42, + 42, 38, 50, 36, 66, 96, 96, 22, 145, 142, + 66, 42, 66, 66, 84, 84, 84, 89, 89, 89, + 141, 140, 137, 136, 135, 134, 133, 84, 131, 130, + 89, 151, 151, 151, 151, 152, 152, 152, 152, 153, + 127, 153, 153, 154, 154, 155, 126, 155, 155, 157, + 157, 157, 157, 158, 125, 158, 158, 124, 123, 122, + 120, 119, 118, 117, 116, 115, 114, 113, 112, 110, + 109, 108, 102, 101, 100, 99, 98, 94, 93, 90, + 87, 86, 83, 82, 81, 80, 79, 78, 77, 76, + + 75, 74, 72, 71, 57, 55, 54, 44, 41, 35, + 34, 33, 32, 31, 30, 28, 26, 25, 20, 19, + 18, 13, 9, 5, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150 + } ; + +/* Table of booleans, true if rule could match eol. */ +static yyconst flex_int32_t yy_rule_can_match_eol[50] = + { 0, +1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \ +yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ +++(yy_lp); \ +goto find_rule; \ +} + +static int yy_more_offset = 0; +static int yy_prev_more_offset = 0; +#define yymore() ((yy_more_offset) = yy_flex_strlen( yytext )) +#define YY_NEED_STRLEN +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET \ + { \ + (yy_more_offset) = (yy_prev_more_offset); \ + yyleng -= (yy_more_offset); \ + } +#ifndef YYLMAX +#define YYLMAX 8192 +#endif + +char yytext[YYLMAX]; +char *yytext_ptr; +#line 1 "goomsl_lex.l" +#line 2 "goomsl_lex.l" + +#include +#include +#include +#include "goomsl.h" +#include "goomsl_private.h" +#include "goomsl_yacc.h" +void yyerror(char *); +void yyparse(void); + +GoomSL *currentGoomSL; +static int string_size; +static char string[1024]; + + + +#line 639 "goomsl_lex.c" + +#define INITIAL 0 +#define C_COMMENT 1 +#define LINE_COMMENT 2 +#define STRING 3 + +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 25 "goomsl_lex.l" + + +#line 797 "goomsl_lex.c" + + if ( (yy_init) ) + { + (yy_init) = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_state_buf) ) + (yy_state_buf) = (yy_state_type *)yyalloc(YY_BUF_SIZE + 2 ); + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 151 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *(yy_state_ptr)++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 225 ); + +yy_find_action: + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[(yy_lp)]; + { + (yy_full_match) = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = (yy_prev_more_offset); yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; +; + } + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +/* rule 1 can match eol */ +YY_RULE_SETUP +#line 27 "goomsl_lex.l" +{ ++currentGoomSL->num_lines; /* Ignore empty lines */ } + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +#line 28 "goomsl_lex.l" +{ ++currentGoomSL->num_lines; /* Ignore empty lines */ } + YY_BREAK +case 3: +/* rule 3 can match eol */ +YY_RULE_SETUP +#line 30 "goomsl_lex.l" +{ ++currentGoomSL->num_lines; yylval.charValue=*yytext; BEGIN INITIAL; return '\n'; } + YY_BREAK +case 4: +/* rule 4 can match eol */ +YY_RULE_SETUP +#line 31 "goomsl_lex.l" +{ ++currentGoomSL->num_lines; yylval.charValue=*yytext; return '\n'; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 33 "goomsl_lex.l" +{ BEGIN INITIAL; } + YY_BREAK +case 6: +/* rule 6 can match eol */ +YY_RULE_SETUP +#line 34 "goomsl_lex.l" +{ ++currentGoomSL->num_lines; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 35 "goomsl_lex.l" +{ /* eat up comment */ } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 37 "goomsl_lex.l" +{ currentGoomSL->num_lines = 0; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 38 "goomsl_lex.l" +{ currentGoomSL->num_lines = 0; printf("%s\n", yytext); } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 39 "goomsl_lex.l" +{ /* ignore preprocessor lines */ } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 41 "goomsl_lex.l" +{ BEGIN C_COMMENT; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 42 "goomsl_lex.l" +{ BEGIN LINE_COMMENT; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 43 "goomsl_lex.l" +{ BEGIN STRING; string_size=0; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 45 "goomsl_lex.l" +{ string[string_size++] = '\n'; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 46 "goomsl_lex.l" +{ string[string_size++] = '\"'; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 47 "goomsl_lex.l" +{ /* fin de la chaine: on cree le pointeur qui va bien */ + unsigned int tmp; + BEGIN INITIAL; + string[string_size]=0; + tmp = gsl_malloc(currentGoomSL, string_size+1); + strcpy((char*)currentGoomSL->ptrArray[tmp],string); + sprintf(yylval.strValue, "0x%08x", tmp); + return LTYPE_PTR; + } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 56 "goomsl_lex.l" +{ string[string_size++] = *yytext; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 58 "goomsl_lex.l" +{ return FLOAT_TK; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 59 "goomsl_lex.l" +{ return INT_TK; } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 60 "goomsl_lex.l" +{ return INT_TK; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 61 "goomsl_lex.l" +{ return PTR_TK; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 62 "goomsl_lex.l" +{ return PTR_TK; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 63 "goomsl_lex.l" +{ return DECLARE; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 64 "goomsl_lex.l" +{ return EXTERNAL; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 65 "goomsl_lex.l" +{ return STRUCT; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 66 "goomsl_lex.l" +{ return NOT; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 67 "goomsl_lex.l" +{ return WHILE; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 68 "goomsl_lex.l" +{ return DO; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 69 "goomsl_lex.l" +{ return FOR; } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 70 "goomsl_lex.l" +{ return IN; } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 71 "goomsl_lex.l" +{ strncpy(yylval.strValue, "1", 2047); return LTYPE_INTEGER; } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 72 "goomsl_lex.l" +{ strncpy(yylval.strValue, "0", 2047); return LTYPE_INTEGER; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 73 "goomsl_lex.l" +{ strncpy(yylval.strValue, yytext, 2047); return LTYPE_VAR; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 74 "goomsl_lex.l" +{ strncpy(yylval.strValue, yytext, 2047); return LTYPE_INTEGER; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 75 "goomsl_lex.l" +{ sprintf(yylval.strValue, "%d", (int)yytext[1]); return LTYPE_INTEGER; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 76 "goomsl_lex.l" +{ strncpy(yylval.strValue, yytext, 2047); return LTYPE_INTEGER; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 77 "goomsl_lex.l" +{ strncpy(yylval.strValue, yytext, 2047); return LTYPE_FLOAT; } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 78 "goomsl_lex.l" +{ sprintf(yylval.strValue, "%3.2f", atof(yytext)/100.0f); return LTYPE_FLOAT; } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 79 "goomsl_lex.l" +{ return PLUS_EQ; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 80 "goomsl_lex.l" +{ return MUL_EQ; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 81 "goomsl_lex.l" +{ return SUB_EQ; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 82 "goomsl_lex.l" +{ return DIV_EQ; } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 83 "goomsl_lex.l" +{ return LOW_EQ; } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 84 "goomsl_lex.l" +{ return SUP_EQ; } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 85 "goomsl_lex.l" +{ return NOT_EQ; } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 86 "goomsl_lex.l" +{ return NOT_EQ; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 87 "goomsl_lex.l" +/* eat up whitespace */ + YY_BREAK +case 48: +YY_RULE_SETUP +#line 88 "goomsl_lex.l" +{ yylval.charValue = *yytext; return *yytext; } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 90 "goomsl_lex.l" +ECHO; + YY_BREAK +#line 1155 "goomsl_lex.c" + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(C_COMMENT): + case YY_STATE_EOF(LINE_COMMENT): + case YY_STATE_EOF(STRING): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 151 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *(yy_state_ptr)++ = yy_current_state; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 151 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 150); + if ( ! yy_is_jam ) + *(yy_state_ptr)++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ){ + --yylineno; + } + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol ) + + yylineno++; +; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree((void *) b->yy_ch_buf ); + + yyfree((void *) b ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param str a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * str ) +{ + + return yy_scan_bytes(str,strlen(str) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void yyset_lineno (int line_number ) +{ + + yylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * in_str ) +{ + yyin = in_str ; +} + +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + yyfree ( (yy_state_buf) ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif +#line 90 "goomsl_lex.l" + + + + +int yywrap(void) { return 1; yyunput(0,0); } + + diff --git a/veejay-server/libgoom/goomsl_lex.l b/veejay-server/libgoom/goomsl_lex.l new file mode 100644 index 00000000..3079c022 --- /dev/null +++ b/veejay-server/libgoom/goomsl_lex.l @@ -0,0 +1,94 @@ +%{ + +#include +#include +#include +#include "goomsl.h" +#include "goomsl_private.h" +#include "goomsl_yacc.h" +void yyerror(char *); +void yyparse(void); + +GoomSL *currentGoomSL; +static int string_size; +static char string[1024]; +%} + +DIGIT [0-9] +XDIGIT [0-9a-f] +ID [a-zA-Z_@&][a-zA-Z0-9_\.]* + +%S C_COMMENT +%S LINE_COMMENT +%S STRING + +%% + +^[ \t]*\n { ++currentGoomSL->num_lines; /* Ignore empty lines */ } +^[ \t]*"//"[^\n]*\n { ++currentGoomSL->num_lines; /* Ignore empty lines */ } + +\n { ++currentGoomSL->num_lines; yylval.charValue=*yytext; BEGIN INITIAL; return '\n'; } +\n { ++currentGoomSL->num_lines; yylval.charValue=*yytext; return '\n'; } + +"*/" { BEGIN INITIAL; } +\n { ++currentGoomSL->num_lines; } +. { /* eat up comment */ } + +"#RST_LINE#" { currentGoomSL->num_lines = 0; } +"#FILE ".*"#" { currentGoomSL->num_lines = 0; printf("%s\n", yytext); } +"#"[^\n]* { /* ignore preprocessor lines */ } + +"/*" { BEGIN C_COMMENT; } +"//" { BEGIN LINE_COMMENT; } +\" { BEGIN STRING; string_size=0; } + +"\\n" { string[string_size++] = '\n'; } +"\\\"" { string[string_size++] = '\"'; } +\" { /* fin de la chaine: on cree le pointeur qui va bien */ + unsigned int tmp; + BEGIN INITIAL; + string[string_size]=0; + tmp = gsl_malloc(currentGoomSL, string_size+1); + strcpy((char*)currentGoomSL->ptrArray[tmp],string); + sprintf(yylval.strValue, "0x%08x", tmp); + return LTYPE_PTR; + } +. { string[string_size++] = *yytext; } + +"float" { return FLOAT_TK; } +"int" { return INT_TK; } +"boolean" { return INT_TK; } +"ptr" { return PTR_TK; } +"string" { return PTR_TK; } +"declare" { return DECLARE; } +"external" { return EXTERNAL; } +"struct" { return STRUCT; } +"not" { return NOT; } +"while" { return WHILE; } +"do" { return DO; } +"for" { return FOR; } +"in" { return IN; } +"true" { strncpy(yylval.strValue, "1", 2047); return LTYPE_INTEGER; } +"false" { strncpy(yylval.strValue, "0", 2047); return LTYPE_INTEGER; } +{ID} { strncpy(yylval.strValue, yytext, 2047); return LTYPE_VAR; } +{DIGIT}+ { strncpy(yylval.strValue, yytext, 2047); return LTYPE_INTEGER; } +\'.\' { sprintf(yylval.strValue, "%d", (int)yytext[1]); return LTYPE_INTEGER; } +"0x"{XDIGIT}+ { strncpy(yylval.strValue, yytext, 2047); return LTYPE_INTEGER; } +{DIGIT}+"."{DIGIT}* { strncpy(yylval.strValue, yytext, 2047); return LTYPE_FLOAT; } +{DIGIT}+"%" { sprintf(yylval.strValue, "%3.2f", atof(yytext)/100.0f); return LTYPE_FLOAT; } +"+=" { return PLUS_EQ; } +"*=" { return MUL_EQ; } +"-=" { return SUB_EQ; } +"/=" { return DIV_EQ; } +"<=" { return LOW_EQ; } +">=" { return SUP_EQ; } +"!=" { return NOT_EQ; } +"<>" { return NOT_EQ; } +[ \t]+ /* eat up whitespace */ +. { yylval.charValue = *yytext; return *yytext; } + +%% + + +int yywrap(void) { return 1; yyunput(0,0); } + diff --git a/veejay-server/libgoom/goomsl_private.h b/veejay-server/libgoom/goomsl_private.h new file mode 100644 index 00000000..8be15157 --- /dev/null +++ b/veejay-server/libgoom/goomsl_private.h @@ -0,0 +1,251 @@ +#ifndef _GSL_PRIVATE_H +#define _GSL_PRIVATE_H + +/* -- internal use -- */ + +#include "goomsl.h" + +#ifdef USE_JITC_X86 +#include "jitc_x86.h" +#endif + +#include "goomsl_heap.h" + +/* {{{ type of nodes */ +#define EMPTY_NODE 0 +#define CONST_INT_NODE 1 +#define CONST_FLOAT_NODE 2 +#define CONST_PTR_NODE 3 +#define VAR_NODE 4 +#define PARAM_NODE 5 +#define READ_PARAM_NODE 6 +#define OPR_NODE 7 +/* }}} */ +/* {{{ type of operations */ +#define OPR_SET 1 +#define OPR_IF 2 +#define OPR_WHILE 3 +#define OPR_BLOCK 4 +#define OPR_ADD 5 +#define OPR_MUL 6 +#define OPR_EQU 7 +#define OPR_NOT 8 +#define OPR_LOW 9 +#define OPR_DIV 10 +#define OPR_SUB 11 +#define OPR_FUNC_INTRO 12 +#define OPR_FUNC_OUTRO 13 +#define OPR_CALL 14 +#define OPR_EXT_CALL 15 +#define OPR_PLUS_EQ 16 +#define OPR_SUB_EQ 17 +#define OPR_MUL_EQ 18 +#define OPR_DIV_EQ 19 +#define OPR_CALL_EXPR 20 +#define OPR_AFFECT_LIST 21 +#define OPR_FOREACH 22 +#define OPR_VAR_LIST 23 + +/* }}} */ + +typedef struct _ConstIntNodeType { /* {{{ */ + int val; +} ConstIntNodeType; /* }}} */ +typedef struct _ConstFloatNodeType { /* {{{ */ + float val; +} ConstFloatNodeType; /* }}} */ +typedef struct _ConstPtrNodeType { /* {{{ */ + int id; +} ConstPtrNodeType; /* }}} */ +typedef struct _OprNodeType { /* {{{ */ + int type; + int nbOp; + struct _NODE_TYPE *op[3]; /* maximal number of operand needed */ + struct _NODE_TYPE *next; +} OprNodeType; /* }}} */ +typedef struct _NODE_TYPE { /* {{{ */ + int type; + char *str; + GoomHash *vnamespace; + int line_number; + union { + ConstIntNodeType constInt; + ConstFloatNodeType constFloat; + ConstPtrNodeType constPtr; + OprNodeType opr; + } unode; +} NodeType; /* }}} */ +typedef struct _INSTRUCTION_DATA { /* {{{ */ + + union { + void *var; + int *var_int; + int *var_ptr; + float *var_float; + int jump_offset; + struct _ExternalFunctionStruct *external_function; + } udest; + + union { + void *var; + int *var_int; + int *var_ptr; + float *var_float; + int value_int; + int value_ptr; + float value_float; + } usrc; +} InstructionData; +/* }}} */ +typedef struct _INSTRUCTION { /* {{{ */ + + int id; + InstructionData data; + GoomSL *parent; + const char *name; /* name of the instruction */ + + char **params; /* parametres de l'instruction */ + GoomHash **vnamespace; + int *types; /* type des parametres de l'instruction */ + int cur_param; + int nb_param; + + int address; + char *jump_label; + char *nop_label; + + int line_number; + +} Instruction; +/* }}} */ +typedef struct _INSTRUCTION_FLOW { /* {{{ */ + + Instruction **instr; + int number; + int tabsize; + GoomHash *labels; +} InstructionFlow; +/* }}} */ +typedef struct _FAST_INSTRUCTION { /* {{{ */ + int id; + InstructionData data; + Instruction *proto; +} FastInstruction; +/* }}} */ +typedef struct _FastInstructionFlow { /* {{{ */ + int number; + FastInstruction *instr; + void *mallocedInstr; +} FastInstructionFlow; +/* }}} */ +typedef struct _ExternalFunctionStruct { /* {{{ */ + GoomSL_ExternalFunction function; + GoomHash *vars; + int is_extern; +} ExternalFunctionStruct; +/* }}} */ +typedef struct _Block { + int data; + int size; +} Block; +typedef struct _GSL_StructField { /* {{{ */ + int type; + char name[256]; + int offsetInStruct; /* Where this field is stored... */ +} GSL_StructField; + /* }}} */ +typedef struct _GSL_Struct { /* {{{ */ + int nbFields; + GSL_StructField *fields[64]; + int size; + Block iBlock[64]; + Block fBlock[64]; +} GSL_Struct; + /* }}} */ +struct _GoomSL { /* {{{ */ + int num_lines; + Instruction *instr; /* instruction en cours de construction */ + + InstructionFlow *iflow; /* flow d'instruction 'normal' */ + FastInstructionFlow *fastiflow; /* flow d'instruction optimise */ + + GoomHash *vars; /* table de variables */ + int currentNS; + GoomHash *namespaces[16]; + + GoomHash *functions; /* table des fonctions externes */ + + GoomHeap *data_heap; /* GSL Heap-like memory space */ + + int nbStructID; + GoomHash *structIDS; + GSL_Struct **gsl_struct; + int gsl_struct_size; + + int nbPtr; + int ptrArraySize; + void **ptrArray; + + int compilationOK; +#ifdef USE_JITC_X86 + JitcX86Env *jitc; + JitcFunc jitc_func; +#endif +}; /* }}} */ + +extern GoomSL *currentGoomSL; + +Instruction *gsl_instr_init(GoomSL *parent, const char *name, int id, int nb_param, int line_number); +void gsl_instr_add_param(Instruction *_this, char *param, int type); +void gsl_instr_set_namespace(Instruction *_this, GoomHash *ns); + +void gsl_declare_task(const char *name); +void gsl_declare_external_task(const char *name); + +int gsl_type_of_var(GoomHash *namespace, const char *name); + +void gsl_enternamespace(const char *name); +void gsl_reenternamespace(GoomHash *ns); +GoomHash *gsl_leavenamespace(void); +GoomHash *gsl_find_namespace(const char *name); + +void gsl_commit_compilation(void); + +/* #define TYPE_PARAM 1 */ + +#define FIRST_RESERVED 0x80000 + +#define TYPE_INTEGER 0x90001 +#define TYPE_FLOAT 0x90002 +#define TYPE_VAR 0x90003 +#define TYPE_PTR 0x90004 +#define TYPE_LABEL 0x90005 + +#define TYPE_OP_EQUAL 6 +#define TYPE_IVAR 0xa0001 +#define TYPE_FVAR 0xa0002 +#define TYPE_PVAR 0xa0003 +#define TYPE_SVAR 0xa0004 + +#define INSTR_JUMP 6 +#define INSTR_JZERO 29 +#define INSTR_CALL 36 +#define INSTR_RET 37 +#define INSTR_EXT_CALL 38 +#define INSTR_JNZERO 40 + +#define INSTR_SET 0x80001 +#define INSTR_INT 0x80002 +#define INSTR_FLOAT 0x80003 +#define INSTR_PTR 0x80004 +#define INSTR_LABEL 0x80005 +#define INSTR_ISLOWER 0x80006 +#define INSTR_ADD 0x80007 +#define INSTR_MUL 0x80008 +#define INSTR_DIV 0x80009 +#define INSTR_SUB 0x80010 +#define INSTR_ISEQUAL 0x80011 +#define INSTR_NOT 0x80012 + + +#endif diff --git a/veejay-server/libgoom/goomsl_yacc.c b/veejay-server/libgoom/goomsl_yacc.c new file mode 100644 index 00000000..9547f822 --- /dev/null +++ b/veejay-server/libgoom/goomsl_yacc.c @@ -0,0 +1,3356 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + LTYPE_INTEGER = 258, + LTYPE_FLOAT = 259, + LTYPE_VAR = 260, + LTYPE_PTR = 261, + PTR_TK = 262, + INT_TK = 263, + FLOAT_TK = 264, + DECLARE = 265, + EXTERNAL = 266, + WHILE = 267, + DO = 268, + NOT = 269, + PLUS_EQ = 270, + SUB_EQ = 271, + DIV_EQ = 272, + MUL_EQ = 273, + SUP_EQ = 274, + LOW_EQ = 275, + NOT_EQ = 276, + STRUCT = 277, + FOR = 278, + IN = 279 + }; +#endif +/* Tokens. */ +#define LTYPE_INTEGER 258 +#define LTYPE_FLOAT 259 +#define LTYPE_VAR 260 +#define LTYPE_PTR 261 +#define PTR_TK 262 +#define INT_TK 263 +#define FLOAT_TK 264 +#define DECLARE 265 +#define EXTERNAL 266 +#define WHILE 267 +#define DO 268 +#define NOT 269 +#define PLUS_EQ 270 +#define SUB_EQ 271 +#define DIV_EQ 272 +#define MUL_EQ 273 +#define SUP_EQ 274 +#define LOW_EQ 275 +#define NOT_EQ 276 +#define STRUCT 277 +#define FOR 278 +#define IN 279 + + + + +/* Copy the first part of user declarations. */ +#line 6 "goomsl_yacc.y" + + #include + #include + #include + #include "goomsl.h" + #include "goomsl_private.h" + +#define STRUCT_ALIGNMENT 16 +/* #define VERBOSE */ + + int yylex(void); + void yyerror(char *); + extern GoomSL *currentGoomSL; + + static NodeType *nodeNew(const char *str, int type, int line_number); + static NodeType *nodeClone(NodeType *node); + static void nodeFreeInternals(NodeType *node); + static void nodeFree(NodeType *node); + + static void commit_node(NodeType *node, int releaseIfTemp); + static void precommit_node(NodeType *node); + + static NodeType *new_constInt(const char *str, int line_number); + static NodeType *new_constFloat(const char *str, int line_number); + static NodeType *new_constPtr(const char *str, int line_number); + static NodeType *new_var(const char *str, int line_number); + static NodeType *new_nop(const char *str); + static NodeType *new_op(const char *str, int type, int nbOp); + + static int allocateLabel(); + static int allocateTemp(); + static void releaseTemp(int n); + static void releaseAllTemps(); + + static int is_tmp_expr(NodeType *node) { + if (node->str) { + return (!strncmp(node->str,"_i_tmp_",7)) + || (!strncmp(node->str,"_f_tmp_",7)) + || (!strncmp(node->str,"_p_tmp",7)); + } + return 0; + } + /* pre: is_tmp_expr(node); */ + static int get_tmp_id(NodeType *node) { return atoi((node->str)+5); } + + static int is_commutative_expr(int itype) + { /* {{{ */ + return (itype == INSTR_ADD) + || (itype == INSTR_MUL) + || (itype == INSTR_ISEQUAL); + } /* }}} */ + + static void GSL_PUT_LABEL(char *name, int line_number) + { /* {{{ */ +#ifdef VERBOSE + printf("label %s\n", name); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "label", INSTR_LABEL, 1, line_number); + gsl_instr_add_param(currentGoomSL->instr, name, TYPE_LABEL); + } /* }}} */ + static void GSL_PUT_JUMP(char *name, int line_number) + { /* {{{ */ +#ifdef VERBOSE + printf("jump %s\n", name); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "jump", INSTR_JUMP, 1, line_number); + gsl_instr_add_param(currentGoomSL->instr, name, TYPE_LABEL); + } /* }}} */ + + static void GSL_PUT_JXXX(char *name, char *iname, int instr_id, int line_number) + { /* {{{ */ +#ifdef VERBOSE + printf("%s %s\n", iname, name); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, iname, instr_id, 1, line_number); + gsl_instr_add_param(currentGoomSL->instr, name, TYPE_LABEL); + } /* }}} */ + static void GSL_PUT_JZERO(char *name,int line_number) + { /* {{{ */ + GSL_PUT_JXXX(name,"jzero.i",INSTR_JZERO,line_number); + } /* }}} */ + static void GSL_PUT_JNZERO(char *name, int line_number) + { /* {{{ */ + GSL_PUT_JXXX(name,"jnzero.i",INSTR_JNZERO,line_number); + } /* }}} */ + + /* Structures Management */ + +#define ALIGN_ADDR(_addr,_align) {\ + if (_align>1) {\ + int _dec = (_addr%_align);\ + if (_dec != 0) _addr += _align - _dec;\ + }} + + /* */ + void gsl_prepare_struct(GSL_Struct *s, int s_align, int i_align, int f_align) + { + int i; + int consumed = 0; + int iblk=0, fblk=0; + + s->iBlock[0].size = 0; + s->iBlock[0].data = 0; + s->fBlock[0].size = 0; + s->fBlock[0].data = 0; + + /* Prepare sub-struct and calculate space needed for their storage */ + for (i = 0; i < s->nbFields; ++i) + { + if (s->fields[i]->type < FIRST_RESERVED) + { + int j=0; + GSL_Struct *substruct = currentGoomSL->gsl_struct[s->fields[i]->type]; + consumed += sizeof(int); /* stocke le prefix */ + ALIGN_ADDR(consumed, s_align); + s->fields[i]->offsetInStruct = consumed; + gsl_prepare_struct(substruct, s_align, i_align, f_align); + for(j=0;substruct->iBlock[j].size>0;++j) { + s->iBlock[iblk].data = consumed + substruct->iBlock[j].data; + s->iBlock[iblk].size = substruct->iBlock[j].size; + iblk++; + } + for(j=0;substruct->fBlock[j].size>0;++j) { + s->fBlock[fblk].data = consumed + substruct->fBlock[j].data; + s->fBlock[fblk].size = substruct->fBlock[j].size; + fblk++; + } + consumed += substruct->size; + } + } + + /* Then prepare integers */ + ALIGN_ADDR(consumed, i_align); + for (i = 0; i < s->nbFields; ++i) + { + if (s->fields[i]->type == INSTR_INT) + { + if (s->iBlock[iblk].size == 0) { + s->iBlock[iblk].size = 1; + s->iBlock[iblk].data = consumed; + } else { + s->iBlock[iblk].size += 1; + } + s->fields[i]->offsetInStruct = consumed; + consumed += sizeof(int); + } + } + + iblk++; + s->iBlock[iblk].size = 0; + s->iBlock[iblk].data = 0; + + /* Then prepare floats */ + ALIGN_ADDR(consumed, f_align); + for (i = 0; i < s->nbFields; ++i) + { + if (s->fields[i]->type == INSTR_FLOAT) + { + if (s->fBlock[fblk].size == 0) { + s->fBlock[fblk].size = 1; + s->fBlock[fblk].data = consumed; + } else { + s->fBlock[fblk].size += 1; + } + s->fields[i]->offsetInStruct = consumed; + consumed += sizeof(int); + } + } + + fblk++; + s->fBlock[fblk].size = 0; + s->fBlock[fblk].data = 0; + + /* Finally prepare pointers */ + ALIGN_ADDR(consumed, i_align); + for (i = 0; i < s->nbFields; ++i) + { + if (s->fields[i]->type == INSTR_PTR) + { + s->fields[i]->offsetInStruct = consumed; + consumed += sizeof(int); + } + } + s->size = consumed; + } + + /* Returns the ID of a struct from its name */ + int gsl_get_struct_id(const char *name) /* {{{ */ + { + HashValue *ret = goom_hash_get(currentGoomSL->structIDS, name); + if (ret != NULL) return ret->i; + return -1; + } /* }}} */ + + /* Adds the definition of a struct */ + void gsl_add_struct(const char *name, GSL_Struct *gsl_struct) /* {{{ */ + { + /* Prepare the struct: ie calculate internal storage format */ + gsl_prepare_struct(gsl_struct, STRUCT_ALIGNMENT, STRUCT_ALIGNMENT, STRUCT_ALIGNMENT); + + /* If the struct does not already exists */ + if (gsl_get_struct_id(name) < 0) + { + /* adds it */ + int id = currentGoomSL->nbStructID++; + goom_hash_put_int(currentGoomSL->structIDS, name, id); + if (currentGoomSL->gsl_struct_size <= id) { + currentGoomSL->gsl_struct_size *= 2; + currentGoomSL->gsl_struct = (GSL_Struct**)realloc(currentGoomSL->gsl_struct, + sizeof(GSL_Struct*) * currentGoomSL->gsl_struct_size); + } + currentGoomSL->gsl_struct[id] = gsl_struct; + } + } /* }}} */ + + /* Creates a field for a struct */ + GSL_StructField *gsl_new_struct_field(const char *name, int type) + { + GSL_StructField *field = (GSL_StructField*)malloc(sizeof(GSL_StructField)); + strcpy(field->name, name); + field->type = type; + return field; + } + + /* Create as field for a struct which will be a struct itself */ + GSL_StructField *gsl_new_struct_field_struct(const char *name, const char *type) + { + GSL_StructField *field = gsl_new_struct_field(name, gsl_get_struct_id(type)); + if (field->type < 0) { + fprintf(stderr, "ERROR: Line %d, Unknown structure: '%s'\n", + currentGoomSL->num_lines, type); + exit(1); + } + return field; + } + + /* Creates a Struct */ + GSL_Struct *gsl_new_struct(GSL_StructField *field) + { + GSL_Struct *s = (GSL_Struct*)malloc(sizeof(GSL_Struct)); + s->nbFields = 1; + s->fields[0] = field; + return s; + } + + /* Adds a field to a struct */ + void gsl_add_struct_field(GSL_Struct *s, GSL_StructField *field) + { + s->fields[s->nbFields++] = field; + } + + int gsl_type_of_var(GoomHash *ns, const char *name) + { + char type_of[256]; + HashValue *hv; + sprintf(type_of, "__type_of_%s", name); + hv = goom_hash_get(ns, type_of); + if (hv != NULL) + return hv->i; + fprintf(stderr, "ERROR: Unknown variable type: '%s'\n", name); + return -1; + } + + static void gsl_declare_var(GoomHash *ns, const char *name, int type, void *space) + { + char type_of[256]; + if (name[0] == '@') { ns = currentGoomSL->vars; } + + if (space == NULL) { + switch (type) { + case INSTR_INT: + case INSTR_FLOAT: + case INSTR_PTR: + space = goom_heap_malloc_with_alignment(currentGoomSL->data_heap, + sizeof(int), sizeof(int)); + break; + case -1: + fprintf(stderr, "What the fuck!\n"); + exit(1); + default: /* On a un struct_id */ + space = goom_heap_malloc_with_alignment_prefixed(currentGoomSL->data_heap, + currentGoomSL->gsl_struct[type]->size, STRUCT_ALIGNMENT, sizeof(int)); + } + } + goom_hash_put_ptr(ns, name, (void*)space); + sprintf(type_of, "__type_of_%s", name); + goom_hash_put_int(ns, type_of, type); + + /* Ensuite le hack: on ajoute les champs en tant que variables. */ + if (type < FIRST_RESERVED) + { + int i; + GSL_Struct *gsl_struct = currentGoomSL->gsl_struct[type]; + ((int*)space)[-1] = type; /* stockage du type dans le prefixe de structure */ + for (i = 0; i < gsl_struct->nbFields; ++i) + { + char full_name[256]; + char *cspace = (char*)space + gsl_struct->fields[i]->offsetInStruct; + sprintf(full_name, "%s.%s", name, gsl_struct->fields[i]->name); + gsl_declare_var(ns, full_name, gsl_struct->fields[i]->type, cspace); + } + } + } + + /* Declare a variable which will be a struct */ + static void gsl_struct_decl(GoomHash *namespace, const char *struct_name, const char *name) + { + int struct_id = gsl_get_struct_id(struct_name); + gsl_declare_var(namespace, name, struct_id, NULL); + } + + static void gsl_float_decl_global(const char *name) + { + gsl_declare_var(currentGoomSL->vars, name, INSTR_FLOAT, NULL); + } + static void gsl_int_decl_global(const char *name) + { + gsl_declare_var(currentGoomSL->vars, name, INSTR_INT, NULL); + } + static void gsl_ptr_decl_global(const char *name) + { + gsl_declare_var(currentGoomSL->vars, name, INSTR_PTR, NULL); + } + static void gsl_struct_decl_global_from_id(const char *name, int id) + { + gsl_declare_var(currentGoomSL->vars, name, id, NULL); + } + + /* FLOAT */ + static void gsl_float_decl_local(const char *name) + { + gsl_declare_var(currentGoomSL->namespaces[currentGoomSL->currentNS], name, INSTR_FLOAT, NULL); + } + /* INT */ + static void gsl_int_decl_local(const char *name) + { + gsl_declare_var(currentGoomSL->namespaces[currentGoomSL->currentNS], name, INSTR_INT, NULL); + } + /* PTR */ + static void gsl_ptr_decl_local(const char *name) + { + gsl_declare_var(currentGoomSL->namespaces[currentGoomSL->currentNS], name, INSTR_PTR, NULL); + } + /* STRUCT */ + static void gsl_struct_decl_local(const char *struct_name, const char *name) + { + gsl_struct_decl(currentGoomSL->namespaces[currentGoomSL->currentNS],struct_name,name); + } + + + static void commit_test2(NodeType *set,const char *type, int instr); + static NodeType *new_call(const char *name, NodeType *affect_list); + + /* SETTER */ + static NodeType *new_set(NodeType *lvalue, NodeType *expression) + { /* {{{ */ + NodeType *set = new_op("set", OPR_SET, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } /* }}} */ + static void commit_set(NodeType *set) + { /* {{{ */ + commit_test2(set,"set",INSTR_SET); + } /* }}} */ + + /* PLUS_EQ */ + static NodeType *new_plus_eq(NodeType *lvalue, NodeType *expression) /* {{{ */ + { + NodeType *set = new_op("plus_eq", OPR_PLUS_EQ, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } + static void commit_plus_eq(NodeType *set) + { + precommit_node(set->unode.opr.op[1]); +#ifdef VERBOSE + printf("add %s %s\n", set->unode.opr.op[0]->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "add", INSTR_ADD, 2, set->line_number); + commit_node(set->unode.opr.op[0],0); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* SUB_EQ */ + static NodeType *new_sub_eq(NodeType *lvalue, NodeType *expression) /* {{{ */ + { + NodeType *set = new_op("sub_eq", OPR_SUB_EQ, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } + static void commit_sub_eq(NodeType *set) + { + precommit_node(set->unode.opr.op[1]); +#ifdef VERBOSE + printf("sub %s %s\n", set->unode.opr.op[0]->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "sub", INSTR_SUB, 2, set->line_number); + commit_node(set->unode.opr.op[0],0); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* MUL_EQ */ + static NodeType *new_mul_eq(NodeType *lvalue, NodeType *expression) /* {{{ */ + { + NodeType *set = new_op("mul_eq", OPR_MUL_EQ, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } + static void commit_mul_eq(NodeType *set) + { + precommit_node(set->unode.opr.op[1]); +#ifdef VERBOSE + printf("mul %s %s\n", set->unode.opr.op[0]->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "mul", INSTR_MUL, 2, set->line_number); + commit_node(set->unode.opr.op[0],0); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* DIV_EQ */ + static NodeType *new_div_eq(NodeType *lvalue, NodeType *expression) /* {{{ */ + { + NodeType *set = new_op("div_eq", OPR_DIV_EQ, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } + static void commit_div_eq(NodeType *set) + { + precommit_node(set->unode.opr.op[1]); +#ifdef VERBOSE + printf("div %s %s\n", set->unode.opr.op[0]->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "div", INSTR_DIV, 2, set->line_number); + commit_node(set->unode.opr.op[0],0); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* commodity method for add, mult, ... */ + + static void precommit_expr(NodeType *expr, const char *type, int instr_id) + { /* {{{ */ + NodeType *tmp, *tmpcpy; + int toAdd; + + /* compute "left" and "right" */ + switch (expr->unode.opr.nbOp) { + case 2: + precommit_node(expr->unode.opr.op[1]); + case 1: + precommit_node(expr->unode.opr.op[0]); + } + + if (is_tmp_expr(expr->unode.opr.op[0])) { + tmp = expr->unode.opr.op[0]; + toAdd = 1; + } + else if (is_commutative_expr(instr_id) && (expr->unode.opr.nbOp==2) && is_tmp_expr(expr->unode.opr.op[1])) { + tmp = expr->unode.opr.op[1]; + toAdd = 0; + } + else { + char stmp[256]; + /* declare a temporary variable to store the result */ + if (expr->unode.opr.op[0]->type == CONST_INT_NODE) { + sprintf(stmp,"_i_tmp_%i",allocateTemp()); + gsl_int_decl_global(stmp); + } + else if (expr->unode.opr.op[0]->type == CONST_FLOAT_NODE) { + sprintf(stmp,"_f_tmp%i",allocateTemp()); + gsl_float_decl_global(stmp); + } + else if (expr->unode.opr.op[0]->type == CONST_PTR_NODE) { + sprintf(stmp,"_p_tmp%i",allocateTemp()); + gsl_ptr_decl_global(stmp); + } + else { + int type = gsl_type_of_var(expr->unode.opr.op[0]->vnamespace, expr->unode.opr.op[0]->str); + if (type == INSTR_FLOAT) { + sprintf(stmp,"_f_tmp_%i",allocateTemp()); + gsl_float_decl_global(stmp); + } + else if (type == INSTR_PTR) { + sprintf(stmp,"_p_tmp_%i",allocateTemp()); + gsl_ptr_decl_global(stmp); + } + else if (type == INSTR_INT) { + sprintf(stmp,"_i_tmp_%i",allocateTemp()); + gsl_int_decl_global(stmp); + } + else if (type == -1) { + fprintf(stderr, "ERROR: Line %d, Could not find variable '%s'\n", + expr->line_number, expr->unode.opr.op[0]->str); + exit(1); + } + else { /* type is a struct_id */ + sprintf(stmp,"_s_tmp_%i",allocateTemp()); + gsl_struct_decl_global_from_id(stmp,type); + } + } + tmp = new_var(stmp,expr->line_number); + + /* set the tmp to the value of "op1" */ + tmpcpy = nodeClone(tmp); + commit_node(new_set(tmp,expr->unode.opr.op[0]),0); + toAdd = 1; + + tmp = tmpcpy; + } + + /* add op2 to tmp */ +#ifdef VERBOSE + if (expr->unode.opr.nbOp == 2) + printf("%s %s %s\n", type, tmp->str, expr->unode.opr.op[toAdd]->str); + else + printf("%s %s\n", type, tmp->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, type, instr_id, expr->unode.opr.nbOp, expr->line_number); + tmpcpy = nodeClone(tmp); + commit_node(tmp,0); + if (expr->unode.opr.nbOp == 2) { + commit_node(expr->unode.opr.op[toAdd],1); + } + + /* redefine the ADD node now as the computed variable */ + nodeFreeInternals(expr); + *expr = *tmpcpy; + free(tmpcpy); + } /* }}} */ + + static NodeType *new_expr1(const char *name, int id, NodeType *expr1) + { /* {{{ */ + NodeType *add = new_op(name, id, 1); + add->unode.opr.op[0] = expr1; + return add; + } /* }}} */ + + static NodeType *new_expr2(const char *name, int id, NodeType *expr1, NodeType *expr2) + { /* {{{ */ + NodeType *add = new_op(name, id, 2); + add->unode.opr.op[0] = expr1; + add->unode.opr.op[1] = expr2; + return add; + } /* }}} */ + + /* ADD */ + static NodeType *new_add(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("add", OPR_ADD, expr1, expr2); + } + static void precommit_add(NodeType *add) { + precommit_expr(add,"add",INSTR_ADD); + } /* }}} */ + + /* SUB */ + static NodeType *new_sub(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("sub", OPR_SUB, expr1, expr2); + } + static void precommit_sub(NodeType *sub) { + precommit_expr(sub,"sub",INSTR_SUB); + } /* }}} */ + + /* NEG */ + static NodeType *new_neg(NodeType *expr) { /* {{{ */ + NodeType *zeroConst = NULL; + if (expr->type == CONST_INT_NODE) + zeroConst = new_constInt("0", currentGoomSL->num_lines); + else if (expr->type == CONST_FLOAT_NODE) + zeroConst = new_constFloat("0.0", currentGoomSL->num_lines); + else if (expr->type == CONST_PTR_NODE) { + fprintf(stderr, "ERROR: Line %d, Could not negate const pointer.\n", + currentGoomSL->num_lines); + exit(1); + } + else { + int type = gsl_type_of_var(expr->vnamespace, expr->str); + if (type == INSTR_FLOAT) + zeroConst = new_constFloat("0.0", currentGoomSL->num_lines); + else if (type == INSTR_PTR) { + fprintf(stderr, "ERROR: Line %d, Could not negate pointer.\n", + currentGoomSL->num_lines); + exit(1); + } + else if (type == INSTR_INT) + zeroConst = new_constInt("0", currentGoomSL->num_lines); + else if (type == -1) { + fprintf(stderr, "ERROR: Line %d, Could not find variable '%s'\n", + expr->line_number, expr->unode.opr.op[0]->str); + exit(1); + } + else { /* type is a struct_id */ + fprintf(stderr, "ERROR: Line %d, Could not negate struct '%s'\n", + expr->line_number, expr->str); + exit(1); + } + } + return new_expr2("sub", OPR_SUB, zeroConst, expr); + } + /* }}} */ + + /* MUL */ + static NodeType *new_mul(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("mul", OPR_MUL, expr1, expr2); + } + static void precommit_mul(NodeType *mul) { + precommit_expr(mul,"mul",INSTR_MUL); + } /* }}} */ + + /* DIV */ + static NodeType *new_div(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("div", OPR_DIV, expr1, expr2); + } + static void precommit_div(NodeType *mul) { + precommit_expr(mul,"div",INSTR_DIV); + } /* }}} */ + + /* CALL EXPRESSION */ + static NodeType *new_call_expr(const char *name, NodeType *affect_list) { /* {{{ */ + NodeType *call = new_call(name,affect_list); + NodeType *node = new_expr1(name, OPR_CALL_EXPR, call); + node->vnamespace = gsl_find_namespace(name); + if (node->vnamespace == NULL) + fprintf(stderr, "ERROR: Line %d, No return type for: '%s'\n", currentGoomSL->num_lines, name); + return node; + } + static void precommit_call_expr(NodeType *call) { + char stmp[256]; + NodeType *tmp,*tmpcpy; + int type = gsl_type_of_var(call->vnamespace, call->str); + if (type == INSTR_FLOAT) { + sprintf(stmp,"_f_tmp_%i",allocateTemp()); + gsl_float_decl_global(stmp); + } + else if (type == INSTR_PTR) { + sprintf(stmp,"_p_tmp_%i",allocateTemp()); + gsl_ptr_decl_global(stmp); + } + else if (type == INSTR_INT) { + sprintf(stmp,"_i_tmp_%i",allocateTemp()); + gsl_int_decl_global(stmp); + } + else if (type == -1) { + fprintf(stderr, "ERROR: Line %d, Could not find variable '%s'\n", + call->line_number, call->str); + exit(1); + } + else { /* type is a struct_id */ + sprintf(stmp,"_s_tmp_%i",allocateTemp()); + gsl_struct_decl_global_from_id(stmp,type); + } + tmp = new_var(stmp,call->line_number); + commit_node(call->unode.opr.op[0],0); + tmpcpy = nodeClone(tmp); + commit_node(new_set(tmp,new_var(call->str,call->line_number)),0); + + nodeFreeInternals(call); + *call = *tmpcpy; + free(tmpcpy); + } /* }}} */ + + static void commit_test2(NodeType *set,const char *type, int instr) + { /* {{{ */ + NodeType *tmp; + char stmp[256]; + precommit_node(set->unode.opr.op[0]); + precommit_node(set->unode.opr.op[1]); + tmp = set->unode.opr.op[0]; + + stmp[0] = 0; + if (set->unode.opr.op[0]->type == CONST_INT_NODE) { + sprintf(stmp,"_i_tmp_%i",allocateTemp()); + gsl_int_decl_global(stmp); + } + else if (set->unode.opr.op[0]->type == CONST_FLOAT_NODE) { + sprintf(stmp,"_f_tmp%i",allocateTemp()); + gsl_float_decl_global(stmp); + } + else if (set->unode.opr.op[0]->type == CONST_PTR_NODE) { + sprintf(stmp,"_p_tmp%i",allocateTemp()); + gsl_ptr_decl_global(stmp); + } + if (stmp[0]) { + NodeType *tmpcpy; + tmp = new_var(stmp, set->line_number); + tmpcpy = nodeClone(tmp); + commit_node(new_set(tmp,set->unode.opr.op[0]),0); + tmp = tmpcpy; + } + +#ifdef VERBOSE + printf("%s %s %s\n", type, tmp->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, type, instr, 2, set->line_number); + commit_node(tmp,instr!=INSTR_SET); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* NOT */ + static NodeType *new_not(NodeType *expr1) { /* {{{ */ + return new_expr1("not", OPR_NOT, expr1); + } + static void commit_not(NodeType *set) + { + commit_node(set->unode.opr.op[0],0); +#ifdef VERBOSE + printf("not\n"); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "not", INSTR_NOT, 1, set->line_number); + gsl_instr_add_param(currentGoomSL->instr, "|dummy|", TYPE_LABEL); + } /* }}} */ + + /* EQU */ + static NodeType *new_equ(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("isequal", OPR_EQU, expr1, expr2); + } + static void commit_equ(NodeType *mul) { + commit_test2(mul,"isequal",INSTR_ISEQUAL); + } /* }}} */ + + /* INF */ + static NodeType *new_low(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("islower", OPR_LOW, expr1, expr2); + } + static void commit_low(NodeType *mul) { + commit_test2(mul,"islower",INSTR_ISLOWER); + } /* }}} */ + + /* WHILE */ + static NodeType *new_while(NodeType *expression, NodeType *instr) { /* {{{ */ + NodeType *node = new_op("while", OPR_WHILE, 2); + node->unode.opr.op[0] = expression; + node->unode.opr.op[1] = instr; + return node; + } + + static void commit_while(NodeType *node) + { + int lbl = allocateLabel(); + char start_while[1024], test_while[1024]; + sprintf(start_while, "|start_while_%d|", lbl); + sprintf(test_while, "|test_while_%d|", lbl); + + GSL_PUT_JUMP(test_while,node->line_number); + GSL_PUT_LABEL(start_while,node->line_number); + + /* code */ + commit_node(node->unode.opr.op[1],0); + + GSL_PUT_LABEL(test_while,node->line_number); + commit_node(node->unode.opr.op[0],0); + GSL_PUT_JNZERO(start_while,node->line_number); + } /* }}} */ + + /* FOR EACH */ + static NodeType *new_static_foreach(NodeType *var, NodeType *var_list, NodeType *instr) { /* {{{ */ + NodeType *node = new_op("for", OPR_FOREACH, 3); + node->unode.opr.op[0] = var; + node->unode.opr.op[1] = var_list; + node->unode.opr.op[2] = instr; + node->line_number = currentGoomSL->num_lines; + return node; + } + static void commit_foreach(NodeType *node) + { + NodeType *cur = node->unode.opr.op[1]; + char tmp_func[256], tmp_loop[256]; + int lbl = allocateLabel(); + sprintf(tmp_func, "|foreach_func_%d|", lbl); + sprintf(tmp_loop, "|foreach_loop_%d|", lbl); + + GSL_PUT_JUMP(tmp_loop, node->line_number); + GSL_PUT_LABEL(tmp_func, node->line_number); + + precommit_node(node->unode.opr.op[2]); + commit_node(node->unode.opr.op[2], 0); + + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "ret", INSTR_RET, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, "|dummy|", TYPE_LABEL); +#ifdef VERBOSE + printf("ret\n"); +#endif + + GSL_PUT_LABEL(tmp_loop, node->line_number); + + while (cur != NULL) + { + NodeType *x, *var; + + /* 1: x=var */ + x = nodeClone(node->unode.opr.op[0]); + var = nodeClone(cur->unode.opr.op[0]); + commit_node(new_set(x, var),0); + + /* 2: instr */ + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "call", INSTR_CALL, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, tmp_func, TYPE_LABEL); +#ifdef VERBOSE + printf("call %s\n", tmp_func); +#endif + + /* 3: var=x */ + x = nodeClone(node->unode.opr.op[0]); + var = cur->unode.opr.op[0]; + commit_node(new_set(var, x),0); + cur = cur->unode.opr.op[1]; + } + nodeFree(node->unode.opr.op[0]); + } /* }}} */ + + /* IF */ + static NodeType *new_if(NodeType *expression, NodeType *instr) { /* {{{ */ + NodeType *node = new_op("if", OPR_IF, 2); + node->unode.opr.op[0] = expression; + node->unode.opr.op[1] = instr; + return node; + } + static void commit_if(NodeType *node) { + + char slab[1024]; + sprintf(slab, "|eif%d|", allocateLabel()); + commit_node(node->unode.opr.op[0],0); + GSL_PUT_JZERO(slab,node->line_number); + /* code */ + commit_node(node->unode.opr.op[1],0); + GSL_PUT_LABEL(slab,node->line_number); + } /* }}} */ + + /* BLOCK */ + static NodeType *new_block(NodeType *lastNode) { /* {{{ */ + NodeType *blk = new_op("block", OPR_BLOCK, 2); + blk->unode.opr.op[0] = new_nop("start_of_block"); + blk->unode.opr.op[1] = lastNode; + return blk; + } + static void commit_block(NodeType *node) { + commit_node(node->unode.opr.op[0]->unode.opr.next,0); + } /* }}} */ + + /* FUNCTION INTRO */ + static NodeType *new_function_intro(const char *name) { /* {{{ */ + char stmp[256]; + if (strlen(name) < 200) { + sprintf(stmp, "|__func_%s|", name); + } + return new_op(stmp, OPR_FUNC_INTRO, 0); + } + static void commit_function_intro(NodeType *node) { + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "label", INSTR_LABEL, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_LABEL); +#ifdef VERBOSE + printf("label %s\n", node->str); +#endif + } /* }}} */ + + /* FUNCTION OUTRO */ + static NodeType *new_function_outro() { /* {{{ */ + return new_op("ret", OPR_FUNC_OUTRO, 0); + } + static void commit_function_outro(NodeType *node) { + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "ret", INSTR_RET, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, "|dummy|", TYPE_LABEL); + releaseAllTemps(); +#ifdef VERBOSE + printf("ret\n"); +#endif + } /* }}} */ + + /* AFFECTATION LIST */ + static NodeType *new_affec_list(NodeType *set, NodeType *next) /* {{{ */ + { + NodeType *node = new_op("affect_list", OPR_AFFECT_LIST, 2); + node->unode.opr.op[0] = set; + node->unode.opr.op[1] = next; + return node; + } + static NodeType *new_affect_list_after(NodeType *affect_list) + { + NodeType *ret = NULL; + NodeType *cur = affect_list; + while(cur != NULL) { + NodeType *set = cur->unode.opr.op[0]; + NodeType *next = cur->unode.opr.op[1]; + NodeType *lvalue = set->unode.opr.op[0]; + NodeType *expression = set->unode.opr.op[1]; + if ((lvalue->str[0] == '&') && (expression->type == VAR_NODE)) { + NodeType *nset = new_set(nodeClone(expression), nodeClone(lvalue)); + ret = new_affec_list(nset, ret); + } + cur = next; + } + return ret; + } + static void commit_affect_list(NodeType *node) + { + NodeType *cur = node; + while(cur != NULL) { + NodeType *set = cur->unode.opr.op[0]; + precommit_node(set->unode.opr.op[0]); + precommit_node(set->unode.opr.op[1]); + cur = cur->unode.opr.op[1]; + } + cur = node; + while(cur != NULL) { + NodeType *set = cur->unode.opr.op[0]; + commit_node(set,0); + cur = cur->unode.opr.op[1]; + } + } /* }}} */ + + /* VAR LIST */ + static NodeType *new_var_list(NodeType *var, NodeType *next) /* {{{ */ + { + NodeType *node = new_op("var_list", OPR_VAR_LIST, 2); + node->unode.opr.op[0] = var; + node->unode.opr.op[1] = next; + return node; + } + static void commit_var_list(NodeType *node) + { + } /* }}} */ + + /* FUNCTION CALL */ + static NodeType *new_call(const char *name, NodeType *affect_list) { /* {{{ */ + HashValue *fval; + fval = goom_hash_get(currentGoomSL->functions, name); + if (!fval) { + gsl_declare_task(name); + fval = goom_hash_get(currentGoomSL->functions, name); + } + if (!fval) { + fprintf(stderr, "ERROR: Line %d, Could not find function %s\n", currentGoomSL->num_lines, name); + exit(1); + return NULL; + } + else { + ExternalFunctionStruct *gef = (ExternalFunctionStruct*)fval->ptr; + if (gef->is_extern) { + NodeType *node = new_op(name, OPR_EXT_CALL, 1); + node->unode.opr.op[0] = affect_list; + return node; + } + else { + NodeType *node; + char stmp[256]; + if (strlen(name) < 200) { + sprintf(stmp, "|__func_%s|", name); + } + node = new_op(stmp, OPR_CALL, 1); + node->unode.opr.op[0] = affect_list; + return node; + } + } + } + static void commit_ext_call(NodeType *node) { + NodeType *alafter = new_affect_list_after(node->unode.opr.op[0]); + commit_node(node->unode.opr.op[0],0); + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "extcall", INSTR_EXT_CALL, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_VAR); +#ifdef VERBOSE + printf("extcall %s\n", node->str); +#endif + commit_node(alafter,0); + } + static void commit_call(NodeType *node) { + NodeType *alafter = new_affect_list_after(node->unode.opr.op[0]); + commit_node(node->unode.opr.op[0],0); + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "call", INSTR_CALL, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_LABEL); +#ifdef VERBOSE + printf("call %s\n", node->str); +#endif + commit_node(alafter,0); + } /* }}} */ + + /** **/ + + static NodeType *rootNode = 0; /* TODO: reinitialiser a chaque compilation. */ + static NodeType *lastNode = 0; + static NodeType *gsl_append(NodeType *curNode) { + if (curNode == 0) return 0; /* {{{ */ + if (lastNode) + lastNode->unode.opr.next = curNode; + lastNode = curNode; + while(lastNode->unode.opr.next) lastNode = lastNode->unode.opr.next; + if (rootNode == 0) + rootNode = curNode; + return curNode; + } /* }}} */ + +#if 1 + int allocateTemp() { + return allocateLabel(); + } + void releaseAllTemps() {} + void releaseTemp(int n) {} +#else + static int nbTemp = 0; + static int *tempArray = 0; + static int tempArraySize = 0; + int allocateTemp() { /* TODO: allocateITemp, allocateFTemp */ + int i = 0; /* {{{ */ + if (tempArray == 0) { + tempArraySize = 256; + tempArray = (int*)malloc(tempArraySize * sizeof(int)); + } + while (1) { + int j; + for (j=0;jtype == OPR_NODE) + switch(node->unode.opr.type) { + case OPR_ADD: precommit_add(node); break; + case OPR_SUB: precommit_sub(node); break; + case OPR_MUL: precommit_mul(node); break; + case OPR_DIV: precommit_div(node); break; + case OPR_CALL_EXPR: precommit_call_expr(node); break; + } + } /* }}} */ + + void commit_node(NodeType *node, int releaseIfTmp) + { /* {{{ */ + if (node == 0) return; + + switch(node->type) { + case OPR_NODE: + switch(node->unode.opr.type) { + case OPR_SET: commit_set(node); break; + case OPR_PLUS_EQ: commit_plus_eq(node); break; + case OPR_SUB_EQ: commit_sub_eq(node); break; + case OPR_MUL_EQ: commit_mul_eq(node); break; + case OPR_DIV_EQ: commit_div_eq(node); break; + case OPR_IF: commit_if(node); break; + case OPR_WHILE: commit_while(node); break; + case OPR_BLOCK: commit_block(node); break; + case OPR_FUNC_INTRO: commit_function_intro(node); break; + case OPR_FUNC_OUTRO: commit_function_outro(node); break; + case OPR_CALL: commit_call(node); break; + case OPR_EXT_CALL: commit_ext_call(node); break; + case OPR_EQU: commit_equ(node); break; + case OPR_LOW: commit_low(node); break; + case OPR_NOT: commit_not(node); break; + case OPR_AFFECT_LIST: commit_affect_list(node); break; + case OPR_FOREACH: commit_foreach(node); break; + case OPR_VAR_LIST: commit_var_list(node); break; +#ifdef VERBOSE + case EMPTY_NODE: printf("NOP\n"); break; +#endif + } + + commit_node(node->unode.opr.next,0); /* recursive for the moment, maybe better to do something iterative? */ + break; + + case VAR_NODE: gsl_instr_set_namespace(currentGoomSL->instr, node->vnamespace); + gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_VAR); break; + case CONST_INT_NODE: gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_INTEGER); break; + case CONST_FLOAT_NODE: gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_FLOAT); break; + case CONST_PTR_NODE: gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_PTR); break; + } + if (releaseIfTmp && is_tmp_expr(node)) + releaseTemp(get_tmp_id(node)); + + nodeFree(node); + } /* }}} */ + + NodeType *nodeNew(const char *str, int type, int line_number) { + NodeType *node = (NodeType*)malloc(sizeof(NodeType)); /* {{{ */ + node->type = type; + node->str = (char*)malloc(strlen(str)+1); + node->vnamespace = NULL; + node->line_number = line_number; + strcpy(node->str, str); + return node; + } /* }}} */ + static NodeType *nodeClone(NodeType *node) { + NodeType *ret = nodeNew(node->str, node->type, node->line_number); /* {{{ */ + ret->vnamespace = node->vnamespace; + ret->unode = node->unode; + return ret; + } /* }}} */ + + void nodeFreeInternals(NodeType *node) { + free(node->str); /* {{{ */ + } /* }}} */ + + void nodeFree(NodeType *node) { + nodeFreeInternals(node); /* {{{ */ + free(node); + } /* }}} */ + + NodeType *new_constInt(const char *str, int line_number) { + NodeType *node = nodeNew(str, CONST_INT_NODE, line_number); /* {{{ */ + node->unode.constInt.val = atoi(str); + return node; + } /* }}} */ + + NodeType *new_constPtr(const char *str, int line_number) { + NodeType *node = nodeNew(str, CONST_PTR_NODE, line_number); /* {{{ */ + node->unode.constPtr.id = strtol(str,NULL,0); + return node; + } /* }}} */ + + NodeType *new_constFloat(const char *str, int line_number) { + NodeType *node = nodeNew(str, CONST_FLOAT_NODE, line_number); /* {{{ */ + node->unode.constFloat.val = atof(str); + return node; + } /* }}} */ + + NodeType *new_var(const char *str, int line_number) { + NodeType *node = nodeNew(str, VAR_NODE, line_number); /* {{{ */ + node->vnamespace = gsl_find_namespace(str); + if (node->vnamespace == 0) { + fprintf(stderr, "ERROR: Line %d, Variable not found: '%s'\n", line_number, str); + exit(1); + } + return node; + } /* }}} */ + + NodeType *new_nop(const char *str) { + NodeType *node = new_op(str, EMPTY_NODE, 0); /* {{{ */ + return node; + } /* }}} */ + + NodeType *new_op(const char *str, int type, int nbOp) { + int i; /* {{{ */ + NodeType *node = nodeNew(str, OPR_NODE, currentGoomSL->num_lines); + node->unode.opr.next = 0; + node->unode.opr.type = type; + node->unode.opr.nbOp = nbOp; + for (i=0;iunode.opr.op[i] = 0; + return node; + } /* }}} */ + + + void gsl_declare_global_variable(int type, char *name) { + switch(type){ + case -1: break; + case FLOAT_TK:gsl_float_decl_global(name);break; + case INT_TK: gsl_int_decl_global(name);break; + case PTR_TK: gsl_ptr_decl_global(name);break; + default: + { + int id = type - 1000; + gsl_struct_decl_global_from_id(name,id); + } + } + } + + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 1199 "goomsl_yacc.y" +{ + int intValue; + float floatValue; + char charValue; + char strValue[2048]; + NodeType *nPtr; + GoomHash *namespace; + GSL_Struct *gsl_struct; + GSL_StructField *gsl_struct_field; + } +/* Line 193 of yacc.c. */ +#line 1348 "goomsl_yacc.c" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 1361 "goomsl_yacc.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 3 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 229 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 42 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 30 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 89 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 217 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 279 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 35, 36, 32, 29, 34, 30, 2, 31, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 33, 2, + 27, 26, 28, 37, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 40, 2, 41, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 38, 2, 39, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 7, 10, 19, 30, 39, 50, 53, + 56, 57, 65, 68, 73, 76, 79, 82, 85, 87, + 89, 90, 93, 96, 99, 102, 104, 108, 111, 112, + 116, 122, 130, 131, 132, 137, 142, 147, 152, 154, + 157, 160, 163, 166, 169, 172, 179, 186, 193, 195, + 199, 203, 207, 211, 218, 222, 224, 227, 231, 232, + 234, 236, 240, 244, 248, 252, 255, 259, 261, 265, + 269, 273, 277, 281, 285, 288, 290, 292, 294, 298, + 304, 310, 318, 323, 330, 333, 335, 340, 344, 346 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 43, 0, -1, 44, 55, 52, -1, 44, 59, -1, + 44, 11, 27, 48, 28, 50, 25, 56, -1, 44, + 11, 27, 48, 33, 51, 28, 50, 25, 56, -1, + 44, 10, 27, 49, 28, 50, 25, 56, -1, 44, + 10, 27, 49, 33, 51, 28, 50, 25, 56, -1, + 44, 45, -1, 44, 25, -1, -1, 22, 27, 5, + 33, 46, 28, 25, -1, 71, 47, -1, 46, 34, + 71, 47, -1, 8, 5, -1, 9, 5, -1, 7, + 5, -1, 5, 5, -1, 5, -1, 5, -1, -1, + 33, 8, -1, 33, 9, -1, 33, 7, -1, 33, + 5, -1, 58, -1, 58, 34, 51, -1, 52, 53, + -1, -1, 54, 44, 55, -1, 27, 49, 28, 50, + 25, -1, 27, 49, 33, 51, 28, 50, 25, -1, + -1, -1, 9, 5, 26, 64, -1, 8, 5, 26, + 64, -1, 7, 5, 26, 64, -1, 5, 5, 26, + 64, -1, 58, -1, 9, 5, -1, 8, 5, -1, + 7, 5, -1, 5, 5, -1, 62, 25, -1, 57, + 25, -1, 35, 65, 36, 37, 71, 59, -1, 12, + 65, 71, 13, 71, 59, -1, 38, 25, 63, 44, + 39, 25, -1, 67, -1, 5, 15, 64, -1, 5, + 16, 64, -1, 5, 18, 64, -1, 5, 17, 64, + -1, 23, 5, 24, 60, 13, 59, -1, 35, 61, + 36, -1, 5, -1, 5, 61, -1, 5, 26, 64, + -1, -1, 5, -1, 66, -1, 64, 32, 64, -1, + 64, 31, 64, -1, 64, 29, 64, -1, 64, 30, + 64, -1, 30, 64, -1, 35, 64, 36, -1, 68, + -1, 64, 26, 64, -1, 64, 27, 64, -1, 64, + 28, 64, -1, 64, 19, 64, -1, 64, 20, 64, + -1, 64, 21, 64, -1, 14, 65, -1, 4, -1, + 3, -1, 6, -1, 49, 25, 56, -1, 49, 33, + 69, 25, 56, -1, 40, 49, 41, 25, 56, -1, + 40, 49, 33, 69, 41, 25, 56, -1, 40, 49, + 56, 41, -1, 40, 49, 33, 69, 41, 56, -1, + 70, 69, -1, 70, -1, 5, 26, 56, 64, -1, + 33, 56, 64, -1, 25, -1, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 1236, 1236, 1238, 1239, 1240, 1241, 1242, 1243, 1244, + 1245, 1250, 1253, 1254, 1257, 1258, 1259, 1260, 1265, 1267, + 1270, 1271, 1272, 1273, 1274, 1277, 1278, 1283, 1284, 1287, + 1289, 1291, 1294, 1296, 1300, 1301, 1302, 1303, 1304, 1307, + 1308, 1309, 1310, 1315, 1316, 1317, 1318, 1319, 1320, 1321, + 1322, 1323, 1324, 1325, 1328, 1330, 1331, 1334, 1336, 1339, + 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1350, 1351, + 1352, 1353, 1354, 1355, 1356, 1359, 1360, 1361, 1366, 1367, + 1368, 1369, 1373, 1374, 1377, 1378, 1380, 1384, 1393, 1393 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "LTYPE_INTEGER", "LTYPE_FLOAT", + "LTYPE_VAR", "LTYPE_PTR", "PTR_TK", "INT_TK", "FLOAT_TK", "DECLARE", + "EXTERNAL", "WHILE", "DO", "NOT", "PLUS_EQ", "SUB_EQ", "DIV_EQ", + "MUL_EQ", "SUP_EQ", "LOW_EQ", "NOT_EQ", "STRUCT", "FOR", "IN", "'\\n'", + "'='", "'<'", "'>'", "'+'", "'-'", "'/'", "'*'", "':'", "','", "'('", + "')'", "'?'", "'{'", "'}'", "'['", "']'", "$accept", "gsl", "gsl_code", + "struct_declaration", "struct_members", "struct_member", "ext_task_name", + "task_name", "return_type", "arglist", "gsl_def_functions", "function", + "function_intro", "function_outro", "leave_namespace", "declaration", + "empty_declaration", "instruction", "var_list", "var_list_content", + "affectation", "start_block", "expression", "test", "constValue", + "func_call", "func_call_expression", "affectation_list", + "affectation_in_list", "opt_nl", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 10, 61, 60, 62, 43, + 45, 47, 42, 58, 44, 40, 41, 63, 123, 125, + 91, 93 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 42, 43, 44, 44, 44, 44, 44, 44, 44, + 44, 45, 46, 46, 47, 47, 47, 47, 48, 49, + 50, 50, 50, 50, 50, 51, 51, 52, 52, 53, + 54, 54, 55, 56, 57, 57, 57, 57, 57, 58, + 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 60, 61, 61, 62, 63, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, + 65, 65, 65, 65, 65, 66, 66, 66, 67, 67, + 67, 67, 68, 68, 69, 69, 70, 70, 71, 71 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 3, 2, 8, 10, 8, 10, 2, 2, + 0, 7, 2, 4, 2, 2, 2, 2, 1, 1, + 0, 2, 2, 2, 2, 1, 3, 2, 0, 3, + 5, 7, 0, 0, 4, 4, 4, 4, 1, 2, + 2, 2, 2, 2, 2, 6, 6, 6, 1, 3, + 3, 3, 3, 6, 3, 1, 2, 3, 0, 1, + 1, 3, 3, 3, 3, 2, 3, 1, 3, 3, + 3, 3, 3, 3, 2, 1, 1, 1, 3, 5, + 5, 7, 4, 6, 2, 1, 4, 3, 1, 0 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 10, 0, 32, 1, 19, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 0, 0, 0, 8, 0, 28, + 0, 38, 3, 0, 48, 42, 0, 0, 0, 0, + 0, 41, 40, 39, 0, 0, 76, 75, 59, 77, + 0, 0, 0, 0, 0, 89, 60, 67, 0, 0, + 0, 58, 19, 0, 33, 0, 2, 44, 43, 0, + 49, 50, 52, 51, 57, 0, 0, 0, 0, 18, + 0, 74, 65, 0, 33, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, + 10, 0, 0, 78, 0, 33, 0, 85, 0, 27, + 10, 37, 36, 35, 34, 20, 0, 20, 0, 66, + 0, 0, 71, 72, 73, 68, 69, 70, 63, 64, + 62, 61, 89, 89, 0, 0, 89, 0, 0, 33, + 33, 0, 33, 84, 0, 32, 0, 0, 0, 0, + 0, 0, 0, 25, 0, 0, 0, 82, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 80, 0, 87, + 79, 20, 0, 29, 24, 23, 21, 22, 33, 42, + 41, 40, 39, 20, 0, 33, 20, 33, 46, 0, + 89, 0, 0, 0, 0, 12, 56, 54, 53, 45, + 47, 33, 86, 0, 0, 6, 0, 26, 4, 0, + 83, 11, 0, 17, 16, 14, 15, 81, 30, 20, + 33, 33, 13, 0, 7, 5, 31 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 2, 17, 149, 185, 70, 18, 137, 142, + 56, 99, 100, 19, 93, 20, 21, 22, 125, 152, + 23, 90, 44, 45, 46, 24, 47, 96, 97, 86 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -116 +static const yytype_int16 yypact[] = +{ + -116, 40, 136, -116, 103, 39, 66, 68, 61, 65, + 1, 77, 101, -116, 1, 84, 109, -116, 12, -116, + 91, -116, -116, 97, -116, 98, 72, 72, 72, 72, + 72, 99, 104, 113, 109, 130, -116, -116, -116, -116, + 1, 72, 72, 109, 166, 115, -116, -116, 145, 131, + 118, -116, -116, -24, -116, -3, 138, -116, -116, 72, + 159, 159, 159, 159, 159, 72, 72, 72, 14, -116, + 51, -116, 22, 102, 124, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, -116, 160, 139, 140, 141, + -116, -3, 152, -116, 154, -116, 156, -3, 109, -116, + -116, 159, 159, 159, 159, 150, 82, 150, 82, -116, + -3, 158, 159, 159, 159, 159, 159, 159, 22, 22, + -116, -116, 115, 115, 195, 188, 115, 88, 162, -116, + -116, 72, -116, -116, 52, 136, 155, 177, 199, 200, + 201, 202, 180, 175, 185, 183, 171, -116, 144, 18, + 161, 195, 178, 144, 144, 190, 191, -116, 72, 159, + -116, 150, 82, -116, -116, -116, -116, -116, -116, -116, + -116, -116, -116, 150, 82, -116, 150, -116, -116, 192, + 115, 208, 213, 214, 215, -116, -116, -116, -116, -116, + -116, -116, 159, 196, 194, -116, 198, -116, -116, 203, + -116, -116, 161, -116, -116, -116, -116, -116, -116, 150, + -116, -116, -116, 204, -116, -116, -116 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -116, -116, -68, -116, -116, 23, -116, -15, -104, -92, + -116, -116, -116, 89, -74, -116, -88, -115, -116, 75, + -116, -116, -16, -6, -116, -116, -116, -62, -116, -99 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint8 yytable[] = +{ + 111, 53, 94, 144, 36, 37, 38, 39, 50, 91, + 60, 61, 62, 63, 64, 40, 145, 92, 143, 68, + 143, 131, 127, 148, 150, 72, 73, 154, 74, 128, + 95, 41, 135, 178, 71, 133, 42, 54, 188, 189, + 3, 43, 105, 101, 31, 55, 179, 106, 146, 102, + 103, 104, 180, 83, 84, 157, 158, 193, 160, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 196, + 194, 32, 199, 33, 143, 36, 37, 38, 39, 107, + 161, 202, 197, 134, 108, 162, 143, 138, 34, 139, + 140, 141, 35, 4, 195, 5, 6, 7, 8, 9, + 10, 198, 41, 200, 48, 213, 49, 42, 25, 51, + 11, 12, 43, 13, 52, 159, 57, 207, 26, 27, + 28, 29, 58, 14, 59, 65, 15, 155, 16, 30, + 66, 81, 82, 83, 84, 69, 214, 215, 109, 67, + 85, 4, 192, 5, 6, 7, 8, 9, 10, 4, + 87, 5, 6, 7, 89, 88, 10, 110, 11, 12, + 164, 13, 165, 166, 167, 98, 181, 12, 182, 183, + 184, 14, 123, 122, 15, 124, 16, 129, 126, 14, + 130, 132, 15, 136, 16, 75, 76, 77, 81, 82, + 83, 84, 78, 79, 80, 81, 82, 83, 84, 147, + 151, 153, 168, 156, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 203, 187, 190, 191, 201, 204, 205, + 206, 208, 209, 210, 163, 212, 186, 0, 211, 216 +}; + +static const yytype_int16 yycheck[] = +{ + 74, 16, 5, 107, 3, 4, 5, 6, 14, 33, + 26, 27, 28, 29, 30, 14, 108, 41, 106, 34, + 108, 95, 90, 122, 123, 41, 42, 126, 43, 91, + 33, 30, 100, 148, 40, 97, 35, 25, 153, 154, + 0, 40, 28, 59, 5, 33, 28, 33, 110, 65, + 66, 67, 34, 31, 32, 129, 130, 161, 132, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 173, + 162, 5, 176, 5, 162, 3, 4, 5, 6, 28, + 28, 180, 174, 98, 33, 33, 174, 5, 27, 7, + 8, 9, 27, 5, 168, 7, 8, 9, 10, 11, + 12, 175, 30, 177, 27, 209, 5, 35, 5, 25, + 22, 23, 40, 25, 5, 131, 25, 191, 15, 16, + 17, 18, 25, 35, 26, 26, 38, 39, 40, 26, + 26, 29, 30, 31, 32, 5, 210, 211, 36, 26, + 25, 5, 158, 7, 8, 9, 10, 11, 12, 5, + 5, 7, 8, 9, 36, 24, 12, 33, 22, 23, + 5, 25, 7, 8, 9, 27, 5, 23, 7, 8, + 9, 35, 33, 13, 38, 35, 40, 25, 37, 35, + 26, 25, 38, 33, 40, 19, 20, 21, 29, 30, + 31, 32, 26, 27, 28, 29, 30, 31, 32, 41, + 5, 13, 25, 41, 5, 5, 5, 5, 28, 34, + 25, 28, 41, 5, 36, 25, 25, 25, 5, 5, + 5, 25, 28, 25, 135, 202, 151, -1, 25, 25 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 43, 44, 0, 5, 7, 8, 9, 10, 11, + 12, 22, 23, 25, 35, 38, 40, 45, 49, 55, + 57, 58, 59, 62, 67, 5, 15, 16, 17, 18, + 26, 5, 5, 5, 27, 27, 3, 4, 5, 6, + 14, 30, 35, 40, 64, 65, 66, 68, 27, 5, + 65, 25, 5, 49, 25, 33, 52, 25, 25, 26, + 64, 64, 64, 64, 64, 26, 26, 26, 49, 5, + 48, 65, 64, 64, 49, 19, 20, 21, 26, 27, + 28, 29, 30, 31, 32, 25, 71, 5, 24, 36, + 63, 33, 41, 56, 5, 33, 69, 70, 27, 53, + 54, 64, 64, 64, 64, 28, 33, 28, 33, 36, + 33, 56, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 13, 33, 35, 60, 37, 44, 69, 25, + 26, 56, 25, 69, 49, 44, 33, 50, 5, 7, + 8, 9, 51, 58, 50, 51, 69, 41, 71, 46, + 71, 5, 61, 13, 71, 39, 41, 56, 56, 64, + 56, 28, 33, 55, 5, 7, 8, 9, 25, 5, + 5, 5, 5, 28, 34, 25, 28, 41, 59, 28, + 34, 5, 7, 8, 9, 47, 61, 36, 59, 59, + 25, 25, 64, 50, 51, 56, 50, 51, 56, 50, + 56, 25, 71, 5, 5, 5, 5, 56, 25, 28, + 25, 25, 47, 50, 56, 56, 25 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + +/* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 3: +#line 1238 "goomsl_yacc.y" + { gsl_append((yyvsp[(2) - (2)].nPtr)); } + break; + + case 4: +#line 1239 "goomsl_yacc.y" + { gsl_declare_global_variable((yyvsp[(6) - (8)].intValue),(yyvsp[(4) - (8)].strValue)); } + break; + + case 5: +#line 1240 "goomsl_yacc.y" + { gsl_declare_global_variable((yyvsp[(8) - (10)].intValue),(yyvsp[(4) - (10)].strValue)); } + break; + + case 6: +#line 1241 "goomsl_yacc.y" + { gsl_declare_global_variable((yyvsp[(6) - (8)].intValue),(yyvsp[(4) - (8)].strValue)); } + break; + + case 7: +#line 1242 "goomsl_yacc.y" + { gsl_declare_global_variable((yyvsp[(8) - (10)].intValue),(yyvsp[(4) - (10)].strValue)); } + break; + + case 11: +#line 1250 "goomsl_yacc.y" + { gsl_add_struct((yyvsp[(3) - (7)].strValue), (yyvsp[(5) - (7)].gsl_struct)); } + break; + + case 12: +#line 1253 "goomsl_yacc.y" + { (yyval.gsl_struct) = gsl_new_struct((yyvsp[(2) - (2)].gsl_struct_field)); } + break; + + case 13: +#line 1254 "goomsl_yacc.y" + { (yyval.gsl_struct) = (yyvsp[(1) - (4)].gsl_struct); gsl_add_struct_field((yyvsp[(1) - (4)].gsl_struct), (yyvsp[(4) - (4)].gsl_struct_field)); } + break; + + case 14: +#line 1257 "goomsl_yacc.y" + { (yyval.gsl_struct_field) = gsl_new_struct_field((yyvsp[(2) - (2)].strValue), INSTR_INT); } + break; + + case 15: +#line 1258 "goomsl_yacc.y" + { (yyval.gsl_struct_field) = gsl_new_struct_field((yyvsp[(2) - (2)].strValue), INSTR_FLOAT); } + break; + + case 16: +#line 1259 "goomsl_yacc.y" + { (yyval.gsl_struct_field) = gsl_new_struct_field((yyvsp[(2) - (2)].strValue), INSTR_PTR); } + break; + + case 17: +#line 1260 "goomsl_yacc.y" + { (yyval.gsl_struct_field) = gsl_new_struct_field_struct((yyvsp[(2) - (2)].strValue), (yyvsp[(1) - (2)].strValue)); } + break; + + case 18: +#line 1265 "goomsl_yacc.y" + { gsl_declare_external_task((yyvsp[(1) - (1)].strValue)); gsl_enternamespace((yyvsp[(1) - (1)].strValue)); strcpy((yyval.strValue),(yyvsp[(1) - (1)].strValue)); } + break; + + case 19: +#line 1267 "goomsl_yacc.y" + { gsl_declare_task((yyvsp[(1) - (1)].strValue)); gsl_enternamespace((yyvsp[(1) - (1)].strValue)); strcpy((yyval.strValue),(yyvsp[(1) - (1)].strValue)); strcpy((yyval.strValue),(yyvsp[(1) - (1)].strValue)); } + break; + + case 20: +#line 1270 "goomsl_yacc.y" + { (yyval.intValue)=-1; } + break; + + case 21: +#line 1271 "goomsl_yacc.y" + { (yyval.intValue)=INT_TK; } + break; + + case 22: +#line 1272 "goomsl_yacc.y" + { (yyval.intValue)=FLOAT_TK; } + break; + + case 23: +#line 1273 "goomsl_yacc.y" + { (yyval.intValue)=PTR_TK; } + break; + + case 24: +#line 1274 "goomsl_yacc.y" + { (yyval.intValue)= 1000 + gsl_get_struct_id((yyvsp[(2) - (2)].strValue)); } + break; + + case 29: +#line 1287 "goomsl_yacc.y" + { gsl_leavenamespace(); } + break; + + case 30: +#line 1289 "goomsl_yacc.y" + { gsl_append(new_function_intro((yyvsp[(2) - (5)].strValue))); + gsl_declare_global_variable((yyvsp[(4) - (5)].intValue),(yyvsp[(2) - (5)].strValue)); } + break; + + case 31: +#line 1291 "goomsl_yacc.y" + { gsl_append(new_function_intro((yyvsp[(2) - (7)].strValue))); + gsl_declare_global_variable((yyvsp[(6) - (7)].intValue),(yyvsp[(2) - (7)].strValue)); } + break; + + case 32: +#line 1294 "goomsl_yacc.y" + { gsl_append(new_function_outro()); } + break; + + case 33: +#line 1296 "goomsl_yacc.y" + { (yyval.namespace) = gsl_leavenamespace(); } + break; + + case 34: +#line 1300 "goomsl_yacc.y" + { gsl_float_decl_local((yyvsp[(2) - (4)].strValue)); (yyval.nPtr) = new_set(new_var((yyvsp[(2) - (4)].strValue),currentGoomSL->num_lines), (yyvsp[(4) - (4)].nPtr)); } + break; + + case 35: +#line 1301 "goomsl_yacc.y" + { gsl_int_decl_local((yyvsp[(2) - (4)].strValue)); (yyval.nPtr) = new_set(new_var((yyvsp[(2) - (4)].strValue),currentGoomSL->num_lines), (yyvsp[(4) - (4)].nPtr)); } + break; + + case 36: +#line 1302 "goomsl_yacc.y" + { gsl_ptr_decl_local((yyvsp[(2) - (4)].strValue)); (yyval.nPtr) = new_set(new_var((yyvsp[(2) - (4)].strValue),currentGoomSL->num_lines), (yyvsp[(4) - (4)].nPtr)); } + break; + + case 37: +#line 1303 "goomsl_yacc.y" + { gsl_struct_decl_local((yyvsp[(1) - (4)].strValue),(yyvsp[(2) - (4)].strValue)); (yyval.nPtr) = new_set(new_var((yyvsp[(2) - (4)].strValue),currentGoomSL->num_lines), (yyvsp[(4) - (4)].nPtr)); } + break; + + case 38: +#line 1304 "goomsl_yacc.y" + { (yyval.nPtr) = 0; } + break; + + case 39: +#line 1307 "goomsl_yacc.y" + { gsl_float_decl_local((yyvsp[(2) - (2)].strValue)); } + break; + + case 40: +#line 1308 "goomsl_yacc.y" + { gsl_int_decl_local((yyvsp[(2) - (2)].strValue)); } + break; + + case 41: +#line 1309 "goomsl_yacc.y" + { gsl_ptr_decl_local((yyvsp[(2) - (2)].strValue)); } + break; + + case 42: +#line 1310 "goomsl_yacc.y" + { gsl_struct_decl_local((yyvsp[(1) - (2)].strValue),(yyvsp[(2) - (2)].strValue)); } + break; + + case 43: +#line 1315 "goomsl_yacc.y" + { (yyval.nPtr) = (yyvsp[(1) - (2)].nPtr); } + break; + + case 44: +#line 1316 "goomsl_yacc.y" + { (yyval.nPtr) = (yyvsp[(1) - (2)].nPtr); } + break; + + case 45: +#line 1317 "goomsl_yacc.y" + { (yyval.nPtr) = new_if((yyvsp[(2) - (6)].nPtr),(yyvsp[(6) - (6)].nPtr)); } + break; + + case 46: +#line 1318 "goomsl_yacc.y" + { (yyval.nPtr) = new_while((yyvsp[(2) - (6)].nPtr),(yyvsp[(6) - (6)].nPtr)); } + break; + + case 47: +#line 1319 "goomsl_yacc.y" + { lastNode = (yyvsp[(3) - (6)].nPtr)->unode.opr.op[1]; (yyval.nPtr)=(yyvsp[(3) - (6)].nPtr); } + break; + + case 48: +#line 1320 "goomsl_yacc.y" + { (yyval.nPtr) = (yyvsp[(1) - (1)].nPtr); } + break; + + case 49: +#line 1321 "goomsl_yacc.y" + { (yyval.nPtr) = new_plus_eq(new_var((yyvsp[(1) - (3)].strValue),currentGoomSL->num_lines),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 50: +#line 1322 "goomsl_yacc.y" + { (yyval.nPtr) = new_sub_eq(new_var((yyvsp[(1) - (3)].strValue),currentGoomSL->num_lines),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 51: +#line 1323 "goomsl_yacc.y" + { (yyval.nPtr) = new_mul_eq(new_var((yyvsp[(1) - (3)].strValue),currentGoomSL->num_lines),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 52: +#line 1324 "goomsl_yacc.y" + { (yyval.nPtr) = new_div_eq(new_var((yyvsp[(1) - (3)].strValue),currentGoomSL->num_lines),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 53: +#line 1325 "goomsl_yacc.y" + { (yyval.nPtr) = new_static_foreach(new_var((yyvsp[(2) - (6)].strValue), currentGoomSL->num_lines), (yyvsp[(4) - (6)].nPtr), (yyvsp[(6) - (6)].nPtr)); } + break; + + case 54: +#line 1328 "goomsl_yacc.y" + { (yyval.nPtr) = (yyvsp[(2) - (3)].nPtr); } + break; + + case 55: +#line 1330 "goomsl_yacc.y" + { (yyval.nPtr) = new_var_list(new_var((yyvsp[(1) - (1)].strValue),currentGoomSL->num_lines), NULL); } + break; + + case 56: +#line 1331 "goomsl_yacc.y" + { (yyval.nPtr) = new_var_list(new_var((yyvsp[(1) - (2)].strValue),currentGoomSL->num_lines), (yyvsp[(2) - (2)].nPtr)); } + break; + + case 57: +#line 1334 "goomsl_yacc.y" + { (yyval.nPtr) = new_set(new_var((yyvsp[(1) - (3)].strValue),currentGoomSL->num_lines),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 58: +#line 1336 "goomsl_yacc.y" + { (yyval.nPtr) = new_block(lastNode); lastNode = (yyval.nPtr)->unode.opr.op[0]; } + break; + + case 59: +#line 1339 "goomsl_yacc.y" + { (yyval.nPtr) = new_var((yyvsp[(1) - (1)].strValue),currentGoomSL->num_lines); } + break; + + case 60: +#line 1340 "goomsl_yacc.y" + { (yyval.nPtr) = (yyvsp[(1) - (1)].nPtr); } + break; + + case 61: +#line 1341 "goomsl_yacc.y" + { (yyval.nPtr) = new_mul((yyvsp[(1) - (3)].nPtr),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 62: +#line 1342 "goomsl_yacc.y" + { (yyval.nPtr) = new_div((yyvsp[(1) - (3)].nPtr),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 63: +#line 1343 "goomsl_yacc.y" + { (yyval.nPtr) = new_add((yyvsp[(1) - (3)].nPtr),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 64: +#line 1344 "goomsl_yacc.y" + { (yyval.nPtr) = new_sub((yyvsp[(1) - (3)].nPtr),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 65: +#line 1345 "goomsl_yacc.y" + { (yyval.nPtr) = new_neg((yyvsp[(2) - (2)].nPtr)); } + break; + + case 66: +#line 1346 "goomsl_yacc.y" + { (yyval.nPtr) = (yyvsp[(2) - (3)].nPtr); } + break; + + case 67: +#line 1347 "goomsl_yacc.y" + { (yyval.nPtr) = (yyvsp[(1) - (1)].nPtr); } + break; + + case 68: +#line 1350 "goomsl_yacc.y" + { (yyval.nPtr) = new_equ((yyvsp[(1) - (3)].nPtr),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 69: +#line 1351 "goomsl_yacc.y" + { (yyval.nPtr) = new_low((yyvsp[(1) - (3)].nPtr),(yyvsp[(3) - (3)].nPtr)); } + break; + + case 70: +#line 1352 "goomsl_yacc.y" + { (yyval.nPtr) = new_low((yyvsp[(3) - (3)].nPtr),(yyvsp[(1) - (3)].nPtr)); } + break; + + case 71: +#line 1353 "goomsl_yacc.y" + { (yyval.nPtr) = new_not(new_low((yyvsp[(1) - (3)].nPtr),(yyvsp[(3) - (3)].nPtr))); } + break; + + case 72: +#line 1354 "goomsl_yacc.y" + { (yyval.nPtr) = new_not(new_low((yyvsp[(3) - (3)].nPtr),(yyvsp[(1) - (3)].nPtr))); } + break; + + case 73: +#line 1355 "goomsl_yacc.y" + { (yyval.nPtr) = new_not(new_equ((yyvsp[(1) - (3)].nPtr),(yyvsp[(3) - (3)].nPtr))); } + break; + + case 74: +#line 1356 "goomsl_yacc.y" + { (yyval.nPtr) = new_not((yyvsp[(2) - (2)].nPtr)); } + break; + + case 75: +#line 1359 "goomsl_yacc.y" + { (yyval.nPtr) = new_constFloat((yyvsp[(1) - (1)].strValue),currentGoomSL->num_lines); } + break; + + case 76: +#line 1360 "goomsl_yacc.y" + { (yyval.nPtr) = new_constInt((yyvsp[(1) - (1)].strValue),currentGoomSL->num_lines); } + break; + + case 77: +#line 1361 "goomsl_yacc.y" + { (yyval.nPtr) = new_constPtr((yyvsp[(1) - (1)].strValue),currentGoomSL->num_lines); } + break; + + case 78: +#line 1366 "goomsl_yacc.y" + { (yyval.nPtr) = new_call((yyvsp[(1) - (3)].strValue),NULL); } + break; + + case 79: +#line 1367 "goomsl_yacc.y" + { (yyval.nPtr) = new_call((yyvsp[(1) - (5)].strValue),(yyvsp[(3) - (5)].nPtr)); } + break; + + case 80: +#line 1368 "goomsl_yacc.y" + { (yyval.nPtr) = new_call((yyvsp[(2) - (5)].strValue),NULL); } + break; + + case 81: +#line 1369 "goomsl_yacc.y" + { (yyval.nPtr) = new_call((yyvsp[(2) - (7)].strValue),(yyvsp[(4) - (7)].nPtr)); } + break; + + case 82: +#line 1373 "goomsl_yacc.y" + { (yyval.nPtr) = new_call_expr((yyvsp[(2) - (4)].strValue),NULL); } + break; + + case 83: +#line 1374 "goomsl_yacc.y" + { (yyval.nPtr) = new_call_expr((yyvsp[(2) - (6)].strValue),(yyvsp[(4) - (6)].nPtr)); } + break; + + case 84: +#line 1377 "goomsl_yacc.y" + { (yyval.nPtr) = new_affec_list((yyvsp[(1) - (2)].nPtr),(yyvsp[(2) - (2)].nPtr)); } + break; + + case 85: +#line 1378 "goomsl_yacc.y" + { (yyval.nPtr) = new_affec_list((yyvsp[(1) - (1)].nPtr),NULL); } + break; + + case 86: +#line 1380 "goomsl_yacc.y" + { + gsl_reenternamespace((yyvsp[(3) - (4)].namespace)); + (yyval.nPtr) = new_set(new_var((yyvsp[(1) - (4)].strValue),currentGoomSL->num_lines),(yyvsp[(4) - (4)].nPtr)); + } + break; + + case 87: +#line 1384 "goomsl_yacc.y" + { + gsl_reenternamespace((yyvsp[(2) - (3)].namespace)); + (yyval.nPtr) = new_set(new_var("&this", currentGoomSL->num_lines),(yyvsp[(3) - (3)].nPtr)); + } + break; + + +/* Line 1267 of yacc.c. */ +#line 3132 "goomsl_yacc.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 1396 "goomsl_yacc.y" + + + +void yyerror(char *str) +{ /* {{{ */ + fprintf(stderr, "ERROR: Line %d, %s\n", currentGoomSL->num_lines, str); + currentGoomSL->compilationOK = 0; + exit(1); +} /* }}} */ + + diff --git a/veejay-server/libgoom/goomsl_yacc.h b/veejay-server/libgoom/goomsl_yacc.h new file mode 100644 index 00000000..fae0c010 --- /dev/null +++ b/veejay-server/libgoom/goomsl_yacc.h @@ -0,0 +1,104 @@ +/* A Bison parser, made by GNU Bison 1.875. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + LTYPE_INTEGER = 258, + LTYPE_FLOAT = 259, + LTYPE_VAR = 260, + LTYPE_PTR = 261, + PTR_TK = 262, + INT_TK = 263, + FLOAT_TK = 264, + DECLARE = 265, + EXTERNAL = 266, + WHILE = 267, + DO = 268, + NOT = 269, + PLUS_EQ = 270, + SUB_EQ = 271, + DIV_EQ = 272, + MUL_EQ = 273, + SUP_EQ = 274, + LOW_EQ = 275, + NOT_EQ = 276, + STRUCT = 277, + FOR = 278, + IN = 279 + }; +#endif +#define LTYPE_INTEGER 258 +#define LTYPE_FLOAT 259 +#define LTYPE_VAR 260 +#define LTYPE_PTR 261 +#define PTR_TK 262 +#define INT_TK 263 +#define FLOAT_TK 264 +#define DECLARE 265 +#define EXTERNAL 266 +#define WHILE 267 +#define DO 268 +#define NOT 269 +#define PLUS_EQ 270 +#define SUB_EQ 271 +#define DIV_EQ 272 +#define MUL_EQ 273 +#define SUP_EQ 274 +#define LOW_EQ 275 +#define NOT_EQ 276 +#define STRUCT 277 +#define FOR 278 +#define IN 279 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 1199 "goomsl_yacc.y" +typedef union YYSTYPE { + int intValue; + float floatValue; + char charValue; + char strValue[2048]; + NodeType *nPtr; + GoomHash *namespace; + GSL_Struct *gsl_struct; + GSL_StructField *gsl_struct_field; + } YYSTYPE; +/* Line 1240 of yacc.c. */ +#line 95 "goomsl_yacc.h" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +extern YYSTYPE yylval; + + + diff --git a/veejay-server/libgoom/goomsl_yacc.y b/veejay-server/libgoom/goomsl_yacc.y new file mode 100644 index 00000000..c424a50a --- /dev/null +++ b/veejay-server/libgoom/goomsl_yacc.y @@ -0,0 +1,1405 @@ +/** + * copyright 2004, Jean-Christophe Hoelt + * + * This program is released under the terms of the GNU Lesser General Public Licence. + */ +%{ + #include + #include + #include + #include "goomsl.h" + #include "goomsl_private.h" + +#define STRUCT_ALIGNMENT 16 +/* #define VERBOSE */ + + int yylex(void); + void yyerror(char *); + extern GoomSL *currentGoomSL; + + static NodeType *nodeNew(const char *str, int type, int line_number); + static NodeType *nodeClone(NodeType *node); + static void nodeFreeInternals(NodeType *node); + static void nodeFree(NodeType *node); + + static void commit_node(NodeType *node, int releaseIfTemp); + static void precommit_node(NodeType *node); + + static NodeType *new_constInt(const char *str, int line_number); + static NodeType *new_constFloat(const char *str, int line_number); + static NodeType *new_constPtr(const char *str, int line_number); + static NodeType *new_var(const char *str, int line_number); + static NodeType *new_nop(const char *str); + static NodeType *new_op(const char *str, int type, int nbOp); + + static int allocateLabel(); + static int allocateTemp(); + static void releaseTemp(int n); + static void releaseAllTemps(); + + static int is_tmp_expr(NodeType *node) { + if (node->str) { + return (!strncmp(node->str,"_i_tmp_",7)) + || (!strncmp(node->str,"_f_tmp_",7)) + || (!strncmp(node->str,"_p_tmp",7)); + } + return 0; + } + /* pre: is_tmp_expr(node); */ + static int get_tmp_id(NodeType *node) { return atoi((node->str)+5); } + + static int is_commutative_expr(int itype) + { /* {{{ */ + return (itype == INSTR_ADD) + || (itype == INSTR_MUL) + || (itype == INSTR_ISEQUAL); + } /* }}} */ + + static void GSL_PUT_LABEL(char *name, int line_number) + { /* {{{ */ +#ifdef VERBOSE + printf("label %s\n", name); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "label", INSTR_LABEL, 1, line_number); + gsl_instr_add_param(currentGoomSL->instr, name, TYPE_LABEL); + } /* }}} */ + static void GSL_PUT_JUMP(char *name, int line_number) + { /* {{{ */ +#ifdef VERBOSE + printf("jump %s\n", name); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "jump", INSTR_JUMP, 1, line_number); + gsl_instr_add_param(currentGoomSL->instr, name, TYPE_LABEL); + } /* }}} */ + + static void GSL_PUT_JXXX(char *name, char *iname, int instr_id, int line_number) + { /* {{{ */ +#ifdef VERBOSE + printf("%s %s\n", iname, name); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, iname, instr_id, 1, line_number); + gsl_instr_add_param(currentGoomSL->instr, name, TYPE_LABEL); + } /* }}} */ + static void GSL_PUT_JZERO(char *name,int line_number) + { /* {{{ */ + GSL_PUT_JXXX(name,"jzero.i",INSTR_JZERO,line_number); + } /* }}} */ + static void GSL_PUT_JNZERO(char *name, int line_number) + { /* {{{ */ + GSL_PUT_JXXX(name,"jnzero.i",INSTR_JNZERO,line_number); + } /* }}} */ + + /* Structures Management */ + +#define ALIGN_ADDR(_addr,_align) {\ + if (_align>1) {\ + int _dec = (_addr%_align);\ + if (_dec != 0) _addr += _align - _dec;\ + }} + + /* */ + void gsl_prepare_struct(GSL_Struct *s, int s_align, int i_align, int f_align) + { + int i; + int consumed = 0; + int iblk=0, fblk=0; + + s->iBlock[0].size = 0; + s->iBlock[0].data = 0; + s->fBlock[0].size = 0; + s->fBlock[0].data = 0; + + /* Prepare sub-struct and calculate space needed for their storage */ + for (i = 0; i < s->nbFields; ++i) + { + if (s->fields[i]->type < FIRST_RESERVED) + { + int j=0; + GSL_Struct *substruct = currentGoomSL->gsl_struct[s->fields[i]->type]; + consumed += sizeof(int); /* stocke le prefix */ + ALIGN_ADDR(consumed, s_align); + s->fields[i]->offsetInStruct = consumed; + gsl_prepare_struct(substruct, s_align, i_align, f_align); + for(j=0;substruct->iBlock[j].size>0;++j) { + s->iBlock[iblk].data = consumed + substruct->iBlock[j].data; + s->iBlock[iblk].size = substruct->iBlock[j].size; + iblk++; + } + for(j=0;substruct->fBlock[j].size>0;++j) { + s->fBlock[fblk].data = consumed + substruct->fBlock[j].data; + s->fBlock[fblk].size = substruct->fBlock[j].size; + fblk++; + } + consumed += substruct->size; + } + } + + /* Then prepare integers */ + ALIGN_ADDR(consumed, i_align); + for (i = 0; i < s->nbFields; ++i) + { + if (s->fields[i]->type == INSTR_INT) + { + if (s->iBlock[iblk].size == 0) { + s->iBlock[iblk].size = 1; + s->iBlock[iblk].data = consumed; + } else { + s->iBlock[iblk].size += 1; + } + s->fields[i]->offsetInStruct = consumed; + consumed += sizeof(int); + } + } + + iblk++; + s->iBlock[iblk].size = 0; + s->iBlock[iblk].data = 0; + + /* Then prepare floats */ + ALIGN_ADDR(consumed, f_align); + for (i = 0; i < s->nbFields; ++i) + { + if (s->fields[i]->type == INSTR_FLOAT) + { + if (s->fBlock[fblk].size == 0) { + s->fBlock[fblk].size = 1; + s->fBlock[fblk].data = consumed; + } else { + s->fBlock[fblk].size += 1; + } + s->fields[i]->offsetInStruct = consumed; + consumed += sizeof(int); + } + } + + fblk++; + s->fBlock[fblk].size = 0; + s->fBlock[fblk].data = 0; + + /* Finally prepare pointers */ + ALIGN_ADDR(consumed, i_align); + for (i = 0; i < s->nbFields; ++i) + { + if (s->fields[i]->type == INSTR_PTR) + { + s->fields[i]->offsetInStruct = consumed; + consumed += sizeof(int); + } + } + s->size = consumed; + } + + /* Returns the ID of a struct from its name */ + int gsl_get_struct_id(const char *name) /* {{{ */ + { + HashValue *ret = goom_hash_get(currentGoomSL->structIDS, name); + if (ret != NULL) return ret->i; + return -1; + } /* }}} */ + + /* Adds the definition of a struct */ + void gsl_add_struct(const char *name, GSL_Struct *gsl_struct) /* {{{ */ + { + /* Prepare the struct: ie calculate internal storage format */ + gsl_prepare_struct(gsl_struct, STRUCT_ALIGNMENT, STRUCT_ALIGNMENT, STRUCT_ALIGNMENT); + + /* If the struct does not already exists */ + if (gsl_get_struct_id(name) < 0) + { + /* adds it */ + int id = currentGoomSL->nbStructID++; + goom_hash_put_int(currentGoomSL->structIDS, name, id); + if (currentGoomSL->gsl_struct_size <= id) { + currentGoomSL->gsl_struct_size *= 2; + currentGoomSL->gsl_struct = (GSL_Struct**)realloc(currentGoomSL->gsl_struct, + sizeof(GSL_Struct*) * currentGoomSL->gsl_struct_size); + } + currentGoomSL->gsl_struct[id] = gsl_struct; + } + } /* }}} */ + + /* Creates a field for a struct */ + GSL_StructField *gsl_new_struct_field(const char *name, int type) + { + GSL_StructField *field = (GSL_StructField*)malloc(sizeof(GSL_StructField)); + strcpy(field->name, name); + field->type = type; + return field; + } + + /* Create as field for a struct which will be a struct itself */ + GSL_StructField *gsl_new_struct_field_struct(const char *name, const char *type) + { + GSL_StructField *field = gsl_new_struct_field(name, gsl_get_struct_id(type)); + if (field->type < 0) { + fprintf(stderr, "ERROR: Line %d, Unknown structure: '%s'\n", + currentGoomSL->num_lines, type); + exit(1); + } + return field; + } + + /* Creates a Struct */ + GSL_Struct *gsl_new_struct(GSL_StructField *field) + { + GSL_Struct *s = (GSL_Struct*)malloc(sizeof(GSL_Struct)); + s->nbFields = 1; + s->fields[0] = field; + return s; + } + + /* Adds a field to a struct */ + void gsl_add_struct_field(GSL_Struct *s, GSL_StructField *field) + { + s->fields[s->nbFields++] = field; + } + + int gsl_type_of_var(GoomHash *ns, const char *name) + { + char type_of[256]; + HashValue *hv; + sprintf(type_of, "__type_of_%s", name); + hv = goom_hash_get(ns, type_of); + if (hv != NULL) + return hv->i; + fprintf(stderr, "ERROR: Unknown variable type: '%s'\n", name); + return -1; + } + + static void gsl_declare_var(GoomHash *ns, const char *name, int type, void *space) + { + char type_of[256]; + if (name[0] == '@') { ns = currentGoomSL->vars; } + + if (space == NULL) { + switch (type) { + case INSTR_INT: + case INSTR_FLOAT: + case INSTR_PTR: + space = goom_heap_malloc_with_alignment(currentGoomSL->data_heap, + sizeof(int), sizeof(int)); + break; + case -1: + fprintf(stderr, "What the fuck!\n"); + exit(1); + default: /* On a un struct_id */ + space = goom_heap_malloc_with_alignment_prefixed(currentGoomSL->data_heap, + currentGoomSL->gsl_struct[type]->size, STRUCT_ALIGNMENT, sizeof(int)); + } + } + goom_hash_put_ptr(ns, name, (void*)space); + sprintf(type_of, "__type_of_%s", name); + goom_hash_put_int(ns, type_of, type); + + /* Ensuite le hack: on ajoute les champs en tant que variables. */ + if (type < FIRST_RESERVED) + { + int i; + GSL_Struct *gsl_struct = currentGoomSL->gsl_struct[type]; + ((int*)space)[-1] = type; /* stockage du type dans le prefixe de structure */ + for (i = 0; i < gsl_struct->nbFields; ++i) + { + char full_name[256]; + char *cspace = (char*)space + gsl_struct->fields[i]->offsetInStruct; + sprintf(full_name, "%s.%s", name, gsl_struct->fields[i]->name); + gsl_declare_var(ns, full_name, gsl_struct->fields[i]->type, cspace); + } + } + } + + /* Declare a variable which will be a struct */ + static void gsl_struct_decl(GoomHash *namespace, const char *struct_name, const char *name) + { + int struct_id = gsl_get_struct_id(struct_name); + gsl_declare_var(namespace, name, struct_id, NULL); + } + + static void gsl_float_decl_global(const char *name) + { + gsl_declare_var(currentGoomSL->vars, name, INSTR_FLOAT, NULL); + } + static void gsl_int_decl_global(const char *name) + { + gsl_declare_var(currentGoomSL->vars, name, INSTR_INT, NULL); + } + static void gsl_ptr_decl_global(const char *name) + { + gsl_declare_var(currentGoomSL->vars, name, INSTR_PTR, NULL); + } + static void gsl_struct_decl_global_from_id(const char *name, int id) + { + gsl_declare_var(currentGoomSL->vars, name, id, NULL); + } + + /* FLOAT */ + static void gsl_float_decl_local(const char *name) + { + gsl_declare_var(currentGoomSL->namespaces[currentGoomSL->currentNS], name, INSTR_FLOAT, NULL); + } + /* INT */ + static void gsl_int_decl_local(const char *name) + { + gsl_declare_var(currentGoomSL->namespaces[currentGoomSL->currentNS], name, INSTR_INT, NULL); + } + /* PTR */ + static void gsl_ptr_decl_local(const char *name) + { + gsl_declare_var(currentGoomSL->namespaces[currentGoomSL->currentNS], name, INSTR_PTR, NULL); + } + /* STRUCT */ + static void gsl_struct_decl_local(const char *struct_name, const char *name) + { + gsl_struct_decl(currentGoomSL->namespaces[currentGoomSL->currentNS],struct_name,name); + } + + + static void commit_test2(NodeType *set,const char *type, int instr); + static NodeType *new_call(const char *name, NodeType *affect_list); + + /* SETTER */ + static NodeType *new_set(NodeType *lvalue, NodeType *expression) + { /* {{{ */ + NodeType *set = new_op("set", OPR_SET, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } /* }}} */ + static void commit_set(NodeType *set) + { /* {{{ */ + commit_test2(set,"set",INSTR_SET); + } /* }}} */ + + /* PLUS_EQ */ + static NodeType *new_plus_eq(NodeType *lvalue, NodeType *expression) /* {{{ */ + { + NodeType *set = new_op("plus_eq", OPR_PLUS_EQ, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } + static void commit_plus_eq(NodeType *set) + { + precommit_node(set->unode.opr.op[1]); +#ifdef VERBOSE + printf("add %s %s\n", set->unode.opr.op[0]->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "add", INSTR_ADD, 2, set->line_number); + commit_node(set->unode.opr.op[0],0); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* SUB_EQ */ + static NodeType *new_sub_eq(NodeType *lvalue, NodeType *expression) /* {{{ */ + { + NodeType *set = new_op("sub_eq", OPR_SUB_EQ, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } + static void commit_sub_eq(NodeType *set) + { + precommit_node(set->unode.opr.op[1]); +#ifdef VERBOSE + printf("sub %s %s\n", set->unode.opr.op[0]->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "sub", INSTR_SUB, 2, set->line_number); + commit_node(set->unode.opr.op[0],0); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* MUL_EQ */ + static NodeType *new_mul_eq(NodeType *lvalue, NodeType *expression) /* {{{ */ + { + NodeType *set = new_op("mul_eq", OPR_MUL_EQ, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } + static void commit_mul_eq(NodeType *set) + { + precommit_node(set->unode.opr.op[1]); +#ifdef VERBOSE + printf("mul %s %s\n", set->unode.opr.op[0]->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "mul", INSTR_MUL, 2, set->line_number); + commit_node(set->unode.opr.op[0],0); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* DIV_EQ */ + static NodeType *new_div_eq(NodeType *lvalue, NodeType *expression) /* {{{ */ + { + NodeType *set = new_op("div_eq", OPR_DIV_EQ, 2); + set->unode.opr.op[0] = lvalue; + set->unode.opr.op[1] = expression; + return set; + } + static void commit_div_eq(NodeType *set) + { + precommit_node(set->unode.opr.op[1]); +#ifdef VERBOSE + printf("div %s %s\n", set->unode.opr.op[0]->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "div", INSTR_DIV, 2, set->line_number); + commit_node(set->unode.opr.op[0],0); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* commodity method for add, mult, ... */ + + static void precommit_expr(NodeType *expr, const char *type, int instr_id) + { /* {{{ */ + NodeType *tmp, *tmpcpy; + int toAdd; + + /* compute "left" and "right" */ + switch (expr->unode.opr.nbOp) { + case 2: + precommit_node(expr->unode.opr.op[1]); + case 1: + precommit_node(expr->unode.opr.op[0]); + } + + if (is_tmp_expr(expr->unode.opr.op[0])) { + tmp = expr->unode.opr.op[0]; + toAdd = 1; + } + else if (is_commutative_expr(instr_id) && (expr->unode.opr.nbOp==2) && is_tmp_expr(expr->unode.opr.op[1])) { + tmp = expr->unode.opr.op[1]; + toAdd = 0; + } + else { + char stmp[256]; + /* declare a temporary variable to store the result */ + if (expr->unode.opr.op[0]->type == CONST_INT_NODE) { + sprintf(stmp,"_i_tmp_%i",allocateTemp()); + gsl_int_decl_global(stmp); + } + else if (expr->unode.opr.op[0]->type == CONST_FLOAT_NODE) { + sprintf(stmp,"_f_tmp%i",allocateTemp()); + gsl_float_decl_global(stmp); + } + else if (expr->unode.opr.op[0]->type == CONST_PTR_NODE) { + sprintf(stmp,"_p_tmp%i",allocateTemp()); + gsl_ptr_decl_global(stmp); + } + else { + int type = gsl_type_of_var(expr->unode.opr.op[0]->vnamespace, expr->unode.opr.op[0]->str); + if (type == INSTR_FLOAT) { + sprintf(stmp,"_f_tmp_%i",allocateTemp()); + gsl_float_decl_global(stmp); + } + else if (type == INSTR_PTR) { + sprintf(stmp,"_p_tmp_%i",allocateTemp()); + gsl_ptr_decl_global(stmp); + } + else if (type == INSTR_INT) { + sprintf(stmp,"_i_tmp_%i",allocateTemp()); + gsl_int_decl_global(stmp); + } + else if (type == -1) { + fprintf(stderr, "ERROR: Line %d, Could not find variable '%s'\n", + expr->line_number, expr->unode.opr.op[0]->str); + exit(1); + } + else { /* type is a struct_id */ + sprintf(stmp,"_s_tmp_%i",allocateTemp()); + gsl_struct_decl_global_from_id(stmp,type); + } + } + tmp = new_var(stmp,expr->line_number); + + /* set the tmp to the value of "op1" */ + tmpcpy = nodeClone(tmp); + commit_node(new_set(tmp,expr->unode.opr.op[0]),0); + toAdd = 1; + + tmp = tmpcpy; + } + + /* add op2 to tmp */ +#ifdef VERBOSE + if (expr->unode.opr.nbOp == 2) + printf("%s %s %s\n", type, tmp->str, expr->unode.opr.op[toAdd]->str); + else + printf("%s %s\n", type, tmp->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, type, instr_id, expr->unode.opr.nbOp, expr->line_number); + tmpcpy = nodeClone(tmp); + commit_node(tmp,0); + if (expr->unode.opr.nbOp == 2) { + commit_node(expr->unode.opr.op[toAdd],1); + } + + /* redefine the ADD node now as the computed variable */ + nodeFreeInternals(expr); + *expr = *tmpcpy; + free(tmpcpy); + } /* }}} */ + + static NodeType *new_expr1(const char *name, int id, NodeType *expr1) + { /* {{{ */ + NodeType *add = new_op(name, id, 1); + add->unode.opr.op[0] = expr1; + return add; + } /* }}} */ + + static NodeType *new_expr2(const char *name, int id, NodeType *expr1, NodeType *expr2) + { /* {{{ */ + NodeType *add = new_op(name, id, 2); + add->unode.opr.op[0] = expr1; + add->unode.opr.op[1] = expr2; + return add; + } /* }}} */ + + /* ADD */ + static NodeType *new_add(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("add", OPR_ADD, expr1, expr2); + } + static void precommit_add(NodeType *add) { + precommit_expr(add,"add",INSTR_ADD); + } /* }}} */ + + /* SUB */ + static NodeType *new_sub(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("sub", OPR_SUB, expr1, expr2); + } + static void precommit_sub(NodeType *sub) { + precommit_expr(sub,"sub",INSTR_SUB); + } /* }}} */ + + /* NEG */ + static NodeType *new_neg(NodeType *expr) { /* {{{ */ + NodeType *zeroConst = NULL; + if (expr->type == CONST_INT_NODE) + zeroConst = new_constInt("0", currentGoomSL->num_lines); + else if (expr->type == CONST_FLOAT_NODE) + zeroConst = new_constFloat("0.0", currentGoomSL->num_lines); + else if (expr->type == CONST_PTR_NODE) { + fprintf(stderr, "ERROR: Line %d, Could not negate const pointer.\n", + currentGoomSL->num_lines); + exit(1); + } + else { + int type = gsl_type_of_var(expr->vnamespace, expr->str); + if (type == INSTR_FLOAT) + zeroConst = new_constFloat("0.0", currentGoomSL->num_lines); + else if (type == INSTR_PTR) { + fprintf(stderr, "ERROR: Line %d, Could not negate pointer.\n", + currentGoomSL->num_lines); + exit(1); + } + else if (type == INSTR_INT) + zeroConst = new_constInt("0", currentGoomSL->num_lines); + else if (type == -1) { + fprintf(stderr, "ERROR: Line %d, Could not find variable '%s'\n", + expr->line_number, expr->unode.opr.op[0]->str); + exit(1); + } + else { /* type is a struct_id */ + fprintf(stderr, "ERROR: Line %d, Could not negate struct '%s'\n", + expr->line_number, expr->str); + exit(1); + } + } + return new_expr2("sub", OPR_SUB, zeroConst, expr); + } + /* }}} */ + + /* MUL */ + static NodeType *new_mul(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("mul", OPR_MUL, expr1, expr2); + } + static void precommit_mul(NodeType *mul) { + precommit_expr(mul,"mul",INSTR_MUL); + } /* }}} */ + + /* DIV */ + static NodeType *new_div(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("div", OPR_DIV, expr1, expr2); + } + static void precommit_div(NodeType *mul) { + precommit_expr(mul,"div",INSTR_DIV); + } /* }}} */ + + /* CALL EXPRESSION */ + static NodeType *new_call_expr(const char *name, NodeType *affect_list) { /* {{{ */ + NodeType *call = new_call(name,affect_list); + NodeType *node = new_expr1(name, OPR_CALL_EXPR, call); + node->vnamespace = gsl_find_namespace(name); + if (node->vnamespace == NULL) + fprintf(stderr, "ERROR: Line %d, No return type for: '%s'\n", currentGoomSL->num_lines, name); + return node; + } + static void precommit_call_expr(NodeType *call) { + char stmp[256]; + NodeType *tmp,*tmpcpy; + int type = gsl_type_of_var(call->vnamespace, call->str); + if (type == INSTR_FLOAT) { + sprintf(stmp,"_f_tmp_%i",allocateTemp()); + gsl_float_decl_global(stmp); + } + else if (type == INSTR_PTR) { + sprintf(stmp,"_p_tmp_%i",allocateTemp()); + gsl_ptr_decl_global(stmp); + } + else if (type == INSTR_INT) { + sprintf(stmp,"_i_tmp_%i",allocateTemp()); + gsl_int_decl_global(stmp); + } + else if (type == -1) { + fprintf(stderr, "ERROR: Line %d, Could not find variable '%s'\n", + call->line_number, call->str); + exit(1); + } + else { /* type is a struct_id */ + sprintf(stmp,"_s_tmp_%i",allocateTemp()); + gsl_struct_decl_global_from_id(stmp,type); + } + tmp = new_var(stmp,call->line_number); + commit_node(call->unode.opr.op[0],0); + tmpcpy = nodeClone(tmp); + commit_node(new_set(tmp,new_var(call->str,call->line_number)),0); + + nodeFreeInternals(call); + *call = *tmpcpy; + free(tmpcpy); + } /* }}} */ + + static void commit_test2(NodeType *set,const char *type, int instr) + { /* {{{ */ + NodeType *tmp; + char stmp[256]; + precommit_node(set->unode.opr.op[0]); + precommit_node(set->unode.opr.op[1]); + tmp = set->unode.opr.op[0]; + + stmp[0] = 0; + if (set->unode.opr.op[0]->type == CONST_INT_NODE) { + sprintf(stmp,"_i_tmp_%i",allocateTemp()); + gsl_int_decl_global(stmp); + } + else if (set->unode.opr.op[0]->type == CONST_FLOAT_NODE) { + sprintf(stmp,"_f_tmp%i",allocateTemp()); + gsl_float_decl_global(stmp); + } + else if (set->unode.opr.op[0]->type == CONST_PTR_NODE) { + sprintf(stmp,"_p_tmp%i",allocateTemp()); + gsl_ptr_decl_global(stmp); + } + if (stmp[0]) { + NodeType *tmpcpy; + tmp = new_var(stmp, set->line_number); + tmpcpy = nodeClone(tmp); + commit_node(new_set(tmp,set->unode.opr.op[0]),0); + tmp = tmpcpy; + } + +#ifdef VERBOSE + printf("%s %s %s\n", type, tmp->str, set->unode.opr.op[1]->str); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, type, instr, 2, set->line_number); + commit_node(tmp,instr!=INSTR_SET); + commit_node(set->unode.opr.op[1],1); + } /* }}} */ + + /* NOT */ + static NodeType *new_not(NodeType *expr1) { /* {{{ */ + return new_expr1("not", OPR_NOT, expr1); + } + static void commit_not(NodeType *set) + { + commit_node(set->unode.opr.op[0],0); +#ifdef VERBOSE + printf("not\n"); +#endif + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "not", INSTR_NOT, 1, set->line_number); + gsl_instr_add_param(currentGoomSL->instr, "|dummy|", TYPE_LABEL); + } /* }}} */ + + /* EQU */ + static NodeType *new_equ(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("isequal", OPR_EQU, expr1, expr2); + } + static void commit_equ(NodeType *mul) { + commit_test2(mul,"isequal",INSTR_ISEQUAL); + } /* }}} */ + + /* INF */ + static NodeType *new_low(NodeType *expr1, NodeType *expr2) { /* {{{ */ + return new_expr2("islower", OPR_LOW, expr1, expr2); + } + static void commit_low(NodeType *mul) { + commit_test2(mul,"islower",INSTR_ISLOWER); + } /* }}} */ + + /* WHILE */ + static NodeType *new_while(NodeType *expression, NodeType *instr) { /* {{{ */ + NodeType *node = new_op("while", OPR_WHILE, 2); + node->unode.opr.op[0] = expression; + node->unode.opr.op[1] = instr; + return node; + } + + static void commit_while(NodeType *node) + { + int lbl = allocateLabel(); + char start_while[1024], test_while[1024]; + sprintf(start_while, "|start_while_%d|", lbl); + sprintf(test_while, "|test_while_%d|", lbl); + + GSL_PUT_JUMP(test_while,node->line_number); + GSL_PUT_LABEL(start_while,node->line_number); + + /* code */ + commit_node(node->unode.opr.op[1],0); + + GSL_PUT_LABEL(test_while,node->line_number); + commit_node(node->unode.opr.op[0],0); + GSL_PUT_JNZERO(start_while,node->line_number); + } /* }}} */ + + /* FOR EACH */ + static NodeType *new_static_foreach(NodeType *var, NodeType *var_list, NodeType *instr) { /* {{{ */ + NodeType *node = new_op("for", OPR_FOREACH, 3); + node->unode.opr.op[0] = var; + node->unode.opr.op[1] = var_list; + node->unode.opr.op[2] = instr; + node->line_number = currentGoomSL->num_lines; + return node; + } + static void commit_foreach(NodeType *node) + { + NodeType *cur = node->unode.opr.op[1]; + char tmp_func[256], tmp_loop[256]; + int lbl = allocateLabel(); + sprintf(tmp_func, "|foreach_func_%d|", lbl); + sprintf(tmp_loop, "|foreach_loop_%d|", lbl); + + GSL_PUT_JUMP(tmp_loop, node->line_number); + GSL_PUT_LABEL(tmp_func, node->line_number); + + precommit_node(node->unode.opr.op[2]); + commit_node(node->unode.opr.op[2], 0); + + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "ret", INSTR_RET, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, "|dummy|", TYPE_LABEL); +#ifdef VERBOSE + printf("ret\n"); +#endif + + GSL_PUT_LABEL(tmp_loop, node->line_number); + + while (cur != NULL) + { + NodeType *x, *var; + + /* 1: x=var */ + x = nodeClone(node->unode.opr.op[0]); + var = nodeClone(cur->unode.opr.op[0]); + commit_node(new_set(x, var),0); + + /* 2: instr */ + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "call", INSTR_CALL, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, tmp_func, TYPE_LABEL); +#ifdef VERBOSE + printf("call %s\n", tmp_func); +#endif + + /* 3: var=x */ + x = nodeClone(node->unode.opr.op[0]); + var = cur->unode.opr.op[0]; + commit_node(new_set(var, x),0); + cur = cur->unode.opr.op[1]; + } + nodeFree(node->unode.opr.op[0]); + } /* }}} */ + + /* IF */ + static NodeType *new_if(NodeType *expression, NodeType *instr) { /* {{{ */ + NodeType *node = new_op("if", OPR_IF, 2); + node->unode.opr.op[0] = expression; + node->unode.opr.op[1] = instr; + return node; + } + static void commit_if(NodeType *node) { + + char slab[1024]; + sprintf(slab, "|eif%d|", allocateLabel()); + commit_node(node->unode.opr.op[0],0); + GSL_PUT_JZERO(slab,node->line_number); + /* code */ + commit_node(node->unode.opr.op[1],0); + GSL_PUT_LABEL(slab,node->line_number); + } /* }}} */ + + /* BLOCK */ + static NodeType *new_block(NodeType *lastNode) { /* {{{ */ + NodeType *blk = new_op("block", OPR_BLOCK, 2); + blk->unode.opr.op[0] = new_nop("start_of_block"); + blk->unode.opr.op[1] = lastNode; + return blk; + } + static void commit_block(NodeType *node) { + commit_node(node->unode.opr.op[0]->unode.opr.next,0); + } /* }}} */ + + /* FUNCTION INTRO */ + static NodeType *new_function_intro(const char *name) { /* {{{ */ + char stmp[256]; + if (strlen(name) < 200) { + sprintf(stmp, "|__func_%s|", name); + } + return new_op(stmp, OPR_FUNC_INTRO, 0); + } + static void commit_function_intro(NodeType *node) { + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "label", INSTR_LABEL, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_LABEL); +#ifdef VERBOSE + printf("label %s\n", node->str); +#endif + } /* }}} */ + + /* FUNCTION OUTRO */ + static NodeType *new_function_outro() { /* {{{ */ + return new_op("ret", OPR_FUNC_OUTRO, 0); + } + static void commit_function_outro(NodeType *node) { + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "ret", INSTR_RET, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, "|dummy|", TYPE_LABEL); + releaseAllTemps(); +#ifdef VERBOSE + printf("ret\n"); +#endif + } /* }}} */ + + /* AFFECTATION LIST */ + static NodeType *new_affec_list(NodeType *set, NodeType *next) /* {{{ */ + { + NodeType *node = new_op("affect_list", OPR_AFFECT_LIST, 2); + node->unode.opr.op[0] = set; + node->unode.opr.op[1] = next; + return node; + } + static NodeType *new_affect_list_after(NodeType *affect_list) + { + NodeType *ret = NULL; + NodeType *cur = affect_list; + while(cur != NULL) { + NodeType *set = cur->unode.opr.op[0]; + NodeType *next = cur->unode.opr.op[1]; + NodeType *lvalue = set->unode.opr.op[0]; + NodeType *expression = set->unode.opr.op[1]; + if ((lvalue->str[0] == '&') && (expression->type == VAR_NODE)) { + NodeType *nset = new_set(nodeClone(expression), nodeClone(lvalue)); + ret = new_affec_list(nset, ret); + } + cur = next; + } + return ret; + } + static void commit_affect_list(NodeType *node) + { + NodeType *cur = node; + while(cur != NULL) { + NodeType *set = cur->unode.opr.op[0]; + precommit_node(set->unode.opr.op[0]); + precommit_node(set->unode.opr.op[1]); + cur = cur->unode.opr.op[1]; + } + cur = node; + while(cur != NULL) { + NodeType *set = cur->unode.opr.op[0]; + commit_node(set,0); + cur = cur->unode.opr.op[1]; + } + } /* }}} */ + + /* VAR LIST */ + static NodeType *new_var_list(NodeType *var, NodeType *next) /* {{{ */ + { + NodeType *node = new_op("var_list", OPR_VAR_LIST, 2); + node->unode.opr.op[0] = var; + node->unode.opr.op[1] = next; + return node; + } + static void commit_var_list(NodeType *node) + { + } /* }}} */ + + /* FUNCTION CALL */ + static NodeType *new_call(const char *name, NodeType *affect_list) { /* {{{ */ + HashValue *fval; + fval = goom_hash_get(currentGoomSL->functions, name); + if (!fval) { + gsl_declare_task(name); + fval = goom_hash_get(currentGoomSL->functions, name); + } + if (!fval) { + fprintf(stderr, "ERROR: Line %d, Could not find function %s\n", currentGoomSL->num_lines, name); + exit(1); + return NULL; + } + else { + ExternalFunctionStruct *gef = (ExternalFunctionStruct*)fval->ptr; + if (gef->is_extern) { + NodeType *node = new_op(name, OPR_EXT_CALL, 1); + node->unode.opr.op[0] = affect_list; + return node; + } + else { + NodeType *node; + char stmp[256]; + if (strlen(name) < 200) { + sprintf(stmp, "|__func_%s|", name); + } + node = new_op(stmp, OPR_CALL, 1); + node->unode.opr.op[0] = affect_list; + return node; + } + } + } + static void commit_ext_call(NodeType *node) { + NodeType *alafter = new_affect_list_after(node->unode.opr.op[0]); + commit_node(node->unode.opr.op[0],0); + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "extcall", INSTR_EXT_CALL, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_VAR); +#ifdef VERBOSE + printf("extcall %s\n", node->str); +#endif + commit_node(alafter,0); + } + static void commit_call(NodeType *node) { + NodeType *alafter = new_affect_list_after(node->unode.opr.op[0]); + commit_node(node->unode.opr.op[0],0); + currentGoomSL->instr = gsl_instr_init(currentGoomSL, "call", INSTR_CALL, 1, node->line_number); + gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_LABEL); +#ifdef VERBOSE + printf("call %s\n", node->str); +#endif + commit_node(alafter,0); + } /* }}} */ + + /** **/ + + static NodeType *rootNode = 0; /* TODO: reinitialiser a chaque compilation. */ + static NodeType *lastNode = 0; + static NodeType *gsl_append(NodeType *curNode) { + if (curNode == 0) return 0; /* {{{ */ + if (lastNode) + lastNode->unode.opr.next = curNode; + lastNode = curNode; + while(lastNode->unode.opr.next) lastNode = lastNode->unode.opr.next; + if (rootNode == 0) + rootNode = curNode; + return curNode; + } /* }}} */ + +#if 1 + int allocateTemp() { + return allocateLabel(); + } + void releaseAllTemps() {} + void releaseTemp(int n) {} +#else + static int nbTemp = 0; + static int *tempArray = 0; + static int tempArraySize = 0; + int allocateTemp() { /* TODO: allocateITemp, allocateFTemp */ + int i = 0; /* {{{ */ + if (tempArray == 0) { + tempArraySize = 256; + tempArray = (int*)malloc(tempArraySize * sizeof(int)); + } + while (1) { + int j; + for (j=0;jtype == OPR_NODE) + switch(node->unode.opr.type) { + case OPR_ADD: precommit_add(node); break; + case OPR_SUB: precommit_sub(node); break; + case OPR_MUL: precommit_mul(node); break; + case OPR_DIV: precommit_div(node); break; + case OPR_CALL_EXPR: precommit_call_expr(node); break; + } + } /* }}} */ + + void commit_node(NodeType *node, int releaseIfTmp) + { /* {{{ */ + if (node == 0) return; + + switch(node->type) { + case OPR_NODE: + switch(node->unode.opr.type) { + case OPR_SET: commit_set(node); break; + case OPR_PLUS_EQ: commit_plus_eq(node); break; + case OPR_SUB_EQ: commit_sub_eq(node); break; + case OPR_MUL_EQ: commit_mul_eq(node); break; + case OPR_DIV_EQ: commit_div_eq(node); break; + case OPR_IF: commit_if(node); break; + case OPR_WHILE: commit_while(node); break; + case OPR_BLOCK: commit_block(node); break; + case OPR_FUNC_INTRO: commit_function_intro(node); break; + case OPR_FUNC_OUTRO: commit_function_outro(node); break; + case OPR_CALL: commit_call(node); break; + case OPR_EXT_CALL: commit_ext_call(node); break; + case OPR_EQU: commit_equ(node); break; + case OPR_LOW: commit_low(node); break; + case OPR_NOT: commit_not(node); break; + case OPR_AFFECT_LIST: commit_affect_list(node); break; + case OPR_FOREACH: commit_foreach(node); break; + case OPR_VAR_LIST: commit_var_list(node); break; +#ifdef VERBOSE + case EMPTY_NODE: printf("NOP\n"); break; +#endif + } + + commit_node(node->unode.opr.next,0); /* recursive for the moment, maybe better to do something iterative? */ + break; + + case VAR_NODE: gsl_instr_set_namespace(currentGoomSL->instr, node->vnamespace); + gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_VAR); break; + case CONST_INT_NODE: gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_INTEGER); break; + case CONST_FLOAT_NODE: gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_FLOAT); break; + case CONST_PTR_NODE: gsl_instr_add_param(currentGoomSL->instr, node->str, TYPE_PTR); break; + } + if (releaseIfTmp && is_tmp_expr(node)) + releaseTemp(get_tmp_id(node)); + + nodeFree(node); + } /* }}} */ + + NodeType *nodeNew(const char *str, int type, int line_number) { + NodeType *node = (NodeType*)malloc(sizeof(NodeType)); /* {{{ */ + node->type = type; + node->str = (char*)malloc(strlen(str)+1); + node->vnamespace = NULL; + node->line_number = line_number; + strcpy(node->str, str); + return node; + } /* }}} */ + static NodeType *nodeClone(NodeType *node) { + NodeType *ret = nodeNew(node->str, node->type, node->line_number); /* {{{ */ + ret->vnamespace = node->vnamespace; + ret->unode = node->unode; + return ret; + } /* }}} */ + + void nodeFreeInternals(NodeType *node) { + free(node->str); /* {{{ */ + } /* }}} */ + + void nodeFree(NodeType *node) { + nodeFreeInternals(node); /* {{{ */ + free(node); + } /* }}} */ + + NodeType *new_constInt(const char *str, int line_number) { + NodeType *node = nodeNew(str, CONST_INT_NODE, line_number); /* {{{ */ + node->unode.constInt.val = atoi(str); + return node; + } /* }}} */ + + NodeType *new_constPtr(const char *str, int line_number) { + NodeType *node = nodeNew(str, CONST_PTR_NODE, line_number); /* {{{ */ + node->unode.constPtr.id = strtol(str,NULL,0); + return node; + } /* }}} */ + + NodeType *new_constFloat(const char *str, int line_number) { + NodeType *node = nodeNew(str, CONST_FLOAT_NODE, line_number); /* {{{ */ + node->unode.constFloat.val = atof(str); + return node; + } /* }}} */ + + NodeType *new_var(const char *str, int line_number) { + NodeType *node = nodeNew(str, VAR_NODE, line_number); /* {{{ */ + node->vnamespace = gsl_find_namespace(str); + if (node->vnamespace == 0) { + fprintf(stderr, "ERROR: Line %d, Variable not found: '%s'\n", line_number, str); + exit(1); + } + return node; + } /* }}} */ + + NodeType *new_nop(const char *str) { + NodeType *node = new_op(str, EMPTY_NODE, 0); /* {{{ */ + return node; + } /* }}} */ + + NodeType *new_op(const char *str, int type, int nbOp) { + int i; /* {{{ */ + NodeType *node = nodeNew(str, OPR_NODE, currentGoomSL->num_lines); + node->unode.opr.next = 0; + node->unode.opr.type = type; + node->unode.opr.nbOp = nbOp; + for (i=0;iunode.opr.op[i] = 0; + return node; + } /* }}} */ + + + void gsl_declare_global_variable(int type, char *name) { + switch(type){ + case -1: break; + case FLOAT_TK:gsl_float_decl_global(name);break; + case INT_TK: gsl_int_decl_global(name);break; + case PTR_TK: gsl_ptr_decl_global(name);break; + default: + { + int id = type - 1000; + gsl_struct_decl_global_from_id(name,id); + } + } + } + +%} + +%union { + int intValue; + float floatValue; + char charValue; + char strValue[2048]; + NodeType *nPtr; + GoomHash *namespace; + GSL_Struct *gsl_struct; + GSL_StructField *gsl_struct_field; + }; + +%token LTYPE_INTEGER +%token LTYPE_FLOAT +%token LTYPE_VAR +%token LTYPE_PTR + +%token PTR_TK INT_TK FLOAT_TK DECLARE EXTERNAL WHILE DO NOT PLUS_EQ SUB_EQ DIV_EQ MUL_EQ SUP_EQ LOW_EQ NOT_EQ STRUCT FOR IN + +%type return_type +%type expression constValue instruction test func_call func_call_expression +%type start_block affectation_list affectation_in_list affectation declaration +%type var_list_content var_list +%type task_name ext_task_name +%type leave_namespace +%type struct_members +%type struct_member +%left '\n' +%left PLUS_EQ SUB_EQ MUL_EQ DIV_EQ +%left NOT +%left '=' '<' '>' +%left '+' '-' +%left '/' '*' + +%% + +/* -------------- Global architechture of a GSL program ------------*/ + +gsl: gsl_code function_outro gsl_def_functions ; + +gsl_code: gsl_code instruction { gsl_append($2); } + | gsl_code EXTERNAL '<' ext_task_name '>' return_type '\n' leave_namespace { gsl_declare_global_variable($6,$4); } + | gsl_code EXTERNAL '<' ext_task_name ':' arglist '>' return_type '\n' leave_namespace { gsl_declare_global_variable($8,$4); } + | gsl_code DECLARE '<' task_name '>' return_type '\n' leave_namespace { gsl_declare_global_variable($6,$4); } + | gsl_code DECLARE '<' task_name ':' arglist '>' return_type '\n' leave_namespace { gsl_declare_global_variable($8,$4); } + | gsl_code struct_declaration + | gsl_code '\n' + | + ; + +/* ------------- Declaration of a structure ------------ */ + +struct_declaration: STRUCT '<' LTYPE_VAR ':' struct_members '>' '\n' { gsl_add_struct($3, $5); } + ; + +struct_members: opt_nl struct_member { $$ = gsl_new_struct($2); } + | struct_members ',' opt_nl struct_member { $$ = $1; gsl_add_struct_field($1, $4); } + ; + +struct_member: INT_TK LTYPE_VAR { $$ = gsl_new_struct_field($2, INSTR_INT); } + | FLOAT_TK LTYPE_VAR { $$ = gsl_new_struct_field($2, INSTR_FLOAT); } + | PTR_TK LTYPE_VAR { $$ = gsl_new_struct_field($2, INSTR_PTR); } + | LTYPE_VAR LTYPE_VAR { $$ = gsl_new_struct_field_struct($2, $1); } + ; + +/* ------------- Fonction declarations -------------- */ + +ext_task_name: LTYPE_VAR { gsl_declare_external_task($1); gsl_enternamespace($1); strcpy($$,$1); } + ; +task_name: LTYPE_VAR { gsl_declare_task($1); gsl_enternamespace($1); strcpy($$,$1); strcpy($$,$1); } + ; + +return_type: { $$=-1; } + | ':' INT_TK { $$=INT_TK; } + | ':' FLOAT_TK { $$=FLOAT_TK; } + | ':' PTR_TK { $$=PTR_TK; } + | ':' LTYPE_VAR { $$= 1000 + gsl_get_struct_id($2); } + ; + +arglist: empty_declaration + | empty_declaration ',' arglist + ; + +/* ------------- Fonction definition -------------- */ + +gsl_def_functions: gsl_def_functions function + | + ; + +function: function_intro gsl_code function_outro { gsl_leavenamespace(); } + +function_intro: '<' task_name '>' return_type '\n' { gsl_append(new_function_intro($2)); + gsl_declare_global_variable($4,$2); } + | '<' task_name ':' arglist '>' return_type '\n' { gsl_append(new_function_intro($2)); + gsl_declare_global_variable($6,$2); } + ; +function_outro: { gsl_append(new_function_outro()); } ; + +leave_namespace: { $$ = gsl_leavenamespace(); }; + +/* ------------ Variable declaration ---------------- */ + +declaration: FLOAT_TK LTYPE_VAR '=' expression { gsl_float_decl_local($2); $$ = new_set(new_var($2,currentGoomSL->num_lines), $4); } + | INT_TK LTYPE_VAR '=' expression { gsl_int_decl_local($2); $$ = new_set(new_var($2,currentGoomSL->num_lines), $4); } + | PTR_TK LTYPE_VAR '=' expression { gsl_ptr_decl_local($2); $$ = new_set(new_var($2,currentGoomSL->num_lines), $4); } + | LTYPE_VAR LTYPE_VAR '=' expression { gsl_struct_decl_local($1,$2); $$ = new_set(new_var($2,currentGoomSL->num_lines), $4); } + | empty_declaration { $$ = 0; } + ; + +empty_declaration: FLOAT_TK LTYPE_VAR { gsl_float_decl_local($2); } + | INT_TK LTYPE_VAR { gsl_int_decl_local($2); } + | PTR_TK LTYPE_VAR { gsl_ptr_decl_local($2); } + | LTYPE_VAR LTYPE_VAR { gsl_struct_decl_local($1,$2); } + ; + +/* -------------- Instructions and Expressions ------------------ */ + +instruction: affectation '\n' { $$ = $1; } + | declaration '\n' { $$ = $1; } + | '(' test ')' '?' opt_nl instruction { $$ = new_if($2,$6); } + | WHILE test opt_nl DO opt_nl instruction { $$ = new_while($2,$6); } + | '{' '\n' start_block gsl_code '}' '\n' { lastNode = $3->unode.opr.op[1]; $$=$3; } + | func_call { $$ = $1; } + | LTYPE_VAR PLUS_EQ expression { $$ = new_plus_eq(new_var($1,currentGoomSL->num_lines),$3); } + | LTYPE_VAR SUB_EQ expression { $$ = new_sub_eq(new_var($1,currentGoomSL->num_lines),$3); } + | LTYPE_VAR MUL_EQ expression { $$ = new_mul_eq(new_var($1,currentGoomSL->num_lines),$3); } + | LTYPE_VAR DIV_EQ expression { $$ = new_div_eq(new_var($1,currentGoomSL->num_lines),$3); } + | FOR LTYPE_VAR IN var_list DO instruction { $$ = new_static_foreach(new_var($2, currentGoomSL->num_lines), $4, $6); } + ; + +var_list: '(' var_list_content ')' { $$ = $2; } + ; +var_list_content: LTYPE_VAR { $$ = new_var_list(new_var($1,currentGoomSL->num_lines), NULL); } + | LTYPE_VAR var_list_content { $$ = new_var_list(new_var($1,currentGoomSL->num_lines), $2); } + ; + +affectation: LTYPE_VAR '=' expression { $$ = new_set(new_var($1,currentGoomSL->num_lines),$3); } ; + +start_block: { $$ = new_block(lastNode); lastNode = $$->unode.opr.op[0]; } + ; + +expression: LTYPE_VAR { $$ = new_var($1,currentGoomSL->num_lines); } + | constValue { $$ = $1; } + | expression '*' expression { $$ = new_mul($1,$3); } + | expression '/' expression { $$ = new_div($1,$3); } + | expression '+' expression { $$ = new_add($1,$3); } + | expression '-' expression { $$ = new_sub($1,$3); } + | '-' expression { $$ = new_neg($2); } + | '(' expression ')' { $$ = $2; } + | func_call_expression { $$ = $1; } + ; + +test: expression '=' expression { $$ = new_equ($1,$3); } + | expression '<' expression { $$ = new_low($1,$3); } + | expression '>' expression { $$ = new_low($3,$1); } + | expression SUP_EQ expression { $$ = new_not(new_low($1,$3)); } + | expression LOW_EQ expression { $$ = new_not(new_low($3,$1)); } + | expression NOT_EQ expression { $$ = new_not(new_equ($1,$3)); } + | NOT test { $$ = new_not($2); } + ; + +constValue: LTYPE_FLOAT { $$ = new_constFloat($1,currentGoomSL->num_lines); } + | LTYPE_INTEGER { $$ = new_constInt($1,currentGoomSL->num_lines); } + | LTYPE_PTR { $$ = new_constPtr($1,currentGoomSL->num_lines); } + ; + +/* ---------------- Function Calls ------------------ */ + +func_call: task_name '\n' leave_namespace { $$ = new_call($1,NULL); } + | task_name ':' affectation_list '\n' leave_namespace { $$ = new_call($1,$3); } + | '[' task_name ']' '\n' leave_namespace { $$ = new_call($2,NULL); } + | '[' task_name ':' affectation_list ']' '\n' leave_namespace { $$ = new_call($2,$4); } + ; + +func_call_expression: + '[' task_name leave_namespace ']' { $$ = new_call_expr($2,NULL); } + | '[' task_name ':' affectation_list ']' leave_namespace { $$ = new_call_expr($2,$4); } + ; + +affectation_list: affectation_in_list affectation_list { $$ = new_affec_list($1,$2); } + | affectation_in_list { $$ = new_affec_list($1,NULL); } + +affectation_in_list: LTYPE_VAR '=' leave_namespace expression { + gsl_reenternamespace($3); + $$ = new_set(new_var($1,currentGoomSL->num_lines),$4); + } + | ':' leave_namespace expression { + gsl_reenternamespace($2); + $$ = new_set(new_var("&this", currentGoomSL->num_lines),$3); + } + ; + + +/* ------------ Misc ---------- */ + +opt_nl: '\n' | ; + + +%% + + +void yyerror(char *str) +{ /* {{{ */ + fprintf(stderr, "ERROR: Line %d, %s\n", currentGoomSL->num_lines, str); + currentGoomSL->compilationOK = 0; + exit(1); +} /* }}} */ + diff --git a/veejay-server/libgoom/graphic.c b/veejay-server/libgoom/graphic.c new file mode 100644 index 00000000..2ee71a6d --- /dev/null +++ b/veejay-server/libgoom/graphic.c @@ -0,0 +1,10 @@ +#include "goom_graphic.h" + +const Color BLACK = { 0, 0, 0 }; +const Color WHITE = { 0xff, 0xff, 0xff }; +const Color RED = { 0xff, 0x05, 0x05 }; +const Color GREEN = { 0x05, 0xff, 0x05 }; +const Color BLUE = { 0x05, 0x05, 0xff }; +const Color YELLOW = { 0xff, 0xff, 0x33 }; +const Color ORANGE = { 0xff, 0xcc, 0x05 }; +const Color VIOLET = { 0x55, 0x05, 0xff }; diff --git a/veejay-server/libgoom/ifs.c b/veejay-server/libgoom/ifs.c new file mode 100644 index 00000000..968535e3 --- /dev/null +++ b/veejay-server/libgoom/ifs.c @@ -0,0 +1,763 @@ +/* + * ifs.c --- modified iterated functions system for goom. + */ + +/*- + * Copyright (c) 1997 by Massimino Pascal + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * If this mode is weird and you have an old MetroX server, it is buggy. + * There is a free SuSE-enhanced MetroX X server that is fine. + * + * When shown ifs, Diana Rose (4 years old) said, "It looks like dancing." + * + * Revision History: + * 13-Dec-2003: Added some goom specific stuffs (to make ifs a VisualFX). + * 11-Apr-2002: jeko@ios-software.com: Make ifs.c system-indendant. (ifs.h added) + * 01-Nov-2000: Allocation checks + * 10-May-1997: jwz@jwz.org: turned into a standalone program. + * Made it render into an offscreen bitmap and then copy + * that onto the screen, to reduce flicker. + */ + +/* #ifdef STANDALONE */ + +#include +#include +#include + +#include "goom_config.h" + +#ifdef HAVE_MMX +#include "mmx.h" +#endif + +#include "goom_graphic.h" +#include "ifs.h" +#include "goom_tools.h" + +typedef struct _ifsPoint +{ + gint32 x, y; +} +IFSPoint; + + +#define MODE_ifs + +#define PROGCLASS "IFS" + +#define HACK_INIT init_ifs +#define HACK_DRAW draw_ifs + +#define ifs_opts xlockmore_opts + +#define DEFAULTS "*delay: 20000 \n" \ +"*ncolors: 100 \n" + +#define SMOOTH_COLORS + +#define LRAND() ((long) (goom_random(goomInfo->gRandom) & 0x7fffffff)) +#define NRAND(n) ((int) (LRAND() % (n))) + +#if RAND_MAX < 0x10000 +#define MAXRAND (((float)(RAND_MAX<16)+((float)RAND_MAX)+1.0f)/127.0f) +#else +#define MAXRAND (2147483648.0/127.0) /* unsigned 1<<31 / 127.0 (cf goom_tools) as a float */ +#endif + +/*****************************************************/ + +typedef float DBL; +typedef int F_PT; + +/* typedef float F_PT; */ + +/*****************************************************/ + +#define FIX 12 +#define UNIT ( 1<c_x = Gauss_Rand (goomInfo, 0.0, .8, 4.0); + Cur->c_y = Gauss_Rand (goomInfo, 0.0, .8, 4.0); + Cur->r = Gauss_Rand (goomInfo, F->r_mean, F->dr_mean, 3.0); + Cur->r2 = Half_Gauss_Rand (goomInfo, 0.0, F->dr2_mean, 2.0); + Cur->A = Gauss_Rand (goomInfo, 0.0, 360.0, 4.0) * (M_PI / 180.0); + Cur->A2 = Gauss_Rand (goomInfo, 0.0, 360.0, 4.0) * (M_PI / 180.0); + Cur++; + } +} + +static void +free_ifs_buffers (FRACTAL * Fractal) +{ + if (Fractal->Buffer1 != NULL) { + (void) free ((void *) Fractal->Buffer1); + Fractal->Buffer1 = (IFSPoint *) NULL; + } + if (Fractal->Buffer2 != NULL) { + (void) free ((void *) Fractal->Buffer2); + Fractal->Buffer2 = (IFSPoint *) NULL; + } +} + + +static void +free_ifs (FRACTAL * Fractal) +{ + free_ifs_buffers (Fractal); +} + +/***************************************************************/ + +static void +init_ifs (PluginInfo *goomInfo, IfsData *data) +{ + int i; + FRACTAL *Fractal; + int width = goomInfo->screen.width; + int height = goomInfo->screen.height; + + if (data->Root == NULL) { + data->Root = (FRACTAL *) malloc (sizeof (FRACTAL)); + if (data->Root == NULL) + return; + data->Root->Buffer1 = (IFSPoint *) NULL; + data->Root->Buffer2 = (IFSPoint *) NULL; + } + Fractal = data->Root; + + free_ifs_buffers (Fractal); + + i = (NRAND (4)) + 2; /* Number of centers */ + switch (i) { + case 3: + Fractal->Depth = MAX_DEPTH_3; + Fractal->r_mean = .6; + Fractal->dr_mean = .4; + Fractal->dr2_mean = .3; + break; + + case 4: + Fractal->Depth = MAX_DEPTH_4; + Fractal->r_mean = .5; + Fractal->dr_mean = .4; + Fractal->dr2_mean = .3; + break; + + case 5: + Fractal->Depth = MAX_DEPTH_5; + Fractal->r_mean = .5; + Fractal->dr_mean = .4; + Fractal->dr2_mean = .3; + break; + + default: + case 2: + Fractal->Depth = MAX_DEPTH_2; + Fractal->r_mean = .7; + Fractal->dr_mean = .3; + Fractal->dr2_mean = .4; + break; + } + Fractal->Nb_Simi = i; + Fractal->Max_Pt = Fractal->Nb_Simi - 1; + for (i = 0; i <= Fractal->Depth + 2; ++i) + Fractal->Max_Pt *= Fractal->Nb_Simi; + + if ((Fractal->Buffer1 = (IFSPoint *) calloc (Fractal->Max_Pt, + sizeof (IFSPoint))) == NULL) { + free_ifs (Fractal); + return; + } + if ((Fractal->Buffer2 = (IFSPoint *) calloc (Fractal->Max_Pt, + sizeof (IFSPoint))) == NULL) { + free_ifs (Fractal); + return; + } + + Fractal->Speed = 6; + Fractal->Width = width; /* modif by JeKo */ + Fractal->Height = height; /* modif by JeKo */ + Fractal->Cur_Pt = 0; + Fractal->Count = 0; + Fractal->Lx = (Fractal->Width - 1) / 2; + Fractal->Ly = (Fractal->Height - 1) / 2; + Fractal->Col = rand () % (width * height); /* modif by JeKo */ + + Random_Simis (goomInfo, Fractal, Fractal->Components, 5 * MAX_SIMI); +} + + +/***************************************************************/ + +static inline void +Transform (SIMI * Simi, F_PT xo, F_PT yo, F_PT * x, F_PT * y) +{ + F_PT xx, yy; + + xo = xo - Simi->Cx; + xo = (xo * Simi->R) >> FIX; /* / UNIT; */ + yo = yo - Simi->Cy; + yo = (yo * Simi->R) >> FIX; /* / UNIT; */ + + xx = xo - Simi->Cx; + xx = (xx * Simi->R2) >> FIX; /* / UNIT; */ + yy = -yo - Simi->Cy; + yy = (yy * Simi->R2) >> FIX; /* / UNIT; */ + + *x = + ((xo * Simi->Ct - yo * Simi->St + xx * Simi->Ct2 - yy * Simi->St2) + >> FIX /* / UNIT */ ) + Simi->Cx; + *y = + ((xo * Simi->St + yo * Simi->Ct + xx * Simi->St2 + yy * Simi->Ct2) + >> FIX /* / UNIT */ ) + Simi->Cy; +} + +/***************************************************************/ + +static void +Trace (FRACTAL * F, F_PT xo, F_PT yo, IfsData *data) +{ + F_PT x, y, i; + SIMI *Cur; + + Cur = data->Cur_F->Components; + for (i = data->Cur_F->Nb_Simi; i; --i, Cur++) { + Transform (Cur, xo, yo, &x, &y); + + data->Buf->x = F->Lx + ((x * F->Lx) >> (FIX+1) /* /(UNIT*2) */ ); + data->Buf->y = F->Ly - ((y * F->Ly) >> (FIX+1) /* /(UNIT*2) */ ); + data->Buf++; + + data->Cur_Pt++; + + if (F->Depth && ((x - xo) >> 4) && ((y - yo) >> 4)) { + F->Depth--; + Trace (F, x, y, data); + F->Depth++; + } + } +} + +static void +Draw_Fractal (IfsData *data) +{ + FRACTAL *F = data->Root; + int i, j; + F_PT x, y, xo, yo; + SIMI *Cur, *Simi; + + for (Cur = F->Components, i = F->Nb_Simi; i; --i, Cur++) { + Cur->Cx = DBL_To_F_PT (Cur->c_x); + Cur->Cy = DBL_To_F_PT (Cur->c_y); + + Cur->Ct = DBL_To_F_PT (cos (Cur->A)); + Cur->St = DBL_To_F_PT (sin (Cur->A)); + Cur->Ct2 = DBL_To_F_PT (cos (Cur->A2)); + Cur->St2 = DBL_To_F_PT (sin (Cur->A2)); + + Cur->R = DBL_To_F_PT (Cur->r); + Cur->R2 = DBL_To_F_PT (Cur->r2); + } + + + data->Cur_Pt = 0; + data->Cur_F = F; + data->Buf = F->Buffer2; + for (Cur = F->Components, i = F->Nb_Simi; i; --i, Cur++) { + xo = Cur->Cx; + yo = Cur->Cy; + for (Simi = F->Components, j = F->Nb_Simi; j; --j, Simi++) { + if (Simi == Cur) + continue; + Transform (Simi, xo, yo, &x, &y); + Trace (F, x, y, data); + } + } + + /* Erase previous */ + + F->Cur_Pt = data->Cur_Pt; + data->Buf = F->Buffer1; + F->Buffer1 = F->Buffer2; + F->Buffer2 = data->Buf; +} + + +static IFSPoint * +draw_ifs (PluginInfo *goomInfo, int *nbpt, IfsData *data) +{ + int i; + DBL u, uu, v, vv, u0, u1, u2, u3; + SIMI *S, *S1, *S2, *S3, *S4; + FRACTAL *F; + + if (data->Root == NULL) + return NULL; + F = data->Root; + if (F->Buffer1 == NULL) + return NULL; + + u = (DBL) (F->Count) * (DBL) (F->Speed) / 1000.0; + uu = u * u; + v = 1.0 - u; + vv = v * v; + u0 = vv * v; + u1 = 3.0 * vv * u; + u2 = 3.0 * v * uu; + u3 = u * uu; + + S = F->Components; + S1 = S + F->Nb_Simi; + S2 = S1 + F->Nb_Simi; + S3 = S2 + F->Nb_Simi; + S4 = S3 + F->Nb_Simi; + + for (i = F->Nb_Simi; i; --i, S++, S1++, S2++, S3++, S4++) { + S->c_x = u0 * S1->c_x + u1 * S2->c_x + u2 * S3->c_x + u3 * S4->c_x; + S->c_y = u0 * S1->c_y + u1 * S2->c_y + u2 * S3->c_y + u3 * S4->c_y; + S->r = u0 * S1->r + u1 * S2->r + u2 * S3->r + u3 * S4->r; + S->r2 = u0 * S1->r2 + u1 * S2->r2 + u2 * S3->r2 + u3 * S4->r2; + S->A = u0 * S1->A + u1 * S2->A + u2 * S3->A + u3 * S4->A; + S->A2 = u0 * S1->A2 + u1 * S2->A2 + u2 * S3->A2 + u3 * S4->A2; + } + + Draw_Fractal (data); + + if (F->Count >= 1000 / F->Speed) { + S = F->Components; + S1 = S + F->Nb_Simi; + S2 = S1 + F->Nb_Simi; + S3 = S2 + F->Nb_Simi; + S4 = S3 + F->Nb_Simi; + + for (i = F->Nb_Simi; i; --i, S++, S1++, S2++, S3++, S4++) { + S2->c_x = 2.0 * S4->c_x - S3->c_x; + S2->c_y = 2.0 * S4->c_y - S3->c_y; + S2->r = 2.0 * S4->r - S3->r; + S2->r2 = 2.0 * S4->r2 - S3->r2; + S2->A = 2.0 * S4->A - S3->A; + S2->A2 = 2.0 * S4->A2 - S3->A2; + + *S1 = *S4; + } + Random_Simis (goomInfo, F, F->Components + 3 * F->Nb_Simi, F->Nb_Simi); + + Random_Simis (goomInfo, F, F->Components + 4 * F->Nb_Simi, F->Nb_Simi); + + F->Count = 0; + } + else + F->Count++; + + F->Col++; + + (*nbpt) = data->Cur_Pt; + return F->Buffer2; +} + + +/***************************************************************/ + +static void release_ifs (IfsData *data) +{ + if (data->Root != NULL) { + free_ifs (data->Root); + (void) free ((void *) data->Root); + data->Root = (FRACTAL *) NULL; + } +} + +#define RAND() goom_random(goomInfo->gRandom) + +static void ifs_update (PluginInfo *goomInfo, Pixel * data, Pixel * back, int increment, IfsData *fx_data) +{ + static int couleur = 0xc0c0c0c0; + static int v[4] = { 2, 4, 3, 2 }; + static int col[4] = { 2, 4, 3, 2 }; + +#define MOD_MER 0 +#define MOD_FEU 1 +#define MOD_MERVER 2 + static int mode = MOD_MERVER; + static int justChanged = 0; + static int cycle = 0; + int cycle10; + + int nbpt; + IFSPoint *points; + int i; + + int couleursl = couleur; + int width = goomInfo->screen.width; + int height = goomInfo->screen.height; + + cycle++; + if (cycle >= 80) + cycle = 0; + + if (cycle < 40) + cycle10 = cycle / 10; + else + cycle10 = 7 - cycle / 10; + + { + unsigned char *tmp = (unsigned char *) &couleursl; + + for (i = 0; i < 4; i++) { + *tmp = (*tmp) >> cycle10; + tmp++; + } + } + + points = draw_ifs (goomInfo, &nbpt, fx_data); + nbpt--; + +#ifdef HAVE_MMX + movd_m2r (couleursl, mm1); + punpckldq_r2r (mm1, mm1); + for (i = 0; i < nbpt; i += increment) { + int x = points[i].x; + int y = points[i].y; + + if ((x < width) && (y < height) && (x > 0) && (y > 0)) { + int pos = x + (y * width); + movd_m2r (back[pos], mm0); + paddusb_r2r (mm1, mm0); + movd_r2m (mm0, data[pos]); + } + } + emms();/*__asm__ __volatile__ ("emms");*/ +#else + for (i = 0; i < nbpt; i += increment) { + int x = (int) points[i].x & 0x7fffffff; + int y = (int) points[i].y & 0x7fffffff; + + if ((x < width) && (y < height)) { + int pos = x + (int) (y * width); + int tra = 0, i = 0; + unsigned char *bra = (unsigned char *) &back[pos]; + unsigned char *dra = (unsigned char *) &data[pos]; + unsigned char *cra = (unsigned char *) &couleursl; + + for (; i < 4; i++) { + tra = *cra; + tra += *bra; + if (tra > 255) + tra = 255; + *dra = tra; + ++dra; + ++cra; + ++bra; + } + } + } +#endif /*MMX*/ + justChanged--; + + col[ALPHA] = couleur >> (ALPHA * 8) & 0xff; + col[BLEU] = couleur >> (BLEU * 8) & 0xff; + col[VERT] = couleur >> (VERT * 8) & 0xff; + col[ROUGE] = couleur >> (ROUGE * 8) & 0xff; + + if (mode == MOD_MER) { + col[BLEU] += v[BLEU]; + if (col[BLEU] > 255) { + col[BLEU] = 255; + v[BLEU] = -(RAND() % 4) - 1; + } + if (col[BLEU] < 32) { + col[BLEU] = 32; + v[BLEU] = (RAND() % 4) + 1; + } + + col[VERT] += v[VERT]; + if (col[VERT] > 200) { + col[VERT] = 200; + v[VERT] = -(RAND() % 3) - 2; + } + if (col[VERT] > col[BLEU]) { + col[VERT] = col[BLEU]; + v[VERT] = v[BLEU]; + } + if (col[VERT] < 32) { + col[VERT] = 32; + v[VERT] = (RAND() % 3) + 2; + } + + col[ROUGE] += v[ROUGE]; + if (col[ROUGE] > 64) { + col[ROUGE] = 64; + v[ROUGE] = -(RAND () % 4) - 1; + } + if (col[ROUGE] < 0) { + col[ROUGE] = 0; + v[ROUGE] = (RAND () % 4) + 1; + } + + col[ALPHA] += v[ALPHA]; + if (col[ALPHA] > 0) { + col[ALPHA] = 0; + v[ALPHA] = -(RAND () % 4) - 1; + } + if (col[ALPHA] < 0) { + col[ALPHA] = 0; + v[ALPHA] = (RAND () % 4) + 1; + } + + if (((col[VERT] > 32) && (col[ROUGE] < col[VERT] + 40) + && (col[VERT] < col[ROUGE] + 20) && (col[BLEU] < 64) + && (RAND () % 20 == 0)) && (justChanged < 0)) { + mode = RAND () % 3 ? MOD_FEU : MOD_MERVER; + justChanged = 250; + } + } + else if (mode == MOD_MERVER) { + col[BLEU] += v[BLEU]; + if (col[BLEU] > 128) { + col[BLEU] = 128; + v[BLEU] = -(RAND () % 4) - 1; + } + if (col[BLEU] < 16) { + col[BLEU] = 16; + v[BLEU] = (RAND () % 4) + 1; + } + + col[VERT] += v[VERT]; + if (col[VERT] > 200) { + col[VERT] = 200; + v[VERT] = -(RAND () % 3) - 2; + } + if (col[VERT] > col[ALPHA]) { + col[VERT] = col[ALPHA]; + v[VERT] = v[ALPHA]; + } + if (col[VERT] < 32) { + col[VERT] = 32; + v[VERT] = (RAND () % 3) + 2; + } + + col[ROUGE] += v[ROUGE]; + if (col[ROUGE] > 128) { + col[ROUGE] = 128; + v[ROUGE] = -(RAND () % 4) - 1; + } + if (col[ROUGE] < 0) { + col[ROUGE] = 0; + v[ROUGE] = (RAND () % 4) + 1; + } + + col[ALPHA] += v[ALPHA]; + if (col[ALPHA] > 255) { + col[ALPHA] = 255; + v[ALPHA] = -(RAND () % 4) - 1; + } + if (col[ALPHA] < 0) { + col[ALPHA] = 0; + v[ALPHA] = (RAND () % 4) + 1; + } + + if (((col[VERT] > 32) && (col[ROUGE] < col[VERT] + 40) + && (col[VERT] < col[ROUGE] + 20) && (col[BLEU] < 64) + && (RAND () % 20 == 0)) && (justChanged < 0)) { + mode = RAND () % 3 ? MOD_FEU : MOD_MER; + justChanged = 250; + } + } + else if (mode == MOD_FEU) { + + col[BLEU] += v[BLEU]; + if (col[BLEU] > 64) { + col[BLEU] = 64; + v[BLEU] = -(RAND () % 4) - 1; + } + if (col[BLEU] < 0) { + col[BLEU] = 0; + v[BLEU] = (RAND () % 4) + 1; + } + + col[VERT] += v[VERT]; + if (col[VERT] > 200) { + col[VERT] = 200; + v[VERT] = -(RAND () % 3) - 2; + } + if (col[VERT] > col[ROUGE] + 20) { + col[VERT] = col[ROUGE] + 20; + v[VERT] = -(RAND () % 3) - 2; + v[ROUGE] = (RAND () % 4) + 1; + v[BLEU] = (RAND () % 4) + 1; + } + if (col[VERT] < 0) { + col[VERT] = 0; + v[VERT] = (RAND () % 3) + 2; + } + + col[ROUGE] += v[ROUGE]; + if (col[ROUGE] > 255) { + col[ROUGE] = 255; + v[ROUGE] = -(RAND () % 4) - 1; + } + if (col[ROUGE] > col[VERT] + 40) { + col[ROUGE] = col[VERT] + 40; + v[ROUGE] = -(RAND () % 4) - 1; + } + if (col[ROUGE] < 0) { + col[ROUGE] = 0; + v[ROUGE] = (RAND () % 4) + 1; + } + + col[ALPHA] += v[ALPHA]; + if (col[ALPHA] > 0) { + col[ALPHA] = 0; + v[ALPHA] = -(RAND () % 4) - 1; + } + if (col[ALPHA] < 0) { + col[ALPHA] = 0; + v[ALPHA] = (RAND () % 4) + 1; + } + + if (((col[ROUGE] < 64) && (col[VERT] > 32) && (col[VERT] < col[BLEU]) + && (col[BLEU] > 32) + && (RAND () % 20 == 0)) && (justChanged < 0)) { + mode = RAND () % 2 ? MOD_MER : MOD_MERVER; + justChanged = 250; + } + } + + couleur = (col[ALPHA] << (ALPHA * 8)) + | (col[BLEU] << (BLEU * 8)) + | (col[VERT] << (VERT * 8)) + | (col[ROUGE] << (ROUGE * 8)); +} + +/** VISUAL_FX WRAPPER FOR IFS */ + +static void ifs_vfx_apply(VisualFX *_this, Pixel *src, Pixel *dest, PluginInfo *goomInfo) { + + IfsData *data = (IfsData*)_this->fx_data; + if (!data->initalized) { + data->initalized = 1; + init_ifs(goomInfo, data); + } + ifs_update (goomInfo, dest, src, goomInfo->update.ifs_incr, data); + /*TODO: trouver meilleur soluce pour increment (mettre le code de gestion de l'ifs dans ce fichier: ifs_vfx_apply) */ +} + +static void ifs_vfx_init(VisualFX *_this, PluginInfo *info) { + + IfsData *data = (IfsData*)malloc(sizeof(IfsData)); + data->Root = (FRACTAL*)NULL; + data->initalized = 0; + _this->fx_data = data; +} + +static void ifs_vfx_free(VisualFX *_this) { + IfsData *data = (IfsData*)_this->fx_data; + release_ifs(data); + free(data); +} + +VisualFX ifs_visualfx_create(void) { + VisualFX vfx; + vfx.init = ifs_vfx_init; + vfx.free = ifs_vfx_free; + vfx.apply = ifs_vfx_apply; + return vfx; +} diff --git a/veejay-server/libgoom/ifs.h b/veejay-server/libgoom/ifs.h new file mode 100644 index 00000000..fab04266 --- /dev/null +++ b/veejay-server/libgoom/ifs.h @@ -0,0 +1,27 @@ +/* + * File created 11 april 2002 by JeKo + */ + +#ifndef IFS_H +#define IFS_H + +#include "goom_config.h" +#include "goom_graphic.h" +#include "goom_plugin_info.h" +#include "goom_visual_fx.h" + +VisualFX ifs_visualfx_create(void); + +/* init ifs for a (width)x(height) output. * / +void init_ifs (PluginInfo *goomInfo, int width, int height); + +/ * draw an ifs on the buffer (which size is width * height) + increment means that we draw 1/increment of the ifs's points * / +void ifs_update (PluginInfo *goomInfo, Pixel * buffer, Pixel * back, int width, int height, int increment); + +/ * free all ifs's data. * / +void release_ifs (void); +*/ + + +#endif diff --git a/veejay-server/libgoom/jitc_test.c b/veejay-server/libgoom/jitc_test.c new file mode 100644 index 00000000..cab03e82 --- /dev/null +++ b/veejay-server/libgoom/jitc_test.c @@ -0,0 +1,38 @@ +#include "jitc_x86.h" +#include + +int main(int c, char **v) +{ + int i; + int j; + JitcX86Env *jitc = jitc_x86_env_new(0xffff); + JitcFunc func = jitc_prepare_func(jitc); + + jitc_add(jitc, "mov edx, $d", 0xffffffff); + jitc_add(jitc, "mov eax, $d", 40); + jitc_add(jitc, "mov ebx, $d", 2); + jitc_add(jitc, "idiv ebx"); + jitc_add(jitc, "mov eax, [$d]", 0xdeadbeaf); + + jitc_add(jitc, "sal edx, $d", 7); + jitc_add(jitc, "imul ecx"); + jitc_add(jitc, "idiv ecx"); + jitc_add(jitc, "imul $d[ecx]", 2); + jitc_add(jitc, "imul ecx, [ecx]"); + jitc_add(jitc, "mov ecx, $d", (char*)(&i)-12); + jitc_add(jitc, "dec $d[ecx]", 2); + jitc_add(jitc, "add ecx, $d", 12); + jitc_add(jitc, "dec [ecx]"); + jitc_add(jitc, "dec ecx"); + + JITC_FLD_pIMM32(jitc,&i); + JITC_FSTP_pIMM32(jitc,&j); + + jitc_validate_func(jitc); + func(); + + printf("i = 0x%08x\n", i); + + jitc_x86_delete(jitc); + return 0; +} diff --git a/veejay-server/libgoom/jitc_x86.c b/veejay-server/libgoom/jitc_x86.c new file mode 100644 index 00000000..21213b89 --- /dev/null +++ b/veejay-server/libgoom/jitc_x86.c @@ -0,0 +1,530 @@ +#include "jitc_x86.h" + +#include +#include +#include + +#define PARAM_INT 1 +#define PARAM_FLOAT 2 +#define PARAM_REG 3 +#define PARAM_dispREG 4 +#define PARAM_DISP32 5 +#define PARAM_LABEL 6 +#define PARAM_NONE 666 + +typedef struct { + int id; + int i; + double f; + int reg; + int disp; + char label[256]; +} IParam; + +struct { + char *name; + int reg; +} RegsName[] = { + {"eax",EAX}, {"ebx",EBX}, {"ecx",ECX}, {"edx",EDX}, + {"edi",EDI}, {"esi",ESI}, {"ebp",EBP}, {"esp",ESP}, + {"st0",0}, {"st1",1}, {"st2",2}, {"st3",3}, + {"st4",4}, {"st5",5}, {"st6",6}, {"st7",7}, + {"mm0",0}, {"mm1",1}, {"mm2",2}, {"mm3",3}, + {"mm4",4}, {"mm5",5}, {"mm6",6}, {"mm7",7}, {NULL,0} +}; + +void modrm(JitcX86Env *jitc, int opcode, IParam *iparam) +{ + int dest = 0; + int src = 1; + int direction = 0x0; + unsigned int byte = 666; + unsigned int int32 = 0; + unsigned int need32 = 0; + + if ((iparam[0].id == PARAM_REG) && (iparam[1].id != PARAM_REG)) { + dest = 1; + src = 0; + direction = 0x02; + } + + if (iparam[src].id != PARAM_REG) { + fprintf(stderr, "JITC_x86: Invalid Instruction Parameters: %d %d.\n", iparam[0].id, iparam[1].id); + exit(1); + } + + if (iparam[dest].id == PARAM_REG) { + byte = ((int)JITC_MOD_REG_REG << 6) | (iparam[src].reg << 3) | (iparam[0].reg); + } + + else if (iparam[dest].id == PARAM_dispREG) + { + if (iparam[dest].disp == 0) + byte = ((int)JITC_MOD_pREG_REG << 6) | (iparam[src].reg << 3) | (iparam[dest].reg); + } + + else if (iparam[dest].id == PARAM_DISP32) + { + byte = ((int)JITC_MOD_pREG_REG << 6) | (iparam[src].reg << 3) | JITC_RM_DISP32; + need32 = 1; + int32 = iparam[dest].disp; + } + + if (byte == 666) { + fprintf(stderr, "JITC_x86: Invalid Instruction Parameters: %d %d.\n", iparam[0].id, iparam[1].id); + exit(1); + } + else { + if (opcode < 0x100) + JITC_ADD_UCHAR(jitc, opcode + direction); + else { + JITC_ADD_UCHAR(jitc, (opcode>>8)&0xff); + JITC_ADD_UCHAR(jitc, (opcode&0xff)/* + direction*/); + } + JITC_ADD_UCHAR(jitc, byte); + if (need32) + JITC_ADD_UINT(jitc, int32); + } +} + +static void imul_like_modrm_1param(JitcX86Env *jitc, int opcode, int digit, IParam *iparam) +{ + if (iparam[0].id == PARAM_REG) + { + JITC_ADD_UCHAR(jitc, opcode); + JITC_MODRM(jitc, 0x03, digit, iparam[0].reg); + return; + } + if (iparam[0].id == PARAM_dispREG) { + JITC_ADD_UCHAR(jitc, opcode); + if (iparam[0].disp == 0) + { + JITC_MODRM(jitc, 0x00, digit, iparam[0].reg); + } + else if ((iparam[0].disp & 0xff) == iparam[0].disp) + { + JITC_MODRM(jitc, 0x01, digit, iparam[0].reg); + JITC_ADD_UCHAR(jitc, iparam[0].disp); + } + else + { + JITC_MODRM(jitc, 0x02, digit, iparam[0].reg); + JITC_ADD_UINT(jitc, iparam[0].disp); + } + return; + } + if (iparam[0].id == PARAM_DISP32) { + JITC_ADD_UCHAR(jitc, opcode); + JITC_MODRM(jitc, JITC_MOD_pREG_REG, digit, JITC_RM_DISP32); + JITC_ADD_UINT(jitc, iparam[0].disp); + return; + } +} + +/* 1 byte encoded opcode including register... imm32 parameter */ +#define INSTR_1bReg_IMM32(opcode,dest,src) { \ + JITC_ADD_UCHAR(jitc, opcode + iparam[dest].reg); \ + JITC_ADD_UINT (jitc, (int)iparam[src].i); } + +typedef struct { + char *name; + int opcode; + int opcode_reg_int; + int digit_reg_int; + int opcode_eax_int; +} AddLikeInstr; + +static AddLikeInstr addLike[] = { + { "add", 0x01, 0x81, 0x00, 0x05 }, + { "and", 0x21, 0x81, 0x04, 0x25 }, + { "or", 0x0B, 0x81, 0x01, 0x0D }, + { "cmp", 0x39, 0x81, 0x07, 0x3D }, + { "imul", 0x0FAF, 0x69, 0x00, 0x10000 }, + { "sub", 0x29, 0x81, 0x05, 0X2D }, + { NULL, -1, -1, -1, -1 } +}; + +int checkAddLike(JitcX86Env *jitc, char *op, IParam *iparam, int nbParams) +{ + int i; + for (i=0;addLike[i].name;++i) + { + if (strcmp(op,addLike[i].name) == 0) + { + if ((iparam[0].id == PARAM_REG) && (iparam[1].id == PARAM_INT)) { + if ((iparam[0].reg == EAX) && (addLike[i].opcode_eax_int != 0x10000)) { + JITC_ADD_UCHAR(jitc, addLike[i].opcode_eax_int); + JITC_ADD_UINT(jitc, iparam[1].i); + return 1; + } + else { + JITC_ADD_UCHAR(jitc, addLike[i].opcode_reg_int); + JITC_MODRM(jitc, 0x03, addLike[i].digit_reg_int, iparam[0].reg); + JITC_ADD_UINT(jitc, iparam[1].i); + return 1; + } + } + else if ((iparam[0].id == PARAM_dispREG) && (iparam[1].id == PARAM_INT)) { + JITC_ADD_UCHAR(jitc, addLike[i].opcode_reg_int); + if ((iparam[0].disp & 0xff) == iparam[0].disp) + { + JITC_MODRM(jitc, 0x01, addLike[i].digit_reg_int, iparam[0].reg); + JITC_ADD_UCHAR(jitc, iparam[0].disp); + } + else + { + JITC_MODRM(jitc, 0x00, addLike[i].digit_reg_int, iparam[0].reg); + JITC_ADD_UINT(jitc, iparam[0].disp); + } + JITC_ADD_UINT(jitc, iparam[1].i); + return 1; + } + else if ((iparam[0].id == PARAM_DISP32) && (iparam[1].id == PARAM_INT)) { + JITC_ADD_UCHAR(jitc, addLike[i].opcode_reg_int); + JITC_MODRM(jitc, 0x00, addLike[i].digit_reg_int, 0x05); + JITC_ADD_UINT(jitc, iparam[0].disp); + JITC_ADD_UINT(jitc, iparam[1].i); + return 1; + } + else { + modrm(jitc, addLike[i].opcode, iparam); + return 1; + } + } + } + return 0; +} + +/** + * Check all kind of known instruction... perform special optimisations.. + */ +static void jitc_add_op(JitcX86Env *jitc, char *op, IParam *iparam, int nbParams) +{ + /* MOV */ + if (strcmp(op,"mov") == 0) + { + if ((iparam[0].id == PARAM_REG) && (iparam[1].id == PARAM_INT)) { + INSTR_1bReg_IMM32(0xb8,0,1); + } + else if ((iparam[0].id == PARAM_DISP32) && (iparam[1].id == PARAM_INT)) { + JITC_ADD_UCHAR(jitc, 0xc7); + JITC_MODRM(jitc, 0x00, 0x00, 0x05); + JITC_ADD_UINT(jitc, iparam[0].disp); + JITC_ADD_UINT(jitc, iparam[1].i); + } + else + modrm(jitc, 0x89, iparam); + return; + } + +#define IMUL_LIKE(_OP,_opcode,_digit)\ + if (strcmp(op, _OP) == 0) { \ + if (nbParams == 1) { \ + imul_like_modrm_1param(jitc, _opcode, _digit, iparam); \ + return; }} + +#define SHIFT_LIKE(_name,_op1,_op2,_digit) \ + if (strcmp(op, _name) == 0) { \ + if (iparam[1].id == PARAM_INT) { \ + if (iparam[1].i == 1) \ + imul_like_modrm_1param(jitc, _op1, _digit, iparam); \ + else { \ + imul_like_modrm_1param(jitc, _op2, _digit, iparam); \ + JITC_ADD_UCHAR(jitc, iparam[1].i); \ + } \ + return; \ + } \ + } + +#define POP_LIKE(_OP,_opcode) \ + if (strcmp(op, _OP) == 0) { \ + if (iparam[0].id == PARAM_REG) { \ + JITC_ADD_UCHAR(jitc, _opcode + iparam[0].reg); \ + return; } } + + IMUL_LIKE("neg", 0xf7, 0x03); + IMUL_LIKE("imul", 0xf7, 0x05); + IMUL_LIKE("idiv", 0xf7, 0x07); + + POP_LIKE("pop", 0x58); + POP_LIKE("push", 0x50); + + SHIFT_LIKE("sal", 0xd1, 0xc1, 0x04); + SHIFT_LIKE("sar", 0xd1, 0xc1, 0x07); + SHIFT_LIKE("shl", 0xd1, 0xc1, 0x04); + SHIFT_LIKE("shr", 0xd1, 0xc1, 0x05); + + /* INC */ + if (strcmp(op, "inc") == 0) { + if (iparam[0].id == PARAM_REG) { + JITC_ADD_UCHAR(jitc, 0x40 + iparam[0].reg); + return; + } + imul_like_modrm_1param(jitc, 0xff, 0x00, iparam); + return; + } + + /* DEC */ + if (strcmp(op, "dec") == 0) { + if (iparam[0].id == PARAM_REG) { + JITC_ADD_UCHAR(jitc, 0x48 + iparam[0].reg); + return; + } + imul_like_modrm_1param(jitc, 0xff, 0x01, iparam); + return; + } + + if (strcmp(op, "call") == 0) + { + if (iparam[0].id == PARAM_LABEL) { + jitc_add_used_label(jitc,iparam[0].label,jitc->used+1); + JITC_CALL(jitc,0); + return; + } + if (iparam[0].id == PARAM_INT) { + JITC_CALL(jitc,iparam[0].i); + return; + } + if (iparam[0].id == PARAM_dispREG) { + JITC_ADD_UCHAR(jitc,0xff); + JITC_ADD_UCHAR(jitc,0xd0+iparam[0].reg); + return; + } + } + +#define MONOBYTE_INSTR(_OP,_opcode) \ + if (strcmp(op, _OP) == 0) { \ + JITC_ADD_UCHAR(jitc, _opcode); \ + return; } + + MONOBYTE_INSTR("ret", 0xc3); + MONOBYTE_INSTR("leave", 0xc9); + MONOBYTE_INSTR("cdq", 0x99); + + /* JNE */ + if (strcmp(op, "jne") == 0) { + if (iparam[0].id == PARAM_LABEL) { + JITC_JUMP_COND_LABEL(jitc,COND_NOT_EQUAL,iparam[0].label); + return; + } + if (iparam[0].id == PARAM_INT) { + JITC_JUMP_COND(jitc,COND_NOT_EQUAL,iparam[0].i); + return; + } + } + + /* JE */ + if (strcmp(op, "je") == 0) { + if (iparam[0].id == PARAM_LABEL) { + JITC_JUMP_COND_LABEL(jitc,COND_EQUAL,iparam[0].label); + return; + } + if (iparam[0].id == PARAM_INT) { + JITC_JUMP_COND(jitc,COND_EQUAL,iparam[0].i); + return; + } + } + + /* ADD LIKE */ + if (checkAddLike(jitc, op, iparam, nbParams)) return; + + /* BSWAP : 0F C8+rd */ + + fprintf(stderr, "JITC_x86: Invalid Operation '%s'\n", op); + exit(1); +} + +/** + * Adds a new instruction to the just in time compiled function + */ +void jitc_add(JitcX86Env *jitc, const char *_instr, ...) +{ + char instr[256]; + char *op; + char *sparam[16]; int nbParam=0; int i; + IParam iparam[16]; + va_list ap; + strcpy(instr,_instr); + +#ifdef DISPLAY_GENCODE + printf("|"); +#endif + + op = strtok(instr, " ,"); + if (!op) return; + + /* decoupage en tokens */ + while ((sparam[nbParam] = strtok(NULL, " ,")) != NULL) if (strlen(sparam[nbParam])>0) nbParam++; + + /* Reconnaissance des parametres */ + va_start(ap, _instr); + for (i=0;i 0) { + if (strcmp(regname, RegsName[r].name) == 0) { + iparam[i].id = PARAM_dispREG; + iparam[i].reg = RegsName[r].reg; + iparam[i].disp = va_arg(ap, int); + } + } + if (sscanf(sparam[i], "[%3s]", regname) > 0) { + if (strcmp(regname, RegsName[r].name) == 0) { + iparam[i].id = PARAM_dispREG; + iparam[i].reg = RegsName[r].reg; + iparam[i].disp = 0; + } + } + } + } + if (iparam[i].id == PARAM_NONE) { + fprintf(stderr, "JITC_x86: Unrecognized parameter '%s'\n", sparam[i]); + exit(1); + } + } + va_end(ap); + + jitc_add_op(jitc, op, &(iparam[0]), nbParam); +#ifdef DISPLAY_GENCODE + printf(" ;;; %s", op); + for (i=0;i_memory = (unsigned char*)malloc(memory_size); + jitc->used = 0; + jitc->memory = (unsigned char*)((int)jitc->_memory + (32-((int)jitc->_memory)%32)%32); + + jitc->nbUsedLabel = 0; + jitc->nbKnownLabel = 0; + + jitc->usedLabel = (LabelAddr*)malloc(sizeof(LabelAddr) * JITC_MAXLABEL); + jitc->knownLabel = (LabelAddr*)malloc(sizeof(LabelAddr) * JITC_MAXLABEL); + + return jitc; +} + +void jitc_x86_delete(JitcX86Env *jitc) { + + free(jitc->usedLabel); + free(jitc->knownLabel); + free(jitc->_memory); + free(jitc); +} + +JitcFunc jitc_prepare_func(JitcX86Env *jitc) { + + JitcFunc ptr = 0; + jitc->used = (32 - jitc->used%32)%32; + ptr = (JitcFunc)&(jitc->memory[jitc->used]); + +#ifdef DISPLAY_GENCODE + printf("\n------------------------------------------\n"); + printf("-- Function Intro --\n"); + printf("------------------------------------------\n"); +#endif + + /* save the state */ + jitc_add(jitc,"push ebp"); + jitc_add(jitc,"mov ebp, esp"); + jitc_add(jitc,"sub esp, $d", 8); + JITC_PUSH_ALL(jitc); +#ifdef DISPLAY_GENCODE + printf("\n------------------------------------------\n"); +#endif + return ptr; +} + +void jitc_validate_func(JitcX86Env *jitc) { + +#ifdef DISPLAY_GENCODE + printf("\n------------------------------------------\n"); + printf("-- Function Outro --\n"); + printf("------------------------------------------\n"); +#endif + /* restore the state */ + JITC_POP_ALL(jitc); + jitc_add(jitc, "leave"); + jitc_add(jitc, "ret"); + jitc_resolve_labels(jitc); +#ifdef DISPLAY_GENCODE + printf("\n------------------------------------------\n"); +#endif +} + +void jitc_add_used_label(JitcX86Env *jitc, char *label, int where) { + + strncpy(jitc->usedLabel[jitc->nbUsedLabel].label, label, JITC_LABEL_SIZE); + jitc->usedLabel[jitc->nbUsedLabel].address = where; + jitc->nbUsedLabel++; +} + +void jitc_add_known_label(JitcX86Env *jitc, char *label, int where) { + +#ifdef DISPLAY_GENCODE + printf("%s:\n", label); +#endif + strncpy(jitc->knownLabel[jitc->nbKnownLabel].label, label, JITC_LABEL_SIZE); + jitc->knownLabel[jitc->nbKnownLabel].address = where; + jitc->nbKnownLabel++; +} + +void jitc_resolve_labels(JitcX86Env *jitc) { + + int i,j; + for (i=jitc->nbUsedLabel;i-->0;) { + + LabelAddr used = jitc->usedLabel[i]; + for (j=jitc->nbKnownLabel;j-->0;) { + + LabelAddr known = jitc->knownLabel[j]; + if (strcmp(known.label, used.label) == 0) { + int *offset = (int*)&(jitc->memory[used.address]); + *offset = known.address - used.address - 4; /* always using long offset */ + break; + } + } + } + jitc->nbUsedLabel = jitc->nbKnownLabel = 0; +} diff --git a/veejay-server/libgoom/jitc_x86.h b/veejay-server/libgoom/jitc_x86.h new file mode 100644 index 00000000..c81fa9cc --- /dev/null +++ b/veejay-server/libgoom/jitc_x86.h @@ -0,0 +1,214 @@ +/** + * Copyright (c)2004 Jean-Christophe Hoelt + */ + +#include +#include + +#define JITC_MAXLABEL 1024 +#define JITC_LABEL_SIZE 64 + +/** + * low level macros + */ + + /* {{{ Registres Generaux */ +#define EAX 0 +#define ECX 1 +#define EDX 2 +#define EBX 3 +#define ESP 4 +#define EBP 5 +#define ESI 6 +#define EDI 7 + /* }}} */ + /* {{{ Registres MMX */ +#define MM0 0 +#define MM1 1 +#define MM2 2 +#define MM3 3 +#define MM4 4 +#define MM5 5 +#define MM6 6 +#define MM7 7 + /* }}} */ + /* {{{ Registres SSE*/ +#define XMM0 0 +#define XMM1 1 +#define XMM2 2 +#define XMM3 3 +#define XMM4 4 +#define XMM5 5 +#define XMM6 6 +#define XMM7 7 + /* }}} */ + /* {{{ Alias aux registres */ +#define R0 0 +#define R1 1 +#define R2 2 +#define R3 3 +#define R4 4 +#define R5 5 +#define R6 6 +#define R7 7 + /* }}} */ + + /* {{{ Conditions */ +#define COND_OVERFLOW 0 +#define COND_NO_OVERFLOW 1 +#define COND_BELOW 2 +#define COND_NOT_BELOW 3 +#define COND_EQUAL 4 +#define COND_ZERO 4 +#define COND_NOT_EQUAL 5 +#define COND_NOT_ZERO 5 +#define COND_NOT_ABOVE 6 +#define COND_ABOVE 7 +#define COND_SIGN 8 +#define COND_NOT_SIGN 9 +#define COND_EVEN 10 +#define COND_ODD 11 +#define COND_LESS_THAN 12 +#define COND_GREATER_EQUAL 13 +#define COND_LESS_EQUAL 14 +#define COND_GREATER_THAN 15 + /* }}} */ + +typedef int (*JitcFunc)(void); + +typedef struct _LABEL_ADDR { + char label[JITC_LABEL_SIZE]; + int address; +} LabelAddr; + +typedef struct _JITC_X86_ENV { + unsigned char *_memory; + unsigned char *memory; + unsigned int used; + + int nbUsedLabel; + int nbKnownLabel; + LabelAddr *usedLabel; + LabelAddr *knownLabel; +} JitcX86Env; + +#define DISPLAY_GENCODE +/*#define DISPLAY_GENCODE_HEXA*/ + +#ifdef DISPLAY_GENCODE_HEXA + #define JITC_ADD_UCHAR(jitc,op) printf(" 0x%02x", op) && (jitc->memory[jitc->used++]=op) +#else + #define JITC_ADD_UCHAR(jitc,op) (jitc->memory[jitc->used++]=op) +#endif + +#define JITC_ADD_USHORT(jitc,i) { JITC_ADD_UCHAR(jitc,i&0xff); JITC_ADD_UCHAR(jitc,(i>>8)&0xff); } +#define JITC_ADD_UINT(jitc,i) { \ + JITC_ADD_UCHAR(jitc,i&0xff); \ + JITC_ADD_UCHAR(jitc,(i>>8)&0xff); \ + JITC_ADD_UCHAR(jitc,(i>>16)&0xff); \ + JITC_ADD_UCHAR(jitc,(i>>24)&0xff); \ +} +#define JITC_ADD_2UCHAR(jitc,op1,op2) {JITC_ADD_UCHAR(jitc,op1); JITC_ADD_UCHAR(jitc,op2);} + +#define JITC_MODRM(jitc,mod,reg,rm) { JITC_ADD_UCHAR(jitc,((int)mod<<6)|((int)reg<<3)|((int)rm)); } + +/* special values for R/M */ +#define JITC_RM_DISP32 0x05 + +#define JITC_MOD_pREG_REG 0x00 +#define JITC_MOD_disp8REG_REG 0x01 +#define JITC_MOD_disp32REG_REG 0x02 +#define JITC_MOD_REG_REG 0x03 +/* cf 24319101 p.27 */ + +#define JITC_OP_REG_REG(jitc,op,dest,src) { JITC_ADD_UCHAR(jitc,op); JITC_ADD_UCHAR(jitc,0xc0+(src<<3)+dest); } +#define JITC_OP_REG_pREG(jitc,op,dest,src) { JITC_ADD_UCHAR(jitc,op); JITC_ADD_UCHAR(jitc,(dest<<3)+src); } +#define JITC_OP_pREG_REG(jitc,op,dest,src) { JITC_ADD_UCHAR(jitc,op); JITC_ADD_UCHAR(jitc,(src<<3)+dest); } + +/** + * "high" level macro + */ + +#define JITC_LOAD_REG_IMM32(jitc,reg,imm32) { JITC_ADD_UCHAR (jitc,0xb8+reg); JITC_ADD_UINT(jitc,(int)(imm32)); } +#define JITC_LOAD_REG_REG(jitc,dest,src) { JITC_OP_REG_REG (jitc,0x89,dest,src); } + +#define JITC_LOAD_REG_pREG(jitc,dest,src) { JITC_OP_REG_pREG(jitc,0x8b,dest,src); } +#define JITC_LOAD_pREG_REG(jitc,dest,src) { JITC_OP_pREG_REG(jitc,0x89,dest,src); } + +#define JITC_DEC_REG(jitc,reg) { JITC_ADD_UCHAR (jitc,0x48+reg); } +#define JITC_INC_REG(jitc,reg) { JITC_ADD_UCHAR (jitc,0x40+reg); } + +#define JITC_ADD_REG_REG(jitc,dest,src) { JITC_OP_REG_REG (jitc,0x01,dest,src); } +#define JITC_ADD_REG_IMM32(jitc,reg,imm32) { JITC_ADD_UCHAR (jitc,0x81);\ + JITC_ADD_UCHAR (jitc,0xc0+reg);\ + JITC_ADD_UINT (jitc,(int)imm32); } + +#define JITC_AND_REG_REG(jitc,dest,src) { JITC_OP_REG_REG (jitc,0x21,dest,src); } +#define JITC_CMP_REG_REG(jitc,dest,src) { JITC_OP_REG_REG (jitc,0x39,dest,src); } +#define JITC_CMP_REG_IMM32(jitc,reg,imm32) { JITC_ADD_2UCHAR (jitc,0x81,0xf8+reg); \ + JITC_ADD_UINT (jitc,(int)imm32); } + +#define JITC_IDIV_EAX_REG(jitc,reg) { JITC_ADD_2UCHAR(jitc, 0xf7, 0xf8+reg); } +#define JITC_IMUL_EAX_REG(jitc,reg) { JITC_ADD_2UCHAR(jitc, 0xf7, 0xe8+reg); } + +/*#define JITC_SUB_REG_REG(jitc,dest,src) { JITC_OP_REG_REG (jitc,0x29,dest,src); } +#define JITC_SUB_EAX_IMM32(jitc,imm32) { JITC_ADD_UCHAR (jitc,0x2d); JITC_ADD_UINT(jitc,(int)imm32); } +#define JITC_SUB_REG_IMM32(jitc,reg,imm32) { JITC_ADD_2UCHAR (jitc,0x81, 0xe8+reg);\ + JITC_ADD_UINT (jitc,(int)imm32); }*/ +#define JITC_SUB_REG_IMM8(jitc,reg,imm8) { JITC_ADD_2UCHAR (jitc,0x83, 0xe8+reg);\ + JITC_ADD_UCHAR(jitc,imm8); } + +/* Floating points */ + +#define JITC_FLD_pIMM32(jitc,address) { JITC_ADD_UCHAR (jitc, 0xD9); \ + JITC_MODRM (jitc, 0x00, 0x00,JITC_RM_DISP32); \ + JITC_ADD_UINT(jitc,(int)(address)); } +#define JITC_FLD_STi(jict,reg) { JITC_ADD_2UCHAR (jitc, 0xD9, 0xC0+reg); } + +#define JITC_FST_pIMM32(jitc,address) { JITC_ADD_UCHAR (jitc, 0xD9); \ + JITC_MODRM (jitc, 0x00, 0x02,JITC_RM_DISP32); \ + JITC_ADD_UINT(jitc,(int)(ADDRess)); } +#define JITC_FST_STi(jict,reg) { JITC_ADD_2UCHAR (jitc, 0xDD, 0xD0+reg); } + +#define JITC_FSTP_pIMM32(jitc,address) { JITC_ADD_UCHAR (jitc, 0xD9); \ + JITC_MODRM (jitc, 0x00, 0x03, JITC_RM_DISP32); \ + JITC_ADD_UINT(jitc,(int)(address)); } +#define JITC_FSTP_STi(jict,reg) { JITC_ADD_2UCHAR (jitc, 0xDD, 0xD8+reg); } + +#define JITC_FADD + +/* Jumps */ + +#define JITC_ADD_LABEL(jitc,label) { jitc_add_known_label(jitc,label,jitc->used); } + +#define JITC_JUMP(jitc,offset) { JITC_ADD_UCHAR(jitc,0xe9); JITC_ADD_UINT(jitc,offset); } +#define JITC_JUMP_LABEL(jitc,label) { jitc_add_used_label(jitc,label,jitc->used+1); JITC_JUMP(jitc,0); } +#define JITC_JUMP_COND(jitc,cond,offset) { JITC_ADD_UCHAR(jitc,0x0f);\ + JITC_ADD_UCHAR(jitc,0x80+cond);\ + JITC_ADD_UINT(jitc,offset); } +#define JITC_JUMP_COND_LABEL(jitc,cond,label) { jitc_add_used_label(jitc,label,jitc->used+2); JITC_JUMP_COND(jitc,cond,0); } +#define JITC_CALL(jitc,function) { int __offset__ = (int)function - (int)(&jitc->memory[jitc->used+5]);\ + JITC_ADD_UCHAR(jitc,0xe8); JITC_ADD_UINT(jitc,__offset__); } +/*#define JITC_CALL_pREG(jitc,reg) { JITC_ADD_UCHAR(jitc,0xff); JITC_ADD_UCHAR(jitc,0xd0+reg); } +#define JITC_CALL_LABEL(jitc,label) { jitc_add_used_label(jitc,label,jitc->used+1); JITC_CALL(jitc,0); }*/ + +/* save all registers (except EAX,ESP,EBP) */ +#define JITC_PUSH_ALL(jitc) { jitc_add(jitc,"push ecx"); jitc_add(jitc,"push edx"); jitc_add(jitc,"push ebx"); \ + jitc_add(jitc,"push esi"); jitc_add(jitc,"push edi"); } + +/* restore all registers (except EAX,ESP,EBP) */ +#define JITC_POP_ALL(jitc) { jitc_add(jitc,"pop edi"); jitc_add(jitc,"pop esi"); jitc_add(jitc,"pop ebx"); \ + jitc_add(jitc,"pop edx"); jitc_add(jitc,"pop ecx"); } + +/* public methods */ +JitcX86Env *jitc_x86_env_new(int memory_size); +JitcFunc jitc_prepare_func(JitcX86Env *jitc); +void jitc_add(JitcX86Env *jitc, const char *instr, ...); +void jitc_validate_func(JitcX86Env *jitc); +void jitc_x86_delete(JitcX86Env *jitc); + + +/* private methods */ +void jitc_add_used_label(JitcX86Env *jitc, char *label, int where); +void jitc_add_known_label(JitcX86Env *jitc, char *label, int where); +void jitc_resolve_labels(JitcX86Env *jitc); diff --git a/veejay-server/libgoom/lines.c b/veejay-server/libgoom/lines.c new file mode 100644 index 00000000..304406ff --- /dev/null +++ b/veejay-server/libgoom/lines.c @@ -0,0 +1,238 @@ +/* + * lines.c + */ + +#include "lines.h" +#include +#include +#include +#include "goom_tools.h" +#include "drawmethods.h" +#include "goom_plugin_info.h" + +static inline unsigned char lighten (unsigned char value, float power) +{ + int val = value; + float t = (float) val * log10(power) / 2.0; + + if (t > 0) { + val = (int) t; /* (32.0f * log (t)); */ + if (val > 255) + val = 255; + if (val < 0) + val = 0; + return val; + } + else { + return 0; + } +} + +static void lightencolor (guint32 *col, float power) +{ + unsigned char *color; + + color = (unsigned char *) col; + *color = lighten (*color, power); + color++; + *color = lighten (*color, power); + color++; + *color = lighten (*color, power); + color++; + *color = lighten (*color, power); +} + + + +static void +genline (int id, float param, GMUnitPointer * l, int rx, int ry) +{ + int i; + + switch (id) { + case GML_HLINE: + for (i = 0; i < 512; i++) { + l[i].x = ((float) i * rx) / 512.0f; + l[i].y = param; + l[i].angle = M_PI / 2.0f; + } + return; + case GML_VLINE: + for (i = 0; i < 512; i++) { + l[i].y = ((float) i * ry) / 512.0f; + l[i].x = param; + l[i].angle = 0.0f; + } + return; + case GML_CIRCLE: + for (i = 0; i < 512; i++) { + float cosa, sina; + + l[i].angle = 2.0f * M_PI * (float) i / 512.0f; + cosa = param * cos (l[i].angle); + sina = param * sin (l[i].angle); + l[i].x = ((float) rx / 2.0f) + cosa; + l[i].y = (float) ry / 2.0f + sina; + } + return; + } +} + +static guint32 getcouleur (int mode) +{ + switch (mode) { + case GML_RED: + return (230 << (ROUGE * 8)) | (120 << (VERT * 8)) | (18 << (BLEU * 8)); + case GML_ORANGE_J: + return (120 << (VERT * 8)) | (252 << (ROUGE * 8)) | (18 << (BLEU * 8)); + case GML_ORANGE_V: + return (160 << (VERT * 8)) | (236 << (ROUGE * 8)) | (40 << (BLEU * 8)); + case GML_BLEUBLANC: + return (40 << (BLEU * 8)) | (220 << (ROUGE * 8)) | (140 << (VERT * 8)); + case GML_VERT: + return (200 << (VERT * 8)) | (80 << (ROUGE * 8)) | (18 << (BLEU * 8)); + case GML_BLEU: + return (250 << (BLEU * 8)) | (30 << (VERT * 8)) | (80 << (ROUGE * 8)); + case GML_BLACK: + return (16 << (BLEU * 8)) | (16 << (VERT * 8)) | (16 << (ROUGE * 8)); + } + return 0; +} + +void +goom_lines_set_res (GMLine * gml, int rx, int ry) +{ + if (gml != NULL) { + gml->screenX = rx; + gml->screenY = ry; + + genline (gml->IDdest, gml->param, gml->points2, rx, ry); + } +} + + +static void +goom_lines_move (GMLine * l) +{ + int i; + unsigned char *c1, *c2; + + for (i = 0; i < 512; i++) { + l->points[i].x = (l->points2[i].x + 39.0f * l->points[i].x) / 40.0f; + l->points[i].y = (l->points2[i].y + 39.0f * l->points[i].y) / 40.0f; + l->points[i].angle = + (l->points2[i].angle + 39.0f * l->points[i].angle) / 40.0f; + } + + c1 = (unsigned char *) &l->color; + c2 = (unsigned char *) &l->color2; + for (i = 0; i < 4; i++) { + int cc1, cc2; + + cc1 = *c1; + cc2 = *c2; + *c1 = (unsigned char) ((cc1 * 63 + cc2) >> 6); + ++c1; + ++c2; + } + + l->power += l->powinc; + if (l->power < 1.1f) { + l->power = 1.1f; + l->powinc = (float) (goom_irand(l->goomInfo->gRandom,20) + 10) / 300.0f; + } + if (l->power > 17.5f) { + l->power = 17.5f; + l->powinc = -(float) (goom_irand(l->goomInfo->gRandom,20) + 10) / 300.0f; + } + + l->amplitude = (99.0f * l->amplitude + l->amplitudeF) / 100.0f; +} + +void +goom_lines_switch_to (GMLine * gml, int IDdest, + float param, float amplitude, int col) +{ + genline (IDdest, param, gml->points2, gml->screenX, gml->screenY); + gml->IDdest = IDdest; + gml->param = param; + gml->amplitudeF = amplitude; + gml->color2 = getcouleur (col); +} + +GMLine * +goom_lines_init (PluginInfo *goomInfo, int rx, int ry, + int IDsrc, float paramS, int coulS, + int IDdest, float paramD, int coulD) +{ + GMLine *l = (GMLine *) malloc (sizeof (GMLine)); + + l->goomInfo = goomInfo; + + l->points = (GMUnitPointer *) malloc (512 * sizeof (GMUnitPointer)); + l->points2 = (GMUnitPointer *) malloc (512 * sizeof (GMUnitPointer)); + l->nbPoints = 512; + + l->IDdest = IDdest; + l->param = paramD; + + l->amplitude = l->amplitudeF = 1.0f; + + genline (IDsrc, paramS, l->points, rx, ry); + genline (IDdest, paramD, l->points2, rx, ry); + + l->color = getcouleur (coulS); + l->color2 = getcouleur (coulD); + + l->screenX = rx; + l->screenY = ry; + + l->power = 0.0f; + l->powinc = 0.01f; + + goom_lines_switch_to (l, IDdest, paramD, 1.0f, coulD); + + return l; +} + +void +goom_lines_free (GMLine ** l) +{ + free ((*l)->points); + free (*l); + l = NULL; +} + +void goom_lines_draw (PluginInfo *plug, GMLine * line, gint16 data[512], Pixel *p) +{ + if (line != NULL) { + int i, x1, y1; + guint32 color = line->color; + GMUnitPointer *pt = &(line->points[0]); + + float cosa = cos (pt->angle) / 1000.0f; + float sina = sin (pt->angle) / 1000.0f; + + lightencolor (&color, line->power); + + x1 = (int) (pt->x + cosa * line->amplitude * data[0]); + y1 = (int) (pt->y + sina * line->amplitude * data[0]); + + for (i = 1; i < 512; i++) { + int x2, y2; + GMUnitPointer *pt = &(line->points[i]); + + float cosa = cos (pt->angle) / 1000.0f; + float sina = sin (pt->angle) / 1000.0f; + + x2 = (int) (pt->x + cosa * line->amplitude * data[i]); + y2 = (int) (pt->y + sina * line->amplitude * data[i]); + + plug->methods.draw_line (p, x1, y1, x2, y2, color, line->screenX, line->screenY); + + x1 = x2; + y1 = y2; + } + goom_lines_move (line); + } +} diff --git a/veejay-server/libgoom/lines.h b/veejay-server/libgoom/lines.h new file mode 100644 index 00000000..9c6df924 --- /dev/null +++ b/veejay-server/libgoom/lines.h @@ -0,0 +1,81 @@ +#ifndef _LINES_H +#define _LINES_H + +/* + * lines.h + * Goom + * Copyright (c) 2000-2003 iOS-software. All rights reserved. + */ + +#include "goom_typedefs.h" +#include "goom_graphic.h" +#include "goom_config.h" + +struct _GMUNITPOINTER +{ + float x; + float y; + float angle; +}; + +/* tableau de points */ +struct _GMLINE +{ + + GMUnitPointer *points; + GMUnitPointer *points2; + int IDdest; + float param; + float amplitudeF; + float amplitude; + + int nbPoints; + guint32 color; /* pour l'instant je stocke la couleur a terme, on stockera le mode couleur et l'on animera */ + guint32 color2; + + int screenX; + int screenY; + + float power; + float powinc; + + PluginInfo *goomInfo; +}; + +/* les ID possibles */ + +#define GML_CIRCLE 0 +/* (param = radius) */ + +#define GML_HLINE 1 +/* (param = y) */ + +#define GML_VLINE 2 +/* (param = x) */ + +/* les modes couleur possible (si tu mets un autre c'est noir) */ + +#define GML_BLEUBLANC 0 +#define GML_RED 1 +#define GML_ORANGE_V 2 +#define GML_ORANGE_J 3 +#define GML_VERT 4 +#define GML_BLEU 5 +#define GML_BLACK 6 + +/* construit un effet de line (une ligne horitontale pour commencer) */ +GMLine *goom_lines_init (PluginInfo *goomInfo, int rx, int ry, + int IDsrc, float paramS, int modeCoulSrc, + int IDdest, float paramD, int modeCoulDest); + +void goom_lines_switch_to (GMLine * gml, int IDdest, float param, + float amplitude, + int modeCoul); + +void goom_lines_set_res (GMLine * gml, int rx, int ry); + +void goom_lines_free (GMLine ** gml); + +void goom_lines_draw (PluginInfo *plugInfo, GMLine * gml, gint16 data[512], Pixel *p); + +#endif /* _LINES_H */ diff --git a/veejay-server/libgoom/mathtools.c b/veejay-server/libgoom/mathtools.c new file mode 100644 index 00000000..b2b02ea0 --- /dev/null +++ b/veejay-server/libgoom/mathtools.c @@ -0,0 +1,84 @@ +/*---------------------------------------------------------------------------*/ +/* +** mathtools.c +** Goom Project +** +** Created by Jeko on Sun Jul 20 2003 + ** Copyright (c) 2003 iOS. All rights reserved. +*/ +/*---------------------------------------------------------------------------*/ + +#include "mathtools.h" + +float sin256[256] = { + 0,0.0245412,0.0490677,0.0735646,0.0980171,0.122411,0.14673,0.170962 + ,0.19509,0.219101,0.24298,0.266713,0.290285,0.313682,0.33689,0.359895 + ,0.382683,0.405241,0.427555,0.449611,0.471397,0.492898,0.514103,0.534998 + ,0.55557,0.575808,0.595699,0.615232,0.634393,0.653173,0.671559,0.689541 + ,0.707107,0.724247,0.740951,0.757209,0.77301,0.788346,0.803208,0.817585 + ,0.83147,0.844854,0.857729,0.870087,0.881921,0.893224,0.903989,0.91421 + ,0.92388,0.932993,0.941544,0.949528,0.95694,0.963776,0.970031,0.975702 + ,0.980785,0.985278,0.989177,0.99248,0.995185,0.99729,0.998795,0.999699 + ,1,0.999699,0.998795,0.99729,0.995185,0.99248,0.989177,0.985278 + ,0.980785,0.975702,0.970031,0.963776,0.95694,0.949528,0.941544,0.932993 + ,0.92388,0.91421,0.903989,0.893224,0.881921,0.870087,0.857729,0.844854 + ,0.83147,0.817585,0.803208,0.788346,0.77301,0.757209,0.740951,0.724247 + ,0.707107,0.689541,0.671559,0.653173,0.634393,0.615232,0.595699,0.575808 + ,0.55557,0.534998,0.514103,0.492898,0.471397,0.449611,0.427555,0.405241 + ,0.382683,0.359895,0.33689,0.313682,0.290285,0.266713,0.24298,0.219101 + ,0.19509,0.170962,0.14673,0.122411,0.0980171,0.0735646,0.0490677,0.0245412 + ,1.22465e-16,-0.0245412,-0.0490677,-0.0735646,-0.0980171,-0.122411,-0.14673,-0.170962 + ,-0.19509,-0.219101,-0.24298,-0.266713,-0.290285,-0.313682,-0.33689,-0.359895 + ,-0.382683,-0.405241,-0.427555,-0.449611,-0.471397,-0.492898,-0.514103,-0.534998 + ,-0.55557,-0.575808,-0.595699,-0.615232,-0.634393,-0.653173,-0.671559,-0.689541 + ,-0.707107,-0.724247,-0.740951,-0.757209,-0.77301,-0.788346,-0.803208,-0.817585 + ,-0.83147,-0.844854,-0.857729,-0.870087,-0.881921,-0.893224,-0.903989,-0.91421 + ,-0.92388,-0.932993,-0.941544,-0.949528,-0.95694,-0.963776,-0.970031,-0.975702 + ,-0.980785,-0.985278,-0.989177,-0.99248,-0.995185,-0.99729,-0.998795,-0.999699 + ,-1,-0.999699,-0.998795,-0.99729,-0.995185,-0.99248,-0.989177,-0.985278 + ,-0.980785,-0.975702,-0.970031,-0.963776,-0.95694,-0.949528,-0.941544,-0.932993 + ,-0.92388,-0.91421,-0.903989,-0.893224,-0.881921,-0.870087,-0.857729,-0.844854 + ,-0.83147,-0.817585,-0.803208,-0.788346,-0.77301,-0.757209,-0.740951,-0.724247 + ,-0.707107,-0.689541,-0.671559,-0.653173,-0.634393,-0.615232,-0.595699,-0.575808 + ,-0.55557,-0.534998,-0.514103,-0.492898,-0.471397,-0.449611,-0.427555,-0.405241 + ,-0.382683,-0.359895,-0.33689,-0.313682,-0.290285,-0.266713,-0.24298,-0.219101 + ,-0.19509,-0.170962,-0.14673,-0.122411,-0.0980171,-0.0735646,-0.0490677,-0.0245412 + +}; + +float cos256[256] = { + 0,0.999699,0.998795,0.99729,0.995185,0.99248,0.989177,0.985278 + ,0.980785,0.975702,0.970031,0.963776,0.95694,0.949528,0.941544,0.932993 + ,0.92388,0.91421,0.903989,0.893224,0.881921,0.870087,0.857729,0.844854 + ,0.83147,0.817585,0.803208,0.788346,0.77301,0.757209,0.740951,0.724247 + ,0.707107,0.689541,0.671559,0.653173,0.634393,0.615232,0.595699,0.575808 + ,0.55557,0.534998,0.514103,0.492898,0.471397,0.449611,0.427555,0.405241 + ,0.382683,0.359895,0.33689,0.313682,0.290285,0.266713,0.24298,0.219101 + ,0.19509,0.170962,0.14673,0.122411,0.0980171,0.0735646,0.0490677,0.0245412 + ,6.12323e-17,-0.0245412,-0.0490677,-0.0735646,-0.0980171,-0.122411,-0.14673,-0.170962 + ,-0.19509,-0.219101,-0.24298,-0.266713,-0.290285,-0.313682,-0.33689,-0.359895 + ,-0.382683,-0.405241,-0.427555,-0.449611,-0.471397,-0.492898,-0.514103,-0.534998 + ,-0.55557,-0.575808,-0.595699,-0.615232,-0.634393,-0.653173,-0.671559,-0.689541 + ,-0.707107,-0.724247,-0.740951,-0.757209,-0.77301,-0.788346,-0.803208,-0.817585 + ,-0.83147,-0.844854,-0.857729,-0.870087,-0.881921,-0.893224,-0.903989,-0.91421 + ,-0.92388,-0.932993,-0.941544,-0.949528,-0.95694,-0.963776,-0.970031,-0.975702 + ,-0.980785,-0.985278,-0.989177,-0.99248,-0.995185,-0.99729,-0.998795,-0.999699 + ,-1,-0.999699,-0.998795,-0.99729,-0.995185,-0.99248,-0.989177,-0.985278 + ,-0.980785,-0.975702,-0.970031,-0.963776,-0.95694,-0.949528,-0.941544,-0.932993 + ,-0.92388,-0.91421,-0.903989,-0.893224,-0.881921,-0.870087,-0.857729,-0.844854 + ,-0.83147,-0.817585,-0.803208,-0.788346,-0.77301,-0.757209,-0.740951,-0.724247 + ,-0.707107,-0.689541,-0.671559,-0.653173,-0.634393,-0.615232,-0.595699,-0.575808 + ,-0.55557,-0.534998,-0.514103,-0.492898,-0.471397,-0.449611,-0.427555,-0.405241 + ,-0.382683,-0.359895,-0.33689,-0.313682,-0.290285,-0.266713,-0.24298,-0.219101 + ,-0.19509,-0.170962,-0.14673,-0.122411,-0.0980171,-0.0735646,-0.0490677,-0.0245412 + ,-1.83697e-16,0.0245412,0.0490677,0.0735646,0.0980171,0.122411,0.14673,0.170962 + ,0.19509,0.219101,0.24298,0.266713,0.290285,0.313682,0.33689,0.359895 + ,0.382683,0.405241,0.427555,0.449611,0.471397,0.492898,0.514103,0.534998 + ,0.55557,0.575808,0.595699,0.615232,0.634393,0.653173,0.671559,0.689541 + ,0.707107,0.724247,0.740951,0.757209,0.77301,0.788346,0.803208,0.817585 + ,0.83147,0.844854,0.857729,0.870087,0.881921,0.893224,0.903989,0.91421 + ,0.92388,0.932993,0.941544,0.949528,0.95694,0.963776,0.970031,0.975702 + ,0.980785,0.985278,0.989177,0.99248,0.995185,0.99729,0.998795,0.999699 + +}; + diff --git a/veejay-server/libgoom/mathtools.h b/veejay-server/libgoom/mathtools.h new file mode 100644 index 00000000..0e2293c3 --- /dev/null +++ b/veejay-server/libgoom/mathtools.h @@ -0,0 +1,36 @@ +#ifndef MATHTOOLS_H +#define MATHTOOLS_H + + +#define _double2fixmagic (68719476736.0*1.5) +/* 2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor */ +#define _shiftamt 16 +/* 16.16 fixed point representation */ + +#if BigEndian_ +#define iexp_ 0 +#define iman_ 1 +#else +#define iexp_ 1 +#define iman_ 0 +#endif /* BigEndian_ */ + +/* TODO: this optimization is very efficient: put it again when all works +#ifdef HAVE_MMX +#define F2I(dbl,i) {double d = dbl + _double2fixmagic; i = ((int*)&d)[iman_] >> _shiftamt;} +#else*/ +#define F2I(dbl,i) i=(int)dbl; +/*#endif*/ + +#if 0 +#define SINCOS(f,s,c) \ + __asm__ __volatile__ ("fsincos" : "=t" (c), "=u" (s) : "0" (f)) +#else +#define SINCOS(f,s,c) {s=sin(f);c=cos(f);} +#endif + +extern float sin256[256]; +extern float cos256[256]; + +#endif + diff --git a/veejay-server/libgoom/mmx.c b/veejay-server/libgoom/mmx.c new file mode 100644 index 00000000..fdf06492 --- /dev/null +++ b/veejay-server/libgoom/mmx.c @@ -0,0 +1,275 @@ +#ifdef HAVE_MMX + +#define BUFFPOINTNB 16 +#define BUFFPOINTMASK 0xffff +#define BUFFINCR 0xff + +#include "mmx.h" +#include "goom_graphic.h" + +#define sqrtperte 16 +// faire : a % sqrtperte <=> a & pertemask +#define PERTEMASK 0xf +// faire : a / sqrtperte <=> a >> PERTEDEC +#define PERTEDEC 4 + +int mmx_supported (void) { + return (mm_support()&0x1); +} + +void zoom_filter_mmx (int prevX, int prevY, + Pixel *expix1, Pixel *expix2, + int *brutS, int *brutD, int buffratio, + int precalCoef[16][16]) +{ + unsigned int ax = (prevX-1)<> BUFFPOINTNB); + brutSmypos = brutS[myPos2]; + py = brutSmypos + (((brutD[myPos2] - brutSmypos)*buffratio) >> BUFFPOINTNB); + + if ((py>=ay) || (px>=ax)) { + pos=coeffs=0; + } + else { + pos = ((px >> PERTEDEC) + prevX * (py >> PERTEDEC)); + // coef en modulo 15 + coeffs = precalCoef [px & PERTEMASK][py & PERTEMASK]; + } + + __asm__ __volatile__ ( + "movd %2, %%mm6 \n\t" + + /* recuperation des deux premiers pixels dans mm0 et mm1 */ + "movq (%3,%1,4), %%mm0 \n\t" /* b1-v1-r1-a1-b2-v2-r2-a2 */ + "movq %%mm0, %%mm1 \n\t" /* b1-v1-r1-a1-b2-v2-r2-a2 */ + + /* depackage du premier pixel */ + "punpcklbw %%mm7, %%mm0 \n\t" /* 00-b2-00-v2-00-r2-00-a2 */ + + "movq %%mm6, %%mm5 \n\t" /* ??-??-??-??-c4-c3-c2-c1 */ + /* depackage du 2ieme pixel */ + "punpckhbw %%mm7, %%mm1 \n\t" /* 00-b1-00-v1-00-r1-00-a1 */ + + /* extraction des coefficients... */ + "punpcklbw %%mm5, %%mm6 \n\t" /* c4-c4-c3-c3-c2-c2-c1-c1 */ + "movq %%mm6, %%mm4 \n\t" /* c4-c4-c3-c3-c2-c2-c1-c1 */ + "movq %%mm6, %%mm5 \n\t" /* c4-c4-c3-c3-c2-c2-c1-c1 */ + + "punpcklbw %%mm5, %%mm6 \n\t" /* c2-c2-c2-c2-c1-c1-c1-c1 */ + "punpckhbw %%mm5, %%mm4 \n\t" /* c4-c4-c4-c4-c3-c3-c3-c3 */ + + "movq %%mm6, %%mm3 \n\t" /* c2-c2-c2-c2-c1-c1-c1-c1 */ + + "punpcklbw %%mm7, %%mm6 \n\t" /* 00-c1-00-c1-00-c1-00-c1 */ + "punpckhbw %%mm7, %%mm3 \n\t" /* 00-c2-00-c2-00-c2-00-c2 */ + + /* multiplication des pixels par les coefficients */ + "pmullw %%mm6, %%mm0 \n\t" /* c1*b2-c1*v2-c1*r2-c1*a2 */ + "pmullw %%mm3, %%mm1 \n\t" /* c2*b1-c2*v1-c2*r1-c2*a1 */ + "paddw %%mm1, %%mm0 \n\t" + + /* ...extraction des 2 derniers coefficients */ + "movq %%mm4, %%mm5 \n\t" /* c4-c4-c4-c4-c3-c3-c3-c3 */ + "punpcklbw %%mm7, %%mm4 \n\t" /* 00-c3-00-c3-00-c3-00-c3 */ + "punpckhbw %%mm7, %%mm5 \n\t" /* 00-c4-00-c4-00-c4-00-c4 */ + + /* ajouter la longueur de ligne a esi */ + "addl 8(%%ebp),%1 \n\t" + + /* recuperation des 2 derniers pixels */ + "movq (%3,%1,4), %%mm1 \n\t" + "movq %%mm1, %%mm2 \n\t" + + /* depackage des pixels */ + "punpcklbw %%mm7, %%mm1 \n\t" + "punpckhbw %%mm7, %%mm2 \n\t" + + /* multiplication pas les coeffs */ + "pmullw %%mm4, %%mm1 \n\t" + "pmullw %%mm5, %%mm2 \n\t" + + /* ajout des valeurs obtenues la valeur finale */ + "paddw %%mm1, %%mm0 \n\t" + "paddw %%mm2, %%mm0 \n\t" + + /* division par 256 = 16+16+16+16, puis repackage du pixel final */ + "psrlw $8, %%mm0 \n\t" + "packuswb %%mm7, %%mm0 \n\t" + + "movd %%mm0,%0 \n\t" + :"=g"(expix2[loop]) + :"r"(pos),"r"(coeffs),"r"(expix1) + + ); + + emms(); + } +} + +#define DRAWMETHOD_PLUS_MMX(_out,_backbuf,_col) \ +{ \ + movd_m2r(_backbuf, mm0); \ + paddusb_m2r(_col, mm0); \ + movd_r2m(mm0, _out); \ +} + +#define DRAWMETHOD DRAWMETHOD_PLUS_MMX(*p,*p,col) + +void draw_line_mmx (Pixel *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny) +{ + int x, y, dx, dy, yy, xx; + Pixel *p; + + if ((y1 < 0) || (y2 < 0) || (x1 < 0) || (x2 < 0) || (y1 >= screeny) || (y2 >= screeny) || (x1 >= screenx) || (x2 >= screenx)) + goto end_of_line; + + dx = x2 - x1; + dy = y2 - y1; + if (x1 >= x2) { + int tmp; + + tmp = x1; + x1 = x2; + x2 = tmp; + tmp = y1; + y1 = y2; + y2 = tmp; + dx = x2 - x1; + dy = y2 - y1; + } + + /* vertical line */ + if (dx == 0) { + if (y1 < y2) { + p = &(data[(screenx * y1) + x1]); + for (y = y1; y <= y2; y++) { + DRAWMETHOD; + p += screenx; + } + } + else { + p = &(data[(screenx * y2) + x1]); + for (y = y2; y <= y1; y++) { + DRAWMETHOD; + p += screenx; + } + } + goto end_of_line; + } + /* horizontal line */ + if (dy == 0) { + if (x1 < x2) { + p = &(data[(screenx * y1) + x1]); + for (x = x1; x <= x2; x++) { + DRAWMETHOD; + p++; + } + goto end_of_line; + } + else { + p = &(data[(screenx * y1) + x2]); + for (x = x2; x <= x1; x++) { + DRAWMETHOD; + p++; + } + goto end_of_line; + } + } + /* 1 */ + /* \ */ + /* \ */ + /* 2 */ + if (y2 > y1) { + /* steep */ + if (dy > dx) { + dx = ((dx << 16) / dy); + x = x1 << 16; + for (y = y1; y <= y2; y++) { + xx = x >> 16; + p = &(data[(screenx * y) + xx]); + DRAWMETHOD; + if (xx < (screenx - 1)) { + p++; + /* DRAWMETHOD; */ + } + x += dx; + } + goto end_of_line; + } + /* shallow */ + else { + dy = ((dy << 16) / dx); + y = y1 << 16; + for (x = x1; x <= x2; x++) { + yy = y >> 16; + p = &(data[(screenx * yy) + x]); + DRAWMETHOD; + if (yy < (screeny - 1)) { + p += screeny; + /* DRAWMETHOD; */ + } + y += dy; + } + } + } + /* 2 */ + /* / */ + /* / */ + /* 1 */ + else { + /* steep */ + if (-dy > dx) { + dx = ((dx << 16) / -dy); + x = (x1 + 1) << 16; + for (y = y1; y >= y2; y--) { + xx = x >> 16; + p = &(data[(screenx * y) + xx]); + DRAWMETHOD; + if (xx < (screenx - 1)) { + p--; + /* DRAWMETHOD; */ + } + x += dx; + } + goto end_of_line; + } + /* shallow */ + else { + dy = ((dy << 16) / dx); + y = y1 << 16; + for (x = x1; x <= x2; x++) { + yy = y >> 16; + p = &(data[(screenx * yy) + x]); + DRAWMETHOD; + if (yy < (screeny - 1)) { + p += screeny; + /* DRAWMETHOD; */ + } + y += dy; + } + goto end_of_line; + } + } +end_of_line: + emms(); + /* __asm__ __volatile__ ("emms"); */ +} + +#endif diff --git a/veejay-server/libgoom/mmx.h b/veejay-server/libgoom/mmx.h new file mode 100644 index 00000000..3fae26b9 --- /dev/null +++ b/veejay-server/libgoom/mmx.h @@ -0,0 +1,729 @@ +/* mmx.h + + MultiMedia eXtensions GCC interface library for IA32. + + To use this library, simply include this header file + and compile with GCC. You MUST have inlining enabled + in order for mmx_ok() to work; this can be done by + simply using -O on the GCC command line. + + Compiling with -DMMX_TRACE will cause detailed trace + output to be sent to stderr for each mmx operation. + This adds lots of code, and obviously slows execution to + a crawl, but can be very useful for debugging. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR ANY PARTICULAR PURPOSE. + + 1997-99 by H. Dietz and R. Fisher + + Notes: + It appears that the latest gas has the pand problem fixed, therefore + I'll undefine BROKEN_PAND by default. +*/ + +#ifndef _MMX_H +#define _MMX_H + +#include "goom_graphic.h" + +/* Warning: at this writing, the version of GAS packaged + with most Linux distributions does not handle the + parallel AND operation mnemonic correctly. If the + symbol BROKEN_PAND is defined, a slower alternative + coding will be used. If execution of mmxtest results + in an illegal instruction fault, define this symbol. +*/ +#undef BROKEN_PAND + + +/* The type of an value that fits in an MMX register + (note that long long constant values MUST be suffixed + by LL and unsigned long long values by ULL, lest + they be truncated by the compiler) +*/ +typedef union { + long long q; /* Quadword (64-bit) value */ + unsigned long long uq; /* Unsigned Quadword */ + int d[2]; /* 2 Doubleword (32-bit) values */ + unsigned int ud[2]; /* 2 Unsigned Doubleword */ + short w[4]; /* 4 Word (16-bit) values */ + unsigned short uw[4]; /* 4 Unsigned Word */ + char b[8]; /* 8 Byte (8-bit) values */ + unsigned char ub[8]; /* 8 Unsigned Byte */ + float s[2]; /* Single-precision (32-bit) value */ +} __attribute__ ((aligned (8))) mmx_t; /* On an 8-byte (64-bit) boundary */ + + + +/* Function to test if multimedia instructions are supported... +*/ +static int +mm_support(void) +{ + /* Returns 1 if MMX instructions are supported, + 3 if Cyrix MMX and Extended MMX instructions are supported + 5 if AMD MMX and 3DNow! instructions are supported + 13 if AMD Extended MMX, &3dNow supported + 0 if hardware does not support any of these + */ + register int rval = 0; + + __asm__ __volatile__ ( + /* See if CPUID instruction is supported ... */ + /* ... Get copies of EFLAGS into eax and ecx */ + "pushl %%ebx\n\t" + "pushf\n\t" + "popl %%eax\n\t" + "movl %%eax, %%ecx\n\t" + + /* ... Toggle the ID bit in one copy and store */ + /* to the EFLAGS reg */ + "xorl $0x200000, %%eax\n\t" + "push %%eax\n\t" + "popf\n\t" + + /* ... Get the (hopefully modified) EFLAGS */ + "pushf\n\t" + "popl %%eax\n\t" + + /* ... Compare and test result */ + "xorl %%eax, %%ecx\n\t" + "testl $0x200000, %%ecx\n\t" + "jz NotSupported1\n\t" /* CPUID not supported */ + + + /* Get standard CPUID information, and + go to a specific vendor section */ + "movl $0, %%eax\n\t" + "cpuid\n\t" + + /* Check for Intel */ + "cmpl $0x756e6547, %%ebx\n\t" + "jne TryAMD\n\t" + "cmpl $0x49656e69, %%edx\n\t" + "jne TryAMD\n\t" + "cmpl $0x6c65746e, %%ecx\n" + "jne TryAMD\n\t" + "jmp Intel\n\t" + + /* Check for AMD */ + "\nTryAMD:\n\t" + "cmpl $0x68747541, %%ebx\n\t" + "jne TryCyrix\n\t" + "cmpl $0x69746e65, %%edx\n\t" + "jne TryCyrix\n\t" + "cmpl $0x444d4163, %%ecx\n" + "jne TryCyrix\n\t" + "jmp AMD\n\t" + + /* Check for Cyrix */ + "\nTryCyrix:\n\t" + "cmpl $0x69727943, %%ebx\n\t" + "jne NotSupported2\n\t" + "cmpl $0x736e4978, %%edx\n\t" + "jne NotSupported3\n\t" + "cmpl $0x64616574, %%ecx\n\t" + "jne NotSupported4\n\t" + /* Drop through to Cyrix... */ + + + /* Cyrix Section */ + /* See if extended CPUID level 80000001 is supported */ + /* The value of CPUID/80000001 for the 6x86MX is undefined + according to the Cyrix CPU Detection Guide (Preliminary + Rev. 1.01 table 1), so we'll check the value of eax for + CPUID/0 to see if standard CPUID level 2 is supported. + According to the table, the only CPU which supports level + 2 is also the only one which supports extended CPUID levels. + */ + "cmpl $0x2, %%eax\n\t" + "jne MMXtest\n\t" /* Use standard CPUID instead */ + + /* Extended CPUID supported (in theory), so get extended + features */ + "movl $0x80000001, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%eax\n\t" /* Test for MMX */ + "jz NotSupported5\n\t" /* MMX not supported */ + "testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */ + "jnz EMMXSupported\n\t" + "movl $1, %0\n\n\t" /* MMX Supported */ + "jmp Return\n\n" + "EMMXSupported:\n\t" + "movl $3, %0\n\n\t" /* EMMX and MMX Supported */ + "jmp Return\n\t" + + + /* AMD Section */ + "AMD:\n\t" + + /* See if extended CPUID is supported */ + "movl $0x80000000, %%eax\n\t" + "cpuid\n\t" + "cmpl $0x80000000, %%eax\n\t" + "jl MMXtest\n\t" /* Use standard CPUID instead */ + + /* Extended CPUID supported, so get extended features */ + "movl $0x80000001, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%edx\n\t" /* Test for MMX */ + "jz NotSupported6\n\t" /* MMX not supported */ + "testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */ + "jnz ThreeDNowSupported\n\t" + "movl $1, %0\n\n\t" /* MMX Supported */ + "jmp Return\n\n" + "ThreeDNowSupported:\n\t" + "testl $0x40000000, %%edx\n\t" /* Test AMD Extended MMX */ + "jnz AMDXMMXSupported\n\t" + "movl $5, %0\n\n\t" /* 3DNow! and MMX Supported */ + "jmp Return\n\t" + "AMDXMMXSupported:\n\t" + "movl $13, %0\n\n\t" /* XMMX, 3DNow! and MMX Supported */ + "jmp Return\n\t" + + + /* Intel Section */ + "Intel:\n\t" + + /* Check for MMX */ + "MMXtest:\n\t" + "movl $1, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%edx\n\t" /* Test for MMX */ + "jz NotSupported7\n\t" /* MMX Not supported */ + "movl $1, %0\n\n\t" /* MMX Supported */ + "jmp Return\n\t" + + /* Nothing supported */ + "\nNotSupported1:\n\t" + "#movl $101, %0\n\n\t" + "\nNotSupported2:\n\t" + "#movl $102, %0\n\n\t" + "\nNotSupported3:\n\t" + "#movl $103, %0\n\n\t" + "\nNotSupported4:\n\t" + "#movl $104, %0\n\n\t" + "\nNotSupported5:\n\t" + "#movl $105, %0\n\n\t" + "\nNotSupported6:\n\t" + "#movl $106, %0\n\n\t" + "\nNotSupported7:\n\t" + "#movl $107, %0\n\n\t" + "movl $0, %0\n\n\t" + + "Return:\n\t" + "popl %%ebx\n\t" + : "=X" (rval) + : /* no input */ + : "eax", "ecx", "edx" + ); + + /* Return */ + return(rval); +} + +/* Function to test if mmx instructions are supported... +*/ +static inline int +mmx_ok(void) +{ + /* Returns 1 if MMX instructions are supported, 0 otherwise */ + return ( mm_support() & 0x1 ); +} + +int mmx_supported (void); +int xmmx_supported (void); + + +/* MMX optimized implementations */ +void draw_line_mmx (Pixel *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny); +void draw_line_xmmx (Pixel *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny); +void zoom_filter_mmx (int prevX, int prevY, Pixel *expix1, Pixel *expix2, + int *brutS, int *brutD, int buffratio, int precalCoef[16][16]); +void zoom_filter_xmmx (int prevX, int prevY, Pixel *expix1, Pixel *expix2, + int *lbruS, int *lbruD, int buffratio, int precalCoef[16][16]); + + +/* Helper functions for the instruction macros that follow... + (note that memory-to-register, m2r, instructions are nearly + as efficient as register-to-register, r2r, instructions; + however, memory-to-memory instructions are really simulated + as a convenience, and are only 1/3 as efficient) +*/ +#ifdef MMX_TRACE + +/* Include the stuff for printing a trace to stderr... +*/ + +#include + +#define mmx_i2r(op, imm, reg) \ + { \ + mmx_t mmx_trace; \ + mmx_trace.uq = (imm); \ + printf(#op "_i2r(" #imm "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#reg "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (imm)); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#reg "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_m2r(op, mem, reg) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (mem); \ + printf(#op "_m2r(" #mem "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#reg "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "m" (mem)); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#reg "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_r2m(op, reg, mem) \ + { \ + mmx_t mmx_trace; \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#op "_r2m(" #reg "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + mmx_trace = (mem); \ + printf(#mem "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=m" (mem) \ + : /* nothing */ ); \ + mmx_trace = (mem); \ + printf(#mem "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_r2r(op, regs, regd) \ + { \ + mmx_t mmx_trace; \ + __asm__ __volatile__ ("movq %%" #regs ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#op "_r2r(" #regs "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #regd ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#regd "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd); \ + __asm__ __volatile__ ("movq %%" #regd ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + printf(#regd "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_m2m(op, mems, memd) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (mems); \ + printf(#op "_m2m(" #mems "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + mmx_trace = (memd); \ + printf(#memd "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=m" (memd) \ + : "m" (mems)); \ + mmx_trace = (memd); \ + printf(#memd "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#else + +/* These macros are a lot simpler without the tracing... +*/ + +#define mmx_i2r(op, imm, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (imm) ) + +#define mmx_m2r(op, mem, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "m" (mem)) + +#define mmx_r2m(op, reg, mem) \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=m" (mem) \ + : /* nothing */ ) + +#define mmx_r2r(op, regs, regd) \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd) + +#define mmx_m2m(op, mems, memd) \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=m" (memd) \ + : "m" (mems)) + +#endif + + +/* 1x64 MOVe Quadword + (this is both a load and a store... + in fact, it is the only way to store) +*/ +#define movq_m2r(var, reg) mmx_m2r(movq, var, reg) +#define movq_r2m(reg, var) mmx_r2m(movq, reg, var) +#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) +#define movq(vars, vard) \ + __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + +/* 1x32 MOVe Doubleword + (like movq, this is both load and store... + but is most useful for moving things between + mmx registers and ordinary registers) +*/ +#define movd_m2r(var, reg) mmx_m2r(movd, var, reg) +#define movd_r2m(reg, var) mmx_r2m(movd, reg, var) +#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) +#define movd(vars, vard) \ + __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ + "movd %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + +/* 2x32, 4x16, and 8x8 Parallel ADDs +*/ +#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg) +#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd) +#define paddd(vars, vard) mmx_m2m(paddd, vars, vard) + +#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg) +#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd) +#define paddw(vars, vard) mmx_m2m(paddw, vars, vard) + +#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg) +#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd) +#define paddb(vars, vard) mmx_m2m(paddb, vars, vard) + + +/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic +*/ +#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg) +#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd) +#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard) + +#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg) +#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd) +#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard) + + +/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic +*/ +#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg) +#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd) +#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard) + +#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg) +#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd) +#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel SUBs +*/ +#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg) +#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd) +#define psubd(vars, vard) mmx_m2m(psubd, vars, vard) + +#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg) +#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd) +#define psubw(vars, vard) mmx_m2m(psubw, vars, vard) + +#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg) +#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd) +#define psubb(vars, vard) mmx_m2m(psubb, vars, vard) + + +/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic +*/ +#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg) +#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd) +#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard) + +#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg) +#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd) +#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard) + + +/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic +*/ +#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg) +#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd) +#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard) + +#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg) +#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd) +#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard) + + +/* 4x16 Parallel MULs giving Low 4x16 portions of results +*/ +#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg) +#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd) +#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard) + + +/* 4x16 Parallel MULs giving High 4x16 portions of results +*/ +#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg) +#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd) +#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard) + + +/* 4x16->2x32 Parallel Mul-ADD + (muls like pmullw, then adds adjacent 16-bit fields + in the multiply result to make the final 2x32 result) +*/ +#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg) +#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd) +#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard) + + +/* 1x64 bitwise AND +*/ +#ifdef BROKEN_PAND +#define pand_m2r(var, reg) \ + { \ + mmx_m2r(pandn, (mmx_t) -1LL, reg); \ + mmx_m2r(pandn, var, reg); \ + } +#define pand_r2r(regs, regd) \ + { \ + mmx_m2r(pandn, (mmx_t) -1LL, regd); \ + mmx_r2r(pandn, regs, regd) \ + } +#define pand(vars, vard) \ + { \ + movq_m2r(vard, mm0); \ + mmx_m2r(pandn, (mmx_t) -1LL, mm0); \ + mmx_m2r(pandn, vars, mm0); \ + movq_r2m(mm0, vard); \ + } +#else +#define pand_m2r(var, reg) mmx_m2r(pand, var, reg) +#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd) +#define pand(vars, vard) mmx_m2m(pand, vars, vard) +#endif + + +/* 1x64 bitwise AND with Not the destination +*/ +#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg) +#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd) +#define pandn(vars, vard) mmx_m2m(pandn, vars, vard) + + +/* 1x64 bitwise OR +*/ +#define por_m2r(var, reg) mmx_m2r(por, var, reg) +#define por_r2r(regs, regd) mmx_r2r(por, regs, regd) +#define por(vars, vard) mmx_m2m(por, vars, vard) + + +/* 1x64 bitwise eXclusive OR +*/ +#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg) +#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd) +#define pxor(vars, vard) mmx_m2m(pxor, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality + (resulting fields are either 0 or -1) +*/ +#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg) +#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd) +#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard) + +#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg) +#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd) +#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard) + +#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg) +#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd) +#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than + (resulting fields are either 0 or -1) +*/ +#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg) +#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd) +#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard) + +#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg) +#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd) +#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard) + +#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg) +#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd) +#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard) + + +/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical +*/ +#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg) +#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg) +#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd) +#define psllq(vars, vard) mmx_m2m(psllq, vars, vard) + +#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg) +#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg) +#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd) +#define pslld(vars, vard) mmx_m2m(pslld, vars, vard) + +#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg) +#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg) +#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd) +#define psllw(vars, vard) mmx_m2m(psllw, vars, vard) + + +/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical +*/ +#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg) +#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg) +#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd) +#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard) + +#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg) +#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg) +#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd) +#define psrld(vars, vard) mmx_m2m(psrld, vars, vard) + +#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg) +#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg) +#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd) +#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard) + + +/* 2x32 and 4x16 Parallel Shift Right Arithmetic +*/ +#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg) +#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg) +#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd) +#define psrad(vars, vard) mmx_m2m(psrad, vars, vard) + +#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg) +#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg) +#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd) +#define psraw(vars, vard) mmx_m2m(psraw, vars, vard) + + +/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate + (packs source and dest fields into dest in that order) +*/ +#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg) +#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd) +#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard) + +#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg) +#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd) +#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard) + + +/* 4x16->8x8 PACK and Unsigned Saturate + (packs source and dest fields into dest in that order) +*/ +#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg) +#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd) +#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard) + + +/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low + (interleaves low half of dest with low half of source + as padding in each result field) +*/ +#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg) +#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd) +#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard) + +#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg) +#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd) +#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard) + +#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg) +#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd) +#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard) + + +/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High + (interleaves high half of dest with high half of source + as padding in each result field) +*/ +#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg) +#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd) +#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard) + +#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg) +#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd) +#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard) + +#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg) +#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd) +#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard) + + +/* Empty MMx State + (used to clean-up when going from mmx to float use + of the registers that are shared by both; note that + there is no float-to-mmx operation needed, because + only the float tag word info is corruptible) +*/ +#ifdef MMX_TRACE + +#define emms() \ + { \ + printf("emms()\n"); \ + __asm__ __volatile__ ("emms" \ + "st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)"); \ + } + +#else + +#define emms() __asm__ __volatile__ ("emms"::: \ + "st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)") + +#endif + +#endif + diff --git a/veejay-server/libgoom/motif_goom1.h b/veejay-server/libgoom/motif_goom1.h new file mode 100644 index 00000000..b4a9f3f1 --- /dev/null +++ b/veejay-server/libgoom/motif_goom1.h @@ -0,0 +1,1026 @@ +static Motif CONV_MOTIF1 = { + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,14,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,13,9,9,7,2,2,9,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,11, + 11,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,12,7,4,0,0,0,2,0,0,3,14,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,12,10,9,9,4,1,0, + 1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,10,3,0,0,0,1,1,3,5,0,0,1,14,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,14,6,3,1,1,4,9,1, + 1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 10,3,0,0,2,7,13,14,14,14,7,0,0,2,14,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,12,1,9,15,15,15,15,3, + 0,13,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,12,4, + 0,0,2,10,15,15,15,15,15,15,1,0,0,10,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,9,0,2,14,15,15,15,7, + 0,9,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,14,6,0,0, + 2,9,15,15,15,15,15,15,15,13,0,0,3,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,11,0,0,10,15,15,15,9, + 0,9,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,13,3,0,1,5, + 5,4,4,4,6,12,15,15,15,13,0,0,7,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,14,0,0,5,15,15,15,10, + 0,7,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,11,1,0,3,3,1, + 0,0,0,0,0,0,5,13,15,12,0,0,13,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,13,14,15, + 15,15,15,15,15,15,15,15,14,0,0,1,15,15,15,12, + 0,3,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,10,1,2,4,0,0,1, + 9,12,12,12,9,3,0,2,14,5,0,7,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,14,7,4,4,1,1,12, + 15,15,15,15,15,15,15,15,14,1,0,0,12,15,15,15, + 1,0,12,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,10,0,3,2,0,0,3,12, + 15,15,15,15,15,14,2,1,13,2,0,12,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,14,3,0,0,0,0,0,2, + 13,15,15,15,15,15,15,15,14,1,0,0,8,15,15,15, + 1,0,9,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,12,2,1,0,0,0,9,14,15, + 15,15,15,15,15,14,1,1,11,0,3,14,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,7,4,11,12,10,1,0, + 3,12,15,15,15,15,15,15,13,1,1,0,4,15,15,15, + 2,0,10,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,14,2,1,0,0,3,12,15,15,15, + 15,15,15,15,15,11,0,5,9,1,12,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,5,1,13,15,15,12,1, + 0,1,9,15,15,15,15,15,14,2,5,0,1,14,15,15, + 2,0,7,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,14,3,0,0,0,7,14,15,15,15,15, + 15,15,15,15,15,9,0,8,7,4,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,7,0,7,8,11,15,13, + 2,0,0,3,10,15,15,15,15,5,11,0,0,11,15,15, + 6,0,2,14,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,6,0,0,0,8,15,15,15,15,15,15, + 15,15,15,15,15,6,0,4,0,6,15,15,15,15,15,15, + 14,9,14,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,11,0,3,3,0,8,15, + 14,5,0,0,0,4,12,15,15,5,13,2,0,6,15,15, + 12,0,0,11,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,10,0,0,0,8,15,15,15,15,15,15,15, + 15,15,15,15,10,1,7,6,4,13,15,15,15,15,13,11, + 6,0,8,11,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,1,1,11,2,0,5, + 14,15,8,0,0,0,0,7,15,5,14,6,0,2,15,15, + 15,3,0,5,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,13,1,0,0,7,15,15,15,15,15,15,15,15, + 15,15,15,15,7,9,15,15,15,15,15,15,12,6,2,1, + 1,1,8,6,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,4,0,6,12,1,0, + 3,13,15,11,2,0,0,0,8,4,14,10,0,0,13,15, + 15,7,0,1,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,5,0,0,5,15,15,15,15,15,15,15,15,15, + 15,15,15,15,13,15,15,15,15,14,8,3,1,2,7,11, + 5,4,5,6,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,8,0,1,14,11,0, + 0,1,9,15,14,5,0,0,2,4,14,13,0,0,10,15, + 15,12,0,0,12,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,10,0,0,1,14,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,14,13,7,2,0,5,9,15,15,15, + 5,3,6,9,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,13,0,0,9,15,12, + 2,0,0,4,13,14,4,0,3,2,12,15,1,0,5,15, + 15,14,1,0,8,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,2,0,0,9,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,11,6,1,0,2,3,10,15,15,15,15,7, + 1,2,4,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,5,0,3,14,15, + 9,2,0,0,1,6,12,13,13,1,9,12,0,0,2,14, + 15,15,4,0,4,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,10,0,0,2,14,15,15,15,15,15,15,15,15,15,15, + 13,9,6,0,1,2,9,10,15,15,15,15,14,7,1,0, + 6,2,4,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,11,0,0,9,15, + 4,4,11,6,1,0,0,1,1,0,10,4,0,0,0,12, + 15,15,9,0,1,14,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,3,0,0,8,15,15,15,15,15,15,15,13,12,4,4, + 1,1,3,10,12,15,15,15,15,15,9,2,1,0,1,6, + 6,0,10,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,4,0,3,14, + 4,3,15,15,14,9,7,9,1,0,0,0,0,1,0,7, + 15,15,13,0,0,9,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 13,0,0,1,14,15,15,15,15,15,12,9,1,0,1,4, + 7,15,15,15,15,15,15,14,8,2,0,0,0,2,13,9, + 0,4,14,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,11,0,0,9, + 3,0,8,14,15,15,15,15,10,5,4,4,7,4,0,3, + 15,15,15,4,0,3,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 5,0,0,5,15,15,15,15,14,8,7,8,10,12,14,15, + 15,15,15,15,15,15,11,1,0,0,0,5,11,15,13,1, + 1,13,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,3,0,4, + 4,0,0,2,6,10,15,15,15,15,15,15,15,10,0,0, + 12,15,15,9,0,0,12,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 1,0,0,10,15,15,15,15,15,13,14,15,15,15,15,15, + 15,15,15,15,14,7,1,0,0,3,12,15,15,15,6,0, + 7,15,15,15,12,10,9,10,12,14,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,9,0,0, + 8,3,1,4,1,0,1,12,15,15,15,15,15,14,2,0, + 6,15,15,15,2,0,6,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 0,0,1,14,15,15,15,15,14,5,15,15,15,15,15,15, + 15,15,15,7,2,0,0,1,8,15,15,15,15,12,0,2, + 14,15,12,4,0,0,0,0,0,1,5,10,14,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,14,0,0, + 5,4,1,14,15,10,7,13,15,15,15,15,15,15,8,0, + 1,14,15,15,7,0,1,14,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13, + 0,0,4,15,15,15,15,15,13,2,13,15,15,15,15,15, + 12,7,0,0,0,0,5,12,15,15,15,15,14,3,0,9, + 11,1,0,0,1,1,0,1,0,0,0,0,2,12,15,15, + 15,15,15,15,15,15,15,14,15,15,15,15,15,15,2,0, + 5,2,1,14,15,14,13,15,15,15,15,15,15,15,12,0, + 0,10,15,15,13,0,0,9,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,12, + 0,0,4,15,15,15,15,15,12,0,12,15,15,15,12,6, + 0,0,0,0,6,14,15,15,15,15,15,15,7,0,0,12, + 1,0,0,2,2,1,1,7,12,8,3,0,0,1,13,15, + 15,15,15,15,15,8,4,8,12,15,15,15,15,15,8,0, + 4,2,0,14,15,11,9,15,15,15,15,15,15,15,15,3, + 0,5,15,15,15,5,0,3,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,12, + 0,0,4,15,15,15,15,15,12,0,12,15,13,3,1,0, + 0,0,5,12,15,15,15,15,15,15,15,12,0,0,7,7, + 0,0,0,0,0,0,0,1,12,15,15,12,3,0,5,15, + 15,15,15,14,5,0,0,0,0,2,2,3,7,14,9,8, + 14,2,1,14,15,2,12,13,15,15,15,15,15,15,15,9, + 0,0,13,15,15,10,0,0,12,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13, + 0,0,5,15,15,15,15,15,12,0,11,10,1,0,0,1, + 5,14,15,15,15,15,15,15,15,15,15,6,0,2,7,0, + 0,0,0,1,2,7,4,0,3,14,15,15,14,2,0,12, + 15,15,15,9,0,1,2,1,0,0,0,0,0,1,3,7, + 15,3,0,14,15,4,12,15,15,15,15,15,15,15,15,14, + 1,0,8,15,15,14,1,0,8,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13, + 0,0,4,15,15,15,15,15,12,0,2,0,0,1,10,15, + 15,15,15,15,15,15,15,15,15,15,12,0,0,6,0,0, + 0,1,10,14,15,15,11,1,0,9,15,15,15,8,0,9, + 15,15,12,4,8,14,15,8,1,0,0,0,0,0,1,9, + 15,2,0,13,15,1,9,15,15,15,15,15,15,15,15,15, + 6,0,1,14,15,14,1,0,3,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14, + 1,0,1,14,15,15,15,15,12,1,3,7,9,13,15,15, + 15,15,15,15,15,15,15,15,15,15,3,0,2,3,0,4, + 0,8,15,15,15,15,15,13,1,2,14,15,15,10,0,6, + 15,14,2,6,15,15,15,1,3,7,3,0,0,0,0,1, + 11,1,0,11,12,0,12,15,15,15,15,15,15,15,15,15, + 11,0,0,9,15,15,4,0,0,12,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 6,0,0,9,15,15,15,15,15,12,14,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,11,0,0,3,0,8,14, + 2,5,15,15,15,15,15,15,5,0,8,15,15,12,0,4, + 15,5,2,14,15,15,10,0,13,15,13,2,4,5,5,0, + 9,1,0,10,9,1,14,15,15,15,15,15,15,15,15,15, + 13,0,0,3,15,15,9,0,0,8,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 12,0,0,3,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,3,0,1,1,5,14,15, + 11,0,12,15,15,15,15,15,14,1,1,14,15,12,0,4, + 10,0,9,15,15,11,1,8,15,15,8,1,14,15,14,2, + 5,0,0,10,6,2,15,15,15,15,15,15,15,15,15,15, + 15,3,0,0,12,15,13,0,0,2,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,3,0,0,10,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,10,0,0,1,0,11,15,15, + 15,2,6,15,15,15,15,15,15,6,0,9,15,13,0,6, + 3,0,13,15,14,2,6,15,15,13,1,8,15,15,15,4, + 3,1,0,10,7,2,15,15,15,15,15,15,15,15,15,15, + 15,9,0,0,6,15,15,3,0,0,13,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,9,0,0,2,14,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,11,10,2,0,3,0,3,15,15,15, + 15,8,1,14,15,15,15,15,15,13,0,2,15,9,1,10, + 0,3,15,15,6,2,14,15,14,3,1,14,15,15,15,2, + 4,0,0,12,5,3,15,15,15,15,15,15,15,15,15,15, + 15,14,1,0,1,14,15,5,0,0,12,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,4,0,0,6,15,15,15,15,15,15,15,15,14,12, + 12,9,5,4,4,3,0,0,0,0,4,0,8,15,15,15, + 15,13,1,10,15,15,15,15,15,15,2,0,11,3,5,10, + 0,7,15,9,1,11,15,15,8,0,6,15,15,15,10,0, + 3,0,0,13,3,6,15,15,15,15,15,15,15,15,15,15, + 15,15,6,0,0,12,15,5,0,0,7,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,13,1,0,0,8,14,15,15,13,6,4,4,1,0, + 0,0,0,0,0,0,2,0,0,4,3,0,12,15,15,15, + 15,15,5,3,15,15,15,15,14,8,0,0,1,1,12,9, + 0,9,10,0,6,15,15,15,2,2,14,15,15,13,2,0, + 4,0,1,13,0,10,15,15,15,15,15,15,15,15,15,15, + 15,15,13,1,0,10,15,10,0,0,5,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,9,0,0,0,3,2,2,1,0,0,0,1,4, + 4,5,10,12,12,12,11,0,0,11,4,0,12,15,15,15, + 15,15,12,0,7,13,15,15,5,0,0,0,1,6,15,9, + 0,3,0,0,1,6,14,10,0,12,15,15,11,2,0,2, + 3,0,3,12,1,11,15,15,15,15,15,15,15,15,15,15, + 15,15,15,3,0,6,8,7,0,0,5,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,9,1,0,0,0,2,6,10,12,12,14,15, + 15,15,15,15,11,5,4,0,2,14,4,0,12,15,15,15, + 15,15,15,4,0,3,13,6,0,0,0,1,2,14,15,12, + 0,0,0,0,0,0,2,2,6,15,14,8,0,0,0,7, + 4,0,4,12,0,12,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,0,0,0,0,0,0,1,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,12,2,0,0,0,1,6,11,15,15,15, + 15,15,15,15,2,1,0,0,9,15,6,0,7,15,15,15, + 15,15,15,13,2,0,0,0,0,0,0,1,12,15,15,15, + 4,0,0,0,0,0,0,6,13,6,1,0,0,4,13,15, + 6,0,6,12,0,12,15,15,15,15,15,15,15,15,15,15, + 15,15,15,14,5,0,0,0,0,0,5,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,14,5,0,0,0,0,0,2,4,5, + 7,3,6,3,0,2,0,2,15,15,11,0,0,9,15,15, + 15,15,15,15,11,0,0,0,0,0,2,11,15,15,15,15, + 12,1,0,0,1,4,6,10,2,0,0,0,7,14,15,15, + 9,0,9,9,0,12,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,13,9,8,9,7,13,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,12,6,1,0,0,0,0,0, + 0,0,0,2,8,0,0,9,15,15,14,4,0,0,3,10, + 14,15,15,15,15,13,3,0,0,4,14,15,15,15,15,15, + 15,11,2,0,0,1,1,0,0,0,1,11,15,15,15,15, + 9,0,10,5,3,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,14,12,10,5,4,6, + 2,4,10,14,8,0,1,14,15,15,15,14,5,0,0,0, + 1,2,4,4,4,3,1,2,9,14,15,15,15,15,15,15, + 15,15,15,11,11,13,10,9,9,11,15,15,15,15,15,15, + 10,0,8,2,4,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 2,7,15,14,1,0,6,15,15,15,15,15,15,10,6,4, + 2,2,4,4,4,3,9,14,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 11,0,3,1,4,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,11, + 1,10,15,9,0,0,13,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 11,0,11,11,11,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,2, + 5,15,14,2,0,5,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 14,1,13,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,10,1, + 13,15,11,0,0,12,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,5,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,8,1, + 15,15,5,0,3,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,10,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,12,2,3, + 15,14,1,0,7,15,15,15,15,15,13,15,15,15,15,14, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,13,12,12,11,9,4,7,14,15, + 14,13,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,12,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,14,3,0,10, + 15,9,0,0,8,7,4,2,2,1,0,3,4,3,4,9, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,14,13,11,7,4,2,0,0,0,0,0,0,1,12,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,14,13,11,7,4,2,2,13,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,12,0,3,11, + 7,1,0,0,0,0,0,1,4,9,11,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,14,12,11,9,7,4, + 3,1,0,0,0,0,0,0,0,0,0,2,11,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,13,11,8, + 4,3,1,0,0,0,0,3,8,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,14,11,3,0,0,0, + 0,0,0,2,6,9,12,14,15,15,15,15,15,15,15,15, + 15,15,15,15,15,13,9,6,3,1,0,0,0,0,0,0, + 0,0,0,0,1,4,7,11,12,12,12,14,15,15,15,15, + 15,15,15,15,15,15,15,14,12,11,7,4,2,0,0,0, + 0,0,0,1,5,10,13,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,14,12,7,3,1,0,0,0,2,5, + 2,0,2,14,15,15,15,15,15,15,15,15,15,14,13,12, + 11,9,6,4,2,0,0,0,0,0,0,0,0,1,2,4, + 5,9,11,13,15,15,15,15,15,15,15,15,15,15,15,15, + 15,14,12,11,7,4,3,1,0,0,0,0,0,0,0,1, + 4,5,10,14,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,13,10,5,1,0,0,0,1,0,0,2,13,14, + 1,0,8,15,15,14,12,11,9,8,4,3,2,1,0,0, + 0,0,0,0,1,3,2,3,5,9,10,12,13,14,15,15, + 15,15,15,15,15,15,15,15,15,15,15,13,11,10,6,4, + 3,1,0,0,0,0,0,0,0,0,1,4,7,11,13,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,11,4,0,0,0,1,4,9,13,13,1,0,0,1,7, + 0,0,7,8,5,2,0,0,0,0,0,0,1,2,3,4, + 5,9,10,12,14,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,14,11,8,4,3,1,0,0,0,0,0, + 0,0,0,0,1,4,5,9,12,13,15,15,15,15,15,15, + 15,15,14,12,9,8,8,7,4,2,5,4,5,5,12,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,14,10,5, + 1,0,1,3,6,11,14,15,15,15,15,13,12,8,3,2, + 0,0,1,1,3,3,4,5,8,10,12,13,14,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13, + 11,9,6,4,2,1,0,0,0,0,0,0,0,1,2,4, + 6,10,11,13,15,15,15,15,15,15,15,15,13,11,9,7, + 4,2,1,0,0,0,0,2,4,7,12,14,14,14,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,10,5,1,1,3, + 8,12,14,15,15,15,15,15,15,15,15,15,15,15,15,9, + 3,11,14,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,8,6,9,9,9,9,9,8,5,4,4,3,1,0, + 0,0,0,0,1,2,3,2,4,5,9,11,12,14,15,15, + 15,15,15,15,15,15,15,14,12,9,5,2,0,0,0,0, + 0,1,2,4,7,10,14,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,14,9,4,1,3,9,13,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13, + 11,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,13,3,1,1,1,1,1,1,1,0,0,0,0,2,3, + 5,8,10,12,14,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,12,5,2,0,0,0,1,3,4,7,10, + 12,13,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,13,11,13,13,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,14,12,12,12,13,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,8,1,0,1,4,7,11,13,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,13,7,8,11,14,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 + }; diff --git a/veejay-server/libgoom/motif_goom2.h b/veejay-server/libgoom/motif_goom2.h new file mode 100644 index 00000000..4bde2a3d --- /dev/null +++ b/veejay-server/libgoom/motif_goom2.h @@ -0,0 +1,1026 @@ +static Motif CONV_MOTIF2 = { + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,12,5,14, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,12,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,10,1,14, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,10,0,12,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,6,0,12, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,7,0,8,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,13,2,0,10, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,6,0,2,14,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,5,0,0,10, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,9,0,0,12,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,14,9,0,0,1,14, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,8,0,0,8,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,14,8,3,0,0,0,9,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,11,0,0,2,14,15,15,15,15,15,15,15,15,15,15, + 15,15,15,13,9,5,3,4,1,0,0,0,0,7,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,14,4,0,0,4,11,13,13,15,15,14,12,10,8,5, + 6,4,1,0,0,0,0,0,0,0,0,0,0,14,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,12,1,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,9,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 13,9,10,13,14,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,3,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,2,5,6,0,0,0,0,12,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 5,0,0,0,3,10,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,14,9,2,1,0,0,0,1,4,6,6,1, + 0,0,0,8,13,15,15,15,12,1,0,2,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14, + 2,0,0,0,0,0,4,12,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,3,0,0,10,15,15,15,10, + 0,0,4,15,15,15,15,15,15,2,0,6,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,5, + 3,11,5,0,0,0,0,0,4,11,14,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,0,13,15,15,15,11, + 0,0,7,15,15,15,15,15,15,1,0,9,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,9,0, + 13,15,15,12,5,0,0,0,0,0,1,8,14,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,1,14,15,15,15,11, + 0,0,7,15,15,15,15,15,14,0,0,9,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,11,1,10, + 15,15,15,15,15,11,5,0,0,0,0,0,1,6,13,15, + 15,15,15,15,14,8,11,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,6,0,2,15,15,15,15,11, + 0,0,6,15,15,15,15,15,13,0,0,11,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,11,1,6,15, + 15,15,15,15,15,15,15,14,5,0,0,0,0,0,0,6, + 14,15,15,15,6,0,4,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,5,15,15,15,15,11, + 0,0,5,15,15,15,15,15,12,0,0,12,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,13,2,1,13,15, + 15,15,15,15,15,15,15,15,15,12,2,0,0,0,0,0, + 1,6,11,7,0,0,4,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,7,15,15,15,15,11, + 0,0,6,15,15,15,15,15,12,0,0,12,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,5,0,7,15,15, + 15,15,15,15,15,15,15,15,15,15,15,11,5,0,0,0, + 0,0,0,0,0,1,11,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,10,15,15,15,15,11, + 0,0,6,15,15,15,15,15,12,0,0,12,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,10,0,4,14,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,13,7,0, + 0,0,0,0,0,1,6,12,14,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,10,15,15,15,15,11, + 0,0,7,15,15,15,15,15,12,0,0,12,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,13,1,1,12,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13, + 5,0,0,0,0,0,0,0,3,10,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,10,15,15,15,15,11, + 0,0,7,15,15,15,15,15,11,0,0,13,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,14,4,0,8,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 13,0,0,0,1,0,0,0,0,1,13,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,10,15,15,15,15,11, + 0,0,8,15,15,15,15,15,8,0,2,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,9,0,4,14,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14, + 4,0,0,5,13,12,6,2,0,2,13,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,7,0,10,15,15,15,15,11, + 0,0,7,15,15,15,15,15,4,0,4,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,13,1,1,13,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,11, + 0,0,1,13,15,15,15,14,9,13,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,5,0,6,15,15,15,15,11, + 0,0,8,15,15,15,15,15,2,0,8,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,5,0,9,15,15,15,15,15,15, + 15,15,15,15,15,15,14,11,15,15,15,15,15,15,15,9, + 0,0,10,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,4,0,4,15,15,15,15,11, + 0,0,7,15,15,15,15,13,0,0,11,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,10,0,3,14,15,15,15,15,15,15, + 15,15,15,15,15,14,3,0,13,15,15,15,15,15,15,14, + 9,11,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,4,0,4,15,15,15,15,11, + 0,0,8,15,15,15,15,12,0,0,12,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,14,2,1,12,15,15,15,15,15,15,15, + 15,15,15,15,14,3,0,0,9,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,6,0,3,15,15,15,15,13, + 1,0,8,15,15,15,15,12,0,0,12,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,9,0,5,15,15,15,15,15,15,15,15, + 15,15,15,14,4,0,0,0,10,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,8,0,2,15,15,15,15,15, + 3,0,13,15,15,15,15,12,0,0,12,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,13,2,1,12,15,15,15,15,15,15,15,15, + 15,15,15,7,0,0,0,0,8,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,10,0,1,14,15,15,15,15, + 11,5,15,15,15,15,15,12,0,0,11,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,6,0,7,15,15,15,15,15,15,15,15,15, + 15,15,8,0,0,0,0,0,0,9,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,12,0,0,12,15,15,15,15, + 15,14,15,15,15,15,15,10,0,0,12,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,13,1,2,14,15,15,15,15,15,15,15,15,15, + 15,10,0,0,0,6,6,0,0,0,5,12,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,12,12, + 15,15,15,15,15,15,15,15,13,0,0,11,15,15,15,15, + 15,15,15,15,15,15,15,9,0,1,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,7,0,8,15,15,15,15,15,15,15,15,15,15, + 15,9,0,0,4,15,15,8,0,0,0,1,5,13,15,15, + 15,15,15,15,15,15,15,15,15,15,12,8,7,6,5,3, + 3,3,4,12,15,15,15,15,15,15,15,15,15,7,0,6, + 15,15,15,15,15,15,15,15,14,1,0,10,15,15,15,15, + 15,15,15,15,15,15,15,6,0,3,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,13,1,0,13,15,15,15,15,15,15,15,15,15,15, + 15,14,7,8,13,15,15,15,11,2,0,0,0,0,5,11, + 15,15,15,15,15,15,15,15,13,3,0,0,0,0,0,0, + 0,0,0,5,15,15,15,15,15,15,15,15,12,1,0,0, + 3,11,15,15,15,15,15,15,13,1,0,10,15,15,15,15, + 15,15,15,15,15,15,15,3,0,5,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,9,0,5,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,14,8,1,0,0,0,0, + 4,12,15,15,15,15,15,15,4,0,0,0,0,0,0,0, + 0,0,0,2,15,15,15,15,15,15,15,14,4,0,0,0, + 0,0,9,15,15,15,15,15,14,1,0,10,15,15,15,15, + 15,15,15,15,15,15,15,2,0,9,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,14,4,0,11,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,14,8,2,0,0, + 0,0,4,10,14,15,15,15,4,0,0,0,0,0,0,0, + 0,0,0,3,15,15,15,15,15,15,15,6,0,0,0,2, + 3,0,0,8,15,15,15,15,14,1,0,10,15,15,15,15, + 15,15,15,15,15,15,15,1,0,9,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 14,5,0,4,14,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,14,9,3, + 0,0,0,0,2,5,10,15,5,0,1,11,11,12,13,15, + 11,0,0,7,15,15,15,15,15,15,8,0,0,0,1,12, + 14,6,0,0,7,14,15,15,14,1,0,9,15,15,15,15, + 15,15,15,15,15,15,15,2,0,10,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 9,0,1,13,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14, + 10,2,0,0,0,0,1,14,4,0,1,14,15,15,15,15, + 9,0,0,9,15,15,15,15,15,9,0,0,0,0,9,15, + 15,15,7,0,0,6,14,15,15,3,0,6,15,15,15,15, + 15,15,15,15,15,15,15,1,0,9,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,9, + 0,0,1,10,14,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,13,1,0,0,0,1,14,3,0,0,14,15,15,15,15, + 5,0,0,11,15,15,15,15,13,1,0,0,0,6,15,15, + 15,15,15,8,0,0,2,10,15,6,0,3,15,15,15,15, + 15,15,15,15,15,15,15,2,0,10,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,13,1, + 0,0,0,0,3,9,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,6,1,0,0,0,8,15,1,0,0,14,15,15,15,15, + 4,0,0,13,15,15,15,14,4,0,0,0,3,14,15,15, + 15,15,15,15,5,0,0,1,14,9,0,1,14,15,15,15, + 15,15,15,15,15,15,15,1,0,9,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,13,1, + 0,0,0,0,0,0,4,12,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 9,0,0,0,0,7,15,15,1,0,0,14,15,15,15,14, + 2,0,1,14,15,15,15,12,0,0,0,3,13,15,15,15, + 15,15,15,9,0,0,0,1,14,12,0,0,12,15,15,15, + 15,15,15,15,15,15,14,1,0,10,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,12, + 3,0,0,0,0,0,0,1,8,14,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,9, + 0,0,0,0,7,15,15,15,1,0,0,14,15,15,15,13, + 0,0,1,15,15,15,15,12,0,0,0,6,14,15,15,15, + 15,15,12,0,0,0,0,3,14,12,0,0,12,15,15,15, + 15,15,15,15,15,15,12,0,0,12,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,13,3,0,0,0,0,0,0,1,6,13,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,12,0, + 0,0,0,3,15,15,15,12,0,0,0,14,15,15,15,11, + 0,0,3,15,15,15,15,15,12,7,0,0,4,14,15,15, + 15,11,1,0,0,0,4,13,15,12,0,0,12,15,15,15, + 15,15,15,15,15,15,10,0,1,14,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,7,0,0,0,0,0,0,0,3,8,12,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,0, + 0,0,1,13,15,15,15,6,0,0,0,14,15,15,15,8, + 0,0,7,15,15,15,15,15,15,15,8,1,0,2,13,15, + 14,2,0,0,0,4,14,15,15,13,1,0,10,15,15,15, + 15,15,15,15,15,15,9,0,2,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,11,6,2,0,0,0,0,0,0,0,1, + 10,15,15,15,15,15,15,15,15,15,15,15,15,8,0,0, + 0,0,10,15,15,15,15,4,0,0,1,15,15,15,15,4, + 0,0,8,15,15,15,15,15,15,15,15,10,1,0,1,8, + 2,0,0,0,5,15,15,15,15,15,2,0,6,15,15,15, + 15,15,15,15,15,15,9,0,1,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,9,1,0,0,0,0,0,0, + 0,1,7,13,14,15,15,15,15,15,15,15,9,0,0,0, + 0,6,15,15,15,15,15,4,0,0,4,15,15,15,14,1, + 0,0,9,15,15,15,15,15,15,15,15,15,12,2,0,0, + 0,0,0,4,14,15,15,15,15,15,4,0,4,15,15,15, + 15,15,15,15,15,15,7,0,0,14,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,14,11,6,2,0,0,0, + 0,0,0,0,1,9,12,15,15,15,15,14,3,0,0,0, + 4,15,15,15,15,15,15,4,0,0,3,6,4,4,2,0, + 0,0,13,15,15,15,15,15,15,15,15,15,15,12,1,0, + 0,0,3,14,15,15,15,15,15,15,4,0,4,15,15,15, + 15,15,15,15,15,15,5,0,0,12,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,8,2,0, + 0,0,0,0,0,0,0,1,9,15,15,5,0,0,0,0, + 12,15,15,15,15,15,15,4,0,0,0,0,0,0,0,0, + 0,3,15,15,15,15,15,15,15,15,15,15,15,14,4,0, + 0,1,12,15,15,15,15,15,15,15,6,0,1,14,15,15, + 15,15,15,15,15,15,5,0,0,13,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,12, + 7,1,0,0,0,0,0,0,0,5,7,0,0,0,0,10, + 15,15,15,15,15,15,15,7,0,0,0,0,0,0,0,0, + 1,10,15,15,15,15,15,15,15,15,15,15,15,14,3,0, + 3,12,15,15,15,15,15,15,15,15,12,0,0,12,15,15, + 15,15,15,15,15,15,5,0,0,1,1,4,11,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,11,6,1,0,0,0,0,0,0,0,0,0,7,15, + 15,15,15,15,15,15,15,14,7,4,4,4,5,9,12,13, + 14,15,15,15,15,15,15,15,15,15,15,15,15,15,11,9, + 14,15,15,14,12,11,11,11,10,9,7,0,0,5,13,15, + 15,15,15,15,15,12,1,0,0,0,0,0,0,10,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,14,7,1,0,0,0,0,0,3,14,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,13,2,0,0,0,0,0,0,0,0,0,0,0,8, + 15,15,15,15,15,11,0,0,0,0,0,0,0,9,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,13,5,0,0,0,0,12,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,8,0,0,0,0,0,0,0,0,0,0,0,0,5, + 15,15,15,15,15,15,10,5,6,7,7,7,9,14,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,8,3,2,2,2,2,5,14,15, + 15,15,15,15,15,15,15,15,15,10,3,0,6,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,13,3,1,0,1,0,1,1,2,4,4,3,9,14, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,12,4,0,1,6,7,7,4,1,3,13, + 15,15,15,15,15,15,15,15,15,15,14,10,13,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,11,11,15,15,15,15, + 15,15,15,14,14,14,14,14,14,14,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,14,2,0,4,13,15,15,15,15,10,0,12, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,14,13,14,12,12,12,12,12,12,12, + 12,14,15,15,15,15,15,15,15,15,4,14,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,7,1,5,14,15,15,15,15,15,12,1,11, + 15,15,15,13,12,13,15,15,14,11,13,15,15,15,15,15, + 15,15,15,11,6,3,1,1,1,0,0,0,0,0,0,0, + 0,1,4,7,11,14,15,15,15,14,4,15,13,10,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,14,7,4,5, + 12,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,13,1,1,14,15,15,14,10,12,15,11,1,12, + 15,15,11,1,0,4,15,15,6,0,2,14,15,15,15,15, + 15,15,14,8,6,3,3,2,2,1,0,0,0,0,0,0, + 0,0,0,0,0,3,11,15,15,11,8,15,12,6,15,9, + 8,15,15,15,15,15,15,15,15,15,15,15,10,4,4,1, + 4,15,15,15,15,11,6,2,8,14,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,0,4,15,15,15,11,2,10,15,9,1,13, + 15,13,1,7,6,2,14,14,1,2,1,14,15,15,15,15, + 15,15,15,15,15,15,15,15,15,13,12,12,12,12,12,12, + 11,11,11,10,9,10,12,15,15,6,7,15,9,4,15,4, + 1,14,15,15,15,15,15,15,15,15,15,15,2,11,15,4, + 4,15,15,15,15,3,9,4,0,9,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,0,4,15,15,15,5,0,6,6,1,9,15, + 15,4,1,13,10,1,13,9,2,7,1,14,14,14,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,3,5,15,3,5,14,1, + 0,12,13,9,14,15,15,15,15,15,15,15,2,2,4,1, + 6,15,15,15,14,1,5,6,0,9,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,0,4,15,15,15,12,4,2,2,10,15,15, + 11,0,6,15,12,0,10,7,9,10,1,14,7,14,15,15, + 15,15,15,15,15,15,13,12,11,11,10,9,9,10,11,13, + 15,15,15,15,15,15,15,15,15,1,9,15,2,7,14,1, + 0,10,7,0,8,15,15,15,15,15,15,15,11,4,4,4, + 13,15,15,15,15,10,2,2,4,14,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,0,4,15,15,15,15,15,15,15,15,15,15, + 4,2,14,15,15,1,9,5,14,9,1,14,8,14,15,15, + 15,15,15,15,15,10,3,0,1,0,0,0,0,0,0,5, + 15,15,15,15,15,15,15,15,15,1,9,14,1,8,14,1, + 0,11,13,6,11,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,14,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,0,4,15,15,15,15,15,15,15,15,15,11, + 0,6,15,15,15,1,5,3,13,10,0,6,8,15,15,15, + 15,15,15,15,15,15,13,12,12,11,10,9,9,10,11,13, + 15,15,15,15,15,15,15,15,15,1,9,12,1,11,15,4, + 1,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 14,10,4,2,12,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,12,1,3,14,15,15,15,15,15,15,15,15,4, + 3,14,15,15,15,5,1,8,15,14,5,2,9,15,15,15, + 15,15,15,15,15,15,15,15,15,11,9,13,15,15,15,15, + 15,15,15,15,15,15,15,15,15,1,9,12,1,12,15,13, + 11,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 10,2,9,2,3,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,14,4,0,5,14,15,15,15,15,15,15,11,0, + 6,15,15,15,15,15,14,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,8,1,0,3,15,15,15,15, + 15,15,15,15,15,15,15,15,15,1,9,15,11,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 7,1,12,6,1,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,11,1,0,3,8,9,9,10,11,9,5,4, + 13,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,12,9,13,15,15,15,15, + 15,15,15,15,15,15,15,15,15,5,11,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 10,3,4,1,5,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,12,2,0,0,0,0,0,0,1,8,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,14,12,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,13,8,8,10,9,10,11,14,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 + }; diff --git a/veejay-server/libgoom/plugin_info.c b/veejay-server/libgoom/plugin_info.c new file mode 100644 index 00000000..e4a51b2f --- /dev/null +++ b/veejay-server/libgoom/plugin_info.c @@ -0,0 +1,181 @@ +#include "goom_plugin_info.h" +#include "goom_fx.h" +#include "cpu_info.h" +#include "default_scripts.h" +#include "drawmethods.h" +#include +#include + + +#ifdef CPU_POWERPC +#include +#include +#include "ppc_zoom_ultimate.h" +#include "ppc_drawings.h" +#endif /* CPU_POWERPC */ + + +#ifdef CPU_X86 +#include "mmx.h" +#endif /* CPU_X86 */ + + + +static void setOptimizedMethods(PluginInfo *p) { + + unsigned int cpuFlavour = cpu_flavour(); + + /* set default methods */ + p->methods.draw_line = draw_line; + p->methods.zoom_filter = zoom_filter_c; +/* p->methods.create_output_with_brightness = create_output_with_brightness;*/ + +#ifdef CPU_POWERPC + + if ((cpuFlavour & CPU_OPTION_64_BITS) != 0) { +/* p->methods.create_output_with_brightness = ppc_brightness_G5; */ + p->methods.zoom_filter = ppc_zoom_generic; + } + else if ((cpuFlavour & CPU_OPTION_ALTIVEC) != 0) { +/* p->methods.create_output_with_brightness = ppc_brightness_G4; */ + p->methods.zoom_filter = ppc_zoom_G4; + } + else + { +/* p->methods.create_output_with_brightness = ppc_brightness_generic;*/ + p->methods.zoom_filter = ppc_zoom_generic; + } +#endif /* CPU_POWERPC */ + +} + +void plugin_info_init(PluginInfo *pp, int nbVisuals) { + + PluginInfo p; + int i; + + p.sound.speedvar = p.sound.accelvar = p.sound.totalgoom = 0; + p.sound.prov_max = 0; + p.sound.goom_limit = 1; + p.sound.allTimesMax = 1; + + p.sound.volume_p = secure_f_feedback("Sound Volume"); + p.sound.accel_p = secure_f_feedback("Sound Acceleration"); + p.sound.speed_p = secure_f_feedback("Sound Speed"); + p.sound.goom_limit_p = secure_f_feedback("Goom Limit"); + p.sound.last_goom_p = secure_f_feedback("Goom Detection"); + p.sound.last_biggoom_p = secure_f_feedback("Big Goom Detection"); + p.sound.goom_power_p = secure_f_feedback("Goom Power"); + + p.sound.biggoom_speed_limit_p = secure_i_param("Big Goom Speed Limit"); + IVAL(p.sound.biggoom_speed_limit_p) = 10; + IMIN(p.sound.biggoom_speed_limit_p) = 0; + IMAX(p.sound.biggoom_speed_limit_p) = 100; + ISTEP(p.sound.biggoom_speed_limit_p) = 1; + + p.sound.biggoom_factor_p = secure_i_param("Big Goom Factor"); + IVAL(p.sound.biggoom_factor_p) = 10; + IMIN(p.sound.biggoom_factor_p) = 0; + IMAX(p.sound.biggoom_factor_p) = 100; + ISTEP(p.sound.biggoom_factor_p) = 1; + + p.sound.params = plugin_parameters ("Sound", 11); + + p.nbParams = 0; + p.nbVisuals = nbVisuals; + p.visuals = (VisualFX**)malloc(sizeof(VisualFX*)*nbVisuals); + + *pp = p; + pp->sound.params.params[0] = &pp->sound.biggoom_speed_limit_p; + pp->sound.params.params[1] = &pp->sound.biggoom_factor_p; + pp->sound.params.params[2] = 0; + pp->sound.params.params[3] = &pp->sound.volume_p; + pp->sound.params.params[4] = &pp->sound.accel_p; + pp->sound.params.params[5] = &pp->sound.speed_p; + pp->sound.params.params[6] = 0; + pp->sound.params.params[7] = &pp->sound.goom_limit_p; + pp->sound.params.params[8] = &pp->sound.goom_power_p; + pp->sound.params.params[9] = &pp->sound.last_goom_p; + pp->sound.params.params[10] = &pp->sound.last_biggoom_p; + + pp->statesNumber = 8; + pp->statesRangeMax = 510; + { + GoomState states[8] = { + {1,0,0,1,4, 0, 100}, + {1,0,0,0,1, 101, 140}, + {1,0,0,1,2, 141, 200}, + {0,1,0,1,2, 201, 260}, + {0,1,0,1,0, 261, 330}, + {0,1,1,1,4, 331, 400}, + {0,0,1,0,5, 401, 450}, + {0,0,1,1,1, 451, 510}}; + for (i=0;i<8;++i) + pp->states[i] = states[i]; + } + pp->curGState = &(pp->states[6]); + + /* datas for the update loop */ + pp->update.lockvar = 0; + pp->update.goomvar = 0; + pp->update.loopvar = 0; + pp->update.stop_lines = 0; + pp->update.ifs_incr = 1; /* dessiner l'ifs (0 = non: > = increment) */ + pp->update.decay_ifs = 0; /* disparition de l'ifs */ + pp->update.recay_ifs = 0; /* dedisparition de l'ifs */ + pp->update.cyclesSinceLastChange = 0; + pp->update.drawLinesDuration = 80; + pp->update.lineMode= pp->update.drawLinesDuration; + + pp->update.switchMultAmount = (29.0f/30.0f); + pp->update.switchIncrAmount = 0x7f; + pp->update.switchMult = 1.0f; + pp->update.switchIncr = pp->update.switchIncrAmount; + + pp->update.stateSelectionRnd = 0; + pp->update.stateSelectionBlocker = 0; + pp->update.previousZoomSpeed = 128; + pp->update.timeOfTitleDisplay = 0; + + pp->update_message.affiche = 0; + + { + ZoomFilterData zfd = { + 127, 8, 16, + 1, 1, 0, NORMAL_MODE, + 0, 0, 0, 0, 0 + }; + pp->update.zoomFilterData = zfd; + } + + setOptimizedMethods(pp); + + pp->scanner = gsl_new(); + pp->main_scanner = gsl_new(); + pp->main_script_str = GOOM_MAIN_SCRIPT; + + for (i = 0; i < 0xffff; i++) { + pp->sintable[i] = (int) (1024 * sin ((double) i * 360 / (sizeof (pp->sintable) / sizeof (pp->sintable[0]) - 1) * 3.141592 / 180) + .5); + /* sintable [us] = (int)(1024.0f * sin (us*2*3.31415f/0xffff)) ; */ + } +} + +void plugin_info_add_visual(PluginInfo *p, int i, VisualFX *visual) { + p->visuals[i] = visual; + if (i == p->nbVisuals-1) { + ++i; + p->nbParams = 1; + while (i--) { + if (p->visuals[i]->params) + p->nbParams++; + } + p->params = (PluginParameters *)malloc(sizeof(PluginParameters)*p->nbParams); + i = p->nbVisuals; + p->nbParams = 1; + p->params[0] = p->sound.params; + while (i--) { + if (p->visuals[i]->params) + p->params[p->nbParams++] = *(p->visuals[i]->params); + } + } +} diff --git a/veejay-server/libgoom/pngload.c b/veejay-server/libgoom/pngload.c new file mode 100644 index 00000000..adab2310 --- /dev/null +++ b/veejay-server/libgoom/pngload.c @@ -0,0 +1,141 @@ +#include + +int +loadpng (char *file_name, int *w, int *h, unsigned int ***buf) +{ + FILE *fp; + png_uint_32 width, height; + int bit_depth, + + color_type, interlace_type, compression_type, filter_type; + int rowbytes; + + png_structp png_ptr; + png_infop info_ptr; + png_infop end_info; + + int x, y; + unsigned int **row_pointers; + + /* OUVERTURE DU FICHIER */ + + fp = fopen (file_name, "rb"); + + if (!fp) { + // fprintf (stderr, "Couldn't open file\n"); + return 1; + } + + /* CREATION DES STRUCTURES */ + png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp) NULL, NULL, NULL); + if (!png_ptr) { + fprintf (stderr, "Memory error\n"); + return 1; + } + + info_ptr = png_create_info_struct (png_ptr); + if (!info_ptr) { + png_destroy_read_struct (&png_ptr, (png_infopp) NULL, (png_infopp) NULL); + fprintf (stderr, "Read error 1\n"); + return 1; + } + + end_info = png_create_info_struct (png_ptr); + if (!end_info) { + png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp) NULL); + fprintf (stderr, "Read error 2\n"); + return 1; + } + + /* CHARGEMENT DE L'IMAGE */ + if (setjmp (png_ptr->jmpbuf)) { + png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); + fclose (fp); + fprintf (stderr, "Erreur de chargement\n"); + return 1; + } + + png_init_io (png_ptr, fp); + png_set_read_status_fn (png_ptr, NULL); + + png_read_info (png_ptr, info_ptr); + + png_get_IHDR (png_ptr, info_ptr, &width, &height, + &bit_depth, &color_type, &interlace_type, + &compression_type, &filter_type); +/* + printf ("taille : %dx%d\n",width,height); + printf ("depth : %d\n",bit_depth); + printf ("color type : "); + switch (color_type) { + case PNG_COLOR_TYPE_GRAY: + printf ("PNG_COLOR_TYPE_GRAY (bit depths 1, 2, 4, 8, 16)\n"); + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: + printf ("PNG_COLOR_TYPE_GRAY_ALPHA (bit depths 8, 16)\n"); + break; + case PNG_COLOR_TYPE_PALETTE: + printf ("PNG_COLOR_TYPE_PALETTE (bit depths 1, 2, 4, 8)\n"); + break; + case PNG_COLOR_TYPE_RGB: + printf ("PNG_COLOR_TYPE_RGB (bit_depths 8, 16)\n"); + break; + case PNG_COLOR_TYPE_RGB_ALPHA: + printf ("PNG_COLOR_TYPE_RGB_ALPHA (bit_depths 8, 16)\n"); + break; + } + */ + // printf ("PNG_COLOR_MASK_ALPHA : %x\n", PNG_COLOR_MASK_ALPHA); + // printf ("PNG_COLOR_MASK_COLOR : %x\n", PNG_COLOR_MASK_COLOR); + // printf ("PNG_COLOR_MASK_PALETTE : %x\n", PNG_COLOR_MASK_PALETTE); + + if (color_type == PNG_COLOR_TYPE_PALETTE && bit_depth <= 8) + png_set_palette_to_rgb (png_ptr); + + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) + png_set_gray_1_2_4_to_8 (png_ptr); + else if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb (png_ptr); + + if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha (png_ptr); + + png_read_update_info (png_ptr, info_ptr); + +// printf ("channels : %d\n", png_get_channels (png_ptr, info_ptr)); + rowbytes = png_get_rowbytes (png_ptr, info_ptr); +// printf ("rowbytes : %d\n", rowbytes); + + row_pointers = (unsigned int **) malloc (height * sizeof (unsigned int *)); + + for (y = 0; y < height; y++) + row_pointers[y] = (unsigned int *) malloc (4 * width); + png_read_image (png_ptr, (png_bytepp) row_pointers); + + // for (y=0;y unsigned int * frompixmap +; r4 <=> unsigned int * topixmap +; r5 <=> unsigned int sizeX (in pixels) +; r6 <=> unsigned int sizeY (in pixels) +; r7 <=> unsigned int * brutS +; r8 <=> unsigned int * brutD +; r9 <=> unsigned int buffratio +; r10 <=> int [16][16] precalccoeffs + +; globals after init +; r3 <=> frompixmap - 1 byte needed for preincremental fetch (replaces r3) +; r4 <=> topixmap - 1 byte needed for preincremental fetch (replaces r4) +; r5 <=> ax = x max in 16th of pixels (replaces old r5) +; r6 <=> ay = y max in 16th of pixels (replaces old r6) +; r20 <=> row size in bytes +; r12 <=> 0xFF00FF (mask for parallel 32 bits pixs computing) +; r30 <=> brutS - 1 byte needed for preincremental fetch (replaces r7) +; r31 <=> brutD - 1 byte needed for preincremental fetch (replaces r8) + +; ABI notes : +; r1 is the Stack Pointer (SP) => Do not use +; r13..r31 are non-volatiles => Do not use + +_ppc_zoom_generic: + +; Saves the used non volatile registers in the Mach-O stack s Red-Zone +stmw r18,-56(r1) + +; init +li r18,0 ; Default value if out of range : 0 (Black) +mr r11,r10 +lis r12,0xFF +mullw r2,r5,r6 ; Number of pixels to compute +subi r30,r8,0 +slwi r20,r5,2 +srawi r19,r20,2 +ori r12,r12,0xFF +subi r5,r5,1 +subi r6,r6,1 +mtspr ctr,r2 ; Init the loop count (one loop per pixel computed) +subi r31,r7,0 +subi r4,r4,4 +slwi r5,r5,4 +slwi r6,r6,4 + +;pre init for loop +lwz r2,0(r31) ; px +lwz r29,4(r31) ; py +lwz r8,0(r30) ; px2 +lwz r10,4(r30) ; py2 + +L1: + +; computes dynamically the position to fetch +sub r8,r8,r2 +sub r10,r10,r29 +mullw r8,r8,r9 +addi r31,r31,8 +mullw r10,r10,r9 +addi r30,r30,8 + +srawi r8,r8,16 +srawi r10,r10,16 +add r2,r2,r8 +add r29,r29,r10 + +; if px>ax or py>ay goto outofrange +; computes the attenuation coeffs and the original point address +rlwinm r10,r2,6,28-6,31-6 ; r10 <- (r2 << 2) & 0x000002D0 (r10=(r2%16)*4*16) +cmpl cr6,0,r2,r5 +rlwimi r10, r29, 2, 28-2, 31-2 ; r10 <- ((r29 << 2) & 0x0000002D) | (r10 & !0x0000002D) (r10=(r10%16)*4 | r10) +cmpl cr7,0,r29,r6 +srawi r29,r29,4 ; pos computing +bge- cr6,L4 +srawi r2,r2,4 ; pos computing +mullw r29, r29,r19 ; pos computing +bge- cr7,L4 + +; Channels notation : 00112233 (AARRVVBB) + +add r2,r2,r29 ; pos computing +lwzx r10,r11,r10 ; Loads coefs +slwi r2,r2,2 ; pos computing +add r2,r2,r3 ; pos computing +rlwinm r21,r10,0,24,31 ; Isolates coef1 (??????11 -> 00000011) +lwz r25,0(r2) ; Loads col1 -> r25 +lwz r26,4(r2) ; Loads col2 -> r26 +rlwinm r22,r10,24,24,31 ; Isolates coef2 (????22?? -> 00000022) +rlwinm r23,r10,16,24,31 ; Isolates coef3 (??33???? -> 00000033) +add r2,r2,r20 ; Adds one line for future load of col3 and col4 +and r8, r25,r12 ; Masks col1 channels 1 & 3 : 0x00XX00XX +rlwinm r24,r10,8,24,31 ; Isolates coef4 (44?????? -> 00000044) +andi. r25,r25,0xFF00 ; Masks col1 channel 2 : 0x0000XX00 +mullw r8, r8, r21 ; Applies coef1 on col1 channels 1 & 3 + + +; computes final pixel color +and r10,r26,r12 ; Masks col2 channels 1 & 3 : 0x00XX00XX +lwz r27,0(r2) ; Loads col3 -> r27 +mullw r10,r10,r22 ; Applies coef2 on col2 channels 1 & 3 +mullw r25,r25,r21 ; Applies coef1 on col1 channel 2 +andi. r29,r26,0xFF00 ; Masks col2 channel 2 : 0x0000XX00 +mullw r29,r29,r22 ; Applies coef2 on col2 channel 2 +lwz r28,4(r2) ; Loads col4 -> r28 +add r8 ,r8 ,r10 ; Adds col1 & col2 channels 1 & 3 +and r10,r27,r12 ; Masks col3 channels 1 & 3 : 0x00XX00XX +add r25,r25,r29 ; Adds col1 & col2 channel 2 +mullw r10,r10,r23 ; Applies coef3 on col3 channels 1 & 3 +andi. r29,r27,0xFF00 ; Masks col3 channel 2 : 0x0000XX00 +mullw r29,r29,r23 ; Applies coef3 on col3 channel 2 +lwz r2,0(r31) ; px +add r7 ,r8 ,r10 ; Adds col3 to (col1 + col2) channels 1 & 3 +and r10,r28,r12 ; Masks col4 channels 1 & 3 : 0x00XX00XX +mullw r10,r10,r24 ; Applies coef4 on col4 channels 1 & 3 +add r25,r25,r29 ; Adds col 3 to (col1 + col2) channel 2 +lwz r8,0(r30) ; px2 +andi. r28,r28,0xFF00 ; Masks col4 channel 2 : 0x0000XX00 +add r7 ,r7 ,r10 ; Adds col4 to (col1 + col2 + col3) channels 1 & 3 +lwz r10,4(r30) ; py2 +mullw r28,r28,r24 ; Applies coef4 on col4 channel 2 +srawi r7, r7, 8 ; (sum of channels 1 & 3) >> 8 +lwz r29,4(r31) ; py +add r25,r25,r28 ; Adds col 4 to (col1 + col2 + col3) channel 2 +rlwimi r7, r25, 24, 16, 23 ; (((sum of channels 2) >> 8 ) & 0x0000FF00) | ((sum of channels 1 and 3) & 0xFFFF00FF) +stwu r7,4(r4) ; Stores the computed pixel +bdnz L1 ; Iterate again if needed +b L3 ;goto end ; If not, returns from the function + + +; if out of range +L4: +stwu r18,4(r4) +lwz r8,0(r30) ; px2 +lwz r10,4(r30) ; py2 +lwz r2,0(r31) ; px +lwz r29,4(r31) ; py +bdnz L1 + + +L3: + +; Restore saved registers and return +lmw r18,-56(r1) +blr + + + + + + + + +_ppc_zoom_G4: + +; Saves the used non volatile registers in the Mach-O stack s Red-Zone +stmw r17,-60(r1) + +; init +li r18,0 ; Default value if out of range : 0 (Black) +mr r11,r10 +lis r12,0xFF +mullw r2,r5,r6 ; Number of pixels to compute +subi r30,r8,0 +slwi r20,r5,2 +srawi r19,r20,2 +ori r12,r12,0xFF +subi r5,r5,1 +subi r6,r6,1 +mtspr ctr,r2 ; Init the loop count (one loop per pixel computed) +subi r31,r7,0 +subi r4,r4,4 +slwi r5,r5,4 +slwi r6,r6,4 + +;pre init for loop +lwz r2,0(r31) ; px +lwz r29,4(r31) ; py +lwz r8,0(r30) ; px2 +lwz r10,4(r30) ; py2 + +;********************* +lis r17,0x0F01 + +L100: + +; computes dynamically the position to fetch +;mullw r8,r8,r29 +;mullw r2,r2,r29 +;add r2,r8,r2 +;srawi r2,r2,17 + +sub r8,r8,r2 +sub r10,r10,r29 +mullw r8,r8,r9 +addi r31,r31,8 +mullw r10,r10,r9 +addi r30,r30,8 + +dst r30,r17,0 + +srawi r8,r8,16 +srawi r10,r10,16 +add r2,r2,r8 +add r29,r29,r10 + +dst r31,r17,1 + +; if px>ax or py>ay goto outofrange +; computes the attenuation coeffs and the original point address +rlwinm r10,r2,6,28-6,31-6 ; r10 <- (r2 << 2) & 0x000002D0 (r10=(r2%16)*4*16) +cmpl cr6,0,r2,r5 +rlwimi r10, r29, 2, 28-2, 31-2 ; r10 <- ((r29 << 2) & 0x0000002D) | (r10 & !0x0000002D) (r10=(r29%16)*4 | r10) +cmpl cr7,0,r29,r6 +srawi r29,r29,4 ; pos computing +bge- cr6,L400 +srawi r2,r2,4 ; pos computing +mullw r29, r29,r19 ; pos computing +bge- cr7,L400 + +; Channels notation : 00112233 (AARRVVBB) + +add r2,r2,r29 ; pos computing +lwzx r10,r11,r10 ; Loads coefs +slwi r2,r2,2 ; pos computing +add r2,r2,r3 ; pos computing +rlwinm r21,r10,0,24,31 ; Isolates coef1 (??????11 -> 00000011) +lwz r25,0(r2) ; Loads col1 -> r25 +lwz r26,4(r2) ; Loads col2 -> r26 +rlwinm r22,r10,24,24,31 ; Isolates coef2 (????22?? -> 00000022) +rlwinm r23,r10,16,24,31 ; Isolates coef3 (??33???? -> 00000033) +add r2,r2,r20 ; Adds one line for future load of col3 and col4 +and r8, r25,r12 ; Masks col1 channels 1 & 3 : 0x00XX00XX +rlwinm r24,r10,8,24,31 ; Isolates coef4 (44?????? -> 00000044) +dst r2,r17,2 +andi. r25,r25,0xFF00 ; Masks col1 channel 2 : 0x0000XX00 +mullw r8, r8, r21 ; Applies coef1 on col1 channels 1 & 3 + + +; computes final pixel color +and r10,r26,r12 ; Masks col2 channels 1 & 3 : 0x00XX00XX +lwz r27,0(r2) ; Loads col3 -> r27 +mullw r10,r10,r22 ; Applies coef2 on col2 channels 1 & 3 +mullw r25,r25,r21 ; Applies coef1 on col1 channel 2 +andi. r29,r26,0xFF00 ; Masks col2 channel 2 : 0x0000XX00 +mullw r29,r29,r22 ; Applies coef2 on col2 channel 2 +lwz r28,4(r2) ; Loads col4 -> r28 +add r8 ,r8 ,r10 ; Adds col1 & col2 channels 1 & 3 +and r10,r27,r12 ; Masks col3 channels 1 & 3 : 0x00XX00XX +add r25,r25,r29 ; Adds col1 & col2 channel 2 +mullw r10,r10,r23 ; Applies coef3 on col3 channels 1 & 3 +andi. r29,r27,0xFF00 ; Masks col3 channel 2 : 0x0000XX00 +mullw r29,r29,r23 ; Applies coef3 on col3 channel 2 +lwz r2,0(r31) ; px +add r7 ,r8 ,r10 ; Adds col3 to (col1 + col2) channels 1 & 3 +and r10,r28,r12 ; Masks col4 channels 1 & 3 : 0x00XX00XX +mullw r10,r10,r24 ; Applies coef4 on col4 channels 1 & 3 +add r25,r25,r29 ; Adds col 3 to (col1 + col2) channel 2 +lwz r8,0(r30) ; px2 +andi. r28,r28,0xFF00 ; Masks col4 channel 2 : 0x0000XX00 +add r7 ,r7 ,r10 ; Adds col4 to (col1 + col2 + col3) channels 1 & 3 +lwz r10,4(r30) ; py2 +mullw r28,r28,r24 ; Applies coef4 on col4 channel 2 +srawi r7, r7, 8 ; (sum of channels 1 & 3) >> 8 +lwz r29,4(r31) ; py +add r25,r25,r28 ; Adds col 4 to (col1 + col2 + col3) channel 2 +rlwimi r7, r25, 24, 16, 23 ; (((sum of channels 2) >> 8 ) & 0x0000FF00) | ((sum of channels 1 and 3) & 0xFFFF00FF) +stwu r7,4(r4) ; Stores the computed pixel +bdnz L100 ; Iterate again if needed +b L300 ;goto end ; If not, returns from the function + + +; if out of range +L400: +stwu r18,4(r4) +lwz r8,0(r30) ; px2 +lwz r10,4(r30) ; py2 +lwz r2,0(r31) ; px +lwz r29,4(r31) ; py +bdnz L100 + + +L300: + +; Restore saved registers and return +lmw r17,-60(r1) +blr diff --git a/veejay-server/libgoom/powerpc/ppc_doubling.s b/veejay-server/libgoom/powerpc/ppc_doubling.s new file mode 100644 index 00000000..16132615 --- /dev/null +++ b/veejay-server/libgoom/powerpc/ppc_doubling.s @@ -0,0 +1,50 @@ +.section regular,__TEXT +.globl _ppc_doubling ; name of the function to call by C program + +; width (src width)->r3 +; myx (src) ->r4 +; myX (dest) ->r5 +; myX2 (dest + 1 complete line)->r6 +; heigth (src height)->r7 +; inc (increment for next line in dest) ->r8 + +_ppc_doubling: + +mtspr ctr,r3 + +addi r4,r4,-4 +addi r5,r5,-4 +addi r6,r6,-4 + +1:;boucle: + +lwzu r10,4(r4) +stwu r10,4(r5) +stwu r10,4(r5) +stwu r10,4(r6) +stwu r10,4(r6) + +bdnz 1boucle + +subi r7,r7,1 +add r5,r5,r8 +cmpwi cr1,r7,0 +add r6,r6,r8 +mtspr ctr,r3 +bgt cr1,1boucle + +blr + +;backup + +lwzu r10,4(r4) +stwu r10,4(r5) +stwu r10,4(r6) +stwu r10,4(r5) +stwu r10,4(r6) + +lwzu r10,4(r4) +stwu r10,4(r5) +stwu r10,4(r6) +stwu r10,4(r5) +stwu r10,4(r6) diff --git a/veejay-server/libgoom/ppc_drawings.h b/veejay-server/libgoom/ppc_drawings.h new file mode 100644 index 00000000..ee438c28 --- /dev/null +++ b/veejay-server/libgoom/ppc_drawings.h @@ -0,0 +1,18 @@ +/* + * ppc_drawings.h + * Goom + * + * Created by Guillaume Borios on Sun Dec 28 2003. + * Copyright (c) 2003 iOS. All rights reserved. + * + */ + +/* Generic PowerPC Code */ +void ppc_brightness_generic(Pixel *src, Pixel *dest, int size, int coeff); + +/* G4 Specific PowerPC Code (Possible use of Altivec and Data Streams) */ +void ppc_brightness_G4(Pixel *src, Pixel *dest, int size, int coeff); + +/* G5 Specific PowerPC Code (Possible use of Altivec) */ +void ppc_brightness_G5(Pixel *src, Pixel *dest, int size, int coeff); + diff --git a/veejay-server/libgoom/ppc_drawings.s b/veejay-server/libgoom/ppc_drawings.s new file mode 100644 index 00000000..845e5ea1 --- /dev/null +++ b/veejay-server/libgoom/ppc_drawings.s @@ -0,0 +1,381 @@ +; PowerPC optimized drawing methods for Goom +; © 2003 Guillaume Borios +; This Source Code is released under the terms of the General Public License + +; Change log : +; 30 May 2003 : File creation + +; Section definition : We use a read only code section for the whole file +.section __TEXT,__text,regular,pure_instructions + + +; -------------------------------------------------------------------------------------- +; Single 32b pixel drawing macros +; Usage : +; DRAWMETHOD_XXXX_MACRO *pixelIN, *pixelOUT, COLOR, WR1, WR2, WR3, WR4 +; Only the work registers (WR) can be touched by the macros +; +; Available methods : +; DRAWMETHOD_DFLT_MACRO : Default drawing method (Actually OVRW) +; DRAWMETHOD_PLUS_MACRO : RVB Saturated per channel addition (SLOWEST) +; DRAWMETHOD_HALF_MACRO : 50% Transparency color drawing +; DRAWMETHOD_OVRW_MACRO : Direct COLOR drawing (FASTEST) +; DRAWMETHOD_B_OR_MACRO : Bitwise OR +; DRAWMETHOD_BAND_MACRO : Bitwise AND +; DRAWMETHOD_BXOR_MACRO : Bitwise XOR +; DRAWMETHOD_BNOT_MACRO : Bitwise NOT +; -------------------------------------------------------------------------------------- + +.macro DRAWMETHOD_OVRW_MACRO + stw $2,0($1) ;; *$1 <- $2 +.endmacro + +.macro DRAWMETHOD_B_OR_MACRO + lwz $3,0($0) ;; $3 <- *$0 + or $3,$3,$2 ;; $3 <- $3 | $2 + stw $3,0($1) ;; *$1 <- $3 +.endmacro + +.macro DRAWMETHOD_BAND_MACRO + lwz $3,0($0) ;; $3 <- *$0 + and $3,$3,$2 ;; $3 <- $3 & $2 + stw $3,0($1) ;; *$1 <- $3 +.endmacro + +.macro DRAWMETHOD_BXOR_MACRO + lwz $3,0($0) ;; $3 <- *$0 + xor $3,$3,$2 ;; $3 <- $3 ^ $2 + stw $3,0($1) ;; *$1 <- $3 +.endmacro + +.macro DRAWMETHOD_BNOT_MACRO + lwz $3,0($0) ;; $3 <- *$0 + nand $3,$3,$3 ;; $3 <- ~$3 + stw $3,0($1) ;; *$1 <- $3 +.endmacro + +.macro DRAWMETHOD_PLUS_MACRO + lwz $4,0($0) ;; $4 <- *$0 + andi. $3,$4,0xFF00 ;; $3 <- $4 & 0x0000FF00 + andi. $5,$2,0xFF00 ;; $5 <- $2 & 0x0000FF00 + add $3,$3,$5 ;; $3 <- $3 + $5 + rlwinm $5,$3,15,0,0 ;; $5 <- 0 | ($3[15] << 15) + srawi $5,$5,23 ;; $5 <- $5 >> 23 (algebraic for sign extension) + or $3,$3,$5 ;; $3 <- $3 | $5 + lis $5,0xFF ;; $5 <- 0x00FF00FF + addi $5,$5,0xFF + and $4,$4,$5 ;; $4 <- $4 & $5 + and $6,$2,$5 ;; $6 <- $2 & $5 + add $4,$4,$6 ;; $4 <- $4 + $6 + rlwinm $6,$4,7,0,0 ;; $6 <- 0 | ($4[7] << 7) + srawi $6,$6,15 ;; $6 <- $6 >> 15 (algebraic for sign extension) + rlwinm $5,$4,23,0,0 ;; $5 <- 0 | ($4[23] << 23) + srawi $5,$5,31 ;; $5 <- $5 >> 31 (algebraic for sign extension) + rlwimi $6,$5,0,24,31 ;; $6[24..31] <- $5[24..31] + or $4,$4,$6 ;; $4 <- $4 | $6 + rlwimi $4,$3,0,16,23 ;; $4[16..23] <- $3[16..23] + stw $4,0($1) ;; *$1 <- $4 +.endmacro + +.macro DRAWMETHOD_HALF_MACRO + lwz $4,0($0) ;; $4 <- *$0 + andi. $3,$4,0xFF00 ;; $3 <- $4 & 0x0000FF00 + andi. $5,$2,0xFF00 ;; $5 <- $2 & 0x0000FF00 + add $3,$3,$5 ;; $3 <- $3 + $5 + lis $5,0xFF ;; $5 <- 0x00FF00FF + addi $5,$5,0xFF + and $4,$4,$5 ;; $4 <- $4 & $5 + and $5,$2,$5 ;; $5 <- $2 & $5 + add $4,$4,$5 ;; $4 <- $4 + $5 + srwi $4,$4,1 ;; $4 <- $4 >> 1 + rlwimi $4,$3,31,16,23 ;; $4[16..23] <- $3[15..22] + stw $4,0($1) ;; *$1 <- $4 +.endmacro + +.macro DRAWMETHOD_DFLT_MACRO + DRAWMETHOD_PLUS_MACRO +.endmacro + +; -------------------------------------------------------------------------------------- + + + +; ************************************************************************************** +; void DRAWMETHOD_PLUS_PPC(unsigned int * buf, unsigned int _col); +; void DRAWMETHOD_PLUS_2_PPC(unsigned * in, unsigned int * out, unsigned int _col); +; ************************************************************************************** +.globl _DRAWMETHOD_PLUS_2_PPC +.align 3 +_DRAWMETHOD_PLUS_2_PPC: + DRAWMETHOD_PLUS_MACRO r3,r4,r5,r6,r7,r8,r9 + blr ;; return + +.globl _DRAWMETHOD_PLUS_PPC +.align 3 +_DRAWMETHOD_PLUS_PPC: + DRAWMETHOD_PLUS_MACRO r3,r3,r4,r5,r6,r7,r9 + blr ;; return + + +; ************************************************************************************** +; void DRAWMETHOD_HALF_PPC(unsigned int * buf, unsigned int _col); +; void DRAWMETHOD_HALF_2_PPC(unsigned * in, unsigned int * out, unsigned int _col); +; ************************************************************************************** +.globl _DRAWMETHOD_HALF_2_PPC +.align 3 +_DRAWMETHOD_HALF_2_PPC: + DRAWMETHOD_HALF_MACRO r3,r4,r5,r6,r7,r8 + blr ;; return + +.globl _DRAWMETHOD_HALF_PPC +.align 3 +_DRAWMETHOD_HALF_PPC: + DRAWMETHOD_HALF_MACRO r3,r3,r4,r5,r6,r7 + blr ;; return + + +; ************************************************************************************** +; void DRAW_LINE_PPC(unsigned int *data, int x1, int y1, int x2, int y2, unsigned int col, +; unsigned int screenx, unsigned int screeny) +; ************************************************************************************** +.globl _DRAW_LINE_PPC +.align 3 +_DRAW_LINE_PPC: + ;; NOT IMPLEMENTED YET + blr ;; return + + +; ************************************************************************************** +; void _ppc_brightness(Pixel * src, Pixel * dest, unsigned int size, unsigned int coeff) +; ************************************************************************************** + + +.const +.align 4 +vectorZERO: + .long 0,0,0,0 + .long 0x10101000, 0x10101001, 0x10101002, 0x10101003 + .long 0x10101004, 0x10101005, 0x10101006, 0x10101007 + .long 0x10101008, 0x10101009, 0x1010100A, 0x1010100B + .long 0x1010100C, 0x1010100D, 0x1010100E, 0x1010100F + + +.section __TEXT,__text,regular,pure_instructions + +.globl _ppc_brightness_G4 +.align 3 +_ppc_brightness_G4: + + +;; PowerPC Altivec code + srwi r5,r5,2 + mtctr r5 + +;;vrsave + mfspr r11,256 + lis r12,0xCFFC + mtspr 256,r12 + + mflr r0 + bcl 20,31,"L00000000001$pb" +"L00000000001$pb": + mflr r10 + mtlr r0 + + addis r9,r10,ha16(vectorZERO-"L00000000001$pb") + addi r9,r9,lo16(vectorZERO-"L00000000001$pb") + + vxor v0,v0,v0 ;; V0 = NULL vector + + addi r9,r9,16 + lvx v10,0,r9 + addi r9,r9,16 + lvx v11,0,r9 + addi r9,r9,16 + lvx v12,0,r9 + addi r9,r9,16 + lvx v13,0,r9 + + addis r9,r10,ha16(vectortmpwork-"L00000000001$pb") + addi r9,r9,lo16(vectortmpwork-"L00000000001$pb") + stw r6,0(r9) + li r6,8 + stw r6,4(r9) + lvx v9,0,r9 + li r9,128 + vspltw v8,v9,0 + vspltw v9,v9,1 + +;; elt counter + li r9,0 + lis r7,0x0F01 + b L7 +.align 4 +L7: + lvx v1,r9,r3 + + vperm v4,v1,v0,v10 + ;********************* + add r10,r9,r3 + ;********************* + vperm v5,v1,v0,v11 + vperm v6,v1,v0,v12 + vperm v7,v1,v0,v13 + + vmulouh v4,v4,v8 + ;********************* + dst r10,r7,3 + ;********************* + vmulouh v5,v5,v8 + vmulouh v6,v6,v8 + vmulouh v7,v7,v8 + vsrw v4,v4,v9 + vsrw v5,v5,v9 + vsrw v6,v6,v9 + vsrw v7,v7,v9 + + vpkuwus v4,v4,v5 + vpkuwus v6,v6,v7 + vpkuhus v1,v4,v6 + + stvx v1,r9,r4 + addi r9,r9,16 + + bdnz L7 + + mtspr 256,r11 + blr + + +.globl _ppc_brightness_G5 +.align 3 +_ppc_brightness_G5: + +;; PowerPC Altivec G5 code + srwi r5,r5,2 + mtctr r5 + +;;vrsave + mfspr r11,256 + lis r12,0xCFFC + mtspr 256,r12 + + mflr r0 + bcl 20,31,"L00000000002$pb" +"L00000000002$pb": + mflr r10 + mtlr r0 + + addis r9,r10,ha16(vectorZERO-"L00000000002$pb") + addi r9,r9,lo16(vectorZERO-"L00000000002$pb") + + vxor v0,v0,v0 ;; V0 = NULL vector + + addi r9,r9,16 + lvx v10,0,r9 + addi r9,r9,16 + lvx v11,0,r9 + addi r9,r9,16 + lvx v12,0,r9 + addi r9,r9,16 + lvx v13,0,r9 + + addis r9,r10,ha16(vectortmpwork-"L00000000002$pb") + addi r9,r9,lo16(vectortmpwork-"L00000000002$pb") + stw r6,0(r9) + li r6,8 + stw r6,4(r9) + lvx v9,0,r9 + li r9,128 + vspltw v8,v9,0 + vspltw v9,v9,1 + +;; elt counter + li r9,0 + lis r7,0x0F01 + b L6 +.align 4 +L6: + lvx v1,r9,r3 + + vperm v4,v1,v0,v10 + ;********************* + add r10,r9,r3 + ;********************* + vperm v5,v1,v0,v11 + vperm v6,v1,v0,v12 + vperm v7,v1,v0,v13 + + vmulouh v4,v4,v8 + vmulouh v5,v5,v8 + vmulouh v6,v6,v8 + vmulouh v7,v7,v8 + vsrw v4,v4,v9 + vsrw v5,v5,v9 + vsrw v6,v6,v9 + vsrw v7,v7,v9 + + vpkuwus v4,v4,v5 + vpkuwus v6,v6,v7 + vpkuhus v1,v4,v6 + + stvx v1,r9,r4 + addi r9,r9,16 + + bdnz L6 + + mtspr 256,r11 + blr + + +.globl _ppc_brightness_generic +.align 3 +_ppc_brightness_generic: + lis r12,0x00FF + ori r12,r12,0x00FF + subi r3,r3,4 + subi r4,r4,4 + mtctr r5 + b L1 +.align 4 +L1: + lwzu r7,4(r3) + + rlwinm r8,r7,16,24,31 + rlwinm r9,r7,24,24,31 + mullw r8,r8,r6 + rlwinm r10,r7,0,24,31 + mullw r9,r9,r6 + srwi r8,r8,8 + mullw r10,r10,r6 + srwi r9,r9,8 + + rlwinm. r11,r8,0,0,23 + beq L2 + li r8,0xFF +L2: + srwi r10,r10,8 + rlwinm. r11,r9,0,0,23 + beq L3 + li r9,0xFF +L3: + rlwinm r7,r8,16,8,15 + rlwinm. r11,r10,0,0,23 + beq L4 + li r10,0xFF +L4: + rlwimi r7,r9,8,16,23 + rlwimi r7,r10,0,24,31 + + stwu r7,4(r4) + bdnz L1 + + blr + + + +.static_data +.align 4 +vectortmpwork: + .long 0,0,0,0 + diff --git a/veejay-server/libgoom/ppc_zoom_ultimate.h b/veejay-server/libgoom/ppc_zoom_ultimate.h new file mode 100644 index 00000000..d6932e7e --- /dev/null +++ b/veejay-server/libgoom/ppc_zoom_ultimate.h @@ -0,0 +1,14 @@ +/* + * ppc_zoom_ultimate.h + * Goom + * + * Created by Guillaume Borios on Sun Dec 28 2003. + * Copyright (c) 2003 iOS. All rights reserved. + * + */ + +/* Generic PowerPC Code */ +void ppc_zoom_generic (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]); + +/* G4 Specific PowerPC Code (Possible use of Altivec and Data Streams) */ +void ppc_zoom_G4 (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]); \ No newline at end of file diff --git a/veejay-server/libgoom/ppc_zoom_ultimate.s b/veejay-server/libgoom/ppc_zoom_ultimate.s new file mode 100644 index 00000000..da252c67 --- /dev/null +++ b/veejay-server/libgoom/ppc_zoom_ultimate.s @@ -0,0 +1,323 @@ +; PowerPC optimized zoom for Goom +; © 2001-2003 Guillaume Borios +; This Source Code is released under the terms of the General Public License + +; Change log : +; 21 Dec 2003 : Use of altivec is now determined with a parameter + +; Section definition : We use a read only section +.text + +; name of the function to call by C program : ppc_zoom +; We declare this label as a global to extend its scope outside this file +.globl _ppc_zoom_generic +.globl _ppc_zoom_G4 + +; Description : +; This routine dynamically computes and applies a zoom filter + +; parameters : +; r3 <=> unsigned int sizeX (in pixels) +; r4 <=> unsigned int sizeY (in pixels) +; r5 <=> unsigned int * frompixmap +; r6 <=> unsigned int * topixmap +; r7 <=> unsigned int * brutS +; r8 <=> unsigned int * brutD +; r9 <=> unsigned int buffratio +; r10 <=> int [16][16] precalccoeffs + +; globals after init +; r5 <=> frompixmap - 1 byte needed for preincremental fetch (replaces r5) +; r6 <=> topixmap - 1 byte needed for preincremental fetch (replaces r6) +; r3 <=> ax = x max in 16th of pixels (replaces old r3) +; r4 <=> ay = y max in 16th of pixels (replaces old r4) +; r20 <=> row size in bytes +; r12 <=> 0xFF00FF (mask for parallel 32 bits pixs computing) +; r30 <=> brutS - 1 byte needed for preincremental fetch (replaces r7) +; r31 <=> brutD - 1 byte needed for preincremental fetch (replaces r8) + +; ABI notes : +; r1 is the Stack Pointer (SP) => Do not use +; r13..r31 are non-volatiles => Do not use + +_ppc_zoom_generic: + +; Saves the used non volatile registers in the Mach-O stack s Red-Zone +stmw r18,-56(r1) + +; init +li r18,0 ; Default value if out of range : 0 (Black) +mr r11,r10 +lis r12,0xFF +mullw r2,r3,r4 ; Number of pixels to compute +subi r30,r8,0 +slwi r20,r3,2 +srawi r19,r20,2 +ori r12,r12,0xFF +subi r3,r3,1 +subi r4,r4,1 +mtspr ctr,r2 ; Init the loop count (one loop per pixel computed) +subi r31,r7,0 +subi r6,r6,4 +slwi r3,r3,4 +slwi r4,r4,4 + +;pre init for loop +lwz r2,0(r31) ; px +lwz r29,4(r31) ; py +lwz r8,0(r30) ; px2 +lwz r10,4(r30) ; py2 + +b L1 +.align 5 +L1: + +; computes dynamically the position to fetch +sub r8,r8,r2 +sub r10,r10,r29 +mullw r8,r8,r9 +addi r31,r31,8 +mullw r10,r10,r9 +addi r30,r30,8 + +srawi r8,r8,16 +srawi r10,r10,16 +add r2,r2,r8 +add r29,r29,r10 + +; if px>ax or py>ay goto outofrange +; computes the attenuation coeffs and the original point address +rlwinm r10,r2,6,28-6,31-6 ; r10 <- (r2 << 2) & 0x000002D0 (r10=(r2%16)*4*16) +cmpl cr4,0,r2,r3 +rlwimi r10, r29, 2, 28-2, 31-2 ; r10 <- ((r29 << 2) & 0x0000002D) | (r10 & !0x0000002D) (r10=(r10%16)*4 | r10) +cmpl cr7,0,r29,r4 +srawi r29,r29,4 ; pos computing +bge- cr4,L4 +srawi r2,r2,4 ; pos computing +mullw r29, r29,r19 ; pos computing +bge- cr7,L4 + +; Channels notation : 00112233 (AARRVVBB) + +add r2,r2,r29 ; pos computing +lwzx r10,r11,r10 ; Loads coefs +slwi r2,r2,2 ; pos computing +add r2,r2,r5 ; pos computing +rlwinm r21,r10,0,24,31 ; Isolates coef1 (??????11 -> 00000011) +lwz r25,0(r2) ; Loads col1 -> r25 +lwz r26,4(r2) ; Loads col2 -> r26 +rlwinm r22,r10,24,24,31 ; Isolates coef2 (????22?? -> 00000022) +rlwinm r23,r10,16,24,31 ; Isolates coef3 (??33???? -> 00000033) +add r2,r2,r20 ; Adds one line for future load of col3 and col4 +and r8, r25,r12 ; Masks col1 channels 1 & 3 : 0x00XX00XX +rlwinm r24,r10,8,24,31 ; Isolates coef4 (44?????? -> 00000044) +andi. r25,r25,0xFF00 ; Masks col1 channel 2 : 0x0000XX00 +mullw r8, r8, r21 ; Applies coef1 on col1 channels 1 & 3 + + +; computes final pixel color +and r10,r26,r12 ; Masks col2 channels 1 & 3 : 0x00XX00XX +lwz r27,0(r2) ; Loads col3 -> r27 +mullw r10,r10,r22 ; Applies coef2 on col2 channels 1 & 3 +mullw r25,r25,r21 ; Applies coef1 on col1 channel 2 +andi. r29,r26,0xFF00 ; Masks col2 channel 2 : 0x0000XX00 +mullw r29,r29,r22 ; Applies coef2 on col2 channel 2 +lwz r28,4(r2) ; Loads col4 -> r28 +add r8 ,r8 ,r10 ; Adds col1 & col2 channels 1 & 3 +and r10,r27,r12 ; Masks col3 channels 1 & 3 : 0x00XX00XX +add r25,r25,r29 ; Adds col1 & col2 channel 2 +mullw r10,r10,r23 ; Applies coef3 on col3 channels 1 & 3 +andi. r29,r27,0xFF00 ; Masks col3 channel 2 : 0x0000XX00 +mullw r29,r29,r23 ; Applies coef3 on col3 channel 2 +lwz r2,0(r31) ; px +add r7 ,r8 ,r10 ; Adds col3 to (col1 + col2) channels 1 & 3 +and r10,r28,r12 ; Masks col4 channels 1 & 3 : 0x00XX00XX +mullw r10,r10,r24 ; Applies coef4 on col4 channels 1 & 3 +add r25,r25,r29 ; Adds col 3 to (col1 + col2) channel 2 +lwz r8,0(r30) ; px2 +andi. r28,r28,0xFF00 ; Masks col4 channel 2 : 0x0000XX00 +add r7 ,r7 ,r10 ; Adds col4 to (col1 + col2 + col3) channels 1 & 3 +lwz r10,4(r30) ; py2 +mullw r28,r28,r24 ; Applies coef4 on col4 channel 2 +srawi r7, r7, 8 ; (sum of channels 1 & 3) >> 8 +lwz r29,4(r31) ; py +add r25,r25,r28 ; Adds col 4 to (col1 + col2 + col3) channel 2 +rlwimi r7, r25, 24, 16, 23 ; (((sum of channels 2) >> 8 ) & 0x0000FF00) | ((sum of channels 1 and 3) & 0xFFFF00FF) +stwu r7,4(r6) ; Stores the computed pixel +bdnz L1 ; Iterate again if needed +b L3 ;goto end ; If not, returns from the function + + +; if out of range +L4: +stwu r18,4(r6) +lwz r8,0(r30) ; px2 +lwz r10,4(r30) ; py2 +lwz r2,0(r31) ; px +lwz r29,4(r31) ; py +bdnz L1 + + +L3: + +; Restore saved registers and return +lmw r18,-56(r1) +blr + + + + + + + + +_ppc_zoom_G4: + +; Saves the used non volatile registers in the Mach-O stack s Red-Zone +stmw r17,-60(r1) + +; init +li r18,0 ; Default value if out of range : 0 (Black) +mr r11,r10 +lis r12,0xFF +mullw r2,r3,r4 ; Number of pixels to compute +subi r30,r8,0 +slwi r20,r3,2 +srawi r19,r20,2 +ori r12,r12,0xFF +subi r3,r3,1 +subi r4,r4,1 +mtspr ctr,r2 ; Init the loop count (one loop per pixel computed) +subi r31,r7,0 +subi r6,r6,4 +slwi r3,r3,4 +slwi r4,r4,4 + +;pre init for loop +lwz r2,0(r31) ; px +lwz r29,4(r31) ; py +lwz r8,0(r30) ; px2 +lwz r10,4(r30) ; py2 + +;********************* +lis r17,0x0F01 + +b L100 +.align 5 +L100: + +addi r6,r6,4 + +; Optimization to ensure the destination buffer +; won't be loaded into the data cache +rlwinm. r0,r6,0,27,31 +bne+ L500 +dcbz 0,r6 +;dcba 0,r6 +L500: + +; computes dynamically the position to fetch +;mullw r8,r8,r29 +;mullw r2,r2,r29 +;add r2,r8,r2 +;srawi r2,r2,17 + +sub r8,r8,r2 +sub r10,r10,r29 +mullw r8,r8,r9 +addi r31,r31,8 +mullw r10,r10,r9 +addi r30,r30,8 + +dst r30,r17,0 + +srawi r8,r8,16 +srawi r10,r10,16 +add r2,r2,r8 +add r29,r29,r10 + +dst r31,r17,1 + +; if px>ax or py>ay goto outofrange +; computes the attenuation coeffs and the original point address +rlwinm r10,r2,6,28-6,31-6 ; r10 <- (r2 << 2) & 0x000002D0 (r10=(r2%16)*4*16) +cmpl cr4,0,r2,r3 +rlwimi r10, r29, 2, 28-2, 31-2 ; r10 <- ((r29 << 2) & 0x0000002D) | (r10 & !0x0000002D) (r10=(r29%16)*4 | r10) +cmpl cr7,0,r29,r4 +srawi r29,r29,4 ; pos computing +bge- cr4,L400 +srawi r2,r2,4 ; pos computing +mullw r29, r29,r19 ; pos computing +bge- cr7,L400 + +; Channels notation : 00112233 (AARRVVBB) + +add r2,r2,r29 ; pos computing +lwzx r10,r11,r10 ; Loads coefs +slwi r2,r2,2 ; pos computing +add r2,r2,r5 ; pos computing +rlwinm r21,r10,0,24,31 ; Isolates coef1 (??????11 -> 00000011) +lwz r25,0(r2) ; Loads col1 -> r25 +lwz r26,4(r2) ; Loads col2 -> r26 +rlwinm r22,r10,24,24,31 ; Isolates coef2 (????22?? -> 00000022) +rlwinm r23,r10,16,24,31 ; Isolates coef3 (??33???? -> 00000033) +add r2,r2,r20 ; Adds one line for future load of col3 and col4 +and r8, r25,r12 ; Masks col1 channels 1 & 3 : 0x00XX00XX +rlwinm r24,r10,8,24,31 ; Isolates coef4 (44?????? -> 00000044) +dst r2,r17,2 +rlwinm r25,r25,0,16,23 ; Masks col1 channel 2 : 0x0000XX00 +;andi. r25,r25,0xFF00 ; Masks col1 channel 2 : 0x0000XX00 +mullw r8, r8, r21 ; Applies coef1 on col1 channels 1 & 3 + + +; computes final pixel color +and r10,r26,r12 ; Masks col2 channels 1 & 3 : 0x00XX00XX +lwz r27,0(r2) ; Loads col3 -> r27 +mullw r10,r10,r22 ; Applies coef2 on col2 channels 1 & 3 +mullw r25,r25,r21 ; Applies coef1 on col1 channel 2 +rlwinm r29,r26,0,16,23 ; Masks col2 channel 2 : 0x0000XX00 +;andi. r29,r26,0xFF00 ; Masks col2 channel 2 : 0x0000XX00 +mullw r29,r29,r22 ; Applies coef2 on col2 channel 2 +lwz r28,4(r2) ; Loads col4 -> r28 +add r8 ,r8 ,r10 ; Adds col1 & col2 channels 1 & 3 +and r10,r27,r12 ; Masks col3 channels 1 & 3 : 0x00XX00XX +add r25,r25,r29 ; Adds col1 & col2 channel 2 +mullw r10,r10,r23 ; Applies coef3 on col3 channels 1 & 3 +rlwinm r29,r27,0,16,23 ; Masks col3 channel 2 : 0x0000XX00 +;andi. r29,r27,0xFF00 ; Masks col3 channel 2 : 0x0000XX00 +mullw r29,r29,r23 ; Applies coef3 on col3 channel 2 +lwz r2,0(r31) ; px +add r7 ,r8 ,r10 ; Adds col3 to (col1 + col2) channels 1 & 3 +and r10,r28,r12 ; Masks col4 channels 1 & 3 : 0x00XX00XX +mullw r10,r10,r24 ; Applies coef4 on col4 channels 1 & 3 +add r25,r25,r29 ; Adds col 3 to (col1 + col2) channel 2 +lwz r8,0(r30) ; px2 +rlwinm r28,r28,0,16,23 ; Masks col4 channel 2 : 0x0000XX00 +;andi. r28,r28,0xFF00 ; Masks col4 channel 2 : 0x0000XX00 +add r7 ,r7 ,r10 ; Adds col4 to (col1 + col2 + col3) channels 1 & 3 +lwz r10,4(r30) ; py2 +mullw r28,r28,r24 ; Applies coef4 on col4 channel 2 +srawi r7, r7, 8 ; (sum of channels 1 & 3) >> 8 +lwz r29,4(r31) ; py +add r25,r25,r28 ; Adds col 4 to (col1 + col2 + col3) channel 2 +rlwimi r7, r25, 24, 16, 23 ; (((sum of channels 2) >> 8 ) & 0x0000FF00) | ((sum of channels 1 and 3) & 0xFFFF00FF) +stw r7,0(r6) ; Stores the computed pixel +bdnz L100 ; Iterate again if needed +b L300 ;goto end ; If not, returns from the function + + +; if out of range +L400: +stw r18,0(r6) +lwz r8,0(r30) ; px2 +lwz r10,4(r30) ; py2 +lwz r2,0(r31) ; px +lwz r29,4(r31) ; py +bdnz L100 + + +L300: + +; Restore saved registers and return +lmw r17,-60(r1) +blr diff --git a/veejay-server/libgoom/sound_tester.c b/veejay-server/libgoom/sound_tester.c new file mode 100644 index 00000000..ac50a11b --- /dev/null +++ b/veejay-server/libgoom/sound_tester.c @@ -0,0 +1,138 @@ +#include "sound_tester.h" + +#include +#include + +/* some constants */ +#define BIG_GOOM_DURATION 100 +#define BIG_GOOM_SPEED_LIMIT 0.1f + +#define ACCEL_MULT 0.95f +#define SPEED_MULT 0.99f + + +void evaluate_sound(gint16 data[2][512], SoundInfo *info) { + + int i; + float difaccel; + float prevspeed; + + /* find the max */ + int incvar = 0; + for (i = 0; i < 512; i+=2) { + if (incvar < data[0][i]) + incvar = data[0][i]; + } + + if (incvar > info->allTimesMax) + info->allTimesMax = incvar; + + /* volume sonore */ + info->volume = (float)incvar / (float)info->allTimesMax; + memcpy(info->samples[0],data[0],512*sizeof(short)); + memcpy(info->samples[1],data[1],512*sizeof(short)); + + difaccel = info->accelvar; + info->accelvar = info->volume; /* accel entre 0 et 1 */ + + /* transformations sur la vitesse du son */ + if (info->speedvar > 1.0f) + info->speedvar = 1.0f; + + if (info->speedvar < 0.1f) + info->accelvar *= (1.0f - (float)info->speedvar); + else if (info->speedvar < 0.3f) + info->accelvar *= (0.9f - (float)(info->speedvar-0.1f)/2.0f); + else + info->accelvar *= (0.8f - (float)(info->speedvar-0.3f)/4.0f); + + /* adoucissement de l'acceleration */ + info->accelvar *= ACCEL_MULT; + if (info->accelvar < 0) + info->accelvar = 0; + + difaccel = info->accelvar - difaccel; + if (difaccel < 0) + difaccel = - difaccel; + + /* mise a jour de la vitesse */ + prevspeed = info->speedvar; + info->speedvar = (info->speedvar + difaccel * 0.5f) / 2; + info->speedvar *= SPEED_MULT; + info->speedvar = (info->speedvar + 3.0f * prevspeed) / 4.0f; + if (info->speedvar < 0) + info->speedvar = 0; + if (info->speedvar > 1) + info->speedvar = 1; + + /* temps du goom */ + info->timeSinceLastGoom++; + info->timeSinceLastBigGoom++; + info->cycle++; + + /* detection des nouveaux gooms */ + if ((info->speedvar > (float)IVAL(info->biggoom_speed_limit_p)/100.0f) + && (info->accelvar > info->bigGoomLimit) + && (info->timeSinceLastBigGoom > BIG_GOOM_DURATION)) { + info->timeSinceLastBigGoom = 0; + } + + if (info->accelvar > info->goom_limit) { + /* TODO: tester && (info->timeSinceLastGoom > 20)) { */ + info->totalgoom ++; + info->timeSinceLastGoom = 0; + info->goomPower = info->accelvar - info->goom_limit; + } + + if (info->accelvar > info->prov_max) + info->prov_max = info->accelvar; + + if (info->goom_limit>1) + info->goom_limit=1; + + /* toute les 2 secondes : vrifier si le taux de goom est correct + * et le modifier sinon.. */ + if (info->cycle % 64 == 0) { + if (info->speedvar<0.01f) + info->goom_limit *= 0.91; + if (info->totalgoom > 4) { + info->goom_limit+=0.02; + } + if (info->totalgoom > 7) { + info->goom_limit*=1.03f; + info->goom_limit+=0.03; + } + if (info->totalgoom > 16) { + info->goom_limit*=1.05f; + info->goom_limit+=0.04; + } + if (info->totalgoom == 0) { + info->goom_limit = info->prov_max - 0.02; + } + if ((info->totalgoom == 1) && (info->goom_limit > 0.02)) + info->goom_limit-=0.01; + info->totalgoom = 0; + info->bigGoomLimit = info->goom_limit * (1.0f + (float)IVAL(info->biggoom_factor_p)/500.0f); + info->prov_max = 0; + } + + /* mise a jour des parametres pour la GUI */ + FVAL(info->volume_p) = info->volume; + info->volume_p.change_listener(&info->volume_p); + FVAL(info->speed_p) = info->speedvar * 4; + info->speed_p.change_listener(&info->speed_p); + FVAL(info->accel_p) = info->accelvar; + info->accel_p.change_listener(&info->accel_p); + + FVAL(info->goom_limit_p) = info->goom_limit; + info->goom_limit_p.change_listener(&info->goom_limit_p); + FVAL(info->goom_power_p) = info->goomPower; + info->goom_power_p.change_listener(&info->goom_power_p); + FVAL(info->last_goom_p) = 1.0-((float)info->timeSinceLastGoom/20.0f); + info->last_goom_p.change_listener(&info->last_goom_p); + FVAL(info->last_biggoom_p) = 1.0-((float)info->timeSinceLastBigGoom/40.0f); + info->last_biggoom_p.change_listener(&info->last_biggoom_p); + + /* bigGoomLimit ==goomLimit*9/8+7 ? */ + } + diff --git a/veejay-server/libgoom/sound_tester.h b/veejay-server/libgoom/sound_tester.h new file mode 100644 index 00000000..51545a80 --- /dev/null +++ b/veejay-server/libgoom/sound_tester.h @@ -0,0 +1,11 @@ +#ifndef _SOUND_TESTER_H +#define _SOUND_TESTER_H + +#include "goom_plugin_info.h" +#include "goom_config.h" + +/** change les donnees du SoundInfo */ +void evaluate_sound(gint16 data[2][512], SoundInfo *sndInfo); + +#endif + diff --git a/veejay-server/libgoom/surf3d.c b/veejay-server/libgoom/surf3d.c new file mode 100644 index 00000000..ba8c6909 --- /dev/null +++ b/veejay-server/libgoom/surf3d.c @@ -0,0 +1,107 @@ +#include "surf3d.h" +#include "goom_plugin_info.h" +#include +#include +#include + +grid3d *grid3d_new (int sizex, int defx, int sizez, int defz, v3d center) { + int x = defx; + int y = defz; + grid3d *g = malloc (sizeof(grid3d)); + surf3d *s = &(g->surf); + s->nbvertex = x*y; + s->vertex = malloc (x*y*sizeof(v3d)); + s->svertex = malloc (x*y*sizeof(v3d)); + s->center = center; + + g->defx=defx; + g->sizex=sizex; + g->defz=defz; + g->sizez=sizez; + g->mode=0; + + while (y) { + --y; + x = defx; + while (x) { + --x; + s->vertex[x+defx*y].x = (float)(x-defx/2)*sizex/defx; + s->vertex[x+defx*y].y = 0; + s->vertex[x+defx*y].z = (float)(y-defz/2)*sizez/defz; + } + } + return g; +} + +void grid3d_draw (PluginInfo *plug, grid3d *g, int color, int colorlow, + int dist, Pixel *buf, Pixel *back, int W,int H) { + + int x; + v2d v2,v2x; + + v2d *v2_array = malloc(g->surf.nbvertex * sizeof(v2d)); + v3d_to_v2d(g->surf.svertex, g->surf.nbvertex, W, H, dist, v2_array); + + for (x=0;xdefx;x++) { + int z; + v2x = v2_array[x]; + + for (z=1;zdefz;z++) { + v2 = v2_array[z*g->defx + x]; + if (((v2.x != -666) || (v2.y!=-666)) + && ((v2x.x != -666) || (v2x.y!=-666))) { + plug->methods.draw_line (buf,v2x.x,v2x.y,v2.x,v2.y, colorlow, W, H); + plug->methods.draw_line (back,v2x.x,v2x.y,v2.x,v2.y, color, W, H); + } + v2x = v2; + } + } + + free(v2_array); +} + +void surf3d_rotate (surf3d *s, float angle) { + int i; + float cosa; + float sina; + SINCOS(angle,sina,cosa); + for (i=0;inbvertex;i++) { + Y_ROTATE_V3D(s->vertex[i],s->svertex[i],cosa,sina); + } +} + +void surf3d_translate (surf3d *s) { + int i; + for (i=0;inbvertex;i++) { + TRANSLATE_V3D(s->center,s->svertex[i]); + } +} + +void grid3d_update (grid3d *g, float angle, float *vals, float dist) { + int i; + float cosa; + float sina; + surf3d *s = &(g->surf); + v3d cam = s->center; + cam.z += dist; + + SINCOS((angle/4.3f),sina,cosa); + cam.y += sina*2.0f; + SINCOS(angle,sina,cosa); + + if (g->mode==0) { + if (vals) + for (i=0;idefx;i++) + s->vertex[i].y = s->vertex[i].y*0.2 + vals[i]*0.8; + + for (i=g->defx;inbvertex;i++) { + s->vertex[i].y *= 0.255f; + s->vertex[i].y += (s->vertex[i-g->defx].y * 0.777f); + } + } + + for (i=0;inbvertex;i++) { + Y_ROTATE_V3D(s->vertex[i],s->svertex[i],cosa,sina); + TRANSLATE_V3D(cam,s->svertex[i]); + } +} diff --git a/veejay-server/libgoom/surf3d.h b/veejay-server/libgoom/surf3d.h new file mode 100644 index 00000000..482b6a09 --- /dev/null +++ b/veejay-server/libgoom/surf3d.h @@ -0,0 +1,38 @@ +#ifndef _SURF3D_H +#define _SURF3D_H + +#include "v3d.h" +#include "goom_graphic.h" +#include "goom_typedefs.h" + +typedef struct { + v3d *vertex; + v3d *svertex; + int nbvertex; + + v3d center; +} surf3d; + +typedef struct { + surf3d surf; + + int defx; + int sizex; + int defz; + int sizez; + int mode; +} grid3d; + +/* hi-level */ + +/* works on grid3d */ +grid3d *grid3d_new (int sizex, int defx, int sizez, int defz, v3d center); +void grid3d_update (grid3d *s, float angle, float *vals, float dist); + +/* low level */ +void surf3d_draw (surf3d *s, int color, int dist, int *buf, int *back, int W,int H); +void grid3d_draw (PluginInfo *plug, grid3d *g, int color, int colorlow, int dist, Pixel *buf, Pixel *back, int W,int H); +void surf3d_rotate (surf3d *s, float angle); +void surf3d_translate (surf3d *s); + +#endif diff --git a/veejay-server/libgoom/surf3d.s b/veejay-server/libgoom/surf3d.s new file mode 100644 index 00000000..f8c8c5d4 --- /dev/null +++ b/veejay-server/libgoom/surf3d.s @@ -0,0 +1,484 @@ + .file "surf3d.c" + .version "01.01" +gcc2_compiled.: +.text + .align 4 +.globl grid3d_new + .type grid3d_new,@function +grid3d_new: + pushl %ebp + movl %esp,%ebp + subl $44,%esp + pushl %edi + pushl %esi + pushl %ebx + movl 20(%ebp),%eax + movl 12(%ebp),%esi + movl %eax,-8(%ebp) + addl $-12,%esp + pushl $44 + call malloc + movl %esi,%edx + imull -8(%ebp),%edx + movl %eax,%edi + movl %edx,-12(%ebp) + leal (%edx,%edx,2),%ebx + movl %edx,8(%edi) + addl $-12,%esp + sall $2,%ebx + pushl %ebx + call malloc + addl $32,%esp + movl %eax,(%edi) + addl $-12,%esp + pushl %ebx + call malloc + movl %eax,4(%edi) + movl 24(%ebp),%eax + movl %eax,12(%edi) + movl 28(%ebp),%eax + movl %eax,16(%edi) + movl 32(%ebp),%eax + movl %eax,20(%edi) + movl 8(%ebp),%eax + movl %eax,28(%edi) + movl %esi,24(%edi) + movl -8(%ebp),%edx + movl 16(%ebp),%eax + movl %edx,32(%edi) + movl %eax,36(%edi) + movl $0,40(%edi) + testl %edx,%edx + je .L480 + movl %esi,%eax + movl %esi,-28(%ebp) + shrl $31,%eax + addl %eax,%esi + movl -8(%ebp),%eax + shrl $31,%eax + addl -8(%ebp),%eax + movl -12(%ebp),%edx + sarl $1,%eax + movl %edx,-24(%ebp) + negl -28(%ebp) + movl %esi,-16(%ebp) + movl %eax,-20(%ebp) + .p2align 4,,7 +.L481: + movl -28(%ebp),%eax + addl %eax,-24(%ebp) + decl -8(%ebp) + movl 12(%ebp),%esi + testl %esi,%esi + je .L479 + movl -8(%ebp),%eax + subl -20(%ebp),%eax + movl %eax,-4(%ebp) + fildl -4(%ebp) + movl %esi,-4(%ebp) + movl -24(%ebp),%edx + leal (%edx,%esi),%eax + movl -16(%ebp),%ebx + fildl 16(%ebp) + leal (%eax,%eax,2),%eax + sarl $1,%ebx + leal 0(,%eax,4),%ecx + fmulp %st,%st(1) + fildl 20(%ebp) + fdivrp %st,%st(1) + fildl 8(%ebp) + fildl -4(%ebp) + jmp .L484 +.L487: + fxch %st(2) + .p2align 4,,7 +.L484: + decl %esi + movl %esi,%eax + movl (%edi),%edx + subl %ebx,%eax + movl %eax,-4(%ebp) + fildl -4(%ebp) + addl $-12,%ecx + fmul %st(2),%st + fdiv %st(1),%st + fstps (%edx,%ecx) + fxch %st(2) + movl (%edi),%eax + movl $0,4(%eax,%ecx) + movl (%edi),%eax + fsts 8(%eax,%ecx) + testl %esi,%esi + jne .L487 + fstp %st(0) + fstp %st(0) + fstp %st(0) +.L479: + cmpl $0,-8(%ebp) + jne .L481 +.L480: + leal -56(%ebp),%esp + popl %ebx + movl %edi,%eax + popl %esi + popl %edi + leave + ret +.Lfe1: + .size grid3d_new,.Lfe1-grid3d_new +.section .rodata + .align 8 +.LC48: + .long 0x0,0x3fe00000 + .align 4 +.LC49: + .long 0x3f19999a + .align 4 +.LC50: + .long 0x3ee3d70a +.text + .align 4 +.globl grid3d_update + .type grid3d_update,@function +grid3d_update: + pushl %ebp + movl %esp,%ebp + subl $32,%esp + pushl %esi + pushl %ebx + flds 12(%ebp) + movl 8(%ebp),%ebx + movl 16(%ebp),%ecx + fld %st(0) +#APP + fsin +#NO_APP + fstps -4(%ebp) + flds -4(%ebp) + fxch %st(1) +#APP + fcos +#NO_APP + fstps -4(%ebp) + flds -4(%ebp) + cmpl $0,40(%ebx) + jne .L519 + testl %ecx,%ecx + je .L520 + xorl %esi,%esi + cmpl 24(%ebx),%esi + jge .L520 + fldl .LC48 + xorl %edx,%edx + .p2align 4,,7 +.L524: + movl (%ebx),%eax + fld %st(0) + fld %st(1) + fxch %st(1) + fmuls 4(%eax,%edx) + fxch %st(1) + fmuls (%ecx,%esi,4) + faddp %st,%st(1) + incl %esi + fstps 4(%eax,%edx) + addl $12,%edx + cmpl 24(%ebx),%esi + jl .L524 + fstp %st(0) +.L520: + movl 24(%ebx),%esi + cmpl 8(%ebx),%esi + jge .L519 + leal (%esi,%esi,2),%eax + flds .LC49 + flds .LC50 + leal 0(,%eax,4),%ecx + .p2align 4,,7 +.L529: + movl (%ebx),%eax + flds 4(%eax,%ecx) + fmul %st(2),%st + fstps 4(%eax,%ecx) + movl %esi,%eax + subl 24(%ebx),%eax + movl (%ebx),%edx + leal (%eax,%eax,2),%eax + flds 4(%edx,%eax,4) + fmul %st(1),%st + fadds 4(%edx,%ecx) + incl %esi + fstps 4(%edx,%ecx) + addl $12,%ecx + cmpl 8(%ebx),%esi + jl .L529 + fstp %st(0) + fstp %st(0) +.L519: + xorl %esi,%esi + cmpl 8(%ebx),%esi + jge .L536 + xorl %ecx,%ecx + .p2align 4,,7 +.L534: + movl (%ebx),%eax + flds (%eax,%ecx) + flds 8(%eax,%ecx) + fmul %st(2),%st + fxch %st(1) + fmul %st(3),%st + fsubp %st,%st(1) + movl 4(%ebx),%edx + incl %esi + fstps (%edx,%ecx) + movl (%ebx),%eax + flds (%eax,%ecx) + flds 8(%eax,%ecx) + fxch %st(1) + fmul %st(2),%st + fxch %st(1) + fmul %st(3),%st + faddp %st,%st(1) + movl 4(%ebx),%edx + fstps 8(%edx,%ecx) + movl (%ebx),%eax + flds 4(%eax,%ecx) + movl 4(%ebx),%edx + fstps 4(%edx,%ecx) + movl 4(%ebx),%eax + flds (%eax,%ecx) + fadds 12(%ebx) + fstps (%eax,%ecx) + movl 4(%ebx),%eax + flds 4(%eax,%ecx) + fadds 16(%ebx) + fstps 4(%eax,%ecx) + movl 4(%ebx),%eax + flds 8(%eax,%ecx) + fadds 20(%ebx) + fstps 8(%eax,%ecx) + addl $12,%ecx + cmpl 8(%ebx),%esi + jl .L534 +.L536: + fstp %st(0) + fstp %st(0) + popl %ebx + popl %esi + leave + ret +.Lfe2: + .size grid3d_update,.Lfe2-grid3d_update +.section .rodata + .align 4 +.LC51: + .long 0x40000000 + .align 8 +.LC52: + .long 0x0,0x42380000 +.text + .align 4 +.globl surf3d_draw + .type surf3d_draw,@function +surf3d_draw: + pushl %ebp + movl %esp,%ebp + subl $60,%esp + pushl %edi + pushl %esi + pushl %ebx + movl $0,-20(%ebp) + movl -20(%ebp),%edx + movl 8(%ebp),%eax + cmpl 8(%eax),%edx + jge .L493 + fldl .LC52 + flds .LC51 + xorl %edi,%edi + .p2align 4,,7 +.L495: + movl 8(%ebp),%eax + movl 4(%eax),%eax + movl %eax,-36(%ebp) + fcoms 8(%eax,%edi) + fnstsw %ax + andb $69,%ah + cmpb $1,%ah + jne .L496 + fildl 16(%ebp) + movl -36(%ebp),%edx + fld %st(0) + fmuls (%edx,%edi) + fdivs 8(%edx,%edi) + fld %st(3) + faddp %st,%st(1) + fstpl -32(%ebp) + movl -32(%ebp),%eax + movl -28(%ebp),%edx + movl %eax,-40(%ebp) + sarl $16,-40(%ebp) + movl -36(%ebp),%edx + fmuls 4(%edx,%edi) + fdivs 8(%edx,%edi) + movl -40(%ebp),%ecx + fld %st(2) + faddp %st,%st(1) + fstpl -32(%ebp) + movl -32(%ebp),%eax + movl -28(%ebp),%edx + movl %eax,-44(%ebp) + movl 28(%ebp),%eax + sarl $1,%eax + addl %eax,%ecx + movl 32(%ebp),%eax + sarl $16,-44(%ebp) + sarl $1,%eax + movl %ecx,%ebx + subl -44(%ebp),%eax + movl %eax,%esi + cmpl 28(%ebp),%ebx + jge .L496 + testl %ecx,%ecx + jl .L496 + cmpl 32(%ebp),%esi + jge .L496 + testl %eax,%eax + jge .L499 +.L496: + xorl %esi,%esi + xorl %ebx,%ebx +.L499: + movl 20(%ebp),%eax + movl %ebx,%edx + leal (%eax,%edx,4),%edx + movl 28(%ebp),%eax + imull %esi,%eax + leal (%edx,%eax,4),%eax + testl %ebx,%ebx + je .L494 + testl %esi,%esi + je .L494 +#APP + movd (%eax), %mm0 + paddusb 12(%ebp), %mm0 + movd %mm0, (%eax) +#NO_APP +.L494: + incl -20(%ebp) + addl $12,%edi + movl -20(%ebp),%eax + movl 8(%ebp),%edx + cmpl 8(%edx),%eax + jl .L495 + fstp %st(0) + fstp %st(0) +.L493: + popl %ebx + popl %esi + popl %edi + leave + ret +.Lfe3: + .size surf3d_draw,.Lfe3-surf3d_draw + .align 4 +.globl surf3d_rotate + .type surf3d_rotate,@function +surf3d_rotate: + pushl %ebp + movl %esp,%ebp + subl $32,%esp + pushl %esi + pushl %ebx + flds 12(%ebp) + movl 8(%ebp),%ebx + fld %st(0) +#APP + fsin +#NO_APP + fstps -4(%ebp) + flds -4(%ebp) + fxch %st(1) +#APP + fcos +#NO_APP + fstps -4(%ebp) + xorl %esi,%esi + flds -4(%ebp) + cmpl 8(%ebx),%esi + jge .L537 + xorl %ecx,%ecx + .p2align 4,,7 +.L508: + movl (%ebx),%eax + flds (%eax,%ecx) + flds 8(%eax,%ecx) + fmul %st(2),%st + fxch %st(1) + fmul %st(3),%st + fsubp %st,%st(1) + movl 4(%ebx),%edx + incl %esi + fstps (%edx,%ecx) + movl (%ebx),%eax + flds (%eax,%ecx) + flds 8(%eax,%ecx) + fxch %st(1) + fmul %st(2),%st + fxch %st(1) + fmul %st(3),%st + faddp %st,%st(1) + movl 4(%ebx),%edx + fstps 8(%edx,%ecx) + movl (%ebx),%eax + flds 4(%eax,%ecx) + movl 4(%ebx),%edx + fstps 4(%edx,%ecx) + addl $12,%ecx + cmpl 8(%ebx),%esi + jl .L508 +.L537: + fstp %st(0) + fstp %st(0) + popl %ebx + popl %esi + leave + ret +.Lfe4: + .size surf3d_rotate,.Lfe4-surf3d_rotate + .align 4 +.globl surf3d_translate + .type surf3d_translate,@function +surf3d_translate: + pushl %ebp + movl %esp,%ebp + pushl %ebx + movl 8(%ebp),%ecx + xorl %ebx,%ebx + cmpl 8(%ecx),%ebx + jge .L512 + xorl %edx,%edx + .p2align 4,,7 +.L514: + movl 4(%ecx),%eax + flds (%eax,%edx) + fadds 12(%ecx) + incl %ebx + fstps (%eax,%edx) + movl 4(%ecx),%eax + flds 4(%eax,%edx) + fadds 16(%ecx) + fstps 4(%eax,%edx) + movl 4(%ecx),%eax + flds 8(%eax,%edx) + fadds 20(%ecx) + fstps 8(%eax,%edx) + addl $12,%edx + cmpl 8(%ecx),%ebx + jl .L514 +.L512: + popl %ebx + leave + ret +.Lfe5: + .size surf3d_translate,.Lfe5-surf3d_translate + .ident "GCC: (GNU) 2.95.3 19991030 (prerelease)" diff --git a/veejay-server/libgoom/tentacle3d.c b/veejay-server/libgoom/tentacle3d.c new file mode 100644 index 00000000..26b9d425 --- /dev/null +++ b/veejay-server/libgoom/tentacle3d.c @@ -0,0 +1,290 @@ +#include + +#include "v3d.h" +#include "surf3d.h" +#include "goom_tools.h" +#include "goom_config.h" +#include "goom_plugin_info.h" +#include "tentacle3d.h" + +#define D 256.0f + +#define nbgrid 6 +#define definitionx 15 +#define definitionz 45 + +typedef struct _TENTACLE_FX_DATA { + PluginParam enabled_bp; + PluginParameters params; + + float cycle; + grid3d *grille[nbgrid]; + float *vals; + +#define NB_TENTACLE_COLORS 4 + int colors[NB_TENTACLE_COLORS]; + + int col; + int dstcol; + float lig; + float ligs; + + /* statics from pretty_move */ + float distt; + float distt2; + float rot; /* entre 0 et 2 * M_PI */ + int happens; + int rotation; + int lock; +} TentacleFXData; + +static void tentacle_new (TentacleFXData *data); +static void tentacle_update(PluginInfo *goomInfo, Pixel *buf, Pixel *back, int W, int H, + short[2][512], float, int drawit, TentacleFXData *data); +static void tentacle_free (TentacleFXData *data); + +/* + * VisualFX wrapper for the tentacles + */ + +static void tentacle_fx_init(VisualFX *_this, PluginInfo *info) { + + TentacleFXData *data = (TentacleFXData*)malloc(sizeof(TentacleFXData)); + + data->enabled_bp = secure_b_param("Enabled", 1); + data->params = plugin_parameters ("3D Tentacles", 1); + data->params.params[0] = &data->enabled_bp; + + data->cycle = 0.0f; + data->col = (0x28<<(ROUGE*8))|(0x2c<<(VERT*8))|(0x5f<<(BLEU*8)); + data->dstcol = 0; + data->lig = 1.15f; + data->ligs = 0.1f; + + data->distt = 10.0f; + data->distt2 = 0.0f; + data->rot = 0.0f; /* entre 0 et 2 * M_PI */ + data->happens = 0; + + data->rotation = 0; + data->lock = 0; + data->colors[0] = (0x18<<(ROUGE*8))|(0x4c<<(VERT*8))|(0x2f<<(BLEU*8)); + data->colors[1] = (0x48<<(ROUGE*8))|(0x2c<<(VERT*8))|(0x6f<<(BLEU*8)); + data->colors[2] = (0x58<<(ROUGE*8))|(0x3c<<(VERT*8))|(0x0f<<(BLEU*8)); + data->colors[3] = (0x87<<(ROUGE*8))|(0x55<<(VERT*8))|(0x74<<(BLEU*8)); + tentacle_new(data); + + _this->params = &data->params; + _this->fx_data = (void*)data; +} + +static void tentacle_fx_apply(VisualFX *_this, Pixel *src, Pixel *dest, PluginInfo *goomInfo) +{ + TentacleFXData *data = (TentacleFXData*)_this->fx_data; + if (BVAL(data->enabled_bp)) { + tentacle_update(goomInfo, dest, src, goomInfo->screen.width, + goomInfo->screen.height, goomInfo->sound.samples, + (float)goomInfo->sound.accelvar, + goomInfo->curGState->drawTentacle, data); + } +} + +static void tentacle_fx_free(VisualFX *_this) { + tentacle_free((TentacleFXData*)_this->fx_data); + free(_this->fx_data); +} + +VisualFX tentacle_fx_create(void) { + VisualFX fx; + fx.init = tentacle_fx_init; + fx.apply = tentacle_fx_apply; + fx.free = tentacle_fx_free; + return fx; +} + +/* ----- */ + +static void tentacle_free (TentacleFXData *data) { + /* TODO : un vrai FREE GRID!! */ + free (data->vals); +} + +static void tentacle_new (TentacleFXData *data) { + int tmp; + + v3d center = {0,-17.0,0}; + data->vals = (float*)malloc ((definitionx+20)*sizeof(float)); + + for (tmp=0;tmpgrille[tmp] = grid3d_new (x, definitionx, z, definitionz + rand() % 10, center); + center.y += 8; + } +} + +static inline unsigned char lighten (unsigned char value, float power) +{ + int val = value; + float t = (float) val * log10(power) / 2.0; + + if (t > 0) { + val = (int) t; /* (32.0f * log (t)); */ + if (val > 255) + val = 255; + if (val < 0) + val = 0; + return val; + } + else { + return 0; + } +} + +static void lightencolor (int *col, float power) +{ + unsigned char *color; + + color = (unsigned char *) col; + *color = lighten (*color, power); + color++; + *color = lighten (*color, power); + color++; + *color = lighten (*color, power); + color++; + *color = lighten (*color, power); +} + +/* retourne x>>s , en testant le signe de x */ +#define ShiftRight(_x,_s) ((_x<0) ? -(-_x>>_s) : (_x>>_s)) + +static int evolutecolor (unsigned int src,unsigned int dest, + unsigned int mask, unsigned int incr) { + + int color = src & (~mask); + src &= mask; + dest &= mask; + + if ((src!=mask) + &&(srcdest) + src -= incr; + return (src&mask)|color; +} + +static void pretty_move (PluginInfo *goomInfo, float cycle, float *dist, float *dist2, float *rotangle, TentacleFXData *fx_data) { + + float tmp; + + /* many magic numbers here... I don't really like that. */ + if (fx_data->happens) + fx_data->happens -= 1; + else if (fx_data->lock == 0) { + fx_data->happens = goom_irand(goomInfo->gRandom,200)?0:100+goom_irand(goomInfo->gRandom,60); + fx_data->lock = fx_data->happens * 3 / 2; + } + else fx_data->lock --; + + tmp = fx_data->happens?8.0f:0; + *dist2 = fx_data->distt2 = (tmp + 15.0f*fx_data->distt2)/16.0f; + + tmp = 30+D-90.0f*(1.0f+sin(cycle*19/20)); + if (fx_data->happens) + tmp *= 0.6f; + + *dist = fx_data->distt = (tmp + 3.0f*fx_data->distt)/4.0f; + + if (!fx_data->happens){ + tmp = M_PI*sin(cycle)/32+3*M_PI/2; + } + else { + fx_data->rotation = goom_irand(goomInfo->gRandom,500)?fx_data->rotation:goom_irand(goomInfo->gRandom,2); + if (fx_data->rotation) + cycle *= 2.0f*M_PI; + else + cycle *= -1.0f*M_PI; + tmp = cycle - (M_PI*2.0) * floor(cycle/(M_PI*2.0)); + } + + if (abs(tmp-fx_data->rot) > abs(tmp-(fx_data->rot+2.0*M_PI))) { + fx_data->rot = (tmp + 15.0f*(fx_data->rot+2*M_PI)) / 16.0f; + if (fx_data->rot>2.0*M_PI) + fx_data->rot -= 2.0*M_PI; + *rotangle = fx_data->rot; + } + else if (abs(tmp-fx_data->rot) > abs(tmp-(fx_data->rot-2.0*M_PI))) { + fx_data->rot = (tmp + 15.0f*(fx_data->rot-2.0*M_PI)) / 16.0f; + if (fx_data->rot<0.0f) + fx_data->rot += 2.0*M_PI; + *rotangle = fx_data->rot; + } + else + *rotangle = fx_data->rot = (tmp + 15.0f*fx_data->rot) / 16.0f; +} + +static void tentacle_update(PluginInfo *goomInfo, Pixel *buf, Pixel *back, int W, int H, + short data[2][512], float rapport, int drawit, TentacleFXData *fx_data) { + + int tmp; + int tmp2; + + int color; + int colorlow; + + float dist,dist2,rotangle; + + if ((!drawit) && (fx_data->ligs>0.0f)) + fx_data->ligs = -fx_data->ligs; + + fx_data->lig += fx_data->ligs; + + if (fx_data->lig > 1.01f) { + if ((fx_data->lig>10.0f) | (fx_data->lig<1.1f)) fx_data->ligs = -fx_data->ligs; + + if ((fx_data->lig<6.3f)&&(goom_irand(goomInfo->gRandom,30)==0)) + fx_data->dstcol=goom_irand(goomInfo->gRandom,NB_TENTACLE_COLORS); + + fx_data->col = evolutecolor(fx_data->col,fx_data->colors[fx_data->dstcol],0xff,0x01); + fx_data->col = evolutecolor(fx_data->col,fx_data->colors[fx_data->dstcol],0xff00,0x0100); + fx_data->col = evolutecolor(fx_data->col,fx_data->colors[fx_data->dstcol],0xff0000,0x010000); + fx_data->col = evolutecolor(fx_data->col,fx_data->colors[fx_data->dstcol],0xff000000,0x01000000); + + color = fx_data->col; + colorlow = fx_data->col; + + lightencolor(&color,fx_data->lig * 2.0f + 2.0f); + lightencolor(&colorlow,(fx_data->lig/3.0f)+0.67f); + + rapport = 1.0f + 2.0f * (rapport - 1.0f); + rapport *= 1.2f; + if (rapport > 1.12f) + rapport = 1.12f; + + pretty_move (goomInfo, fx_data->cycle, &dist, &dist2, &rotangle, fx_data); + + for (tmp=0;tmpgRandom,511)],10)) * rapport; + fx_data->vals[tmp2] = val; + } + + grid3d_update (fx_data->grille[tmp], rotangle, fx_data->vals, dist2); + } + fx_data->cycle+=0.01f; + for (tmp=0;tmpgrille[tmp],color,colorlow,dist,buf,back,W,H); + } + else { + fx_data->lig = 1.05f; + if (fx_data->ligs < 0.0f) + fx_data->ligs = -fx_data->ligs; + pretty_move (goomInfo, fx_data->cycle, &dist, &dist2, &rotangle, fx_data); + fx_data->cycle+=0.1f; + if (fx_data->cycle > 1000) + fx_data->cycle = 0; + } +} diff --git a/veejay-server/libgoom/tentacle3d.h b/veejay-server/libgoom/tentacle3d.h new file mode 100644 index 00000000..ad0858fa --- /dev/null +++ b/veejay-server/libgoom/tentacle3d.h @@ -0,0 +1,8 @@ +#ifndef _TENTACLE3D_H +#define _TENTACLE3D_H + +#include "goom_visual_fx.h" + +VisualFX tentacle_fx_create(void); + +#endif diff --git a/veejay-server/libgoom/v3d.c b/veejay-server/libgoom/v3d.c new file mode 100644 index 00000000..1614e8af --- /dev/null +++ b/veejay-server/libgoom/v3d.c @@ -0,0 +1,15 @@ +#include "v3d.h" + +void v3d_to_v2d(v3d *v3, int nbvertex, int width, int height, float distance, v2d *v2) { + int i; + for (i=0;i 2) { + int Xp, Yp; + F2I((distance * v3[i].x / v3[i].z),Xp); + F2I((distance * v3[i].y / v3[i].z),Yp); + v2[i].x = Xp + (width>>1); + v2[i].y = -Yp + (height>>1); + } + else v2[i].x=v2[i].y=-666; + } +} diff --git a/veejay-server/libgoom/v3d.h b/veejay-server/libgoom/v3d.h new file mode 100644 index 00000000..7690847f --- /dev/null +++ b/veejay-server/libgoom/v3d.h @@ -0,0 +1,65 @@ +#ifndef _V3D_H +#define _V3D_H + +#include +#include +#include + +#include "mathtools.h" + +typedef struct { + float x,y,z; +} v3d; + +typedef struct { + int x,y; +} v2d; + +typedef struct { + double x,y; +} v2g; + +/* + * projete le vertex 3D sur le plan d'affichage + * retourne (0,0) si le point ne doit pas etre affiche. + * + * bonne valeur pour distance : 256 + */ +#define V3D_TO_V2D(v3,v2,width,height,distance) \ +{ \ + int Xp, Yp; \ + if (v3.z > 2) { \ + F2I((distance * v3.x / v3.z),Xp) ; \ + F2I((distance * v3.y / v3.z),Yp) ; \ + v2.x = Xp + (width>>1); \ + v2.y = -Yp + (height>>1); \ + } \ + else v2.x=v2.y=-666; \ +} + +void v3d_to_v2d(v3d *src, int nbvertex, int width, int height, float distance, v2d *v2_array); + +/* + * rotation selon Y du v3d vi d'angle a (cosa=cos(a), sina=sin(a)) + * centerz = centre de rotation en z + */ +#define Y_ROTATE_V3D(vi,vf,sina,cosa)\ +{\ + vf.x = vi.x * cosa - vi.z * sina;\ + vf.z = vi.x * sina + vi.z * cosa;\ + vf.y = vi.y;\ +} + +/* + * translation + */ +#define TRANSLATE_V3D(vsrc,vdest)\ +{\ + vdest.x += vsrc.x;\ + vdest.y += vsrc.y;\ + vdest.z += vsrc.z;\ +} + +#define MUL_V3D(lf,v) {v.x*=lf;v.y*=lf;v.z*=lf;} + +#endif diff --git a/veejay-server/libgoom/xmmx.c b/veejay-server/libgoom/xmmx.c new file mode 100644 index 00000000..9c97b1ed --- /dev/null +++ b/veejay-server/libgoom/xmmx.c @@ -0,0 +1,393 @@ + +#ifdef HAVE_MMX + +/* a definir pour avoir exactement le meme resultat que la fonction C + * (un chouillat plus lent).. mais la difference est assez peu notable. + */ +// #define STRICT_COMPAT + +#define BUFFPOINTNB 16 +#define BUFFPOINTMASK 0xffff +#define BUFFINCR 0xff + +#define sqrtperte 16 +/* faire : a % sqrtperte <=> a & pertemask*/ +#define PERTEMASK 0xf +/* faire : a / sqrtperte <=> a >> PERTEDEC*/ +#define PERTEDEC 4 + + +/*#define MMX_TRACE*/ +#include "mmx.h" +/*#include "xmmx.h"*/ +#include "goom_graphic.h" + +int xmmx_supported (void) { + return (mm_support()&0x8)>>3; +} + +void zoom_filter_xmmx (int prevX, int prevY, + Pixel *expix1, Pixel *expix2, + int *lbruS, int *lbruD, int buffratio, + int precalCoef[16][16]) +{ + int bufsize = prevX * prevY; /* taille du buffer */ + volatile int loop; /* variable de boucle */ + + mmx_t *brutS = (mmx_t*)lbruS; /* buffer de transformation source */ + mmx_t *brutD = (mmx_t*)lbruD; /* buffer de transformation dest */ + + volatile mmx_t prevXY; + volatile mmx_t ratiox; + /* volatile mmx_t interpix; */ + + expix1[0].val=expix1[prevX-1].val=expix1[prevX*prevY-1].val=expix1[prevX*prevY-prevX].val=0; + + prevXY.ud[0] = (prevX-1)<> 16 */ + + "#1 \n\t paddd %%mm1, %%mm0" /* mm0 = S + mm1 */ + "#1 \n\t psrld $16, %%mm0" + : + : [brutS]"g"(brutS[loop]) + , [brutD]"g"(brutD[loop]) + ); /* mm0 = S */ + + /* + * pre : mm0 : position vector on screen + * prevXY : coordinate of the lower-right point on screen + * post : clipped mm0 + * modified : mm0,mm1,mm2 + */ + asm volatile + ("#1 \n\t movq %[prevXY], %%mm1" + "#1 \n\t pcmpgtd %%mm0, %%mm1" + /* mm0 en X contient (idem pour Y) : + * 1111 si prevXY > px + * 0000 si prevXY <= px */ +#ifdef STRICT_COMPAT + "#1 \n\t movq %%mm1, %%mm2" + "#1 \n\t punpckhdq %%mm2, %%mm2" + "#1 \n\t punpckldq %%mm1, %%mm1" + "#1 \n\t pand %%mm2, %%mm0" +#endif + + "#1 \n\t pand %%mm1, %%mm0" /* on met a zero la partie qui deborde */ + ::[prevXY]"m"(prevXY)); + + /* Thread #2 + * pre : mm0 : clipped position on screen + * + * post : mm3 : coefs for this position + * mm1 : X vector [0|X] + * + * modif : eax,esi + */ + __asm__ __volatile__ ( + "#2 \n\t movd %%mm0,%%esi" + "#2 \n\t movq %%mm0,%%mm1" + + "#2 \n\t andl $15,%%esi" + "#2 \n\t psrlq $32,%%mm1" + + "#2 \n\t shll $6,%%esi" + "#2 \n\t movd %%mm1,%%eax" + + "#2 \n\t addl %[precalCoef],%%esi" + "#2 \n\t andl $15,%%eax" + + "#2 \n\t movd (%%esi,%%eax,4),%%mm3" + ::[precalCoef]"g"(precalCoef):"eax","esi"); + + /* + * extraction des coefficients... (Thread #3) + * + * pre : coef dans mm3 + * + * post : coef extraits dans mm3 (c1 & c2) + * et mm4 (c3 & c4) + * + * modif : mm5 + */ + + /* (Thread #4) + * pre : mm0 : Y pos [*|Y] + * mm1 : X pos [*|X] + * + * post : mm0 : expix1[position] + * mm2 : expix1[position+largeur] + * + * modif : eax, esi + */ + __asm__ __volatile__ ( + "#2 \n\t psrld $4, %%mm0" + "#2 \n\t psrld $4, %%mm1" /* PERTEDEC = $4 */ + + "#4 \n\t movd %%mm1,%%eax" + "#3 \n\t movq %%mm3,%%mm5" + + "#4 \n\t mull %[prevX]" + "#4 \n\t movd %%mm0,%%esi" + + "#3 \n\t punpcklbw %%mm5, %%mm3" + "#4 \n\t addl %%esi, %%eax" + + "#3 \n\t movq %%mm3, %%mm4" + "#3 \n\t movq %%mm3, %%mm5" + + "#4 \n\t movl %[expix1], %%esi" + "#3 \n\t punpcklbw %%mm5, %%mm3" + + "#4 \n\t movq (%%esi,%%eax,4),%%mm0" + "#3 \n\t punpckhbw %%mm5, %%mm4" + + "#4 \n\t addl %[prevX],%%eax" + "#4 \n\t movq (%%esi,%%eax,4),%%mm2" + + : + : [expix1] "g"(expix1) + , [prevX] "g"(prevX) + :"eax","esi" + ); + + /* + * pre : mm0 : expix1[position] + * mm2 : expix1[position+largeur] + * mm3 & mm4 : coefs + */ + + /* recopie des deux premiers pixels dans mm0 et mm1 */ + movq_r2r (mm0, mm1); /* b1-v1-r1-a1-b2-v2-r2-a2 */ + + /* depackage du premier pixel */ + punpcklbw_r2r (mm7, mm0); /* 00-b2-00-v2-00-r2-00-a2 */ + + /* extraction des coefficients... */ + + movq_r2r (mm3, mm5); /* c2-c2-c2-c2-c1-c1-c1-c1 */ + + /*^en parrallele^*/ /* depackage du 2ieme pixel */ + /*^*/ punpckhbw_r2r (mm7, mm1); /* 00-b1-00-v1-00-r1-00-a1 */ + + punpcklbw_r2r (mm7, mm5); /* 00-c1-00-c1-00-c1-00-c1 */ + punpckhbw_r2r (mm7, mm3); /* 00-c2-00-c2-00-c2-00-c2 */ + + /* multiplication des pixels par les coefficients */ + pmullw_r2r (mm5, mm0); /* c1*b2-c1*v2-c1*r2-c1*a2 */ + pmullw_r2r (mm3, mm1); /* c2*b1-c2*v1-c2*r1-c2*a1 */ + paddw_r2r (mm1, mm0); + + /* ...extraction des 2 derniers coefficients */ + movq_r2r (mm4, mm5); /* c4-c4-c4-c4-c3-c3-c3-c3 */ + punpcklbw_r2r (mm7, mm4); /* 00-c3-00-c3-00-c3-00-c3 */ + punpckhbw_r2r (mm7, mm5); /* 00-c4-00-c4-00-c4-00-c4 */ + + /* recuperation des 2 derniers pixels */ + movq_r2r (mm2, mm1); + + /* depackage des pixels */ + punpcklbw_r2r (mm7, mm1); + punpckhbw_r2r (mm7, mm2); + + /* multiplication pas les coeffs */ + pmullw_r2r (mm4, mm1); + pmullw_r2r (mm5, mm2); + + /* ajout des valeurs obtenues la valeur finale */ + paddw_r2r (mm1, mm0); + paddw_r2r (mm2, mm0); + + /* division par 256 = 16+16+16+16, puis repackage du pixel final */ + psrlw_i2r (8, mm0); + packuswb_r2r (mm7, mm0); + + movd_r2m (mm0,expix2[loop]); + + ++loop; + } + __asm__ __volatile__ ("femms\n"); +} + +#define DRAWMETHOD_PLUS_XMMX(_out,_backbuf,_col) \ +{ \ + movd_m2r(_backbuf, mm0); \ + paddusb_m2r(_col, mm0); \ + movd_r2m(mm0, _out); \ +} + +#define DRAWMETHOD DRAWMETHOD_PLUS_XMMX(*p,*p,col) + +void draw_line_xmmx (Pixel *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny) +{ + int x, y, dx, dy, yy, xx; + Pixel *p; + + if ((y1 < 0) || (y2 < 0) || (x1 < 0) || (x2 < 0) || (y1 >= screeny) || (y2 >= screeny) || (x1 >= screenx) || (x2 >= screenx)) + goto end_of_line; + + dx = x2 - x1; + dy = y2 - y1; + if (x1 >= x2) { + int tmp; + + tmp = x1; + x1 = x2; + x2 = tmp; + tmp = y1; + y1 = y2; + y2 = tmp; + dx = x2 - x1; + dy = y2 - y1; + } + + /* vertical line */ + if (dx == 0) { + if (y1 < y2) { + p = &(data[(screenx * y1) + x1]); + for (y = y1; y <= y2; y++) { + DRAWMETHOD; + p += screenx; + } + } + else { + p = &(data[(screenx * y2) + x1]); + for (y = y2; y <= y1; y++) { + DRAWMETHOD; + p += screenx; + } + } + goto end_of_line; + } + /* horizontal line */ + if (dy == 0) { + if (x1 < x2) { + p = &(data[(screenx * y1) + x1]); + for (x = x1; x <= x2; x++) { + DRAWMETHOD; + p++; + } + goto end_of_line; + } + else { + p = &(data[(screenx * y1) + x2]); + for (x = x2; x <= x1; x++) { + DRAWMETHOD; + p++; + } + goto end_of_line; + } + } + /* 1 */ + /* \ */ + /* \ */ + /* 2 */ + if (y2 > y1) { + /* steep */ + if (dy > dx) { + dx = ((dx << 16) / dy); + x = x1 << 16; + for (y = y1; y <= y2; y++) { + xx = x >> 16; + p = &(data[(screenx * y) + xx]); + DRAWMETHOD; + if (xx < (screenx - 1)) { + p++; + /* DRAWMETHOD; */ + } + x += dx; + } + goto end_of_line; + } + /* shallow */ + else { + dy = ((dy << 16) / dx); + y = y1 << 16; + for (x = x1; x <= x2; x++) { + yy = y >> 16; + p = &(data[(screenx * yy) + x]); + DRAWMETHOD; + if (yy < (screeny - 1)) { + p += screeny; + /* DRAWMETHOD; */ + } + y += dy; + } + } + } + /* 2 */ + /* / */ + /* / */ + /* 1 */ + else { + /* steep */ + if (-dy > dx) { + dx = ((dx << 16) / -dy); + x = (x1 + 1) << 16; + for (y = y1; y >= y2; y--) { + xx = x >> 16; + p = &(data[(screenx * y) + xx]); + DRAWMETHOD; + if (xx < (screenx - 1)) { + p--; + /* DRAWMETHOD; */ + } + x += dx; + } + goto end_of_line; + } + /* shallow */ + else { + dy = ((dy << 16) / dx); + y = y1 << 16; + for (x = x1; x <= x2; x++) { + yy = y >> 16; + p = &(data[(screenx * yy) + x]); + DRAWMETHOD; + if (yy < (screeny - 1)) { + p += screeny; + /* DRAWMETHOD; */ + } + y += dy; + } + goto end_of_line; + } + } +end_of_line: + __asm__ __volatile__ ("femms\n"); +} + +#endif diff --git a/veejay-server/libgoom/xmmx.h b/veejay-server/libgoom/xmmx.h new file mode 100644 index 00000000..70ef3614 --- /dev/null +++ b/veejay-server/libgoom/xmmx.h @@ -0,0 +1,537 @@ +/* xmmx.h + + eXtended MultiMedia eXtensions GCC interface library for IA32. + + To use this library, simply include this header file + and compile with GCC. You MUST have inlining enabled + in order for xmmx_ok() to work; this can be done by + simply using -O on the GCC command line. + + Compiling with -DXMMX_TRACE will cause detailed trace + output to be sent to stderr for each mmx operation. + This adds lots of code, and obviously slows execution to + a crawl, but can be very useful for debugging. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR ANY PARTICULAR PURPOSE. + + 1999 by R. Fisher + Based on libmmx, 1997-99 by H. Dietz and R. Fisher + + Notes: + It appears that the latest gas has the pand problem fixed, therefore + I'll undefine BROKEN_PAND by default. +*/ + +#ifndef _XMMX_H +#define _XMMX_H + + +/* Warning: at this writing, the version of GAS packaged + with most Linux distributions does not handle the + parallel AND operation mnemonic correctly. If the + symbol BROKEN_PAND is defined, a slower alternative + coding will be used. If execution of mmxtest results + in an illegal instruction fault, define this symbol. +*/ +#undef BROKEN_PAND + + +/* The type of an value that fits in an (Extended) MMX register + (note that long long constant values MUST be suffixed + by LL and unsigned long long values by ULL, lest + they be truncated by the compiler) +*/ +#ifndef _MMX_H +typedef union { + long long q; /* Quadword (64-bit) value */ + unsigned long long uq; /* Unsigned Quadword */ + int d[2]; /* 2 Doubleword (32-bit) values */ + unsigned int ud[2]; /* 2 Unsigned Doubleword */ + short w[4]; /* 4 Word (16-bit) values */ + unsigned short uw[4]; /* 4 Unsigned Word */ + char b[8]; /* 8 Byte (8-bit) values */ + unsigned char ub[8]; /* 8 Unsigned Byte */ + float s[2]; /* Single-precision (32-bit) value */ +} __attribute__ ((aligned (8))) mmx_t; /* On an 8-byte (64-bit) boundary */ +#endif + + + +/* Function to test if multimedia instructions are supported... +*/ +static int +mm_support(void) +{ + /* Returns 1 if MMX instructions are supported, + 3 if Cyrix MMX and Extended MMX instructions are supported + 5 if AMD MMX and 3DNow! instructions are supported + 0 if hardware does not support any of these + */ + register int rval = 0; + + __asm__ __volatile__ ( + /* See if CPUID instruction is supported ... */ + /* ... Get copies of EFLAGS into eax and ecx */ + "pushf\n\t" + "popl %%eax\n\t" + "movl %%eax, %%ecx\n\t" + + /* ... Toggle the ID bit in one copy and store */ + /* to the EFLAGS reg */ + "xorl $0x200000, %%eax\n\t" + "push %%eax\n\t" + "popf\n\t" + + /* ... Get the (hopefully modified) EFLAGS */ + "pushf\n\t" + "popl %%eax\n\t" + + /* ... Compare and test result */ + "xorl %%eax, %%ecx\n\t" + "testl $0x200000, %%ecx\n\t" + "jz NotSupported1\n\t" /* CPUID not supported */ + + + /* Get standard CPUID information, and + go to a specific vendor section */ + "movl $0, %%eax\n\t" + "cpuid\n\t" + + /* Check for Intel */ + "cmpl $0x756e6547, %%ebx\n\t" + "jne TryAMD\n\t" + "cmpl $0x49656e69, %%edx\n\t" + "jne TryAMD\n\t" + "cmpl $0x6c65746e, %%ecx\n" + "jne TryAMD\n\t" + "jmp Intel\n\t" + + /* Check for AMD */ + "\nTryAMD:\n\t" + "cmpl $0x68747541, %%ebx\n\t" + "jne TryCyrix\n\t" + "cmpl $0x69746e65, %%edx\n\t" + "jne TryCyrix\n\t" + "cmpl $0x444d4163, %%ecx\n" + "jne TryCyrix\n\t" + "jmp AMD\n\t" + + /* Check for Cyrix */ + "\nTryCyrix:\n\t" + "cmpl $0x69727943, %%ebx\n\t" + "jne NotSupported2\n\t" + "cmpl $0x736e4978, %%edx\n\t" + "jne NotSupported3\n\t" + "cmpl $0x64616574, %%ecx\n\t" + "jne NotSupported4\n\t" + /* Drop through to Cyrix... */ + + + /* Cyrix Section */ + /* See if extended CPUID level 80000001 is supported */ + /* The value of CPUID/80000001 for the 6x86MX is undefined + according to the Cyrix CPU Detection Guide (Preliminary + Rev. 1.01 table 1), so we'll check the value of eax for + CPUID/0 to see if standard CPUID level 2 is supported. + According to the table, the only CPU which supports level + 2 is also the only one which supports extended CPUID levels. + */ + "cmpl $0x2, %%eax\n\t" + "jne MMXtest\n\t" /* Use standard CPUID instead */ + + /* Extended CPUID supported (in theory), so get extended + features */ + "movl $0x80000001, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%eax\n\t" /* Test for MMX */ + "jz NotSupported5\n\t" /* MMX not supported */ + "testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */ + "jnz EMMXSupported\n\t" + "movl $1, %0:\n\n\t" /* MMX Supported */ + "jmp Return\n\n" + "EMMXSupported:\n\t" + "movl $3, %0:\n\n\t" /* EMMX and MMX Supported */ + "jmp Return\n\t" + + + /* AMD Section */ + "AMD:\n\t" + + /* See if extended CPUID is supported */ + "movl $0x80000000, %%eax\n\t" + "cpuid\n\t" + "cmpl $0x80000000, %%eax\n\t" + "jl MMXtest\n\t" /* Use standard CPUID instead */ + + /* Extended CPUID supported, so get extended features */ + "movl $0x80000001, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%edx\n\t" /* Test for MMX */ + "jz NotSupported6\n\t" /* MMX not supported */ + "testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */ + "jnz ThreeDNowSupported\n\t" + "movl $1, %0:\n\n\t" /* MMX Supported */ + "jmp Return\n\n" + "ThreeDNowSupported:\n\t" + "movl $5, %0:\n\n\t" /* 3DNow! and MMX Supported */ + "jmp Return\n\t" + + + /* Intel Section */ + "Intel:\n\t" + + /* Check for MMX */ + "MMXtest:\n\t" + "movl $1, %%eax\n\t" + "cpuid\n\t" + "testl $0x00800000, %%edx\n\t" /* Test for MMX */ + "jz NotSupported7\n\t" /* MMX Not supported */ + "movl $1, %0:\n\n\t" /* MMX Supported */ + "jmp Return\n\t" + + /* Nothing supported */ + "\nNotSupported1:\n\t" + "#movl $101, %0:\n\n\t" + "\nNotSupported2:\n\t" + "#movl $102, %0:\n\n\t" + "\nNotSupported3:\n\t" + "#movl $103, %0:\n\n\t" + "\nNotSupported4:\n\t" + "#movl $104, %0:\n\n\t" + "\nNotSupported5:\n\t" + "#movl $105, %0:\n\n\t" + "\nNotSupported6:\n\t" + "#movl $106, %0:\n\n\t" + "\nNotSupported7:\n\t" + "#movl $107, %0:\n\n\t" + "movl $0, %0:\n\n\t" + + "Return:\n\t" + : "=a" (rval) + : /* no input */ + : "eax", "ebx", "ecx", "edx" + ); + + /* Return */ + return(rval); +} + +/* Function to test if mmx instructions are supported... +*/ +#ifndef _XMMX_H +inline extern int +mmx_ok(void) +{ + /* Returns 1 if MMX instructions are supported, 0 otherwise */ + return ( mm_support() & 0x1 ); +} +#endif + +/* Function to test if xmmx instructions are supported... +*/ +inline extern int +xmmx_ok(void) +{ + /* Returns 1 if Extended MMX instructions are supported, 0 otherwise */ + return ( (mm_support() & 0x2) >> 1 ); +} + + +/* Helper functions for the instruction macros that follow... + (note that memory-to-register, m2r, instructions are nearly + as efficient as register-to-register, r2r, instructions; + however, memory-to-memory instructions are really simulated + as a convenience, and are only 1/3 as efficient) +*/ +#ifdef XMMX_TRACE + +/* Include the stuff for printing a trace to stderr... +*/ + +#include + +#define mmx_i2r(op, imm, reg) \ + { \ + mmx_t mmx_trace; \ + mmx_trace.uq = (imm); \ + fprintf(stderr, #op "_i2r(" #imm "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #reg "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (imm)); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #reg "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_m2r(op, mem, reg) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (mem); \ + fprintf(stderr, #op "_m2r(" #mem "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #reg "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (mem)); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #reg "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_r2m(op, reg, mem) \ + { \ + mmx_t mmx_trace; \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #op "_r2m(" #reg "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + mmx_trace = (mem); \ + fprintf(stderr, #mem "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=X" (mem) \ + : /* nothing */ ); \ + mmx_trace = (mem); \ + fprintf(stderr, #mem "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_r2r(op, regs, regd) \ + { \ + mmx_t mmx_trace; \ + __asm__ __volatile__ ("movq %%" #regs ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #op "_r2r(" #regs "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %%" #regd ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #regd "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd); \ + __asm__ __volatile__ ("movq %%" #regd ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #regd "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#define mmx_m2m(op, mems, memd) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (mems); \ + fprintf(stderr, #op "_m2m(" #mems "=0x%08x%08x, ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + mmx_trace = (memd); \ + fprintf(stderr, #memd "=0x%08x%08x) => ", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (memd) \ + : "X" (mems)); \ + mmx_trace = (memd); \ + fprintf(stderr, #memd "=0x%08x%08x\n", \ + mmx_trace.d[1], mmx_trace.d[0]); \ + } + +#else + +/* These macros are a lot simpler without the tracing... +*/ + +#define mmx_i2r(op, imm, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (imm) ) + +#define mmx_m2r(op, mem, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (mem)) + +#define mmx_m2ir(op, mem, rs) \ + __asm__ __volatile__ (#op " %0, %%" #rs \ + : /* nothing */ \ + : "X" (mem) ) + +#define mmx_r2m(op, reg, mem) \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=X" (mem) \ + : /* nothing */ ) + +#define mmx_r2r(op, regs, regd) \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd) + +#define mmx_r2ir(op, rs1, rs2) \ + __asm__ __volatile__ (#op " %%" #rs1 ", %%" #rs2 \ + : /* nothing */ \ + : /* nothing */ ) + +#define mmx_m2m(op, mems, memd) \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (memd) \ + : "X" (mems)) + +#endif + + + +/* 1x64 MOVe Quadword + (this is both a load and a store... + in fact, it is the only way to store) +*/ +#define movq_m2r(var, reg) mmx_m2r(movq, var, reg) +#define movq_r2m(reg, var) mmx_r2m(movq, reg, var) +#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) +#define movq(vars, vard) \ + __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + +/* 1x32 MOVe Doubleword + (like movq, this is both load and store... + but is most useful for moving things between + mmx registers and ordinary registers) +*/ +#define movd_m2r(var, reg) mmx_m2r(movd, var, reg) +#define movd_r2m(reg, var) mmx_r2m(movd, reg, var) +#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) +#define movd(vars, vard) \ + __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ + "movd %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + + +/* 4x16 Parallel MAGnitude +*/ +#define pmagw_m2r(var, reg) mmx_m2r(pmagw, var, reg) +#define pmagw_r2r(regs, regd) mmx_r2r(pmagw, regs, regd) +#define pmagw(vars, vard) mmx_m2m(pmagw, vars, vard) + + +/* 4x16 Parallel ADDs using Saturation arithmetic + and Implied destination +*/ +#define paddsiw_m2ir(var, rs) mmx_m2ir(paddsiw, var, rs) +#define paddsiw_r2ir(rs1, rs2) mmx_r2ir(paddsiw, rs1, rs2) +#define paddsiw(vars, vard) mmx_m2m(paddsiw, vars, vard) + + +/* 4x16 Parallel SUBs using Saturation arithmetic + and Implied destination +*/ +#define psubsiw_m2ir(var, rs) mmx_m2ir(psubsiw, var, rs) +#define psubsiw_r2ir(rs1, rs2) mmx_r2ir(psubsiw, rs1, rs2) +#define psubsiw(vars, vard) mmx_m2m(psubsiw, vars, vard) + + +/* 4x16 Parallel MULs giving High 4x16 portions of results + Rounded with 1/2 bit 15. +*/ +#define pmulhrw_m2r(var, reg) mmx_m2r(pmulhrw, var, reg) +#define pmulhrw_r2r(regs, regd) mmx_r2r(pmulhrw, regs, regd) +#define pmulhrw(vars, vard) mmx_m2m(pmulhrw, vars, vard) + + +/* 4x16 Parallel MULs giving High 4x16 portions of results + Rounded with 1/2 bit 15, storing to Implied register +*/ +#define pmulhriw_m2ir(var, rs) mmx_m2ir(pmulhriw, var, rs) +#define pmulhriw_r2ir(rs1, rs2) mmx_r2ir(pmulhriw, rs1, rs2) +#define pmulhriw(vars, vard) mmx_m2m(pmulhriw, vars, vard) + + +/* 4x16 Parallel Muls (and ACcumulate) giving High 4x16 portions + of results Rounded with 1/2 bit 15, accumulating with Implied register +*/ +#define pmachriw_m2ir(var, rs) mmx_m2ir(pmachriw, var, rs) +#define pmachriw_r2ir(rs1, rs2) mmx_r2ir(pmachriw, rs1, rs2) +#define pmachriw(vars, vard) mmx_m2m(pmachriw, vars, vard) + + +/* 8x8u Parallel AVErage +*/ +#define paveb_m2r(var, reg) mmx_m2r(paveb, var, reg) +#define paveb_r2r(regs, regd) mmx_r2r(paveb, regs, regd) +#define paveb(vars, vard) mmx_m2m(paveb, vars, vard) + + +/* 8x8u Parallel DISTance and accumulate with + unsigned saturation to Implied register +*/ +#define pdistib_m2ir(var, rs) mmx_m2ir(pdistib, var, rs) +#define pdistib(vars, vard) mmx_m2m(pdistib, vars, vard) + + +/* 8x8 Parallel conditional MoVe + if implied register field is Zero +*/ +#define pmvzb_m2ir(var, rs) mmx_m2ir(pmvzb, var, rs) + + +/* 8x8 Parallel conditional MoVe + if implied register field is Not Zero +*/ +#define pmvnzb_m2ir(var, rs) mmx_m2ir(pmvnzb, var, rs) + + +/* 8x8 Parallel conditional MoVe + if implied register field is Less than Zero +*/ +#define pmvlzb_m2ir(var, rs) mmx_m2ir(pmvlzb, var, rs) + + +/* 8x8 Parallel conditional MoVe + if implied register field is Greater than or Equal to Zero +*/ +#define pmvgezb_m2ir(var, rs) mmx_m2ir(pmvgezb, var, rs) + + +/* Fast Empty MMx State + (used to clean-up when going from mmx to float use + of the registers that are shared by both; note that + there is no float-to-xmmx operation needed, because + only the float tag word info is corruptible) +*/ +#ifdef XMMX_TRACE + +#define femms() \ + { \ + fprintf(stderr, "femms()\n"); \ + __asm__ __volatile__ ("femms"); \ + } + +#else + +#define femms() __asm__ __volatile__ ("femms") + +#endif + +#endif + diff --git a/veejay-server/libhash/Makefile.am b/veejay-server/libhash/Makefile.am new file mode 100644 index 00000000..4bef6fbf --- /dev/null +++ b/veejay-server/libhash/Makefile.am @@ -0,0 +1,8 @@ +# Makefile for veejay +MAINTAINERCLEANFILES=Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) +HASH_LIB_FILE = libhash.la +noinst_LTLIBRARIES = $(HASH_LIB_FILE) +libhash_la_SOURCES = hash.c + diff --git a/veejay-server/libhash/Makefile.in b/veejay-server/libhash/Makefile.in new file mode 100644 index 00000000..57f55665 --- /dev/null +++ b/veejay-server/libhash/Makefile.in @@ -0,0 +1,507 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libhash +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libhash_la_LIBADD = +am_libhash_la_OBJECTS = hash.lo +libhash_la_OBJECTS = $(am_libhash_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libhash_la_SOURCES) +DIST_SOURCES = $(libhash_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Makefile for veejay +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) +HASH_LIB_FILE = libhash.la +noinst_LTLIBRARIES = $(HASH_LIB_FILE) +libhash_la_SOURCES = hash.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libhash/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libhash/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libhash.la: $(libhash_la_OBJECTS) $(libhash_la_DEPENDENCIES) + $(LINK) $(libhash_la_OBJECTS) $(libhash_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/libhash/hash.c b/veejay-server/libhash/hash.c new file mode 100644 index 00000000..8141447f --- /dev/null +++ b/veejay-server/libhash/hash.c @@ -0,0 +1,1072 @@ +/* + * Hash Table Data Type + * Copyright (C) 1997 Kaz Kylheku + * + * Free Software License: + * + * All rights are reserved by the author, with the following exceptions: + * Permission is granted to freely reproduce and distribute this software, + * possibly in exchange for a fee, provided that this copyright notice appears + * intact. Permission is also granted to adapt this software to produce + * derivative works, as long as the modified versions carry this copyright + * notice and additional notices stating that the work has been modified. + * This source code may be translated into executable form and incorporated + * into proprietary software; there is no requirement for such software to + * contain a copyright notice related to this source. + * + * $Id: hash.c,v 1.36.2.11 2000/11/13 01:36:45 kaz Exp $ + * $Name: kazlib_1_20 $ + */ + +#include +#include +#ifdef STRICT_CHECKING +#include +#endif +#include +#define HASH_IMPLEMENTATION +#include "hash.h" + +#ifdef KAZLIB_RCSID +static const char rcsid[] = "$Id: hash.c,v 1.36.2.11 2000/11/13 01:36:45 kaz Exp $"; +#endif + +#define INIT_BITS 6 +#define INIT_SIZE (1UL << (INIT_BITS)) /* must be power of two */ +#define INIT_MASK ((INIT_SIZE) - 1) + +#define next hash_next +#define key hash_key +#define data hash_data +#define hkey hash_hkey + +#define table hash_table +#define nchains hash_nchains +#define nodecount hash_nodecount +#define maxcount hash_maxcount +#define highmark hash_highmark +#define lowmark hash_lowmark +#define compare hash_compare +#define function hash_function +#define allocnode hash_allocnode +#define freenode hash_freenode +#define context hash_context +#define mask hash_mask +#define dynamic hash_dynamic + +#define table hash_table +#define chain hash_chain + +static hnode_t *hnode_alloc(void *context); +static void hnode_free(hnode_t *node, void *context); +static hash_val_t hash_fun_default(const void *key); +static int hash_comp_default(const void *key1, const void *key2); + +int hash_val_t_bit; + +/* + * Compute the number of bits in the hash_val_t type. We know that hash_val_t + * is an unsigned integral type. Thus the highest value it can hold is a + * Mersenne number (power of two, less one). We initialize a hash_val_t + * object with this value and then shift bits out one by one while counting. + * Notes: + * 1. HASH_VAL_T_MAX is a Mersenne number---one that is one less than a power + * of two. This means that its binary representation consists of all one + * bits, and hence ``val'' is initialized to all one bits. + * 2. While bits remain in val, we increment the bit count and shift it to the + * right, replacing the topmost bit by zero. + */ + +static void compute_bits(void) +{ + hash_val_t val = HASH_VAL_T_MAX; /* 1 */ + int bits = 0; + + while (val) { /* 2 */ + bits++; + val >>= 1; + } + + hash_val_t_bit = bits; +} + +/* + * Verify whether the given argument is a power of two. + */ + +static int is_power_of_two(hash_val_t arg) +{ + if (arg == 0) + return 0; + while ((arg & 1) == 0) + arg >>= 1; + return (arg == 1); +} + +/* + * Compute a shift amount from a given table size + */ + +static hash_val_t compute_mask(hashcount_t size) +{ +#ifdef STRICT_CHECKING + assert (is_power_of_two(size)); + assert (size >= 2); +#endif + return size - 1; +} + +/* + * Initialize the table of pointers to null. + */ + +static void clear_table(hash_t *hash) +{ + hash_val_t i; + + for (i = 0; i < hash->nchains; i++) + hash->table[i] = NULL; +} + +/* + * Double the size of a dynamic table. This works as follows. Each chain splits + * into two adjacent chains. The shift amount increases by one, exposing an + * additional bit of each hashed key. For each node in the original chain, the + * value of this newly exposed bit will decide which of the two new chains will + * receive the node: if the bit is 1, the chain with the higher index will have + * the node, otherwise the lower chain will receive the node. In this manner, + * the hash table will continue to function exactly as before without having to + * rehash any of the keys. + * Notes: + * 1. Overflow check. + * 2. The new number of chains is twice the old number of chains. + * 3. The new mask is one bit wider than the previous, revealing a + * new bit in all hashed keys. + * 4. Allocate a new table of chain pointers that is twice as large as the + * previous one. + * 5. If the reallocation was successful, we perform the rest of the growth + * algorithm, otherwise we do nothing. + * 6. The exposed_bit variable holds a mask with which each hashed key can be + * AND-ed to test the value of its newly exposed bit. + * 7. Now loop over each chain in the table and sort its nodes into two + * chains based on the value of each node's newly exposed hash bit. + * 8. The low chain replaces the current chain. The high chain goes + * into the corresponding sister chain in the upper half of the table. + * 9. We have finished dealing with the chains and nodes. We now update + * the various bookeeping fields of the hash structure. + */ + +static void grow_table(hash_t *hash) +{ + hnode_t **newtable; +#ifdef STRICT_CHECKING + assert (2 * hash->nchains > hash->nchains); /* 1 */ +#endif + newtable = realloc(hash->table, + sizeof *newtable * hash->nchains * 2); /* 4 */ + + if (newtable) { /* 5 */ + hash_val_t mask = (hash->mask << 1) | 1; /* 3 */ + hash_val_t exposed_bit = mask ^ hash->mask; /* 6 */ + hash_val_t chain; +#ifdef STRICT_CHECKING + assert (mask != hash->mask); +#endif + for (chain = 0; chain < hash->nchains; chain++) { /* 7 */ + hnode_t *low_chain = 0, *high_chain = 0, *hptr, *next; + + for (hptr = newtable[chain]; hptr != 0; hptr = next) { + next = hptr->next; + + if (hptr->hkey & exposed_bit) { + hptr->next = high_chain; + high_chain = hptr; + } else { + hptr->next = low_chain; + low_chain = hptr; + } + } + + newtable[chain] = low_chain; /* 8 */ + newtable[chain + hash->nchains] = high_chain; + } + + hash->table = newtable; /* 9 */ + hash->mask = mask; + hash->nchains *= 2; + hash->lowmark *= 2; + hash->highmark *= 2; + } +#ifdef STRICT_CHECKING +// assert (hash_verify(hash)); +#endif +} + +/* + * Cut a table size in half. This is done by folding together adjacent chains + * and populating the lower half of the table with these chains. The chains are + * simply spliced together. Once this is done, the whole table is reallocated + * to a smaller object. + * Notes: + * 1. It is illegal to have a hash table with one slot. This would mean that + * hash->shift is equal to hash_val_t_bit, an illegal shift value. + * Also, other things could go wrong, such as hash->lowmark becoming zero. + * 2. Looping over each pair of sister chains, the low_chain is set to + * point to the head node of the chain in the lower half of the table, + * and high_chain points to the head node of the sister in the upper half. + * 3. The intent here is to compute a pointer to the last node of the + * lower chain into the low_tail variable. If this chain is empty, + * low_tail ends up with a null value. + * 4. If the lower chain is not empty, we simply tack the upper chain onto it. + * If the upper chain is a null pointer, nothing happens. + * 5. Otherwise if the lower chain is empty but the upper one is not, + * If the low chain is empty, but the high chain is not, then the + * high chain is simply transferred to the lower half of the table. + * 6. Otherwise if both chains are empty, there is nothing to do. + * 7. All the chain pointers are in the lower half of the table now, so + * we reallocate it to a smaller object. This, of course, invalidates + * all pointer-to-pointers which reference into the table from the + * first node of each chain. + * 8. Though it's unlikely, the reallocation may fail. In this case we + * pretend that the table _was_ reallocated to a smaller object. + * 9. Finally, update the various table parameters to reflect the new size. + */ + +static void shrink_table(hash_t *hash) +{ + hash_val_t chain, nchains; + hnode_t **newtable, *low_tail, *low_chain, *high_chain; +#ifdef STRICT_CHECKING + assert (hash->nchains >= 2); /* 1 */ +#endif + + nchains = hash->nchains / 2; + + for (chain = 0; chain < nchains; chain++) { + low_chain = hash->table[chain]; /* 2 */ + high_chain = hash->table[chain + nchains]; + for (low_tail = low_chain; low_tail && low_tail->next; low_tail = low_tail->next) + ; /* 3 */ + if (low_chain != 0) /* 4 */ + low_tail->next = high_chain; + else if (high_chain != 0) /* 5 */ + hash->table[chain] = high_chain; +#ifdef STRICT_CHECKING + else + assert (hash->table[chain] == NULL); /* 6 */ +#endif + } + newtable = realloc(hash->table, + sizeof *newtable * nchains); /* 7 */ + if (newtable) /* 8 */ + hash->table = newtable; + hash->mask >>= 1; /* 9 */ + hash->nchains = nchains; + hash->lowmark /= 2; + hash->highmark /= 2; +#ifdef STRICT_CHECKING +// assert (hash_verify(hash)); +#endif +} + + +/* + * Create a dynamic hash table. Both the hash table structure and the table + * itself are dynamically allocated. Furthermore, the table is extendible in + * that it will automatically grow as its load factor increases beyond a + * certain threshold. + * Notes: + * 1. If the number of bits in the hash_val_t type has not been computed yet, + * we do so here, because this is likely to be the first function that the + * user calls. + * 2. Allocate a hash table control structure. + * 3. If a hash table control structure is successfully allocated, we + * proceed to initialize it. Otherwise we return a null pointer. + * 4. We try to allocate the table of hash chains. + * 5. If we were able to allocate the hash chain table, we can finish + * initializing the hash structure and the table. Otherwise, we must + * backtrack by freeing the hash structure. + * 6. INIT_SIZE should be a power of two. The high and low marks are always set + * to be twice the table size and half the table size respectively. When the + * number of nodes in the table grows beyond the high size (beyond load + * factor 2), it will double in size to cut the load factor down to about + * about 1. If the table shrinks down to or beneath load factor 0.5, + * it will shrink, bringing the load up to about 1. However, the table + * will never shrink beneath INIT_SIZE even if it's emptied. + * 7. This indicates that the table is dynamically allocated and dynamically + * resized on the fly. A table that has this value set to zero is + * assumed to be statically allocated and will not be resized. + * 8. The table of chains must be properly reset to all null pointers. + */ + +hash_t *hash_create(hashcount_t maxcount, hash_comp_t compfun, + hash_fun_t hashfun) +{ + hash_t *hash; + + if (hash_val_t_bit == 0) /* 1 */ + compute_bits(); + + hash = malloc(sizeof *hash); /* 2 */ + + if (hash) { /* 3 */ + hash->table = malloc(sizeof *hash->table * INIT_SIZE); /* 4 */ + if (hash->table) { /* 5 */ + hash->nchains = INIT_SIZE; /* 6 */ + hash->highmark = INIT_SIZE * 2; + hash->lowmark = INIT_SIZE / 2; + hash->nodecount = 0; + hash->maxcount = maxcount; + hash->compare = compfun ? compfun : hash_comp_default; + hash->function = hashfun ? hashfun : hash_fun_default; + hash->allocnode = hnode_alloc; + hash->freenode = hnode_free; + hash->context = NULL; + hash->mask = INIT_MASK; + hash->dynamic = 1; /* 7 */ + clear_table(hash); /* 8 */ +#ifdef STRICT_CHECKING +// assert (hash_verify(hash)); +#endif + return hash; + } + free(hash); + } + + return NULL; +} + +/* + * Select a different set of node allocator routines. + */ + +void hash_set_allocator(hash_t *hash, hnode_alloc_t al, + hnode_free_t fr, void *context) +{ +#ifdef STRICT_CHECING + assert (hash_count(hash) == 0); + assert ((al == 0 && fr == 0) || (al != 0 && fr != 0)); +#endif + hash->allocnode = al ? al : hnode_alloc; + hash->freenode = fr ? fr : hnode_free; + hash->context = context; +} + +/* + * Free every node in the hash using the hash->freenode() function pointer, and + * cause the hash to become empty. + */ + +void hash_free_nodes(hash_t *hash) +{ + hscan_t hs; + hnode_t *node; + hash_scan_begin(&hs, hash); + while ((node = hash_scan_next(&hs))) { + hash_scan_delete(hash, node); + hash->freenode(node, hash->context); + } + hash->nodecount = 0; + clear_table(hash); +} + +/* + * Obsolescent function for removing all nodes from a table, + * freeing them and then freeing the table all in one step. + */ + +void hash_free(hash_t *hash) +{ +#ifdef KAZLIB_OBSOLESCENT_DEBUG + assert ("call to obsolescent function hash_free()" && 0); +#endif + hash_free_nodes(hash); + hash_destroy(hash); +} + +/* + * Free a dynamic hash table structure. + */ + +void hash_destroy(hash_t *hash) +{ +#ifdef STRICT_CHECKING + assert (hash_val_t_bit != 0); + assert (hash_isempty(hash)); +#endif + free(hash->table); + free(hash); +} + +/* + * Initialize a user supplied hash structure. The user also supplies a table of + * chains which is assigned to the hash structure. The table is static---it + * will not grow or shrink. + * 1. See note 1. in hash_create(). + * 2. The user supplied array of pointers hopefully contains nchains nodes. + * 3. See note 7. in hash_create(). + * 4. We must dynamically compute the mask from the given power of two table + * size. + * 5. The user supplied table can't be assumed to contain null pointers, + * so we reset it here. + */ + +hash_t *hash_init(hash_t *hash, hashcount_t maxcount, + hash_comp_t compfun, hash_fun_t hashfun, hnode_t **table, + hashcount_t nchains) +{ + if (hash_val_t_bit == 0) /* 1 */ + compute_bits(); +#ifdef STRICT_CHECKING + assert (is_power_of_two(nchains)); +#endif + hash->table = table; /* 2 */ + hash->nchains = nchains; + hash->nodecount = 0; + hash->maxcount = maxcount; + hash->compare = compfun ? compfun : hash_comp_default; + hash->function = hashfun ? hashfun : hash_fun_default; + hash->dynamic = 0; /* 3 */ + hash->mask = compute_mask(nchains); /* 4 */ + clear_table(hash); /* 5 */ +#ifdef STRICT_CHECKING +// assert (hash_verify(hash)); +#endif + return hash; +} + +/* + * Reset the hash scanner so that the next element retrieved by + * hash_scan_next() shall be the first element on the first non-empty chain. + * Notes: + * 1. Locate the first non empty chain. + * 2. If an empty chain is found, remember which one it is and set the next + * pointer to refer to its first element. + * 3. Otherwise if a chain is not found, set the next pointer to NULL + * so that hash_scan_next() shall indicate failure. + */ + +void hash_scan_begin(hscan_t *scan, hash_t *hash) +{ + hash_val_t nchains = hash->nchains; + hash_val_t chain; + + scan->table = hash; + + /* 1 */ + + for (chain = 0; chain < nchains && hash->table[chain] == 0; chain++) + ; + + if (chain < nchains) { /* 2 */ + scan->chain = chain; + scan->next = hash->table[chain]; + } else { /* 3 */ + scan->next = NULL; + } +} + +/* + * Retrieve the next node from the hash table, and update the pointer + * for the next invocation of hash_scan_next(). + * Notes: + * 1. Remember the next pointer in a temporary value so that it can be + * returned. + * 2. This assertion essentially checks whether the module has been properly + * initialized. The first point of interaction with the module should be + * either hash_create() or hash_init(), both of which set hash_val_t_bit to + * a non zero value. + * 3. If the next pointer we are returning is not NULL, then the user is + * allowed to call hash_scan_next() again. We prepare the new next pointer + * for that call right now. That way the user is allowed to delete the node + * we are about to return, since we will no longer be needing it to locate + * the next node. + * 4. If there is a next node in the chain (next->next), then that becomes the + * new next node, otherwise ... + * 5. We have exhausted the current chain, and must locate the next subsequent + * non-empty chain in the table. + * 6. If a non-empty chain is found, the first element of that chain becomes + * the new next node. Otherwise there is no new next node and we set the + * pointer to NULL so that the next time hash_scan_next() is called, a null + * pointer shall be immediately returned. + */ + + +hnode_t *hash_scan_next(hscan_t *scan) +{ + hnode_t *next = scan->next; /* 1 */ + hash_t *hash = scan->table; + hash_val_t chain = scan->chain + 1; + hash_val_t nchains = hash->nchains; +#ifdef SRTICT_CHECING + assert (hash_val_t_bit != 0); /* 2 */ +#endif + if (next) { /* 3 */ + if (next->next) { /* 4 */ + scan->next = next->next; + } else { + while (chain < nchains && hash->table[chain] == 0) /* 5 */ + chain++; + if (chain < nchains) { /* 6 */ + scan->chain = chain; + scan->next = hash->table[chain]; + } else { + scan->next = NULL; + } + } + } + return next; +} + +/* + * Insert a node into the hash table. + * Notes: + * 1. It's illegal to insert more than the maximum number of nodes. The client + * should verify that the hash table is not full before attempting an + * insertion. + * 2. The same key may not be inserted into a table twice. + * 3. If the table is dynamic and the load factor is already at >= 2, + * grow the table. + * 4. We take the bottom N bits of the hash value to derive the chain index, + * where N is the base 2 logarithm of the size of the hash table. + */ + +void hash_insert(hash_t *hash, hnode_t *node, const void *key) +{ + hash_val_t hkey, chain; +#ifdef STRICT_CHECKING + assert (hash_val_t_bit != 0); + assert (node->next == NULL); + assert (hash->nodecount < hash->maxcount); /* 1 */ + assert (hash_lookup(hash, key) == NULL); /* 2 */ +#endif + if (hash->dynamic && hash->nodecount >= hash->highmark) /* 3 */ + grow_table(hash); + + hkey = hash->function(key); + chain = hkey & hash->mask; /* 4 */ + + node->key = key; + node->hkey = hkey; + node->next = hash->table[chain]; + hash->table[chain] = node; + hash->nodecount++; +#ifdef STRICT_CHECKING +// assert (hash_verify(hash)); +#endif +} + +/* + * Find a node in the hash table and return a pointer to it. + * Notes: + * 1. We hash the key and keep the entire hash value. As an optimization, when + * we descend down the chain, we can compare hash values first and only if + * hash values match do we perform a full key comparison. + * 2. To locate the chain from among 2^N chains, we look at the lower N bits of + * the hash value by anding them with the current mask. + * 3. Looping through the chain, we compare the stored hash value inside each + * node against our computed hash. If they match, then we do a full + * comparison between the unhashed keys. If these match, we have located the + * entry. + */ + +hnode_t *hash_lookup(hash_t *hash, const void *key) +{ + hash_val_t hkey, chain; + hnode_t *nptr; +#ifdef HAVE_STRICT + assert( hash != NULL ); + assert( key != NULL ); +#endif + hkey = hash->function(key); /* 1 */ + chain = hkey & hash->mask; /* 2 */ + + for (nptr = hash->table[chain]; nptr; nptr = nptr->next) { /* 3 */ + if (nptr->hkey == hkey && hash->compare(nptr->key, key) == 0) + return nptr; + } + + return NULL; +} + +/* + * Delete the given node from the hash table. Since the chains + * are singly linked, we must locate the start of the node's chain + * and traverse. + * Notes: + * 1. The node must belong to this hash table, and its key must not have + * been tampered with. + * 2. If this deletion will take the node count below the low mark, we + * shrink the table now. + * 3. Determine which chain the node belongs to, and fetch the pointer + * to the first node in this chain. + * 4. If the node being deleted is the first node in the chain, then + * simply update the chain head pointer. + * 5. Otherwise advance to the node's predecessor, and splice out + * by updating the predecessor's next pointer. + * 6. Indicate that the node is no longer in a hash table. + */ + +hnode_t *hash_delete(hash_t *hash, hnode_t *node) +{ + hash_val_t chain; + hnode_t *hptr; +#ifdef STRICT_CHECKING + assert (hash_lookup(hash, node->key) == node); /* 1 */ + assert (hash_val_t_bit != 0); +#endif + if (hash->dynamic && hash->nodecount <= hash->lowmark + && hash->nodecount > INIT_SIZE) + shrink_table(hash); /* 2 */ + + chain = node->hkey & hash->mask; /* 3 */ + hptr = hash->table[chain]; + + if (hptr == node) { /* 4 */ + hash->table[chain] = node->next; + } else { + while (hptr->next != node) { /* 5 */ +#ifdef STRICT_CHECKING + assert (hptr != 0); +#endif + hptr = hptr->next; + } +#ifdef STRICT_CHECKING + assert (hptr->next == node); +#endif + hptr->next = node->next; + } + + hash->nodecount--; +#ifdef STRICT_CHECKING +// assert (hash_verify(hash)); +#endif + + node->next = NULL; /* 6 */ + return node; +} + +int hash_alloc_insert(hash_t *hash, const void *key, void *data) +{ + hnode_t *node = hash->allocnode(hash->context); + + if (node) { + hnode_init(node, data); + hash_insert(hash, node, key); + return 1; + } + return 0; +} + +void hash_delete_free(hash_t *hash, hnode_t *node) +{ + hash_delete(hash, node); + hash->freenode(node, hash->context); +} + +/* + * Exactly like hash_delete, except does not trigger table shrinkage. This is to be + * used from within a hash table scan operation. See notes for hash_delete. + */ + +hnode_t *hash_scan_delete(hash_t *hash, hnode_t *node) +{ + hash_val_t chain; + hnode_t *hptr; +#ifdef STRICT_CHECKING + assert (hash_lookup(hash, node->key) == node); + assert (hash_val_t_bit != 0); +#endif + chain = node->hkey & hash->mask; + hptr = hash->table[chain]; + + if (hptr == node) { + hash->table[chain] = node->next; + } else { + while (hptr->next != node) + hptr = hptr->next; + hptr->next = node->next; + } + + hash->nodecount--; +#ifdef STRICT_CHECKING +// assert (hash_verify(hash)); +#endif + node->next = NULL; + + return node; +} + +/* + * Like hash_delete_free but based on hash_scan_delete. + */ + +void hash_scan_delfree(hash_t *hash, hnode_t *node) +{ + hash_scan_delete(hash, node); + hash->freenode(node, hash->context); +} + +/* + * Verify whether the given object is a valid hash table. This means + * Notes: + * 1. If the hash table is dynamic, verify whether the high and + * low expansion/shrinkage thresholds are powers of two. + * 2. Count all nodes in the table, and test each hash value + * to see whether it is correct for the node's chain. + */ + +int hash_verify(hash_t *hash) +{ + hashcount_t count = 0; + hash_val_t chain; + hnode_t *hptr; + + if (hash->dynamic) { /* 1 */ + if (hash->lowmark >= hash->highmark) + return 0; + if (!is_power_of_two(hash->highmark)) + return 0; + if (!is_power_of_two(hash->lowmark)) + return 0; + } + + for (chain = 0; chain < hash->nchains; chain++) { /* 2 */ + for (hptr = hash->table[chain]; hptr != 0; hptr = hptr->next) { + if ((hptr->hkey & hash->mask) != chain) + return 0; + count++; + } + } + + if (count != hash->nodecount) + return 0; + + return 1; +} + +/* + * Test whether the hash table is full and return 1 if this is true, + * 0 if it is false. + */ + +#undef hash_isfull +int hash_isfull(hash_t *hash) +{ + return hash->nodecount == hash->maxcount; +} + +/* + * Test whether the hash table is empty and return 1 if this is true, + * 0 if it is false. + */ + +#undef hash_isempty +int hash_isempty(hash_t *hash) +{ + return hash->nodecount == 0; +} + +static hnode_t *hnode_alloc(void *context) +{ + return malloc(sizeof *hnode_alloc(NULL)); +} + +static void hnode_free(hnode_t *node, void *context) +{ + free(node); +} + + +/* + * Create a hash table node dynamically and assign it the given data. + */ + +hnode_t *hnode_create(void *data) +{ + hnode_t *node = malloc(sizeof *node); + if (node) { + node->data = data; + node->next = NULL; + } + return node; +} + +/* + * Initialize a client-supplied node + */ + +hnode_t *hnode_init(hnode_t *hnode, void *data) +{ + hnode->data = data; + hnode->next = NULL; + return hnode; +} + +/* + * Destroy a dynamically allocated node. + */ + +void hnode_destroy(hnode_t *hnode) +{ + free(hnode); +} + +#undef hnode_put +void hnode_put(hnode_t *node, void *data) +{ + node->data = data; +} + +#undef hnode_get +void *hnode_get(hnode_t *node) +{ + return node->data; +} + +#undef hnode_getkey +const void *hnode_getkey(hnode_t *node) +{ + return node->key; +} + +#undef hash_count +hashcount_t hash_count(hash_t *hash) +{ + return hash->nodecount; +} + +#undef hash_size +hashcount_t hash_size(hash_t *hash) +{ + return hash->nchains; +} + +static hash_val_t hash_fun_default(const void *key) +{ + static unsigned long randbox[] = { + 0x49848f1bU, 0xe6255dbaU, 0x36da5bdcU, 0x47bf94e9U, + 0x8cbcce22U, 0x559fc06aU, 0xd268f536U, 0xe10af79aU, + 0xc1af4d69U, 0x1d2917b5U, 0xec4c304dU, 0x9ee5016cU, + 0x69232f74U, 0xfead7bb3U, 0xe9089ab6U, 0xf012f6aeU, + }; + + const unsigned char *str = key; + hash_val_t acc = 0; + + while (*str) { + acc ^= randbox[(*str + acc) & 0xf]; + acc = (acc << 1) | (acc >> 31); + acc &= 0xffffffffU; + acc ^= randbox[((*str++ >> 4) + acc) & 0xf]; + acc = (acc << 2) | (acc >> 30); + acc &= 0xffffffffU; + } + return acc; +} +/* +static hash_val_t hash_fun_default( const void *key ) +{ + hash_val_t hash = 0; + char *k = (char*) key; + while (*k) + hash = hash * 31 + *k++; + return hash; +}*/ + +static int hash_comp_default(const void *key1, const void *key2) +{ + return strcmp(key1, key2); +} + +#ifdef KAZLIB_TEST_MAIN + +#include +#include +#include + +typedef char input_t[256]; + +static int tokenize(char *string, ...) +{ + char **tokptr; + va_list arglist; + int tokcount = 0; + + va_start(arglist, string); + tokptr = va_arg(arglist, char **); + while (tokptr) { + while (*string && isspace((unsigned char) *string)) + string++; + if (!*string) + break; + *tokptr = string; + while (*string && !isspace((unsigned char) *string)) + string++; + tokptr = va_arg(arglist, char **); + tokcount++; + if (!*string) + break; + *string++ = 0; + } + va_end(arglist); + + return tokcount; +} + +static char *dupstring(char *str) +{ + int sz = strlen(str) + 1; + char *new = malloc(sz); + if (new) + memcpy(new, str, sz); + return new; +} + +static hnode_t *new_node(void *c) +{ + static hnode_t few[5]; + static int count; + + if (count < 5) + return few + count++; + + return NULL; +} + +static void del_node(hnode_t *n, void *c) +{ +} + +int main(void) +{ + input_t in; + hash_t *h = hash_create(HASHCOUNT_T_MAX, 0, 0); + hnode_t *hn; + hscan_t hs; + char *tok1, *tok2, *val; + const char *key; + int prompt = 0; + + char *help = + "a add value to hash table\n" + "d delete value from hash table\n" + "l lookup value in hash table\n" + "n show size of hash table\n" + "c show number of entries\n" + "t dump whole hash table\n" + "+ increase hash table (private func)\n" + "- decrease hash table (private func)\n" + "b print hash_t_bit value\n" + "p turn prompt on\n" + "s switch to non-functioning allocator\n" + "q quit"; + + if (!h) + puts("hash_create failed"); + + for (;;) { + if (prompt) + putchar('>'); + fflush(stdout); + + if (!fgets(in, sizeof(input_t), stdin)) + break; + + switch(in[0]) { + case '?': + puts(help); + break; + case 'b': + printf("%d\n", hash_val_t_bit); + break; + case 'a': + if (tokenize(in+1, &tok1, &tok2, (char **) 0) != 2) { + puts("what?"); + break; + } + key = dupstring(tok1); + val = dupstring(tok2); + + if (!key || !val) { + puts("out of memory"); + free((void *) key); + free(val); + } + + if (!hash_alloc_insert(h, key, val)) { + puts("hash_alloc_insert failed"); + free((void *) key); + free(val); + break; + } + break; + case 'd': + if (tokenize(in+1, &tok1, (char **) 0) != 1) { + puts("what?"); + break; + } + hn = hash_lookup(h, tok1); + if (!hn) { + puts("hash_lookup failed"); + break; + } + val = hnode_get(hn); + key = hnode_getkey(hn); + hash_scan_delfree(h, hn); + free((void *) key); + free(val); + break; + case 'l': + if (tokenize(in+1, &tok1, (char **) 0) != 1) { + puts("what?"); + break; + } + hn = hash_lookup(h, tok1); + if (!hn) { + puts("hash_lookup failed"); + break; + } + val = hnode_get(hn); + puts(val); + break; + case 'n': + printf("%lu\n", (unsigned long) hash_size(h)); + break; + case 'c': + printf("%lu\n", (unsigned long) hash_count(h)); + break; + case 't': + hash_scan_begin(&hs, h); + while ((hn = hash_scan_next(&hs))) + printf("%s\t%s\n", (char*) hnode_getkey(hn), + (char*) hnode_get(hn)); + break; + case '+': + grow_table(h); /* private function */ + break; + case '-': + shrink_table(h); /* private function */ + break; + case 'q': + exit(0); + break; + case '\0': + break; + case 'p': + prompt = 1; + break; + case 's': + hash_set_allocator(h, new_node, del_node, NULL); + break; + default: + putchar('?'); + putchar('\n'); + break; + } + } + + return 0; +} + +#endif diff --git a/veejay-server/libhash/hash.h b/veejay-server/libhash/hash.h new file mode 100644 index 00000000..9677632b --- /dev/null +++ b/veejay-server/libhash/hash.h @@ -0,0 +1,240 @@ +/* + * Hash Table Data Type + * Copyright (C) 1997 Kaz Kylheku + * + * Free Software License: + * + * All rights are reserved by the author, with the following exceptions: + * Permission is granted to freely reproduce and distribute this software, + * possibly in exchange for a fee, provided that this copyright notice appears + * intact. Permission is also granted to adapt this software to produce + * derivative works, as long as the modified versions carry this copyright + * notice and additional notices stating that the work has been modified. + * This source code may be translated into executable form and incorporated + * into proprietary software; there is no requirement for such software to + * contain a copyright notice related to this source. + * + * $Id: hash.h,v 1.1.1.1 2004/10/27 23:48:59 niels Exp $ + * $Name: $ + */ + +#ifndef HASH_H +#define HASH_H + +#include +#ifdef KAZLIB_SIDEEFFECT_DEBUG +#include "sfx.h" +#endif + +/* + * Blurb for inclusion into C++ translation units + */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef unsigned long hashcount_t; +#define HASHCOUNT_T_MAX ULONG_MAX + +typedef unsigned long hash_val_t; +#define HASH_VAL_T_MAX ULONG_MAX + +extern int hash_val_t_bit; + +#ifndef HASH_VAL_T_BIT +#define HASH_VAL_T_BIT ((int) hash_val_t_bit) +#endif + +/* + * Hash chain node structure. + * Notes: + * 1. This preprocessing directive is for debugging purposes. The effect is + * that if the preprocessor symbol KAZLIB_OPAQUE_DEBUG is defined prior to the + * inclusion of this header, then the structure shall be declared as having + * the single member int __OPAQUE__. This way, any attempts by the + * client code to violate the principles of information hiding (by accessing + * the structure directly) can be diagnosed at translation time. However, + * note the resulting compiled unit is not suitable for linking. + * 2. This is a pointer to the next node in the chain. In the last node of a + * chain, this pointer is null. + * 3. The key is a pointer to some user supplied data that contains a unique + * identifier for each hash node in a given table. The interpretation of + * the data is up to the user. When creating or initializing a hash table, + * the user must supply a pointer to a function for comparing two keys, + * and a pointer to a function for hashing a key into a numeric value. + * 4. The value is a user-supplied pointer to void which may refer to + * any data object. It is not interpreted in any way by the hashing + * module. + * 5. The hashed key is stored in each node so that we don't have to rehash + * each key when the table must grow or shrink. + */ + +typedef struct hnode_t { + #if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG) /* 1 */ + struct hnode_t *hash_next; /* 2 */ + const void *hash_key; /* 3 */ + void *hash_data; /* 4 */ + hash_val_t hash_hkey; /* 5 */ + #else + int hash_dummy; + #endif +} hnode_t; + +/* + * The comparison function pointer type. A comparison function takes two keys + * and produces a value of -1 if the left key is less than the right key, a + * value of 0 if the keys are equal, and a value of 1 if the left key is + * greater than the right key. + */ + +typedef int (*hash_comp_t)(const void *, const void *); + +/* + * The hashing function performs some computation on a key and produces an + * integral value of type hash_val_t based on that key. For best results, the + * function should have a good randomness properties in *all* significant bits + * over the set of keys that are being inserted into a given hash table. In + * particular, the most significant bits of hash_val_t are most significant to + * the hash module. Only as the hash table expands are less significant bits + * examined. Thus a function that has good distribution in its upper bits but + * not lower is preferrable to one that has poor distribution in the upper bits + * but not the lower ones. + */ + +typedef hash_val_t (*hash_fun_t)(const void *); + +/* + * allocator functions + */ + +typedef hnode_t *(*hnode_alloc_t)(void *); +typedef void (*hnode_free_t)(hnode_t *, void *); + +/* + * This is the hash table control structure. It keeps track of information + * about a hash table, as well as the hash table itself. + * Notes: + * 1. Pointer to the hash table proper. The table is an array of pointers to + * hash nodes (of type hnode_t). If the table is empty, every element of + * this table is a null pointer. A non-null entry points to the first + * element of a chain of nodes. + * 2. This member keeps track of the size of the hash table---that is, the + * number of chain pointers. + * 3. The count member maintains the number of elements that are presently + * in the hash table. + * 4. The maximum count is the greatest number of nodes that can populate this + * table. If the table contains this many nodes, no more can be inserted, + * and the hash_isfull() function returns true. + * 5. The high mark is a population threshold, measured as a number of nodes, + * which, if exceeded, will trigger a table expansion. Only dynamic hash + * tables are subject to this expansion. + * 6. The low mark is a minimum population threshold, measured as a number of + * nodes. If the table population drops below this value, a table shrinkage + * will occur. Only dynamic tables are subject to this reduction. No table + * will shrink beneath a certain absolute minimum number of nodes. + * 7. This is the a pointer to the hash table's comparison function. The + * function is set once at initialization or creation time. + * 8. Pointer to the table's hashing function, set once at creation or + * initialization time. + * 9. The current hash table mask. If the size of the hash table is 2^N, + * this value has its low N bits set to 1, and the others clear. It is used + * to select bits from the result of the hashing function to compute an + * index into the table. + * 10. A flag which indicates whether the table is to be dynamically resized. It + * is set to 1 in dynamically allocated tables, 0 in tables that are + * statically allocated. + */ + +typedef struct hash_t { + #if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG) + struct hnode_t **hash_table; /* 1 */ + hashcount_t hash_nchains; /* 2 */ + hashcount_t hash_nodecount; /* 3 */ + hashcount_t hash_maxcount; /* 4 */ + hashcount_t hash_highmark; /* 5 */ + hashcount_t hash_lowmark; /* 6 */ + hash_comp_t hash_compare; /* 7 */ + hash_fun_t hash_function; /* 8 */ + hnode_alloc_t hash_allocnode; + hnode_free_t hash_freenode; + void *hash_context; + hash_val_t hash_mask; /* 9 */ + int hash_dynamic; /* 10 */ + #else + int hash_dummy; + #endif +} hash_t; + +/* + * Hash scanner structure, used for traversals of the data structure. + * Notes: + * 1. Pointer to the hash table that is being traversed. + * 2. Reference to the current chain in the table being traversed (the chain + * that contains the next node that shall be retrieved). + * 3. Pointer to the node that will be retrieved by the subsequent call to + * hash_scan_next(). + */ + +typedef struct hscan_t { + #if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG) + hash_t *hash_table; /* 1 */ + hash_val_t hash_chain; /* 2 */ + hnode_t *hash_next; /* 3 */ + #else + int hash_dummy; + #endif +} hscan_t; + +extern hash_t *hash_create(hashcount_t, hash_comp_t, hash_fun_t); +extern void hash_set_allocator(hash_t *, hnode_alloc_t, hnode_free_t, void *); +extern void hash_destroy(hash_t *); +extern void hash_free_nodes(hash_t *); +extern void hash_free(hash_t *); +extern hash_t *hash_init(hash_t *, hashcount_t, hash_comp_t, + hash_fun_t, hnode_t **, hashcount_t); +extern void hash_insert(hash_t *, hnode_t *, const void *); +extern hnode_t *hash_lookup(hash_t *, const void *); +extern hnode_t *hash_delete(hash_t *, hnode_t *); +extern int hash_alloc_insert(hash_t *, const void *, void *); +extern void hash_delete_free(hash_t *, hnode_t *); + +extern void hnode_put(hnode_t *, void *); +extern void *hnode_get(hnode_t *); +extern const void *hnode_getkey(hnode_t *); +extern hashcount_t hash_count(hash_t *); +extern hashcount_t hash_size(hash_t *); + +extern int hash_isfull(hash_t *); +extern int hash_isempty(hash_t *); + +extern void hash_scan_begin(hscan_t *, hash_t *); +extern hnode_t *hash_scan_next(hscan_t *); +extern hnode_t *hash_scan_delete(hash_t *, hnode_t *); +extern void hash_scan_delfree(hash_t *, hnode_t *); + +extern int hash_verify(hash_t *); + +extern hnode_t *hnode_create(void *); +extern hnode_t *hnode_init(hnode_t *, void *); +extern void hnode_destroy(hnode_t *); + +#if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG) +#ifdef KAZLIB_SIDEEFFECT_DEBUG +#define hash_isfull(H) (SFX_CHECK(H)->hash_nodecount == (H)->hash_maxcount) +#else +#define hash_isfull(H) ((H)->hash_nodecount == (H)->hash_maxcount) +#endif +#define hash_isempty(H) ((H)->hash_nodecount == 0) +#define hash_count(H) ((H)->hash_nodecount) +#define hash_size(H) ((H)->hash_nchains) +#define hnode_get(N) ((N)->hash_data) +#define hnode_getkey(N) ((N)->hash_key) +#define hnode_put(N, V) ((N)->hash_data = (V)) +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/veejay-server/liblavjpeg/Makefile.am b/veejay-server/liblavjpeg/Makefile.am new file mode 100644 index 00000000..0e11e297 --- /dev/null +++ b/veejay-server/liblavjpeg/Makefile.am @@ -0,0 +1,7 @@ +# Makefile for veejay +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/libel $(MJPEGTOOLS_CFLAGS) $(JPEG_CFLAGS) +LAVJPEG_LIB_FILE = liblavjpeg.la +noinst_LTLIBRARIES = $(LAVJPEG_LIB_FILE) +liblavjpeg_la_SOURCES = jpegutils.c diff --git a/veejay-server/liblavjpeg/Makefile.in b/veejay-server/liblavjpeg/Makefile.in new file mode 100644 index 00000000..38a65aec --- /dev/null +++ b/veejay-server/liblavjpeg/Makefile.in @@ -0,0 +1,507 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = liblavjpeg +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +liblavjpeg_la_LIBADD = +am_liblavjpeg_la_OBJECTS = jpegutils.lo +liblavjpeg_la_OBJECTS = $(am_liblavjpeg_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(liblavjpeg_la_SOURCES) +DIST_SOURCES = $(liblavjpeg_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Makefile for veejay +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/libel $(MJPEGTOOLS_CFLAGS) $(JPEG_CFLAGS) +LAVJPEG_LIB_FILE = liblavjpeg.la +noinst_LTLIBRARIES = $(LAVJPEG_LIB_FILE) +liblavjpeg_la_SOURCES = jpegutils.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liblavjpeg/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu liblavjpeg/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +liblavjpeg.la: $(liblavjpeg_la_OBJECTS) $(liblavjpeg_la_DEPENDENCIES) + $(LINK) $(liblavjpeg_la_OBJECTS) $(liblavjpeg_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpegutils.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/liblavjpeg/jpegutils.c b/veejay-server/liblavjpeg/jpegutils.c new file mode 100644 index 00000000..dcd58ec5 --- /dev/null +++ b/veejay-server/liblavjpeg/jpegutils.c @@ -0,0 +1,1104 @@ +/* + * jpegutils.c: Some Utility programs for dealing with + * JPEG encoded images + * + * Copyright (C) 1999 Rainer Johanni + * Copyright (C) 2001 pHilipp Zabel + * + * based on jdatasrc.c and jdatadst.c from the Independent + * JPEG Group's software by Thomas G. Lane + * + * 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. + */ + +#include +#ifdef HAVE_JPEG +#include +#include +#include +#include + +#include +#include + +#include + +#include "jpegutils.h" +#include + + /* + * jpeg_data: buffer with input / output jpeg + * len: Length of jpeg buffer + * itype: 0: Not interlaced + * 1: Interlaced, Top field first + * 2: Interlaced, Bottom field first + * ctype Chroma format for decompression. + * Currently always 420 and hence ignored. + * raw0 buffer with input / output raw Y channel + * raw1 buffer with input / output raw U/Cb channel + * raw2 buffer with input / output raw V/Cr channel + * width width of Y channel (width of U/V is width/2) + * height height of Y channel (height of U/V is height/2) + */ + + +static void jpeg_buffer_src(j_decompress_ptr cinfo, unsigned char *buffer, + long num); +static void jpeg_buffer_dest(j_compress_ptr cinfo, unsigned char *buffer, + long len); +static void jpeg_skip_ff(j_decompress_ptr cinfo); + +/******************************************************************* + * * + * The following routines define a JPEG Source manager which * + * just reads from a given buffer (instead of a file as in * + * the jpeg library) * + * * + *******************************************************************/ + + +/* + * Initialize source --- called by jpeg_read_header + * before any data is actually read. + */ + +static void init_source(j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Fill the input buffer --- called whenever buffer is emptied. + * + * Should never be called since all data should be allready provided. + * Is nevertheless sometimes called - sets the input buffer to data + * which is the JPEG EOI marker; + * + */ + +static uint8_t EOI_data[2] = { 0xFF, 0xD9 }; + +static boolean fill_input_buffer(j_decompress_ptr cinfo) +{ + cinfo->src->next_input_byte = EOI_data; + cinfo->src->bytes_in_buffer = 2; + return TRUE; +} + + +/* + * Skip data --- used to skip over a potentially large amount of + * uninteresting data (such as an APPn marker). + * + */ + +static void skip_input_data(j_decompress_ptr cinfo, long num_bytes) +{ + if (num_bytes > 0) { + if (num_bytes > (long) cinfo->src->bytes_in_buffer) + num_bytes = (long) cinfo->src->bytes_in_buffer; + cinfo->src->next_input_byte += (size_t) num_bytes; + cinfo->src->bytes_in_buffer -= (size_t) num_bytes; + } +} + + +/* + * Terminate source --- called by jpeg_finish_decompress + * after all data has been read. Often a no-op. + */ + +static void term_source(j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Prepare for input from a data buffer. + */ + +static void +jpeg_buffer_src(j_decompress_ptr cinfo, unsigned char *buffer, long num) +{ + /* The source object and input buffer are made permanent so that a series + * of JPEG images can be read from the same buffer by calling jpeg_buffer_src + * only before the first one. (If we discarded the buffer at the end of + * one image, we'd likely lose the start of the next one.) + * This makes it unsafe to use this manager and a different source + * manager serially with the same JPEG object. Caveat programmer. + */ + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, + JPOOL_PERMANENT, + sizeof(struct jpeg_source_mgr)); + } + + cinfo->src->init_source = init_source; + cinfo->src->fill_input_buffer = fill_input_buffer; + cinfo->src->skip_input_data = skip_input_data; + cinfo->src->resync_to_restart = jpeg_resync_to_restart; /* use default method */ + cinfo->src->term_source = term_source; + cinfo->src->bytes_in_buffer = num; + cinfo->src->next_input_byte = (JOCTET *) buffer; +} + + +/* + * jpeg_skip_ff is not a part of the source manager but it is + * particularly useful when reading several images from the same buffer: + * It should be called to skip padding 0xff bytes beetween images. + */ + +static void jpeg_skip_ff(j_decompress_ptr cinfo) +{ + while (cinfo->src->bytes_in_buffer > 1 + && cinfo->src->next_input_byte[0] == 0xff + && cinfo->src->next_input_byte[1] == 0xff) { + cinfo->src->bytes_in_buffer--; + cinfo->src->next_input_byte++; + } +} + + +/******************************************************************* + * * + * The following routines define a JPEG Destination manager * + * which just reads from a given buffer (instead of a file * + * as in the jpeg library) * + * * + *******************************************************************/ + + +/* + * Initialize destination --- called by jpeg_start_compress + * before any data is actually written. + */ + +static void init_destination(j_compress_ptr cinfo) +{ + /* No work necessary here */ +} + + +/* + * Empty the output buffer --- called whenever buffer fills up. + * + * Should never be called since all data should be written to the buffer. + * If it gets called, the given jpeg buffer was too small. + * + */ + +static boolean empty_output_buffer(j_compress_ptr cinfo) +{ + /*FIXME: */ + mjpeg_error("Given jpeg buffer was too small!"); + ERREXIT(cinfo, JERR_BUFFER_SIZE); /* shouldn't be FILE_WRITE but BUFFER_OVERRUN! */ + return TRUE; +} + + +/* + * Terminate destination --- called by jpeg_finish_compress + * after all data has been written. Usually needs to flush buffer. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +static void term_destination(j_compress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Prepare for output to a stdio stream. + * The caller must have already opened the stream, and is responsible + * for closing it after finishing compression. + */ + +static void +jpeg_buffer_dest(j_compress_ptr cinfo, unsigned char *buf, long len) +{ + + /* The destination object is made permanent so that multiple JPEG images + * can be written to the same file without re-executing jpeg_stdio_dest. + * This makes it dangerous to use this manager and a different destination + * manager serially with the same JPEG object, because their private object + * sizes may be different. Caveat programmer. + */ + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, + JPOOL_PERMANENT, + sizeof(struct + jpeg_destination_mgr)); + } + + cinfo->dest->init_destination = init_destination; + cinfo->dest->empty_output_buffer = empty_output_buffer; + cinfo->dest->term_destination = term_destination; + cinfo->dest->free_in_buffer = len; + cinfo->dest->next_output_byte = (JOCTET *) buf; +} + + +/******************************************************************* + * * + * decode_jpeg_data: Decode a (possibly interlaced) JPEG frame * + * * + *******************************************************************/ + +/* + * ERROR HANDLING: + * + * We want in all cases to return to the user. + * The following kind of error handling is from the + * example.c file in the Independent JPEG Group's JPEG software + */ + +struct my_error_mgr { + struct jpeg_error_mgr pub; /* "public" fields */ + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +static void my_error_exit(j_common_ptr cinfo) +{ + /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ + struct my_error_mgr *myerr = (struct my_error_mgr *) cinfo->err; + + /* Always display the message. */ + /* We could postpone this until after returning, if we chose. */ + (*cinfo->err->output_message) (cinfo); + + /* Return control to the setjmp point */ + longjmp(myerr->setjmp_buffer, 1); +} + +#define MAX_LUMA_WIDTH 4096 +#define MAX_CHROMA_WIDTH 2048 + +static unsigned char buf0[16][MAX_LUMA_WIDTH]; +static unsigned char buf1[8][MAX_CHROMA_WIDTH]; +static unsigned char buf2[8][MAX_CHROMA_WIDTH]; +static unsigned char chr1[8][MAX_CHROMA_WIDTH]; +static unsigned char chr2[8][MAX_CHROMA_WIDTH]; + + + +#if 1 /* generation of 'std' Huffman tables... */ + +static void add_huff_table(j_decompress_ptr dinfo, + JHUFF_TBL ** htblptr, + const UINT8 * bits, const UINT8 * val) +/* Define a Huffman table */ +{ + int nsymbols, len; + + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) dinfo); + + /* Copy the number-of-symbols-of-each-code-length counts */ + memcpy((*htblptr)->bits, bits, sizeof((*htblptr)->bits)); + + /* Validate the counts. We do this here mainly so we can copy the right + * number of symbols from the val[] array, without risking marching off + * the end of memory. jchuff.c will do a more thorough test later. + */ + nsymbols = 0; + for (len = 1; len <= 16; len++) + nsymbols += bits[len]; + if (nsymbols < 1 || nsymbols > 256) + mjpeg_error_exit1("jpegutils.c: add_huff_table failed badly. "); + + memcpy((*htblptr)->huffval, val, nsymbols * sizeof(UINT8)); +} + + + +static void std_huff_tables(j_decompress_ptr dinfo) +/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ +/* IMPORTANT: these are only valid for 8-bit data precision! */ +{ + static const UINT8 bits_dc_luminance[17] = + { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_luminance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_dc_chrominance[17] = + { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_chrominance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_ac_luminance[17] = + { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, + 0x7d + }; + static const UINT8 val_ac_luminance[] = + { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, + 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, + 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, + 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, + 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, + 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, + 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, + 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, + 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, + 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, + 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, + 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, + 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, + 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, + 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, + 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa + }; + + static const UINT8 bits_ac_chrominance[17] = + { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, + 0x77 + }; + static const UINT8 val_ac_chrominance[] = + { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, + 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, + 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, + 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, + 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, + 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, + 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, + 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, + 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, + 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, + 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, + 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, + 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, + 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, + 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, + 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa + }; + + add_huff_table(dinfo, &dinfo->dc_huff_tbl_ptrs[0], + bits_dc_luminance, val_dc_luminance); + add_huff_table(dinfo, &dinfo->ac_huff_tbl_ptrs[0], + bits_ac_luminance, val_ac_luminance); + add_huff_table(dinfo, &dinfo->dc_huff_tbl_ptrs[1], + bits_dc_chrominance, val_dc_chrominance); + add_huff_table(dinfo, &dinfo->ac_huff_tbl_ptrs[1], + bits_ac_chrominance, val_ac_chrominance); +} + + + +static void guarantee_huff_tables(j_decompress_ptr dinfo) +{ + if ((dinfo->dc_huff_tbl_ptrs[0] == NULL) && + (dinfo->dc_huff_tbl_ptrs[1] == NULL) && + (dinfo->ac_huff_tbl_ptrs[0] == NULL) && + (dinfo->ac_huff_tbl_ptrs[1] == NULL)) { + mjpeg_debug("Generating standard Huffman tables for this frame."); + std_huff_tables(dinfo); + } +} + + +#endif /* ...'std' Huffman table generation */ + + + +/* + * jpeg_data: Buffer with jpeg data to decode + * len: Length of buffer + * itype: 0: Not interlaced + * 1: Interlaced, Top field first + * 2: Interlaced, Bottom field first + * ctype Chroma format for decompression. + * Currently always 420 and hence ignored. + */ + +int decode_jpeg_raw(unsigned char *jpeg_data, int len, + int itype, int ctype,int _dct_method, int width, int height, + unsigned char *raw0, unsigned char *raw1, + unsigned char *raw2) +{ + int numfields, hsf[3], vsf[3], field, yl, yc, x, y = + 0, i, xsl, xsc, xs, xd, hdown; + + JSAMPROW row0[16] = { buf0[0], buf0[1], buf0[2], buf0[3], + buf0[4], buf0[5], buf0[6], buf0[7], + buf0[8], buf0[9], buf0[10], buf0[11], + buf0[12], buf0[13], buf0[14], buf0[15] + }; + JSAMPROW row1[8] = { buf1[0], buf1[1], buf1[2], buf1[3], + buf1[4], buf1[5], buf1[6], buf1[7] + }; + JSAMPROW row2[16] = { buf2[0], buf2[1], buf2[2], buf2[3], + buf2[4], buf2[5], buf2[6], buf2[7] + }; + JSAMPROW row1_444[16], row2_444[16]; + JSAMPARRAY scanarray[3] = { row0, row1, row2 }; + struct jpeg_decompress_struct dinfo; + struct my_error_mgr jerr; + + /* We set up the normal JPEG error routines, then override error_exit. */ + dinfo.err = jpeg_std_error(&jerr.pub); + jerr.pub.error_exit = my_error_exit; + + /* Establish the setjmp return context for my_error_exit to use. */ + if (setjmp(jerr.setjmp_buffer)) { + /* If we get here, the JPEG code has signaled an error. */ + jpeg_destroy_decompress(&dinfo); + return -1; + } + + jpeg_create_decompress(&dinfo); + + jpeg_buffer_src(&dinfo, jpeg_data, len); + + /* Read header, make some checks and try to figure out what the + user really wants */ + + jpeg_read_header(&dinfo, TRUE); + dinfo.raw_data_out = TRUE; + dinfo.out_color_space = JCS_YCbCr; + dinfo.dct_method = JDCT_FLOAT;//JDCT_DEFAULT; + guarantee_huff_tables(&dinfo); + jpeg_start_decompress(&dinfo); + + if (dinfo.output_components != 3) { + mjpeg_error("Output components of JPEG image = %d, must be 3", + dinfo.output_components); + goto ERR_EXIT; + } + + for (i = 0; i < 3; i++) { + hsf[i] = dinfo.comp_info[i].h_samp_factor; + vsf[i] = dinfo.comp_info[i].v_samp_factor; + } + + //mjpeg_info( "Sampling factors, hsf=(%d, %d, %d) vsf=(%d, %d, %d) !", hsf[0], hsf[1], hsf[2], vsf[0], vsf[1], vsf[2]); + if ((hsf[0] != 2 && hsf[0] != 1) || hsf[1] != 1 || hsf[2] != 1 || + (vsf[0] != 1 && vsf[0] != 2) || vsf[1] != 1 || vsf[2] != 1) { + mjpeg_error + ("Unsupported sampling factors, hsf=(%d, %d, %d) vsf=(%d, %d, %d) !", + hsf[0], hsf[1], hsf[2], vsf[0], vsf[1], vsf[2]); + goto ERR_EXIT; + } + + if (hsf[0] == 1) { + if (height % 8 != 0) { + mjpeg_error + ("YUV 4:4:4 sampling, but image height %d not dividable by 8 !\n", + height); + goto ERR_EXIT; + } + + mjpeg_info + ("YUV 4:4:4 sampling encountered ! Allocating special row buffer\n"); + for (y = 0; y < 16; y++) // allocate a special buffer for the extra sampling depth + { + //mjpeg_info("YUV 4:4:4 %d.\n",y); + row1_444[y] = + (unsigned char *) malloc(dinfo.output_width * + sizeof(char)); + row2_444[y] = + (unsigned char *) malloc(dinfo.output_width * + sizeof(char)); + } + //mjpeg_info("YUV 4:4:4 sampling encountered ! Allocating done.\n"); + scanarray[1] = row1_444; + scanarray[2] = row2_444; + } + + /* Height match image height or be exact twice the image height */ + + if (dinfo.output_height == height) { + numfields = 1; + } else if (2 * dinfo.output_height == height) { + numfields = 2; + } else { + mjpeg_error + ("Read JPEG: requested height = %d, height of image = %d", + height, dinfo.output_height); + goto ERR_EXIT; + } + + /* Width is more flexible */ + + if (dinfo.output_width > MAX_LUMA_WIDTH) { + mjpeg_error("Image width of %d exceeds max", dinfo.output_width); + goto ERR_EXIT; + } + if (width < 2 * dinfo.output_width / 3) { + /* Downclip 2:1 */ + + hdown = 1; + if (2 * width < dinfo.output_width) + xsl = (dinfo.output_width - 2 * width) / 2; + else + xsl = 0; + } else if (width == 2 * dinfo.output_width / 3) { + /* special case of 3:2 downsampling */ + + hdown = 2; + xsl = 0; + } else { + /* No downsampling */ + + hdown = 0; + if (width < dinfo.output_width) + xsl = (dinfo.output_width - width) / 2; + else + xsl = 0; + } + + /* Make xsl even, calculate xsc */ + + xsl = xsl & ~1; + xsc = xsl / 2; + + yl = yc = 0; + + for (field = 0; field < numfields; field++) { + if (field > 0) { + jpeg_read_header(&dinfo, TRUE); + dinfo.raw_data_out = TRUE; + dinfo.out_color_space = JCS_YCbCr; + dinfo.dct_method = JDCT_FLOAT; //JDCT_DEFAULT; + jpeg_start_decompress(&dinfo); + } + + if (numfields == 2) { + switch (itype) { + case LAV_INTER_TOP_FIRST: + yl = yc = field; + break; + case LAV_INTER_BOTTOM_FIRST: + yl = yc = (1 - field); + break; + default: + mjpeg_error("Input is interlaced but no interlacing set"); + goto ERR_EXIT; + } + } else + yl = yc = 0; + + while (dinfo.output_scanline < dinfo.output_height) { + /* read raw data */ + jpeg_read_raw_data(&dinfo, scanarray, 8 * vsf[0]); + + for (y = 0; y < 8 * vsf[0]; yl += numfields, y++) { + xd = yl * width; + xs = xsl; + + if (hdown == 0) + for (x = 0; x < width; x++) + raw0[xd++] = row0[y][xs++]; + else if (hdown == 1) + for (x = 0; x < width; x++, xs += 2) + raw0[xd++] = (row0[y][xs] + row0[y][xs + 1]) >> 1; + else + for (x = 0; x < width / 2; x++, xd += 2, xs += 3) { + raw0[xd] = (2 * row0[y][xs] + row0[y][xs + 1]) / 3; + raw0[xd + 1] = + (2 * row0[y][xs + 2] + row0[y][xs + 1]) / 3; + } + } + + /* Horizontal downsampling of chroma */ + + for (y = 0; y < 8; y++) { + xs = xsc; + + if (hsf[0] == 1) + for (x = 0; x < width / 2; x++, xs++) { + row1[y][xs] = + (row1_444[y][2 * x] + + row1_444[y][2 * x + 1]) >> 1; + row2[y][xs] = + (row2_444[y][2 * x] + + row2_444[y][2 * x + 1]) >> 1; + } + + xs = xsc; + if (hdown == 0) + for (x = 0; x < width / 2; x++, xs++) { + chr1[y][x] = row1[y][xs]; + chr2[y][x] = row2[y][xs]; + } else if (hdown == 1) + for (x = 0; x < width / 2; x++, xs += 2) { + chr1[y][x] = (row1[y][xs] + row1[y][xs + 1]) >> 1; + chr2[y][x] = (row2[y][xs] + row2[y][xs + 1]) >> 1; + } else + for (x = 0; x < width / 2; x += 2, xs += 3) { + chr1[y][x] = + (2 * row1[y][xs] + row1[y][xs + 1]) / 3; + chr1[y][x + 1] = + (2 * row1[y][xs + 2] + row1[y][xs + 1]) / 3; + chr2[y][x] = + (2 * row2[y][xs] + row2[y][xs + 1]) / 3; + chr2[y][x + 1] = + (2 * row2[y][xs + 2] + row2[y][xs + 1]) / 3; + } + } + + /* Vertical downsampling of chroma */ + + if (vsf[0] == 1) { + /* Really downclip */ + for (y = 0; y < 8 /*&& yc < height/2 */ ; + y += 2, yc += numfields) { + xd = yc * width / 2; + for (x = 0; x < width / 2; x++, xd++) { + assert(xd < (width * height / 4)); + raw1[xd] = (chr1[y][x] + chr1[y + 1][x]) >> 1; + raw2[xd] = (chr2[y][x] + chr2[y + 1][x]) >> 1; + } + } + + } else { + /* Just copy */ + for (y = 0; y < 8 /*&& yc < height/2 */ ; + y++, yc += numfields) { + xd = yc * width / 2; + for (x = 0; x < width / 2; x++, xd++) { + raw1[xd] = chr1[y][x]; + raw2[xd] = chr2[y][x]; + } + } + } + } + + (void) jpeg_finish_decompress(&dinfo); + if (field == 0 && numfields > 1) + jpeg_skip_ff(&dinfo); + } + + if (hsf[0] == 1) { + //mjpeg_info("YUV 4:4:4 sampling encountered ! Deallocating special row buffer\n"); + for (y = 0; y < 16; y++) // allocate a special buffer for the extra sampling depth + { + free(row1_444[y]); + free(row2_444[y]); + } + } + + jpeg_destroy_decompress(&dinfo); + return 0; + + ERR_EXIT: + jpeg_destroy_decompress(&dinfo); + return -1; +} + +/* + * jpeg_data: Buffer with jpeg data to decode, must be grayscale mode + * len: Length of buffer + * itype: 0: Not interlaced + * 1: Interlaced, Top field first + * 2: Interlaced, Bottom field first + * ctype Chroma format for decompression. + * Currently always 420 and hence ignored. + */ + + +int decode_jpeg_gray_raw(unsigned char *jpeg_data, int len, + int itype, int ctype,int _dct_method, int width, int height, + unsigned char *raw0, unsigned char *raw1, + unsigned char *raw2) +{ + int numfields, hsf[3], vsf[3], field, yl, yc, x, y, xsl, xsc, xs, xd, + hdown; + + JSAMPROW row0[16] = { buf0[0], buf0[1], buf0[2], buf0[3], + buf0[4], buf0[5], buf0[6], buf0[7], + buf0[8], buf0[9], buf0[10], buf0[11], + buf0[12], buf0[13], buf0[14], buf0[15] + }; + JSAMPARRAY scanarray[3] = { row0 }; + struct jpeg_decompress_struct dinfo; + struct my_error_mgr jerr; + + mjpeg_info("decoding jpeg gray\n"); + + /* We set up the normal JPEG error routines, then override error_exit. */ + dinfo.err = jpeg_std_error(&jerr.pub); + jerr.pub.error_exit = my_error_exit; + + /* Establish the setjmp return context for my_error_exit to use. */ + if (setjmp(jerr.setjmp_buffer)) { + /* If we get here, the JPEG code has signaled an error. */ + jpeg_destroy_decompress(&dinfo); + return -1; + } + + jpeg_create_decompress(&dinfo); + + jpeg_buffer_src(&dinfo, jpeg_data, len); + + /* Read header, make some checks and try to figure out what the + user really wants */ + + jpeg_read_header(&dinfo, TRUE); + dinfo.raw_data_out = TRUE; + dinfo.out_color_space = JCS_GRAYSCALE; + dinfo.dct_method = JDCT_FLOAT; //JDCT_DEFAULT; + + if (dinfo.jpeg_color_space != JCS_GRAYSCALE) { + mjpeg_error + ("FATAL: Expected grayscale colorspace for JPEG raw decoding"); + goto ERR_EXIT; + } + + guarantee_huff_tables(&dinfo); + jpeg_start_decompress(&dinfo); + + hsf[0] = 1; + hsf[1] = 1; + hsf[2] = 1; + vsf[0] = 1; + vsf[1] = 1; + vsf[2] = 1; + + /* Height match image height or be exact twice the image height */ + + if (dinfo.output_height == height) { + numfields = 1; + } else if (2 * dinfo.output_height == height) { + numfields = 2; + } else { + mjpeg_error + ("Read JPEG: requested height = %d, height of image = %d", + height, dinfo.output_height); + goto ERR_EXIT; + } + + /* Width is more flexible */ + + if (dinfo.output_width > MAX_LUMA_WIDTH) { + mjpeg_error("Image width of %d exceeds max", dinfo.output_width); + goto ERR_EXIT; + } + if (width < 2 * dinfo.output_width / 3) { + /* Downclip 2:1 */ + + hdown = 1; + if (2 * width < dinfo.output_width) + xsl = (dinfo.output_width - 2 * width) / 2; + else + xsl = 0; + } else if (width == 2 * dinfo.output_width / 3) { + /* special case of 3:2 downsampling */ + + hdown = 2; + xsl = 0; + } else { + /* No downsampling */ + + hdown = 0; + if (width < dinfo.output_width) + xsl = (dinfo.output_width - width) / 2; + else + xsl = 0; + } + + /* Make xsl even, calculate xsc */ + + xsl = xsl & ~1; + xsc = xsl / 2; + + yl = yc = 0; + + for (field = 0; field < numfields; field++) { + if (field > 0) { + jpeg_read_header(&dinfo, TRUE); + dinfo.raw_data_out = TRUE; + dinfo.out_color_space = JCS_GRAYSCALE; + dinfo.dct_method = JDCT_FLOAT;//DCT_DEFAULT; + jpeg_start_decompress(&dinfo); + } + + if (numfields == 2) { + switch (itype) { + case LAV_INTER_TOP_FIRST: + yl = yc = field; + break; + case LAV_INTER_BOTTOM_FIRST: + yl = yc = (1 - field); + break; + default: + mjpeg_error("Input is interlaced but no interlacing set"); + goto ERR_EXIT; + } + } else + yl = yc = 0; + + while (dinfo.output_scanline < dinfo.output_height) { + jpeg_read_raw_data(&dinfo, scanarray, 16); + + for (y = 0; y < 8 * vsf[0]; yl += numfields, y++) { + xd = yl * width; + xs = xsl; + + if (hdown == 0) // no horiz downsampling + for (x = 0; x < width; x++) + raw0[xd++] = row0[y][xs++]; + else if (hdown == 1) // half the res + for (x = 0; x < width; x++, xs += 2) + raw0[xd++] = (row0[y][xs] + row0[y][xs + 1]) >> 1; + else // 2:3 downsampling + for (x = 0; x < width / 2; x++, xd += 2, xs += 3) { + raw0[xd] = (2 * row0[y][xs] + row0[y][xs + 1]) / 3; + raw0[xd + 1] = + (2 * row0[y][xs + 2] + row0[y][xs + 1]) / 3; + } + } + + //mjpeg_info("/* Horizontal downsampling of chroma - in Grayscale, all this is ZERO ! */"); + + for (y = 0; y < 8; y++) { + xs = xsc; + + if (hdown == 0) + for (x = 0; x < width / 2; x++, xs++) { + chr1[y][x] = 0; //row1[y][xs]; + chr2[y][x] = 0; //row2[y][xs]; + } else if (hdown == 1) + for (x = 0; x < width / 2; x++, xs += 2) { + chr1[y][x] = 0; //(row1[y][xs] + row1[y][xs + 1]) >> 1; + chr2[y][x] = 0; //(row2[y][xs] + row2[y][xs + 1]) >> 1; + } else + for (x = 0; x < width / 2; x += 2, xs += 3) { + chr1[y][x] = 0; //(2 * row1[y][xs] + row1[y][xs + 1]) / 3; + chr1[y][x + 1] = 0; + //(2 * row1[y][xs + 2] + row1[y][xs + 1]) / 3; + chr2[y][x] = 0; // (2 * row2[y][xs] + row2[y][xs + 1]) / 3; + chr2[y][x + 1] = 0; + //(2 * row2[y][xs + 2] + row2[y][xs + 1]) / 3; + } + } + + //mjpeg_info("/* Vertical downsampling of chroma, line %d, max %d */", dinfo.output_scanline, dinfo.output_height); + + if (vsf[0] == 1) { + /* Really downclip */ + for (y = 0; y < 8; y += 2, yc += numfields) { + xd = yc * width / 2; + for (x = 0; x < width / 2; x++, xd++) { + raw1[xd] = 127; //(chr1[y][x] + chr1[y + 1][x]) >> 1; + raw2[xd] = 127; //(chr2[y][x] + chr2[y + 1][x]) >> 1; + } + } + } else { + /* Just copy */ + + for (y = 0; y < 8; y++, yc += numfields) { + xd = yc * width / 2; + for (x = 0; x < width / 2; x++, xd++) { + raw1[xd] = 127; //chr1[y][x]; + raw2[xd] = 127; //chr2[y][x]; + } + } + } + } + + (void) jpeg_finish_decompress(&dinfo); + if (field == 0 && numfields > 1) + jpeg_skip_ff(&dinfo); + } + + jpeg_destroy_decompress(&dinfo); + return 0; + + ERR_EXIT: + jpeg_destroy_decompress(&dinfo); + return -1; +} + + +/******************************************************************* + * * + * encode_jpeg_data: Compress raw YCbCr data (output JPEG * + * may be interlaced * + * * + *******************************************************************/ + + /* + * jpeg_data: Buffer to hold output jpeg + * len: Length of buffer + * itype: 0: Not interlaced + * 1: Interlaced, Top field first + * 2: Interlaced, Bottom field first + * ctype Chroma format for decompression. + * Currently always 420 and hence ignored. + */ + +int encode_jpeg_raw(unsigned char *jpeg_data, int len, int quality,int dct_method, + int itype, int ctype, int width, int height, + unsigned char *raw0, unsigned char *raw1, + unsigned char *raw2) +{ + int numfields, field, yl, yc, y, i; + + JSAMPROW row0[16] = { buf0[0], buf0[1], buf0[2], buf0[3], + buf0[4], buf0[5], buf0[6], buf0[7], + buf0[8], buf0[9], buf0[10], buf0[11], + buf0[12], buf0[13], buf0[14], buf0[15] + }; + JSAMPROW row1[8] = { buf1[0], buf1[1], buf1[2], buf1[3], + buf1[4], buf1[5], buf1[6], buf1[7] + }; + JSAMPROW row2[8] = { buf2[0], buf2[1], buf2[2], buf2[3], + buf2[4], buf2[5], buf2[6], buf2[7] + }; + JSAMPARRAY scanarray[3] = { row0, row1, row2 }; + + struct jpeg_compress_struct cinfo; + struct my_error_mgr jerr; + + /* We set up the normal JPEG error routines, then override error_exit. */ + cinfo.err = jpeg_std_error(&jerr.pub); + jerr.pub.error_exit = my_error_exit; + + /* Establish the setjmp return context for my_error_exit to use. */ + if (setjmp(jerr.setjmp_buffer)) { + /* If we get here, the JPEG code has signaled an error. */ + jpeg_destroy_compress(&cinfo); + return -1; + } + + jpeg_create_compress(&cinfo); + + jpeg_buffer_dest(&cinfo, jpeg_data, len); + + /* Set some jpeg header fields */ + + cinfo.input_components = 3; + jpeg_set_defaults(&cinfo); + jpeg_set_quality(&cinfo, quality, FALSE); + + cinfo.raw_data_in = TRUE; + cinfo.in_color_space = JCS_YCbCr; + cinfo.dct_method = JDCT_FLOAT;// CT_DEFAULT; + + cinfo.input_gamma = 1.0; + + cinfo.comp_info[0].h_samp_factor = 2; + cinfo.comp_info[0].v_samp_factor = 1; /*1||2 */ + cinfo.comp_info[1].h_samp_factor = 1; + cinfo.comp_info[1].v_samp_factor = 1; + cinfo.comp_info[2].h_samp_factor = 1; /*1||2 */ + cinfo.comp_info[2].v_samp_factor = 1; + + + if ((width > 4096) || (height > 4096)) { + mjpeg_error + ("Image dimensions (%dx%d) exceed veejay' max (4096x4096)", + width, height); + goto ERR_EXIT; + } + if ((width % 16) || (height % 16)) { + mjpeg_error("Image dimensions (%dx%d) not multiples of 16", width, + height); + goto ERR_EXIT; + } + cinfo.image_width = width; + switch (itype) { + case LAV_INTER_TOP_FIRST: + case LAV_INTER_BOTTOM_FIRST: /* interlaced */ + numfields = 2; + break; + default: + numfields = 1; + if (height > 2048) { + mjpeg_error + ("Image height (%d) exceeds lavtools max for non-interlaced frames", + height); + goto ERR_EXIT; + } + } + cinfo.image_height = height / numfields; + + yl = yc = 0; /* y luma, chroma */ + + for (field = 0; field < numfields; field++) { + + jpeg_start_compress(&cinfo, FALSE); + + if (numfields == 2) { + static const JOCTET marker0[40]; + + jpeg_write_marker(&cinfo, JPEG_APP0, marker0, 14); + jpeg_write_marker(&cinfo, JPEG_APP0 + 1, marker0, 40); + + switch (itype) { + case LAV_INTER_TOP_FIRST: /* top field first */ + yl = yc = field; + break; + case LAV_INTER_BOTTOM_FIRST: /* bottom field first */ + yl = yc = (1 - field); + break; + default: + mjpeg_error("Input is interlaced but no interlacing set"); + goto ERR_EXIT; + } + } else + yl = yc = 0; + + while (cinfo.next_scanline < cinfo.image_height) { + + for (y = 0; y < 8 * cinfo.comp_info[0].v_samp_factor; + yl += numfields, y++) { + row0[y] = &raw0[yl * width]; + } + for (y = 0; y < 8; y++) { + row1[y] = &raw1[yc * width / 2]; + row2[y] = &raw2[yc * width / 2]; + if (y % 2) + yc += numfields; + } + + jpeg_write_raw_data(&cinfo, scanarray, + 8 * cinfo.comp_info[0].v_samp_factor); + + } + + (void) jpeg_finish_compress(&cinfo); + } + + /* FIXME */ + i = len - cinfo.dest->free_in_buffer; + + jpeg_destroy_compress(&cinfo); + + return i; /* size of jpeg */ + + ERR_EXIT: + jpeg_destroy_compress(&cinfo); + return -1; +} +#endif diff --git a/veejay-server/liblavjpeg/jpegutils.h b/veejay-server/liblavjpeg/jpegutils.h new file mode 100644 index 00000000..6db0105f --- /dev/null +++ b/veejay-server/liblavjpeg/jpegutils.h @@ -0,0 +1,59 @@ +/* + * jpegutils.h: Some Utility programs for dealing with + * JPEG encoded images + * + * Copyright (C) 1999 Rainer Johanni + * Copyright (C) 2001 pHilipp Zabel + * + * based on jdatasrc.c and jdatadst.c from the Independent + * JPEG Group's software by Thomas G. Lane + * + * 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. + */ +#ifndef __JPEGUTILS_H__ +#define __JPEGUTILS_H__ + + /* + * jpeg_data: buffer with input / output jpeg + * len: Length of jpeg buffer + * itype: LAV_INTER_NONE: Not interlaced + * LAV_INTER_TOP_FIRST: Interlaced, top-field-first + * LAV_INTER_BOTTOM_FIRST: Interlaced, bottom-field-first + * ctype Chroma format for decompression. + * Currently always 420 and hence ignored. + * dtype DCT Method ( + * raw0 buffer with input / output raw Y channel + * raw1 buffer with input / output raw U/Cb channel + * raw2 buffer with input / output raw V/Cr channel + * width width of Y channel (width of U/V is width/2) + * height height of Y channel (height of U/V is height/2) + */ + +int decode_jpeg_raw(unsigned char *jpeg_data, int len, + int itype, int ctype,int dct_method, int width, int height, + unsigned char *raw0, unsigned char *raw1, + unsigned char *raw2); +int decode_jpeg_gray_raw(unsigned char *jpeg_data, int len, + int itype, int ctype,int dct, int width, int height, + unsigned char *raw0, unsigned char *raw1, + unsigned char *raw2); +int encode_jpeg_raw(unsigned char *jpeg_data, int len, int quality,int dct, + int itype, int ctype, int width, int height, + unsigned char *raw0, unsigned char *raw1, + unsigned char *raw2); +/* +void jpeg_skip_ff (j_decompress_ptr cinfo); +*/ +#endif diff --git a/veejay-server/liblzo/Makefile.am b/veejay-server/liblzo/Makefile.am new file mode 100644 index 00000000..a46bb346 --- /dev/null +++ b/veejay-server/liblzo/Makefile.am @@ -0,0 +1,10 @@ +# Makefile for veejay + +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem \ + -I$(top_srcdir)/vjmsg + +VJLZO_LIB_FILE = libminilzo.la +noinst_LTLIBRARIES = $(VJLZO_LIB_FILE) +libminilzo_la_SOURCES = minilzo.c lzo.c diff --git a/veejay-server/liblzo/Makefile.in b/veejay-server/liblzo/Makefile.in new file mode 100644 index 00000000..d762fb17 --- /dev/null +++ b/veejay-server/liblzo/Makefile.in @@ -0,0 +1,510 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Makefile for veejay + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = liblzo +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libminilzo_la_LIBADD = +am_libminilzo_la_OBJECTS = minilzo.lo lzo.lo +libminilzo_la_OBJECTS = $(am_libminilzo_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libminilzo_la_SOURCES) +DIST_SOURCES = $(libminilzo_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem \ + -I$(top_srcdir)/vjmsg + +VJLZO_LIB_FILE = libminilzo.la +noinst_LTLIBRARIES = $(VJLZO_LIB_FILE) +libminilzo_la_SOURCES = minilzo.c lzo.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liblzo/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu liblzo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libminilzo.la: $(libminilzo_la_OBJECTS) $(libminilzo_la_DEPENDENCIES) + $(LINK) $(libminilzo_la_OBJECTS) $(libminilzo_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minilzo.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/liblzo/lzo.c b/veejay-server/liblzo/lzo.c new file mode 100644 index 00000000..6ae20fc2 --- /dev/null +++ b/veejay-server/liblzo/lzo.c @@ -0,0 +1,138 @@ +/* veejay - Linux VeeJay + * (C) 2002-2006 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif +typedef struct +{ + lzo_byte *wrkmem; +} lzot; + +void lzo_free( void *lzo ) +{ + lzot *l = (lzot*) lzo; + if(l) + { + if(l->wrkmem) + free(l->wrkmem); + free(l); + } + l = NULL; +} + +void *lzo_new( ) +{ + lzot *l = (lzot*) vj_calloc(sizeof(lzot)); + if (lzo_init() != LZO_E_OK) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to initialize LZO. Could be buggy compiler"); + free( l ); + return NULL; + } + + l->wrkmem = (lzo_bytep) + vj_malloc( LZO1X_1_MEM_COMPRESS ); + + if(l->wrkmem == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot allocate work memory for LZO1X_1"); + if(l) free(l); + return NULL; + } + veejay_msg(VEEJAY_MSG_DEBUG,"LZO real-time data compression library (v%s, %s).", + lzo_version_string(), lzo_version_date()); + + return (void*) l; +} + +static uint32_t str2ulong(unsigned char *str) +{ + return ( str[0] | (str[1]<<8) | (str[2]<<16) | (str[3]<<24) ); +} + +int lzo_compress( void *lzo, uint8_t *src, uint8_t *plane, unsigned int *size, int ilen ) +{ + lzo_uint out_len =0; + lzo_uint len = ilen; + lzot *l = (lzot*) lzo; + lzo_bytep dst = plane; + lzo_uintp dst_len = (lzo_uintp) size; + lzo_voidp wrkmem = l->wrkmem; + int r = lzo1x_1_compress( src, len, dst, dst_len, l->wrkmem ); + if( r != LZO_E_OK ) + return 0; + return (*size); +} + +long lzo_decompress( void *lzo, uint8_t *linbuf, int linbuf_len, uint8_t *dst[3] ) +{ + int i; + lzo_uint len[3] = { 0,0,0}; + int sum = 0; + lzot *l = (lzot*) lzo; + lzo_uint result_len = 0; + lzo_uint offset = 0; + + len[0] = str2ulong( linbuf ); + len[1] = str2ulong( linbuf+4 ); + len[2] = str2ulong( linbuf+8 ); + +#ifdef STRICT_CHECKING + assert( len[0] > 0 && len[1] > 0 && len[2] > 0 ); +#endif + + for( i = 0; i <= 2; i ++ ) + { + const lzo_bytep src = (lzo_bytep) (linbuf+12+offset); + int r = lzo1x_decompress( src, len[i], dst[i], &result_len, l->wrkmem ); + if( r != LZO_E_OK ) + return 0; + sum += result_len; + offset += len[i]; + } + return (long)sum; +} + + + +long lzo_decompress2( void *lzo, uint8_t *linbuf, int linbuf_len, uint8_t *dst ) +{ + lzo_uint len = linbuf_len; + lzot *l = (lzot*) lzo; + lzo_uint result_len = 0; + + const lzo_bytep src = (lzo_bytep) linbuf; + int r = lzo1x_decompress( src, len, dst, &result_len, l->wrkmem ); + + if( r != LZO_E_OK ) + return 0; + return (long)result_len; +} + diff --git a/veejay-server/liblzo/lzo.h b/veejay-server/liblzo/lzo.h new file mode 100644 index 00000000..71201f52 --- /dev/null +++ b/veejay-server/liblzo/lzo.h @@ -0,0 +1,35 @@ +/* veejay - Linux VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef LZOH +#define LZOH + +void *lzo_new( ); + +void lzo_free( void *lzo ); + +int lzo_compress( void *lzo, uint8_t *src, uint8_t *plane, unsigned int *size, int ilen ); + + +long lzo_decompress2( void *lzo, uint8_t *linbuf, int linbuf_len, uint8_t *dst ); + + +long lzo_decompress( void *lzo, uint8_t *linbuf, int linbuf_len,uint8_t *dst[3] ); + +#endif diff --git a/veejay-server/liblzo/lzoconf.h b/veejay-server/liblzo/lzoconf.h new file mode 100644 index 00000000..7a745ad5 --- /dev/null +++ b/veejay-server/liblzo/lzoconf.h @@ -0,0 +1,413 @@ +/* lzoconf.h -- configuration for the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __LZOCONF_H_INCLUDED +#define __LZOCONF_H_INCLUDED + +#define LZO_VERSION 0x2020 +#define LZO_VERSION_STRING "2.02" +#define LZO_VERSION_DATE "Oct 17 2005" + +/* internal Autoconf configuration file - only used when building LZO */ +#if defined(LZO_HAVE_CONFIG_H) +# include +#endif +#include +#include + + +/*********************************************************************** +// LZO requires a conforming +************************************************************************/ + +#if !defined(CHAR_BIT) || (CHAR_BIT != 8) +# error "invalid CHAR_BIT" +#endif +#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) +# error "check your compiler installation" +#endif +#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) +# error "your limits.h macros are broken" +#endif + +/* get OS and architecture defines */ +#ifndef __LZODEFS_H_INCLUDED +#include "lzodefs.h" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/*********************************************************************** +// some core defines +************************************************************************/ + +#if !defined(LZO_UINT32_C) +# if (UINT_MAX < LZO_0xffffffffL) +# define LZO_UINT32_C(c) c ## UL +# else +# define LZO_UINT32_C(c) ((c) + 0U) +# endif +#endif + +/* memory checkers */ +#if !defined(__LZO_CHECKER) +# if defined(__BOUNDS_CHECKING_ON) +# define __LZO_CHECKER 1 +# elif defined(__CHECKER__) +# define __LZO_CHECKER 1 +# elif defined(__INSURE__) +# define __LZO_CHECKER 1 +# elif defined(__PURIFY__) +# define __LZO_CHECKER 1 +# endif +#endif + + +/*********************************************************************** +// integral and pointer types +************************************************************************/ + +/* lzo_uint should match size_t */ +#if !defined(LZO_UINT_MAX) +# if defined(LZO_ABI_LLP64) /* WIN64 */ +# if defined(LZO_OS_WIN64) + typedef unsigned __int64 lzo_uint; + typedef __int64 lzo_int; +# else + typedef unsigned long long lzo_uint; + typedef long long lzo_int; +# endif +# define LZO_UINT_MAX 0xffffffffffffffffull +# define LZO_INT_MAX 9223372036854775807LL +# define LZO_INT_MIN (-1LL - LZO_INT_MAX) +# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */ + typedef unsigned int lzo_uint; + typedef int lzo_int; +# define LZO_UINT_MAX UINT_MAX +# define LZO_INT_MAX INT_MAX +# define LZO_INT_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint; + typedef long lzo_int; +# define LZO_UINT_MAX ULONG_MAX +# define LZO_INT_MAX LONG_MAX +# define LZO_INT_MIN LONG_MIN +# else +# error "lzo_uint" +# endif +#endif + +/* Integral types with 32 bits or more. */ +#if !defined(LZO_UINT32_MAX) +# if (UINT_MAX >= LZO_0xffffffffL) + typedef unsigned int lzo_uint32; + typedef int lzo_int32; +# define LZO_UINT32_MAX UINT_MAX +# define LZO_INT32_MAX INT_MAX +# define LZO_INT32_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint32; + typedef long lzo_int32; +# define LZO_UINT32_MAX ULONG_MAX +# define LZO_INT32_MAX LONG_MAX +# define LZO_INT32_MIN LONG_MIN +# else +# error "lzo_uint32" +# endif +#endif + +/* The larger type of lzo_uint and lzo_uint32. */ +#if (LZO_UINT_MAX >= LZO_UINT32_MAX) +# define lzo_xint lzo_uint +#else +# define lzo_xint lzo_uint32 +#endif + +/* Memory model that allows to access memory at offsets of lzo_uint. */ +#if !defined(__LZO_MMODEL) +# if (LZO_UINT_MAX <= UINT_MAX) +# define __LZO_MMODEL +# elif defined(LZO_HAVE_MM_HUGE_PTR) +# define __LZO_MMODEL_HUGE 1 +# define __LZO_MMODEL __huge +# else +# define __LZO_MMODEL +# endif +#endif + +/* no typedef here because of const-pointer issues */ +#define lzo_bytep unsigned char __LZO_MMODEL * +#define lzo_charp char __LZO_MMODEL * +#define lzo_voidp void __LZO_MMODEL * +#define lzo_shortp short __LZO_MMODEL * +#define lzo_ushortp unsigned short __LZO_MMODEL * +#define lzo_uint32p lzo_uint32 __LZO_MMODEL * +#define lzo_int32p lzo_int32 __LZO_MMODEL * +#define lzo_uintp lzo_uint __LZO_MMODEL * +#define lzo_intp lzo_int __LZO_MMODEL * +#define lzo_xintp lzo_xint __LZO_MMODEL * +#define lzo_voidpp lzo_voidp __LZO_MMODEL * +#define lzo_bytepp lzo_bytep __LZO_MMODEL * +/* deprecated - use `lzo_bytep' instead of `lzo_byte *' */ +#define lzo_byte unsigned char __LZO_MMODEL + +typedef int lzo_bool; + + +/*********************************************************************** +// function types +************************************************************************/ + +/* name mangling */ +#if !defined(__LZO_EXTERN_C) +# ifdef __cplusplus +# define __LZO_EXTERN_C extern "C" +# else +# define __LZO_EXTERN_C extern +# endif +#endif + +/* calling convention */ +#if !defined(__LZO_CDECL) +# define __LZO_CDECL __lzo_cdecl +#endif + +/* DLL export information */ +#if !defined(__LZO_EXPORT1) +# define __LZO_EXPORT1 +#endif +#if !defined(__LZO_EXPORT2) +# define __LZO_EXPORT2 +#endif + +/* __cdecl calling convention for public C and assembly functions */ +#if !defined(LZO_PUBLIC) +# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL +#endif +#if !defined(LZO_EXTERN) +# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype) +#endif +#if !defined(LZO_PRIVATE) +# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL +#endif + +/* function types */ +typedef int +(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem, + const lzo_bytep dict, lzo_uint dict_len ); + +typedef int +(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem, + const lzo_bytep dict, lzo_uint dict_len ); + + +/* Callback interface. Currently only the progress indicator ("nprogress") + * is used, but this may change in a future release. */ + +struct lzo_callback_t; +typedef struct lzo_callback_t lzo_callback_t; +#define lzo_callback_p lzo_callback_t __LZO_MMODEL * + +/* malloc & free function types */ +typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t) + (lzo_callback_p self, lzo_uint items, lzo_uint size); +typedef void (__LZO_CDECL *lzo_free_func_t) + (lzo_callback_p self, lzo_voidp ptr); + +/* a progress indicator callback function */ +typedef void (__LZO_CDECL *lzo_progress_func_t) + (lzo_callback_p, lzo_uint, lzo_uint, int); + +struct lzo_callback_t +{ + /* custom allocators (set to 0 to disable) */ + lzo_alloc_func_t nalloc; /* [not used right now] */ + lzo_free_func_t nfree; /* [not used right now] */ + + /* a progress indicator callback function (set to 0 to disable) */ + lzo_progress_func_t nprogress; + + /* NOTE: the first parameter "self" of the nalloc/nfree/nprogress + * callbacks points back to this struct, so you are free to store + * some extra info in the following variables. */ + lzo_voidp user1; + lzo_xint user2; + lzo_xint user3; +}; + + +/*********************************************************************** +// error codes and prototypes +************************************************************************/ + +/* Error codes for the compression/decompression functions. Negative + * values are errors, positive values will be used for special but + * normal events. + */ +#define LZO_E_OK 0 +#define LZO_E_ERROR (-1) +#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */ +#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ +#define LZO_E_INPUT_OVERRUN (-4) +#define LZO_E_OUTPUT_OVERRUN (-5) +#define LZO_E_LOOKBEHIND_OVERRUN (-6) +#define LZO_E_EOF_NOT_FOUND (-7) +#define LZO_E_INPUT_NOT_CONSUMED (-8) +#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ + + +#ifndef lzo_sizeof_dict_t +# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep)) +#endif + +/* lzo_init() should be the first function you call. + * Check the return code ! + * + * lzo_init() is a macro to allow checking that the library and the + * compiler's view of various types are consistent. + */ +#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ + (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\ + (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ + (int)sizeof(lzo_callback_t)) +LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int); + +/* version functions (useful for shared libraries) */ +LZO_EXTERN(unsigned) lzo_version(void); +LZO_EXTERN(const char *) lzo_version_string(void); +LZO_EXTERN(const char *) lzo_version_date(void); +LZO_EXTERN(const lzo_charp) _lzo_version_string(void); +LZO_EXTERN(const lzo_charp) _lzo_version_date(void); + +/* string functions */ +LZO_EXTERN(int) +lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memset(lzo_voidp _s, int _c, lzo_uint _len); + +/* checksum functions */ +LZO_EXTERN(lzo_uint32) +lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len); +LZO_EXTERN(lzo_uint32) +lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len); +LZO_EXTERN(const lzo_uint32p) +lzo_get_crc32_table(void); + +/* misc. */ +LZO_EXTERN(int) _lzo_config_check(void); +typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; +typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; +typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t; + +/* align a char pointer on a boundary that is a multiple of `size' */ +LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size); +#define LZO_PTR_ALIGN_UP(_ptr,_size) \ + ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size))) + + +/*********************************************************************** +// deprecated macros - only for backward compatibility with LZO v1.xx +************************************************************************/ + +#if defined(LZO_CFG_COMPAT) + +#define __LZOCONF_H 1 + +#if defined(LZO_ARCH_I086) +# define __LZO_i386 1 +#elif defined(LZO_ARCH_I386) +# define __LZO_i386 1 +#endif + +#if defined(LZO_OS_DOS16) +# define __LZO_DOS 1 +# define __LZO_DOS16 1 +#elif defined(LZO_OS_DOS32) +# define __LZO_DOS 1 +#elif defined(LZO_OS_WIN16) +# define __LZO_WIN 1 +# define __LZO_WIN16 1 +#elif defined(LZO_OS_WIN32) +# define __LZO_WIN 1 +#endif + +#define __LZO_CMODEL +#define __LZO_DMODEL +#define __LZO_ENTRY __LZO_CDECL +#define LZO_EXTERN_CDECL LZO_EXTERN +#define LZO_ALIGN LZO_PTR_ALIGN_UP + +#define lzo_compress_asm_t lzo_compress_t +#define lzo_decompress_asm_t lzo_decompress_t + +#endif /* LZO_CFG_COMPAT */ + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* already included */ + + +/* vim:set ts=4 et: */ diff --git a/veejay-server/liblzo/lzodefs.h b/veejay-server/liblzo/lzodefs.h new file mode 100644 index 00000000..59d18a75 --- /dev/null +++ b/veejay-server/liblzo/lzodefs.h @@ -0,0 +1,1545 @@ +/* lzodefs.h -- architecture, OS and compiler specific defines + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __LZODEFS_H_INCLUDED +#define __LZODEFS_H_INCLUDED 1 + +#if defined(__CYGWIN32__) && !defined(__CYGWIN__) +# define __CYGWIN__ __CYGWIN32__ +#endif +#if defined(__IBMCPP__) && !defined(__IBMC__) +# define __IBMC__ __IBMCPP__ +#endif +#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) +# define __INTEL_COMPILER __ICL +#endif +#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) +# define _ALL_SOURCE 1 +#endif +#if defined(__mips__) && defined(__R5900__) +# if !defined(__LONG_MAX__) +# define __LONG_MAX__ 9223372036854775807L +# endif +#endif +#if defined(__INTEL_COMPILER) && defined(__linux__) +# pragma warning(disable: 193) +#endif +#if defined(__KEIL__) && defined(__C166__) +# pragma warning disable = 322 +#elif 0 && defined(__C251__) +# pragma warning disable = 322 +#endif +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +# if (_MSC_VER >= 1300) +# pragma warning(disable: 4668) +# endif +#endif +#if 0 && defined(__WATCOMC__) +# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) +# pragma warning 203 9 +# endif +#endif +#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) +# pragma option -h +#endif +#if 0 +#define LZO_0xffffL 0xfffful +#define LZO_0xffffffffL 0xfffffffful +#else +#define LZO_0xffffL 65535ul +#define LZO_0xffffffffL 4294967295ul +#endif +#if (LZO_0xffffL == LZO_0xffffffffL) +# error "your preprocessor is broken 1" +#endif +#if (16ul * 16384ul != 262144ul) +# error "your preprocessor is broken 2" +#endif +#if 0 +#if (32767 >= 4294967295ul) +# error "your preprocessor is broken 3" +#endif +#if (65535u >= 4294967295ul) +# error "your preprocessor is broken 4" +#endif +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) +# if !defined(MSDOS) +# define MSDOS 1 +# endif +# if !defined(_MSDOS) +# define _MSDOS 1 +# endif +#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) +# if (__VERSION == 520) && (MB_LEN_MAX == 1) +# if !defined(__AZTEC_C__) +# define __AZTEC_C__ __VERSION +# endif +# if !defined(__DOS__) +# define __DOS__ 1 +# endif +# endif +#endif +#endif +#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) +# define ptrdiff_t long +# define _PTRDIFF_T_DEFINED +#endif +#if (UINT_MAX == LZO_0xffffL) +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +# if defined(__AZTEC_C__) && defined(__DOS__) +# define __LZO_RENAME_A 1 +# elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define __LZO_RENAME_A 1 +# elif (_MSC_VER < 700) +# define __LZO_RENAME_B 1 +# endif +# elif defined(__TSC__) && defined(__OS2__) +# define __LZO_RENAME_A 1 +# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) +# define __LZO_RENAME_A 1 +# elif defined(__PACIFIC__) && defined(DOS) +# if !defined(__far) +# define __far far +# endif +# if !defined(__near) +# define __near near +# endif +# endif +# if defined(__LZO_RENAME_A) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__far) +# define __far far +# endif +# if !defined(__huge) +# define __huge huge +# endif +# if !defined(__near) +# define __near near +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# if !defined(__huge) +# define __huge huge +# endif +# elif defined(__LZO_RENAME_B) +# if !defined(__cdecl) +# define __cdecl _cdecl +# endif +# if !defined(__far) +# define __far _far +# endif +# if !defined(__huge) +# define __huge _huge +# endif +# if !defined(__near) +# define __near _near +# endif +# if !defined(__pascal) +# define __pascal _pascal +# endif +# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# endif +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__AZTEC_C__) && defined(__DOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +#elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# endif +# if (_MSC_VER < 700) +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# define LZO_BROKEN_SIZEOF 1 +# endif +#elif defined(__PACIFIC__) && defined(DOS) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#elif defined(__TURBOC__) && defined(__MSDOS__) +# if (__TURBOC__ < 0x0150) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# endif +# if (__TURBOC__ < 0x0200) +# define LZO_BROKEN_SIZEOF 1 +# endif +# if (__TURBOC__ < 0x0400) && defined(__cplusplus) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# endif +#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_SIZEOF 1 +#endif +#endif +#if defined(__WATCOMC__) && (__WATCOMC__ < 900) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#endif +#define LZO_CPP_STRINGIZE(x) #x +#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) +#define LZO_CPP_CONCAT2(a,b) a ## b +#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c +#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d +#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) +#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) +#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) +#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) +#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +#if 1 && defined(__cplusplus) +# if !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS 1 +# endif +# if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +# endif +#endif +#if defined(__cplusplus) +# define LZO_EXTERN_C extern "C" +#else +# define LZO_EXTERN_C extern +#endif +#if !defined(__LZO_OS_OVERRIDE) +#if defined(LZO_OS_FREESTANDING) +# define LZO_INFO_OS "freestanding" +#elif defined(LZO_OS_EMBEDDED) +# define LZO_INFO_OS "embedded" +#elif defined(__CYGWIN__) && defined(__GNUC__) +# define LZO_OS_CYGWIN 1 +# define LZO_INFO_OS "cygwin" +#elif defined(__EMX__) && defined(__GNUC__) +# define LZO_OS_EMX 1 +# define LZO_INFO_OS "emx" +#elif defined(__BEOS__) +# define LZO_OS_BEOS 1 +# define LZO_INFO_OS "beos" +#elif defined(__Lynx__) +# define LZO_OS_LYNXOS 1 +# define LZO_INFO_OS "lynxos" +#elif defined(__OS400__) +# define LZO_OS_OS400 1 +# define LZO_INFO_OS "os400" +#elif defined(__QNX__) +# define LZO_OS_QNX 1 +# define LZO_INFO_OS "qnx" +#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__BORLANDC__) && defined(__DPMI16__) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +#elif defined(__ZTC__) && defined(DOS386) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__OS2__) || defined(__OS2V2__) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_OS216 1 +# define LZO_INFO_OS "os216" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_OS2 1 +# define LZO_INFO_OS "os2" +# else +# error "check your limits.h header" +# endif +#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) +# define LZO_OS_WIN64 1 +# define LZO_INFO_OS "win64" +#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__MWERKS__) && defined(__INTEL__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_WIN16 1 +# define LZO_INFO_OS "win16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "check your limits.h header" +# endif +#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +# else +# error "check your limits.h header" +# endif +#elif defined(__WATCOMC__) +# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif defined(__NT__) && (__WATCOMC__ < 1100) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "please specify a target using the -bt compiler option" +# endif +#elif defined(__palmos__) +# define LZO_OS_PALMOS 1 +# define LZO_INFO_OS "palmos" +#elif defined(__TOS__) || defined(__atarist__) +# define LZO_OS_TOS 1 +# define LZO_INFO_OS "tos" +#elif defined(macintosh) && !defined(__ppc__) +# define LZO_OS_MACCLASSIC 1 +# define LZO_INFO_OS "macclassic" +#elif defined(__VMS) +# define LZO_OS_VMS 1 +# define LZO_INFO_OS "vms" +#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PS2 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "ps2" +#elif (defined(__mips__) && defined(__psp__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PSP 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "psp" +#else +# define LZO_OS_POSIX 1 +# define LZO_INFO_OS "posix" +#endif +#if (LZO_OS_POSIX) +# if defined(_AIX) || defined(__AIX__) || defined(__aix__) +# define LZO_OS_POSIX_AIX 1 +# define LZO_INFO_OS_POSIX "aix" +# elif defined(__FreeBSD__) +# define LZO_OS_POSIX_FREEBSD 1 +# define LZO_INFO_OS_POSIX "freebsd" +# elif defined(__hpux__) || defined(__hpux) +# define LZO_OS_POSIX_HPUX 1 +# define LZO_INFO_OS_POSIX "hpux" +# elif defined(__INTERIX) +# define LZO_OS_POSIX_INTERIX 1 +# define LZO_INFO_OS_POSIX "interix" +# elif defined(__IRIX__) || defined(__irix__) +# define LZO_OS_POSIX_IRIX 1 +# define LZO_INFO_OS_POSIX "irix" +# elif defined(__linux__) || defined(__linux) +# define LZO_OS_POSIX_LINUX 1 +# define LZO_INFO_OS_POSIX "linux" +# elif defined(__APPLE__) || defined(__MACOS__) +# define LZO_OS_POSIX_MACOSX 1 +# define LZO_INFO_OS_POSIX "macosx" +# elif defined(__NetBSD__) +# define LZO_OS_POSIX_NETBSD 1 +# define LZO_INFO_OS_POSIX "netbsd" +# elif defined(__OpenBSD__) +# define LZO_OS_POSIX_OPENBSD 1 +# define LZO_INFO_OS_POSIX "openbsd" +# elif defined(__osf__) +# define LZO_OS_POSIX_OSF 1 +# define LZO_INFO_OS_POSIX "osf" +# elif defined(__solaris__) || defined(__sun) +# if defined(__SVR4) || defined(__svr4__) +# define LZO_OS_POSIX_SOLARIS 1 +# define LZO_INFO_OS_POSIX "solaris" +# else +# define LZO_OS_POSIX_SUNOS 1 +# define LZO_INFO_OS_POSIX "sunos" +# endif +# elif defined(__ultrix__) || defined(__ultrix) +# define LZO_OS_POSIX_ULTRIX 1 +# define LZO_INFO_OS_POSIX "ultrix" +# else +# define LZO_OS_POSIX_UNKNOWN 1 +# define LZO_INFO_OS_POSIX "unknown" +# endif +#endif +#endif +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (UINT_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) +# define LZO_CC_CILLY 1 +# define LZO_INFO_CC "Cilly" +# if defined(__CILLY__) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__CILLY__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) +# define LZO_CC_SDCC 1 +# define LZO_INFO_CC "sdcc" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(SDCC) +#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) +# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +# define LZO_INFO_CC "Pathscale C" +# define LZO_INFO_CCVER __PATHSCALE__ +#elif defined(__INTEL_COMPILER) +# define LZO_CC_INTELC 1 +# define LZO_INFO_CC "Intel C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__INTEL_COMPILER) +#elif defined(__POCC__) && defined(_WIN32) +# define LZO_CC_PELLESC 1 +# define LZO_INFO_CC "Pelles C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__POCC__) +#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__) +# define LZO_CC_LLVM 1 +# define LZO_INFO_CC "llvm-gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# elif defined(__GNUC_MINOR__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# else +# define LZO_CC_GNUC (__GNUC__ * 0x10000L) +# endif +# define LZO_INFO_CC "gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__AZTEC_C__) +# define LZO_CC_AZTECC 1 +# define LZO_INFO_CC "Aztec C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__AZTEC_C__) +#elif defined(__BORLANDC__) +# define LZO_CC_BORLANDC 1 +# define LZO_INFO_CC "Borland C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__BORLANDC__) +#elif defined(__DMC__) && defined(__SC__) +# define LZO_CC_DMC 1 +# define LZO_INFO_CC "Digital Mars C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__DMC__) +#elif defined(__DECC) +# define LZO_CC_DECC 1 +# define LZO_INFO_CC "DEC C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__DECC) +#elif defined(__HIGHC__) +# define LZO_CC_HIGHC 1 +# define LZO_INFO_CC "MetaWare High C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__IBMC__) +# define LZO_CC_IBMC 1 +# define LZO_INFO_CC "IBM C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__IBMC__) +#elif defined(__KEIL__) && defined(__C166__) +# define LZO_CC_KEILC 1 +# define LZO_INFO_CC "Keil C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__C166__) +#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) +# define LZO_CC_LCCWIN32 1 +# define LZO_INFO_CC "lcc-win32" +# define LZO_INFO_CCVER "unknown" +#elif defined(__LCC__) +# define LZO_CC_LCC 1 +# define LZO_INFO_CC "lcc" +# if defined(__LCC_VERSION__) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__LCC_VERSION__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(_MSC_VER) +# define LZO_CC_MSC 1 +# define LZO_INFO_CC "Microsoft C" +# if defined(_MSC_FULL_VER) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(_MSC_VER) "." LZO_CPP_MACRO_EXPAND(_MSC_FULL_VER) +# else +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(_MSC_VER) +# endif +#elif defined(__MWERKS__) +# define LZO_CC_MWERKS 1 +# define LZO_INFO_CC "Metrowerks C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__MWERKS__) +#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) +# define LZO_CC_NDPC 1 +# define LZO_INFO_CC "Microway NDP C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PACIFIC__) +# define LZO_CC_PACIFICC 1 +# define LZO_INFO_CC "Pacific C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__PACIFIC__) +#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) +# define LZO_CC_PGI 1 +# define LZO_INFO_CC "Portland Group PGI C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PUREC__) && defined(__TOS__) +# define LZO_CC_PUREC 1 +# define LZO_INFO_CC "Pure C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__PUREC__) +#elif defined(__SC__) && defined(__ZTC__) +# define LZO_CC_SYMANTECC 1 +# define LZO_INFO_CC "Symantec C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__SC__) +#elif defined(__SUNPRO_C) +# define LZO_CC_SUNPROC 1 +# define LZO_INFO_CC "Sun C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__TINYC__) +# define LZO_CC_TINYC 1 +# define LZO_INFO_CC "Tiny C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TINYC__) +#elif defined(__TSC__) +# define LZO_CC_TOPSPEEDC 1 +# define LZO_INFO_CC "TopSpeed C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TSC__) +#elif defined(__WATCOMC__) +# define LZO_CC_WATCOMC 1 +# define LZO_INFO_CC "Watcom C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__WATCOMC__) +#elif defined(__TURBOC__) +# define LZO_CC_TURBOC 1 +# define LZO_INFO_CC "Turbo C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TURBOC__) +#elif defined(__ZTC__) +# define LZO_CC_ZORTECHC 1 +# define LZO_INFO_CC "Zortech C" +# if (__ZTC__ == 0x310) +# define LZO_INFO_CCVER "0x310" +# else +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__ZTC__) +# endif +#else +# define LZO_CC_UNKNOWN 1 +# define LZO_INFO_CC "unknown" +# define LZO_INFO_CCVER "unknown" +#endif +#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) +# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" +#endif +#if !defined(__LZO_ARCH_OVERRIDE) +#if defined(LZO_ARCH_GENERIC) +# define LZO_INFO_ARCH "generic" +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086 1 +# define LZO_ARCH_IA16 1 +# define LZO_INFO_ARCH "i086" +#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +# define LZO_ARCH_ALPHA 1 +# define LZO_INFO_ARCH "alpha" +#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +# define LZO_ARCH_AMD64 1 +# define LZO_INFO_ARCH "amd64" +#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +# define LZO_ARCH_ARM 1 +# define LZO_ARCH_ARM_THUMB 1 +# define LZO_INFO_ARCH "arm_thumb" +#elif defined(__arm__) || defined(_M_ARM) +# define LZO_ARCH_ARM 1 +# define LZO_INFO_ARCH "arm" +#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) +# define LZO_ARCH_AVR 1 +# define LZO_INFO_ARCH "avr" +#elif defined(__bfin__) +# define LZO_ARCH_BLACKFIN 1 +# define LZO_INFO_ARCH "blackfin" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) +# define LZO_ARCH_C166 1 +# define LZO_INFO_ARCH "c166" +#elif defined(__cris__) +# define LZO_ARCH_CRIS 1 +# define LZO_INFO_ARCH "cris" +#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define LZO_ARCH_H8300 1 +# define LZO_INFO_ARCH "h8300" +#elif defined(__hppa__) || defined(__hppa) +# define LZO_ARCH_HPPA 1 +# define LZO_INFO_ARCH "hppa" +#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_CC_ZORTECHC && defined(__I86__)) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) +# define LZO_ARCH_IA64 1 +# define LZO_INFO_ARCH "ia64" +#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) +# define LZO_ARCH_M16C 1 +# define LZO_INFO_ARCH "m16c" +#elif defined(__m32r__) +# define LZO_ARCH_M32R 1 +# define LZO_INFO_ARCH "m32r" +#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(_M_M68K) +# define LZO_ARCH_M68K 1 +# define LZO_INFO_ARCH "m68k" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) +# define LZO_ARCH_MCS251 1 +# define LZO_INFO_ARCH "mcs251" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) +# define LZO_ARCH_MCS51 1 +# define LZO_INFO_ARCH "mcs51" +#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) +# define LZO_ARCH_MIPS 1 +# define LZO_INFO_ARCH "mips" +#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) +# define LZO_ARCH_MSP430 1 +# define LZO_INFO_ARCH "msp430" +#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) +# define LZO_ARCH_POWERPC 1 +# define LZO_INFO_ARCH "powerpc" +#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) +# define LZO_ARCH_S390 1 +# define LZO_INFO_ARCH "s390" +#elif defined(__sh__) || defined(_M_SH) +# define LZO_ARCH_SH 1 +# define LZO_INFO_ARCH "sh" +#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) +# define LZO_ARCH_SPARC 1 +# define LZO_INFO_ARCH "sparc" +#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) +# define LZO_ARCH_Z80 1 +# define LZO_INFO_ARCH "z80" +#else +# define LZO_ARCH_UNKNOWN 1 +# define LZO_INFO_ARCH "unknown" +#endif +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) +# error "FIXME - missing define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) +# error "FIXME - missing WIN32 define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) +# error "FIXME - missing WIN64 define for CPU architecture" +#endif +#if (LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#endif +#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM) +# error "this should not happen" +#endif +#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086) +# error "this should not happen" +#endif +#if (LZO_ARCH_I086) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_ARCH_I386) +# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) +# error "this should not happen" +# endif +# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if !defined(__LZO_MM_OVERRIDE) +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +#if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +#endif +#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) +# define LZO_MM_TINY 1 +#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) +# define LZO_MM_HUGE 1 +#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) +# define LZO_MM_SMALL 1 +#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) +# define LZO_MM_MEDIUM 1 +#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) +# define LZO_MM_COMPACT 1 +#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) +# define LZO_MM_LARGE 1 +#elif (LZO_CC_AZTECC) +# if defined(_LARGE_CODE) && defined(_LARGE_DATA) +# define LZO_MM_LARGE 1 +# elif defined(_LARGE_CODE) +# define LZO_MM_MEDIUM 1 +# elif defined(_LARGE_DATA) +# define LZO_MM_COMPACT 1 +# else +# define LZO_MM_SMALL 1 +# endif +#elif (LZO_CC_ZORTECHC && defined(__VCM__)) +# define LZO_MM_LARGE 1 +#else +# error "unknown memory model" +#endif +#define LZO_HAVE_MM_HUGE_PTR 1 +#define LZO_HAVE_MM_HUGE_ARRAY 1 +#if (LZO_MM_TINY) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) +# undef LZO_HAVE_MM_HUGE_PTR +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_MSC && defined(_QC)) +# undef LZO_HAVE_MM_HUGE_ARRAY +# if (_MSC_VER < 600) +# undef LZO_HAVE_MM_HUGE_PTR +# endif +#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR) +# if (LZO_OS_DOS16) +# error "this should not happen" +# elif (LZO_CC_ZORTECHC) +# else +# error "this should not happen" +# endif +#endif +#ifdef __cplusplus +extern "C" { +#endif +#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) +# define LZO_MM_AHSHIFT 12 +#elif (LZO_CC_WATCOMC) + extern unsigned char _HShift; +# define LZO_MM_AHSHIFT ((unsigned) _HShift) +#else +# error "FIXME - implement LZO_MM_AHSHIFT" +#endif +#ifdef __cplusplus +} +#endif +#elif (LZO_ARCH_C166) +#if !defined(__MODEL__) +# error "FIXME - C166 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - C166 __MODEL__" +#endif +#elif (LZO_ARCH_MCS251) +#if !defined(__MODEL__) +# error "FIXME - MCS251 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS251 __MODEL__" +#endif +#elif (LZO_ARCH_MCS51) +#if !defined(__MODEL__) +# error "FIXME - MCS51 __MODEL__" +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS51 __MODEL__" +#endif +#else +# define LZO_MM_FLAT 1 +#endif +#if (LZO_MM_FLAT) +# define LZO_INFO_MM "flat" +#elif (LZO_MM_TINY) +# define LZO_INFO_MM "tiny" +#elif (LZO_MM_SMALL) +# define LZO_INFO_MM "small" +#elif (LZO_MM_MEDIUM) +# define LZO_INFO_MM "medium" +#elif (LZO_MM_COMPACT) +# define LZO_INFO_MM "compact" +#elif (LZO_MM_LARGE) +# define LZO_INFO_MM "large" +#elif (LZO_MM_HUGE) +# define LZO_INFO_MM "huge" +#else +# error "unknown memory model" +#endif +#endif +#if defined(SIZEOF_SHORT) +# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) +#endif +#if defined(SIZEOF_INT) +# define LZO_SIZEOF_INT (SIZEOF_INT) +#endif +#if defined(SIZEOF_LONG) +# define LZO_SIZEOF_LONG (SIZEOF_LONG) +#endif +#if defined(SIZEOF_LONG_LONG) +# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +#endif +#if defined(SIZEOF___INT16) +# define LZO_SIZEOF___INT16 (SIZEOF___INT16) +#endif +#if defined(SIZEOF___INT32) +# define LZO_SIZEOF___INT32 (SIZEOF___INT32) +#endif +#if defined(SIZEOF___INT64) +# define LZO_SIZEOF___INT64 (SIZEOF___INT64) +#endif +#if defined(SIZEOF_VOID_P) +# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) +#endif +#if defined(SIZEOF_SIZE_T) +# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +#endif +#if defined(SIZEOF_PTRDIFF_T) +# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +#endif +#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) +#if !defined(LZO_SIZEOF_SHORT) +# if (USHRT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,7) == 1) +# define LZO_SIZEOF_SHORT 1 +# elif (__LZO_LSR(USHRT_MAX,15) == 1) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,31) == 1) +# define LZO_SIZEOF_SHORT 4 +# elif (__LZO_LSR(USHRT_MAX,63) == 1) +# define LZO_SIZEOF_SHORT 8 +# elif (__LZO_LSR(USHRT_MAX,127) == 1) +# define LZO_SIZEOF_SHORT 16 +# else +# error "LZO_SIZEOF_SHORT" +# endif +#endif +#if !defined(LZO_SIZEOF_INT) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_INT 2 +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,7) == 1) +# define LZO_SIZEOF_INT 1 +# elif (__LZO_LSR(UINT_MAX,15) == 1) +# define LZO_SIZEOF_INT 2 +# elif (__LZO_LSR(UINT_MAX,31) == 1) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,63) == 1) +# define LZO_SIZEOF_INT 8 +# elif (__LZO_LSR(UINT_MAX,127) == 1) +# define LZO_SIZEOF_INT 16 +# else +# error "LZO_SIZEOF_INT" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG) +# if (ULONG_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,7) == 1) +# define LZO_SIZEOF_LONG 1 +# elif (__LZO_LSR(ULONG_MAX,15) == 1) +# define LZO_SIZEOF_LONG 2 +# elif (__LZO_LSR(ULONG_MAX,31) == 1) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,63) == 1) +# define LZO_SIZEOF_LONG 8 +# elif (__LZO_LSR(ULONG_MAX,127) == 1) +# define LZO_SIZEOF_LONG 16 +# else +# error "LZO_SIZEOF_LONG" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) +# if (LZO_CC_GNUC >= 0x030300ul) +# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG +# endif +# endif +# endif +#endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +#if (LZO_ARCH_I086 && LZO_CC_DMC) +#elif (LZO_CC_CILLY) && defined(__GNUC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_SIZEOF_LONG_LONG 8 +#elif ((LZO_OS_WIN32 || LZO_OS_WIN64) && LZO_CC_MSC && (_MSC_VER >= 1400)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_OS_WIN64) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_WIN32 && (LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_OS400) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) +#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define LZO_SIZEOF_LONG_LONG 8 +#endif +#endif +#endif +#if defined(__cplusplus) && defined(LZO_CC_GNUC) +# if (LZO_CC_GNUC < 0x020800ul) +# undef LZO_SIZEOF_LONG_LONG +# endif +#endif +#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +# undef LZO_SIZEOF_LONG_LONG +#endif +#if !defined(LZO_SIZEOF_VOID_P) +#if (LZO_ARCH_I086) +# define __LZO_WORDSIZE 2 +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) +# define LZO_SIZEOF_VOID_P 2 +# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) +# define LZO_SIZEOF_VOID_P 4 +# else +# error "LZO_MM" +# endif +#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) +# define __LZO_WORDSIZE 1 +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_H8300) +# if defined(__NORMAL_MODE__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 2 +# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 4 +# else +# define __LZO_WORDSIZE 2 +# define LZO_SIZEOF_VOID_P 2 +# endif +# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT +# endif +#elif (LZO_ARCH_M16C) +# define __LZO_WORDSIZE 2 +# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) +# define LZO_SIZEOF_VOID_P 4 +# else +# define LZO_SIZEOF_VOID_P 2 +# endif +#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 4 +#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 8 +#elif (LZO_OS_OS400) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (LZO_OS_OS400) +# define __LZO_WORDSIZE LZO_SIZEOF_LONG +# define LZO_SIZEOF_VOID_P 16 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_VOID_P 8 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#else +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +#endif +#endif +#if !defined(LZO_WORDSIZE) +# if defined(__LZO_WORDSIZE) +# define LZO_WORDSIZE __LZO_WORDSIZE +# else +# define LZO_WORDSIZE LZO_SIZEOF_VOID_P +# endif +#endif +#if !defined(LZO_SIZEOF_SIZE_T) +#if (LZO_ARCH_I086 || LZO_ARCH_M16C) +# define LZO_SIZEOF_SIZE_T 2 +#else +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P +#endif +#endif +#if !defined(LZO_SIZEOF_PTRDIFF_T) +#if (LZO_ARCH_I086) +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P +# elif (LZO_MM_COMPACT || LZO_MM_LARGE) +# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) +# define LZO_SIZEOF_PTRDIFF_T 4 +# else +# define LZO_SIZEOF_PTRDIFF_T 2 +# endif +# else +# error "LZO_MM" +# endif +#else +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T +#endif +#endif +#if !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN) && !defined(LZO_ABI_NEUTRAL_ENDIAN) +#if (LZO_ARCH_AMD64 || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif (LZO_ARCH_M68K || LZO_ARCH_S390) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#endif +#endif +#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN) +# error "this should not happen" +#endif +#if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "be" +#elif defined(LZO_ABI_LITTLE_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "le" +#elif defined(LZO_ABI_NEUTRAL_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "neutral" +#endif +#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_I8LP16 1 +# define LZO_INFO_ABI_PM "i8lp16" +#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_ILP16 1 +# define LZO_INFO_ABI_PM "ilp16" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_ILP32 1 +# define LZO_INFO_ABI_PM "ilp32" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) +# define LZO_ABI_LLP64 1 +# define LZO_INFO_ABI_PM "llp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_LP64 1 +# define LZO_INFO_ABI_PM "lp64" +#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_ILP64 1 +# define LZO_INFO_ABI_PM "ilp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_IP32L64 1 +# define LZO_INFO_ABI_PM "ip32l64" +#endif +#if !defined(__LZO_LIBC_OVERRIDE) +#if defined(LZO_LIBC_NAKED) +# define LZO_INFO_LIBC "naked" +#elif defined(LZO_LIBC_FREESTANDING) +# define LZO_INFO_LIBC "freestanding" +#elif defined(LZO_LIBC_MOSTLY_FREESTANDING) +# define LZO_INFO_LIBC "mfreestanding" +#elif defined(LZO_LIBC_ISOC90) +# define LZO_INFO_LIBC "isoc90" +#elif defined(LZO_LIBC_ISOC99) +# define LZO_INFO_LIBC "isoc99" +#elif defined(__dietlibc__) +# define LZO_LIBC_DIETLIBC 1 +# define LZO_INFO_LIBC "dietlibc" +#elif defined(_NEWLIB_VERSION) +# define LZO_LIBC_NEWLIB 1 +# define LZO_INFO_LIBC "newlib" +#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) +# if defined(__UCLIBC_SUBLEVEL__) +# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +# else +# define LZO_LIBC_UCLIBC 0x00090bL +# endif +# define LZO_INFO_LIBC "uclibc" +#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) +# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +# define LZO_INFO_LIBC "glibc" +#elif (LZO_CC_MWERKS) && defined(__MSL__) +# define LZO_LIBC_MSL __MSL__ +# define LZO_INFO_LIBC "msl" +#else +# define LZO_LIBC_DEFAULT 1 +# define LZO_INFO_LIBC "default" +#endif +#endif +#if (LZO_CC_GNUC >= 0x020800ul) +# define __lzo_gnuc_extension__ __extension__ +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_gnuc_extension__ __extension__ +#else +# define __lzo_gnuc_extension__ +#endif +#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) +# define lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define lzo_alignof(e) __alignof(e) +#endif +#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) +#elif defined(__cplusplus) +# define __lzo_inline inline +#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +# define __lzo_inline __inline +#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define __lzo_inline __inline__ +#elif (LZO_CC_DMC) +# define __lzo_inline __inline +#elif (LZO_CC_INTELC) +# define __lzo_inline __inline +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) +# define __lzo_inline __inline +#elif (LZO_CC_MSC && (_MSC_VER >= 900)) +# define __lzo_inline __inline +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define __lzo_inline inline +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_forceinline __forceinline +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_forceinline __forceinline +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# if defined(__cplusplus) +# else +# define __lzo_noinline __declspec(noinline) +# endif +#endif +#if (defined(__lzo_forceinline) || defined(__lzo_noinline)) && !defined(__lzo_inline) +# error "this should not happen" +#endif +#if (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_noreturn __declspec(noreturn) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && (LZO_OS_POSIX)) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_noreturn __declspec(noreturn) +#endif +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_constructor __attribute__((__constructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_constructor __attribute__((__constructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_constructor __attribute__((__constructor__)) +#endif +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_destructor __attribute__((__destructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_destructor __attribute__((__destructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_destructor __attribute__((__destructor__)) +#endif +#if defined(__lzo_destructor) && !defined(__lzo_constructor) +# error "this should not happen" +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#else +# define __lzo_likely(e) (e) +# define __lzo_unlikely(e) (e) +#endif +#if !defined(LZO_UNUSED) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED(var) ((void) &var) +# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_UNUSED(var) ((void) var) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_KEILC) +# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} +# elif (LZO_CC_PACIFICC) +# define LZO_UNUSED(var) ((void) sizeof(var)) +# elif (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED(var) ((void) var) +# else +# define LZO_UNUSED(var) ((void) &var) +# endif +#endif +#if !defined(LZO_UNUSED_FUNC) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED_FUNC(func) ((void) func) +# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_LLVM) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_MSC) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_KEILC || LZO_CC_PELLESC) +# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} +# else +# define LZO_UNUSED_FUNC(func) ((void) func) +# endif +#endif +#if !defined(LZO_UNUSED_LABEL) +# if (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# elif (LZO_CC_INTELC || LZO_CC_WATCOMC) +# define LZO_UNUSED_LABEL(l) if (0) goto l +# else +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) +# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# else +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT) +# if (LZO_CC_AZTECC) +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} +# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# else +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} +# endif +#endif +#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit +# define __lzo_cdecl_main __cdecl +# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_qsort __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_qsort _stdcall +# else +# define __lzo_cdecl_qsort __cdecl +# endif +# elif (LZO_CC_WATCOMC) +# define __lzo_cdecl __cdecl +# else +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit __cdecl +# define __lzo_cdecl_main __cdecl +# define __lzo_cdecl_qsort __cdecl +# endif +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) +# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_sighandler __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_sighandler _stdcall +# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +# define __lzo_cdecl_sighandler __clrcall +# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +# if defined(_DLL) +# define __lzo_cdecl_sighandler _far _cdecl _loadds +# elif defined(_MT) +# define __lzo_cdecl_sighandler _far _cdecl +# else +# define __lzo_cdecl_sighandler _cdecl +# endif +# else +# define __lzo_cdecl_sighandler __cdecl +# endif +#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) +# define __lzo_cdecl cdecl +#endif +#if !defined(__lzo_cdecl) +# define __lzo_cdecl +#endif +#if !defined(__lzo_cdecl_atexit) +# define __lzo_cdecl_atexit +#endif +#if !defined(__lzo_cdecl_main) +# define __lzo_cdecl_main +#endif +#if !defined(__lzo_cdecl_qsort) +# define __lzo_cdecl_qsort +#endif +#if !defined(__lzo_cdecl_sighandler) +# define __lzo_cdecl_sighandler +#endif +#if !defined(__lzo_cdecl_va) +# define __lzo_cdecl_va __lzo_cdecl +#endif +#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) +# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) +# else +# define LZO_HAVE_WINDOWS_H 1 +# endif +#endif +#if (LZO_ARCH_ALPHA) +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_AMD64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# define LZO_OPT_UNALIGNED64 1 +#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) +#elif (LZO_ARCH_ARM) +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_CRIS) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_I386) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_IA64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_PREFER_POSTINC 1 +#elif (LZO_ARCH_M68K) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(__mc68020__) && !defined(__mcoldfire__) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_MIPS) +# define LZO_OPT_AVOID_UINT_INDEX 1 +#elif (LZO_ARCH_POWERPC) +# define LZO_OPT_PREFER_PREINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_S390) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# if (LZO_SIZEOF_SIZE_T == 8) +# define LZO_OPT_UNALIGNED64 1 +# endif +#elif (LZO_ARCH_SH) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +#endif +#if !defined(LZO_CFG_NO_INLINE_ASM) +#if defined(LZO_CC_LLVM) +# define LZO_CFG_NO_INLINE_ASM 1 +#endif +#endif +#if !defined(LZO_CFG_NO_UNALIGNED) +#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC) +# define LZO_CFG_NO_UNALIGNED 1 +#endif +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# undef LZO_OPT_UNALIGNED16 +# undef LZO_OPT_UNALIGNED32 +# undef LZO_OPT_UNALIGNED64 +#endif +#if defined(LZO_CFG_NO_INLINE_ASM) +#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +# define LZO_ASM_SYNTAX_MSC 1 +#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#endif +#if (LZO_ASM_SYNTAX_GNUC) +#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) +# define __LZO_ASM_CLOBBER "ax" +#elif (LZO_CC_INTELC) +# define __LZO_ASM_CLOBBER "memory" +#else +# define __LZO_ASM_CLOBBER "cc", "memory" +#endif +#endif +#if defined(__LZO_INFOSTR_MM) +#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) +# define __LZO_INFOSTR_MM "" +#elif defined(LZO_INFO_MM) +# define __LZO_INFOSTR_MM "." LZO_INFO_MM +#else +# define __LZO_INFOSTR_MM "" +#endif +#if defined(__LZO_INFOSTR_PM) +#elif defined(LZO_INFO_ABI_PM) +# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM +#else +# define __LZO_INFOSTR_PM "" +#endif +#if defined(__LZO_INFOSTR_ENDIAN) +#elif defined(LZO_INFO_ABI_ENDIAN) +# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN +#else +# define __LZO_INFOSTR_ENDIAN "" +#endif +#if defined(__LZO_INFOSTR_OSNAME) +#elif defined(LZO_INFO_OS_CONSOLE) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE +#elif defined(LZO_INFO_OS_POSIX) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX +#else +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS +#endif +#if defined(__LZO_INFOSTR_LIBC) +#elif defined(LZO_INFO_LIBC) +# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC +#else +# define __LZO_INFOSTR_LIBC "" +#endif +#if defined(__LZO_INFOSTR_CCVER) +#elif defined(LZO_INFO_CCVER) +# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER +#else +# define __LZO_INFOSTR_CCVER "" +#endif +#define LZO_INFO_STRING \ + LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ + " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER + +#endif /* already included */ + +/* vim:set ts=4 et: */ diff --git a/veejay-server/liblzo/minilzo.c b/veejay-server/liblzo/minilzo.c new file mode 100644 index 00000000..b21fcf39 --- /dev/null +++ b/veejay-server/liblzo/minilzo.c @@ -0,0 +1,3826 @@ +/* minilzo.c -- mini subset of the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + +/* + * NOTE: + * the full LZO package can be found at + * http://www.oberhumer.com/opensource/lzo/ + */ + +#define __LZO_IN_MINILZO +#define LZO_BUILD + +#if defined(LZO_CFG_FREESTANDING) +# undef MINILZO_HAVE_CONFIG_H +# define LZO_LIBC_FREESTANDING 1 +# define LZO_OS_FREESTANDING 1 +#endif + +#ifdef MINILZO_HAVE_CONFIG_H +# include +#endif +#include +#include +#if defined(MINILZO_CFG_USE_INTERNAL_LZODEFS) + +#ifndef __LZODEFS_H_INCLUDED +#define __LZODEFS_H_INCLUDED 1 + +#if defined(__CYGWIN32__) && !defined(__CYGWIN__) +# define __CYGWIN__ __CYGWIN32__ +#endif +#if defined(__IBMCPP__) && !defined(__IBMC__) +# define __IBMC__ __IBMCPP__ +#endif +#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) +# define __INTEL_COMPILER __ICL +#endif +#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) +# define _ALL_SOURCE 1 +#endif +#if defined(__mips__) && defined(__R5900__) +# if !defined(__LONG_MAX__) +# define __LONG_MAX__ 9223372036854775807L +# endif +#endif +#if defined(__INTEL_COMPILER) && defined(__linux__) +# pragma warning(disable: 193) +#endif +#if defined(__KEIL__) && defined(__C166__) +# pragma warning disable = 322 +#elif 0 && defined(__C251__) +# pragma warning disable = 322 +#endif +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +# if (_MSC_VER >= 1300) +# pragma warning(disable: 4668) +# endif +#endif +#if 0 && defined(__WATCOMC__) +# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) +# pragma warning 203 9 +# endif +#endif +#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) +# pragma option -h +#endif +#if 0 +#define LZO_0xffffL 0xfffful +#define LZO_0xffffffffL 0xfffffffful +#else +#define LZO_0xffffL 65535ul +#define LZO_0xffffffffL 4294967295ul +#endif +#if (LZO_0xffffL == LZO_0xffffffffL) +# error "your preprocessor is broken 1" +#endif +#if (16ul * 16384ul != 262144ul) +# error "your preprocessor is broken 2" +#endif +#if 0 +#if (32767 >= 4294967295ul) +# error "your preprocessor is broken 3" +#endif +#if (65535u >= 4294967295ul) +# error "your preprocessor is broken 4" +#endif +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) +# if !defined(MSDOS) +# define MSDOS 1 +# endif +# if !defined(_MSDOS) +# define _MSDOS 1 +# endif +#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) +# if (__VERSION == 520) && (MB_LEN_MAX == 1) +# if !defined(__AZTEC_C__) +# define __AZTEC_C__ __VERSION +# endif +# if !defined(__DOS__) +# define __DOS__ 1 +# endif +# endif +#endif +#endif +#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) +# define ptrdiff_t long +# define _PTRDIFF_T_DEFINED +#endif +#if (UINT_MAX == LZO_0xffffL) +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +# if defined(__AZTEC_C__) && defined(__DOS__) +# define __LZO_RENAME_A 1 +# elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define __LZO_RENAME_A 1 +# elif (_MSC_VER < 700) +# define __LZO_RENAME_B 1 +# endif +# elif defined(__TSC__) && defined(__OS2__) +# define __LZO_RENAME_A 1 +# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) +# define __LZO_RENAME_A 1 +# elif defined(__PACIFIC__) && defined(DOS) +# if !defined(__far) +# define __far far +# endif +# if !defined(__near) +# define __near near +# endif +# endif +# if defined(__LZO_RENAME_A) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__far) +# define __far far +# endif +# if !defined(__huge) +# define __huge huge +# endif +# if !defined(__near) +# define __near near +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# if !defined(__huge) +# define __huge huge +# endif +# elif defined(__LZO_RENAME_B) +# if !defined(__cdecl) +# define __cdecl _cdecl +# endif +# if !defined(__far) +# define __far _far +# endif +# if !defined(__huge) +# define __huge _huge +# endif +# if !defined(__near) +# define __near _near +# endif +# if !defined(__pascal) +# define __pascal _pascal +# endif +# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# endif +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__AZTEC_C__) && defined(__DOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +#elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# endif +# if (_MSC_VER < 700) +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# define LZO_BROKEN_SIZEOF 1 +# endif +#elif defined(__PACIFIC__) && defined(DOS) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#elif defined(__TURBOC__) && defined(__MSDOS__) +# if (__TURBOC__ < 0x0150) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# endif +# if (__TURBOC__ < 0x0200) +# define LZO_BROKEN_SIZEOF 1 +# endif +# if (__TURBOC__ < 0x0400) && defined(__cplusplus) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# endif +#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_SIZEOF 1 +#endif +#endif +#if defined(__WATCOMC__) && (__WATCOMC__ < 900) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#endif +#define LZO_CPP_STRINGIZE(x) #x +#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) +#define LZO_CPP_CONCAT2(a,b) a ## b +#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c +#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d +#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) +#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) +#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) +#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) +#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +#if 1 && defined(__cplusplus) +# if !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS 1 +# endif +# if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +# endif +#endif +#if defined(__cplusplus) +# define LZO_EXTERN_C extern "C" +#else +# define LZO_EXTERN_C extern +#endif +#if !defined(__LZO_OS_OVERRIDE) +#if defined(LZO_OS_FREESTANDING) +# define LZO_INFO_OS "freestanding" +#elif defined(LZO_OS_EMBEDDED) +# define LZO_INFO_OS "embedded" +#elif defined(__CYGWIN__) && defined(__GNUC__) +# define LZO_OS_CYGWIN 1 +# define LZO_INFO_OS "cygwin" +#elif defined(__EMX__) && defined(__GNUC__) +# define LZO_OS_EMX 1 +# define LZO_INFO_OS "emx" +#elif defined(__BEOS__) +# define LZO_OS_BEOS 1 +# define LZO_INFO_OS "beos" +#elif defined(__Lynx__) +# define LZO_OS_LYNXOS 1 +# define LZO_INFO_OS "lynxos" +#elif defined(__OS400__) +# define LZO_OS_OS400 1 +# define LZO_INFO_OS "os400" +#elif defined(__QNX__) +# define LZO_OS_QNX 1 +# define LZO_INFO_OS "qnx" +#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__BORLANDC__) && defined(__DPMI16__) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +#elif defined(__ZTC__) && defined(DOS386) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__OS2__) || defined(__OS2V2__) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_OS216 1 +# define LZO_INFO_OS "os216" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_OS2 1 +# define LZO_INFO_OS "os2" +# else +# error "check your limits.h header" +# endif +#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) +# define LZO_OS_WIN64 1 +# define LZO_INFO_OS "win64" +#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__MWERKS__) && defined(__INTEL__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_WIN16 1 +# define LZO_INFO_OS "win16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "check your limits.h header" +# endif +#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +# else +# error "check your limits.h header" +# endif +#elif defined(__WATCOMC__) +# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif defined(__NT__) && (__WATCOMC__ < 1100) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "please specify a target using the -bt compiler option" +# endif +#elif defined(__palmos__) +# define LZO_OS_PALMOS 1 +# define LZO_INFO_OS "palmos" +#elif defined(__TOS__) || defined(__atarist__) +# define LZO_OS_TOS 1 +# define LZO_INFO_OS "tos" +#elif defined(macintosh) && !defined(__ppc__) +# define LZO_OS_MACCLASSIC 1 +# define LZO_INFO_OS "macclassic" +#elif defined(__VMS) +# define LZO_OS_VMS 1 +# define LZO_INFO_OS "vms" +#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PS2 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "ps2" +#elif (defined(__mips__) && defined(__psp__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PSP 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "psp" +#else +# define LZO_OS_POSIX 1 +# define LZO_INFO_OS "posix" +#endif +#if (LZO_OS_POSIX) +# if defined(_AIX) || defined(__AIX__) || defined(__aix__) +# define LZO_OS_POSIX_AIX 1 +# define LZO_INFO_OS_POSIX "aix" +# elif defined(__FreeBSD__) +# define LZO_OS_POSIX_FREEBSD 1 +# define LZO_INFO_OS_POSIX "freebsd" +# elif defined(__hpux__) || defined(__hpux) +# define LZO_OS_POSIX_HPUX 1 +# define LZO_INFO_OS_POSIX "hpux" +# elif defined(__INTERIX) +# define LZO_OS_POSIX_INTERIX 1 +# define LZO_INFO_OS_POSIX "interix" +# elif defined(__IRIX__) || defined(__irix__) +# define LZO_OS_POSIX_IRIX 1 +# define LZO_INFO_OS_POSIX "irix" +# elif defined(__linux__) || defined(__linux) +# define LZO_OS_POSIX_LINUX 1 +# define LZO_INFO_OS_POSIX "linux" +# elif defined(__APPLE__) || defined(__MACOS__) +# define LZO_OS_POSIX_MACOSX 1 +# define LZO_INFO_OS_POSIX "macosx" +# elif defined(__NetBSD__) +# define LZO_OS_POSIX_NETBSD 1 +# define LZO_INFO_OS_POSIX "netbsd" +# elif defined(__OpenBSD__) +# define LZO_OS_POSIX_OPENBSD 1 +# define LZO_INFO_OS_POSIX "openbsd" +# elif defined(__osf__) +# define LZO_OS_POSIX_OSF 1 +# define LZO_INFO_OS_POSIX "osf" +# elif defined(__solaris__) || defined(__sun) +# if defined(__SVR4) || defined(__svr4__) +# define LZO_OS_POSIX_SOLARIS 1 +# define LZO_INFO_OS_POSIX "solaris" +# else +# define LZO_OS_POSIX_SUNOS 1 +# define LZO_INFO_OS_POSIX "sunos" +# endif +# elif defined(__ultrix__) || defined(__ultrix) +# define LZO_OS_POSIX_ULTRIX 1 +# define LZO_INFO_OS_POSIX "ultrix" +# else +# define LZO_OS_POSIX_UNKNOWN 1 +# define LZO_INFO_OS_POSIX "unknown" +# endif +#endif +#endif +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (UINT_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) +# define LZO_CC_CILLY 1 +# define LZO_INFO_CC "Cilly" +# if defined(__CILLY__) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__CILLY__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) +# define LZO_CC_SDCC 1 +# define LZO_INFO_CC "sdcc" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(SDCC) +#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) +# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +# define LZO_INFO_CC "Pathscale C" +# define LZO_INFO_CCVER __PATHSCALE__ +#elif defined(__INTEL_COMPILER) +# define LZO_CC_INTELC 1 +# define LZO_INFO_CC "Intel C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__INTEL_COMPILER) +#elif defined(__POCC__) && defined(_WIN32) +# define LZO_CC_PELLESC 1 +# define LZO_INFO_CC "Pelles C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__POCC__) +#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__) +# define LZO_CC_LLVM 1 +# define LZO_INFO_CC "llvm-gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# elif defined(__GNUC_MINOR__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# else +# define LZO_CC_GNUC (__GNUC__ * 0x10000L) +# endif +# define LZO_INFO_CC "gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__AZTEC_C__) +# define LZO_CC_AZTECC 1 +# define LZO_INFO_CC "Aztec C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__AZTEC_C__) +#elif defined(__BORLANDC__) +# define LZO_CC_BORLANDC 1 +# define LZO_INFO_CC "Borland C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__BORLANDC__) +#elif defined(__DMC__) && defined(__SC__) +# define LZO_CC_DMC 1 +# define LZO_INFO_CC "Digital Mars C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__DMC__) +#elif defined(__DECC) +# define LZO_CC_DECC 1 +# define LZO_INFO_CC "DEC C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__DECC) +#elif defined(__HIGHC__) +# define LZO_CC_HIGHC 1 +# define LZO_INFO_CC "MetaWare High C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__IBMC__) +# define LZO_CC_IBMC 1 +# define LZO_INFO_CC "IBM C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__IBMC__) +#elif defined(__KEIL__) && defined(__C166__) +# define LZO_CC_KEILC 1 +# define LZO_INFO_CC "Keil C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__C166__) +#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) +# define LZO_CC_LCCWIN32 1 +# define LZO_INFO_CC "lcc-win32" +# define LZO_INFO_CCVER "unknown" +#elif defined(__LCC__) +# define LZO_CC_LCC 1 +# define LZO_INFO_CC "lcc" +# if defined(__LCC_VERSION__) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__LCC_VERSION__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(_MSC_VER) +# define LZO_CC_MSC 1 +# define LZO_INFO_CC "Microsoft C" +# if defined(_MSC_FULL_VER) +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(_MSC_VER) "." LZO_CPP_MACRO_EXPAND(_MSC_FULL_VER) +# else +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(_MSC_VER) +# endif +#elif defined(__MWERKS__) +# define LZO_CC_MWERKS 1 +# define LZO_INFO_CC "Metrowerks C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__MWERKS__) +#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) +# define LZO_CC_NDPC 1 +# define LZO_INFO_CC "Microway NDP C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PACIFIC__) +# define LZO_CC_PACIFICC 1 +# define LZO_INFO_CC "Pacific C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__PACIFIC__) +#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) +# define LZO_CC_PGI 1 +# define LZO_INFO_CC "Portland Group PGI C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PUREC__) && defined(__TOS__) +# define LZO_CC_PUREC 1 +# define LZO_INFO_CC "Pure C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__PUREC__) +#elif defined(__SC__) && defined(__ZTC__) +# define LZO_CC_SYMANTECC 1 +# define LZO_INFO_CC "Symantec C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__SC__) +#elif defined(__SUNPRO_C) +# define LZO_CC_SUNPROC 1 +# define LZO_INFO_CC "Sun C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__TINYC__) +# define LZO_CC_TINYC 1 +# define LZO_INFO_CC "Tiny C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TINYC__) +#elif defined(__TSC__) +# define LZO_CC_TOPSPEEDC 1 +# define LZO_INFO_CC "TopSpeed C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TSC__) +#elif defined(__WATCOMC__) +# define LZO_CC_WATCOMC 1 +# define LZO_INFO_CC "Watcom C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__WATCOMC__) +#elif defined(__TURBOC__) +# define LZO_CC_TURBOC 1 +# define LZO_INFO_CC "Turbo C" +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__TURBOC__) +#elif defined(__ZTC__) +# define LZO_CC_ZORTECHC 1 +# define LZO_INFO_CC "Zortech C" +# if (__ZTC__ == 0x310) +# define LZO_INFO_CCVER "0x310" +# else +# define LZO_INFO_CCVER LZO_CPP_MACRO_EXPAND(__ZTC__) +# endif +#else +# define LZO_CC_UNKNOWN 1 +# define LZO_INFO_CC "unknown" +# define LZO_INFO_CCVER "unknown" +#endif +#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) +# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" +#endif +#if !defined(__LZO_ARCH_OVERRIDE) +#if defined(LZO_ARCH_GENERIC) +# define LZO_INFO_ARCH "generic" +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086 1 +# define LZO_ARCH_IA16 1 +# define LZO_INFO_ARCH "i086" +#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +# define LZO_ARCH_ALPHA 1 +# define LZO_INFO_ARCH "alpha" +#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +# define LZO_ARCH_AMD64 1 +# define LZO_INFO_ARCH "amd64" +#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +# define LZO_ARCH_ARM 1 +# define LZO_ARCH_ARM_THUMB 1 +# define LZO_INFO_ARCH "arm_thumb" +#elif defined(__arm__) || defined(_M_ARM) +# define LZO_ARCH_ARM 1 +# define LZO_INFO_ARCH "arm" +#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) +# define LZO_ARCH_AVR 1 +# define LZO_INFO_ARCH "avr" +#elif defined(__bfin__) +# define LZO_ARCH_BLACKFIN 1 +# define LZO_INFO_ARCH "blackfin" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) +# define LZO_ARCH_C166 1 +# define LZO_INFO_ARCH "c166" +#elif defined(__cris__) +# define LZO_ARCH_CRIS 1 +# define LZO_INFO_ARCH "cris" +#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define LZO_ARCH_H8300 1 +# define LZO_INFO_ARCH "h8300" +#elif defined(__hppa__) || defined(__hppa) +# define LZO_ARCH_HPPA 1 +# define LZO_INFO_ARCH "hppa" +#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_CC_ZORTECHC && defined(__I86__)) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) +# define LZO_ARCH_IA64 1 +# define LZO_INFO_ARCH "ia64" +#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) +# define LZO_ARCH_M16C 1 +# define LZO_INFO_ARCH "m16c" +#elif defined(__m32r__) +# define LZO_ARCH_M32R 1 +# define LZO_INFO_ARCH "m32r" +#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(_M_M68K) +# define LZO_ARCH_M68K 1 +# define LZO_INFO_ARCH "m68k" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) +# define LZO_ARCH_MCS251 1 +# define LZO_INFO_ARCH "mcs251" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) +# define LZO_ARCH_MCS51 1 +# define LZO_INFO_ARCH "mcs51" +#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) +# define LZO_ARCH_MIPS 1 +# define LZO_INFO_ARCH "mips" +#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) +# define LZO_ARCH_MSP430 1 +# define LZO_INFO_ARCH "msp430" +#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) +# define LZO_ARCH_POWERPC 1 +# define LZO_INFO_ARCH "powerpc" +#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) +# define LZO_ARCH_S390 1 +# define LZO_INFO_ARCH "s390" +#elif defined(__sh__) || defined(_M_SH) +# define LZO_ARCH_SH 1 +# define LZO_INFO_ARCH "sh" +#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) +# define LZO_ARCH_SPARC 1 +# define LZO_INFO_ARCH "sparc" +#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) +# define LZO_ARCH_Z80 1 +# define LZO_INFO_ARCH "z80" +#else +# define LZO_ARCH_UNKNOWN 1 +# define LZO_INFO_ARCH "unknown" +#endif +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) +# error "FIXME - missing define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) +# error "FIXME - missing WIN32 define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) +# error "FIXME - missing WIN64 define for CPU architecture" +#endif +#if (LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#endif +#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM) +# error "this should not happen" +#endif +#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086) +# error "this should not happen" +#endif +#if (LZO_ARCH_I086) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_ARCH_I386) +# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) +# error "this should not happen" +# endif +# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if !defined(__LZO_MM_OVERRIDE) +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +#if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +#endif +#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) +# define LZO_MM_TINY 1 +#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) +# define LZO_MM_HUGE 1 +#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) +# define LZO_MM_SMALL 1 +#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) +# define LZO_MM_MEDIUM 1 +#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) +# define LZO_MM_COMPACT 1 +#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) +# define LZO_MM_LARGE 1 +#elif (LZO_CC_AZTECC) +# if defined(_LARGE_CODE) && defined(_LARGE_DATA) +# define LZO_MM_LARGE 1 +# elif defined(_LARGE_CODE) +# define LZO_MM_MEDIUM 1 +# elif defined(_LARGE_DATA) +# define LZO_MM_COMPACT 1 +# else +# define LZO_MM_SMALL 1 +# endif +#elif (LZO_CC_ZORTECHC && defined(__VCM__)) +# define LZO_MM_LARGE 1 +#else +# error "unknown memory model" +#endif +#define LZO_HAVE_MM_HUGE_PTR 1 +#define LZO_HAVE_MM_HUGE_ARRAY 1 +#if (LZO_MM_TINY) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) +# undef LZO_HAVE_MM_HUGE_PTR +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_MSC && defined(_QC)) +# undef LZO_HAVE_MM_HUGE_ARRAY +# if (_MSC_VER < 600) +# undef LZO_HAVE_MM_HUGE_PTR +# endif +#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR) +# if (LZO_OS_DOS16) +# error "this should not happen" +# elif (LZO_CC_ZORTECHC) +# else +# error "this should not happen" +# endif +#endif +#ifdef __cplusplus +extern "C" { +#endif +#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) +# define LZO_MM_AHSHIFT 12 +#elif (LZO_CC_WATCOMC) + extern unsigned char _HShift; +# define LZO_MM_AHSHIFT ((unsigned) _HShift) +#else +# error "FIXME - implement LZO_MM_AHSHIFT" +#endif +#ifdef __cplusplus +} +#endif +#elif (LZO_ARCH_C166) +#if !defined(__MODEL__) +# error "FIXME - C166 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - C166 __MODEL__" +#endif +#elif (LZO_ARCH_MCS251) +#if !defined(__MODEL__) +# error "FIXME - MCS251 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS251 __MODEL__" +#endif +#elif (LZO_ARCH_MCS51) +#if !defined(__MODEL__) +# error "FIXME - MCS51 __MODEL__" +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS51 __MODEL__" +#endif +#else +# define LZO_MM_FLAT 1 +#endif +#if (LZO_MM_FLAT) +# define LZO_INFO_MM "flat" +#elif (LZO_MM_TINY) +# define LZO_INFO_MM "tiny" +#elif (LZO_MM_SMALL) +# define LZO_INFO_MM "small" +#elif (LZO_MM_MEDIUM) +# define LZO_INFO_MM "medium" +#elif (LZO_MM_COMPACT) +# define LZO_INFO_MM "compact" +#elif (LZO_MM_LARGE) +# define LZO_INFO_MM "large" +#elif (LZO_MM_HUGE) +# define LZO_INFO_MM "huge" +#else +# error "unknown memory model" +#endif +#endif +#if defined(SIZEOF_SHORT) +# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) +#endif +#if defined(SIZEOF_INT) +# define LZO_SIZEOF_INT (SIZEOF_INT) +#endif +#if defined(SIZEOF_LONG) +# define LZO_SIZEOF_LONG (SIZEOF_LONG) +#endif +#if defined(SIZEOF_LONG_LONG) +# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +#endif +#if defined(SIZEOF___INT16) +# define LZO_SIZEOF___INT16 (SIZEOF___INT16) +#endif +#if defined(SIZEOF___INT32) +# define LZO_SIZEOF___INT32 (SIZEOF___INT32) +#endif +#if defined(SIZEOF___INT64) +# define LZO_SIZEOF___INT64 (SIZEOF___INT64) +#endif +#if defined(SIZEOF_VOID_P) +# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) +#endif +#if defined(SIZEOF_SIZE_T) +# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +#endif +#if defined(SIZEOF_PTRDIFF_T) +# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +#endif +#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) +#if !defined(LZO_SIZEOF_SHORT) +# if (USHRT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,7) == 1) +# define LZO_SIZEOF_SHORT 1 +# elif (__LZO_LSR(USHRT_MAX,15) == 1) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,31) == 1) +# define LZO_SIZEOF_SHORT 4 +# elif (__LZO_LSR(USHRT_MAX,63) == 1) +# define LZO_SIZEOF_SHORT 8 +# elif (__LZO_LSR(USHRT_MAX,127) == 1) +# define LZO_SIZEOF_SHORT 16 +# else +# error "LZO_SIZEOF_SHORT" +# endif +#endif +#if !defined(LZO_SIZEOF_INT) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_INT 2 +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,7) == 1) +# define LZO_SIZEOF_INT 1 +# elif (__LZO_LSR(UINT_MAX,15) == 1) +# define LZO_SIZEOF_INT 2 +# elif (__LZO_LSR(UINT_MAX,31) == 1) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,63) == 1) +# define LZO_SIZEOF_INT 8 +# elif (__LZO_LSR(UINT_MAX,127) == 1) +# define LZO_SIZEOF_INT 16 +# else +# error "LZO_SIZEOF_INT" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG) +# if (ULONG_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,7) == 1) +# define LZO_SIZEOF_LONG 1 +# elif (__LZO_LSR(ULONG_MAX,15) == 1) +# define LZO_SIZEOF_LONG 2 +# elif (__LZO_LSR(ULONG_MAX,31) == 1) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,63) == 1) +# define LZO_SIZEOF_LONG 8 +# elif (__LZO_LSR(ULONG_MAX,127) == 1) +# define LZO_SIZEOF_LONG 16 +# else +# error "LZO_SIZEOF_LONG" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) +# if (LZO_CC_GNUC >= 0x030300ul) +# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG +# endif +# endif +# endif +#endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +#if (LZO_ARCH_I086 && LZO_CC_DMC) +#elif (LZO_CC_CILLY) && defined(__GNUC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_SIZEOF_LONG_LONG 8 +#elif ((LZO_OS_WIN32 || LZO_OS_WIN64) && LZO_CC_MSC && (_MSC_VER >= 1400)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_OS_WIN64) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_WIN32 && (LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_OS400) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) +#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define LZO_SIZEOF_LONG_LONG 8 +#endif +#endif +#endif +#if defined(__cplusplus) && defined(LZO_CC_GNUC) +# if (LZO_CC_GNUC < 0x020800ul) +# undef LZO_SIZEOF_LONG_LONG +# endif +#endif +#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +# undef LZO_SIZEOF_LONG_LONG +#endif +#if !defined(LZO_SIZEOF_VOID_P) +#if (LZO_ARCH_I086) +# define __LZO_WORDSIZE 2 +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) +# define LZO_SIZEOF_VOID_P 2 +# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) +# define LZO_SIZEOF_VOID_P 4 +# else +# error "LZO_MM" +# endif +#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) +# define __LZO_WORDSIZE 1 +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_H8300) +# if defined(__NORMAL_MODE__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 2 +# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 4 +# else +# define __LZO_WORDSIZE 2 +# define LZO_SIZEOF_VOID_P 2 +# endif +# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT +# endif +#elif (LZO_ARCH_M16C) +# define __LZO_WORDSIZE 2 +# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) +# define LZO_SIZEOF_VOID_P 4 +# else +# define LZO_SIZEOF_VOID_P 2 +# endif +#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 4 +#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 8 +#elif (LZO_OS_OS400) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (LZO_OS_OS400) +# define __LZO_WORDSIZE LZO_SIZEOF_LONG +# define LZO_SIZEOF_VOID_P 16 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_VOID_P 8 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#else +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +#endif +#endif +#if !defined(LZO_WORDSIZE) +# if defined(__LZO_WORDSIZE) +# define LZO_WORDSIZE __LZO_WORDSIZE +# else +# define LZO_WORDSIZE LZO_SIZEOF_VOID_P +# endif +#endif +#if !defined(LZO_SIZEOF_SIZE_T) +#if (LZO_ARCH_I086 || LZO_ARCH_M16C) +# define LZO_SIZEOF_SIZE_T 2 +#else +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P +#endif +#endif +#if !defined(LZO_SIZEOF_PTRDIFF_T) +#if (LZO_ARCH_I086) +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P +# elif (LZO_MM_COMPACT || LZO_MM_LARGE) +# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) +# define LZO_SIZEOF_PTRDIFF_T 4 +# else +# define LZO_SIZEOF_PTRDIFF_T 2 +# endif +# else +# error "LZO_MM" +# endif +#else +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T +#endif +#endif +#if !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN) && !defined(LZO_ABI_NEUTRAL_ENDIAN) +#if (LZO_ARCH_AMD64 || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif (LZO_ARCH_M68K || LZO_ARCH_S390) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#endif +#endif +#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN) +# error "this should not happen" +#endif +#if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "be" +#elif defined(LZO_ABI_LITTLE_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "le" +#elif defined(LZO_ABI_NEUTRAL_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "neutral" +#endif +#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_I8LP16 1 +# define LZO_INFO_ABI_PM "i8lp16" +#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_ILP16 1 +# define LZO_INFO_ABI_PM "ilp16" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_ILP32 1 +# define LZO_INFO_ABI_PM "ilp32" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) +# define LZO_ABI_LLP64 1 +# define LZO_INFO_ABI_PM "llp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_LP64 1 +# define LZO_INFO_ABI_PM "lp64" +#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_ILP64 1 +# define LZO_INFO_ABI_PM "ilp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_IP32L64 1 +# define LZO_INFO_ABI_PM "ip32l64" +#endif +#if !defined(__LZO_LIBC_OVERRIDE) +#if defined(LZO_LIBC_NAKED) +# define LZO_INFO_LIBC "naked" +#elif defined(LZO_LIBC_FREESTANDING) +# define LZO_INFO_LIBC "freestanding" +#elif defined(LZO_LIBC_MOSTLY_FREESTANDING) +# define LZO_INFO_LIBC "mfreestanding" +#elif defined(LZO_LIBC_ISOC90) +# define LZO_INFO_LIBC "isoc90" +#elif defined(LZO_LIBC_ISOC99) +# define LZO_INFO_LIBC "isoc99" +#elif defined(__dietlibc__) +# define LZO_LIBC_DIETLIBC 1 +# define LZO_INFO_LIBC "dietlibc" +#elif defined(_NEWLIB_VERSION) +# define LZO_LIBC_NEWLIB 1 +# define LZO_INFO_LIBC "newlib" +#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) +# if defined(__UCLIBC_SUBLEVEL__) +# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +# else +# define LZO_LIBC_UCLIBC 0x00090bL +# endif +# define LZO_INFO_LIBC "uclibc" +#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) +# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +# define LZO_INFO_LIBC "glibc" +#elif (LZO_CC_MWERKS) && defined(__MSL__) +# define LZO_LIBC_MSL __MSL__ +# define LZO_INFO_LIBC "msl" +#else +# define LZO_LIBC_DEFAULT 1 +# define LZO_INFO_LIBC "default" +#endif +#endif +#if (LZO_CC_GNUC >= 0x020800ul) +# define __lzo_gnuc_extension__ __extension__ +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_gnuc_extension__ __extension__ +#else +# define __lzo_gnuc_extension__ +#endif +#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) +# define lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define lzo_alignof(e) __alignof(e) +#endif +#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) +#elif defined(__cplusplus) +# define __lzo_inline inline +#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +# define __lzo_inline __inline +#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define __lzo_inline __inline__ +#elif (LZO_CC_DMC) +# define __lzo_inline __inline +#elif (LZO_CC_INTELC) +# define __lzo_inline __inline +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) +# define __lzo_inline __inline +#elif (LZO_CC_MSC && (_MSC_VER >= 900)) +# define __lzo_inline __inline +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define __lzo_inline inline +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_forceinline __forceinline +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_forceinline __forceinline +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# if defined(__cplusplus) +# else +# define __lzo_noinline __declspec(noinline) +# endif +#endif +#if (defined(__lzo_forceinline) || defined(__lzo_noinline)) && !defined(__lzo_inline) +# error "this should not happen" +#endif +#if (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# define __lzo_noreturn __declspec(noreturn) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && (LZO_OS_POSIX)) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_noreturn __declspec(noreturn) +#endif +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_constructor __attribute__((__constructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_constructor __attribute__((__constructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_constructor __attribute__((__constructor__)) +#endif +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_destructor __attribute__((__destructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_destructor __attribute__((__destructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_destructor __attribute__((__destructor__)) +#endif +#if defined(__lzo_destructor) && !defined(__lzo_constructor) +# error "this should not happen" +#endif +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#else +# define __lzo_likely(e) (e) +# define __lzo_unlikely(e) (e) +#endif +#if !defined(LZO_UNUSED) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED(var) ((void) &var) +# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_UNUSED(var) ((void) var) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_KEILC) +# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} +# elif (LZO_CC_PACIFICC) +# define LZO_UNUSED(var) ((void) sizeof(var)) +# elif (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED(var) ((void) var) +# else +# define LZO_UNUSED(var) ((void) &var) +# endif +#endif +#if !defined(LZO_UNUSED_FUNC) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED_FUNC(func) ((void) func) +# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_LLVM) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_MSC) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_KEILC || LZO_CC_PELLESC) +# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} +# else +# define LZO_UNUSED_FUNC(func) ((void) func) +# endif +#endif +#if !defined(LZO_UNUSED_LABEL) +# if (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# elif (LZO_CC_INTELC || LZO_CC_WATCOMC) +# define LZO_UNUSED_LABEL(l) if (0) goto l +# else +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) +# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# else +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT) +# if (LZO_CC_AZTECC) +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} +# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# else +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} +# endif +#endif +#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit +# define __lzo_cdecl_main __cdecl +# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_qsort __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_qsort _stdcall +# else +# define __lzo_cdecl_qsort __cdecl +# endif +# elif (LZO_CC_WATCOMC) +# define __lzo_cdecl __cdecl +# else +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit __cdecl +# define __lzo_cdecl_main __cdecl +# define __lzo_cdecl_qsort __cdecl +# endif +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) +# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_sighandler __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_sighandler _stdcall +# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +# define __lzo_cdecl_sighandler __clrcall +# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +# if defined(_DLL) +# define __lzo_cdecl_sighandler _far _cdecl _loadds +# elif defined(_MT) +# define __lzo_cdecl_sighandler _far _cdecl +# else +# define __lzo_cdecl_sighandler _cdecl +# endif +# else +# define __lzo_cdecl_sighandler __cdecl +# endif +#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) +# define __lzo_cdecl cdecl +#endif +#if !defined(__lzo_cdecl) +# define __lzo_cdecl +#endif +#if !defined(__lzo_cdecl_atexit) +# define __lzo_cdecl_atexit +#endif +#if !defined(__lzo_cdecl_main) +# define __lzo_cdecl_main +#endif +#if !defined(__lzo_cdecl_qsort) +# define __lzo_cdecl_qsort +#endif +#if !defined(__lzo_cdecl_sighandler) +# define __lzo_cdecl_sighandler +#endif +#if !defined(__lzo_cdecl_va) +# define __lzo_cdecl_va __lzo_cdecl +#endif +#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) +# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) +# else +# define LZO_HAVE_WINDOWS_H 1 +# endif +#endif +#if (LZO_ARCH_ALPHA) +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_AMD64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# define LZO_OPT_UNALIGNED64 1 +#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) +#elif (LZO_ARCH_ARM) +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_CRIS) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_I386) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_IA64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_PREFER_POSTINC 1 +#elif (LZO_ARCH_M68K) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(__mc68020__) && !defined(__mcoldfire__) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_MIPS) +# define LZO_OPT_AVOID_UINT_INDEX 1 +#elif (LZO_ARCH_POWERPC) +# define LZO_OPT_PREFER_PREINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_S390) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# if (LZO_SIZEOF_SIZE_T == 8) +# define LZO_OPT_UNALIGNED64 1 +# endif +#elif (LZO_ARCH_SH) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +#endif +#if !defined(LZO_CFG_NO_INLINE_ASM) +#if defined(LZO_CC_LLVM) +# define LZO_CFG_NO_INLINE_ASM 1 +#endif +#endif +#if !defined(LZO_CFG_NO_UNALIGNED) +#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC) +# define LZO_CFG_NO_UNALIGNED 1 +#endif +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# undef LZO_OPT_UNALIGNED16 +# undef LZO_OPT_UNALIGNED32 +# undef LZO_OPT_UNALIGNED64 +#endif +#if defined(LZO_CFG_NO_INLINE_ASM) +#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +# define LZO_ASM_SYNTAX_MSC 1 +#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#endif +#if (LZO_ASM_SYNTAX_GNUC) +#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) +# define __LZO_ASM_CLOBBER "ax" +#elif (LZO_CC_INTELC) +# define __LZO_ASM_CLOBBER "memory" +#else +# define __LZO_ASM_CLOBBER "cc", "memory" +#endif +#endif +#if defined(__LZO_INFOSTR_MM) +#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) +# define __LZO_INFOSTR_MM "" +#elif defined(LZO_INFO_MM) +# define __LZO_INFOSTR_MM "." LZO_INFO_MM +#else +# define __LZO_INFOSTR_MM "" +#endif +#if defined(__LZO_INFOSTR_PM) +#elif defined(LZO_INFO_ABI_PM) +# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM +#else +# define __LZO_INFOSTR_PM "" +#endif +#if defined(__LZO_INFOSTR_ENDIAN) +#elif defined(LZO_INFO_ABI_ENDIAN) +# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN +#else +# define __LZO_INFOSTR_ENDIAN "" +#endif +#if defined(__LZO_INFOSTR_OSNAME) +#elif defined(LZO_INFO_OS_CONSOLE) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE +#elif defined(LZO_INFO_OS_POSIX) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX +#else +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS +#endif +#if defined(__LZO_INFOSTR_LIBC) +#elif defined(LZO_INFO_LIBC) +# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC +#else +# define __LZO_INFOSTR_LIBC "" +#endif +#if defined(__LZO_INFOSTR_CCVER) +#elif defined(LZO_INFO_CCVER) +# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER +#else +# define __LZO_INFOSTR_CCVER "" +#endif +#define LZO_INFO_STRING \ + LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ + " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER + +#endif + +#endif + +#undef LZO_HAVE_CONFIG_H +#include "minilzo.h" + +#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2020) +# error "version mismatch in miniLZO source files" +#endif + +#ifdef MINILZO_HAVE_CONFIG_H +# define LZO_HAVE_CONFIG_H +#endif + +#ifndef __LZO_CONF_H +#define __LZO_CONF_H + +#if !defined(__LZO_IN_MINILZO) +#if defined(LZO_CFG_FREESTANDING) +# define LZO_LIBC_FREESTANDING 1 +# define LZO_OS_FREESTANDING 1 +# define ACC_LIBC_FREESTANDING 1 +# define ACC_OS_FREESTANDING 1 +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# define ACC_CFG_NO_UNALIGNED 1 +#endif +#if defined(LZO_HAVE_CONFIG_H) +# define ACC_CONFIG_NO_HEADER 1 +#endif +#if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) +# error "include this file first" +#endif +#include "lzo/lzoconf.h" +#endif + +#if (LZO_VERSION < 0x02000) || !defined(__LZOCONF_H_INCLUDED) +# error "version mismatch" +#endif + +#if (LZO_CC_BORLANDC && LZO_ARCH_I086) +# pragma option -h +#endif + +#if (LZO_CC_MSC && (_MSC_VER >= 1000)) +# pragma warning(disable: 4127 4701) +#endif +#if (LZO_CC_MSC && (_MSC_VER >= 1300)) +# pragma warning(disable: 4820) +# pragma warning(disable: 4514 4710 4711) +#endif + +#if defined(__LZO_MMODEL_HUGE) && (!LZO_HAVE_MM_HUGE_PTR) +# error "this should not happen - check defines for __huge" +#endif + +#if defined(__LZO_IN_MINILZO) || defined(LZO_CFG_FREESTANDING) +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define ACC_WANT_ACC_INCD_H 1 +# define ACC_WANT_ACC_INCE_H 1 +# define ACC_WANT_ACC_INCI_H 1 +#elif 1 +# include +#else +# define ACC_WANT_ACC_INCD_H 1 +#endif + +#if (LZO_ARCH_I086) +# define ACC_MM_AHSHIFT LZO_MM_AHSHIFT +# define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0]) +# define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1]) +# define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o))) +#endif + +#if !defined(lzo_uintptr_t) +# if defined(__LZO_MMODEL_HUGE) +# define lzo_uintptr_t unsigned long +# elif 1 && defined(LZO_OS_OS400) && (LZO_SIZEOF_VOID_P == 16) +# define __LZO_UINTPTR_T_IS_POINTER 1 + typedef char* lzo_uintptr_t; +# define lzo_uintptr_t lzo_uintptr_t +# elif (LZO_SIZEOF_SIZE_T == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t size_t +# elif (LZO_SIZEOF_LONG == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned long +# elif (LZO_SIZEOF_INT == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned int +# elif (LZO_SIZEOF_LONG_LONG == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned long long +# else +# define lzo_uintptr_t size_t +# endif +#endif +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) + +#if 1 && !defined(LZO_CFG_FREESTANDING) +#if 1 && !defined(HAVE_STRING_H) +#define HAVE_STRING_H 1 +#endif +#if 1 && !defined(HAVE_MEMCMP) +#define HAVE_MEMCMP 1 +#endif +#if 1 && !defined(HAVE_MEMCPY) +#define HAVE_MEMCPY 1 +#endif +#if 1 && !defined(HAVE_MEMMOVE) +#define HAVE_MEMMOVE 1 +#endif +#if 1 && !defined(HAVE_MEMSET) +#define HAVE_MEMSET 1 +#endif +#endif + +#if 1 && defined(HAVE_STRING_H) +#include +#endif + +#if defined(LZO_CFG_FREESTANDING) +# undef HAVE_MEMCMP +# undef HAVE_MEMCPY +# undef HAVE_MEMMOVE +# undef HAVE_MEMSET +#endif + +#if !defined(HAVE_MEMCMP) +# undef memcmp +# define memcmp(a,b,c) lzo_memcmp(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memcmp(a,b,c) memcmp(a,b,c) +#endif +#if !defined(HAVE_MEMCPY) +# undef memcpy +# define memcpy(a,b,c) lzo_memcpy(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memcpy(a,b,c) memcpy(a,b,c) +#endif +#if !defined(HAVE_MEMMOVE) +# undef memmove +# define memmove(a,b,c) lzo_memmove(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memmove(a,b,c) memmove(a,b,c) +#endif +#if !defined(HAVE_MEMSET) +# undef memset +# define memset(a,b,c) lzo_memset(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memset(a,b,c) memset(a,b,c) +#endif + +#undef NDEBUG +#if defined(LZO_CFG_FREESTANDING) +# undef LZO_DEBUG +# define NDEBUG 1 +# undef assert +# define assert(e) ((void)0) +#else +# if !defined(LZO_DEBUG) +# define NDEBUG 1 +# endif +# include +#endif + +#if 0 && defined(__BOUNDS_CHECKING_ON) +# include +#else +# define BOUNDS_CHECKING_OFF_DURING(stmt) stmt +# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr) +#endif + +#if !defined(__lzo_inline) +# define __lzo_inline +#endif +#if !defined(__lzo_forceinline) +# define __lzo_forceinline +#endif +#if !defined(__lzo_noinline) +# define __lzo_noinline +#endif + +#if 1 +# define LZO_BYTE(x) ((unsigned char) (x)) +#else +# define LZO_BYTE(x) ((unsigned char) ((x) & 0xff)) +#endif + +#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b)) +#define LZO_MIN(a,b) ((a) <= (b) ? (a) : (b)) +#define LZO_MAX3(a,b,c) ((a) >= (b) ? LZO_MAX(a,c) : LZO_MAX(b,c)) +#define LZO_MIN3(a,b,c) ((a) <= (b) ? LZO_MIN(a,c) : LZO_MIN(b,c)) + +#define lzo_sizeof(type) ((lzo_uint) (sizeof(type))) + +#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array)))) + +#define LZO_SIZE(bits) (1u << (bits)) +#define LZO_MASK(bits) (LZO_SIZE(bits) - 1) + +#define LZO_LSIZE(bits) (1ul << (bits)) +#define LZO_LMASK(bits) (LZO_LSIZE(bits) - 1) + +#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits)) +#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1) + +#if !defined(DMUL) +#if 0 + +# define DMUL(a,b) ((lzo_xint) ((lzo_uint32)(a) * (lzo_uint32)(b))) +#else +# define DMUL(a,b) ((lzo_xint) ((a) * (b))) +#endif +#endif + +#if 1 && !defined(LZO_CFG_NO_UNALIGNED) +#if 1 && (LZO_ARCH_AMD64 || LZO_ARCH_I386) +# if (LZO_SIZEOF_SHORT == 2) +# define LZO_UNALIGNED_OK_2 +# endif +# if (LZO_SIZEOF_INT == 4) +# define LZO_UNALIGNED_OK_4 +# endif +#endif +#endif + +#if defined(LZO_UNALIGNED_OK_2) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(short) == 2) +#endif +#if defined(LZO_UNALIGNED_OK_4) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +#elif defined(LZO_ALIGNED_OK_4) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +#endif + +#define MEMCPY8_DS(dest,src,len) \ + lzo_memcpy(dest,src,len); dest += len; src += len + +#define BZERO8_PTR(s,l,n) \ + lzo_memset((lzo_voidp)(s),0,(lzo_uint)(l)*(n)) + +#define MEMCPY_DS(dest,src,len) \ + do *dest++ = *src++; while (--len > 0) + +__LZO_EXTERN_C int __lzo_init_done; +__LZO_EXTERN_C const char __lzo_copyright[]; +LZO_EXTERN(const lzo_bytep) lzo_copyright(void); + +#ifndef __LZO_PTR_H +#define __LZO_PTR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(lzo_uintptr_t) +# if defined(__LZO_MMODEL_HUGE) +# define lzo_uintptr_t unsigned long +# else +# define lzo_uintptr_t acc_uintptr_t +# ifdef __ACC_INTPTR_T_IS_POINTER +# define __LZO_UINTPTR_T_IS_POINTER 1 +# endif +# endif +#endif + +#if (LZO_ARCH_I086) +#define PTR(a) ((lzo_bytep) (a)) +#define PTR_ALIGNED_4(a) ((ACC_PTR_FP_OFF(a) & 3) == 0) +#define PTR_ALIGNED2_4(a,b) (((ACC_PTR_FP_OFF(a) | ACC_PTR_FP_OFF(b)) & 3) == 0) +#else +#define PTR(a) ((lzo_uintptr_t) (a)) +#define PTR_LINEAR(a) PTR(a) +#define PTR_ALIGNED_4(a) ((PTR_LINEAR(a) & 3) == 0) +#define PTR_ALIGNED_8(a) ((PTR_LINEAR(a) & 7) == 0) +#define PTR_ALIGNED2_4(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 3) == 0) +#define PTR_ALIGNED2_8(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 7) == 0) +#endif + +#define PTR_LT(a,b) (PTR(a) < PTR(b)) +#define PTR_GE(a,b) (PTR(a) >= PTR(b)) +#define PTR_DIFF(a,b) (PTR(a) - PTR(b)) +#define pd(a,b) ((lzo_uint) ((a)-(b))) + +LZO_EXTERN(lzo_uintptr_t) +__lzo_ptr_linear(const lzo_voidp ptr); + +typedef union +{ + char a_char; + unsigned char a_uchar; + short a_short; + unsigned short a_ushort; + int a_int; + unsigned int a_uint; + long a_long; + unsigned long a_ulong; + lzo_int a_lzo_int; + lzo_uint a_lzo_uint; + lzo_int32 a_lzo_int32; + lzo_uint32 a_lzo_uint32; + ptrdiff_t a_ptrdiff_t; + lzo_uintptr_t a_lzo_uintptr_t; + lzo_voidp a_lzo_voidp; + void * a_void_p; + lzo_bytep a_lzo_bytep; + lzo_bytepp a_lzo_bytepp; + lzo_uintp a_lzo_uintp; + lzo_uint * a_lzo_uint_p; + lzo_uint32p a_lzo_uint32p; + lzo_uint32 * a_lzo_uint32_p; + unsigned char * a_uchar_p; + char * a_char_p; +} +lzo_full_align_t; + +#ifdef __cplusplus +} +#endif + +#endif + +#define LZO_DETERMINISTIC + +#define LZO_DICT_USE_PTR +#if 0 && (LZO_ARCH_I086) +# undef LZO_DICT_USE_PTR +#endif + +#if defined(LZO_DICT_USE_PTR) +# define lzo_dict_t const lzo_bytep +# define lzo_dict_p lzo_dict_t __LZO_MMODEL * +#else +# define lzo_dict_t lzo_uint +# define lzo_dict_p lzo_dict_t __LZO_MMODEL * +#endif + +#endif + +#if !defined(MINILZO_CFG_SKIP_LZO_PTR) + +LZO_PUBLIC(lzo_uintptr_t) +__lzo_ptr_linear(const lzo_voidp ptr) +{ + lzo_uintptr_t p; + +#if (LZO_ARCH_I086) + p = (((lzo_uintptr_t)(ACC_PTR_FP_SEG(ptr))) << (16 - ACC_MM_AHSHIFT)) + (ACC_PTR_FP_OFF(ptr)); +#else + p = (lzo_uintptr_t) PTR_LINEAR(ptr); +#endif + + return p; +} + +LZO_PUBLIC(unsigned) +__lzo_align_gap(const lzo_voidp ptr, lzo_uint size) +{ +#if defined(__LZO_UINTPTR_T_IS_POINTER) + size_t n = (size_t) ptr; + n = (((n + size - 1) / size) * size) - n; +#else + lzo_uintptr_t p, n; + p = __lzo_ptr_linear(ptr); + n = (((p + size - 1) / size) * size) - p; +#endif + + assert(size > 0); + assert((long)n >= 0); + assert(n <= s); + return (unsigned)n; +} + +#endif + +/* If you use the LZO library in a product, you *must* keep this + * copyright string in the executable of your product. + */ + +const char __lzo_copyright[] = +#if !defined(__LZO_IN_MINLZO) + LZO_VERSION_STRING; +#else + "\r\n\n" + "LZO data compression library.\n" + "$Copyright: LZO (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Markus Franz Xaver Johannes Oberhumer\n" + "\n" + "http://www.oberhumer.com $\n\n" + "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" + "$Built: " __DATE__ " " __TIME__ " $\n" + "$Info: " LZO_INFO_STRING " $\n"; +#endif + +LZO_PUBLIC(const lzo_bytep) +lzo_copyright(void) +{ +#if (LZO_OS_DOS16 && LZO_CC_TURBOC) + return (lzo_voidp) __lzo_copyright; +#else + return (const lzo_bytep) __lzo_copyright; +#endif +} + +LZO_PUBLIC(unsigned) +lzo_version(void) +{ + return LZO_VERSION; +} + +LZO_PUBLIC(const char *) +lzo_version_string(void) +{ + return LZO_VERSION_STRING; +} + +LZO_PUBLIC(const char *) +lzo_version_date(void) +{ + return LZO_VERSION_DATE; +} + +LZO_PUBLIC(const lzo_charp) +_lzo_version_string(void) +{ + return LZO_VERSION_STRING; +} + +LZO_PUBLIC(const lzo_charp) +_lzo_version_date(void) +{ + return LZO_VERSION_DATE; +} + +#define LZO_BASE 65521u +#define LZO_NMAX 5552 + +#define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1 +#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1); +#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2); +#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4); +#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8); + +LZO_PUBLIC(lzo_uint32) +lzo_adler32(lzo_uint32 adler, const lzo_bytep buf, lzo_uint len) +{ + lzo_uint32 s1 = adler & 0xffff; + lzo_uint32 s2 = (adler >> 16) & 0xffff; + unsigned k; + + if (buf == NULL) + return 1; + + while (len > 0) + { + k = len < LZO_NMAX ? (unsigned) len : LZO_NMAX; + len -= k; + if (k >= 16) do + { + LZO_DO16(buf,0); + buf += 16; + k -= 16; + } while (k >= 16); + if (k != 0) do + { + s1 += *buf++; + s2 += s1; + } while (--k > 0); + s1 %= LZO_BASE; + s2 %= LZO_BASE; + } + return (s2 << 16) | s1; +} + +#undef LZO_DO1 +#undef LZO_DO2 +#undef LZO_DO4 +#undef LZO_DO8 +#undef LZO_DO16 + +#if !defined(MINILZO_CFG_SKIP_LZO_STRING) +#undef lzo_memcmp +#undef lzo_memcpy +#undef lzo_memmove +#undef lzo_memset +#if !defined(__LZO_MMODEL_HUGE) +# undef LZO_HAVE_MM_HUGE_PTR +#endif +#define lzo_hsize_t lzo_uint +#define lzo_hvoid_p lzo_voidp +#define lzo_hbyte_p lzo_bytep +#define LZOLIB_PUBLIC(r,f) LZO_PUBLIC(r) f +#define lzo_hmemcmp lzo_memcmp +#define lzo_hmemcpy lzo_memcpy +#define lzo_hmemmove lzo_memmove +#define lzo_hmemset lzo_memset +#define __LZOLIB_HMEMCPY_CH_INCLUDED 1 +#if !defined(LZOLIB_PUBLIC) +# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) +#endif +LZOLIB_PUBLIC(int, lzo_hmemcmp) (const lzo_hvoid_p s1, const lzo_hvoid_p s2, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCMP) + const lzo_hbyte_p p1 = (const lzo_hbyte_p) s1; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) s2; + if __lzo_likely(len > 0) do + { + int d = *p1 - *p2; + if (d != 0) + return d; + p1++; p2++; + } while __lzo_likely(--len > 0); + return 0; +#else + return memcmp(s1, s2, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCPY) + lzo_hbyte_p p1 = (lzo_hbyte_p) dest; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; + if (len <= 0 || p1 == p2) + return dest; + do + *p1++ = *p2++; + while __lzo_likely(--len > 0); + return dest; +#else + return memcpy(dest, src, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMMOVE) + lzo_hbyte_p p1 = (lzo_hbyte_p) dest; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; + if (len <= 0 || p1 == p2) + return dest; + if (p1 < p2) + { + do + *p1++ = *p2++; + while __lzo_likely(--len > 0); + } + else + { + p1 += len; + p2 += len; + do + *--p1 = *--p2; + while __lzo_likely(--len > 0); + } + return dest; +#else + return memmove(dest, src, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int c, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMSET) + lzo_hbyte_p p = (lzo_hbyte_p) s; + if __lzo_likely(len > 0) do + *p++ = (unsigned char) c; + while __lzo_likely(--len > 0); + return s; +#else + return memset(s, c, len); +#endif +} +#undef LZOLIB_PUBLIC +#endif + +#if !defined(__LZO_IN_MINILZO) + +#define ACC_WANT_ACC_CHK_CH 1 +#undef ACCCHK_ASSERT + + ACCCHK_ASSERT_IS_SIGNED_T(lzo_int) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint) + + ACCCHK_ASSERT_IS_SIGNED_T(lzo_int32) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32) + ACCCHK_ASSERT((LZO_UINT32_C(1) << (int)(8*sizeof(LZO_UINT32_C(1))-1)) > 0) + ACCCHK_ASSERT(sizeof(lzo_uint32) >= 4) + +#if !defined(__LZO_UINTPTR_T_IS_POINTER) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t) +#endif + ACCCHK_ASSERT(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) + + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_xint) + ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint32)) + ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint)) + ACCCHK_ASSERT(sizeof(lzo_xint) == sizeof(lzo_uint32) || sizeof(lzo_xint) == sizeof(lzo_uint)) + +#endif +#undef ACCCHK_ASSERT + +LZO_PUBLIC(int) +_lzo_config_check(void) +{ + lzo_bool r = 1; + union { unsigned char c[2*sizeof(lzo_xint)]; lzo_xint l[2]; } u; + +#if !defined(LZO_CFG_NO_CONFIG_CHECK) +#if defined(LZO_ABI_BIG_ENDIAN) + u.l[0] = u.l[1] = 0; u.c[sizeof(lzo_xint) - 1] = 128; + r &= (u.l[0] == 128); +#endif +#if defined(LZO_ABI_LITTLE_ENDIAN) + u.l[0] = u.l[1] = 0; u.c[0] = 128; + r &= (u.l[0] == 128); +#endif +#if defined(LZO_UNALIGNED_OK_2) + u.l[0] = u.l[1] = 0; + r &= ((* (const lzo_ushortp) (const lzo_voidp) &u.c[1]) == 0); +#endif +#if defined(LZO_UNALIGNED_OK_4) + u.l[0] = u.l[1] = 0; + r &= ((* (const lzo_uint32p) (const lzo_voidp) &u.c[1]) == 0); +#endif +#endif + + LZO_UNUSED(u); + return r == 1 ? LZO_E_OK : LZO_E_ERROR; +} + +int __lzo_init_done = 0; + +LZO_PUBLIC(int) +__lzo_init_v2(unsigned v, int s1, int s2, int s3, int s4, int s5, + int s6, int s7, int s8, int s9) +{ + int r; + +#if defined(__LZO_IN_MINILZO) +#elif (LZO_CC_MSC && ((_MSC_VER) < 700)) +#else +#define ACC_WANT_ACC_CHK_CH 1 +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr) +#endif +#undef ACCCHK_ASSERT + + __lzo_init_done = 1; + + if (v == 0) + return LZO_E_ERROR; + + r = (s1 == -1 || s1 == (int) sizeof(short)) && + (s2 == -1 || s2 == (int) sizeof(int)) && + (s3 == -1 || s3 == (int) sizeof(long)) && + (s4 == -1 || s4 == (int) sizeof(lzo_uint32)) && + (s5 == -1 || s5 == (int) sizeof(lzo_uint)) && + (s6 == -1 || s6 == (int) lzo_sizeof_dict_t) && + (s7 == -1 || s7 == (int) sizeof(char *)) && + (s8 == -1 || s8 == (int) sizeof(lzo_voidp)) && + (s9 == -1 || s9 == (int) sizeof(lzo_callback_t)); + if (!r) + return LZO_E_ERROR; + + r = _lzo_config_check(); + if (r != LZO_E_OK) + return r; + + return r; +} + +#if !defined(__LZO_IN_MINILZO) + +#if (LZO_OS_WIN16 && LZO_CC_WATCOMC) && defined(__SW_BD) + +#if 0 +BOOL FAR PASCAL LibMain ( HANDLE hInstance, WORD wDataSegment, + WORD wHeapSize, LPSTR lpszCmdLine ) +#else +int __far __pascal LibMain ( int a, short b, short c, long d ) +#endif +{ + LZO_UNUSED(a); LZO_UNUSED(b); LZO_UNUSED(c); LZO_UNUSED(d); + return 1; +} + +#endif + +#endif + +#define do_compress _lzo1x_1_do_compress + +#if !defined(MINILZO_CFG_SKIP_LZO1X_1_COMPRESS) + +#define LZO_NEED_DICT_H +#define D_BITS 14 +#define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) +#define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f) + +#ifndef __LZO_CONFIG1X_H +#define __LZO_CONFIG1X_H + +#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z) +# define LZO1X +#endif + +#if !defined(__LZO_IN_MINILZO) +#include "lzo/lzo1x.h" +#endif + +#define LZO_EOF_CODE +#undef LZO_DETERMINISTIC + +#define M1_MAX_OFFSET 0x0400 +#ifndef M2_MAX_OFFSET +#define M2_MAX_OFFSET 0x0800 +#endif +#define M3_MAX_OFFSET 0x4000 +#define M4_MAX_OFFSET 0xbfff + +#define MX_MAX_OFFSET (M1_MAX_OFFSET + M2_MAX_OFFSET) + +#define M1_MIN_LEN 2 +#define M1_MAX_LEN 2 +#define M2_MIN_LEN 3 +#ifndef M2_MAX_LEN +#define M2_MAX_LEN 8 +#endif +#define M3_MIN_LEN 3 +#define M3_MAX_LEN 33 +#define M4_MIN_LEN 3 +#define M4_MAX_LEN 9 + +#define M1_MARKER 0 +#define M2_MARKER 64 +#define M3_MARKER 32 +#define M4_MARKER 16 + +#ifndef MIN_LOOKAHEAD +#define MIN_LOOKAHEAD (M2_MAX_LEN + 1) +#endif + +#if defined(LZO_NEED_DICT_H) + +#ifndef LZO_HASH +#define LZO_HASH LZO_HASH_LZO_INCREMENTAL_B +#endif +#define DL_MIN_LEN M2_MIN_LEN + +#ifndef __LZO_DICT_H +#define __LZO_DICT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(D_BITS) && defined(DBITS) +# define D_BITS DBITS +#endif +#if !defined(D_BITS) +# error "D_BITS is not defined" +#endif +#if (D_BITS < 16) +# define D_SIZE LZO_SIZE(D_BITS) +# define D_MASK LZO_MASK(D_BITS) +#else +# define D_SIZE LZO_USIZE(D_BITS) +# define D_MASK LZO_UMASK(D_BITS) +#endif +#define D_HIGH ((D_MASK >> 1) + 1) + +#if !defined(DD_BITS) +# define DD_BITS 0 +#endif +#define DD_SIZE LZO_SIZE(DD_BITS) +#define DD_MASK LZO_MASK(DD_BITS) + +#if !defined(DL_BITS) +# define DL_BITS (D_BITS - DD_BITS) +#endif +#if (DL_BITS < 16) +# define DL_SIZE LZO_SIZE(DL_BITS) +# define DL_MASK LZO_MASK(DL_BITS) +#else +# define DL_SIZE LZO_USIZE(DL_BITS) +# define DL_MASK LZO_UMASK(DL_BITS) +#endif + +#if (D_BITS != DL_BITS + DD_BITS) +# error "D_BITS does not match" +#endif +#if (D_BITS < 8 || D_BITS > 18) +# error "invalid D_BITS" +#endif +#if (DL_BITS < 8 || DL_BITS > 20) +# error "invalid DL_BITS" +#endif +#if (DD_BITS < 0 || DD_BITS > 6) +# error "invalid DD_BITS" +#endif + +#if !defined(DL_MIN_LEN) +# define DL_MIN_LEN 3 +#endif +#if !defined(DL_SHIFT) +# define DL_SHIFT ((DL_BITS + (DL_MIN_LEN - 1)) / DL_MIN_LEN) +#endif + +#define LZO_HASH_GZIP 1 +#define LZO_HASH_GZIP_INCREMENTAL 2 +#define LZO_HASH_LZO_INCREMENTAL_A 3 +#define LZO_HASH_LZO_INCREMENTAL_B 4 + +#if !defined(LZO_HASH) +# error "choose a hashing strategy" +#endif + +#undef DM +#undef DX + +#if (DL_MIN_LEN == 3) +# define _DV2_A(p,shift1,shift2) \ + (((( (lzo_xint)((p)[0]) << shift1) ^ (p)[1]) << shift2) ^ (p)[2]) +# define _DV2_B(p,shift1,shift2) \ + (((( (lzo_xint)((p)[2]) << shift1) ^ (p)[1]) << shift2) ^ (p)[0]) +# define _DV3_B(p,shift1,shift2,shift3) \ + ((_DV2_B((p)+1,shift1,shift2) << (shift3)) ^ (p)[0]) +#elif (DL_MIN_LEN == 2) +# define _DV2_A(p,shift1,shift2) \ + (( (lzo_xint)(p[0]) << shift1) ^ p[1]) +# define _DV2_B(p,shift1,shift2) \ + (( (lzo_xint)(p[1]) << shift1) ^ p[2]) +#else +# error "invalid DL_MIN_LEN" +#endif +#define _DV_A(p,shift) _DV2_A(p,shift,shift) +#define _DV_B(p,shift) _DV2_B(p,shift,shift) +#define DA2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) + (p)[1]) << (s1)) + (p)[0]) +#define DS2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) - (p)[1]) << (s1)) - (p)[0]) +#define DX2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0]) +#define DA3(p,s1,s2,s3) ((DA2((p)+1,s2,s3) << (s1)) + (p)[0]) +#define DS3(p,s1,s2,s3) ((DS2((p)+1,s2,s3) << (s1)) - (p)[0]) +#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0]) +#define DMS(v,s) ((lzo_uint) (((v) & (D_MASK >> (s))) << (s))) +#define DM(v) DMS(v,0) + +#if (LZO_HASH == LZO_HASH_GZIP) +# define _DINDEX(dv,p) (_DV_A((p),DL_SHIFT)) + +#elif (LZO_HASH == LZO_HASH_GZIP_INCREMENTAL) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_A((p),DL_SHIFT) +# define DVAL_NEXT(dv,p) dv = (((dv) << DL_SHIFT) ^ p[2]) +# define _DINDEX(dv,p) (dv) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_A) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_A((p),5) +# define DVAL_NEXT(dv,p) \ + dv ^= (lzo_xint)(p[-1]) << (2*5); dv = (((dv) << 5) ^ p[2]) +# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_B) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_B((p),5) +# define DVAL_NEXT(dv,p) \ + dv ^= p[-1]; dv = (((dv) >> 5) ^ ((lzo_xint)(p[2]) << (2*5))) +# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#else +# error "choose a hashing strategy" +#endif + +#ifndef DINDEX +#define DINDEX(dv,p) ((lzo_uint)((_DINDEX(dv,p)) & DL_MASK) << DD_BITS) +#endif +#if !defined(DINDEX1) && defined(D_INDEX1) +#define DINDEX1 D_INDEX1 +#endif +#if !defined(DINDEX2) && defined(D_INDEX2) +#define DINDEX2 D_INDEX2 +#endif + +#if !defined(__LZO_HASH_INCREMENTAL) +# define DVAL_FIRST(dv,p) ((void) 0) +# define DVAL_NEXT(dv,p) ((void) 0) +# define DVAL_LOOKAHEAD 0 +#endif + +#if !defined(DVAL_ASSERT) +#if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) +static void DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) +{ + lzo_xint df; + DVAL_FIRST(df,(p)); + assert(DINDEX(dv,p) == DINDEX(df,p)); +} +#else +# define DVAL_ASSERT(dv,p) ((void) 0) +#endif +#endif + +#if defined(LZO_DICT_USE_PTR) +# define DENTRY(p,in) (p) +# define GINDEX(m_pos,m_off,dict,dindex,in) m_pos = dict[dindex] +#else +# define DENTRY(p,in) ((lzo_uint) ((p)-(in))) +# define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex] +#endif + +#if (DD_BITS == 0) + +# define UPDATE_D(dict,drun,dv,p,in) dict[ DINDEX(dv,p) ] = DENTRY(p,in) +# define UPDATE_I(dict,drun,index,p,in) dict[index] = DENTRY(p,in) +# define UPDATE_P(ptr,drun,p,in) (ptr)[0] = DENTRY(p,in) + +#else + +# define UPDATE_D(dict,drun,dv,p,in) \ + dict[ DINDEX(dv,p) + drun++ ] = DENTRY(p,in); drun &= DD_MASK +# define UPDATE_I(dict,drun,index,p,in) \ + dict[ (index) + drun++ ] = DENTRY(p,in); drun &= DD_MASK +# define UPDATE_P(ptr,drun,p,in) \ + (ptr) [ drun++ ] = DENTRY(p,in); drun &= DD_MASK + +#endif + +#if defined(LZO_DICT_USE_PTR) + +#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ + (m_pos == NULL || (m_off = pd(ip, m_pos)) > max_offset) + +#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ + (BOUNDS_CHECKING_OFF_IN_EXPR(( \ + m_pos = ip - (lzo_uint) PTR_DIFF(ip,m_pos), \ + PTR_LT(m_pos,in) || \ + (m_off = (lzo_uint) PTR_DIFF(ip,m_pos)) <= 0 || \ + m_off > max_offset ))) + +#else + +#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ + (m_off == 0 || \ + ((m_off = pd(ip, in) - m_off) > max_offset) || \ + (m_pos = (ip) - (m_off), 0) ) + +#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ + (pd(ip, in) <= m_off || \ + ((m_off = pd(ip, in) - m_off) > max_offset) || \ + (m_pos = (ip) - (m_off), 0) ) + +#endif + +#if defined(LZO_DETERMINISTIC) +# define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET +#else +# define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +#endif + +#endif + +#define DO_COMPRESS lzo1x_1_compress + +static __lzo_noinline lzo_uint +do_compress ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +{ + register const lzo_bytep ip; + lzo_bytep op; + const lzo_bytep const in_end = in + in_len; + const lzo_bytep const ip_end = in + in_len - M2_MAX_LEN - 5; + const lzo_bytep ii; + lzo_dict_p const dict = (lzo_dict_p) wrkmem; + + op = out; + ip = in; + ii = ip; + + ip += 4; + for (;;) + { + register const lzo_bytep m_pos; + lzo_uint m_off; + lzo_uint m_len; + lzo_uint dindex; + + DINDEX1(dindex,ip); + GINDEX(m_pos,m_off,dict,dindex,in); + if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) + goto literal; +#if 1 + if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) + goto try_match; + DINDEX2(dindex,ip); +#endif + GINDEX(m_pos,m_off,dict,dindex,in); + if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) + goto literal; + if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) + goto try_match; + goto literal; + +try_match: +#if 1 && defined(LZO_UNALIGNED_OK_2) + if (* (const lzo_ushortp) m_pos != * (const lzo_ushortp) ip) +#else + if (m_pos[0] != ip[0] || m_pos[1] != ip[1]) +#endif + { + } + else + { + if __lzo_likely(m_pos[2] == ip[2]) + { +#if 0 + if (m_off <= M2_MAX_OFFSET) + goto match; + if (lit <= 3) + goto match; + if (lit == 3) + { + assert(op - 2 > out); op[-2] |= LZO_BYTE(3); + *op++ = *ii++; *op++ = *ii++; *op++ = *ii++; + goto code_match; + } + if (m_pos[3] == ip[3]) +#endif + goto match; + } + else + { +#if 0 +#if 0 + if (m_off <= M1_MAX_OFFSET && lit > 0 && lit <= 3) +#else + if (m_off <= M1_MAX_OFFSET && lit == 3) +#endif + { + register lzo_uint t; + + t = lit; + assert(op - 2 > out); op[-2] |= LZO_BYTE(t); + do *op++ = *ii++; while (--t > 0); + assert(ii == ip); + m_off -= 1; + *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2)); + *op++ = LZO_BYTE(m_off >> 2); + ip += 2; + goto match_done; + } +#endif + } + } + +literal: + UPDATE_I(dict,0,dindex,ip,in); + ++ip; + if __lzo_unlikely(ip >= ip_end) + break; + continue; + +match: + UPDATE_I(dict,0,dindex,ip,in); + if (pd(ip,ii) > 0) + { + register lzo_uint t = pd(ip,ii); + + if (t <= 3) + { + assert(op - 2 > out); + op[-2] |= LZO_BYTE(t); + } + else if (t <= 18) + *op++ = LZO_BYTE(t - 3); + else + { + register lzo_uint tt = t - 18; + + *op++ = 0; + while (tt > 255) + { + tt -= 255; + *op++ = 0; + } + assert(tt > 0); + *op++ = LZO_BYTE(tt); + } + do *op++ = *ii++; while (--t > 0); + } + + assert(ii == ip); + ip += 3; + if (m_pos[3] != *ip++ || m_pos[4] != *ip++ || m_pos[5] != *ip++ || + m_pos[6] != *ip++ || m_pos[7] != *ip++ || m_pos[8] != *ip++ +#ifdef LZO1Y + || m_pos[ 9] != *ip++ || m_pos[10] != *ip++ || m_pos[11] != *ip++ + || m_pos[12] != *ip++ || m_pos[13] != *ip++ || m_pos[14] != *ip++ +#endif + ) + { + --ip; + m_len = pd(ip, ii); + assert(m_len >= 3); assert(m_len <= M2_MAX_LEN); + + if (m_off <= M2_MAX_OFFSET) + { + m_off -= 1; +#if defined(LZO1X) + *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); + *op++ = LZO_BYTE(m_off >> 3); +#elif defined(LZO1Y) + *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); + *op++ = LZO_BYTE(m_off >> 2); +#endif + } + else if (m_off <= M3_MAX_OFFSET) + { + m_off -= 1; + *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); + goto m3_m4_offset; + } + else +#if defined(LZO1X) + { + m_off -= 0x4000; + assert(m_off > 0); assert(m_off <= 0x7fff); + *op++ = LZO_BYTE(M4_MARKER | + ((m_off & 0x4000) >> 11) | (m_len - 2)); + goto m3_m4_offset; + } +#elif defined(LZO1Y) + goto m4_match; +#endif + } + else + { + { + const lzo_bytep end = in_end; + const lzo_bytep m = m_pos + M2_MAX_LEN + 1; + while (ip < end && *m == *ip) + m++, ip++; + m_len = pd(ip, ii); + } + assert(m_len > M2_MAX_LEN); + + if (m_off <= M3_MAX_OFFSET) + { + m_off -= 1; + if (m_len <= 33) + *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); + else + { + m_len -= 33; + *op++ = M3_MARKER | 0; + goto m3_m4_len; + } + } + else + { +#if defined(LZO1Y) +m4_match: +#endif + m_off -= 0x4000; + assert(m_off > 0); assert(m_off <= 0x7fff); + if (m_len <= M4_MAX_LEN) + *op++ = LZO_BYTE(M4_MARKER | + ((m_off & 0x4000) >> 11) | (m_len - 2)); + else + { + m_len -= M4_MAX_LEN; + *op++ = LZO_BYTE(M4_MARKER | ((m_off & 0x4000) >> 11)); +m3_m4_len: + while (m_len > 255) + { + m_len -= 255; + *op++ = 0; + } + assert(m_len > 0); + *op++ = LZO_BYTE(m_len); + } + } + +m3_m4_offset: + *op++ = LZO_BYTE((m_off & 63) << 2); + *op++ = LZO_BYTE(m_off >> 6); + } + +#if 0 +match_done: +#endif + ii = ip; + if __lzo_unlikely(ip >= ip_end) + break; + } + + *out_len = pd(op, out); + return pd(in_end,ii); +} + +LZO_PUBLIC(int) +DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +{ + lzo_bytep op = out; + lzo_uint t; + + if __lzo_unlikely(in_len <= M2_MAX_LEN + 5) + t = in_len; + else + { + t = do_compress(in,in_len,op,out_len,wrkmem); + op += *out_len; + } + + if (t > 0) + { + const lzo_bytep ii = in + in_len - t; + + if (op == out && t <= 238) + *op++ = LZO_BYTE(17 + t); + else if (t <= 3) + op[-2] |= LZO_BYTE(t); + else if (t <= 18) + *op++ = LZO_BYTE(t - 3); + else + { + lzo_uint tt = t - 18; + + *op++ = 0; + while (tt > 255) + { + tt -= 255; + *op++ = 0; + } + assert(tt > 0); + *op++ = LZO_BYTE(tt); + } + do *op++ = *ii++; while (--t > 0); + } + + *op++ = M4_MARKER | 1; + *op++ = 0; + *op++ = 0; + + *out_len = pd(op, out); + return LZO_E_OK; +} + +#endif + +#undef do_compress +#undef DO_COMPRESS +#undef LZO_HASH + +#undef LZO_TEST_OVERRUN +#undef DO_DECOMPRESS +#define DO_DECOMPRESS lzo1x_decompress + +#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS) + +#if defined(LZO_TEST_OVERRUN) +# if !defined(LZO_TEST_OVERRUN_INPUT) +# define LZO_TEST_OVERRUN_INPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_OUTPUT) +# define LZO_TEST_OVERRUN_OUTPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define LZO_TEST_OVERRUN_LOOKBEHIND +# endif +#endif + +#undef TEST_IP +#undef TEST_OP +#undef TEST_LB +#undef TEST_LBO +#undef NEED_IP +#undef NEED_OP +#undef HAVE_TEST_IP +#undef HAVE_TEST_OP +#undef HAVE_NEED_IP +#undef HAVE_NEED_OP +#undef HAVE_ANY_IP +#undef HAVE_ANY_OP + +#if defined(LZO_TEST_OVERRUN_INPUT) +# if (LZO_TEST_OVERRUN_INPUT >= 1) +# define TEST_IP (ip < ip_end) +# endif +# if (LZO_TEST_OVERRUN_INPUT >= 2) +# define NEED_IP(x) \ + if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_OUTPUT) +# if (LZO_TEST_OVERRUN_OUTPUT >= 1) +# define TEST_OP (op <= op_end) +# endif +# if (LZO_TEST_OVERRUN_OUTPUT >= 2) +# undef TEST_OP +# define NEED_OP(x) \ + if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun +# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun +#else +# define TEST_LB(m_pos) ((void) 0) +# define TEST_LBO(m_pos,o) ((void) 0) +#endif + +#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) +# define TEST_IP (ip < ip_end) +#endif + +#if defined(TEST_IP) +# define HAVE_TEST_IP +#else +# define TEST_IP 1 +#endif +#if defined(TEST_OP) +# define HAVE_TEST_OP +#else +# define TEST_OP 1 +#endif + +#if defined(NEED_IP) +# define HAVE_NEED_IP +#else +# define NEED_IP(x) ((void) 0) +#endif +#if defined(NEED_OP) +# define HAVE_NEED_OP +#else +# define NEED_OP(x) ((void) 0) +#endif + +#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) +# define HAVE_ANY_IP +#endif +#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) +# define HAVE_ANY_OP +#endif + +#undef __COPY4 +#define __COPY4(dst,src) * (lzo_uint32p)(dst) = * (const lzo_uint32p)(src) + +#undef COPY4 +#if defined(LZO_UNALIGNED_OK_4) +# define COPY4(dst,src) __COPY4(dst,src) +#elif defined(LZO_ALIGNED_OK_4) +# define COPY4(dst,src) __COPY4((lzo_uintptr_t)(dst),(lzo_uintptr_t)(src)) +#endif + +#if defined(DO_DECOMPRESS) +LZO_PUBLIC(int) +DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +#endif +{ + register lzo_bytep op; + register const lzo_bytep ip; + register lzo_uint t; +#if defined(COPY_DICT) + lzo_uint m_off; + const lzo_bytep dict_end; +#else + register const lzo_bytep m_pos; +#endif + + const lzo_bytep const ip_end = in + in_len; +#if defined(HAVE_ANY_OP) + lzo_bytep const op_end = out + *out_len; +#endif +#if defined(LZO1Z) + lzo_uint last_m_off = 0; +#endif + + LZO_UNUSED(wrkmem); + +#if defined(COPY_DICT) + if (dict) + { + if (dict_len > M4_MAX_OFFSET) + { + dict += dict_len - M4_MAX_OFFSET; + dict_len = M4_MAX_OFFSET; + } + dict_end = dict + dict_len; + } + else + { + dict_len = 0; + dict_end = NULL; + } +#endif + + *out_len = 0; + + op = out; + ip = in; + + if (*ip > 17) + { + t = *ip++ - 17; + if (t < 4) + goto match_next; + assert(t > 0); NEED_OP(t); NEED_IP(t+1); + do *op++ = *ip++; while (--t > 0); + goto first_literal_run; + } + + while (TEST_IP && TEST_OP) + { + t = *ip++; + if (t >= 16) + goto match; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 15 + *ip++; + } + assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (PTR_ALIGNED2_4(op,ip)) + { +#endif + COPY4(op,ip); + op += 4; ip += 4; + if (--t > 0) + { + if (t >= 4) + { + do { + COPY4(op,ip); + op += 4; ip += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *ip++; while (--t > 0); + } + else + do *op++ = *ip++; while (--t > 0); + } +#if !defined(LZO_UNALIGNED_OK_4) + } + else +#endif +#endif +#if !defined(LZO_UNALIGNED_OK_4) + { + *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; + do *op++ = *ip++; while (--t > 0); + } +#endif + +first_literal_run: + + t = *ip++; + if (t >= 16) + goto match; +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(3); + t = 3; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - (1 + M2_MAX_OFFSET); + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(3); + *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + + do { +match: + if (t >= 64) + { +#if defined(COPY_DICT) +#if defined(LZO1X) + m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); + t = (t >> 4) - 3; +#elif defined(LZO1Z) + m_off = t & 0x1f; + if (m_off >= 0x1c) + m_off = last_m_off; + else + { + m_off = 1 + (m_off << 6) + (*ip++ >> 2); + last_m_off = m_off; + } + t = (t >> 5) - 1; +#endif +#else +#if defined(LZO1X) + m_pos = op - 1; + m_pos -= (t >> 2) & 7; + m_pos -= *ip++ << 3; + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_pos = op - 1; + m_pos -= (t >> 2) & 3; + m_pos -= *ip++ << 2; + t = (t >> 4) - 3; +#elif defined(LZO1Z) + { + lzo_uint off = t & 0x1f; + m_pos = op; + if (off >= 0x1c) + { + assert(last_m_off > 0); + m_pos -= last_m_off; + } + else + { + off = 1 + (off << 6) + (*ip++ >> 2); + m_pos -= off; + last_m_off = off; + } + } + t = (t >> 5) - 1; +#endif + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); + goto copy_match; +#endif + } + else if (t >= 32) + { + t &= 31; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 31 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); + last_m_off = m_off; +#else + m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); +#endif +#else +#if defined(LZO1Z) + { + lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); + m_pos = op - off; + last_m_off = off; + } +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos = op - 1; + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos = op - 1; + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif +#endif + ip += 2; + } + else if (t >= 16) + { +#if defined(COPY_DICT) + m_off = (t & 8) << 11; +#else + m_pos = op; + m_pos -= (t & 8) << 11; +#endif + t &= 7; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 7 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off += (ip[0] << 6) + (ip[1] >> 2); +#else + m_off += (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_off == 0) + goto eof_found; + m_off += 0x4000; +#if defined(LZO1Z) + last_m_off = m_off; +#endif +#else +#if defined(LZO1Z) + m_pos -= (ip[0] << 6) + (ip[1] >> 2); +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_pos == op) + goto eof_found; + m_pos -= 0x4000; +#if defined(LZO1Z) + last_m_off = pd((const lzo_bytep)op, m_pos); +#endif +#endif + } + else + { +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = 1 + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(2); + t = 2; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = 1 + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - 1; + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(2); + *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + } + +#if defined(COPY_DICT) + + NEED_OP(t+3-1); + t += 3-1; COPY_DICT(t,m_off) + +#else + + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) + { + assert((op - m_pos) >= 4); +#else + if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) + { +#endif + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4 - (3 - 1); + do { + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *m_pos++; while (--t > 0); + } + else +#endif + { +copy_match: + *op++ = *m_pos++; *op++ = *m_pos++; + do *op++ = *m_pos++; while (--t > 0); + } + +#endif + +match_done: +#if defined(LZO1Z) + t = ip[-1] & 3; +#else + t = ip[-2] & 3; +#endif + if (t == 0) + break; + +match_next: + assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); +#if 0 + do *op++ = *ip++; while (--t > 0); +#else + *op++ = *ip++; + if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } +#endif + t = *ip++; + } while (TEST_IP && TEST_OP); + } + +#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) + *out_len = pd(op, out); + return LZO_E_EOF_NOT_FOUND; +#endif + +eof_found: + assert(t == 1); + *out_len = pd(op, out); + return (ip == ip_end ? LZO_E_OK : + (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); + +#if defined(HAVE_NEED_IP) +input_overrun: + *out_len = pd(op, out); + return LZO_E_INPUT_OVERRUN; +#endif + +#if defined(HAVE_NEED_OP) +output_overrun: + *out_len = pd(op, out); + return LZO_E_OUTPUT_OVERRUN; +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +lookbehind_overrun: + *out_len = pd(op, out); + return LZO_E_LOOKBEHIND_OVERRUN; +#endif +} + +#endif + +#define LZO_TEST_OVERRUN +#undef DO_DECOMPRESS +#define DO_DECOMPRESS lzo1x_decompress_safe + +#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS_SAFE) + +#if defined(LZO_TEST_OVERRUN) +# if !defined(LZO_TEST_OVERRUN_INPUT) +# define LZO_TEST_OVERRUN_INPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_OUTPUT) +# define LZO_TEST_OVERRUN_OUTPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define LZO_TEST_OVERRUN_LOOKBEHIND +# endif +#endif + +#undef TEST_IP +#undef TEST_OP +#undef TEST_LB +#undef TEST_LBO +#undef NEED_IP +#undef NEED_OP +#undef HAVE_TEST_IP +#undef HAVE_TEST_OP +#undef HAVE_NEED_IP +#undef HAVE_NEED_OP +#undef HAVE_ANY_IP +#undef HAVE_ANY_OP + +#if defined(LZO_TEST_OVERRUN_INPUT) +# if (LZO_TEST_OVERRUN_INPUT >= 1) +# define TEST_IP (ip < ip_end) +# endif +# if (LZO_TEST_OVERRUN_INPUT >= 2) +# define NEED_IP(x) \ + if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_OUTPUT) +# if (LZO_TEST_OVERRUN_OUTPUT >= 1) +# define TEST_OP (op <= op_end) +# endif +# if (LZO_TEST_OVERRUN_OUTPUT >= 2) +# undef TEST_OP +# define NEED_OP(x) \ + if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun +# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun +#else +# define TEST_LB(m_pos) ((void) 0) +# define TEST_LBO(m_pos,o) ((void) 0) +#endif + +#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) +# define TEST_IP (ip < ip_end) +#endif + +#if defined(TEST_IP) +# define HAVE_TEST_IP +#else +# define TEST_IP 1 +#endif +#if defined(TEST_OP) +# define HAVE_TEST_OP +#else +# define TEST_OP 1 +#endif + +#if defined(NEED_IP) +# define HAVE_NEED_IP +#else +# define NEED_IP(x) ((void) 0) +#endif +#if defined(NEED_OP) +# define HAVE_NEED_OP +#else +# define NEED_OP(x) ((void) 0) +#endif + +#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) +# define HAVE_ANY_IP +#endif +#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) +# define HAVE_ANY_OP +#endif + +#undef __COPY4 +#define __COPY4(dst,src) * (lzo_uint32p)(dst) = * (const lzo_uint32p)(src) + +#undef COPY4 +#if defined(LZO_UNALIGNED_OK_4) +# define COPY4(dst,src) __COPY4(dst,src) +#elif defined(LZO_ALIGNED_OK_4) +# define COPY4(dst,src) __COPY4((lzo_uintptr_t)(dst),(lzo_uintptr_t)(src)) +#endif + +#if defined(DO_DECOMPRESS) +LZO_PUBLIC(int) +DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +#endif +{ + register lzo_bytep op; + register const lzo_bytep ip; + register lzo_uint t; +#if defined(COPY_DICT) + lzo_uint m_off; + const lzo_bytep dict_end; +#else + register const lzo_bytep m_pos; +#endif + + const lzo_bytep const ip_end = in + in_len; +#if defined(HAVE_ANY_OP) + lzo_bytep const op_end = out + *out_len; +#endif +#if defined(LZO1Z) + lzo_uint last_m_off = 0; +#endif + + LZO_UNUSED(wrkmem); + +#if defined(COPY_DICT) + if (dict) + { + if (dict_len > M4_MAX_OFFSET) + { + dict += dict_len - M4_MAX_OFFSET; + dict_len = M4_MAX_OFFSET; + } + dict_end = dict + dict_len; + } + else + { + dict_len = 0; + dict_end = NULL; + } +#endif + + *out_len = 0; + + op = out; + ip = in; + + if (*ip > 17) + { + t = *ip++ - 17; + if (t < 4) + goto match_next; + assert(t > 0); NEED_OP(t); NEED_IP(t+1); + do *op++ = *ip++; while (--t > 0); + goto first_literal_run; + } + + while (TEST_IP && TEST_OP) + { + t = *ip++; + if (t >= 16) + goto match; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 15 + *ip++; + } + assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (PTR_ALIGNED2_4(op,ip)) + { +#endif + COPY4(op,ip); + op += 4; ip += 4; + if (--t > 0) + { + if (t >= 4) + { + do { + COPY4(op,ip); + op += 4; ip += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *ip++; while (--t > 0); + } + else + do *op++ = *ip++; while (--t > 0); + } +#if !defined(LZO_UNALIGNED_OK_4) + } + else +#endif +#endif +#if !defined(LZO_UNALIGNED_OK_4) + { + *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; + do *op++ = *ip++; while (--t > 0); + } +#endif + +first_literal_run: + + t = *ip++; + if (t >= 16) + goto match; +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(3); + t = 3; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - (1 + M2_MAX_OFFSET); + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(3); + *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + + do { +match: + if (t >= 64) + { +#if defined(COPY_DICT) +#if defined(LZO1X) + m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); + t = (t >> 4) - 3; +#elif defined(LZO1Z) + m_off = t & 0x1f; + if (m_off >= 0x1c) + m_off = last_m_off; + else + { + m_off = 1 + (m_off << 6) + (*ip++ >> 2); + last_m_off = m_off; + } + t = (t >> 5) - 1; +#endif +#else +#if defined(LZO1X) + m_pos = op - 1; + m_pos -= (t >> 2) & 7; + m_pos -= *ip++ << 3; + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_pos = op - 1; + m_pos -= (t >> 2) & 3; + m_pos -= *ip++ << 2; + t = (t >> 4) - 3; +#elif defined(LZO1Z) + { + lzo_uint off = t & 0x1f; + m_pos = op; + if (off >= 0x1c) + { + assert(last_m_off > 0); + m_pos -= last_m_off; + } + else + { + off = 1 + (off << 6) + (*ip++ >> 2); + m_pos -= off; + last_m_off = off; + } + } + t = (t >> 5) - 1; +#endif + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); + goto copy_match; +#endif + } + else if (t >= 32) + { + t &= 31; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 31 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); + last_m_off = m_off; +#else + m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); +#endif +#else +#if defined(LZO1Z) + { + lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); + m_pos = op - off; + last_m_off = off; + } +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos = op - 1; + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos = op - 1; + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif +#endif + ip += 2; + } + else if (t >= 16) + { +#if defined(COPY_DICT) + m_off = (t & 8) << 11; +#else + m_pos = op; + m_pos -= (t & 8) << 11; +#endif + t &= 7; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 7 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off += (ip[0] << 6) + (ip[1] >> 2); +#else + m_off += (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_off == 0) + goto eof_found; + m_off += 0x4000; +#if defined(LZO1Z) + last_m_off = m_off; +#endif +#else +#if defined(LZO1Z) + m_pos -= (ip[0] << 6) + (ip[1] >> 2); +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_pos == op) + goto eof_found; + m_pos -= 0x4000; +#if defined(LZO1Z) + last_m_off = pd((const lzo_bytep)op, m_pos); +#endif +#endif + } + else + { +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = 1 + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(2); + t = 2; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = 1 + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - 1; + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(2); + *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + } + +#if defined(COPY_DICT) + + NEED_OP(t+3-1); + t += 3-1; COPY_DICT(t,m_off) + +#else + + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) + { + assert((op - m_pos) >= 4); +#else + if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) + { +#endif + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4 - (3 - 1); + do { + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *m_pos++; while (--t > 0); + } + else +#endif + { +copy_match: + *op++ = *m_pos++; *op++ = *m_pos++; + do *op++ = *m_pos++; while (--t > 0); + } + +#endif + +match_done: +#if defined(LZO1Z) + t = ip[-1] & 3; +#else + t = ip[-2] & 3; +#endif + if (t == 0) + break; + +match_next: + assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); +#if 0 + do *op++ = *ip++; while (--t > 0); +#else + *op++ = *ip++; + if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } +#endif + t = *ip++; + } while (TEST_IP && TEST_OP); + } + +#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) + *out_len = pd(op, out); + return LZO_E_EOF_NOT_FOUND; +#endif + +eof_found: + assert(t == 1); + *out_len = pd(op, out); + return (ip == ip_end ? LZO_E_OK : + (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); + +#if defined(HAVE_NEED_IP) +input_overrun: + *out_len = pd(op, out); + return LZO_E_INPUT_OVERRUN; +#endif + +#if defined(HAVE_NEED_OP) +output_overrun: + *out_len = pd(op, out); + return LZO_E_OUTPUT_OVERRUN; +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +lookbehind_overrun: + *out_len = pd(op, out); + return LZO_E_LOOKBEHIND_OVERRUN; +#endif +} + +#endif + +/***** End of minilzo.c *****/ + diff --git a/veejay-server/liblzo/minilzo.h b/veejay-server/liblzo/minilzo.h new file mode 100644 index 00000000..04bf4e14 --- /dev/null +++ b/veejay-server/liblzo/minilzo.h @@ -0,0 +1,102 @@ +/* minilzo.h -- mini subset of the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + +/* + * NOTE: + * the full LZO package can be found at + * http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __MINILZO_H +#define __MINILZO_H + +#define MINILZO_VERSION 0x2020 + +#ifdef __LZOCONF_H +# error "you cannot use both LZO and miniLZO" +#endif + +#undef LZO_HAVE_CONFIG_H +#include "lzoconf.h" + +#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) +# error "version mismatch in header files" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/*********************************************************************** +// +************************************************************************/ + +/* Memory required for the wrkmem parameter. + * When the required size is 0, you can also pass a NULL pointer. + */ + +#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS +#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) +#define LZO1X_MEM_DECOMPRESS (0) + + +/* compression */ +LZO_EXTERN(int) +lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +/* decompression */ +LZO_EXTERN(int) +lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem /* NOT USED */ ); + +/* safe decompression with overrun testing */ +LZO_EXTERN(int) +lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem /* NOT USED */ ); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* already included */ + diff --git a/veejay-server/libsample/Makefile.am b/veejay-server/libsample/Makefile.am new file mode 100644 index 00000000..7d58304a --- /dev/null +++ b/veejay-server/libsample/Makefile.am @@ -0,0 +1,9 @@ +# Makefile for veejay + +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem -I$(top_srcdir)/vjmsg -I$(top_srcdir)/libhash \ + $(MJPEGTOOLS_CFLAGS) $(FFMPEG_CFLAGS) $(XML2_CFLAGS) +AM_CFLAGS=$(OP_CFLAGS) +SAMPLE_LIB_FILE = libsample.la +noinst_LTLIBRARIES = $(SAMPLE_LIB_FILE) +libsample_la_SOURCES = sampleadm.c + diff --git a/veejay-server/libsample/Makefile.in b/veejay-server/libsample/Makefile.in new file mode 100644 index 00000000..13da851e --- /dev/null +++ b/veejay-server/libsample/Makefile.in @@ -0,0 +1,507 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Makefile for veejay + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libsample +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libsample_la_LIBADD = +am_libsample_la_OBJECTS = sampleadm.lo +libsample_la_OBJECTS = $(am_libsample_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libsample_la_SOURCES) +DIST_SOURCES = $(libsample_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem -I$(top_srcdir)/vjmsg -I$(top_srcdir)/libhash \ + $(MJPEGTOOLS_CFLAGS) $(FFMPEG_CFLAGS) $(XML2_CFLAGS) + +AM_CFLAGS = $(OP_CFLAGS) +SAMPLE_LIB_FILE = libsample.la +noinst_LTLIBRARIES = $(SAMPLE_LIB_FILE) +libsample_la_SOURCES = sampleadm.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libsample/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libsample/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libsample.la: $(libsample_la_OBJECTS) $(libsample_la_DEPENDENCIES) + $(LINK) $(libsample_la_OBJECTS) $(libsample_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sampleadm.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/libsample/sampleadm.c b/veejay-server/libsample/sampleadm.c new file mode 100644 index 00000000..2e0aba30 --- /dev/null +++ b/veejay-server/libsample/sampleadm.c @@ -0,0 +1,3396 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg / + * + * 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. + * + * + * 05/03/2003: Added XML code from Jeff Carpenter ( jrc@dshome.net ) + * 05/03/2003: Included more sample properties in Jeff's code + * Create is used to write the Sample to XML, Parse is used to load from XML + +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//todo: change this into enum +//#define KAZLIB_OPAQUE_DEBUG 1 + +#ifdef HAVE_XML2 +#endif + +#define FOURCC(a,b,c,d) ( (d<<24) | ((c&0xff)<<16) | ((b&0xff)<<8) | (a&0xff) ) + +#define FOURCC_RIFF FOURCC ('R', 'I', 'F', 'F') +#define FOURCC_WAVE FOURCC ('W', 'A', 'V', 'E') +#define FOURCC_FMT FOURCC ('f', 'm', 't', ' ') +#define FOURCC_DATA FOURCC ('d', 'a', 't', 'a') + + +#define VJ_IMAGE_EFFECT_MIN vj_effect_get_min_i() +#define VJ_IMAGE_EFFECT_MAX vj_effect_get_max_i() +#define VJ_VIDEO_EFFECT_MIN vj_effect_get_min_v() +#define VJ_VIDEO_EFFECT_MAX vj_effect_get_max_v() + +static int this_sample_id = 0; /* next available sample id */ +static int next_avail_num = 0; /* available sample id */ +static int initialized = 0; /* whether we are initialized or not */ +static hash_t *SampleHash; /* hash of sample information structs */ +static int avail_num[SAMPLE_MAX_SAMPLES]; /* an array of freed sample id's */ +static void *sample_font_ = NULL; +static int sampleadm_state = SAMPLE_PEEK; /* default state */ + +extern void tagParseStreamFX(char *file, xmlDocPtr doc, xmlNodePtr cur, void *font); +extern void tag_writeStream( char *file, int n, xmlNodePtr node, void *font ); +extern int vj_tag_size(); + +typedef struct +{ + int active; + int current; + int size; + int *samples; +} seq_t; + +/**************************************************************************************************** + * + * sample_size + * + * returns current sample_id pointer. size is actually this_sample_id - next_avail_num, + * but people tend to use size as in length. + * + ****************************************************************************************************/ +int sample_size() +{ + return this_sample_id; +} + +int sample_verify() { + return hash_verify( SampleHash ); +} + + + +/**************************************************************************************************** + * + * int_hash + * + * internal usage. returns hash_val_t for key + * + ****************************************************************************************************/ +static hash_val_t int_hash(const void *key) +{ + return (hash_val_t) key; +} + + + +/**************************************************************************************************** + * + * int_compare + * + * internal usage. compares keys for hash. + * + ****************************************************************************************************/ +static int int_compare(const void *key1, const void *key2) +{ + return ((int) key1 < (int) key2 ? -1 : + ((int) key1 > (int) key2 ? +1 : 0)); +} + +int sample_update(sample_info *sample, int s1) { + if(s1 <= 0 || s1 >= SAMPLE_MAX_SAMPLES) return 0; + if(sample) { + hnode_t *sample_node = hnode_create(sample); + hnode_put(sample_node, (void*) s1); + hnode_destroy(sample_node); + return 1; + } + return 0; +} + +/* Evil code for edl saving/restoring */ +typedef struct +{ + int fmt; + int deinterlace; + int flags; + int force; + char norm; +} sample_setting; + +static sample_setting __sample_project_settings; +static void *chain_cache_ = NULL; +void sample_set_project(int fmt, int deinterlace, int flags, int force, char norm ) +{ + __sample_project_settings.fmt = fmt; + __sample_project_settings.deinterlace = deinterlace; + __sample_project_settings.flags = flags; + __sample_project_settings.force = force; + __sample_project_settings.norm = norm; +} +void *sample_get_dict( int sample_id ) +{ +#ifdef HAVE_FREETYPE + sample_info *si = sample_get(sample_id); + if(si) + return si->dict; +#endif + return NULL; +} + +/**************************************************************************************************** + * + * sample_init() + * + * call before using any other function as sample_skeleton_new + * + ****************************************************************************************************/ +void sample_init(int len, void *font) +{ + if (!initialized) { + int i; + for (i = 0; i < SAMPLE_MAX_SAMPLES; i++) + avail_num[i] = 0; + this_sample_id = 1; /* do not start with zero */ + if (! + (SampleHash = + hash_create(HASHCOUNT_T_MAX, int_compare, int_hash))) { + } + initialized = 1; + memset( &__sample_project_settings,0,sizeof(sample_setting)); + + chain_cache_ = vpn( 2000 ); //@ fx cache lines + + } + + sample_font_ = font; +} + +void sample_free() +{ + if( chain_cache_ ) + vevo_port_free( chain_cache_ ); + if(!SampleHash) + return; + hscan_t scan; + hash_scan_begin( &scan, (hash_t*) SampleHash ); + hnode_t *node; + while( (node = hash_scan_next(&scan)) != NULL ) + { + sample_info *info = (sample_info*) node; + sample_del( info->sample_id); + } + hash_free_nodes( SampleHash ); + hash_destroy( SampleHash ); +} + +int sample_set_state(int new_state) +{ + if (new_state == SAMPLE_LOAD || new_state == SAMPLE_RUN + || new_state == SAMPLE_PEEK) { + sampleadm_state = new_state; + } + return sampleadm_state; +} + +int sample_get_state() +{ + return sampleadm_state; +} + +/**************************************************************************************************** + * + * sample_skeleton_new(long , long) + * + * create a new sample, give start and end of new sample. returns sample info block. + * + ****************************************************************************************************/ + +static int _new_id() +{ + /* perhaps we can reclaim a sample id */ + int n; + int id = 0; + for (n = 0; n <= next_avail_num; n++) + { + if (avail_num[n] != 0) + { + id = avail_num[n]; + avail_num[n] = 0; + break; + } + } + if( id == 0 ) + { + if(!this_sample_id) this_sample_id = 1; + id = this_sample_id; + this_sample_id ++; + } + return id; +} + +sample_info *sample_skeleton_new(long startFrame, long endFrame) +{ + char tmp_file[32]; + sample_info *si; + int i, j; + + if (!initialized) { + return NULL; + } + si = (sample_info *) vj_calloc(sizeof(sample_info)); + + if(startFrame < 0) startFrame = 0; + + if(endFrame <= startFrame ) + { + veejay_msg(VEEJAY_MSG_ERROR,"End frame %ld must be greater then start frame %ld", endFrame, startFrame); + return NULL; + } + + if (!si) { + return NULL; + } + + si->sample_id = _new_id(); + snprintf(si->descr,SAMPLE_MAX_DESCR_LEN, "Sample %4d", si->sample_id); + si->first_frame = startFrame; + si->last_frame = endFrame; + si->edit_list = NULL; // clone later + si->soft_edl = 1; + si->speed = 1; + si->looptype = 1; // normal looping +// si->max_loops = 0; +// si->next_sample_id = 0; +// si->playmode = 0; +// si->depth = 0; +// si->sub_audio = 0; + si->audio_volume = 50; + si->marker_start = 0; + si->marker_end = 0; +// si->dup = 0; +// si->loop_dec = 0; +// si->max_loops2 = 0; +// si->fader_active = 0; +// si->fader_val = 0; +// si->fader_inc = 0; +// si->fader_direction = 0; +// si->rec_total_bytes = 0; +// si->encoder_format = 0; + si->encoder_base = (char*) vj_malloc(sizeof(char) * 255); +// si->sequence_num = 0; +// si->encoder_duration = 0; +// si->encoder_num_frames = 0; + si->encoder_destination = (char*) vj_malloc(sizeof(char) * 255); +// sii->encoder_succes_frames = 0; +// si->encoder_active = 0; +// si->encoder_total_frames = 0; +// si->rec_total_bytes = 0; +// si->encoder_max_size = 0; +// si->encoder_width = 0; +// si->encoder_height = 0; +// si->encoder_duration = 0; + // si->encoder_buf = (char*) malloc(sizeof(char) * 10 * 65535 + 16); +// si->auto_switch = 0; +// si->selected_entry = 0; + si->effect_toggle = 1; +// si->offset = 0; + snprintf(tmp_file,sizeof(tmp_file), "sample_%05d.edl", si->sample_id ); + si->edit_list_file = strdup( tmp_file ); + + sample_eff_chain *sec = (sample_eff_chain*) vj_calloc(sizeof(sample_eff_chain) * SAMPLE_MAX_EFFECTS ); + + /* the effect chain is initially empty ! */ + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) { + + si->effect_chain[i] = &sec[i]; + +// si->effect_chain[i] = +// (sample_eff_chain *) vj_calloc(sizeof(sample_eff_chain)); + + if (si->effect_chain[i] == NULL) { + veejay_msg(VEEJAY_MSG_ERROR, "Error allocating entry %d in Effect Chain for new sample",i); + return NULL; + } +// si->effect_chain[i]->is_rendering = 0; + si->effect_chain[i]->effect_id = -1; +// si->effect_chain[i]->e_flag = 0; +// si->effect_chain[i]->frame_offset = 0; +// si->effect_chain[i]->frame_trimmer = 0; + si->effect_chain[i]->volume = 50; +// si->effect_chain[i]->a_flag = 0; +// si->effect_chain[i]->source_type = 0; + si->effect_chain[i]->channel = ( sample_size() <= 0 ? si->sample_id : sample_size()-1); +// si->effect_chain[i]->kf_status = 0; + /* effect parameters initially 0 */ +// for (j = 0; j < SAMPLE_MAX_PARAMETERS; j++) { +// si->effect_chain[i]->arg[j] = 0; +// } + + si->effect_chain[i]->kf = vpn( VEVO_ANONYMOUS_PORT ); + + } +#ifdef HAVE_FREETYPE + si->dict = vpn( VEVO_ANONYMOUS_PORT ); +#endif + return si; +} + +int sample_store(sample_info * skel) +{ + hnode_t *sample_node; + if (!skel) + return -1; + sample_node = hnode_create(skel); + if (!sample_node) + return -1; + + if(skel->edit_list) + { + skel->play_length = vj_el_bogus_length( skel->edit_list, 0 ); + } + + if (!sample_exists(skel->sample_id)) { + hash_insert(SampleHash, sample_node, (void *) skel->sample_id); + } else { + hnode_put(sample_node, (void *) skel->sample_id); + } + return 0; +} + +/**************************************************************************************************** + * + * sample_get(int sample_id) + * + * returns sample information struct or NULL on error. + * + ****************************************************************************************************/ +sample_info *sample_get(int sample_id) +{ + sample_info *si; + //hnode_t *sample_node; + // if (!initialized) +// return NULL; + // if (sample_id <= 0) +// return NULL; + // for (i = 0; i <= next_avail_num; i++) +// if (avail_num[i] == sample_id) +// return NULL; + hnode_t *sample_node = hash_lookup(SampleHash, (void *) sample_id); + if (sample_node) { + si = (sample_info *) hnode_get(sample_node); + if(si) return si; + } + return NULL; +} + +/**************************************************************************************************** + * + * sample_exists(int sample_id) + * + * returns 1 if a sample exists in samplehash, or 0 if not. + * + ****************************************************************************************************/ + + +int sample_exists(int sample_id) { + + hnode_t *sample_node; + if (!sample_id) return 0; + + sample_node = hash_lookup(SampleHash, (void*) sample_id); + if (!sample_node) { + return 0; + } + + if(!sample_get(sample_id)) return 0; + return 1; +} +/* +int sample_exists(int sample_id) +{ + if(sample_id < 1 || sample_id > SAMPLE_MAX_SAMPLES) return 0; + return (sample_get(sample_id) == NULL ? 0 : 1); +} +*/ + +int sample_copy(int sample_id) +{ + int i; + sample_info *org, *copy; + if (!sample_exists(sample_id)) + return 0; + org = sample_get(sample_id); + copy = (sample_info*) vj_malloc(sizeof(sample_info)); + veejay_memcpy( copy,org,sizeof(sample_info));\ + + sample_eff_chain *b = vj_malloc(sizeof(sample_eff_chain) * SAMPLE_MAX_EFFECTS ); + + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) + { +// copy->effect_chain[i] = +// (sample_eff_chain *) vj_malloc(sizeof(sample_eff_chain)); +// + + copy->effect_chain[i] = &b[i]; + + if (copy->effect_chain[i] == NULL) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error allocating entry %d in Effect Chain for new sample",i); + return 0; + } + veejay_memcpy( copy->effect_chain[i], org->effect_chain[i], sizeof( sample_eff_chain ) ); + } + + copy->sample_id = _new_id(); + + if(org->edit_list) + { + copy->edit_list = vj_el_clone( org->edit_list ); + copy->soft_edl = 1; + } + + if (sample_store(copy) != 0) + return 0; + + return copy->sample_id; +} + +/**************************************************************************************************** + * + * sample_get_startFrame(int sample_id) + * + * returns first frame of sample. + * + ****************************************************************************************************/ +int sample_get_longest(int sample_id) +{ + sample_info *si = sample_get(sample_id); + if(si) + { + int len = (si->last_frame - + si->first_frame ); + int c = 0; + int tmp = 0; + int t=0; + int _id=0; + int speed = abs(si->speed); + int duration = len / speed; //how many frames are played of this sample + + if( si->looptype == 2) duration *= 2; // pingpong loop duration + + if( sample_get_framedup(sample_id) > 0 ) + duration *= sample_get_framedup(sample_id); + + for(c=0; c < SAMPLE_MAX_EFFECTS; c++) + { + _id = sample_get_chain_channel(sample_id,c); + t = sample_get_chain_source(sample_id,c); + + if(t==0 && sample_exists(_id)) + { + tmp = sample_get_endFrame( _id) - sample_get_startFrame(_id); + if(tmp>0) + { + tmp = tmp / sample_get_speed(_id); + if(tmp < 0) tmp *= -1; + if(sample_get_looptype(_id)==2) tmp *= 2; //pingpong loop underlying sample + } + if(tmp > duration) duration = tmp; //which one is longer ... + } + } + veejay_msg(VEEJAY_MSG_DEBUG, "Length of sample in video frames: %ld (slow=%d, loop=%d, speed=%d)",duration, + sample_get_framedup(sample_id), si->looptype, si->speed ); + + + return duration; + } + return 0; +} + +int sample_get_startFrame(int sample_id) +{ + sample_info *si = sample_get(sample_id); + if (si) { + if (si->marker_start >= 0 || si->marker_end > 0) + return si->marker_start; + else + return si->first_frame; + } + return -1; +} + + +int sample_get_el_position( int sample_id, int *start, int *end ) +{ + sample_info *si = sample_get(sample_id); + if(si) + { + *start = si->first_frame; + *end = si->last_frame; + return 1; + } + return -1; +} + + + + +int sample_get_short_info(int sample_id, int *start, int *end, int *loop, int *speed) { + sample_info *si = sample_get(sample_id); + if(si) { + if(si->marker_start >= 0 && si->marker_end > 0) { + *start = si->marker_start; + *end = si->marker_end; + } + else { + *start = si->first_frame; + *end = si->last_frame; + } + *speed = si->speed; + *loop = si->looptype; + return 0; + } + *start = 0; + *end = 0; + *loop = 0; + *speed = 0; + return -1; +} + +int sample_entry_is_rendering(int s1, int position) { + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position >= SAMPLE_MAX_EFFECTS || position < 0) + return -1; + return sample->effect_chain[position]->is_rendering; +} + +int sample_entry_set_is_rendering(int s1, int position, int value) { + sample_info *si = sample_get(s1); + if (!si) + return -1; + if( position >= SAMPLE_MAX_EFFECTS || position < 0) return -1; + + si->effect_chain[position]->is_rendering = value; + return ( sample_update( si,s1 )); +} + + +int sample_update_offset(int s1, int n_frame) +{ + int len; + sample_info *si = sample_get(s1); + + if(!si) return -1; + si->offset = (n_frame - si->first_frame); + len = si->last_frame - si->first_frame; + if(si->offset < 0) + { + veejay_msg(VEEJAY_MSG_WARNING,"Sample bounces outside sample by %d frames", + si->offset); + si->offset = 0; + } + if(si->offset > len) + { + veejay_msg(VEEJAY_MSG_WARNING,"Sample bounces outside sample with %d frames", + si->offset); + si->offset = len; + } + return ( sample_update(si,s1)); +} + +int sample_set_manual_fader( int s1, int value) +{ + sample_info *si = sample_get(s1); + if(!si) return -1; + si->fader_active = 2; + si->fader_val = (float) value; + si->fader_inc = 0.0; + si->fader_direction = 0.0; + + /* inconsistency check */ + if(si->effect_toggle == 0) si->effect_toggle = 1; + return (sample_update(si,s1)); + +} + +int sample_set_fader_active( int s1, int nframes, int direction ) { + sample_info *si = sample_get(s1); + if(!si) return -1; + if(nframes <= 0) return -1; + si->fader_active = 1; + + if(direction<0) + si->fader_val = 255.0; + else + si->fader_val = 0.0; + + si->fader_inc = (float) (255.0 / (float) nframes); + si->fader_direction = direction; + si->fader_inc *= si->fader_direction; + /* inconsistency check */ + if(si->effect_toggle == 0) + { + si->effect_toggle = 1; + } + return (sample_update(si,s1)); +} + + +int sample_reset_fader(int s1) { + sample_info *si = sample_get(s1); + if(!si) return -1; + si->fader_active = 0; + si->fader_val = 0; + si->fader_inc = 0; + return (sample_update(si,s1)); +} + +int sample_get_fader_active(int s1) { + sample_info *si = sample_get(s1); + if(!si) return -1; + return (si->fader_active); +} + +float sample_get_fader_val(int s1) { + sample_info *si = sample_get(s1); + if(!si) return -1; + return (si->fader_val); +} + +float sample_get_fader_inc(int s1) { + sample_info *si = sample_get(s1); + if(!si) return -1; + return (si->fader_inc); +} + +int sample_get_fader_direction(int s1) { + sample_info *si = sample_get(s1); + if(!si) return -1; + return si->fader_direction; +} + +int sample_set_fader_val(int s1, float val) { + sample_info *si = sample_get(s1); + if(!si) return -1; + si->fader_val = val; + return (sample_update(si,s1)); +} + +int sample_apply_fader_inc(int s1) { + sample_info *si = sample_get(s1); + if(!si) return -1; + si->fader_val += si->fader_inc; + if(si->fader_val > 255.0 ) si->fader_val = 255.0; + if(si->fader_val < 0.0 ) si->fader_val = 0.0; + sample_update(si,s1); + return (int) (si->fader_val+0.5); +} + + + +int sample_set_fader_inc(int s1, float inc) { + sample_info *si = sample_get(s1); + if(!si) return -1; + si->fader_inc = inc; + return (sample_update(si,s1)); +} + +int sample_marker_clear(int sample_id) { + sample_info *si = sample_get(sample_id); + if (!si) + return -1; + si->marker_start = 0; + si->marker_end = 0; + veejay_msg(VEEJAY_MSG_INFO, "Marker cleared (%d - %d) - (speed=%d)", + si->marker_start, si->marker_end, si->speed); + return ( sample_update(si,sample_id)); +} + +int sample_set_marker_start(int sample_id, int marker) +{ + sample_info *si = sample_get(sample_id); + if (!si) + return -1; + if(si->speed < 0 ) + { + int swap = si->marker_end; + si->marker_end = marker; + si->marker_start = swap; + } + else + { + si->marker_start = marker; + } + return ( sample_update(si,sample_id)); +} + +int sample_set_marker(int sample_id, int start, int end) +{ + sample_info *si = sample_get(sample_id); + if(!si) return 0; + + if( start < si->first_frame ) + return 0; + if( start > si->last_frame ) + return 0; + if( end < si->first_frame ) + return 0; + if( end > si->last_frame ) + return 0; + + si->marker_start = start; + si->marker_end = end; + + return ( sample_update( si , sample_id ) ); +} + +int sample_set_marker_end(int sample_id, int marker) +{ + sample_info *si = sample_get(sample_id); + if (!si) + return -1; + + if(si->speed < 0 ) + { + // mapping in reverse! + int swap = si->marker_start; + si->marker_start = marker; + si->marker_end = swap; + } + else + { + si->marker_end = marker; + } + + return (sample_update(si,sample_id)); +} + +int sample_set_description(int sample_id, char *description) +{ + sample_info *si = sample_get(sample_id); + if (!si) + return -1; + if (!description || strlen(description) <= 0) { + snprintf(si->descr, SAMPLE_MAX_DESCR_LEN, "Sample%04d", si->sample_id ); + } else { + snprintf(si->descr, SAMPLE_MAX_DESCR_LEN, "%s", description); + } + return ( sample_update(si, sample_id)==1 ? 0 : 1); +} + +int sample_get_description(int sample_id, char *description) +{ + sample_info *si; + si = sample_get(sample_id); + if (!si) + return -1; + snprintf(description, SAMPLE_MAX_DESCR_LEN,"%s", si->descr); + return 0; +} + +/**************************************************************************************************** + * + * sample_get_endFrame(int sample_id) + * + * returns last frame of sample. + * + ****************************************************************************************************/ +int sample_get_endFrame(int sample_id) +{ + sample_info *si = sample_get(sample_id); + if (si) { + if (si->marker_end > 0 && si->marker_start >= 0) + return si->marker_end; + else { + return si->last_frame; + } + } + return -1; +} +/**************************************************************************************************** + * + * sample_del( sample_nr ) + * + * deletes a sample from the hash. returns -1 on error, 1 on success. + * + ****************************************************************************************************/ +int sample_verify_delete( int sample_id, int sample_type ) +{ + int i,j; + for( i = 1; i < sample_size()-1; i ++ ) + { + sample_info *s = sample_get(i); + if(s) + { + for( j = 0 ; j < SAMPLE_MAX_EFFECTS; j ++ ) + { + if(s->effect_chain[j]->channel == sample_id && + s->effect_chain[j]->source_type == sample_type ) + { + s->effect_chain[j]->channel = i; + s->effect_chain[j]->source_type = 0; + veejay_msg(VEEJAY_MSG_INFO, "Dereferenced mix entry %d of Sample %d", + j, i ); + sample_update( s, i ); + } + } + } + } + return 1; +} + +int sample_del(int sample_id) +{ + hnode_t *sample_node; + sample_info *si; + si = sample_get(sample_id); + if (!si) + return 0; + + sample_node = hash_lookup(SampleHash, (void *) si->sample_id); + if (sample_node) { + int i; + if(si->soft_edl == 0 && si->edit_list != NULL) + vj_el_break_cache( si->edit_list ); //@ destroy cache, if any + + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + if( si->effect_chain[i]->kf ) + vevo_port_free( si->effect_chain[i]->kf ); + } + //@ *sample_eff_chain -> &addr[0] + if( si->effect_chain[0] ) + free(si->effect_chain[0]); + + if(si->edit_list) + vj_el_free(si->edit_list); + + if(si->encoder_base ) + free(si->encoder_base ); + if(si->encoder_destination ) + free(si->encoder_destination ); + if(si->edit_list_file) + free( si->edit_list_file ); +#ifdef HAVE_FREETYPE +//font ? + if( si->dict ) + vj_font_dictionary_destroy( sample_font_,si->dict ); +#endif + free(si); + + /* store freed sample_id */ + avail_num[next_avail_num] = sample_id; + next_avail_num++; + hash_delete(SampleHash, sample_node); + + veejay_msg(VEEJAY_MSG_DEBUG, "Deleted sample %d",sample_id ); + + return 1; + } + + return 0; +} + + +void sample_del_all() +{ + int end = sample_size(); + int i; + for (i = 1; i < end; i++) { + if (sample_exists(i)) { + sample_chain_clear(i); + sample_del(i); + } + } + this_sample_id = 0; +} + +/**************************************************************************************************** + * + * sample_get_effect( sample_nr , position) + * + * returns effect in effect_chain on position X , -1 on error. + * + ****************************************************************************************************/ +int sample_get_effect(int s1, int position) +{ + sample_info *sample = sample_get(s1); + if(position >= SAMPLE_MAX_EFFECTS || position < 0 ) return -1; + if(sample) { + if(sample->effect_chain[position]->e_flag==0) return -1; + return sample->effect_chain[position]->effect_id; + } + return -1; +} + +int sample_get_effect_any(int s1, int position) { + sample_info *sample = sample_get(s1); +#ifdef STRICT_CHECKING + assert( position >= 0 && position < SAMPLE_MAX_EFFECTS ); +#endif + // if(position >= SAMPLE_MAX_EFFECTS || position < 0 ) return -1; + if(sample) { + return sample->effect_chain[position]->effect_id; + } + return -1; +} + +int sample_get_chain_status(int s1, int position) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + return sample->effect_chain[position]->e_flag; +} + +int sample_get_first_mix_offset(int s1, int *parent, int look_for) +{ + sample_info *sample = sample_get(s1); + if(!sample) + return 0; + int p = 0; + for( p = 0; p < SAMPLE_MAX_EFFECTS; p ++ ) + if( sample->effect_chain[p]->frame_offset && sample->effect_chain[p]->source_type == 0 && look_for == + sample->effect_chain[p]->channel) + { + return sample->effect_chain[p]->frame_offset; + } + return 0; +} + + +int sample_get_offset(int s1, int position) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + return sample->effect_chain[position]->frame_offset; +} + +int sample_get_trimmer(int s1, int position) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + return sample->effect_chain[position]->frame_trimmer; +} + +int sample_get_chain_volume(int s1, int position) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + return sample->effect_chain[position]->volume; +} + +int sample_get_chain_audio(int s1, int position) +{ + sample_info *sample = sample_get(s1); + if (sample) { + return sample->effect_chain[position]->a_flag; + } + return -1; +} + +/**************************************************************************************************** + * + * sample_get_looptype + * + * returns the type of loop set on the sample. 0 on no loop, 1 on ping pong + * returns -1 on error. + * + ****************************************************************************************************/ + +int sample_get_looptype(int s1) +{ + sample_info *sample = sample_get(s1); + if (sample) { + return sample->looptype; + } + return 0; +} + +int sample_get_playmode(int s1) +{ + sample_info *sample = sample_get(s1); + if (sample) { + return sample->playmode; + } + return -1; +} + +/******************** + * get depth: 1 means do what is in underlying sample. + *******************/ +int sample_get_depth(int s1) +{ + sample_info *sample = sample_get(s1); + if (sample) + return sample->depth; + return 0; +} + +int sample_set_depth(int s1, int n) +{ + sample_info *sample; + hnode_t *sample_node; + + if (n == 0 || n == 1) { + sample = sample_get(s1); + if (!sample) + return -1; + if (sample->depth == n) + return 1; + sample->depth = n; + sample_node = hnode_create(sample); + if (!sample_node) { + return -1; + } + return 1; + } + return -1; +} +int sample_set_chain_status(int s1, int position, int status) +{ + sample_info *sample; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + sample = sample_get(s1); + if (!sample) + return -1; + sample->effect_chain[position]->e_flag = status; + sample_update(sample,s1); + return 1; +} + +/**************************************************************************************************** + * + * sample_get_speed + * + * returns the playback speed set on the sample. + * returns -1 on error. + * + ****************************************************************************************************/ + +int sample_get_speed(int s1) +{ + sample_info *sample = sample_get(s1); + if (sample) + return sample->speed; + return 0; +} + +int sample_get_framedup(int s1) { + sample_info *sample = sample_get(s1); + if(sample) return sample->dup; + return 0; +} +int sample_get_framedups(int s1) { + sample_info *sample = sample_get(s1); + if(sample) return sample->dups; + return 0; + +} + +int sample_get_effect_status(int s1) +{ + sample_info *sample = sample_get(s1); + if(sample) return sample->effect_toggle; + return 0; +} + +int sample_var( int s1, int *type, int *fader, int *fx, int *rec, int *active ) +{ + sample_info *si = sample_get(s1); + if(!si) return 0; + *type = 0; + *fader = si->fader_active; + *fx = si->effect_toggle; + *rec = si->encoder_active; + *active= 1; + return 1; +} + +/**************************************************************************************************** + * + * sample_get_effect_arg( sample_nr, position, argnr ) + * + * returns the required argument set on position X in the effect_chain of sample Y. + * returns -1 on error. + ****************************************************************************************************/ +int sample_get_effect_arg(int s1, int position, int argnr) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + if (argnr < 0 || argnr > SAMPLE_MAX_PARAMETERS) + return -1; + return sample->effect_chain[position]->arg[argnr]; +} + +int sample_get_selected_entry(int s1) +{ + sample_info *sample; + sample = sample_get(s1); + if(!sample) return -1; + return sample->selected_entry; +} + +int sample_get_all_effect_arg(int s1, int position, int *args, int arg_len, int n_frame) +{ + int i; + sample_info *sample; + sample = sample_get(s1); + if( arg_len == 0) + return 1; + if (!sample) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + if (arg_len < 0 || arg_len > SAMPLE_MAX_PARAMETERS) + return -1; + + if( sample->effect_chain[position]->kf_status ) + { + for( i = 0; i < arg_len; i ++ ) + { + int tmp = 0; + if(!get_keyframe_value( sample->effect_chain[position]->kf, n_frame, i, &tmp ) ) + args[i] = sample->effect_chain[position]->arg[i]; + else + args[i] = tmp; + } + } + else + { + for (i = 0; i < arg_len; i++) { + args[i] = sample->effect_chain[position]->arg[i]; + } + } + return i; +} + +/******************************************** + * sample_has_extra_frame. + * return 1 if an effect on the given chain entry + * requires another frame, -1 otherwise. + */ +int sample_has_extra_frame(int s1, int position) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + if (sample->effect_chain[position]->effect_id == -1) + return -1; + if (vj_effect_get_extra_frame + (sample->effect_chain[position]->effect_id) == 1) + return 1; + return -1; +} + +/**************************************************************************************************** + * + * sample_set_effect_arg + * + * sets an argument ARGNR in the chain on position X of sample Y + * returns -1 on error. + * + ****************************************************************************************************/ + +int sample_set_effect_arg(int s1, int position, int argnr, int value) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + if (argnr < 0 || argnr > SAMPLE_MAX_PARAMETERS) + return -1; + sample->effect_chain[position]->arg[argnr] = value; + return ( sample_update(sample,s1)); +} + +int sample_set_selected_entry(int s1, int position) +{ + sample_info *sample = sample_get(s1); + if(!sample) return -1; + if(position< 0 || position >= SAMPLE_MAX_EFFECTS) return -1; + sample->selected_entry = position; + return (sample_update(sample,s1)); +} + +int sample_set_effect_status(int s1, int status) +{ + sample_info *sample = sample_get(s1); + if(!sample) return -1; + if(status == 1 || status == 0 ) + { + sample->effect_toggle = status; + return ( sample_update(sample,s1)); + } + return -1; +} + +int sample_set_chain_channel(int s1, int position, int input) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + + + + //sample->effect_chain[position]->channel = input; + int src_type = sample->effect_chain[position]->source_type; + // now, reset cache and setup + if( src_type == 0) + { + sample_info *new = sample_get( input ); + + if( sample->effect_chain[position]->channel != input && sample->effect_chain[position]->effect_id > 0) + { + sample_info *old = sample_get( sample->effect_chain[position]->channel ); + if(old) + vj_el_break_cache( old->edit_list ); // no longer needed + + if(new) + vj_el_setup_cache( new->edit_list ); // setup new cache + } + } + sample->effect_chain[position]->channel = input; + + return ( sample_update(sample,s1)); +} + +static int sample_sample_used(sample_info *a, int b ) +{ + int i; + for( i = 0; i < SAMPLE_MAX_EFFECTS; i ++ ) + { + int src_type = a->effect_chain[i]->source_type; + int id = a->effect_chain[i]->channel; + if( src_type == 0 && id == b ) + return 1; + } + return 0; +} + +int sample_stop_playing(int s1, int new_s1) +{ + sample_info *sample = sample_get(s1); + sample_info *newsample = NULL; + if( new_s1 ) + newsample = sample_get(new_s1); + if (!sample) + return 0; + if (new_s1 && !newsample) + return 0; + unsigned int i,j; + + //@ stop playing, if new_s1 + + if( new_s1 == s1 ) + return 1; + + int destroy_s1 = 1; + + if( new_s1 ) + { + for( i = 0; i < SAMPLE_MAX_EFFECTS ; i ++ ) + { + int src_type = newsample->effect_chain[i]->source_type; + int id = newsample->effect_chain[i]->channel; + if( src_type == 0 && id == s1 ) + destroy_s1 = 0; // no need to destroy cache, used by newsample + } + } + + if(destroy_s1) + vj_el_break_cache( sample->edit_list ); // break the cache + + + if( new_s1 ) + { + for( i = 0; i < SAMPLE_MAX_EFFECTS;i++ ) + { + int src_type = sample->effect_chain[i]->source_type; + int id = sample->effect_chain[i]->channel; + if( src_type == 0 && id > 0 ) + { + //@ if ID is not in newsample, + if( !sample_sample_used( newsample, id )) + { + sample_info *second = sample_get( id ); + if(second) //@ get and destroy its cache + vj_el_break_cache( second->edit_list ); + } + } + } + } + + return 1; +} + +int sample_cache_used( int s1 ) +{ + return cache_avail_mb(); +} + +int sample_start_playing(int s1, int no_cache) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + int i; + + if(!no_cache) + vj_el_setup_cache( sample->edit_list ); + + for( i = 0; i < SAMPLE_MAX_EFFECTS; i ++ ) + { + int src_type = sample->effect_chain[i]->source_type; + int id = sample->effect_chain[i]->channel; + if( src_type == 0 && id > 0 && sample->effect_chain[i]->effect_id > 0 ) + { + sample_info *second = sample_get( id ); + if(second) + vj_el_setup_cache( second->edit_list ); + } + } + + return 1; +} + +int sample_is_deleted(int s1) +{ + int i; + for (i = 0; i < next_avail_num; i++) { + if (avail_num[i] == s1) + return 1; + } + return 0; +} + +int sample_set_chain_source(int s1, int position, int input) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + + if( sample->effect_chain[position]->source_type == 0 && + sample->effect_chain[position]->channel > 0 && + sample->effect_chain[position]->effect_id > 0) + { + sample_info *second = sample_get( sample->effect_chain[position]->channel ); + if(second && second->edit_list) + vj_el_clear_cache( second->edit_list ); + sample_info *new = sample_get( input ); + if(new) + vj_el_setup_cache( new->edit_list ); + } + + sample->effect_chain[position]->source_type = input; + return (sample_update(sample,s1)); +} + +/**************************************************************************************************** + * + * sample_set_speed + * + * store playback speed in the sample. + * returns -1 on error. + * + ****************************************************************************************************/ + +int sample_set_speed(int s1, int speed) +{ + sample_info *sample = sample_get(s1); + if (!sample) return -1; + int len = sample->last_frame - + sample->first_frame; + if( (speed < -(MAX_SPEED) ) || (speed > MAX_SPEED)) + return -1; + if( speed > len ) + return -1; + if( speed < -(len)) + return -1; + sample->speed = speed; + return ( sample_update(sample,s1)); +} +int sample_set_framedups(int s1, int n) { + sample_info *sample = sample_get(s1); + if(!sample) return -1; + sample->dups = n; + return ( sample_update(sample,s1)); +} + + +int sample_set_framedup(int s1, int n) { + sample_info *sample = sample_get(s1); + if(!sample) return -1; + sample->dup = n; + return ( sample_update(sample,s1)); +} + +int sample_get_chain_channel(int s1, int position) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + return sample->effect_chain[position]->channel; +} + +int sample_get_chain_source(int s1, int position) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + return sample->effect_chain[position]->source_type; +} + +int sample_get_loops(int s1) +{ + sample_info *sample = sample_get(s1); + if (sample) { + return sample->max_loops; + } + return -1; +} +int sample_get_loops2(int s1) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + return sample->max_loops2; +} + +/**************************************************************************************************** + * + * sample_set_looptype + * + * store looptype in the sample. + * returns -1 on error. + * + ****************************************************************************************************/ + +int sample_set_looptype(int s1, int looptype) +{ + sample_info *sample = sample_get(s1); + if(!sample) return -1; + + if (looptype == 3 || looptype == 0 || looptype == 1 || looptype == 2) { + sample->looptype = looptype; + return ( sample_update(sample,s1)); + } + return -1; +} + +int sample_set_playmode(int s1, int playmode) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + + sample->playmode = playmode; + return ( sample_update(sample,s1)); +} + + + +/************************************************************************************************* + * update start frame + * + *************************************************************************************************/ +int sample_set_startframe(int s1, long frame_num) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return 0; + + if( frame_num < 0 ) + return 0; + + if(sample->play_length ) + return 1; //@ simpler to lie + + if(sample->edit_list) + if( frame_num > sample->edit_list->total_frames ) + frame_num = sample->edit_list->total_frames; + + sample->first_frame = frame_num; + if(sample->first_frame >= sample->last_frame ) + sample->first_frame = sample->last_frame-1; + return (sample_update(sample,s1)); +} + +int sample_usable_edl( int s1 ) +{ + sample_info *sample = sample_get(s1); + if(!sample) return 0; + if( sample->play_length ) + return 0; + if( sample->edit_list ) + return 1; + return 0; +} + +int sample_max_video_length(int s1) +{ + sample_info *sample = sample_get(s1); + float fps = 25.0; + if(!sample) return 0; + if(sample->edit_list) + fps = sample->edit_list->video_fps; + + if( sample->play_length ) + return (60 * fps * 6); // 6 minutes + + if( sample->edit_list ) + return (int) sample->edit_list->total_frames; + return 0; +} + +int sample_video_length( int s1 ) +{ + sample_info *sample = sample_get(s1); + if(!sample) return 0; + if( sample->play_length ) + return sample->play_length; + if( sample->edit_list ) + return sample->edit_list->total_frames; + return 0; +} + +int sample_set_endframe(int s1, long frame_num) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return 0; + if(frame_num < 0) + return 0; + + if(sample->play_length) + { +#ifdef STRICT_CHECKING + assert( sample->edit_list != NULL ); +#endif + int new_len = ( frame_num - sample->first_frame ); + if( new_len <= 1 ) + new_len = 1; + sample->last_frame = sample->first_frame + new_len; + + if( vj_el_set_bogus_length( sample->edit_list, 0, new_len ) ) + { + sample->play_length = new_len; + return (sample_update(sample,s1)); + } + return 0; + } + + if(sample->edit_list) + if( frame_num > sample->edit_list->total_frames ) + frame_num = sample->edit_list->total_frames; + + sample->last_frame = frame_num; + + return (sample_update(sample,s1)); +} + +int sample_get_next(int s1) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + return sample->next_sample_id; +} +int sample_set_loops(int s1, int nr_of_loops) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + sample->max_loops = nr_of_loops; + return (sample_update(sample,s1)); +} +int sample_set_loops2(int s1, int nr_of_loops) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + sample->max_loops2 = nr_of_loops; + return (sample_update(sample,s1)); +} + +int sample_get_sub_audio(int s1) +{ + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + return sample->sub_audio; +} + +int sample_set_sub_audio(int s1, int audio) +{ + sample_info *sample = sample_get(s1); + if(!sample) return -1; + if (audio < 0 && audio > 1) + return -1; + sample->sub_audio = audio; + return (sample_update(sample,s1)); +} + +int sample_get_audio_volume(int s1) +{ + sample_info *sample = sample_get(s1); + if (sample) { + return sample->audio_volume; + } + return -1; +} + +int sample_set_audio_volume(int s1, int volume) +{ + sample_info *sample = sample_get(s1); + if (volume < 0) + volume = 0; + if (volume > 100) + volume = 100; + sample->audio_volume = volume; + return (sample_update(sample,s1)); +} + + +int sample_set_next(int s1, int next_sample_id) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + /* just add, do not verify + on module generation, next sample may not yet be created. + checks in parameter set in libveejayvj.c + */ + sample->next_sample_id = next_sample_id; + return (sample_update(sample,s1)); +} + +/**************************************************************************************************** + * + * + * add a new effect to the chain, returns chain index number on success or -1 if + * the requested sample does not exist. + * + ****************************************************************************************************/ + +int sample_chain_malloc(int s1) +{ + sample_info *sample = sample_get(s1); + int i=0; + int e_id = 0; + int sum =0; + if (!sample) + return -1; + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + e_id = sample->effect_chain[i]->effect_id; + if(e_id) + { + if(vj_effect_activate(e_id)) + sum++; + } + } + veejay_msg(VEEJAY_MSG_DEBUG, "Allocated %d effects",sum); + return sum; +} + +int sample_chain_free(int s1) +{ + sample_info *sample = sample_get(s1); + int i=0; + int e_id = 0; + int sum = 0; + if (!sample) + return -1; + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + e_id = sample->effect_chain[i]->effect_id; + if(e_id!=-1) + { + if(vj_effect_initialized(e_id)) + { + vj_effect_deactivate(e_id); + sum++; + } + } + } + return sum; +} + +int sample_chain_reset_kf( int s1, int entry ) +{ + sample_info *sample = sample_get(s1); + if(!sample) return 0; + sample->effect_chain[entry]->kf_status = 0; + if(sample->effect_chain[entry]->kf) + vevo_port_free(sample->effect_chain[entry]->kf ); + sample->effect_chain[entry]->kf = vpn(VEVO_ANONYMOUS_PORT ); + return 1; +} + +int sample_get_kf_tokens( int s1, int entry, int id, int *start, int *end, int *type ) +{ + sample_info *sample = sample_get(s1); + if(!sample) return 0; + return keyframe_get_tokens( sample->effect_chain[entry]->kf, id, start,end,type ); +} + +void *sample_get_kf_port( int s1, int entry ) +{ + sample_info *sample = sample_get(s1); + if(!sample) return NULL; + return sample->effect_chain[entry]->kf; +} + +int sample_get_kf_status( int s1, int entry ) +{ + sample_info *sample = sample_get(s1); + if(!sample) return 0; + return sample->effect_chain[entry]->kf_status; +} + +int sample_chain_set_kf_status( int s1, int entry, int status ) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + sample->effect_chain[entry]->kf_status = status; + return 1; +} + +unsigned char * sample_chain_get_kfs( int s1, int entry, int parameter_id, int *len ) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return NULL; + if ( entry < 0 || entry > SAMPLE_MAX_EFFECTS ) + return NULL; + if( parameter_id < 0 || parameter_id > 9 ) + return NULL; + + unsigned char *data = keyframe_pack( sample->effect_chain[entry]->kf, parameter_id, entry,len ); + if( data ) + return data; + return NULL; +} + +int sample_chain_set_kfs( int s1, int len, unsigned char *data ) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + if( len <= 0 ) + return 0; + + int entry = 0; + if(!keyframe_unpack( data, len, &entry,s1,1 )) + { + veejay_msg(0, "Unable to unpack keyframe packet"); + return -1; + } + return 1; +} +int sample_chain_add(int s1, int c, int effect_nr) +{ + int effect_params = 0, i; + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + if (c < 0 || c >= SAMPLE_MAX_EFFECTS) + return -1; + + if ( effect_nr < VJ_IMAGE_EFFECT_MIN ) return -1; + + if ( effect_nr > VJ_IMAGE_EFFECT_MAX && effect_nr < VJ_VIDEO_EFFECT_MIN ) + return -1; + + if( sample->effect_chain[c]->effect_id != -1 && sample->effect_chain[c]->effect_id != effect_nr ) + { + //verify if the effect should be discarded + if(vj_effect_initialized( sample->effect_chain[c]->effect_id )) + { + // it is using some memory, see if we can free it ... + int i; + int ok = 1; + for(i=(c+1); i < SAMPLE_MAX_EFFECTS; i++) + { + if( sample->effect_chain[i]->effect_id == sample->effect_chain[c]->effect_id) ok = 0; + } + // ok, lets get rid of it. + if( ok ) vj_effect_deactivate( sample->effect_chain[c]->effect_id ); + } + } + + + if(!vj_effect_initialized(effect_nr)) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Effect %s must be initialized now", + vj_effect_get_description(effect_nr)); + if(!vj_effect_activate( effect_nr )) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cant activate %d", effect_nr); + return -1; + } + } + + sample->effect_chain[c]->effect_id = effect_nr; + sample->effect_chain[c]->e_flag = 1; /* effect enabled standard */ + effect_params = vj_effect_get_num_params(effect_nr); + if (effect_params > 0) + { + /* there are parameters, set default values */ + for (i = 0; i < effect_params; i++) + { + int val = vj_effect_get_default(effect_nr, i); + sample->effect_chain[c]->arg[i] = val; + } + } + if (vj_effect_get_extra_frame(effect_nr)) + { + //sample->effect_chain[c]->frame_offset = 0; + sample->effect_chain[c]->frame_trimmer = 0; + + if(s1 > 1) + s1 = s1 - 1; + if(!sample_exists(s1)) s1 = s1 + 1; + + if(sample->effect_chain[c]->channel <= 0) + sample->effect_chain[c]->channel = sample_size()-1; // follow newest + if(sample->effect_chain[c]->source_type < 0) + sample->effect_chain[c]->source_type = 0; + + veejay_msg(VEEJAY_MSG_DEBUG,"Effect %s on entry %d overlaying with sample %d", + vj_effect_get_description(sample->effect_chain[c]->effect_id),c,sample->effect_chain[c]->channel); + } + sample_update(sample,s1); + + return c; /* return position on which it was added */ +} + +int sample_reset_offset(int s1) +{ + sample_info *sample = sample_get(s1); + int i; + if(!sample) return -1; + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + sample->effect_chain[i]->frame_offset = 0; + } + return ( sample_update(sample,s1)); +} + +int sample_set_offset(int s1, int chain_entry, int frame_offset) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + /* set to zero if frame_offset is greater than sample length */ + //if(frame_offset > (sample->last_frame - sample->first_frame)) frame_offset=0; + sample->effect_chain[chain_entry]->frame_offset = frame_offset; + return (sample_update(sample,s1)); +} + +int sample_set_trimmer(int s1, int chain_entry, int trimmer) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + /* set to zero if frame_offset is greater than sample length */ + if (chain_entry < 0 || chain_entry >= SAMPLE_MAX_PARAMETERS) + return -1; + if (trimmer > (sample->last_frame - sample->first_frame)) + trimmer = 0; + if (trimmer < 0 ) trimmer = 0; + sample->effect_chain[chain_entry]->frame_trimmer = trimmer; + + return (sample_update(sample,s1)); +} +int sample_set_chain_audio(int s1, int chain_entry, int val) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + if (chain_entry < 0 || chain_entry >= SAMPLE_MAX_PARAMETERS) + return -1; + sample->effect_chain[chain_entry]->a_flag = val; + return ( sample_update(sample,s1)); +} + +int sample_set_chain_volume(int s1, int chain_entry, int volume) +{ + sample_info *sample = sample_get(s1); + if (!sample) + return -1; + /* set to zero if frame_offset is greater than sample length */ + if (volume < 0) + volume = 100; + if (volume > 100) + volume = 0; + sample->effect_chain[chain_entry]->volume = volume; + return (sample_update(sample,s1)); +} + + + + +/**************************************************************************************************** + * + * sample_chain_clear( sample_nr ) + * + * clear the entire effect chain. + * + ****************************************************************************************************/ + +int sample_chain_clear(int s1) +{ + int i, j; + sample_info *sample = sample_get(s1); + + if (!sample) + return -1; + /* the effect chain is gonna be empty! */ + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) { + if(sample->effect_chain[i]->effect_id != -1) + { + if(vj_effect_initialized( sample->effect_chain[i]->effect_id )) + vj_effect_deactivate( sample->effect_chain[i]->effect_id ); + } + sample->effect_chain[i]->effect_id = -1; + sample->effect_chain[i]->frame_offset = 0; + sample->effect_chain[i]->frame_trimmer = 0; + sample->effect_chain[i]->volume = 0; + sample->effect_chain[i]->a_flag = 0; + if( sample->effect_chain[i]->kf ) + vevo_port_free( sample->effect_chain[i]->kf ); + sample->effect_chain[i]->kf = vpn(VEVO_ANONYMOUS_PORT); + int src_type = sample->effect_chain[i]->source_type; + int id = sample->effect_chain[i]->channel; + if( src_type == 0 && id > 0 ) + { + sample_info *old = sample_get( id ); + if(old) + vj_el_clear_cache(old->edit_list); + } + sample->effect_chain[i]->source_type = 0; + sample->effect_chain[i]->channel = s1; // myself + for (j = 0; j < SAMPLE_MAX_PARAMETERS; j++) + sample->effect_chain[i]->arg[j] = 0; + } + + return (sample_update(sample,s1)); +} + + +/**************************************************************************************************** + * + * sample_chain_size( sample_nr ) + * + * returns the number of effects in the effect_chain + * + ****************************************************************************************************/ +int sample_chain_size(int s1) +{ + int i, e; + + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + e = 0; + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) + if (sample->effect_chain[i]->effect_id != -1) + e++; + return e; +} + +/**************************************************************************************************** + * + * sample_chain_get_free_entry( sample_nr ) + * + * returns last available entry + * + ****************************************************************************************************/ +int sample_chain_get_free_entry(int s1) +{ + int i; + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) + if (sample->effect_chain[i]->effect_id == -1) + return i; + return -1; +} + + +/**************************************************************************************************** + * + * sample_chain_remove( sample_nr, position ) + * + * Removes an Effect from the chain of sample on entry + * + ****************************************************************************************************/ + +static int _sample_can_free(sample_info *sample, int reserved, int effect_id) +{ + int i; + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + if(i != reserved && effect_id == sample->effect_chain[i]->effect_id) return 0; + } + return 1; +} + +int sample_chain_remove(int s1, int position) +{ + int j; + sample_info *sample; + sample = sample_get(s1); + if (!sample) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + if(sample->effect_chain[position]->effect_id != -1) + { + if(vj_effect_initialized( sample->effect_chain[position]->effect_id) && + _sample_can_free(sample,position, sample->effect_chain[position]->effect_id)) + vj_effect_deactivate( sample->effect_chain[position]->effect_id); + } + sample->effect_chain[position]->effect_id = -1; + sample->effect_chain[position]->frame_offset = 0; + sample->effect_chain[position]->frame_trimmer = 0; + sample->effect_chain[position]->volume = 0; + sample->effect_chain[position]->a_flag = 0; + + if( sample->effect_chain[position]->kf ) + vevo_port_free( sample->effect_chain[position]->kf ); + sample->effect_chain[position]->kf = vpn( VEVO_ANONYMOUS_PORT ); + + int src_type = sample->effect_chain[position]->source_type; + int id = sample->effect_chain[position]->channel; + if( src_type == 0 && id > 0 ) + { + sample_info *old = sample_get( id ); + if(old) + vj_el_clear_cache(old->edit_list); + } + + sample->effect_chain[position]->source_type = 0; + sample->effect_chain[position]->channel = 0; + for (j = 0; j < SAMPLE_MAX_PARAMETERS; j++) + sample->effect_chain[position]->arg[j] = 0; + + return (sample_update(sample,s1)); +} + +int sample_set_loop_dec(int s1, int active) { + sample_info *sample = sample_get(s1); + if(!sample) return -1; + sample->loop_dec = active; + return (sample_update(sample,s1)); +} + +int sample_get_loop_dec(int s1) { + sample_info *sample = sample_get(s1); + if(!sample) return -1; + return sample->loop_dec; +} + +editlist *sample_get_editlist(int s1) +{ + sample_info *sample = sample_get(s1); + if(!sample) return NULL; + return sample->edit_list; +} + +//@ is sample k in fx chain ? +int sample_cached(sample_info *s, int b_sample ) +{ + int i = 0; + for( i = 0; i < SAMPLE_MAX_EFFECTS ;i++ ) + if( s->effect_chain[i]->source_type == 0 && s->effect_chain[i]->channel == b_sample) + return 1; + return 0; +} +void sample_chain_set_kf( int s1,int i, void *port ) +{ + sample_info *sample = sample_get(s1); + if(!sample) return; + sample->effect_chain[i]->kf = port; +} + +int sample_set_editlist(int s1, editlist *edl) +{ + sample_info *sample = sample_get(s1); + if(!sample) return -1; + if(sample->edit_list) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample %d already has EDL", s1 ); + return 0; + } + sample->edit_list = edl; + sample->soft_edl = 1; + return (sample_update(sample,s1)); +} + +int sample_apply_loop_dec(int s1, double fps) { + sample_info *sample = sample_get(s1); + int inc = (int) fps; + if(!sample) return -1; +/* if(sample->loop_dec==1) { + if( (sample->first_frame + inc) >= sample->last_frame) { + sample->first_frame = sample->last_frame-1; + sample->loop_dec = 0; + } + else { + sample->first_frame += (inc / sample->loop_periods); + } + veejay_msg(VEEJAY_MSG_DEBUG, "New starting postions are %ld - %ld", + sample->first_frame, sample->last_frame); + return ( sample_update(sample, s1)); + }*/ + + sample->loop_dec ++; + + return 1; +} + + +/* print sample status information into an allocated string str*/ +//int sample_chain_sprint_status(int s1, int entry, int changed, int r_changed,char *str, +// int frame) +int sample_chain_sprint_status( int s1,int cache,int sa,int ca, int pfps, int frame, int mode,int total_slots, int seq_rec,int macro,char *str ) +{ + sample_info *sample; + sample = sample_get(s1); + + if (!sample) + { +#ifdef STRICT_CHECKING + veejay_msg(0, "Fatal : sample %d is invalid, cannot produce a valid status line", s1 ); +#endif + return -1; + } + int e_a, e_d, e_s; + if( sa && seq_rec) + { + sample_info *rs = sample_get( seq_rec ); + e_a = rs->encoder_active; + e_d = rs->encoder_duration; + e_s = rs->encoder_succes_frames; + } + else + { + e_a = sample->encoder_active; + e_d = sample->encoder_duration; + e_s = sample->encoder_succes_frames; + } + + veejay_sprintf(str,1024, + "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + pfps, + frame, + mode, + s1, + sample->effect_toggle, + sample->first_frame, + sample->last_frame, + sample->speed, + sample->looptype, + e_a, + e_d, + e_s, + sample_size(), + sample->marker_start, + sample->marker_end, + sample->selected_entry, + total_slots, + cache, + sa, + ca, + (int)( sample->fader_val ), + sample->dup, + macro); + + + + return 0; +} + + +#ifdef HAVE_XML2 +/************************************************************************************************* + * + * UTF8toLAT1() + * + * convert an UTF8 string to ISO LATIN 1 string + * + ****************************************************************************************************/ +unsigned char *UTF8toLAT1(unsigned char *in) +{ + int in_size, out_size; + unsigned char *out; + + if (in == NULL) + return (NULL); + + out_size = in_size = (int) strlen(in) + 1; + out = malloc((size_t) out_size); + + if (out == NULL) { + return (NULL); + } + + if (UTF8Toisolat1(out, &out_size, in, &in_size) != 0) + { + //veejay_msg(VEEJAY_MSG_ERROR, "Cannot convert '%s'", in ); + //free(out); + //return (NULL); + strncpy( out, in, out_size ); + } + + out = realloc(out, out_size + 1); + out[out_size] = 0; /*null terminating out */ + + return (out); +} + +/************************************************************************************************* + * + * ParseArguments() + * + * Parse the effect arguments using libxml2 + * + ****************************************************************************************************/ +void ParseArguments(xmlDocPtr doc, xmlNodePtr cur, int *arg) +{ + xmlChar *xmlTemp = NULL; + unsigned char *chTemp = NULL; + int argIndex = 0; + if (cur == NULL) + return; + + while (cur != NULL && argIndex < SAMPLE_MAX_PARAMETERS) { + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_ARGUMENT)) + { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + arg[argIndex] = atoi(chTemp); + + argIndex++; + + + + } + if (xmlTemp) + xmlFree(xmlTemp); + if (chTemp) + free(chTemp); + + } + cur = cur->next; + } +} + +static void ParseKeys( xmlDocPtr doc, xmlNodePtr cur, void *port ) +{ + while( cur != NULL ) + { + if(!xmlStrcmp( cur->name, (const xmlChar*) "KEYFRAMES" )) + { + keyframe_xml_unpack( doc, cur->xmlChildrenNode, port ); + } + cur = cur->next; + } +} + + +/************************************************************************************************* + * + * ParseEffect() + * + * Parse an effect using libxml2 + * + ****************************************************************************************************/ +void ParseEffect(xmlDocPtr doc, xmlNodePtr cur, int dst_sample, int start_at) +{ + xmlChar *xmlTemp = NULL; + unsigned char *chTemp = NULL; + int effect_id = -1; + int arg[SAMPLE_MAX_PARAMETERS]; + int i; + int source_type = 0; + int channel = 0; + int frame_trimmer = 0; + int frame_offset = 0; + int e_flag = 0; + int volume = 0; + int a_flag = 0; + int chain_index = 0; + int kf_status = 0; + xmlNodePtr anim = NULL; + + for (i = 0; i < SAMPLE_MAX_PARAMETERS; i++) { + arg[i] = 0; + } + + if (cur == NULL) + return; + + int k = 0; + + while (cur != NULL) { + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTID)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + effect_id = atoi(chTemp); + free(chTemp); + k ++; + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTPOS)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + chain_index = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_ARGUMENTS)) { + + ParseArguments(doc, cur->xmlChildrenNode, arg); + } + + if( !xmlStrcmp(cur->name, (const xmlChar*) "ANIM" )) + { + anim = cur->xmlChildrenNode; + } + + + /* add source,channel,trimmer,e_flag */ + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTSOURCE)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + source_type = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTCHANNEL)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + channel = ( atoi(chTemp) ) + start_at; + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTTRIMMER)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + frame_trimmer = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTOFFSET)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + frame_offset = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTACTIVE)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + e_flag = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + + } + + if (!xmlStrcmp + (cur->name, (const xmlChar *) XMLTAG_EFFECTAUDIOFLAG)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + a_flag = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + + } + + if (!xmlStrcmp + (cur->name, (const xmlChar *) XMLTAG_EFFECTAUDIOVOLUME)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + volume = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if(!xmlStrcmp( cur->name, (const xmlChar*) "kf_status" )) { + xmlTemp = xmlNodeListGetString(doc,cur->xmlChildrenNode,1); + chTemp = UTF8toLAT1(xmlTemp); + if(chTemp) + { kf_status = atoi(chTemp); free(chTemp); } + if(xmlTemp) xmlFree(xmlTemp); + } + // xmlTemp and chTemp should be freed after use + xmlTemp = NULL; + chTemp = NULL; + cur = cur->next; + } + + + if (effect_id != -1) { + int j; + if (sample_chain_add(dst_sample, chain_index, effect_id) == -1) { + veejay_msg(VEEJAY_MSG_ERROR, "Error parsing effect %d (pos %d)\n", + effect_id, chain_index); + } + + /* load the parameter values */ + for (j = 0; j < vj_effect_get_num_params(effect_id); j++) { + sample_set_effect_arg(dst_sample, chain_index, j, arg[j]); + } + sample_set_chain_channel(dst_sample, chain_index, channel); + sample_set_chain_source(dst_sample, chain_index, source_type); + + /* set other parameters */ + if (a_flag) { + sample_set_chain_audio(dst_sample, chain_index, a_flag); + sample_set_chain_volume(dst_sample, chain_index, volume); + } + + sample_set_chain_status(dst_sample, chain_index, e_flag); + + sample_set_offset(dst_sample, chain_index, frame_offset); + sample_set_trimmer(dst_sample, chain_index, frame_trimmer); + + sample_info *skel = sample_get(dst_sample); + + if(anim) + { + ParseKeys( doc, anim, skel->effect_chain[ chain_index ]->kf ); + sample_chain_set_kf_status( dst_sample, chain_index, kf_status ); + } + } + +} + +/************************************************************************************************* + * + * ParseEffect() + * + * Parse the effects array + * + ****************************************************************************************************/ +void ParseEffects(xmlDocPtr doc, xmlNodePtr cur, sample_info * skel, int start_at) +{ + int effectIndex = 0; + while (cur != NULL && effectIndex < SAMPLE_MAX_EFFECTS) { + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECT)) { + ParseEffect(doc, cur->xmlChildrenNode, skel->sample_id, start_at); + effectIndex++; + } + //effectIndex++; + cur = cur->next; + } +} + +void LoadCurrentPlaying( xmlDocPtr doc, xmlNodePtr cur , int *id, int *mode ) +{ + unsigned char *chTemp = NULL; + unsigned char *xmlTemp = NULL; + while (cur != NULL) + { + if (!xmlStrcmp(cur->name, (const xmlChar *) "PLAYING_ID")) { + xmlTemp = xmlNodeListGetString(doc,cur->xmlChildrenNode,1 ); + chTemp = UTF8toLAT1(xmlTemp); + if(chTemp) { + int s_id = atoi(chTemp ); + *id = s_id; + xmlFree(chTemp); + } + if( xmlTemp ) free(xmlTemp); + } + + if( !xmlStrcmp(cur->name, (const xmlChar*) "PLAYING_MODE" )) + { + xmlTemp = xmlNodeListGetString( doc,cur->xmlChildrenNode,1 ); + chTemp = UTF8toLAT1( xmlTemp ); + if(chTemp ) { + int s_pm = atoi( chTemp ); + *mode = s_pm; + xmlFree(chTemp); + } + if( xmlTemp ) free(xmlTemp); + } + + cur = cur->next; + } + +} + +void LoadSequences( xmlDocPtr doc, xmlNodePtr cur, void *seq ) +{ + seq_t *s = (seq_t*) seq; + + int i; + xmlChar *xmlTemp = NULL; + unsigned char *chTemp = NULL; + + while (cur != NULL) + { + if (!xmlStrcmp(cur->name, (const xmlChar *) "SEQ_ID")) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + int id = atoi( chTemp ); + s->samples[ s->size ] = id; + s->size ++; + free(chTemp); + } + if( xmlTemp ) + xmlFree(xmlTemp); + } + cur = cur->next; + } + +} + +/************************************************************************************************* + * + * ParseSample() + * + * Parse a sample + * + ****************************************************************************************************/ +xmlNodePtr ParseSample(xmlDocPtr doc, xmlNodePtr cur, sample_info * skel,void *el, void *font, int start_at ) +{ + + xmlChar *xmlTemp = NULL; + unsigned char *chTemp = NULL; + xmlNodePtr subs = NULL; + int post_check = 0; + + if(!sample_read_edl( skel )) { + veejay_msg(VEEJAY_MSG_WARNING, "No saved edit decision list '%s' for sample %d", skel->edit_list_file, skel->sample_id ); + if( el == NULL || ((editlist*)el)->video_frames <= 2 ) { + veejay_msg(VEEJAY_MSG_WARNING, "Plainmode is dummy !"); + } + veejay_msg(VEEJAY_MSG_WARNING, "Using plainmode to play sample %d", skel->sample_id ); + post_check = 1; + skel->edit_list = NULL; + } + if(!skel->edit_list) + { + skel->edit_list = el; + skel->soft_edl = 1; + } else { + skel->soft_edl = 0; + } + while (cur != NULL) { + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_SAMPLEID)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + skel->sample_id = ( atoi(chTemp) ) + start_at; + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if( !xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_BOGUSVIDEO ) ) + { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + skel->play_length = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EDIT_LIST_FILE)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + skel->edit_list_file = strdup(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_CHAIN_ENABLED)) + { + xmlTemp = xmlNodeListGetString( doc, cur->xmlChildrenNode,1); + chTemp = UTF8toLAT1( xmlTemp ); + if(chTemp) + { + skel->effect_toggle = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_SAMPLEDESCR)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + snprintf(skel->descr, SAMPLE_MAX_DESCR_LEN,"%s", chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_FIRSTFRAME)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_startframe(skel->sample_id, atol(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_VOL)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_audio_volume(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_LASTFRAME)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_endframe(skel->sample_id, atol(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_SPEED)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_speed(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_FRAMEDUP)) { + xmlTemp = xmlNodeListGetString(doc,cur->xmlChildrenNode,1); + chTemp = UTF8toLAT1(xmlTemp); + if(chTemp) + { + sample_set_framedup(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_LOOPTYPE)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_looptype(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_MAXLOOPS)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_loops(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_NEXTSAMPLE)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_next(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_DEPTH)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_depth(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_PLAYMODE)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_playmode(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name,(const xmlChar *) XMLTAG_FADER_ACTIVE)) { + xmlTemp = xmlNodeListGetString(doc,cur->xmlChildrenNode,1); + chTemp = UTF8toLAT1(xmlTemp); + if(chTemp) { + skel->fader_active = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name,(const xmlChar *) XMLTAG_FADER_VAL)) { + xmlTemp = xmlNodeListGetString(doc,cur->xmlChildrenNode,1); + chTemp = UTF8toLAT1(xmlTemp); + if(chTemp){ + skel->fader_val = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name,(const xmlChar*) XMLTAG_FADER_INC)) { + xmlTemp = xmlNodeListGetString(doc,cur->xmlChildrenNode,1); + chTemp = UTF8toLAT1(xmlTemp); + if(chTemp) { + skel->fader_inc = atof(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name,(const xmlChar*) XMLTAG_FADER_DIRECTION)) { + xmlTemp = xmlNodeListGetString(doc,cur->xmlChildrenNode,1); + chTemp = UTF8toLAT1(xmlTemp); + if(chTemp) { + skel->fader_inc = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if(!xmlStrcmp(cur->name,(const xmlChar*) XMLTAG_LASTENTRY)) { + xmlTemp = xmlNodeListGetString(doc,cur->xmlChildrenNode,1); + chTemp = UTF8toLAT1(xmlTemp); + if(chTemp) { + skel->selected_entry = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + /* + if (!xmlStrcmp(cur->name, (const xmlChar *)XMLTAG_VOLUME)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1( xmlTemp ); + if( chTemp ){ + //sample_set_volume(skel->sample_id, atoi(chTemp )); + } + } + if (!xmlStrcmp(cur->name, (const xmlChar *)XMLTAG_SUBAUDIO)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1( xmlTemp ); + if( chTemp ){ + sample_set_sub_audio(skel->sample_id, atoi(chTemp )); + } + } + */ + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_MARKERSTART)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_marker_start(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_MARKEREND)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + sample_set_marker_end(skel->sample_id, atoi(chTemp)); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + + } + + if(!xmlStrcmp(cur->name, (const xmlChar*) "SUBTITLES" )) + { + subs = cur->xmlChildrenNode; + // vj_font_xml_unpack( doc, cur->xmlChildrenNode, font ); + } + + ParseEffects(doc, cur->xmlChildrenNode, skel, start_at); + + // xmlTemp and chTemp should be freed after use + xmlTemp = NULL; + chTemp = NULL; + + cur = cur->next; + } + // if(!sample_read_edl( skel )) +// veejay_msg(VEEJAY_MSG_ERROR, "No EDL '%s' for sample %d", skel->edit_list_file, skel->sample_id ); + + + + return subs; +} + + +/**************************************************************************************************** + * + * sample_readFromFile( filename ) + * + * load samples and effect chain from an xml file. + * + ****************************************************************************************************/ +int sample_read_edl( sample_info *sample ) +{ + char *files[1]; + int res = 0; + files[0] = strdup(sample->edit_list_file); + if(sample->edit_list) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cleanup old editlist"); + vj_el_free(sample->edit_list); + } + sample->edit_list = vj_el_init_with_args( files,1, + __sample_project_settings.flags, + __sample_project_settings.deinterlace, + __sample_project_settings.force, + __sample_project_settings.norm, + __sample_project_settings.fmt ); + + if(sample->edit_list) + { + res = 1; + sample->soft_edl = 0; + } + if(files[0]) + free(files[0]); + + + return res; +} + +int is_samplelist(char *filename) +{ + xmlDocPtr doc; + xmlNodePtr cur; + doc = xmlParseFile(filename); + if (doc == NULL) + return (0); + + cur = xmlDocGetRootElement(doc); + if (cur == NULL) + { + xmlFreeDoc(doc); + return (0); + } + + if (xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_SAMPLES)) + { + xmlFreeDoc(doc); + return (0); + } + + xmlFreeDoc(doc); + + return 1; +} + +void LoadSubtitles( sample_info *skel, char *file, void *font ) +{ + char tmp[512]; + float fps = 25.0; + + sprintf(tmp, "%s-SUB-%d.srt", file,skel->sample_id ); +#ifdef STRICT_CHECKING + assert( skel->dict != NULL ); +#endif + vj_font_set_constraints_and_dict( font, (long)skel->first_frame, (long) skel->last_frame,fps, skel->dict ); + + vj_font_load_srt( font, tmp ); +} + +int sample_readFromFile(char *sampleFile, void *seq, void *font, void *el,int *id, int *mode) +{ + xmlDocPtr doc; + xmlNodePtr cur; + sample_info *skel; + + /* + * build an XML tree from a the file; + */ + doc = xmlParseFile(sampleFile); + if (doc == NULL) { + return (0); + } + + /* + * Check the document is of the right kind + */ + + int start_at = sample_size()-1; + if( start_at != 0 ) + veejay_msg(VEEJAY_MSG_INFO, "Merging %s into current samplelist, auto number starts at %d", sampleFile, start_at ); + if( vj_tag_size()-1 > 0 ) + veejay_msg(VEEJAY_MSG_INFO, "Existing streams will be deleted (samplelist overrides active streams)"); + + cur = xmlDocGetRootElement(doc); + if (cur == NULL) { + veejay_msg(VEEJAY_MSG_ERROR,"Empty samplelist. Nothing to do.\n"); + xmlFreeDoc(doc); + return (0); + } + + if (xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_SAMPLES)) { + veejay_msg(VEEJAY_MSG_ERROR, "This is not a samplelist: %s", + XMLTAG_SAMPLES); + xmlFreeDoc(doc); + return (0); + } + + cur = cur->xmlChildrenNode; + while (cur != NULL) { + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_SAMPLE)) { + skel = sample_skeleton_new(0, 1); + sample_store(skel); + if (skel != NULL) { + void *d = vj_font_get_dict(font); + + xmlNodePtr subs = ParseSample( doc, cur->xmlChildrenNode, skel, el, font, start_at ); + if(subs) + { + LoadSubtitles( skel, sampleFile, font ); + vj_font_xml_unpack( doc, subs, font ); + } + vj_font_set_dict(font,d); + + } + } + + if( !xmlStrcmp( cur->name, (const xmlChar*) "CURRENT" )) { + LoadCurrentPlaying( doc, cur->xmlChildrenNode, id, mode ); + } + + if( !xmlStrcmp( cur->name, (const xmlChar *) "SEQUENCE" )) { + LoadSequences( doc, cur->xmlChildrenNode,seq ); + } + + if( !xmlStrcmp( cur->name, (const xmlChar*) "stream" )) { + tagParseStreamFX( sampleFile, doc, cur->xmlChildrenNode, font ); + } + + cur = cur->next; + } + xmlFreeDoc(doc); + + return (1); +} + +void CreateArguments(xmlNodePtr node, int *arg, int argcount) +{ + int i; + char buffer[100]; + for (i = 0; i < argcount; i++) { + sprintf(buffer, "%d", arg[i]); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_ARGUMENT, + (const xmlChar *) buffer); + } +} + +void CreateKeys( xmlNodePtr node, int argcount, void *port ) +{ + int i; + for( i = 0; i < argcount ; i++ ) + { + xmlNodePtr childnode = xmlNewChild(node, NULL, (const xmlChar*) "KEYFRAMES", NULL); + keyframe_xml_pack( childnode, port, i ); + } +} + +void CreateEffect(xmlNodePtr node, sample_eff_chain * effect, int position) +{ + char buffer[100]; + xmlNodePtr childnode; + + sprintf(buffer, "%d", position); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTPOS, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->effect_id); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTID, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->e_flag); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTACTIVE, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->source_type); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTSOURCE, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->channel); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTCHANNEL, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->frame_offset); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTOFFSET, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->frame_trimmer); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTTRIMMER, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->a_flag); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTAUDIOFLAG, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->volume); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTAUDIOVOLUME, + (const xmlChar *) buffer); + + + sprintf(buffer, "%d", effect->kf_status ); + xmlNewChild(node,NULL,(const xmlChar*) "kf_status", (const xmlChar*) buffer ); + + + childnode = + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_ARGUMENTS, NULL); + CreateArguments(childnode, effect->arg, + vj_effect_get_num_params(effect->effect_id)); + + + childnode = + xmlNewChild(node,NULL,(const xmlChar*) "ANIM", NULL ); + CreateKeys( childnode, vj_effect_get_num_params(effect->effect_id), effect->kf ); + +} + + + + +void CreateEffects(xmlNodePtr node, sample_eff_chain ** effects) +{ + int i; + xmlNodePtr childnode; + + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) { + if (effects[i]->effect_id != -1) { + childnode = + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECT, + NULL); + CreateEffect(childnode, effects[i], i); + } + } + +} + +void SaveSequences( xmlNodePtr node, void *seq ) +{ + char buffer[100]; + int i = 0; + seq_t *s = (seq_t*) seq; + for( i = 0; i < MAX_SEQUENCES; i ++ ) + { + sprintf(buffer, "%d", s->samples[i] ); + xmlNewChild(node, NULL, (const xmlChar*) "SEQ_ID", + (const xmlChar*) buffer ); + } + +} + +void SaveCurrentPlaying( xmlNodePtr node, int id, int mode ) +{ + char buffer[100]; + sprintf(buffer, "%d", id ); + xmlNewChild(node, NULL, (const xmlChar*) "PLAYING_ID", + (const xmlChar*) buffer ); + sprintf(buffer, "%d", mode ); + xmlNewChild(node,NULL, (const xmlChar*) "PLAYING_MODE", + (const xmlChar*) buffer ); + +} + +void CreateSample(xmlNodePtr node, sample_info * sample, void *font) +{ + char buffer[100]; + xmlNodePtr childnode; + + sprintf(buffer, "%d", sample->sample_id); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_SAMPLEID, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->effect_toggle); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_CHAIN_ENABLED, + (const xmlChar *) buffer); + + if(sample->edit_list_file) + { + sprintf(buffer, "%s", sample->edit_list_file); + xmlNewChild(node, NULL, (const xmlChar*) XMLTAG_EDIT_LIST_FILE, + (const xmlChar*) buffer ); + } + + sprintf(buffer, "%s", sample->descr); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_SAMPLEDESCR, + (const xmlChar *) buffer); + sprintf(buffer, "%ld", sample->first_frame); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_FIRSTFRAME, + (const xmlChar *) buffer); + sprintf(buffer, "%ld", sample->last_frame); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_LASTFRAME, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", sample->play_length ); + xmlNewChild(node, NULL, (const xmlChar*) XMLTAG_BOGUSVIDEO, + (const xmlChar*) buffer ); + sprintf(buffer, "%d", sample->speed); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_SPEED, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->dup); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_FRAMEDUP, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->looptype); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_LOOPTYPE, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->max_loops); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_MAXLOOPS, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->next_sample_id); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_NEXTSAMPLE, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->depth); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_DEPTH, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->playmode); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_PLAYMODE, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->audio_volume); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_VOL, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->marker_start); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_MARKERSTART, + (const xmlChar *) buffer); + sprintf(buffer, "%d", sample->marker_end); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_MARKEREND, + (const xmlChar *) buffer); + + sprintf(buffer,"%d",sample->fader_active); + xmlNewChild(node,NULL,(const xmlChar *) XMLTAG_FADER_ACTIVE, + (const xmlChar *) buffer); + sprintf(buffer,"%f",sample->fader_inc); + xmlNewChild(node,NULL,(const xmlChar *) XMLTAG_FADER_INC, + (const xmlChar *) buffer); + sprintf(buffer,"%f",sample->fader_val); + xmlNewChild(node,NULL,(const xmlChar *) XMLTAG_FADER_VAL, + (const xmlChar *) buffer); + sprintf(buffer,"%d",sample->fader_direction); + xmlNewChild(node,NULL,(const xmlChar *) XMLTAG_FADER_DIRECTION, + (const xmlChar *) buffer); + sprintf(buffer,"%d",sample->selected_entry); + xmlNewChild(node,NULL,(const xmlChar *) XMLTAG_LASTENTRY, + (const xmlChar *)buffer); + + vj_font_xml_pack( node, font ); + + + childnode = + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTS, NULL); + + CreateEffects(childnode, sample->effect_chain); + +} + +/**************************************************************************************************** + * + * sample_writeToFile( filename ) + * + * writes all sample info to a file. + * + ****************************************************************************************************/ +static int sample_write_edl(sample_info *sample) +{ + editlist *edl = sample->edit_list; + if(edl) + { + if(vj_el_write_editlist( sample->edit_list_file, + sample->first_frame, + sample->last_frame, + edl )) + veejay_msg(VEEJAY_MSG_DEBUG, "Saved EDL '%s' of sample %d", + sample->edit_list_file, sample->sample_id ); + return 1; + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample %d has no EDL", sample->sample_id ); + } + return 0; +} + +void WriteSubtitles( sample_info *next_sample, void *font, char *file ) +{ + char tmp[512]; + + void *d = vj_font_get_dict( font ); + + sprintf(tmp, "%s-SUB-%d.srt", file,next_sample->sample_id ); + + vj_font_set_dict( font, next_sample->dict ); + + vj_font_save_srt( font, tmp ); + + vj_font_set_dict( font, d ); +} + +int sample_writeToFile(char *sampleFile, void *seq, void *font, int id, int mode) +{ + int i; + char *encoding = "UTF-8"; + sample_info *next_sample; + xmlDocPtr doc; + xmlNodePtr rootnode, childnode; + + doc = xmlNewDoc("1.0"); + rootnode = + xmlNewDocNode(doc, NULL, (const xmlChar *) XMLTAG_SAMPLES, NULL); + xmlDocSetRootElement(doc, rootnode); + + childnode = xmlNewChild( rootnode, NULL, + (const xmlChar*) "SEQUENCE", NULL ); + SaveSequences( childnode, seq ); + + + childnode = xmlNewChild( rootnode, NULL, (const xmlChar*) "CURRENT" , NULL ); + + SaveCurrentPlaying( childnode , id, mode ); + + for (i = 1; i < sample_size(); i++) { + next_sample = sample_get(i); + if (next_sample) { + if(sample_write_edl( next_sample )) + veejay_msg(VEEJAY_MSG_DEBUG ,"Saved sample %d EDL '%s'", next_sample->sample_id, + next_sample->edit_list_file ); + + childnode = + xmlNewChild(rootnode, NULL, + (const xmlChar *) XMLTAG_SAMPLE, NULL); + + WriteSubtitles( next_sample,font, sampleFile ); + + CreateSample(childnode, next_sample, font); + } + } + + int max = vj_tag_size()-1; + i = 0; + for( i = 1; i <= max; i ++ ) + { + childnode = xmlNewChild(rootnode,NULL,(const xmlChar*) "stream", NULL ); + tag_writeStream( sampleFile, i, childnode, font ); + } + + xmlSaveFormatFileEnc( sampleFile, doc, encoding, 1 ); + xmlFreeDoc(doc); + + return 1; +} +#endif diff --git a/veejay-server/libsample/sampleadm.h b/veejay-server/libsample/sampleadm.h new file mode 100644 index 00000000..daeccf37 --- /dev/null +++ b/veejay-server/libsample/sampleadm.h @@ -0,0 +1,361 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg < nelburg@sourceforge.net> + * + * 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. + */ + +#ifndef SAMPLEADM_H +#define SAMPLEADM_H +#include +#include +#include +#include +#include +#ifdef HAVE_XML2 +#include +#include +#endif +#define SAMPLE_MAX_SAMPLES 16384 /* 4096 samples at most */ + +#define SAMPLE_MAX_PARAMETERS 10 /* 10 parameters per effect at most */ +#define SAMPLE_ARG1 0 +#define SAMPLE_ARG2 1 +#define SAMPLE_ARG3 2 +#define SAMPLE_ARG4 3 +#define SAMPLE_ARG5 4 +#define SAMPLE_ARG6 5 +#define SAMPLE_ARG7 6 +#define SAMPLE_ARG8 7 +#define SAMPLE_ARG9 8 +#define SAMPLE_ARG10 9 +#ifdef HAVE_XML2 +#define XMLTAG_RENDER_ENTRY "render_entry" +#define XMLTAG_SAMPLES "veejay_samples" +#define XMLTAG_SAMPLE "sample" +#define XMLTAG_SAMPLEID "sampleid" +#define XMLTAG_SAMPLEDESCR "description" +#define XMLTAG_FIRSTFRAME "startframe" +#define XMLTAG_LASTFRAME "endframe" +#define XMLTAG_EFFECTS "effects" +#define XMLTAG_VOL "volume" +#define XMLTAG_EFFECT "effect" +#define XMLTAG_EFFECTID "effectid" +#define XMLTAG_ARGUMENTS "arguments" +#define XMLTAG_ARGUMENT "argument" +#define XMLTAG_EFFECTSOURCE "source" +#define XMLTAG_EFFECTCHANNEL "channel" +#define XMLTAG_EFFECTTRIMMER "trimmer" +#define XMLTAG_EFFECTOFFSET "offset" +#define XMLTAG_EFFECTACTIVE "active" +#define XMLTAG_EFFECTAUDIOFLAG "use_audio" +#define XMLTAG_EFFECTAUDIOVOLUME "chain_volume" +#define XMLTAG_SPEED "speed" +#define XMLTAG_FRAMEDUP "frameduplicator" +#define XMLTAG_LOOPTYPE "looptype" +#define XMLTAG_MAXLOOPS "maxloops" +#define XMLTAG_NEXTSAMPLE "nextsample" +#define XMLTAG_DEPTH "depth" +#define XMLTAG_PLAYMODE "playmode" +#define XMLTAG_VOLUME "volume" +#define XMLTAG_SUBAUDIO "subaudio" +#define XMLTAG_MARKERSTART "markerstart" +#define XMLTAG_MARKEREND "markerend" +#define XMLTAG_EFFECTPOS "position" +#define XMLTAG_FADER_ACTIVE "chain_fade" +#define XMLTAG_FADER_VAL "chain_fade_value" +#define XMLTAG_FADER_INC "chain_fade_increment" +#define XMLTAG_FADER_DIRECTION "chain_direction" +#define XMLTAG_LASTENTRY "current_entry" +#define XMLTAG_CHAIN_ENABLED "fx" +#define XMLTAG_EDIT_LIST_FILE "editlist_filename" +#define XMLTAG_BOGUSVIDEO "playlength" +#endif +#define SAMPLE_FREEZE_NONE 0 +#define SAMPLE_FREEZE_PAUSE 1 +#define SAMPLE_FREEZE_BLACK 2 + +#define SAMPLE_RENDER_START 1 +#define SAMPLE_RENDER_STOP 0 + +#define SAMPLE_MAX_DESCR_LEN 150 + +enum { + SAMPLE_LOAD = 0, + SAMPLE_RUN = 1, + SAMPLE_PEEK = 2, +}; + + + +typedef struct sample_eff_t { + int effect_id; /* effect ID */ + int e_flag; + + int arg[SAMPLE_MAX_PARAMETERS]; /* array of arguments */ + int frame_offset; + int frame_trimmer; /* sub frame scratcher */ + /* audio settings */ + int a_flag; /* audio enabled/disabled */ + int volume; /* volume of 0-100 of audio */ + int source_type; /* source type to mix with */ + int channel; /* secundary source id */ + int is_rendering; /* is rendering */ + void *kf; /* keyframe values for this entry */ + int kf_status; /* use keyframed values */ +} sample_eff_chain; + + +typedef struct sample_info_t { + int sample_id; /* identifies a unique sample */ + sample_eff_chain *effect_chain[SAMPLE_MAX_EFFECTS]; /* effect chain */ + long first_frame; /* start of sample */ + long last_frame; /* end of sample */ + char descr[SAMPLE_MAX_DESCR_LEN]; + int speed; /* playback speed */ + int looptype; /* pingpong or loop */ + int max_loops; /* max looops before going to */ + int max_loops2; /* count remaining loops */ + int next_sample_id; /* the next sample */ + int depth; /* sample effect chain render depth */ + int source; /* source or tag */ + int channel; /* which channel (which tag) */ + int playmode; /* various playmodes */ + int playmode_frame; + int sub_audio; /* mix underlying sample yes or no */ + int audio_volume; /* volume setting of this sample */ + int marker_start; + int marker_end; + int dup; /* frame duplicator */ + int dups; + int loop_dec; + int loop_periods; + int marker_speed; + int fader_active; + int fader_direction; + float fader_val; + float fader_inc; + int encoder_active; + unsigned long sequence_num; + unsigned long rec_total_bytes; + char *encoder_base; + unsigned long encoder_total_frames; + char *encoder_destination; + int encoder_format; + void *encoder; +// lav_file_t *encoder_file; + void *encoder_file; + long encoder_duration; /* in seconds */ + long encoder_num_frames; + long encoder_succes_frames; + int encoder_width; + int encoder_height; + int encoder_max_size; + int auto_switch; + int selected_entry; + int effect_toggle; + int offset; + int play_length; + editlist *edit_list; + char *edit_list_file; + int soft_edl; + void *dict; + void *kf; +} sample_info; + +#define SAMPLE_YUV420_BUFSIZE 16 +#define SAMPLE_MAX_DEPTH 4 +#define SAMPLE_DEC_BIBBER 1 +#define SAMPLE_DEC_FREEZE 2 + +extern int sample_chain_malloc(int sample_id); +extern int sample_chain_free(int sample_id); +extern int sample_size(); +extern int sample_verify(); +extern void sample_init(int len, void *font); +extern int sample_update(sample_info *sample, int s1); +#ifdef HAVE_XML2 +extern int sample_readFromFile(char *, void *ptr, void *font, void *el, int *id, int *mode); +extern int sample_writeToFile(char *, void *ptr, void *font, int id, int mode); +#endif +extern int sample_update_offset(int s1, int nframe); +extern int sample_set_state(int new_state); +extern int sample_get_state(); +extern sample_info *sample_skeleton_new(long startFrame, long endFrame); +extern sample_info *sample_get(int sample_id); +extern int sample_store(sample_info * skel); +extern int sample_is_deleted(int s1); +extern int sample_exists(int sample_id); +extern int sample_verify_delete( int sample_id, int sample_type ); +extern int sample_del(int sample_id); +extern void sample_del_all(); +extern int sample_get_startFrame(int sample_id); +extern int sample_get_endFrame(int sample_id); +extern int sample_set_marker_start(int sample_id, int marker); +extern int sample_set_marker_end(int sample_id, int marker); +extern int sample_set_startframe(int s1, long frame_num); +extern int sample_set_endframe(int s1, long frame_num); +extern int sample_set_marker(int s1, int start, int end); +extern int sample_get_longest(int sample_id); +extern int sample_get_playmode(int s1); +extern int sample_set_playmode(int s1, int playmode); +extern int sample_get_loops(int s1); +extern int sample_get_loops2(int s1); +extern int sample_get_next(int s1); +extern int sample_get_depth(int s1); +extern int sample_set_depth(int s1, int n); +extern int sample_set_speed(int s1, int speed); +extern int sample_set_framedup(int s1, int n); +extern int sample_get_framedup(int s1); +extern int sample_set_framedups(int s1, int n); +extern int sample_get_framedups(int s1); +extern int sample_marker_clear(int sample_id); +extern int sample_set_looptype(int s1, int looptype); +extern int sample_get_speed(int s1); +extern int sample_get_looptype(int s1); +extern int sample_set_loops(int s1, int nr_of_loops); +extern int sample_set_loops2(int s1, int nr); +extern int sample_set_next(int s1, int next_sample_id); +extern int sample_get_chain_source(int sample_id, int position); +extern int sample_set_chain_source(int sample_id, int position, int source); +extern int sample_get_sub_audio(int s1); +void *sample_get_kf_port( int s1, int entry ); +extern int sample_chain_set_kf_status( int s1, int entry, int status ); +extern int sample_get_kf_status( int s1, int entry ); +extern unsigned char * sample_chain_get_kfs( int s1, int entry, int parameter_id, int *len ); +extern int sample_chain_set_kf_status( int s1, int entry, int status ); +extern int sample_chain_set_kfs( int s1, int len, unsigned char *data ); +extern int sample_chain_reset_kf( int s1, int entry ); + + +extern int sample_set_sub_audio(int s1, int audio); +extern int sample_get_audio_volume(int s1); +extern int sample_set_audio_volume(int s1, int volume); +extern int sample_copy(int s1); +extern int sample_get_effect(int s1, int position); +/* get effect any, even if effect is disabled (required for informational purposes)*/ +extern int sample_get_effect_any(int s1, int position); +extern int sample_get_offset(int s1, int position); +extern int sample_get_first_mix_offset(int s1, int *parent, int look_for ); +/* trimmer is usefull for underlying samples in the effect chain. + you can manual adjust the video/audio sync of the underlying sample */ +extern int sample_get_trimmer(int s1, int position); +extern int sample_set_trimmer(int s1, int position, int trimmer); +extern int sample_get_short_info(int sample_id, int *, int *, int *, int *) ; +extern int sample_get_chain_volume(int s1, int position); + +/* set volume of audio data coming to the chain */ +extern int sample_set_chain_volume(int s1, int position, int volume); + +/* whether to mix underlying sample's audio */ +extern int sample_get_chain_audio(int s1, int position); +extern int sample_has_extra_frame(int s1, int position); +/* mix the audio from entry from the effect chain, if any */ +extern int sample_set_chain_audio(int s1, int position, int flag); + +extern int sample_set_chain_status(int s1, int position, int status); +extern int sample_get_chain_status(int s1, int position); + +extern int sample_set_offset(int s1, int position, int frame_offset); +extern int sample_get_effect_arg(int s1, int position, int argnr); +extern int sample_set_effect_arg(int s1, int position, int argnr, int value); + +extern int sample_get_all_effect_arg(int s1, int position, int *args, + int arg_len, int n_elapsed); +extern int sample_chain_remove(int s1, int position); +extern int sample_chain_clear(int s1); +extern int sample_chain_size(int s1); +extern int sample_chain_get_free_entry(int s1); +extern int sample_chain_add(int s1, int c, int effect_nr); + +/* channel depends on source , it select a channel of a certain video source */ +extern int sample_get_chain_channel(int s1, int position); +extern int sample_set_chain_channel(int s1, int position, int channel); + +//int sample_chain_replace(int s1, int position, int effect_id); + +extern int sample_chain_sprint_status(int s1,int cache,int sa,int ca, int r, int f, int m, int t,int sr, int macro,char *s ); + +extern int sample_set_render_entry(int s1, int entry); +extern int sample_get_render_entry(int s1); + +extern int sample_set_description(int sample_id, char *description); +extern int sample_get_description(int sample_id, char *description); + +extern int sample_entry_is_rendering(int sample_id, int entry); +extern int sample_entry_set_is_rendering(int sample_id, int entry, int value); +extern int sample_get_loop_dec(int s1); +extern int sample_set_loop_dec(int s1, int active); +extern int sample_apply_loop_dec(int s1, double fps); + +extern int sample_set_manual_fader(int s1, int value ); +extern int sample_apply_fader_inc(int s1); +extern int sample_set_fader_active(int s1, int nframes, int direction); +extern int sample_set_fader_val(int s1, float val); +extern int sample_get_fader_active(int s1); +extern float sample_get_fader_val(int s1); +extern float sample_get_fader_inc(int s1); +extern int sample_get_fader_direction(int s1); +extern int sample_reset_fader(int t1); + +extern int sample_reset_offset(int s1); + +extern int sample_get_effect_status(int s1); +extern int sample_get_selected_entry(int s1); + +extern int sample_set_effect_status(int s1, int status); +extern int sample_set_selected_entry(int s1, int position); + +extern int sample_set_editlist( int s1, editlist *edl ); +extern editlist *sample_get_editlist(int s1 ); +extern int sample_get_el_position( int sample_id, int *start, int *end ); + +extern void *sample_get_dict( int sample_id ); + +extern int sample_var( int s1, int *type, int *fader, int *fx, int *rec, int *active ); + +extern void sample_set_project(int fmt, int deinterlace, int flags, int force, char norm ); + +extern int sample_video_length( int s1 ); +extern int sample_usable_edl( int s1 ); + +extern int sample_cache_used( int s1 ); +extern void sample_free(); + +extern int sample_stop_playing(int s1, int new_s1); +extern int sample_start_playing(int s1, int no_cache); +extern int sample_get_kf_tokens( int s1, int entry, int id, int *start,int *end, int *type); +extern unsigned char *UTF8toLAT1(unsigned char *in); +extern int sample_read_edl( sample_info *sample ); + +extern int sample_max_video_length(int s1); + + +#ifdef HAVE_XML2 +extern void CreateSample(xmlNodePtr node, sample_info * sample, void *font); +extern void CreateEffects(xmlNodePtr node, sample_eff_chain ** effects); +extern void CreateEffect(xmlNodePtr node, sample_eff_chain * effect, int pos); +extern void CreateArguments(xmlNodePtr node, int *arg, int argcount); +extern void CreateKeys(xmlNodePtr node, int argcount, void *port ); +extern xmlNodePtr ParseSample(xmlDocPtr doc, xmlNodePtr cur, sample_info * skel, void *el, void *font, int start_at); +extern void ParseEffects(xmlDocPtr doc, xmlNodePtr cur, sample_info * skel, int start_at); +extern void ParseEffect(xmlDocPtr doc, xmlNodePtr cur, int dst_sample, int start_at); +extern void ParseArguments(xmlDocPtr doc, xmlNodePtr cur, int *arg ); +extern void ParseKEys(xmlDocPtr doc, xmlNodePtr cur, void *port); +extern unsigned char *UTF8toLAT1(unsigned char *in); +#endif + +#endif diff --git a/veejay-server/libsamplerec/Makefile.am b/veejay-server/libsamplerec/Makefile.am new file mode 100644 index 00000000..2da4b788 --- /dev/null +++ b/veejay-server/libsamplerec/Makefile.am @@ -0,0 +1,12 @@ +# Makefile for veejay + +INCLUDES = -I$(top_srcdir) -I$(includedir)\ + -I$(top_srcdir)/vjmem\ + -I$(top_srcdir)/vjmsg \ + -I$(top_srcdir)/libel \ + $(XML2_CFLAGS) \ + $(MJPEGTOOLS_CFLAGS) +AM_CFLAGS=$(OP_CFLAGS) +SAMPLEREC_LIB_FILE = libsamplerec.la +noinst_LTLIBRARIES = $(SAMPLEREC_LIB_FILE) +libsamplerec_la_SOURCES = samplerecord.c diff --git a/veejay-server/libsamplerec/Makefile.in b/veejay-server/libsamplerec/Makefile.in new file mode 100644 index 00000000..f9a96e02 --- /dev/null +++ b/veejay-server/libsamplerec/Makefile.in @@ -0,0 +1,511 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Makefile for veejay + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libsamplerec +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libsamplerec_la_LIBADD = +am_libsamplerec_la_OBJECTS = samplerecord.lo +libsamplerec_la_OBJECTS = $(am_libsamplerec_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libsamplerec_la_SOURCES) +DIST_SOURCES = $(libsamplerec_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I$(top_srcdir) -I$(includedir)\ + -I$(top_srcdir)/vjmem\ + -I$(top_srcdir)/vjmsg \ + -I$(top_srcdir)/libel \ + $(XML2_CFLAGS) \ + $(MJPEGTOOLS_CFLAGS) + +AM_CFLAGS = $(OP_CFLAGS) +SAMPLEREC_LIB_FILE = libsamplerec.la +noinst_LTLIBRARIES = $(SAMPLEREC_LIB_FILE) +libsamplerec_la_SOURCES = samplerecord.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libsamplerec/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libsamplerec/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libsamplerec.la: $(libsamplerec_la_OBJECTS) $(libsamplerec_la_DEPENDENCIES) + $(LINK) $(libsamplerec_la_OBJECTS) $(libsamplerec_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/samplerecord.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/libsamplerec/samplerecord.c b/veejay-server/libsamplerec/samplerecord.c new file mode 100644 index 00000000..7d9f4962 --- /dev/null +++ b/veejay-server/libsamplerec/samplerecord.c @@ -0,0 +1,444 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#include +#include +#include AVUTIL_INC +#include AVCODEC_INC +#include + +void sample_reset_encoder(int sample_id); +extern int sufficient_space(int max_size, int nframes); + + +static uint8_t *sample_encoder_buf; + +int sample_record_init(int len) +{ + if(len <= 0) return 0; + if(sample_encoder_buf) free(sample_encoder_buf); + sample_encoder_buf = (uint8_t*) malloc(sizeof(uint8_t) * len * 3); + if(!sample_encoder_buf) return 0; + memset(sample_encoder_buf, 0, len * 3 ); + return 1; +} + +void sample_record_free() +{ + if( sample_encoder_buf) + free(sample_encoder_buf); + sample_encoder_buf = NULL; +} + +int sample_get_encoded_file(int sample_id, char *description) +{ + sample_info *si; + si = sample_get(sample_id); + if (!si) + return -1; + sprintf(description, "%s", si->encoder_destination + ); + return 1; +} + +int sample_get_num_encoded_files(int sample_id) +{ + sample_info *si; + si = sample_get(sample_id); + if(!si) return -1; + return si->sequence_num; +} + +int sample_get_sequenced_file(int sample_id, char *descr, int num, char *ext) +{ + sample_info *si; + si = sample_get(sample_id); + if (!si) + return -1; + + + + sprintf(descr, "%s-%05d.%s", si->encoder_destination, + num, ext); + return 1; + +} + +int sample_get_encoder_format(int sample_id) +{ + sample_info *si; + si = sample_get(sample_id); + if(!si) return -1; + return si->encoder_format; +} + +int sample_try_filename(int sample_id, char *filename, int format) +{ + sample_info *si= sample_get(sample_id); + if(!si) return 0; + + if( filename == NULL ) + snprintf(si->encoder_base, 255, "Sample_%04d", sample_id); + else + snprintf(si->encoder_base,255,"%s",filename); + + + int i = 0; + int len = strlen(si->encoder_base); + for(i=0; i encoder_base[i] == 0x20 ) + si->encoder_base[i] = '_'; + } + + sprintf(si->encoder_destination, "%s-%05ld.avi", + si->encoder_base,si->sequence_num); + + char ext[5]; + switch(format) + { + case ENCODER_DVVIDEO: + sprintf(ext,"dv"); + break; + case ENCODER_QUICKTIME_MJPEG: + case ENCODER_QUICKTIME_DV: + sprintf(ext,"mov"); + break; + default: + sprintf(ext,"avi"); + break; + } + sprintf(si->encoder_destination, "%s.%s", si->encoder_base , ext); + + veejay_msg(VEEJAY_MSG_INFO, "Recording to [%s]", si->encoder_destination); + return (sample_update(si,sample_id)); +} + + +static int sample_start_encoder(sample_info *si, editlist *el, int format, long nframes) +{ + char descr[100]; + char cformat = 'Y'; + int sample_id = si->sample_id; + switch(format) + { + case ENCODER_DVVIDEO: sprintf(descr,"DV2"); cformat='d'; break; + case ENCODER_MJPEG: sprintf(descr, "MJPEG"); cformat='a'; break; + case ENCODER_YUV420: sprintf(descr, "YUV 4:2:0 YV12"); cformat='Y'; break; + case ENCODER_YUV422: sprintf(descr, "YUV 4:2:2 Planar"); cformat='P'; break; + case ENCODER_MPEG4: sprintf(descr, "MPEG4"); cformat='M'; break; + case ENCODER_DIVX: sprintf(descr, "DIVX"); cformat='D'; break; + case ENCODER_QUICKTIME_DV: + sprintf(descr, "Quicktime"); cformat = 'Q'; break; + + case ENCODER_QUICKTIME_MJPEG: + sprintf(descr, "Quicktime"); cformat = 'q'; break; + case ENCODER_LZO: + sprintf(descr, "LZO YUV"); cformat = 'L'; break; + + default: + veejay_msg(VEEJAY_MSG_ERROR, "Unsupported video codec"); + return -1; + break; + } + + si->encoder = vj_avcodec_start( el, format ); + if(!si->encoder) + return -1; + + + si->encoder_active = 1; + si->encoder_format = format; + + if(si->encoder_total_frames == 0) + { + si->encoder_duration = nframes; + si->encoder_num_frames = 0; + } + else + { + si->encoder_duration = si->encoder_duration - si->encoder_num_frames; + } + + + si->rec_total_bytes= 0; + si->encoder_succes_frames = 0; + + if(format==ENCODER_DVVIDEO) + si->encoder_max_size = ( el->video_height == 480 ? 120000: 144000); + else + switch(format) + { + case ENCODER_YUV420: + si->encoder_max_size=(el->video_height * el->video_width * 2);break; + case ENCODER_YUV422: + si->encoder_max_size = (el->video_width * el->video_height * 2);break; + case ENCODER_LZO: + si->encoder_max_size = (el->video_width * el->video_height * 3 ); break; + default: + si->encoder_max_size = ( 4 * 65535 ); + break; + } + + si->encoder_width = el->video_width; + si->encoder_height = el->video_height; + + + if( sufficient_space( si->encoder_max_size, nframes ) == 0 ) + { + vj_avcodec_close_encoder( si->encoder ); + si->encoder = NULL; + si->encoder_active = 0; + return -1; + } + + si->encoder_file = (void*)lav_open_output_file(si->encoder_destination,cformat, + el->video_width,el->video_height,el->video_inter, + el->video_fps,el->audio_bits, el->audio_chans, el->audio_rate ); + + if(!si->encoder_file) + { + veejay_msg(VEEJAY_MSG_ERROR,"Cannot write to %s (%s)",si->encoder_destination, + lav_strerror()); + vj_avcodec_close_encoder( si->encoder ); + si->encoder = NULL; + return -1; + } + + + veejay_msg(VEEJAY_MSG_INFO, "Encoding to %s file [%s] %dx%d@%2.2f %d/%d/%d %s >%09d< f=%c", + descr, + si->encoder_destination, + el->video_width, + el->video_height, + (float) el->video_fps, + el->audio_bits, + el->audio_chans, + el->audio_rate, + (el->video_inter == 1 ? "Deinterlaced" : "Interlaced"), + ( si->encoder_duration - si->encoder_total_frames), + cformat ); + + + sample_update(si,sample_id); + return 0; +} + +int sample_init_encoder(int sample_id, char *filename, int format, editlist *el, + long nframes) { + + sample_info *si; + + if(! sample_try_filename( sample_id, filename,format ) ) + { + return -1; + } + + si = sample_get(sample_id); + if(!si) + { + return -1; + } + if(format < 0 || format > 8) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid format!"); + return -1; + } + if(nframes <= 0) return -1; + if(!el) return -1; + + if(si->encoder_active) { + veejay_msg(VEEJAY_MSG_ERROR, "Sample is already encoding to [%s]", + si->encoder_destination); + return -1; + } + + if (sample_start_encoder( si , el, format, nframes ) == 0) + { + return 1; + } + + + return -1; +} + +int sample_continue_record( int s1 ) +{ + sample_info *si = sample_get(s1); + if(!si) return -1; + + if( si->rec_total_bytes == 0) return -1; + if(si->encoder_num_frames > si->encoder_duration) + { + veejay_msg(VEEJAY_MSG_WARNING, "Ready recording %d frames", si->encoder_succes_frames); + + si->encoder_total_frames = 0; + sample_update(si,s1); + return 1; + } + + if ( si->rec_total_bytes >= VEEJAY_FILE_LIMIT) + { + veejay_msg(VEEJAY_MSG_WARNING, "Auto splitting files (max filesize is %ld)", VEEJAY_FILE_LIMIT); + si->sequence_num ++; + si->rec_total_bytes = 0; + + printf(" %d %ld %ld (%ld)%ld \n", + (int)si->sequence_num, + si->rec_total_bytes, + si->encoder_num_frames, + si->encoder_total_frames, + si->encoder_duration); + + si->encoder_total_frames = 0; + sample_update(si,s1); + return 2; + } + + + return 0; +} + +int sample_record_frame(int s1, uint8_t *buffer[3], uint8_t *abuff, int audio_size) { + sample_info *si = sample_get(s1); + int buf_len = 0; + if(!si) return -1; + + if(!si->encoder_active) + { + return -1; + } + + // si->encoder_format has one of ENCODER_* + + + buf_len = vj_avcodec_encode_frame(si->encoder, si->encoder_total_frames ++, + si->encoder_format, buffer, sample_encoder_buf, si->encoder_max_size); + if(buf_len <= 0) + { + + veejay_msg(VEEJAY_MSG_ERROR, "Cannot encode frame"); + return -1; + } + if(lav_write_frame( (lav_file_t*) si->encoder_file,sample_encoder_buf,buf_len,1)) + { + veejay_msg(VEEJAY_MSG_ERROR, "writing frame, giving up %s", lav_strerror()); + return 1; + } + + si->rec_total_bytes += buf_len; + + if(audio_size > 0) + { + if(lav_write_audio( (lav_file_t*) si->encoder_file, (uint8_t*)abuff, audio_size)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error writing output audio [%s] (%d)",lav_strerror(),audio_size); + } + si->rec_total_bytes += audio_size; + } + /* write OK */ + si->encoder_succes_frames ++; + si->encoder_num_frames ++; + + sample_update(si,s1); + + return (sample_continue_record(s1)); +} + + + +int sample_stop_encoder(int s1) { + sample_info *si = sample_get(s1); + if(!si) return -1; + if(si->encoder_active) { + lav_close((lav_file_t*)si->encoder_file); + + vj_avcodec_stop( si->encoder, si->encoder_format ); + + veejay_msg(VEEJAY_MSG_INFO, "Stopped sample encoder [%s]",si->encoder_destination); + si->encoder_active = 0; + si->encoder_file = NULL; + sample_update(si,s1); + + //sample_reset_encoder(s1); + return 1; + } + return 0; +} + + +void sample_reset_encoder(int s1) { + sample_info *si = sample_get(s1); + if(!si) return; + /* added sample */ + si->encoder_active = 0; + si->encoder_format = 0; + si->encoder_succes_frames = 0; + si->encoder_num_frames = 0; + si->encoder_width = 0; + si->encoder_height = 0; + si->encoder_max_size = 0; + si->encoder_active = 0; + si->rec_total_bytes = 0; + si->encoder_duration = 0; + + sample_update(si, s1); +} + +int sample_get_encoded_frames(int s1) { + sample_info *si = sample_get(s1); + if(!si) return -1; + //return ( si->encoder_succes_frames ); + return ( si->encoder_total_frames ); +} + + +int sample_get_total_frames( int s1 ) +{ + sample_info *si = sample_get(s1); + if(!si) return -1; + return ( si->encoder_total_frames ); +} + +int sample_reset_autosplit(int s1) +{ + sample_info *si = sample_get(s1); + if(!si) return -1; + bzero( si->encoder_base, 255 ); + bzero( si->encoder_destination , 255 ); + si->encoder_total_frames = 0; + si->sequence_num = 0; + return (sample_update(si,s1)); +} + +int sample_get_frames_left(int s1) +{ + sample_info *si= sample_get(s1); + if(!si) return 0; + return ( si->encoder_duration - si->encoder_total_frames ); +} + +int sample_encoder_active(int s1) +{ + sample_info *si = sample_get(s1); + if(!si)return 0; + return si->encoder_active; +} diff --git a/veejay-server/libsamplerec/samplerecord.h b/veejay-server/libsamplerec/samplerecord.h new file mode 100644 index 00000000..bbb5f0a3 --- /dev/null +++ b/veejay-server/libsamplerec/samplerecord.h @@ -0,0 +1,41 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#ifndef SAMPLEREC_H +#define SAMPLEREC_H +#include +#include +int sample_record_init(int len); +int sample_init_encoder(int sample_id, char *filename, int format, editlist *el,long nframes); +int sample_record_frame(int s1, uint8_t *buffer[3], uint8_t *abuff, int audio_size); +int sample_get_encoder_format(int s1); +int sample_stop_encoder(int s1) ; +int sample_get_encoded_frames(int s1); +int sample_get_encoded_file(int s1, char *dst); +int sample_encoder_active(int s1); +void sample_reset_encoder(int s1); +int sample_get_frames_left(int s1); +int sample_reset_autosplit(int s1); +int sample_get_total_frames( int s1 ); +int sample_get_num_encoded_files(int sample_id); +int sample_get_sequenced_file(int sample_id, char *descr, int num, char *ext); +int sample_try_filename(int sample_id, char *filename, int format); +int sample_continue_record( int s1 ); +void sample_record_free(); + +#endif diff --git a/veejay-server/libstream/Makefile.am b/veejay-server/libstream/Makefile.am new file mode 100644 index 00000000..e3b8e7e7 --- /dev/null +++ b/veejay-server/libstream/Makefile.am @@ -0,0 +1,12 @@ +# Makefile for veejay +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem \ + -I$(top_srcdir)/vjmsg \ + -I$(top_srcdir)/libvjnet/ \ + -I$(top_srcdir)/libhash \ + $(XML2_CFLAGS) \ + $(MJPEGTOOLS_CFLAGS) $(FFMPEG_CFLAGS) $(PTHREAD_CFLAGS) $(UNICAP_CFLAGS) +STREAM_LIB_FILE = libstream.la +noinst_LTLIBRARIES = $(STREAM_LIB_FILE) +libstream_la_SOURCES = vj-unicap.c vj-yuv4mpeg.c vj-net.c vj-dv1394.c vj-vloopback.c vj-tag.c diff --git a/veejay-server/libstream/Makefile.in b/veejay-server/libstream/Makefile.in new file mode 100644 index 00000000..6874045b --- /dev/null +++ b/veejay-server/libstream/Makefile.in @@ -0,0 +1,519 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libstream +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libstream_la_LIBADD = +am_libstream_la_OBJECTS = vj-unicap.lo vj-yuv4mpeg.lo vj-net.lo \ + vj-dv1394.lo vj-vloopback.lo vj-tag.lo +libstream_la_OBJECTS = $(am_libstream_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libstream_la_SOURCES) +DIST_SOURCES = $(libstream_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Makefile for veejay +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem \ + -I$(top_srcdir)/vjmsg \ + -I$(top_srcdir)/libvjnet/ \ + -I$(top_srcdir)/libhash \ + $(XML2_CFLAGS) \ + $(MJPEGTOOLS_CFLAGS) $(FFMPEG_CFLAGS) $(PTHREAD_CFLAGS) $(UNICAP_CFLAGS) + +STREAM_LIB_FILE = libstream.la +noinst_LTLIBRARIES = $(STREAM_LIB_FILE) +libstream_la_SOURCES = vj-unicap.c vj-yuv4mpeg.c vj-net.c vj-dv1394.c vj-vloopback.c vj-tag.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libstream/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libstream/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libstream.la: $(libstream_la_OBJECTS) $(libstream_la_DEPENDENCIES) + $(LINK) $(libstream_la_OBJECTS) $(libstream_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-dv1394.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-net.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-tag.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-unicap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-vloopback.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-yuv4mpeg.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/veejay-server/libstream/dv1394.h b/veejay-server/libstream/dv1394.h new file mode 100644 index 00000000..f928e4d5 --- /dev/null +++ b/veejay-server/libstream/dv1394.h @@ -0,0 +1,258 @@ +/* + * dv1394.h - DV input/output over IEEE 1394 on OHCI chips + * Copyright (C)2001 Daniel Maas + * receive, proc_fs by Dan Dennedy + * + * based on: + * video1394.h - driver for OHCI 1394 boards + * Copyright (C)1999,2000 Sebastien Rougeaux + * Peter Schlaile + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser 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. + */ + +#ifndef _DV_1394_H +#define _DV_1394_H + +#include +#include + +/* This is the public user-space interface. Try not to break it. */ + +#define DV1394_API_VERSION 0x20011127 + +/* ******************** + ** ** + ** DV1394 API ** + ** ** + ******************** + + There are two methods of operating the DV1394 DV output device. + + 1) + + The simplest is an interface based on write(): simply write + full DV frames of data to the device, and they will be transmitted + as quickly as possible. The FD may be set for non-blocking I/O, + in which case you can use select() or poll() to wait for output + buffer space. + + To set the DV output parameters (e.g. whether you want NTSC or PAL + video), use the DV1394_INIT ioctl, passing in the parameters you + want in a struct dv1394_init. + + Example 1: + To play a raw .DV file: cat foo.DV > /dev/dv1394 + (cat will use write() internally) + + Example 2: + static struct dv1394_init init = { + 0x63, (broadcast channel) + 4, (four-frame ringbuffer) + DV1394_NTSC, (send NTSC video) + 0, 0 (default empty packet rate) + } + + ioctl(fd, DV1394_INIT, &init); + + while(1) { + read( , buf, DV1394_NTSC_FRAME_SIZE ); + write( , buf, DV1394_NTSC_FRAME_SIZE ); + } + + 2) + + For more control over buffering, and to avoid unnecessary copies + of the DV data, you can use the more sophisticated the mmap() interface. + First, call the DV1394_INIT ioctl to specify your parameters, + including the number of frames in the ringbuffer. Then, calling mmap() + on the dv1394 device will give you direct access to the ringbuffer + from which the DV card reads your frame data. + + The ringbuffer is simply one large, contiguous region of memory + containing two or more frames of packed DV data. Each frame of DV data + is 120000 bytes (NTSC) or 144000 bytes (PAL). + + Fill one or more frames in the ringbuffer, then use the DV1394_SUBMIT_FRAMES + ioctl to begin I/O. You can use either the DV1394_WAIT_FRAMES ioctl + or select()/poll() to wait until the frames are transmitted. Next, you'll + need to call the DV1394_GET_STATUS ioctl to determine which ringbuffer + frames are clear (ready to be filled with new DV data). Finally, use + DV1394_SUBMIT_FRAMES again to send the new data to the DV output. + + + Example: here is what a four-frame ringbuffer might look like + during DV transmission: + + + frame 0 frame 1 frame 2 frame 3 + + *--------------------------------------* + | CLEAR | DV data | DV data | CLEAR | + *--------------------------------------* + + + transmission goes in this direction --->>> + + + The DV hardware is currently transmitting the data in frame 1. + Once frame 1 is finished, it will automatically transmit frame 2. + (if frame 2 finishes before frame 3 is submitted, the device + will continue to transmit frame 2, and will increase the dropped_frames + counter each time it repeats the transmission). + + + If you called DV1394_GET_STATUS at this instant, you would + receive the following values: + + n_frames = 4 + active_frame = 1 + first_clear_frame = 3 + n_clear_frames = 2 + + At this point, you should write new DV data into frame 3 and optionally + frame 0. Then call DV1394_SUBMIT_FRAMES to inform the device that + it may transmit the new frames. + +*/ + + +/* maximum number of frames in the ringbuffer */ +#define DV1394_MAX_FRAMES 32 + +/* number of *full* isochronous packets per DV frame */ +#define DV1394_NTSC_PACKETS_PER_FRAME 250 +#define DV1394_PAL_PACKETS_PER_FRAME 300 + +/* size of one frame's worth of DV data, in bytes */ +#define DV1394_NTSC_FRAME_SIZE (480 * DV1394_NTSC_PACKETS_PER_FRAME) +#define DV1394_PAL_FRAME_SIZE (480 * DV1394_PAL_PACKETS_PER_FRAME) + + +enum pal_or_ntsc { + DV1394_NTSC = 0, + DV1394_PAL +}; + + +/* this is the argument to DV1394_INIT */ +struct dv1394_init { + /* DV1394_API_VERSION */ + unsigned int api_version; + + /* isochronous transmission channel to use */ + unsigned int channel; + + /* number of frames in the ringbuffer. Must be at least 2 + and at most DV1394_MAX_FRAMES. */ + unsigned int n_frames; + + /* send/receive PAL or NTSC video format */ + enum pal_or_ntsc format; + + /* the following are used only for transmission */ + + /* set these to zero unless you want a + non-default empty packet rate (see below) */ + unsigned long cip_n; + unsigned long cip_d; + + /* set this to zero unless you want a + non-default SYT cycle offset (default = 3 cycles) */ + unsigned int syt_offset; +}; + +/* Q: What are cip_n and cip_d? */ + +/* + A: DV video streams do not utilize 100% of the potential bandwidth offered + by IEEE 1394 (FireWire). To achieve the correct rate of data transmission, + DV devices must periodically insert empty packets into the 1394 data stream. + Typically there is one empty packet per 14-16 data-carrying packets. + + Some DV devices will accept a wide range of empty packet rates, while others + require a precise rate. If the dv1394 driver produces empty packets at + a rate that your device does not accept, you may see ugly patterns on the + DV output, or even no output at all. + + The default empty packet insertion rate seems to work for many people; if + your DV output is stable, you can simply ignore this discussion. However, + we have exposed the empty packet rate as a parameter to support devices that + do not work with the default rate. + + The decision to insert an empty packet is made with a numerator/denominator + algorithm. Empty packets are produced at an average rate of CIP_N / CIP_D. + You can alter the empty packet rate by passing non-zero values for cip_n + and cip_d to the INIT ioctl. + + */ + +struct dv1394_status { + /* this embedded init struct returns the current dv1394 + parameters in use */ + struct dv1394_init init; + + /* the ringbuffer frame that is currently being + displayed. (-1 if the device is not transmitting anything) */ + int active_frame; + + /* index of the first buffer (ahead of active_frame) that + is ready to be filled with data */ + unsigned int first_clear_frame; + + /* how many buffers, including first_clear_buffer, are + ready to be filled with data */ + unsigned int n_clear_frames; + + /* how many times the DV output has underflowed + since the last call to DV1394_GET_STATUS */ + unsigned int dropped_frames; + + /* N.B. The dropped_frames counter is only a lower bound on the actual + number of dropped frames, with the special case that if dropped_frames + is zero, then it is guaranteed that NO frames have been dropped + since the last call to DV1394_GET_STATUS. + */ +}; + +/* Get the driver ready to transmit video. pass a struct dv1394_init* as + * the parameter (see below), or NULL to get default parameters */ +#define DV1394_INIT _IOW('#', 0x06, struct dv1394_init) + +/* Stop transmitting video and free the ringbuffer */ +#define DV1394_SHUTDOWN _IO ('#', 0x07) + +/* Submit N new frames to be transmitted, where the index of the first new + * frame is first_clear_buffer, and the index of the last new frame is + * (first_clear_buffer + N) % n_frames */ +#define DV1394_SUBMIT_FRAMES _IO ('#', 0x08) + +/* Block until N buffers are clear (pass N as the parameter) Because we + * re-transmit the last frame on underrun, there will at most be n_frames + * - 1 clear frames at any time */ +#define DV1394_WAIT_FRAMES _IO ('#', 0x09) + +/* Capture new frames that have been received, where the index of the + * first new frame is first_clear_buffer, and the index of the last new + * frame is (first_clear_buffer + N) % n_frames */ +#define DV1394_RECEIVE_FRAMES _IO ('#', 0x0a) + +/* Tell card to start receiving DMA */ +#define DV1394_START_RECEIVE _IO ('#', 0x0b) + +/* Pass a struct dv1394_status* as the parameter */ +#define DV1394_GET_STATUS _IOR('#', 0x0c, struct dv1394_status) + +#endif /* _DV_1394_H */ diff --git a/veejay-server/libstream/vj-dv1394.c b/veejay-server/libstream/vj-dv1394.c new file mode 100644 index 00000000..d53c0fd8 --- /dev/null +++ b/veejay-server/libstream/vj-dv1394.c @@ -0,0 +1,229 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* + inspired by ffmpeg/ffmpeg/libavformat/dv1394.c + dv1394 has no audio apparently ... +*/ +#include +#include +#include +#ifdef SUPPORT_READ_DV2 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define DV_PAL_SIZE 144000 +#define DV_NTSC_SIZE 120000 + + +#define DV1394_DEFAULT_CHANNEL 63 +#define DV1394_DEFAULT_CARD 0 +#define DV1394_RING_FRAMES 10 + +static int vj_dv1394_reset(vj_dv1394 *v ) +{ + struct dv1394_init init; + init.channel = v->channel; + init.api_version = DV1394_API_VERSION; + init.n_frames = DV1394_RING_FRAMES; + init.format = v->norm; + + if( ioctl( v->handle, DV1394_INIT, &init ) < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot initialize ieee1394 device"); + return 0; + } + v->done = v->avail = 0; + return 1; +} + +static int vj_dv1394_start(vj_dv1394 *v ) +{ + /* enable receiver */ + if( ioctl( v->handle, DV1394_START_RECEIVE, 0) < 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot start receiver"); + return 0; + } + return 1; +} + +vj_dv1394 *vj_dv1394_init(void *e, int channel, int quality) +{ + editlist *el = (editlist*)e; + + if(el->video_width != 720 && ( el->video_height != 576 || el->video_height != 480) ) + { + veejay_msg(VEEJAY_MSG_ERROR, "No software scaling to %d x %d",el->video_width, + el->video_height); + return NULL; + } + + vj_dv1394 *v = (vj_dv1394*)vj_malloc(sizeof(vj_dv1394)); + + v->map_size = (el->video_norm == 'p' ? DV_PAL_SIZE: DV_NTSC_SIZE); + v->handle = -1; + v->width = el->video_width; + v->height = el->video_height; + v->norm = (el->video_norm == 'p' ? DV1394_PAL: DV1394_NTSC ); + v->handle = open( "/dev/dv1394", O_RDONLY); + v->channel = channel == -1 ? DV1394_DEFAULT_CHANNEL : channel; + v->index = 0; + v->quality = quality; + if( v->handle <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "opening /dev/dv1394'"); + if(v) free(v); + return NULL; + } + if( vj_dv1394_reset(v) <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to initialize DV interface"); + close(v->handle); + if(v) free(v); + return NULL; + } + + v->map = mmap( NULL, v->map_size * DV1394_RING_FRAMES, PROT_READ, + MAP_PRIVATE, v->handle, 0); + if(v->map == MAP_FAILED) + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to mmap dv ring buffer"); + close(v->handle); + if(v)free(v); + return NULL; + } + if( vj_dv1394_start(v) <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to start capturing"); + if(v)free(v); + close(v->handle); + return NULL; + } + + + v->decoder = (void*)vj_dv_decoder_init( v->quality,v->width,v->height, el->pixel_format ); + if(!v->decoder) + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to initailize DV decoder"); + } + + return v; +} + + +void vj_dv1394_close(vj_dv1394 *v) +{ + if(v) + { + if( ioctl( v->handle, DV1394_SHUTDOWN, 0) < 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to shutdown dv1394"); + } + if( munmap( v->map, v->map_size * DV1394_RING_FRAMES ) < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to munmap dv1394 ring buffer"); + } + close(v->handle); + if(v->decoder) + vj_dv_free_decoder( (vj_dv_decoder*) v->decoder ); + free(v); + } + +} + +int vj_dv1394_read_frame(vj_dv1394 *v, uint8_t *frame[3], uint8_t *audio, int fmt) +{ + if( !v->avail ) + { + struct dv1394_status s; + struct pollfd p; + if( v->done ) + { + /* request more frames */ + if( ioctl( v->handle, DV1394_RECEIVE_FRAMES, v->done ) < 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Ring buffer overflow,reset"); + vj_dv1394_reset( v ); + vj_dv1394_start( v ); + } + v->done = 0; + } + +restart_poll: + p.fd = v->handle; + p.events = POLLIN | POLLERR | POLLHUP; + if( poll(&p, 1, -1 ) < 0 ) + { + if( errno == EAGAIN || errno == EINTR ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Waiting for DV"); + goto restart_poll; + } + veejay_msg(VEEJAY_MSG_ERROR, "Poll failed"); + return 0; + } + + if( ioctl( v->handle, DV1394_GET_STATUS, &s ) < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to get status"); + return 0; + } + s.active_frame, s.first_clear_frame, + + v->avail = s.n_clear_frames; + v->index = s.first_clear_frame; + v->done = 0; + + if( s.dropped_frames ) + { + veejay_msg(VEEJAY_MSG_ERROR, "dv1394: frame drop detected %d", + s.dropped_frames); + // vj_dv1394_reset( v ); + // vj_dv1394_start( v ); + } + } + + if(!vj_dv_decode_frame( + (vj_dv_decoder*) v->decoder, + v->map + (v->index * v->map_size), + frame[0],frame[1],frame[2], + v->width, + v->height, fmt )) + { + veejay_msg(VEEJAY_MSG_ERROR, "decoding DV frame"); + return 0; + } + + v->index = (v->index + 1) % DV1394_RING_FRAMES; + v->done ++ ; + v->avail --; + + return 1; +} +#endif diff --git a/veejay-server/libstream/vj-dv1394.h b/veejay-server/libstream/vj-dv1394.h new file mode 100644 index 00000000..c63d5ce8 --- /dev/null +++ b/veejay-server/libstream/vj-dv1394.h @@ -0,0 +1,46 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef VJDV1394 +#define VJDV1394 + + +typedef struct +{ + int handle; + int map_size; + uint8_t *map; + int width; + int height; + int channel; + int norm; + int avail; + int done; + int index; + int quality; + void *decoder; +} vj_dv1394; + +vj_dv1394* vj_dv1394_init(void *el, int channel_nr, int quality); + +void vj_dv1394_close( vj_dv1394 *v ); + +int vj_dv1394_read_frame( vj_dv1394 *v, uint8_t *frame[3] , uint8_t *audio, int fmt ); + +#endif diff --git a/veejay-server/libstream/vj-net.c b/veejay-server/libstream/vj-net.c new file mode 100644 index 00000000..097859f8 --- /dev/null +++ b/veejay-server/libstream/vj-net.c @@ -0,0 +1,383 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2006 Niels Elburg + * + * 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 + */ + +#define THREAD_START 0 +#define THREAD_STOP 1 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define _POSIX_C_SOURCE 199309 +#include + + +#ifdef STRICT_CHECKING +#include +#endif +typedef struct +{ + pthread_mutex_t mutex; + pthread_t thread; + vj_client *remote; + int state; + int have_frame; + int error; + int grab; + int repeat; +} threaded_t; + +static void lock_(threaded_t *t, const char *f, int line) +{ +// veejay_msg(0,"lock thread by %s, line %d",f,line); + pthread_mutex_lock( &(t->mutex )); +} + +static void unlock_(threaded_t *t, const char *f, int line) +{ +// veejay_msg(0,"unlock thread by %s, line %d",f,line); + pthread_mutex_unlock( &(t->mutex )); +} + +#define lock( t ) lock_( t, __FUNCTION__, __LINE__ ) +#define unlock( t ) unlock_( t, __FUNCTION__ , __LINE__ ) + +#define MS_TO_NANO(a) (a *= 1000000) +static void net_delay(long nsec ) +{ + struct timespec ts; + ts.tv_sec = 0; + ts.tv_nsec = MS_TO_NANO( nsec); + nanosleep( &ts, NULL ); +} + + +void *reader_thread(void *data) +{ + vj_tag *tag = (vj_tag*) data; + threaded_t *t = tag->priv; + vj_client *v = t->remote; + int ret = 0; + char buf[16]; +#ifdef STRICT_CHECKING + assert( v != NULL ); +#endif + + sprintf(buf, "%03d:;", VIMS_GET_FRAME); + + int retrieve = 0; + for( ;; ) + { + int error = 0; + + if( t->state == 0 ) + { + error = 1; + } + + lock(t); + + if( t->grab && tag->source_type == VJ_TAG_TYPE_NET && retrieve== 0) + { + ret = vj_client_poll_w(v , V_CMD ); + if( ret ) + { + ret = vj_client_send( v, V_CMD, buf ); + if( ret <= 0 ) + { + error = 1; + } + else + { + t->grab = 0; + retrieve = 1; + } + } + } + + if (tag->source_type == VJ_TAG_TYPE_MCAST ) + { + error = 0; + retrieve = 1; + } + + long wait_time = 20; + + if(!error && retrieve) + { + if( vj_client_poll(v, V_CMD ) ) + { + ret = vj_client_read_i ( v, tag->socket_frame,tag->socket_len ); + if( ret <= 0 ) + { + if( tag->source_type == VJ_TAG_TYPE_NET ) + { + error = 1; + } + else + { + wait_time += 10; + } + ret = 0; + } + else + { + t->have_frame = ret; + t->grab = 1; + retrieve =0; + } + } + else + { + if(tag->source_type == VJ_TAG_TYPE_MCAST ) + wait_time = 25; + } + } + unlock(t); + + if( wait_time ) + { + if ( wait_time > 40 ) + wait_time = 25; + net_delay( wait_time ); + // usleep(wait_time); + } + + if( error ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Closing connection with remote veejay,"); + t->state = 0; + t->grab = 0; + pthread_exit( &(t->thread)); + return NULL; + } + } + return NULL; +} + + + +void *net_threader( ) +{ + threaded_t *t = (threaded_t*) vj_calloc(sizeof(threaded_t)); + return (void*) t; +} + +int net_thread_get_frame( vj_tag *tag, uint8_t *buffer[3] ) +{ + threaded_t *t = (threaded_t*) tag->priv; + vj_client *v = t->remote; + const uint8_t *buf = tag->socket_frame; + + lock(t); + if( t->state == 0 || t->error ) + { + if(t->repeat < 0) + veejay_msg(VEEJAY_MSG_INFO, "Connection closed with remote host"); + t->repeat++; + unlock(t); + return 0; + } + + //@ color space convert frame + int len = v->cur_width * v->cur_height; + int uv_len = len; + switch(v->cur_fmt) + { + case FMT_420: + case FMT_420F: + uv_len=len/4; + break; + default: + uv_len=len/2; + break; + } + + if(t->have_frame == 1 ) + { + veejay_memcpy(buffer[0], tag->socket_frame, len ); + veejay_memcpy(buffer[1], tag->socket_frame+len, uv_len ); + veejay_memcpy(buffer[2], tag->socket_frame+len+uv_len, uv_len ); + t->grab = 1; + unlock(t); + return 1; + } + else if(t->have_frame == 2 ) + { + int b_len = v->in_width * v->in_height; + int buvlen = b_len; + switch(v->in_fmt) + { + case FMT_420: + case FMT_420F: + buvlen = b_len/4; + break; + default: + buvlen = b_len/2; + break; + } + + VJFrame *a = yuv_yuv_template( tag->socket_frame, tag->socket_frame + b_len, tag->socket_frame+b_len+buvlen, + v->in_width,v->in_height, get_ffmpeg_pixfmt( v->in_fmt )); + VJFrame *b = yuv_yuv_template( buffer[0],buffer[1], buffer[2], + v->cur_width,v->cur_height,get_ffmpeg_pixfmt(v->cur_fmt)); + yuv_convert_any_ac(a,b, a->format,b->format ); + free(a); + free(b); + } + t->grab = 1; + + unlock(t); + return 1; +} + +int net_thread_start(vj_client *v, vj_tag *tag) +{ + int success = 0; + int res = 0; + + if(tag->source_type == VJ_TAG_TYPE_MCAST ) + success = vj_client_connect( v,NULL,tag->source_name,tag->video_channel ); + else + success = vj_client_connect_dat( v, tag->source_name,tag->video_channel ); + + if( success <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to establish connection with %s on port %d", + tag->source_name, tag->video_channel + 5); + return 0; + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Connecton established with %s:%d",tag->source_name, + tag->video_channel + 5); + } + + threaded_t *t = (threaded_t*)tag->priv; + + pthread_mutex_init( &(t->mutex), NULL ); + v->lzo = lzo_new(); + t->repeat = 0; + t->have_frame = 0; + t->error = 0; + t->state = 1; + t->remote = v; + t->grab = 1; + if( tag->source_type == VJ_TAG_TYPE_MCAST ) + { + char start_mcast[6]; + sprintf(start_mcast, "%03d:;", VIMS_VIDEO_MCAST_START); + + veejay_msg(VEEJAY_MSG_DEBUG, "Request mcast stream from %s port %d", + tag->source_name, tag->video_channel); + + res = vj_client_send( v, V_CMD, start_mcast ); + if( res <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to send to %s port %d", + tag->source_name, tag->video_channel ); + return 0; + } + else + veejay_msg(VEEJAY_MSG_INFO, "Requested mcast stream from Veejay group %s port %d", + tag->source_name, tag->video_channel ); + } + int p_err = pthread_create( &(t->thread), NULL, &reader_thread, (void*) tag ); + if( p_err ==0) + + { + veejay_msg(VEEJAY_MSG_INFO, "Created new %s threaded stream with Veejay host %s port %d", + tag->source_type == VJ_TAG_TYPE_MCAST ? + "multicast" : "unicast", tag->source_name,tag->video_channel); + return 1; + } + + return 0; +} + +void net_thread_stop(vj_tag *tag) +{ + char mcast_stop[6]; + threaded_t *t = (threaded_t*)tag->priv; + int ret = 0; + lock(t); + + if(tag->source_type == VJ_TAG_TYPE_MCAST) + { + sprintf(mcast_stop, "%03d:;", VIMS_VIDEO_MCAST_STOP ); + ret = vj_client_send( t->remote , V_CMD, mcast_stop); + if(ret) + veejay_msg(VEEJAY_MSG_INFO, "Stopped multicast stream"); + } + if(tag->source_type == VJ_TAG_TYPE_NET) + { + sprintf(mcast_stop, "%03d:;", VIMS_CLOSE ); + ret = vj_client_send( t->remote, V_CMD, mcast_stop); + if(ret) + veejay_msg(VEEJAY_MSG_INFO, "Stopped unicast stream"); + } + + t->state = 0; + + unlock(t); + + pthread_mutex_destroy( &(t->mutex)); + + veejay_msg(VEEJAY_MSG_INFO, "Disconnected from Veejay host %s:%d", tag->source_name, + tag->video_channel); +} + +int net_already_opened(const char *filename, int n, int channel) +{ + char sourcename[255]; + int i; + for (i = 1; i < n; i++) + { + if (vj_tag_exists(i) ) + { + vj_tag_get_source_name(i, sourcename); + if (strcasecmp(sourcename, filename) == 0) + { + vj_tag *tt = vj_tag_get( i ); + if( tt->source_type == VJ_TAG_TYPE_NET || tt->source_type == VJ_TAG_TYPE_MCAST ) + { + if( tt->video_channel == channel ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Already streaming from %s:%p in stream %d", + filename,channel, tt->id); + return 1; + } + } + } + } + } + return 0; +} + + + diff --git a/veejay-server/libstream/vj-net.h b/veejay-server/libstream/vj-net.h new file mode 100644 index 00000000..96a9cae1 --- /dev/null +++ b/veejay-server/libstream/vj-net.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2006 Niels Elburg + * + * 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 + */ + +#ifndef NETINSTR_HH +#define NETINSTR_HH + +int net_already_opened(const char *filname, int n, int chan); +void net_thread_stop(vj_tag *tag); +int net_thread_start(vj_client *v, vj_tag *tag); +void net_thread_remote(void *priv, void *p ); +int net_thread_get_frame( vj_tag *tag, uint8_t *buffer[3]); + +void net_thread_exit(vj_tag *tag); +void *net_threader( ); + +#endif diff --git a/veejay-server/libstream/vj-tag.c b/veejay-server/libstream/vj-tag.c new file mode 100644 index 00000000..9805530b --- /dev/null +++ b/veejay-server/libstream/vj-tag.c @@ -0,0 +1,3003 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif +#define VIDEO_PALETTE_YUV420P 15 +#define VIDEO_PALETTE_YUV422P 13 + +#ifdef USE_GDK_PIXBUF +#include +#endif + +#ifdef SUPPORT_READ_DV2 +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_UNICAP +#include +#endif +#include +#include +#ifdef HAVE_FREETYPE +#include +#endif + +static veejay_t *_tag_info = NULL; +static hash_t *TagHash = NULL; +static int this_tag_id = 0; +static vj_tag_data *vj_tag_input; +static int next_avail_tag = 0; +static int avail_tag[SAMPLE_MAX_SAMPLES]; +static int last_added_tag = 0; +static void *unicap_data_= NULL; +//forward decl + +int _vj_tag_new_net(vj_tag *tag, int stream_nr, int w, int h,int f, char *host, int port, int p, int ty ); +int _vj_tag_new_yuv4mpeg(vj_tag * tag, int stream_nr, editlist * el); + +extern void dummy_rgb_apply(VJFrame *frame, int width, int height, int r, int g, int b); +extern int sufficient_space(int max_size, int nframes); +extern unsigned char *UTF8toLAT1(unsigned char *in); + + +static uint8_t *_temp_buffer[3]={NULL,NULL,NULL}; +static uint8_t *tag_encoder_buf = NULL; +static VJFrame _tmp; +void vj_tag_free(void) +{ + int i; + for( i = 0; i < 3 ; i ++ ) + { + if( _temp_buffer[i] ) + free( _temp_buffer[i] ); + _temp_buffer[i] = NULL; + } + + vj_tag_close_all(); + + if( vj_tag_input) + free(vj_tag_input); + + if( tag_encoder_buf ) + free( tag_encoder_buf ); +#ifdef HAVE_UNICAP + vj_unicap_deinit(unicap_data_); +#endif +} + + + + +int vj_tag_get_last_tag() { + return last_added_tag; +} + +int vj_tag_true_size() +{ + return (this_tag_id - next_avail_tag); +} + + +int vj_tag_size() +{ + return this_tag_id; +} + +void vj_tag_set_veejay_t(void *info) { + _tag_info = (veejay_t*)info; +} + +static hash_val_t int_tag_hash(const void *key) +{ + return (hash_val_t) key; +} + +static int int_tag_compare(const void *key1, const void *key2) +{ + return ((int) key1 < (int) key2 ? -1 : + ((int) key1 > (int) key2 ? +1 : 0) + ); + +} + +vj_tag *vj_tag_get(int id) +{ + if (id <= 0 || id > this_tag_id) { + return NULL; + } + hnode_t *tag_node = hash_lookup(TagHash, (void *) id); + if (!tag_node) { + return NULL; + } + return (vj_tag *) hnode_get(tag_node); +} + +int vj_tag_put(vj_tag * tag) +{ + hnode_t *tag_node; + if (!tag) + return 0; + tag_node = hnode_create(tag); + if (!tag_node) + return 0; + + + if (!vj_tag_exists(tag->id)) { + hash_insert(TagHash, tag_node, (void *) tag->id); + } else { + hnode_put(tag_node, (void *) tag->id); + hnode_destroy(tag_node); + + } + return 1; +} + +static int vj_tag_update(vj_tag *tag, int id) { + if(tag) { + hnode_t *tag_node = hnode_create(tag); + if(!tag_node) return -1; + hnode_put(tag_node, (void*) id); + hnode_destroy(tag_node); + return 1; + } + return -1; +} + +int vj_tag_num_devices() +{ +#ifdef HAVE_UNICAP + return vj_unicap_num_capture_devices( unicap_data_ ); +#else + return 0; +#endif +} + +char *vj_tag_scan_devices( void ) +{ + const char *default_str = "000000"; + int num = 0; + int i; + int len = 6; +#ifdef HAVE_UNICAP + char **device_list = vj_unicap_get_devices(unicap_data_, &num); + if(!device_list) + return strdup(default_str); + + for( i = 0; device_list[i] != NULL ;i++ ) + len += strlen( device_list[i] ); + + char *n = (char*) vj_calloc(sizeof(char) * (len+1) ); + char *p = n + 6; + + sprintf(n, "%06d", (len-6) ); + for( i = 0; device_list[i] != NULL ;i++ ) + { + int str_len = strlen(device_list[i]); + veejay_memcpy( p, device_list[i], str_len); + p += str_len; + free(device_list[i]); + } + free(device_list); + return n; +#else + return strdup(default_str); +#endif +} + +int vj_tag_init(int width, int height, int pix_fmt) +{ + int i; + TagHash = hash_create(HASHCOUNT_T_MAX, int_tag_compare, int_tag_hash); + if (!TagHash || width <= 0 || height <= 0) + return -1; + vj_tag_input = (vj_tag_data *) vj_malloc(sizeof(vj_tag_data)); + if (vj_tag_input == NULL) { + veejay_msg(VEEJAY_MSG_ERROR, + "Error Allocating Memory for stream data\n"); + return -1; + } + this_tag_id = 0; + vj_tag_input->width = width; + vj_tag_input->height = height; + vj_tag_input->depth = 3; + vj_tag_input->pix_fmt = pix_fmt; + + + if( pix_fmt == FMT_420|| pix_fmt == FMT_420F) + vj_tag_input->uv_len = (width*height) / 4; + else + vj_tag_input->uv_len = (width*height) / 2; + + memset( &_tmp, 0, sizeof(VJFrame)); + _tmp.len = width * height; +#ifdef HAVE_UNICAP + unicap_data_= (void*) vj_unicap_init(); +#endif + _temp_buffer[0] = (uint8_t*) vj_malloc(sizeof(uint8_t)*width*height); + _temp_buffer[1] = (uint8_t*) vj_malloc(sizeof(uint8_t)*width*height); + _temp_buffer[2] = (uint8_t*) vj_malloc(sizeof(uint8_t)*width*height); + + + if( pix_fmt == FMT_422 || pix_fmt == FMT_422F ) + { + _tmp.uv_width = width; + _tmp.uv_height = height/2; + _tmp.uv_len = width * (height/2); + } + else + { + _tmp.uv_width = width / 2; + _tmp.uv_height= height / 2; + _tmp.uv_len = (width * height)/4; + } + + for(i=0; i < SAMPLE_MAX_SAMPLES; i++) { + avail_tag[i] = 0; + } + return 0; +} + +void vj_tag_record_init(int w, int h) +{ + if(tag_encoder_buf) free(tag_encoder_buf); + tag_encoder_buf = NULL; + tag_encoder_buf = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 3); + if(!tag_encoder_buf) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Error allocating memory for stream recorder\n"); + return; + } + memset( tag_encoder_buf, 0 , (w*h) ); +} + + + +int _vj_tag_new_net(vj_tag *tag, int stream_nr, int w, int h,int f, char *host, int port, int p, int type ) +{ + vj_client *v; + if( !host ) { + veejay_msg(0, "No hostname given"); + return 0; + } + if( port <= 0 ) { + veejay_msg(0, "Port number %d invalid", port ); + return 0; + } + if(stream_nr < 0 || stream_nr > VJ_TAG_MAX_STREAM_IN) + { + veejay_msg(0, "Unable to create more network streams (%d reached)", + VJ_TAG_MAX_STREAM_IN ); + return 0; + } + + vj_tag_input->net[stream_nr] = vj_client_alloc(w,h,f); + v = vj_tag_input->net[stream_nr]; + if(!v) + { + veejay_msg(0, "Memory allocation error while creating network stream"); + return 0; + } + char tmp[255]; + bzero(tmp,255); + snprintf(tmp,sizeof(tmp)-1, "%s %d", host, port ); + tag->extra = (void*) strdup(tmp); + + v->planes[0] = w * h; + int fmt= vj_tag_input->pix_fmt; + if( fmt == FMT_420 || fmt == FMT_420F ) + { + v->planes[1] = v->planes[0] / 4; + v->planes[2] = v->planes[0] / 4; + } + else + { + v->planes[1] = v->planes[0] / 2; + v->planes[2] = v->planes[0] / 2; + } + if( tag->socket_ready == 0 ) + { + tag->socket_frame = (uint8_t*) vj_calloc(sizeof(uint8_t) * SOCKETFRAMELEN); + tag->socket_len = SOCKETFRAMELEN; + if(!tag->socket_frame) + { + veejay_msg(VEEJAY_MSG_ERROR, "Insufficient error to allocate memory for Network Stream"); + return 0; + } + tag->socket_ready = 1; + } + + return 1; +} +#ifdef HAVE_UNICAP +int _vj_tag_new_unicap( vj_tag * tag, int stream_nr, int width, int height, + int norm, int palette, int freq, int channel) +{ + char refname[100]; + veejay_msg(VEEJAY_MSG_DEBUG, "%s: %dx%d, channel=%d, stream id=%d",__FUNCTION__,width,height, channel,stream_nr ); + if (stream_nr < 0 || stream_nr > vj_tag_num_devices()) + { + return 0; + } + vj_tag_input->unicap[stream_nr] = + vj_unicap_new_device( unicap_data_, freq ); + if(!vj_tag_input->unicap[stream_nr] ) + { + veejay_msg(0,"Unable to open device %d", channel); + return 0; + } + + if(!vj_unicap_configure_device( vj_tag_input->unicap[stream_nr] , + palette, width,height)) + { + veejay_msg(0,"Unable to configure device %d",channel); + vj_unicap_free_device( unicap_data_,vj_tag_input->unicap[stream_nr] ); + return 0; + } + else + veejay_msg(VEEJAY_MSG_DEBUG, "Configured device %d", channel); + sprintf(refname, "%d",channel ); + tag->extra = strdup(refname); + + + char **props = vj_unicap_get_list( + vj_tag_input->unicap[stream_nr] ); + int i; + double v = 0.0; + for( i = 0; props[i] != NULL ; i ++ ) + { + if(strncasecmp("video norm", props[i],10 ) == 0 ) + { + if( norm == 'p' || norm == 'P' ) + vj_unicap_select_value( vj_tag_input->unicap[tag->index], + UNICAP_PAL,0); + else + vj_unicap_select_value( vj_tag_input->unicap[tag->index], + UNICAP_NTSC,0 ); + } + else if (strncasecmp( "video source", props[i], 12 ) == 0 ) + { + int cha = channel + UNICAP_SOURCE0; + if(cha <=UNICAP_SOURCE4) + vj_unicap_select_value( vj_tag_input->unicap[tag->index], + cha,0 ); + } + free(props[i]); + } + free(props); + + //set channel + + return 1; +} +#endif +#ifdef USE_GDK_PIXBUF +int _vj_tag_new_picture( vj_tag *tag, int stream_nr, editlist *el) +{ + int stop = 0; + if(stream_nr < 0 || stream_nr > VJ_TAG_MAX_STREAM_IN) return 0; + vj_picture *p = NULL; + + if( vj_picture_probe( tag->source_name ) == 0 ) + return 0; + + p = (vj_picture*) vj_malloc(sizeof(vj_picture)); + if(!p) + return 0; + memset(p, 0, sizeof(vj_picture)); + + vj_tag_input->picture[stream_nr] = p; + + veejay_msg(VEEJAY_MSG_INFO, "Opened [%s] , %d x %d @ %2.2f fps ", + tag->source_name, + el->video_width, el->video_height, el->video_fps ); + + return 1; +} +#endif + +int _vj_tag_new_yuv4mpeg(vj_tag * tag, int stream_nr, editlist * el) +{ + if (stream_nr < 0 || stream_nr > VJ_TAG_MAX_STREAM_IN) + return 0; + vj_tag_input->stream[stream_nr] = vj_yuv4mpeg_alloc(el,el->video_width,el->video_height); + + if(vj_tag_input->stream[stream_nr] == NULL) + return 0; + + if(vj_yuv_stream_start_read(vj_tag_input->stream[stream_nr],tag->source_name, + el->video_width, el->video_height) != 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"Unable to read from %s",tag->source_name); + vj_yuv4mpeg_free( vj_tag_input->stream[stream_nr] ); + return 0; + } + return 1; +} +#ifdef SUPPORT_READ_DV2 +int _vj_tag_new_dv1394(vj_tag *tag, int stream_nr, int channel,int quality, editlist *el) +{ + vj_tag_input->dv1394[stream_nr] = vj_dv1394_init( (void*) el, channel,quality); + if(vj_tag_input->dv1394[stream_nr]) + { + veejay_msg(VEEJAY_MSG_INFO, "DV1394 ready for capture"); +// vj_dv_decoder_set_audio( vj_tag_input->dv1394[stream_nr], el->has_audio); + return 1; + } + return 0; +} +#endif + +void *vj_tag_get_dict( int t1 ) +{ +#ifdef HAVE_FREETYPE + vj_tag *tag = vj_tag_get(t1); + if(tag) + return tag->dict; +#endif + return NULL; +} + +int vj_tag_set_stream_color(int t1, int r, int g, int b) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) + return 0; + if(tag->source_type != VJ_TAG_TYPE_COLOR) + return 0; + + veejay_msg(VEEJAY_MSG_DEBUG,"Set stream %d color %d,%d,%d",t1, + r,g, b ); + + tag->color_r = r; + tag->color_g = g; + tag->color_b = b; + + return (vj_tag_update(tag,t1)); +} + +int vj_tag_get_stream_color(int t1, int *r, int *g, int *b ) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) + return 0; + if(tag->source_type != VJ_TAG_TYPE_COLOR) + return 0; + + *r = tag->color_r; + *g = tag->color_g; + *b = tag->color_b; + + return 1; +} +// for network, filename /channel is passed as host/port num +int vj_tag_new(int type, char *filename, int stream_nr, editlist * el, + int pix_fmt, int channel , int extra) +{ + int i, j; + int palette; + int w = el->video_width; + int h = el->video_height; /* FIXME */ + int id = 0; + int n; + char sourcename[255]; + + vj_tag *tag; + + veejay_msg(VEEJAY_MSG_DEBUG, "type=%d, file=%s, stream_nr=%d, pix=%d, chan=%d, extra=%d", + type, filename, stream_nr, pix_fmt, channel, extra ); + + if( this_tag_id == 0) + { + this_tag_id = 1; // first tag + } + n = this_tag_id; + /* see if we are already using the source */ + if( type == VJ_TAG_TYPE_NET || type == VJ_TAG_TYPE_MCAST ) + { + if(net_already_opened( filename,n, channel )) + { + veejay_msg(0, "There is already a unicast connection to %s: %d", filename, channel ); + return -1; + } + } + tag = (vj_tag *) vj_calloc(sizeof(vj_tag)); + if(!tag) + { + veejay_msg(0, "Memory allocation error"); + return -1; + } + + tag->source_name = (char *) vj_calloc(sizeof(char) * 255); + if (!tag->source_name) + { + veejay_msg(0, "Memory allocation error"); + return -1; + } + + /* see if we can reclaim some id */ + for(i=0; i <= next_avail_tag; i++) { + if(avail_tag[i] != 0) { + hnode_t *tag_node; + tag_node = hnode_create(tag); + if (!tag_node) + { + veejay_msg(0, "Unable to find available ID"); + return -1; + } + id = avail_tag[i]; + avail_tag[i] = 0; + hash_insert(TagHash, tag_node, (void *) id); + break; + } + } + + + if(id==0) { + tag->id = this_tag_id; + this_tag_id++; + } + else { + tag->id = id; + } + + tag->extra = NULL; + tag->next_id = 0; + tag->nframes = 0; + tag->video_channel = channel; + tag->source_type = type; + tag->index = stream_nr; + tag->active = 0; + tag->n_frames = 50; + tag->sequence_num = 0; + tag->encoder_format = 0; + tag->encoder_active = 0; + tag->encoder_max_size = 0; + tag->encoder_succes_frames = 0; + tag->encoder_duration = 0; + tag->encoder_width = 0; + tag->encoder_height = 0; + tag->encoder_num_frames = 0; + tag->method_filename = (filename == NULL ? NULL :strdup(filename)); + tag->rec_total_bytes = 0; + tag->encoder_total_frames = 0; + tag->source = 0; + tag->fader_active = 0; + tag->fader_val = 0.0; + tag->fader_inc = 0.0; + tag->fader_direction = 0; + tag->selected_entry = 0; + tag->depth = 0; + tag->effect_toggle = 1; /* same as for samples */ + tag->socket_ready = 0; + tag->socket_frame = NULL; + tag->socket_len = 0; + tag->color_r = 0; + tag->color_g = 0; + tag->color_b = 0; + tag->opacity = 0; + tag->priv = NULL; + + if(type == VJ_TAG_TYPE_MCAST || type == VJ_TAG_TYPE_NET) + tag->priv = net_threader(); + + palette = ( (pix_fmt == FMT_420||pix_fmt == FMT_420F) ? VIDEO_PALETTE_YUV420P : VIDEO_PALETTE_YUV422P); + + + switch (type) { +#ifdef HAVE_UNICAP + case VJ_TAG_TYPE_V4L: + sprintf(tag->source_name, "%s", filename ); + + if (!_vj_tag_new_unicap + (tag, stream_nr, w, h,el->video_norm, pix_fmt, extra,channel )) + { + veejay_msg(0, "Unable to create unicap stream '%dx%d' %c, %d, [%d,%d]", + w,h,el->video_norm, pix_fmt, extra,channel ); + return -1; + } + break; +#endif + case VJ_TAG_TYPE_MCAST: + case VJ_TAG_TYPE_NET: + sprintf(tag->source_name, "%s", filename ); + if( _vj_tag_new_net( tag,stream_nr, w,h,pix_fmt, filename, channel ,palette,type) != 1 ) + return -1; + break; + case VJ_TAG_TYPE_DV1394: +#ifdef SUPPORT_READ_DV2 + sprintf(tag->source_name, "/dev/dv1394/%d", channel); +// FIXME: dev fs + if( _vj_tag_new_dv1394( tag, stream_nr,channel,1,el ) == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "error opening dv1394"); + return -1; + } + tag->active = 1; + break; +#else + veejay_msg(VEEJAY_MSG_DEBUG, "libdv not enabled at compile time"); + return -1; +#endif +#ifdef USE_GDK_PIXBUF + case VJ_TAG_TYPE_PICTURE: + sprintf(tag->source_name, "%s", filename); + if( _vj_tag_new_picture(tag, stream_nr, el) != 1 ) + return -1; + break; +#endif + case VJ_TAG_TYPE_YUV4MPEG: + sprintf(tag->source_name, "%s", filename); + if (_vj_tag_new_yuv4mpeg(tag, stream_nr, el) != 1) + { + if(tag->source_name) free(tag->source_name); + if(tag) free(tag); + return -1; + } + tag->active = 1; + break; + case VJ_TAG_TYPE_COLOR: + sprintf(tag->source_name, "[%d,%d,%d]", + tag->color_r,tag->color_g,tag->color_b ); + tag->active = 1; + break; + + default: + veejay_msg(0, "Stream type %d invalid", type ); + return -1; + } + + vj_tag_get_by_type( tag->source_type, tag->descr); + + /* effect chain is empty */ + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) + { + tag->effect_chain[i] = + (sample_eff_chain *) vj_calloc(sizeof(sample_eff_chain)); + tag->effect_chain[i]->effect_id = -1; + tag->effect_chain[i]->e_flag = 0; + tag->effect_chain[i]->frame_trimmer = 0; + tag->effect_chain[i]->frame_offset = 0; + tag->effect_chain[i]->volume = 0; + tag->effect_chain[i]->a_flag = 0; + tag->effect_chain[i]->channel = 0; + tag->effect_chain[i]->source_type = 1; + tag->effect_chain[i]->is_rendering = 0; + for (j = 0; j < SAMPLE_MAX_PARAMETERS; j++) { + tag->effect_chain[i]->arg[j] = 0; + } + tag->effect_chain[i]->kf_status = 0; + tag->effect_chain[i]->kf = vpn( VEVO_ANONYMOUS_PORT ); + } + if (!vj_tag_put(tag)) + { + veejay_msg(0, "Unable to store stream"); + return -1; + } + last_added_tag = tag->id; + +#ifdef HAVE_FREETYPE + tag->dict = vpn(VEVO_ANONYMOUS_PORT ); +#endif + return (int)(tag->id); +} + + +int vj_tag_is_deleted(int id) { + int i; + for (i = 0; i < next_avail_tag; i++) { + if (avail_tag[i] == id) + return 1; + } + return 0; +} + +int vj_tag_exists(int id) +{ + if (!id) + return 0; + if (!vj_tag_get(id)) + return 0; + return 1; +} + +int vj_tag_clear_chain(int id) +{ + int i = 0; + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) { + if (vj_tag_chain_remove(id, i) == -1) + return -1; + } + return 1; +} + +int vj_tag_verify_delete(int id, int type ) +{ + int i,j; + for( i = 1; i < vj_tag_size()-1; i ++ ) + { + vj_tag *s = vj_tag_get(i); + if(s) + { + for( j = 0 ; j < SAMPLE_MAX_EFFECTS; j ++ ) + { + if(s->effect_chain[j]->channel == id && + s->effect_chain[j]->source_type == type ) + { + s->effect_chain[j]->channel = i; + s->effect_chain[j]->source_type = 1; + veejay_msg(VEEJAY_MSG_INFO, "Dereferenced mix entry %d of Stream %d", + j, i ); + vj_tag_update( s, i ); + } + } + } + } + return 1; +} + +int vj_tag_del(int id) +{ + hnode_t *tag_node; + vj_tag *tag; + int i; + tag = vj_tag_get(id); + if(!tag) + return 0; +#ifdef HAVE_TRUETYPE + vj_font_dictionary_destroy(_tag_info->font ,tag->dict); +#endif + + if(tag->extra) + free(tag->extra); + + /* stop streaming in first */ + switch(tag->source_type) { +#ifdef HAVE_UNICAP + case VJ_TAG_TYPE_V4L: + veejay_msg(VEEJAY_MSG_INFO, "Closing unicap device"); + vj_unicap_free_device(unicap_data_, vj_tag_input->unicap[tag->index] ); + break; +#endif + case VJ_TAG_TYPE_YUV4MPEG: + veejay_msg(VEEJAY_MSG_INFO,"Closing yuv4mpeg file %s (Stream %d)", + tag->source_name,id); + vj_yuv_stream_stop_read(vj_tag_input->stream[tag->index]); +// vj_yuv4mpeg_free( vj_tag_input->stream[tag->index]); + break; +#ifdef SUPPORT_READ_DV2 + case VJ_TAG_TYPE_DV1394: + vj_dv1394_close( vj_tag_input->dv1394[tag->index] ); + break; +#endif +#ifdef USE_GDK_PIXBUF + case VJ_TAG_TYPE_PICTURE: + veejay_msg(VEEJAY_MSG_INFO, "Closing picture stream %s", tag->source_name); + vj_picture *pic = vj_tag_input->picture[tag->index]; + if(pic) + { + vj_picture_cleanup( pic->pic ); + free( pic ); + } + vj_tag_input->picture[tag->index] = NULL; + break; +#endif + case VJ_TAG_TYPE_MCAST: + case VJ_TAG_TYPE_NET: + net_thread_stop(tag); + if(vj_tag_input->net[tag->index]) + { + vj_client_close( vj_tag_input->net[tag->index] ); + vj_tag_input->net[tag->index] = NULL; + } + break; + } + + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + vevo_port_free( tag->effect_chain[i]->kf ); + } + tag_node = hash_lookup(TagHash, (void *) tag->id); + if(tag_node) + { + if(tag->encoder_active) + vj_tag_stop_encoder( tag->id ); + if(tag->source_name) free(tag->source_name); + if(tag->method_filename) free(tag->method_filename); + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) + if (tag->effect_chain[i]) + free(tag->effect_chain[i]); + + if(tag->socket_frame) + free(tag->socket_frame); + + free(tag); + avail_tag[ next_avail_tag] = id; + next_avail_tag++; + hash_delete(TagHash, tag_node); + return 1; + } + return -1; +} + +void vj_tag_close_all() { + int n=vj_tag_size()-1; + int i; + vj_tag *tag; + + for(i=1; i < n; i++) { + tag = vj_tag_get(i); + if(tag) { + if(vj_tag_del(i)) veejay_msg(VEEJAY_MSG_DEBUG, "Deleted stream %d", i); + } + } + +} + +int vj_tag_get_n_frames(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + return tag->n_frames; +} + +int vj_tag_set_n_frames( int t1, int n ) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + tag->n_frames = n; + return ( vj_tag_update(tag, t1)); +} + +int vj_tag_get_effect(int t1, int position) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + if (tag->effect_chain[position]->e_flag == 0) + return -1; + return tag->effect_chain[position]->effect_id; +} + +float vj_tag_get_fader_val(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + return ( tag->fader_val ); +} + + +int vj_tag_set_description(int t1, char *description) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return 0; + if(!description || strlen(description) <= 0 ) + snprintf( tag->descr, TAG_MAX_DESCR_LEN, "%s","Untitled"); + else + snprintf( tag->descr, TAG_MAX_DESCR_LEN, "%s", description ); + return ( vj_tag_update(tag, t1)) ; +} + +int vj_tag_get_description( int t1, char *description ) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return 0; + snprintf( description ,TAG_MAX_DESCR_LEN, "%s", tag->descr ); + return 1; +} + +int vj_tag_set_manual_fader(int t1, int value ) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + tag->fader_active = 2; + tag->fader_inc = 0.0; + tag->fader_val = (float)value; + return (vj_tag_update(tag,t1)); +} + +float vj_tag_get_fader_inc(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + return (tag->fader_inc); +} + +int vj_tag_reset_fader(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + tag->fader_active = 0; + tag->fader_inc = 0.0; + tag->fader_val = 0.0; + return (vj_tag_update(tag,t1)); +} + +int vj_tag_set_fader_val(int t1, float val) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + tag->fader_val = val; + return ( vj_tag_update(tag,t1)); +} + +int vj_tag_get_fader_active(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + return (tag->fader_active); +} + +int vj_tag_get_fader_direction(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + return (tag->fader_direction); +} + +int vj_tag_apply_fader_inc(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + tag->fader_val += tag->fader_inc; + if(tag->fader_val > 255.0 ) tag->fader_val = 255.0; + if(tag->fader_val < 0.0) tag->fader_val = 0.0; + vj_tag_update(tag,t1); + if(tag->fader_direction) return tag->fader_val; + return (255-tag->fader_val); +} + +int vj_tag_set_fader_active(int t1, int nframes , int direction) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + if(nframes <= 0) return -1; + tag->fader_active = 1; + if(direction<0) + tag->fader_val = 255.0; + else + tag->fader_val = 0.0; + tag->fader_val = 0.0; + tag->fader_inc = (float) (255.0 / (float)nframes ); + tag->fader_direction = direction; + tag->fader_inc *= direction; + if(tag->effect_toggle == 0 ) + tag->effect_toggle = 1; + return ( vj_tag_update(tag, t1)); +} + +int vj_tag_stop_encoder(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) + { + veejay_msg(VEEJAY_MSG_ERROR, "Tag %d does not exist", t1); + return -1; + } + if(tag->encoder_active) { + if(tag->encoder_file) + lav_close(tag->encoder_file); + if(tag->encoder) + vj_avcodec_stop( tag->encoder, tag->encoder_format ); + tag->encoder = NULL; + tag->encoder_file = NULL; + tag->encoder_active = 0; + return (vj_tag_update(tag,t1)); + } + + return 0; +} + +void vj_tag_reset_encoder(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return; + tag->encoder_format = 0; + tag->encoder_succes_frames = 0; + tag->encoder_num_frames = 0; + tag->encoder_width = 0; + tag->encoder_height = 0; + tag->encoder_max_size = 0; + tag->encoder_active = 0; + tag->rec_total_bytes = 0; + + vj_tag_update(tag,t1); +} + +int vj_tag_get_encoded_file(int t1, char *description) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return 0; + sprintf(description, "%s", tag->encoder_destination ); + return 1; +} + +int vj_tag_get_num_encoded_files(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + return tag->sequence_num; +} + +int vj_tag_get_encoder_format(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + return tag->encoder_format; +} + +int vj_tag_get_sequenced_file(int t1, char *descr, int num, char *ext) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + sprintf(descr, "%s-%05d.%s", tag->encoder_destination,num,ext ); + return 1; +} + + +int vj_tag_try_filename(int t1, char *filename, int format) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) + { + return 0; + } + if(filename != NULL) + { + snprintf(tag->encoder_base, 255, "%s", filename); + } + char ext[5]; + switch(format) + { + case ENCODER_QUICKTIME_DV: + case ENCODER_QUICKTIME_MJPEG: + sprintf(ext, "mov"); + break; + case ENCODER_DVVIDEO: + sprintf(ext,"dv"); + break; + default: + sprintf(ext,"avi"); + break; + } + + sprintf(tag->encoder_destination, "%s-%03d.%s", tag->encoder_base, (int)tag->sequence_num, ext); + return (vj_tag_update(tag,t1)); +} + + + +static int vj_tag_start_encoder(vj_tag *tag, int format, long nframes) +{ + char descr[100]; + char cformat = 'Y'; + int sample_id = tag->id; + + switch(format) + { + case ENCODER_QUICKTIME_DV:sprintf(descr,"DV2"); cformat='Q'; break; + case ENCODER_QUICKTIME_MJPEG: sprintf(descr, "MJPEG"); cformat='q'; break; + case ENCODER_DVVIDEO: sprintf(descr, "DV2"); cformat='b';break; + case ENCODER_MJPEG: sprintf(descr,"MJPEG"); cformat='a'; break; + case ENCODER_YUV420: sprintf(descr, "YUV 4:2:0 YV12"); cformat='Y'; break; + case ENCODER_YUV422: sprintf(descr, "YUV 4:2:2 Planar"); cformat='P'; break; + case ENCODER_MPEG4: sprintf(descr, "MPEG4"); cformat='M'; break; + case ENCODER_DIVX: sprintf(descr, "DIVX"); cformat='D'; break; + case ENCODER_LZO: sprintf(descr, "LZO YUV"); cformat = 'L'; break; + + default: + veejay_msg(VEEJAY_MSG_ERROR, "Unsupported video codec"); + return 0; + break; + } + + tag->encoder = vj_avcodec_start( _tag_info->edit_list , format ); + if(!tag->encoder) + { + veejay_msg(0, "Unable to use %s encoder, please select another", + descr ); + return 0; + } + tag->encoder_active = 1; + tag->encoder_format = format; + if(format==ENCODER_DVVIDEO) + tag->encoder_max_size = ( _tag_info->edit_list->video_height == 480 ? 120000: 144000); + else + switch(format) + { + case ENCODER_YUV420: + tag->encoder_max_size = (_tag_info->edit_list->video_width * _tag_info->edit_list->video_height * 2 );break; + case ENCODER_YUV422: + tag->encoder_max_size = (_tag_info->edit_list->video_width * _tag_info->edit_list->video_height * 2); break; + case ENCODER_LZO: + tag->encoder_max_size = (_tag_info->edit_list->video_width * _tag_info->edit_list->video_height * 3); break; + default: + tag->encoder_max_size = ( 4 * 65535 ); + break; + } + + if(tag->encoder_total_frames == 0) + { + tag->encoder_duration = nframes ; + tag->encoder_num_frames = 0; + } + else + { + tag->encoder_duration = tag->encoder_duration - tag->encoder_num_frames; + } + + if( sufficient_space( tag->encoder_max_size, tag->encoder_num_frames ) == 0 ) + { + vj_avcodec_close_encoder(tag->encoder ); + tag->encoder_active = 0; + tag->encoder = NULL; + return 0; + } + + + tag->encoder_file = lav_open_output_file( + tag->encoder_destination, + cformat, + _tag_info->edit_list->video_width, + _tag_info->edit_list->video_height, + _tag_info->edit_list->video_inter, + _tag_info->edit_list->video_fps, + 0, + 0, + 0 + ); + + + if(!tag->encoder_file) + { + veejay_msg(VEEJAY_MSG_ERROR,"Cannot write to %s (No permissions?)",tag->encoder_destination); + if(tag->encoder) + vj_avcodec_close_encoder( tag->encoder ); + tag->encoder = NULL; + tag->encoder_active = 0; + return 0; + } + else + veejay_msg(VEEJAY_MSG_INFO, "Recording to %s file [%s] %ldx%ld@%2.2f %d/%d/%d >%09ld<", + descr, + tag->encoder_destination, + _tag_info->edit_list->video_width, + _tag_info->edit_list->video_height, + (float) _tag_info->edit_list->video_fps, + 0,0,0, + (long)( tag->encoder_duration - tag->encoder_total_frames) + ); + + + tag->rec_total_bytes= 0; + tag->encoder_succes_frames = 0; + tag->encoder_width = _tag_info->edit_list->video_width; + tag->encoder_height = _tag_info->edit_list->video_height; + + return vj_tag_update(tag,sample_id); +} + + + +int vj_tag_init_encoder(int t1, char *filename, int format, long nframes ) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return 0; + + if(tag->encoder_active) + { + veejay_msg(VEEJAY_MSG_ERROR, "Already recording Stream %d to [%s]",t1, tag->encoder_destination); + return 0; + } + + if(!vj_tag_try_filename( t1,filename,format)) + { + return 0; + } + if(nframes <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "It makes no sense to encode for %ld frames", nframes); + return 0; + } + /* todo: clean this mess up */ + + return vj_tag_start_encoder( tag,format, nframes ); +} + +int vj_tag_continue_record( int t1 ) +{ + vj_tag *si = vj_tag_get(t1); + if(!si) return -1; + + if( si->rec_total_bytes == 0) return 0; + + if(si->encoder_num_frames >= si->encoder_duration) + { + veejay_msg(VEEJAY_MSG_INFO, "Ready recording %ld frames", si->encoder_succes_frames); + si->encoder_total_frames = 0; + vj_tag_update(si, t1 ); + return 1; + } + + // 2 GB barrier + if (si->rec_total_bytes >= VEEJAY_FILE_LIMIT) + { + veejay_msg(VEEJAY_MSG_INFO, "Auto splitting files (reached internal 2GB barrier)"); + si->sequence_num ++; + si->rec_total_bytes = 0; + // si->encoder_duration + // reset some variables + + printf(" %d %ld %d (%ld)%ld \n", + (int)si->sequence_num, + si->rec_total_bytes, + si->encoder_num_frames, + si->encoder_total_frames, + si->encoder_duration); + + si->encoder_total_frames = 0; + vj_tag_update(si,t1); + return 2; + } + + + return 0; + +} +#ifdef HAVE_UNICAP +int vj_tag_set_brightness(int t1, int value) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return 0; + if(value < 0 || value > 65535) + { + veejay_msg(VEEJAY_MSG_ERROR,"Brightness valid range is 0 - 65535"); + return 0; + } + else + { + vj_unicap_select_value( vj_tag_input->unicap[tag->index],UNICAP_BRIGHTNESS,(double)value); + } + return 1; +} +int vj_tag_set_saturation(int t1, int value) +{ + vj_tag *tag = vj_tag_get(t1); + + if(!tag) return -1; + if(value < 0 || value > 65535) + { + veejay_msg(VEEJAY_MSG_ERROR,"Saturation valid range is 0 - 65535"); + return -1; + } + else + { + vj_unicap_select_value( vj_tag_input->unicap[tag->index],UNICAP_SATURATION,(double) value ); + } + return 1; +} +int vj_tag_set_white(int t1, int value) +{ + vj_tag *tag = vj_tag_get(t1); + + if(!tag) return -1; + if(value < 0 || value > 65535) + { + veejay_msg(VEEJAY_MSG_ERROR,"White valid range is 0 - 65535"); + return -1; + } + else + { + vj_unicap_select_value( vj_tag_input->unicap[tag->index],UNICAP_WHITE,(double) value ); + } + return 1; +} + +int vj_tag_set_hue(int t1, int value) +{ + vj_tag *tag = vj_tag_get(t1); + + if(!tag) return -1; + if(value < 0 || value > 65535) + { + veejay_msg(VEEJAY_MSG_ERROR,"Hue valid range is 0 - 65535"); + return -1; + } + else + { + vj_unicap_select_value( vj_tag_input->unicap[tag->index],UNICAP_HUE, (double)value ); + } + return 1; +} +int vj_tag_set_contrast(int t1,int value) +{ + vj_tag *tag = vj_tag_get(t1); + + if(!tag) return -1; + if(value < 0 || value > 65535) + { + veejay_msg(VEEJAY_MSG_ERROR,"Contrast valid range is 0 - 65535"); + return -1; + } + else + { + vj_unicap_select_value( vj_tag_input->unicap[tag->index],UNICAP_CONTRAST, (double) value); + } + return 1; +} +int vj_tag_set_color(int t1, int value) +{ + vj_tag *tag = vj_tag_get(t1); + + if(!tag) return -1; + if(value < 0 || value > 65535) + { + veejay_msg(VEEJAY_MSG_ERROR,"Contrast valid range is 0 - 65535"); + return -1; + } + else + { + vj_unicap_select_value( vj_tag_input->unicap[tag->index], UNICAP_COLOR, (double)value); + } + return 1; +} + + +int vj_tag_get_v4l_properties(int t1, + int *brightness, int *contrast, int *hue,int *saturation, int *color, int *white ) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + if(tag->source_type!=VJ_TAG_TYPE_V4L) + { + return -1; + } + char **props = vj_unicap_get_list( vj_tag_input->unicap[tag->index] ); + int i; + for( i = 0; props[i] != NULL ; i ++ ) + { + double dvalue = 0.0; + vj_unicap_get_value( vj_tag_input->unicap[tag->index] , + props[i], VEVO_ATOM_TYPE_DOUBLE, &dvalue ); + if(strncasecmp( props[i], "brightness",8) == 0 ) { + *brightness = (int) dvalue; + } else if(strncasecmp( props[i], "hue",3 ) == 0 ) { + *hue = (int) dvalue; + } else if( strncasecmp( props[i], "contrast", 8) == 0 ){ + *contrast = (int) dvalue; + } else if (strncasecmp( props[i], "white", 5 ) == 0 ){ + *white = (int) dvalue; + } else if (strncasecmp( props[i], "saturation", 10) == 0 ) { + *saturation = (int) dvalue; + } else if (strncasecmp( props[i], "color",5 ) == 0 ){ + *color = (int) dvalue; + } + free(props[i]); + } + free(props); + return 0; +} +#endif + +int vj_tag_get_effect_any(int t1, int position) { + vj_tag *tag = vj_tag_get(t1); +#ifdef STRICT_CHECKING + assert( tag != NULL ); + assert( position >= 0 && position < SAMPLE_MAX_EFFECTS ); +#endif + return tag->effect_chain[position]->effect_id; +} + +int vj_tag_chain_malloc(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + int i=0; + int e_id = 0; + int sum =0; +#ifdef STRICT_CHECKING + assert( tag != NULL ); +#endif + + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + e_id = tag->effect_chain[i]->effect_id; + if(e_id!=-1) + { + if(!vj_effect_initialized(e_id)) + { + sum ++; + vj_effect_activate(e_id); + } + } + } + return sum; +} + +int vj_tag_chain_free(int t1) +{ + vj_tag *tag = vj_tag_get(t1); +#ifdef STRICT_CHECKING + assert(tag != NULL ); +#endif + int i=0; + int e_id = 0; + int sum = 0; + + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + e_id = tag->effect_chain[i]->effect_id; + if(e_id!=-1) + { + if(vj_effect_initialized(e_id)) + { + vj_effect_deactivate(e_id); + sum++; + } + } + } + return sum; +} + +int vj_tag_chain_reset_kf( int s1, int entry ) +{ + vj_tag *tag = vj_tag_get(s1); + if (!tag) return -1; + tag->effect_chain[entry]->kf_status = 0; + if(tag->effect_chain[entry]->kf) + vevo_port_free( tag->effect_chain[entry]->kf); + tag->effect_chain[entry]->kf = vpn( VEVO_ANONYMOUS_PORT ); + return 1; +} + +int vj_tag_get_kf_status(int s1, int entry ) +{ + vj_tag *tag = vj_tag_get(s1); + if (!tag) + return 0; + return tag->effect_chain[entry]->kf_status; +} +int vj_tag_get_kf_tokens( int s1, int entry, int id, int *start,int *end, int *type) +{ + vj_tag *tag = vj_tag_get(s1); + if (!tag) + return 0; + return keyframe_get_tokens( tag->effect_chain[entry]->kf,id, start,end,type); +} + + +int vj_tag_chain_set_kf_status( int s1, int entry, int status ) +{ + vj_tag *tag = vj_tag_get(s1); + if (!tag) return -1; + tag->effect_chain[entry]->kf_status = status; + return 1; +} + +unsigned char *vj_tag_chain_get_kfs( int s1, int entry, int parameter_id, int *len ) +{ + vj_tag *tag = vj_tag_get(s1); + if (!tag) + return NULL; + if ( entry < 0 || entry > SAMPLE_MAX_EFFECTS ) + return NULL; + if( parameter_id < 0 || parameter_id > 9 ) + return NULL; + + unsigned char *data = keyframe_pack( tag->effect_chain[entry]->kf, parameter_id,entry, len ); + if( data ) + return data; + return NULL; +} + +void *vj_tag_get_kf_port( int s1, int entry ) +{ + vj_tag *tag = vj_tag_get(s1); + if(!tag) return NULL; + return tag->effect_chain[entry]->kf; +} + + +int vj_tag_chain_set_kfs( int s1, int len, unsigned char *data ) +{ + vj_tag *tag = vj_tag_get(s1); + if (!tag) return -1; + if( len <= 0 ) + { + veejay_msg(0, "Invalid keyframe packet length"); + return -1; + } + + int entry = 0; + if(!keyframe_unpack( data, len, &entry,s1,0) ) + { + veejay_msg(0, "Unable to unpack keyframe packet"); + return -1; + } + + if ( entry < 0 || entry > SAMPLE_MAX_EFFECTS ) + { + veejay_msg(0, "Invalid FX entry in KF packet"); + return -1; + } + + return 1; +} + + + +int vj_tag_set_effect(int t1, int position, int effect_id) +{ + int params, i; + vj_tag *tag = vj_tag_get(t1); + + if (!tag) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + + if( tag->effect_chain[position]->effect_id != -1 && tag->effect_chain[position]->effect_id != effect_id ) + { + //verify if the effect should be discarded + if(vj_effect_initialized( tag->effect_chain[position]->effect_id )) + { + // it is using some memory, see if we can free it ... + int ok = 1; + for(i=(position+1); i < SAMPLE_MAX_EFFECTS; i++) + { + if( tag->effect_chain[i]->effect_id == tag->effect_chain[position]->effect_id) ok = 0; + } + // ok, lets get rid of it. + if( ok ) vj_effect_deactivate( tag->effect_chain[position]->effect_id ); + } + } + + if (!vj_effect_initialized(effect_id)) + { + if(vj_effect_activate( effect_id ) == -1) return -1; + } + + tag->effect_chain[position]->effect_id = effect_id; + tag->effect_chain[position]->e_flag = 1; + params = vj_effect_get_num_params(effect_id); + if (params > 0) { + for (i = 0; i < params; i++) { + int val = 0; + val = vj_effect_get_default(effect_id, i); + tag->effect_chain[position]->arg[i] = val; + } + } + if (vj_effect_get_extra_frame(effect_id)) { + if(tag->effect_chain[position]->source_type < 0) + tag->effect_chain[position]->source_type = tag->source_type; + if(tag->effect_chain[position]->channel <= 0 ) + tag->effect_chain[position]->channel = t1; + } + + if (!vj_tag_update(tag,t1)) + return -1; + return position; +} + +int vj_tag_get_chain_status(int t1, int position) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + return tag->effect_chain[position]->e_flag; +} + +int vj_tag_set_chain_status(int t1, int position, int status) +{ + vj_tag *tag = vj_tag_get(t1); + + if (position >= SAMPLE_MAX_EFFECTS) + return -1; + tag->effect_chain[position]->e_flag = status; + if (!vj_tag_update(tag,t1)) + return -1; + return 1; +} + +int vj_tag_get_trimmer(int t1, int position) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return 0; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return 0; + return tag->effect_chain[position]->frame_trimmer; +} + +int vj_tag_set_trimmer(int t1, int position, int trim) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + tag->effect_chain[position]->frame_trimmer = trim; + if (!vj_tag_update(tag,t1)) + return -1; + return 1; +} + +int vj_tag_get_all_effect_args(int t1, int position, int *args, + int arg_len, int n_frame) +{ + int i = 0; + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (arg_len == 0 ) + return 1; + if (!args) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + if (arg_len < 0 || arg_len > SAMPLE_MAX_PARAMETERS) + return -1; + + if( tag->effect_chain[position]->kf_status ) + { +#ifdef STRICT_CHECKING + assert( tag->effect_chain[position]->kf != NULL ); +#endif + for( i =0;i effect_chain[position]->kf, n_frame, i ,&tmp ) ) + args[i] = tag->effect_chain[position]->arg[i]; + else + args[i] = tmp; + } + } + else + { + for( i = 0; i < arg_len; i ++ ) + args[i] = tag->effect_chain[position]->arg[i]; + } + + return 1; +} + +int vj_tag_get_effect_arg(int t1, int position, int argnr) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + if (argnr < 0 || argnr > SAMPLE_MAX_PARAMETERS) + return -1; + + return tag->effect_chain[position]->arg[argnr]; +} + +int vj_tag_set_effect_arg(int t1, int position, int argnr, int value) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + if (argnr < 0 || argnr > SAMPLE_MAX_PARAMETERS) + return -1; + + tag->effect_chain[position]->arg[argnr] = value; + if (!vj_tag_update(tag,t1)) + return -1; + return 1; +} + +int vj_tag_get_type(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + return tag->source_type; +} + +int vj_tag_get_logical_index(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + return tag->index; +} + +int vj_tag_set_logical_index(int t1, int stream_nr) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + tag->index = stream_nr; + if (!vj_tag_update(tag,t1)) + return -1; + return 1; +} + +int vj_tag_get_depth(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + return tag->index; +} + +int vj_tag_disable(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + if(tag->active == 0) + { + veejay_msg(VEEJAY_MSG_INFO, "Already inactive"); + return 1; + } + if(tag->source_type == VJ_TAG_TYPE_NET || tag->source_type == VJ_TAG_TYPE_MCAST) + { + net_thread_stop( tag ); + } +#ifdef HAVE_UNICAP + if(tag->source_type == VJ_TAG_TYPE_V4L ) + { + vj_unicap_set_pause( vj_tag_input->unicap[tag->index], 1 ); + //if( vj_unicap_status( vj_tag_input->unicap[tag->index]) ) + // vj_unicap_stop_capture( vj_tag_input->unicap[ tag->index] ); + } +#endif +#ifdef USE_GDK_PIXBUF + if(tag->source_type == VJ_TAG_TYPE_PICTURE ) + { + vj_picture *pic = vj_tag_input->picture[tag->index]; + if(pic) + { + vj_picture_cleanup( pic->pic ); + } + vj_tag_input->picture[tag->index] = pic; + } +#endif + tag->active = 0; + if(!vj_tag_update(tag,t1)) return -1; + return 1; +} + +int vj_tag_enable(int t1) { + vj_tag *tag = vj_tag_get(t1); +#ifdef STRICT_CHECKING + assert( tag != NULL ); +#endif +#ifdef HAVE_UNICAP + if( tag->source_type == VJ_TAG_TYPE_V4L ) + { + if( vj_unicap_get_pause( vj_tag_input->unicap[tag->index] ) ) + vj_unicap_set_pause( vj_tag_input->unicap[tag->index] , 0 ); + else { + if(! vj_unicap_status( vj_tag_input->unicap[tag->index]) ) + vj_unicap_start_capture( vj_tag_input->unicap[tag->index]); + } + tag->active = 1; + vj_tag_update(tag,t1); + return 1; + } +#endif + if(tag->source_type == VJ_TAG_TYPE_NET || tag->source_type == VJ_TAG_TYPE_MCAST ) + { + if(!net_thread_start(vj_tag_input->net[tag->index], tag)) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Unable to start thread"); + return 1; + } + } +#ifdef USE_GDK_PIXBUF + if( tag->source_type == VJ_TAG_TYPE_PICTURE ) + { + vj_picture *p = vj_tag_input->picture[ tag->index ]; + p->pic = vj_picture_open( tag->source_name, + vj_tag_input->width, vj_tag_input->height, + vj_tag_input->pix_fmt ); + + if(!p->pic) + return -1; + + vj_tag_input->picture[tag->index] = p; + veejay_msg(VEEJAY_MSG_DEBUG, "Streaming from picture '%s'", tag->source_name ); + } +#endif +#ifdef HAVE_UNICAP + if( tag->source_type == VJ_TAG_TYPE_V4L ) + { + if( vj_unicap_get_pause( vj_tag_input->unicap[ tag->index ] ) ) + vj_unicap_set_pause( vj_tag_input->unicap[ tag->index ] , 0 ); + + if(!vj_unicap_status( vj_tag_input->unicap[tag->index]) ) + vj_unicap_start_capture( vj_tag_input->unicap[tag->index]); + } +#endif + tag->active = 1; + if(!vj_tag_update(tag,t1)) return -1; + return 1; +} + +int vj_tag_set_depth(int t1, int depth) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + tag->depth = depth; + if (!vj_tag_update(tag,t1)) + return -1; + return 1; +} + + +int vj_tag_set_active(int t1, int active) +{ + vj_tag *tag; + tag = vj_tag_get(t1); + if (!tag) + return -1; + + if(active == tag->active) + return 1; + + switch (tag->source_type) { +#ifdef HAVE_UNICAP + case VJ_TAG_TYPE_V4L: + if(active) { + if( vj_unicap_get_pause( vj_tag_input->unicap[ tag->index] ) ) { + vj_unicap_set_pause( vj_tag_input->unicap[tag->index] , 0 );\ + } else { + if( !vj_unicap_status( vj_tag_input->unicap[tag->index]) ) + vj_unicap_start_capture( vj_tag_input->unicap[tag->index]); + } + } else { + if( !vj_unicap_get_pause( vj_tag_input->unicap[ tag->index ] ) ) + vj_unicap_set_pause( vj_tag_input->unicap[tag->index] , 1 ); + // if( vj_unicap_status( vj_tag_input->unicap[tag->index]) ) + // vj_unicap_stop_capture( vj_tag_input->unicap[ tag->index] ); + } + tag->active = active; + break; +#endif + case VJ_TAG_TYPE_YUV4MPEG: + if(active==0) + { + tag->active = 0; + vj_yuv_stream_stop_read( vj_tag_input->stream[tag->index]); + } + break; + case VJ_TAG_TYPE_MCAST: + case VJ_TAG_TYPE_NET: + case VJ_TAG_TYPE_PICTURE: + if(active == 1 ) + vj_tag_enable( t1 ); + else + vj_tag_disable( t1 ); + break; + default: + tag->active = active; + break; + } + + if (!vj_tag_update(tag,t1)) + return -1; + + return 1; +} + +int vj_tag_get_active(int t1) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + return tag->active; +} + +int vj_tag_set_chain_channel(int t1, int position, int channel) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + tag->effect_chain[position]->channel = channel; + + if (!vj_tag_update(tag,t1)) + return -1; + return 1; +} + +int vj_tag_get_chain_channel(int t1, int position) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + return tag->effect_chain[position]->channel; +} +int vj_tag_set_chain_source(int t1, int position, int source) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + tag->effect_chain[position]->source_type = source; + if (!vj_tag_update(tag,t1)) + return -1; + return 1; +} + +int vj_tag_get_chain_source(int t1, int position) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if (position < 0 || position >= SAMPLE_MAX_EFFECTS) + return -1; + return tag->effect_chain[position]->source_type; +} + +int vj_tag_chain_size(int t1) +{ + int i; + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + for (i = SAMPLE_MAX_EFFECTS - 1; i != 0; i--) { + if (tag->effect_chain[i]->effect_id != -1) + return i; + } + return 0; +} + +int vj_tag_get_effect_status(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + return tag->effect_toggle; +} +int vj_tag_get_selected_entry(int t1) { + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + return tag->selected_entry; +} + +int vj_tag_set_effect_status(int t1, int status) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + if(status==1 || status==0) + { + tag->effect_toggle = status; + return ( vj_tag_update(tag,t1)); + } + return -1; +} + +int vj_tag_set_selected_entry(int t1, int position) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return -1; + if(position < 0 || position >= SAMPLE_MAX_EFFECTS) return -1; + tag->selected_entry = position; + return (vj_tag_update(tag,t1)); +} + +static int vj_tag_chain_can_delete(vj_tag *tag, int s_pos, int e_id) +{ + int i; + for(i=0; i < SAMPLE_MAX_EFFECTS;i++) + { + // effect is on chain > 1 + if(e_id == tag->effect_chain[i]->effect_id && i != s_pos) + { + return 0; + } + } + return 1; +} +int vj_tag_chain_remove(int t1, int index) +{ + int i; + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + if( tag->effect_chain[index]->effect_id != -1) + { + if( vj_effect_initialized( tag->effect_chain[index]->effect_id ) && + vj_tag_chain_can_delete(tag, index, tag->effect_chain[index]->effect_id)) + vj_effect_deactivate( tag->effect_chain[index]->effect_id ); + + if( tag->effect_chain[index]->kf ) + vevo_port_free(tag->effect_chain[index]->kf ); + tag->effect_chain[index]->kf = vpn(VEVO_ANONYMOUS_PORT); + } + + if (tag->effect_chain[index]->effect_id != -1) { + tag->effect_chain[index]->effect_id = -1; + tag->effect_chain[index]->e_flag = 0; + for (i = 0; i < SAMPLE_MAX_PARAMETERS; i++) { + vj_tag_set_effect_arg(t1, index, i, 0); + } + } + if (!vj_tag_update(tag,t1)) + return -1; + return 1; +} + + +void vj_tag_get_source_name(int t1, char *dst) +{ + vj_tag *tag = vj_tag_get(t1); + if (tag) { + sprintf(dst, tag->source_name); + } else { + vj_tag_get_description( tag->source_type, dst ); + } +} + +void vj_tag_get_method_filename(int t1, char *dst) +{ + vj_tag *tag = vj_tag_get(t1); + if (tag) { + if(tag->method_filename != NULL) sprintf(dst, tag->method_filename); + } +} + + +void vj_tag_get_by_type(int type, char *description ) +{ + switch (type) { + case VJ_TAG_TYPE_COLOR: + sprintf(description, "Solid" ); + break; + case VJ_TAG_TYPE_NONE: + sprintf(description, "%s", "EditList"); + break; + case VJ_TAG_TYPE_MCAST: + sprintf(description, "%s", "Multicast"); + break; + case VJ_TAG_TYPE_NET: + sprintf(description, "%s", "Unicast"); + break; +#ifdef USE_GDK_PIXBUF + case VJ_TAG_TYPE_PICTURE: + sprintf(description, "%s", "GdkPixbuf"); + break; +#endif + case VJ_TAG_TYPE_V4L: + sprintf(description, "%s", "Video4Linux"); + break; +#ifdef SUPPORT_READ_DV2 + case VJ_TAG_TYPE_DV1394: + sprintf(description, "%s", "DV1394"); + break; +#endif + case VJ_TAG_TYPE_YUV4MPEG: + sprintf(description, "%s", "YUV4MPEG"); + break; + } + +} + +void vj_tag_get_descriptive(int id, char *description) +{ + vj_tag *tag = vj_tag_get(id); + if(!tag) + { + sprintf(description, "invalid"); + } + else + { + vj_tag_get_by_type( tag->source_type, description ); + } +} + +/* this method tries to find a tag of given type */ +int vj_tag_by_type(int type) +{ + int min; + for (min = 1; min < this_tag_id; ++min) { + if (vj_tag_get_type(min) == type) + return min; + } + return 0; +} + + + +int vj_tag_set_offset(int t1, int chain_entry, int frame_offset) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + /* set to zero if frame_offset is greater than sample length */ + if (frame_offset < 0) + frame_offset = 0; + + tag->effect_chain[chain_entry]->frame_offset = frame_offset; + if (!vj_tag_update(tag,t1)) + return 0; + return 1; +} + +int vj_tag_get_offset(int t1, int chain_entry) +{ + vj_tag *tag = vj_tag_get(t1); + if (!tag) + return -1; + + return tag->effect_chain[chain_entry]->frame_offset; +} + +int vj_tag_get_encoded_frames(int s1) { + vj_tag *si = vj_tag_get(s1); + if(!si) return -1; + return ( si->encoder_succes_frames ); + //return ( si->encoder_total_frames ); +} + +long vj_tag_get_duration(int s1) +{ + vj_tag *t = vj_tag_get(s1); + if(!t) return -1; + return ( t->encoder_duration ); +} + + +long vj_tag_get_total_frames( int s1 ) +{ + vj_tag *si = vj_tag_get(s1); + if(!si) return -1; + return ( si->encoder_total_frames ); +// return si->encoder_succes_frames; +} + +int vj_tag_reset_autosplit(int s1) +{ + vj_tag *si = vj_tag_get(s1); + if(!si) return -1; + bzero( si->encoder_base, 255 ); + bzero( si->encoder_destination , 255 ); + si->sequence_num = 0; + return (vj_tag_update(si,s1)); +} + +int vj_tag_get_frames_left(int s1) +{ + vj_tag *si= vj_tag_get(s1); + if(!si) return 0; + return ( si->encoder_duration - si->encoder_total_frames ); +} + +int vj_tag_encoder_active(int s1) +{ + vj_tag *si = vj_tag_get(s1); + if(!si)return 0; + return si->encoder_active; +} + +int vj_tag_var(int t1, int *type, int *fader, int *fx_sta , int *rec_sta, int *active ) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return 0; + *fader = tag->fader_active; + *fx_sta = tag->effect_toggle; + *rec_sta = tag->encoder_active; + *type = tag->source_type; + *active = tag->active; + return 1; +} + +int vj_tag_record_frame(int t1, uint8_t *buffer[3], uint8_t *abuff, int audio_size) { + vj_tag *tag = vj_tag_get(t1); + int buf_len = 0; + if(!tag) return -1; + + if(!tag->encoder_active) return -1; + + /* + int buf_len = encode_jpeg_raw( tag->encoder_buf, tag->encoder_max_size, 100, 0,0,tag->encoder_width, + tag->encoder_height, buffer[0], buffer[1], buffer[2]); + */ + + buf_len = vj_avcodec_encode_frame( tag->encoder, tag->encoder_total_frames ++, tag->encoder_format, buffer, tag_encoder_buf, tag->encoder_max_size); + if(buf_len <= 0 ) + { + return -1; + } + + if(lav_write_frame(tag->encoder_file, tag_encoder_buf, buf_len,1)) + { + veejay_msg(VEEJAY_MSG_ERROR, "writing frame, giving up :[%s]", lav_strerror()); + return -1; + } + tag->rec_total_bytes += buf_len; + + if(audio_size > 0) + { + if(lav_write_audio(tag->encoder_file, abuff, audio_size)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error writing output audio [%s]",lav_strerror()); + } + tag->rec_total_bytes += ( audio_size * _tag_info->edit_list->audio_bps); + } + /* write OK */ + tag->encoder_succes_frames ++; + tag->encoder_num_frames ++; + + vj_tag_update(tag,t1); + + return (vj_tag_continue_record(t1)); +} + +int vj_tag_get_audio_frame(int t1, uint8_t *dst_buffer) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) return 0; + +#ifdef SUPPORT_READ_DV2 + if(tag->source_type == VJ_TAG_TYPE_DV1394) + { // this is never tested ... + //vj_dv_decoder_get_audio( vj_tag_input->dv1394[tag->index], dst_buffer ); + } +#endif + return 0; +} + + + +int vj_tag_get_frame(int t1, uint8_t *buffer[3], uint8_t * abuffer) +{ + vj_tag *tag = vj_tag_get(t1); + if(!tag) + return -1; + + const int width = vj_tag_input->width; + const int height = vj_tag_input->height; + const int uv_len = vj_tag_input->uv_len; + const int len = (width * height); + + + switch (tag->source_type) + { +#ifdef HAVE_UNICAP + case VJ_TAG_TYPE_V4L: + if(vj_unicap_status(vj_tag_input->unicap[tag->index]) ) + vj_unicap_grab_frame( vj_tag_input->unicap[tag->index], buffer, width,height ); + return 1; + break; +#endif +#ifdef USE_GDK_PIXBUF + case VJ_TAG_TYPE_PICTURE: + { + vj_picture *p = vj_tag_input->picture[tag->index]; + if(!p) + { + veejay_msg(VEEJAY_MSG_ERROR, "Picture never opened"); + vj_tag_disable(t1); + return -1; + } + uint8_t *address = vj_picture_get( p->pic ); + veejay_memcpy(buffer[0],address, len); + veejay_memcpy(buffer[1],address + len, uv_len); + veejay_memcpy(buffer[2],address + len + uv_len, uv_len); + } + break; +#endif + case VJ_TAG_TYPE_MCAST: + case VJ_TAG_TYPE_NET: + if(!net_thread_get_frame( tag,buffer )) + return 0; + return 1; + break; + case VJ_TAG_TYPE_YUV4MPEG: + if( vj_tag_input->pix_fmt == FMT_420 || vj_tag_input->pix_fmt == FMT_420F) + { + if (vj_yuv_get_frame(vj_tag_input->stream[tag->index], buffer) != 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error reading frame trom YUV4MPEG stream. (Stopping)"); + vj_tag_set_active(t1,0); + return -1; + } + } + else + { + if(vj_yuv_get_frame(vj_tag_input->stream[tag->index], _temp_buffer) != 0) + { + vj_tag_set_active(t1,0); + return -1; + } + + VJFrame *srci = yuv_yuv_template( _temp_buffer[0],_temp_buffer[1],_temp_buffer[2], + width,height, PIX_FMT_YUV420P); + VJFrame *dsti = yuv_yuv_template( buffer[0],buffer[1],buffer[2], width,height, + get_ffmpeg_pixfmt( vj_tag_input->pix_fmt )); + + yuv_convert_any_ac( srci,dsti, srci->format, dsti->format ); + + free(srci); + free(dsti); + + } + return 1; + + break; +#ifdef SUPPORT_READ_DV2 + case VJ_TAG_TYPE_DV1394: + vj_dv1394_read_frame( vj_tag_input->dv1394[tag->index], buffer , abuffer,vj_tag_input->pix_fmt); + break; +#endif + + case VJ_TAG_TYPE_COLOR: + _tmp.len = len; + _tmp.uv_len = uv_len; + _tmp.data[0] = buffer[0]; + _tmp.data[1] = buffer[1]; + _tmp.data[2] = buffer[2]; + dummy_rgb_apply( &_tmp, width, height, + tag->color_r,tag->color_g,tag->color_b ); + break; + + case VJ_TAG_TYPE_NONE: + break; + default: + break; + } + return 1; +} + + +//int vj_tag_sprint_status(int tag_id, int entry, int changed, char *str) +int vj_tag_sprint_status( int tag_id,int cache,int sa, int ca, int pfps,int frame, int mode,int ts, int macro, char *str ) +{ + vj_tag *tag; + tag = vj_tag_get(tag_id); +#ifdef STRICT_CHECKING + assert( tag != NULL ); +#endif + //if (!tag) + //return -1; + + veejay_sprintf(str, 1024, + "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + pfps, + frame, + mode, + tag_id, + tag->effect_toggle, + tag->color_r, // no start, but color + tag->color_g, // no end, + tag->color_b, // no speed, + 0, // no looping + tag->encoder_active, + tag->encoder_duration, + tag->encoder_succes_frames, + vj_tag_size()-1, + tag->source_type, // no markers + tag->n_frames, // no markers + tag->selected_entry, + ts, + cache, + sa, + ca, + (int)(tag->fader_val), + 0, + macro); + return 0; +} + +#ifdef HAVE_XML2 +static void tagParseArguments(xmlDocPtr doc, xmlNodePtr cur, int *arg) +{ + xmlChar *xmlTemp = NULL; + unsigned char *chTemp = NULL; + int argIndex = 0; + if (cur == NULL) + return; + + while (cur != NULL && argIndex < SAMPLE_MAX_PARAMETERS) { + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_ARGUMENT)) + { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + arg[argIndex] = atoi(chTemp); + argIndex++; + } + + if (xmlTemp) + xmlFree(xmlTemp); + if (chTemp) + free(chTemp); + + } + // xmlTemp and chTemp should be freed after use + xmlTemp = NULL; + chTemp = NULL; + cur = cur->next; + } +} +static int tagParseKeys( xmlDocPtr doc, xmlNodePtr cur, void *port ) +{ + if(!cur) + return 0; + + while (cur != NULL) + { + if( !xmlStrcmp( cur->name, (const xmlChar*) "KEYFRAMES" )) + { + keyframe_xml_unpack( doc, cur->xmlChildrenNode, port ); + } + cur = cur->next; + } + return 1; +} + +static void tagParseEffect(xmlDocPtr doc, xmlNodePtr cur, int dst_sample) +{ + xmlChar *xmlTemp = NULL; + unsigned char *chTemp = NULL; + int effect_id = -1; + int arg[SAMPLE_MAX_PARAMETERS]; + int i; + int source_type = 0; + int channel = 0; + int frame_trimmer = 0; + int frame_offset = 0; + int e_flag = 0; + int volume = 0; + int anim= 0; + int a_flag = 0; + int chain_index = 0; + + for (i = 0; i < SAMPLE_MAX_PARAMETERS; i++) { + arg[i] = 0; + } + + if (cur == NULL) + return; + + // int k = 0; + // void *ports[8]; + // veejay_memset( ports,0,sizeof(ports)); + + + xmlNodePtr curarg = cur; + + while (cur != NULL) { + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTID)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + effect_id = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTPOS)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + chain_index = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTSOURCE)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + source_type = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTCHANNEL)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + channel = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTTRIMMER)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + frame_trimmer = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTOFFSET)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + frame_offset = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) "kf_status")) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + anim = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTACTIVE)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + e_flag = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + + } + + if (!xmlStrcmp + (cur->name, (const xmlChar *) XMLTAG_EFFECTAUDIOFLAG)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + a_flag = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + + } + + if (!xmlStrcmp + (cur->name, (const xmlChar *) XMLTAG_EFFECTAUDIOVOLUME)) { + xmlTemp = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + chTemp = UTF8toLAT1(xmlTemp); + if (chTemp) { + volume = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + } + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_ARGUMENTS)) { + tagParseArguments(doc, cur->xmlChildrenNode, arg ); + } + + // xmlTemp and chTemp should be freed after use + xmlTemp = NULL; + chTemp = NULL; + cur = cur->next; + } + + if (effect_id != -1) { + int j; + int res = vj_tag_set_effect( dst_sample, chain_index, effect_id ); + + if(res < 0 ) + veejay_msg(VEEJAY_MSG_ERROR, "Error parsing effect %d (pos %d) to stream %d\n", + effect_id, chain_index, dst_sample); + + + /* load the parameter values */ + for (j = 0; j < vj_effect_get_num_params(effect_id); j++) { + vj_tag_set_effect_arg(dst_sample, chain_index, j, arg[j]); + } + vj_tag_set_chain_channel(dst_sample, chain_index, channel); + vj_tag_set_chain_source(dst_sample, chain_index, source_type); + + vj_tag_set_chain_status(dst_sample, chain_index, e_flag); + + vj_tag_set_offset(dst_sample, chain_index, frame_offset); + vj_tag_set_trimmer(dst_sample, chain_index, frame_trimmer); + + j = 0; + vj_tag *t = vj_tag_get( dst_sample ); + while (curarg != NULL) + { + if(!xmlStrcmp(curarg->name,(const xmlChar*)"ANIM")) + { + if(t->effect_chain[chain_index]->effect_id > 0) + { + if(tagParseKeys( doc, curarg->xmlChildrenNode, t->effect_chain[chain_index]->kf)) + { + veejay_msg(VEEJAY_MSG_INFO, "Animating FX %d on entry %d (status=%d)", t->effect_chain[chain_index]->effect_id, j,anim); + vj_tag_chain_set_kf_status(dst_sample, chain_index, anim ); + } + j++; + } + } + curarg = curarg->next; + } + + } + + + +} + +/************************************************************************************************* + * + * ParseEffect() + * + * Parse the effects array + * + ****************************************************************************************************/ +static void tagParseEffects(xmlDocPtr doc, xmlNodePtr cur, int dst_stream) +{ + int effectIndex = 0; + while (cur != NULL && effectIndex < SAMPLE_MAX_EFFECTS) { + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECT)) { + tagParseEffect(doc, cur->xmlChildrenNode, dst_stream); + effectIndex++; + } + //effectIndex++; + cur = cur->next; + } +} +/************************************************************************************************* + * + * ParseSample() + * + * Parse a sample + * + ****************************************************************************************************/ + +static int tag_get_int_xml( xmlDocPtr doc, xmlNodePtr cur, const xmlChar *key ) +{ + xmlChar *xmlTemp = xmlNodeListGetString( doc, cur->xmlChildrenNode,1); + char *chTemp = UTF8toLAT1( xmlTemp ); + int res = 0; + if(chTemp) + { + res = atoi(chTemp); + free(chTemp); + } + if(xmlTemp) xmlFree(xmlTemp); + return res; +} + +static char *tag_get_char_xml( xmlDocPtr doc, xmlNodePtr cur, const xmlChar *key ) +{ + xmlChar *xmlTemp = xmlNodeListGetString( doc, cur->xmlChildrenNode,1); + char *chTemp = UTF8toLAT1( xmlTemp ); + int res = 0; + if(xmlTemp) xmlFree(xmlTemp); + return chTemp; +} + +void tagParseStreamFX(char *sampleFile, xmlDocPtr doc, xmlNodePtr cur, void *font) +{ + + xmlChar *xmlTemp = NULL; + unsigned char *chTemp = NULL; + + int fx_on=0, id=0, source_id=0, source_type=0; + char *source_file = NULL; + char *extra_data = NULL; + int col[3] = {0,0,0}; + int fader_active=0, fader_val=0, fader_dir=0, opacity=0, nframes=0; +#ifdef STRICT_CHECKING + assert( _tag_info != NULL ); +#endif + + xmlNodePtr fx[32]; + veejay_memset( fx, 0, sizeof(fx)); + int k = 0; + + xmlNodePtr subs = NULL; + + void *d = vj_font_get_dict( font ); + + while (cur != NULL) + { + if( !xmlStrcmp(cur->name, (const xmlChar*) XMLTAG_SAMPLEID )) + id = tag_get_int_xml(doc,cur,XMLTAG_SAMPLEID ); + if( !xmlStrcmp(cur->name, (const xmlChar*) "source_id" ) ) + source_id = tag_get_int_xml(doc,cur,"source_id" ); + if( !xmlStrcmp(cur->name, (const xmlChar*) "source_type" ) ) + source_type = tag_get_int_xml(doc,cur,"source_type" ); + if( !xmlStrcmp(cur->name, (const xmlChar*) "source_file" ) ) + source_file = tag_get_char_xml(doc,cur, "source_file"); + if( !xmlStrcmp(cur->name, (const xmlChar*) "extra_data" )) + extra_data = tag_get_char_xml(doc,cur, "extra_data"); + + if(! xmlStrcmp(cur->name, (const xmlChar*) "red" ) ) + col[0] = tag_get_int_xml( doc,cur, "red" ); + if(! xmlStrcmp(cur->name, (const xmlChar*) "green" ) ) + col[1] = tag_get_int_xml( doc, cur, "green" ); + if(! xmlStrcmp(cur->name, (const xmlChar*) "blue" )) + col[2] = tag_get_int_xml( doc, cur, "blue" ); + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_CHAIN_ENABLED)) + fx_on = tag_get_int_xml(doc,cur, XMLTAG_CHAIN_ENABLED ); + if (!xmlStrcmp(cur->name,(const xmlChar *) XMLTAG_FADER_ACTIVE)) + fader_active = tag_get_int_xml(doc,cur, XMLTAG_FADER_ACTIVE); + if (!xmlStrcmp(cur->name,(const xmlChar *) XMLTAG_FADER_VAL)) + fader_val = tag_get_int_xml( doc,cur,XMLTAG_FADER_VAL ); + if (!xmlStrcmp(cur->name,(const xmlChar*) XMLTAG_FADER_DIRECTION)) + fader_dir = tag_get_int_xml( doc, cur, XMLTAG_FADER_DIRECTION ); + if (!xmlStrcmp(cur->name,(const xmlChar*) "opacity" ) ) + opacity = tag_get_int_xml( doc, cur, "opacity"); + if (!xmlStrcmp(cur->name,(const xmlChar*) "nframes" ) ) + nframes = tag_get_int_xml(doc, cur, "nframes" ); + + if (!xmlStrcmp(cur->name, (const xmlChar*) "SUBTITLES" )) + subs = cur->xmlChildrenNode; + + if (!xmlStrcmp(cur->name, (const xmlChar *) XMLTAG_EFFECTS)) { + fx[k] = cur->xmlChildrenNode; + k++; + } + cur = cur->next; + } + + if( id > 0 ) + { + int zer = 0; + + if( source_type == VJ_TAG_TYPE_V4L && extra_data ) + sscanf( extra_data, "%d",&zer ); + + vj_tag_del( id ); + + int n_id = vj_tag_new( source_type, source_file, _tag_info->nstreams,_tag_info->current_edit_list, + _tag_info->pixel_format, source_id,zer ); + + if(n_id > 0 ) + { + vj_tag *tag = vj_tag_get( n_id ); +#ifdef STRICT_CHECKING + assert( tag != NULL ); +#endif + tag->id = id; + tag->effect_toggle = fx_on; + tag->fader_active = fader_active; + tag->fader_val = fader_val; + tag->fader_direction = fader_dir; + tag->opacity = opacity; + tag->nframes = nframes; + vj_tag_update( tag, id ); + + switch( source_type ) + { + case VJ_TAG_TYPE_COLOR: + vj_tag_set_stream_color( id, col[0],col[1],col[2] ); + break; + } + + if( subs ) + { + char tmp[512]; + sprintf(tmp, "%s-SUB-s%d.srt", sampleFile, id ); +#ifdef STRICT_CHECKING + assert(tag->dict != NULL); +#endif + vj_font_set_constraints_and_dict( + font, 0, tag->n_frames, 25.0f, tag->dict ); + + vj_font_load_srt( font, tmp ); + + vj_font_xml_unpack( doc,subs, font ); + } + + int q; + for( q = 0; q < k ; q ++ ) + { + if(fx[q] ) + tagParseEffects(doc, fx[q], id ); + } + + + + + } + } + + vj_font_set_dict( font, d ); + +} + + + +static void tagCreateArguments(xmlNodePtr node, int *arg, int argcount) +{ + int i; + char buffer[100]; + for (i = 0; i < argcount; i++) { + sprintf(buffer, "%d", arg[i]); + xmlNewChild( node, NULL, (const xmlChar*) XMLTAG_ARGUMENT, + (const xmlChar*) buffer ); + } +} + +static void tagCreateKeys(xmlNodePtr node, int argcount, void *port ) +{ + int i; + for ( i = 0; i < argcount ; i ++ ) + { + xmlNodePtr childnode = xmlNewChild( node, NULL,(const xmlChar*) "KEYFRAMES",NULL ); + keyframe_xml_pack( childnode, port, i ); + } +} + +static void tagCreateEffect(xmlNodePtr node, sample_eff_chain * effect, int position) +{ + char buffer[100]; + xmlNodePtr childnode; + + sprintf(buffer, "%d", position); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTPOS, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->effect_id); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTID, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->e_flag); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTACTIVE, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->source_type); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTSOURCE, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->channel); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTCHANNEL, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->frame_offset); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTOFFSET, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->frame_trimmer); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTTRIMMER, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->a_flag); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTAUDIOFLAG, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->volume); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTAUDIOVOLUME, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", effect->kf_status ); + xmlNewChild(node,NULL,(const xmlChar*) "kf_status", (const xmlChar*)buffer); + + childnode = + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_ARGUMENTS, NULL); + tagCreateArguments(childnode, effect->arg, + vj_effect_get_num_params(effect->effect_id)); + + childnode = + xmlNewChild(node, NULL, (const xmlChar*) "ANIM", NULL ); + tagCreateKeys( childnode, vj_effect_get_num_params(effect->effect_id), effect->kf ); +} + +static void tagCreateEffects(xmlNodePtr node, sample_eff_chain ** effects) +{ + int i; + xmlNodePtr childnode; + + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) { + if (effects[i]->effect_id != -1) { + childnode = + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECT, + NULL); + tagCreateEffect(childnode, effects[i], i); + } + } + +} + +void tagCreateStream(xmlNodePtr node, vj_tag *tag, void *font) +{ + char buffer[100]; + + sprintf(buffer, "%d", tag->id); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_SAMPLEID, + (const xmlChar *) buffer); + sprintf(buffer, "%d", tag->effect_toggle); + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_CHAIN_ENABLED, + (const xmlChar *) buffer); + + sprintf(buffer, "%d", tag->source_type ); + xmlNewChild(node,NULL,(const xmlChar*) "source_type", (const xmlChar*) buffer ); + + sprintf(buffer, "%d", tag->video_channel ); + xmlNewChild(node,NULL,(const xmlChar*) "source_id", (const xmlChar*) buffer ); + + sprintf(buffer, "%s", tag->source_name ); + xmlNewChild(node,NULL,(const xmlChar*) "source_file", (const xmlChar*) buffer ); + + if(tag->extra && strlen(tag->extra) > 1) + { + sprintf(buffer, "%s", tag->extra ); + xmlNewChild(node, NULL,(const xmlChar) "extra_data", (const xmlChar*) buffer ); + } + sprintf(buffer, "%d", tag->color_r ); + xmlNewChild(node,NULL,(const xmlChar*) "red", (const xmlChar*) buffer ); + sprintf(buffer, "%d", tag->color_g ); + xmlNewChild(node,NULL,(const xmlChar*) "green", (const xmlChar*) buffer ); + sprintf(buffer, "%d", tag->color_b ); + xmlNewChild(node,NULL,(const xmlChar*) "blue", (const xmlChar*) buffer ); + + sprintf(buffer, "%d", tag->nframes ); + xmlNewChild(node, NULL, (const xmlChar*) "nframes", (const xmlChar*) buffer ); + + sprintf(buffer, "%d", tag->opacity ); + xmlNewChild( node, NULL, (const xmlChar*) "opacity", (const xmlChar*) buffer ); + + vj_font_xml_pack( node, font ); + + + xmlNodePtr childnode = + xmlNewChild(node, NULL, (const xmlChar *) XMLTAG_EFFECTS, NULL); + + tagCreateEffects(childnode, tag->effect_chain); +} + +void tag_writeStream( char *file, int n, xmlNodePtr node, void *font ) +{ + vj_tag *tag = vj_tag_get(n); + if(!tag) { + veejay_msg(VEEJAY_MSG_ERROR, "Stream %d does not exist", n); + return; + } + char tmp[512]; + void *d = vj_font_get_dict( font ); + sprintf(tmp, "%s-SUB-s%d.srt", file,tag->id ); + + if( tag->dict ) + { + vj_font_set_dict( font, tag->dict ); + vj_font_save_srt( font, tmp ); + + vj_font_set_dict( font, d ); + } + + tagCreateStream(node, tag , font); +} + + + + +#endif diff --git a/veejay-server/libstream/vj-tag.h b/veejay-server/libstream/vj-tag.h new file mode 100644 index 00000000..1ca51453 --- /dev/null +++ b/veejay-server/libstream/vj-tag.h @@ -0,0 +1,311 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_TAG_H +#define VJ_TAG_H + +#define VJ_TAG_TYPE_PICTURE 5 +#define VJ_TAG_TYPE_COLOR 4 +#define VJ_TAG_TYPE_VLOOPBACK 3 +#define VJ_TAG_TYPE_V4L 2 +#define VJ_TAG_TYPE_YUV4MPEG 1 +#define VJ_TAG_TYPE_NONE 0 +#define VJ_TAG_TYPE_SHM 11 +#define VJ_TAG_TYPE_NET 13 +#define VJ_TAG_TYPE_MCAST 14 +#define VJ_TAG_MAX_V4L 16 +#define VJ_TAG_MAX_STREAM_IN 255 +#define VJ_TAG_TYPE_DV1394 17 +#define VJ_TAG_TYPE_AVFORMAT 12 +#define TAG_MAX_DESCR_LEN 150 +#include +#include +#include +#include +#include +#ifdef USE_GDK_PIXBUF +typedef struct +{ + void *pic; +} vj_picture; +#endif + +typedef struct { + void *unicap[VJ_TAG_MAX_STREAM_IN]; + vj_yuv *stream[VJ_TAG_MAX_STREAM_IN]; + vj_client *net[VJ_TAG_MAX_STREAM_IN]; + vj_dv1394 *dv1394[VJ_TAG_MAX_STREAM_IN]; +#ifdef USE_GDK_PIXBUF + vj_picture *picture[VJ_TAG_MAX_STREAM_IN]; +#endif + int width; + int height; + int depth; + int pix_fmt; + int uv_len; +} vj_tag_data; + +typedef struct { + int id; +// char description[100]; + sample_eff_chain *effect_chain[SAMPLE_MAX_EFFECTS]; + int next_id; + int nframes; + int source_type; + char *source_name; + char *method_filename; + int index; + int depth; + int active; + int source; + int video_channel; + int encoder_active; + unsigned long sequence_num; + unsigned long rec_total_bytes; +// char *encoder_base; + unsigned long encoder_total_frames; +// char *encoder_destination; + char encoder_base[256]; + char encoder_destination[256]; + char descr[TAG_MAX_DESCR_LEN]; + int encoder_format; + void *encoder; + lav_file_t *encoder_file; + long encoder_duration; /* in seconds */ + long encoder_num_frames; + long encoder_succes_frames; + int encoder_width; + int encoder_height; + int encoder_max_size; + int color_r; + int color_g; + int color_b; + int opacity; + int fader_active; + int fader_direction; + float fader_val; + float fader_inc; + int selected_entry; + int effect_toggle; + int socket_ready; + int socket_len; + uint8_t *socket_frame; + int n_frames; + void *priv; + void *extra; + void *dict; + char padding[4]; +} vj_tag; + +void *vj_tag_get_dict( int id ); + +int vj_tag_chain_malloc(int e); +int vj_tag_chain_free(int e); +int vj_tag_get_v4l_properties(int t1,int *brightness, int *contrast, int *hue,int *saturation,int *color, int *white ); +int vj_tag_init(int w, int h, int pix_fmt); +int vj_tag_get_n_frames(int t1); +int vj_tag_set_n_frames(int t1, int n_frames); +int vj_tag_get_last_tag(); + +void vj_tag_free(void); +/* Change color of solid stream*/ +int vj_tag_set_stream_color(int t1, int r, int g, int b); +int vj_tag_get_stream_color(int t1, int *r, int *g, int *b ); +/* create a new tag, type is yuv4mpeg or v4l + stream_nr indicates which stream to take of the same type + */ +int vj_tag_new(int type, char *filename, int stream_nr, editlist * el, + int pix_fmt, int channel, int extra); + +/* return 1 if tag exists , 0 otherwise*/ +int vj_tag_exists(int id); + +/* return 1 if tag gets deleted, 0 on error */ +int vj_tag_del(int id); + +int vj_tag_verify_delete(int id, int type ); + +/* return -1 if there is no effect or if it is disabled, otherwise a positive value */ +int vj_tag_get_effect(int t1, int position); + +int vj_tag_size(); + +vj_tag *vj_tag_get(int id); +/* always return effect (-1 = empty) */ +int vj_tag_get_effect_any(int t1, int position); + +/* return -1 on error, otherwise argument gets updated */ +int vj_tag_set_effect(int t1, int position, int effect_id); + +/* return -1 on error, or return e_flag (effect enabled/disabled 1/0)*/ +int vj_tag_get_chain_status(int t1, int position); + +/* return -1 on error, otherwise set new status */ +int vj_tag_set_chain_status(int t1, int position, int new_status); + +/* return 0 on error, other value is trimmer (0 = no trim anyway) */ +int vj_tag_get_trimmer(int t1, int poisition); + +/* return -1 on error, or 1 on succes */ +int vj_tag_set_trimmer(int t1, int position, int value); + +//int vj_tag_get_video_palette(int t1); + +//int vj_tag_set_video_palette(int t1, int video_palette); + +/* return -1 on error or 1 on sucess. tag's effect parameters get copied into args + args must be initialized. + */ +int vj_tag_get_all_effect_args(int t1, int position, int *args, + int arg_len, int n_frame); + +int vj_tag_get_effect_arg(int t1, int p, int arg); + +/* return -1 on error, 1 on success */ +int vj_tag_set_effect_arg(int t1, int position, int argnr, int value); + +/* return -1 on error, 1 on sucess */ +int vj_tag_get_type(int t1); + +/* returns number of tags */ + +int vj_tag_get_logical_index(int t1); + +int vj_tag_clear_chain(int id); + +int vj_tag_get_depth(int t1); + +int vj_tag_set_depth(int t1, int depth); + +int vj_tag_set_active(int t1, int active); + +int vj_tag_get_active(int t1); + +int vj_tag_chain_size(int t1); + +int vj_tag_chain_remove(int t1, int index); + +int vj_tag_set_chain_channel(int t1, int position, int channel); + +int vj_tag_get_chain_channel(int t1, int position); + +void vj_tag_get_source_name(int t1, char *dst); + +int vj_tag_get_chain_source(int t1, int position); + +int vj_tag_set_chain_source(int t1, int position, int source); + +void vj_tag_get_descriptive(int type, char *dst); + +int vj_tag_by_type(int type); + +int vj_tag_get_offset(int t1, int entry); + +int vj_tag_set_offset(int t1, int entry, int offset); + +//int vj_tag_record_frame(int t1, uint8_t *buffer[3]); + +int vj_tag_get_frame(int t1, uint8_t *buffer[3], uint8_t *abuf); + +int vj_tag_get_audio_frame(int t1, uint8_t *dst ); + +int vj_tag_enable(int t1); + +int vj_tag_disable(int t1); + +int vj_tag_sprint_status(int tag_id, int cache,int sa, int ca, int r, int f, int m, int t, int macro,char *str ); + +//int vj_tag_init_encoder(int t1, char *filename, int format, +// int w, int h, double fps, long seconds, int autoplay); + +int vj_tag_stop_encoder(int t1); +int vj_tag_set_brightness(int t1, int value); +int vj_tag_set_contrast(int t1, int value); +int vj_tag_set_color(int t1, int value); +int vj_tag_set_hue(int t1, int value); +int vj_tag_set_white(int t1, int value); +int vj_tag_set_saturation(int t1, int value); +void vj_tag_set_veejay_t(void *info); + +int vj_tag_set_manual_fader(int t1, int value ); + +int vj_tag_get_fader_direction(int t1); +int vj_tag_set_fader_active(int t1, int nframes, int direction); +int vj_tag_set_fade_to_tag(int t1, int t2); +int vj_tag_set_fade_to_sample(int t1, int s1); +int vj_tag_set_fader_val(int t1, float val); +int vj_tag_apply_fader_inc(int t1); +int vj_tag_get_fader_active(int t1); +float vj_tag_get_fader_val(int t1); +float vj_tag_get_fader_inc(int t1); +int vj_tag_reset_fader(int t1); + +int vj_tag_get_effect_status(int s1); +int vj_tag_get_selected_entry(int s1); + +int vj_tag_set_effect_status(int s1, int status); +int vj_tag_set_selected_entry(int s1, int position); +void vj_tag_close_all(); + + +int vj_tag_init_encoder(int t1, char *filename, int format, long nframes); +int vj_tag_record_frame(int t1, uint8_t *buffer[3], uint8_t *abuff, int audio_size); +int vj_tag_get_encoded_frames(int t1); +long vj_tag_get_total_frames(int t1); +long vj_tag_get_duration(int t1); +int vj_tag_reset_autosplit(int t1); +int vj_tag_get_frames_left(int t1); +int vj_tag_encoder_active(int t1); +int vj_tag_get_num_encoded_files(int t1); +int vj_tag_get_encoder_format(int t1); +int vj_tag_get_sequenced_file( int t1, char *descr, int num, char *ext); +int vj_tag_try_filename(int t1, char *filename, int format); +int vj_tag_get_encoded_file(int t1, char *descr); +void vj_tag_reset_encoder( int t1 ); +void vj_tag_record_init(int w, int h); +void vj_tag_get_method_filename(int t1, char *dst); +int vj_tag_get_last_tag(void); +int vj_tag_put( vj_tag *tag ); +int vj_tag_is_deleted(int id); +void vj_tag_close_all(); +int vj_tag_continue_record( int t1 ); +int vj_tag_set_logical_index(int t1, int stream_nr); +int vj_tag_set_description(int t1, char *descr); +int vj_tag_get_description(int t1, char *descr); +void vj_tag_get_by_type( int type, char *descr ); + + +int vj_tag_chain_set_kfs( int s1, int len, unsigned char *data ); +unsigned char * vj_tag_chain_get_kfs( int s1, int entry, int parameter_id, int *len ); +int vj_tag_get_kf_status(int t1, int entry); +int vj_tag_chain_set_kf_status( int s1, int entry, int status ); +int vj_tag_chain_reset_kf( int s1, int entry ); +int vj_tag_var(int t1, int *type, int *fader, int *fx_sta , int *rec_sta, int *active ); +int vj_tag_true_size(); +void *vj_tag_get_kf_port( int s1, int entry ); + +char *vj_tag_scan_devices( void ); +int vj_tag_get_kf_tokens( int s1, int entry, int id, int *start,int *end, int *type); + +int vj_tag_num_devices(); + +#ifdef HAVE_XML2 +void tagCreateStreamFX(xmlNodePtr node, vj_tag *tag); +void tagParseStreamFX(char *file, xmlDocPtr doc, xmlNodePtr cur, void *font); +#endif +#endif diff --git a/veejay-server/libstream/vj-unicap.c b/veejay-server/libstream/vj-unicap.c new file mode 100644 index 00000000..38180f47 --- /dev/null +++ b/veejay-server/libstream/vj-unicap.c @@ -0,0 +1,1195 @@ +/* veejay - Linux VeeJay Unicap interface + * (C) 2002-2006 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#ifdef HAVE_UNICAP +#include +#include +#include +#include +#include // for memset +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include AVUTIL_INC +#include +#ifdef STRICT_CHECKING +#include +#endif + +#define BUFFERS 2 + +//register_callback method for unicap. locking problem. +//#define USE_UNICAP_CB 1 + +/* Using pthreads + * the unicap_wait_buffer blocks until a frame is filled by the capture device. + * In practice, it will block up to 40 ms when playing PAL at 25 fps. Meanwhile, + * we must continue rendering. + */ +typedef struct +{ + unicap_handle_t handle; + unicap_device_t device; + unicap_format_t format_spec; + unicap_format_t format; + unicap_data_buffer_t buffer; + pthread_mutex_t mutex; +#ifndef USE_UNICAP_CB + pthread_t thread; + pthread_attr_t attr; +#endif + uint8_t *priv_buf; + int state; + int deviceID; + int sizes[3]; + int active; + int deinterlace; + int rgb; + int pixfmt; + int shift; + int width; + int height; + void *sampler; + char *ctrl[16]; + int option[16]; + int ready; + int frame_size; + int pause; +} vj_unicap_t; + + +typedef struct +{ + unicap_handle_t handle; + unicap_device_t device; + unicap_format_t format_spec; + unicap_format_t format; + unicap_data_buffer_t buffer; + void *device_list; + int num_devices; + int devices[16]; +} unicap_driver_t; + +static void *unicap_reader_thread(void *data); +static int vj_unicap_start_capture_( void *vut ); +static int vj_unicap_stop_capture_( void *vut ); +extern int get_ffmpeg_pixfmt( int id ); +static void vj_unicap_new_frame_cb( unicap_event_t event, unicap_handle_t handle, + unicap_data_buffer_t *ready_buffer, vj_unicap_t *v ); + +#ifdef STRICT_CHECKING +static void lock__(vj_unicap_t *t, const char *f) { +// veejay_msg(0,"%s: from %s, %p", __FUNCTION__,f,t ); + pthread_mutex_lock(&(t->mutex)); +} +static void unlock__(vj_unicap_t *t, const char *f) { +// veejay_msg(0,"%s: from %s, %p", __FUNCTION__,f,t); + pthread_mutex_unlock(&(t->mutex)); +} +#define lock_(t) lock__(t,__FUNCTION__) +#define unlock_(t) unlock__(t, __FUNCTION__ ) + +#else +static void lock_(vj_unicap_t *t) +{ + pthread_mutex_lock( &(t->mutex )); +} +static void unlock_(vj_unicap_t *t) +{ + pthread_mutex_unlock( &(t->mutex )); +} +#endif + +static int vj_unicap_scan_enumerate_devices(void *unicap) +{ + int i=0; + unicap_driver_t *ud = (unicap_driver_t*) unicap; + char key[64]; + + memset( &(ud->device) , 0, sizeof(unicap_device_t)); + + unicap_void_device(&(ud->device)); + + + while( SUCCESS( unicap_enumerate_devices( NULL, &(ud->device), i )) ) + { + char *device_name = strdup( ud->device.identifier ); + void *device_port = vpn( VEVO_ANONYMOUS_PORT ); + char *device_location = strdup( ud->device.device ); + int error = vevo_property_set( device_port, + "name", + VEVO_ATOM_TYPE_STRING, + 1, + &device_name); + + veejay_msg( VEEJAY_MSG_DEBUG, "\tDevice %d: %s (%s)", i, ud->device.identifier, device_location ); + +#ifdef STRICT_CHECKING + assert( error == VEVO_NO_ERROR ); +#endif + sprintf(key ,"%d", i ); + error = vevo_property_set( ud->device_list, key, VEVO_ATOM_TYPE_PORTPTR,1,&device_port ); + +#ifdef STRICT_CHECKING + assert( error == VEVO_NO_ERROR ); +#endif + error = vevo_property_set( device_port, + "device", + VEVO_ATOM_TYPE_STRING, + 1, + &device_location ); +#ifdef STRICT_CHECKING + assert( error == VEVO_NO_ERROR ); +#endif + + free( device_location ); + free(device_name); + i++; + } + return i; +} + + +char **vj_unicap_get_devices(void *unicap, int *n_dev) +{ + int i,j=0; + unicap_driver_t *ud = (unicap_driver_t*) unicap; + char **result = NULL; + + if( ud->num_devices <= 0 ) + { + veejay_msg(0, "I didn't find any capture devices"); + return NULL; + } + + char **items = vevo_list_properties( ud->device_list ); + if(! items ) + { + veejay_msg(0, "Empty list of capture devices"); + return NULL; + } + + int len = 1; + int error = 0; + for ( i = 0; items[i] != NULL ; i ++ ) + { + error = vevo_property_get( ud->device_list,items[i], 0, NULL ); + if( error == VEVO_NO_ERROR ) + len ++; + } + + result = vj_calloc( sizeof(char*) * len ); + for( i = 0; items[i] != NULL ; i ++ ) + { + void *port = NULL; + error = vevo_property_get( ud->device_list, items[i], 0, &port ); + if( error == VEVO_NO_ERROR ) + { + size_t name_len = vevo_property_element_size( port, "name", 0 ); + char *name = (char*) vj_calloc( name_len ); + vevo_property_get( port, "name",0,&name ); + name_len = vevo_property_element_size( port, "device", 0 ); + char *loc = (char*) vj_calloc( name_len ); + vevo_property_get( port, "device", 0, &loc ); + int new_len = strlen(loc) + strlen(name) + 8; + + char *text = vj_calloc( new_len ); + snprintf(text, new_len, "%03d%s%03d%s",strlen(name), name,strlen(loc), loc ); + + free(name); + free(loc); + + result[j] = strdup(text ); + free(text); + j++; + } + free(items[i]); + } + free(items ); + + *n_dev = j; + return result; +} + +void *vj_unicap_init(void) +{ + unicap_driver_t *ud = (unicap_driver_t*) vj_calloc(sizeof(unicap_driver_t)); + ud->device_list = vpn( VEVO_ANONYMOUS_PORT ); + ud->num_devices = vj_unicap_scan_enumerate_devices( (void*) ud ); + veejay_msg(1, "Found %d capture devices on this system", ud->num_devices); + return ud; +} + +void vj_unicap_deinit(void *dud ) +{ + unicap_driver_t *ud = (unicap_driver_t*) dud; + if( ud ) + { + //vevo_port_recursive_free( ud->device_list ); + free(ud); + } + dud = NULL; +} + +int vj_unicap_property_is_menu( void *ud, char *key ) +{ + unicap_property_t property; + unicap_property_t property_spec; + int i; + unicap_void_property( &property_spec ); + unicap_void_property( &property ); + vj_unicap_t *vut = (vj_unicap_t*) ud; + unicap_lock_properties( vut->handle ); + + for( i = 0; SUCCESS( unicap_enumerate_properties( vut->handle, + &property_spec, &property, i ) ); i ++ ) + { + unicap_void_property( &property ); + + unicap_get_property( vut->handle, &property); + if( strcmp( property.identifier, key ) == 0 ) + { + unicap_unlock_properties( vut->handle); + if( property.type == UNICAP_PROPERTY_TYPE_MENU ) + return 1; + else + return 0; + } + } + unicap_unlock_properties( vut->handle); + return 0; +} +int vj_unicap_property_is_range( void *ud, char *key ) +{ + unicap_property_t property; + unicap_property_t property_spec; + int i; + unicap_void_property( &property_spec ); + unicap_void_property( &property ); + vj_unicap_t *vut = (vj_unicap_t*) ud; + unicap_lock_properties( vut->handle ); + + for( i = 0; SUCCESS( unicap_enumerate_properties( vut->handle, + &property_spec, &property, i ) ); i ++ ) + { + unicap_get_property( vut->handle, &property); + if( strcmp( property.identifier, key ) == 0 ) + { + unicap_unlock_properties( vut->handle); + if( property.type == UNICAP_PROPERTY_TYPE_RANGE ) + return 1; + else + return 0; + } + } + unicap_unlock_properties( vut->handle); + return 0; +} + +int vj_unicap_select_value( void *ud, int key, double attr ) +{ + unicap_property_t property; + unicap_property_t property_spec; + int i; + unicap_void_property( &property_spec ); + unicap_void_property( &property ); + vj_unicap_t *vut = (vj_unicap_t*) ud; + + if(! vut->ctrl[key] ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Capture device %s has no property %x", + vut->device.identifier, key ); + return 0; + } + + unicap_lock_properties( vut->handle ); + + for( i = 0; SUCCESS( unicap_enumerate_properties( vut->handle, + &property_spec, &property, i ) ); i ++ ) + { + unicap_get_property( vut->handle, &property); + if( strcmp( property.identifier, vut->ctrl[key] ) == 0 ) + { + if( property.type == UNICAP_PROPERTY_TYPE_MENU ) + { + int idx = vut->option[ key ]; + veejay_strncpy( property.menu_item, property.menu.menu_items[idx], strlen( property.menu.menu_items[idx]) ); + unicap_set_property( vut->handle, &property ); + unicap_unlock_properties( vut->handle ); + return 1; + } + if( property.type == UNICAP_PROPERTY_TYPE_RANGE ) + { + double fval = attr; + if(fval < property.range.min) + fval = property.range.min; + else if(fval > property.range.max) + fval = property.range.max; + property.value = fval; + unicap_set_property( vut->handle, &property ); + unicap_unlock_properties( vut->handle ); + return 1; + } + } + } + unicap_unlock_properties( vut->handle ); + + return 0; +} + +int vj_unicap_get_range( void *ud, char *key, double *min , double *max ) +{ + unicap_property_t property; + unicap_property_t property_spec; + int i; + unicap_void_property( &property_spec ); + unicap_void_property( &property ); + vj_unicap_t *vut = (vj_unicap_t*) ud; + unicap_lock_properties( vut->handle ); + + for( i = 0; SUCCESS( unicap_enumerate_properties( vut->handle, + &property_spec, &property, i ) ); i ++ ) + { + // memset( &property,0,sizeof(unicap_property_t)); + unicap_get_property( vut->handle, &property); + + if( strcasecmp( property.identifier, key ) == 0 ) + { + + if( property.type == UNICAP_PROPERTY_TYPE_MENU ) + { + *min = 0.0; + *max = (double) property.menu.menu_item_count; + unicap_unlock_properties( vut->handle ); + + return 1; + } + if( property.type == UNICAP_PROPERTY_TYPE_RANGE ) + { + *min = property.range.min; + *max = property.range.max; + unicap_unlock_properties( vut->handle ); + + return 1; + } + } + } + unicap_unlock_properties( vut->handle ); + + return 0; +} + +char **vj_unicap_get_list( void *ud ) +{ + unicap_property_t property; + unicap_property_t property_spec; + int i; + unicap_void_property( &property_spec ); + vj_unicap_t *vut = (vj_unicap_t*) ud; + unicap_lock_properties( vut->handle ); + + for( i = 0; SUCCESS( unicap_enumerate_properties( vut->handle, + &property_spec, &property, i ) ); i ++ ) + { + } + + int n = i; + + char **res = (char**) vj_malloc(sizeof(char*) * (n+1) ); + memset(res, 0,sizeof(char*) * (n+1)); + + for( i = 0;i < n; i ++ ) + { + if( SUCCESS( unicap_enumerate_properties(vut->handle, + &property_spec,&property,i ) ) ) + { + res[i] = strdup( property.identifier ); + } + } + + unicap_unlock_properties( vut->handle ); + + return res; +} + + +int vj_unicap_get_value( void *ud, char *key, int atom_type, void *value ) +{ + unicap_property_t property; + unicap_property_t property_spec; + int i; + unicap_void_property( &property_spec ); + vj_unicap_t *vut = (vj_unicap_t*) ud; + unicap_lock_properties( vut->handle ); + + for( i = 0; SUCCESS( unicap_enumerate_properties( vut->handle, + &property_spec, &property, i ) ); i ++ ) + { + unicap_get_property( vut->handle, &property); + + if( strcmp( property.identifier, key ) != 0 ) + continue; + + if( property.type == UNICAP_PROPERTY_TYPE_MENU ) + { +#ifdef STRICT_CHECKING + assert( atom_type == VEVO_ATOM_TYPE_DOUBLE ); +#endif + int n = property.menu.menu_item_count; + int j; + for( j =0; j < n; j ++ ) + { + if( strcmp( property.menu_item, property.menu.menu_items[j] ) == 0 ) + { + double *dval = value; + *dval = (double) j; + unicap_unlock_properties( vut->handle ); + + return 1; + } + } + } + if( property.type == UNICAP_PROPERTY_TYPE_RANGE ) + { +#ifdef STRICT_CHECKING + assert( atom_type == VEVO_ATOM_TYPE_DOUBLE ); +#endif + double *dval = value; + *dval = property.value; + unicap_unlock_properties( vut->handle ); + + return 1; + } + } + unicap_unlock_properties( vut->handle ); + + return 0; +} + +int vj_unicap_num_capture_devices( void *dud ) +{ + unicap_driver_t *ud = (unicap_driver_t*) dud; + return ud->num_devices; +} + +void *vj_unicap_new_device( void *dud, int device_id ) +{ + unicap_driver_t *ud = (unicap_driver_t*) dud; + if( ud->num_devices <= 0 ) + { + veejay_msg(0, "I didn't find any capture devices"); + return NULL; + } + if( ud->devices[ device_id ] ) + { + veejay_msg(0, "Device ID %d already openened in use by Veejay"); + return NULL; + } + + if( device_id < 0 || device_id >= ud->num_devices ) + { + veejay_msg(0, "I only found %d devices, requested: %d", ud->num_devices,device_id ); + return NULL; + } + + veejay_msg(VEEJAY_MSG_DEBUG, "Trying to open Capture Device %d", device_id); + + vj_unicap_t *vut = (vj_unicap_t*) vj_calloc(sizeof(vj_unicap_t)); + veejay_memset(vut->ctrl, 0 , sizeof(char*) *16 ); + veejay_memset(vut->option,0, sizeof(int) * 16 ); + vut->deviceID = device_id; + + if( !SUCCESS( unicap_enumerate_devices( NULL, &(vut->device), device_id ) ) ) + { + veejay_msg(0, "Failed to get info for device '%s'\n", vut->device.identifier ); + free(vut); + return NULL; + } + + if( !SUCCESS( unicap_open( &(vut->handle), &(vut->device) ) ) ) + { + veejay_msg(0, "Failed to open capture device '%s'\n", vut->device.identifier ); + free(vut); + return NULL; + } + + ud->devices[ vut->deviceID ] = 1; + veejay_msg(2, "Using device '%s'", vut->device.identifier); + + pthread_mutex_init( &(vut->mutex), NULL ); + + return (void*) vut; +} +static unsigned int +get_fourcc(char * fourcc) +{ + return ((((unsigned int)(fourcc[0])<<0)| + ((unsigned int)(fourcc[1])<<8)| + ((unsigned int)(fourcc[2])<<16)| + ((unsigned int)(fourcc[3])<<24))); +} + +static inline int get_shift_size(int fmt) +{ + switch(fmt) + { + case FMT_420: + case FMT_420F: + return 1; + case FMT_422: + case FMT_422F: + return 1; + default: + break; + } + return 0; +} +int vj_unicap_configure_device( void *ud, int pixel_format, int w, int h ) +{ + vj_unicap_t *vut = (vj_unicap_t*) ud; + unicap_lock_properties( vut->handle ); + + unicap_void_format( &(vut->format_spec)); + + unsigned int fourcc = 0; + vut->frame_size = vut->sizes[0] = w * h; + + switch(pixel_format) + { + case FMT_420: + case FMT_420F: + fourcc = get_fourcc( "YU12" ); + vut->sizes[1] = (w*h)/4; + vut->sizes[2] = vut->sizes[1]; + break; + case FMT_422: + case FMT_422F: + fourcc = get_fourcc( "422P" ); + vut->sizes[1] = (w*h)/2; + vut->sizes[2] = vut->sizes[1]; + break; +#ifdef STRICT_CHECKING + default: + veejay_msg(0, + "Unknown pixel format used to configure device: %d", pixel_format); + assert(0); + break; +#endif + } + vut->frame_size += vut->sizes[1]; + vut->frame_size += vut->sizes[2]; + vut->pixfmt = get_ffmpeg_pixfmt( pixel_format ); + vut->shift = get_shift_size(pixel_format); + int i; + int j; + int found_native = 0; + + for( i = 0; SUCCESS( unicap_enumerate_formats( vut->handle, NULL, &(vut->format), i ) ); i ++ ) + { + if( fourcc == vut->format.fourcc ) + { + veejay_msg(VEEJAY_MSG_INFO, "Found native colorspace '%s'", vut->format.identifier); + found_native = 1; + break; + } + } + + if( found_native ) + { + vut->deinterlace = 0; + } + else + { + unsigned int rgb24_fourcc = get_fourcc( "RGB3" ); + unsigned int rgb_fourcc = get_fourcc( "RGB4" ); + unsigned int bgr24_fourcc = get_fourcc( "BGR3"); + unicap_format_t rgb_spec, rgb_format; + unicap_void_format( &rgb_spec); + veejay_msg(1, "Capture device has no support for YUV, trying RGB formats"); + + for( i = 0; + SUCCESS( unicap_enumerate_formats( vut->handle, &rgb_spec, &rgb_format, i ) ); i ++ ) + { + if( rgb24_fourcc == rgb_format.fourcc ) + { + veejay_msg(0, "Capture device supports %s, software conversion RGB24 -> YUV enabled", + rgb_format.identifier); + vut->rgb = 2; + vut->frame_size = w * h * 3; + break; + } else if ( rgb_fourcc == rgb_format.fourcc ) + { + veejay_msg(0, "Capture device supports %s, software conversion RGB32 -> YUV enabled", + rgb_format.identifier ); + vut->rgb = 1; + vut->frame_size = w * h * 4; + break; + } else if ( bgr24_fourcc == rgb_format.fourcc ) + { + veejay_msg(0, "Capture device supports %s, software conversion BGR24 -> YUV enabled"); + vut->rgb = 3; + vut->frame_size = w * h * 3; + break; + } + } + + if(!vut->rgb) + { + veejay_msg(0, "No matching formats found. Capture device not supported."); + unicap_unlock_properties( vut->handle ); + return 0; + } + else + { + veejay_memcpy( &(vut->format), &rgb_format, sizeof( rgb_format )); + } + } + + unicap_format_t test; + unicap_void_format( &test); + + vut->format.buffer_type = UNICAP_BUFFER_TYPE_USER; + vut->format.size.width = w; + vut->format.size.height = h; + vut->format.buffer_size = vut->frame_size; + vut->width = w; + vut->height = h; + + if( !SUCCESS( unicap_set_format( vut->handle, &(vut->format) ) ) ) + { + veejay_msg(VEEJAY_MSG_ERROR,"Cannot configure capture device to use %dx%d %s", + w,h, vut->format.identifier ); + unicap_unlock_properties( vut->handle ); + return 0; + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Okay, Capture device delivers %s image, %d x %d buf=%d bytes, type=%x", + vut->format.identifier, vut->format.size.width,vut->format.size.height, + vut->format.buffer_size, vut->format.buffer_type ); + } +// buffer alloced + char **properties = vj_unicap_get_list( vut ); + if(!properties) + { + veejay_msg(0, "No properties for this capture device ?!"); + unicap_unlock_properties( vut->handle ); + return 1; + } + + for( i = 0; properties[i] != NULL && i < 16; i ++ ) + { + if(strncasecmp( properties[i], "brightness",10 ) == 0 ) { + vut->ctrl[UNICAP_BRIGHTNESS] = strdup( properties[i] ); + } else if (strncasecmp( properties[i], "color", 5 ) == 0 ) { + vut->ctrl[UNICAP_COLOR] = strdup( properties[i]); + } else if (strncasecmp( properties[i], "saturation", 10 ) == 0 ) { + vut->ctrl[UNICAP_SATURATION] = strdup( properties[i] ); + } else if (strncasecmp( properties[i], "hue", 3 ) == 0 ) { + vut->ctrl[UNICAP_HUE] = strdup( properties[i] ); + } else if(strncasecmp( properties[i], "white", 5) == 0 ) { + vut->ctrl[UNICAP_WHITE] = strdup(properties[i]); + } else if (strncasecmp( properties[i], "contrast", 8 ) == 0 ) { + vut->ctrl[UNICAP_CONTRAST] = strdup( properties[i] ); + } else if (strncasecmp( properties[i], "video source",12) == 0 ) { + unicap_property_t p; + unicap_void_property( &p ); + strcpy( p.identifier, properties[i] );//, strlen( properties[i])); + unicap_get_property( vut->handle, &p ); + for(j=0;joption[UNICAP_SOURCE0+j] = j; + vut->ctrl[UNICAP_SOURCE0+j] = strdup(properties[i]); + } + }else if (strncasecmp( properties[i], "video norm",10) == 0 ) { + unicap_property_t p; + unicap_void_property( &p ); + strcpy( p.identifier, properties[i] ); //, strlen(i)); + unicap_get_property( vut->handle, &p ); + for(j=0;jctrl[UNICAP_PAL] = strdup(properties[i]); + vut->option[UNICAP_PAL] = j; + } + else if( strncasecmp( p.menu.menu_items[j], "ntsc", 4 ) == 0 ) + { + vut->ctrl[UNICAP_NTSC] = strdup(properties); + vut->option[UNICAP_NTSC] = j; + } + } + } + + free( properties[i]); + } + free(properties); + + + unicap_unlock_properties( vut->handle ); + + return 1; +} + +int vj_unicap_start_capture( void *vut ) +{ + vj_unicap_t *v = (vj_unicap_t*) vut; +#ifdef STRICT_CHECKING + assert( v->priv_buf == NULL ); + assert( v->active == 0 ); +#endif + + veejay_msg(VEEJAY_MSG_INFO,"Preparing to capture from device %s", v->device.identifier ); +#ifndef USE_UNICAP_CB + pthread_attr_init(&(v->attr) ); + pthread_attr_setdetachstate(&(v->attr), PTHREAD_CREATE_DETACHED ); + + int err = pthread_create( &(v->thread), NULL, + unicap_reader_thread, vut ); + + pthread_attr_destroy( &(v->attr) ); + + if( err == 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "Spawned new capture thread for device %s", v->device.identifier ); + return 1; + } + v->state = 0; + veejay_msg(VEEJAY_MSG_ERROR, + "Unable to start capture thread for device %s: %s", v->device.identifier, strerror(err)); + return 0; +#else + if(!vj_unicap_start_capture_(vut)) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to start capture thread for device %s", + v->device.identifier ); + else + { + veejay_msg(VEEJAY_MSG_INFO, "Capturing from device %s", v->device.identifier ); + return 1; + } + + return 0; +#endif +} + +int vj_unicap_stop_capture( void *vut ) +{ + vj_unicap_t *v = (vj_unicap_t*) vut; + + veejay_msg(VEEJAY_MSG_INFO, "Stopping capture from device %s", v->device.identifier ); +#ifndef USE_UNICAP_CB + lock_ ( vut ); + v->state = 0; + unlock_( vut ); + + usleep( 200 * 1000 ); //@ bad way to sync threads + + lock_( vut ); + if( v->active ) + veejay_msg(VEEJAY_MSG_INFO, "Capture thread still running. Cancel %s", v->device.identifier); + unlock_(vut); + pthread_cancel( v->thread ); + + if(v->active) + { + veejay_msg(VEEJAY_MSG_WARNING, "Cleaning up capture thread from device %s",v->device.identifier); + vj_unicap_stop_capture_( vut ); + } +#else + //@todo +#endif + return 1; +} + + + + +static int vj_unicap_start_capture_( void *vut ) +{ + vj_unicap_t *v = (vj_unicap_t*) vut; +#ifdef STRICT_CHECKING + assert( v->priv_buf == NULL ); + assert( v->buffer.data == NULL ); + assert( v->active == 0 ); + assert( v->state == 0 ); +#endif + v->priv_buf = (uint8_t*) vj_calloc( v->width * v->height * 4 * sizeof(uint8_t) ); + v->buffer.data = vj_malloc( v->frame_size * sizeof(uint8_t) ); + + if(!v->rgb) + { + veejay_memset( v->buffer.data, 0, (v->width * v->height)); + veejay_memset( v->buffer.data + (v->width*v->height), 128, v->frame_size - (v->width*v->height)); + } + else + veejay_memset( v->buffer.data, 0, v->frame_size); + + v->buffer.buffer_size = v->format.buffer_size; + + veejay_memset( v->priv_buf , 0, v->sizes[0]); + veejay_memset( v->priv_buf + v->sizes[0], 128, v->sizes[1] ); + veejay_memset( v->priv_buf + v->sizes[0] + v->sizes[1] , 128, v->sizes[2] ); +#ifdef USE_UNICAP_CB + unicap_register_callback( v->handle, UNICAP_EVENT_NEW_FRAME, + (unicap_callback_t) vj_unicap_new_frame_cb, &v ); +#endif + if( !SUCCESS( unicap_start_capture( v->handle ) ) ) + { + veejay_msg( 0, "Failed to start capture on device: %s\n", v->device.identifier ); + free(v->priv_buf); + v->priv_buf = NULL; + return 0; + } +#ifndef USE_UNICAP_CB + if( ! SUCCESS( unicap_queue_buffer( v->handle, &(v->buffer) )) ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d Failed to queue buffer ",__FUNCTION__,__LINE__); + free(v->priv_buf); + v->priv_buf = NULL; + return 0; + } +#endif + v->active = 1; +#ifdef USE_UNICAP_CB + v->state = 1; + veejay_msg(VEEJAY_MSG_INFO,"Started capture from device %s", v->device.identifier ); +#else + veejay_msg(VEEJAY_MSG_INFO, "Thread: started capture from device %s", v->device.identifier ); +#endif + return 1; +} + +int vj_unicap_get_pause( void *vut ) { + vj_unicap_t *v = (vj_unicap_t*) vut; + return v->pause; +} + +void vj_unicap_set_pause( void *vut , int status ) { + vj_unicap_t *v = (vj_unicap_t*) vut; + lock_(vut); + v->pause = status; + unlock_(vut); +} + +int vj_unicap_grab_frame( void *vut, uint8_t *buffer[3], const int width, const int height ) +{ + vj_unicap_t *v = (vj_unicap_t*) vut; + lock_( vut ); + + if(v->active == 0 || v->state == 0 ) + { + unlock_(vut); + return 0; + } + + if( v->pause ) + { + unlock_(vut); + return 1; + } + +#ifdef STRICT_CHECKING + assert(v->priv_buf != NULL ); +#endif + uint8_t *src[3] = { + v->priv_buf, + v->priv_buf + v->sizes[0], + v->priv_buf + v->sizes[0] + v->sizes[1] + }; + veejay_memcpy( buffer[0], src[0], v->sizes[0] ); + veejay_memcpy( buffer[1], src[1], v->sizes[1] ); + veejay_memcpy( buffer[2], src[2], v->sizes[2]); + + unlock_(vut); + return 1; +} +#ifndef USE_UNICAP_CB +int vj_unicap_grab_a_frame( void *vut ) +{ + vj_unicap_t *v = (vj_unicap_t*) vut; + unicap_data_buffer_t *ready_buffer = NULL; + + uint8_t *buffer[3] = + { + v->priv_buf, + v->priv_buf + v->sizes[0], + v->priv_buf + v->sizes[0] + v->sizes[1] + }; + + if(!v->active) + { + veejay_msg(VEEJAY_MSG_ERROR, "Capture not started on device %d", v->deviceID); + return 0; + } + if(! SUCCESS(unicap_wait_buffer(v->handle, &ready_buffer ) )) + { + veejay_msg(VEEJAY_MSG_WARNING, "Failed to wait for buffer from device %s", + v->device.identifier ); + return 1; + } + if( ready_buffer->buffer_size <= 0 ) + { + veejay_msg(0, "Unicap returned a buffer of size 0!"); + return 0; + } + + if(!ready_buffer->data ) + { + veejay_msg(0, "Unicap returned a NULL buffer!"); + return 0; + } + + lock_(vut); + + if( v->state == 0 || v->active == 0 ) + { + unlock_(vut); + return 0; + } + + if( v->deinterlace ) + { + yuv_deinterlace( + buffer, + v->width, + v->height, + v->pixfmt, + v->shift, + ready_buffer->data, + ready_buffer->data + v->sizes[0], + ready_buffer->data + v->sizes[0] + v->sizes[1] + ); + } + else + { + if(!v->rgb) + { + veejay_memcpy( buffer[0], ready_buffer->data, v->sizes[0] ); + veejay_memcpy( buffer[1], ready_buffer->data + v->sizes[0], v->sizes[1] ); + veejay_memcpy( buffer[2], ready_buffer->data + v->sizes[0] +v->sizes[1] , v->sizes[2]); + } + else + { + int dst_fmt = 0; + switch(v->rgb) + { + case 1: dst_fmt=PIX_FMT_RGBA32; break; + case 2: dst_fmt=PIX_FMT_RGB24; break; + case 3: dst_fmt=PIX_FMT_BGR24; break; + default: +#ifdef STRICT_CHECKING + assert(0); +#endif + break; + } + + VJFrame *srci = yuv_rgb_template( ready_buffer->data, v->width,v->height, dst_fmt ); + VJFrame *dsti = yuv_yuv_template( buffer[0],buffer[1],buffer[2], v->width,v->height, v->pixfmt ); + + yuv_convert_any_ac(srci,dsti, srci->format, dsti->format ); + + free(srci); + free(dsti); + } + } + if( ! SUCCESS( unicap_queue_buffer( v->handle, ready_buffer) )) + { + veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d Failed to queue buffer ",__FUNCTION__,__LINE__); + return 0; + } + unlock_(vut); + + return 1; +} +#else +static void vj_unicap_new_frame_cb( unicap_event_t event, unicap_handle_t handle, + unicap_data_buffer_t *ready_buffer, vj_unicap_t *v ) +{ +veejay_msg(0, "%s: wait",__FUNCTION__); + lock_(v); + + uint8_t *buffer[3] = + { + v->priv_buf, + v->priv_buf + v->sizes[0], + v->priv_buf + v->sizes[0] + v->sizes[1] + }; + + if( v->deinterlace ) + { + yuv_deinterlace( + buffer, + v->width, + v->height, + v->pixfmt, + v->shift, + ready_buffer->data, + ready_buffer->data + v->sizes[0], + ready_buffer->data + v->sizes[0] + v->sizes[1] + ); + } + else + { + if(!v->rgb) + { + veejay_memcpy( buffer[0], ready_buffer->data, v->sizes[0] ); + veejay_memcpy( buffer[1], ready_buffer->data + v->sizes[0], v->sizes[1] ); + veejay_memcpy( buffer[2], ready_buffer->data + v->sizes[0] +v->sizes[1] , v->sizes[2]); + } + else + { + int dst_fmt = 0; + switch(v->rgb) + { + case 1: dst_fmt=PIX_FMT_RGBA32; break; + case 2: dst_fmt=PIX_FMT_RGB24; break; + case 3: dst_fmt=PIX_FMT_BGR24; break; + default: +#ifdef STRICT_CHECKING + assert(0); +#endif + break; + } + + VJFrame *srci = yuv_rgb_template( ready_buffer->data, v->width,v->height, dst_fmt ); + VJFrame *dsti = yuv_yuv_template( buffer[0],buffer[1],buffer[2], v->width,v->height, v->pixfmt ); + + yuv_convert_any_ac(srci,dsti, srci->format, dsti->format ); + + free(srci); + free(dsti); + } + } +veejay_msg(0, "%s: grabbed!",__FUNCTION__); + unlock_(v); +} +#endif + + +static int vj_unicap_stop_capture_( void *vut ) +{ + vj_unicap_t *v = (vj_unicap_t*) vut; + + + if( !SUCCESS( unicap_stop_capture( v->handle ) ) ) + { + veejay_msg(0,"Failed to stop capture on device: %s\n", v->device.identifier ); + } + + if(v->priv_buf) + free(v->priv_buf); + if(v->buffer.data) + free(v->buffer.data); + v->priv_buf = NULL; + v->buffer.data = NULL; + v->active = 0; + v->state = 0; + veejay_msg(VEEJAY_MSG_INFO, "Stopped capture from device %s", + v->device.identifier ); + return 1; +} + +int vj_unicap_status(void *vut) +{ + if(!vut) return 0; + vj_unicap_t *v = (vj_unicap_t*) vut; + return v->active; +} + +#ifndef USE_UNICAP_CB +static void *unicap_reader_thread(void *data) +{ + vj_unicap_t *v = (vj_unicap_t*) data; + + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + + + if(! vj_unicap_start_capture_( data ) ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Thread:Unable to start capture from device %s", v->device.identifier); + if(v->priv_buf) + free(v->priv_buf); + if(v->buffer.data) + free(v->buffer.data); + v->priv_buf = NULL; + v->buffer.data = NULL; + v->active = 0; + v->state = 0; + pthread_exit(NULL); + return NULL; + } + + v->state = 1; // thread run + + while( v->state ) + { + if( v->active ) + { + if(vj_unicap_grab_a_frame( data )==0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to grab a frame from capture device %d", v->deviceID); + v->state = 0; + } + } + } + + veejay_msg(VEEJAY_MSG_INFO, "Thread was told to stop capturing from device %d", v->deviceID); + vj_unicap_stop_capture_(data); + + pthread_exit(NULL); + + return NULL; +} +#endif +void vj_unicap_free_device( void *dud, void *vut ) +{ + vj_unicap_t *v = (vj_unicap_t*) vut; + unicap_driver_t *d = (unicap_driver_t*) dud; + + if( v->active ) + vj_unicap_stop_capture( vut ); + + d->devices[ v->deviceID ] = 0; + + if( v->handle ) + { + if( !SUCCESS( unicap_close( v->handle ) ) ) + { + veejay_msg(0, "Failed to close the device: %s\n", v->device.identifier ); + } + } + + int i = 0; + for( i = 0 ; i < 16 ; i ++ ) + { + if(v->ctrl[i]) + free(v->ctrl[i]); + } + + free( v ); + v = NULL; +} +#endif diff --git a/veejay-server/libstream/vj-unicap.h b/veejay-server/libstream/vj-unicap.h new file mode 100644 index 00000000..ca313396 --- /dev/null +++ b/veejay-server/libstream/vj-unicap.h @@ -0,0 +1,53 @@ +/* veejay - Linux VeeJay Unicap interface + * (C) 2002-2006 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJUNICAPHH +#define VJUNICAPHH +void *vj_unicap_init(void); +void vj_unicap_deinit(void *dud ); +int vj_unicap_num_capture_devices( void *dud ); +char **vj_unicap_get_devices(void *unicap, int *n); +void *vj_unicap_new_device( void *ud, int device_id ); +int vj_unicap_configure_device( void *ud, int pixel_format, int w, int h ); +int vj_unicap_start_capture( void *vut ); +int vj_unicap_grab_frame( void *vut, uint8_t *buffer[3], const int w, const int h ); +int vj_unicap_stop_capture( void *vut ); +int vj_unicap_status(void *vut); +void vj_unicap_free_device( void *dud, void *vut ); +char **vj_unicap_get_list( void *ud ); +int vj_unicap_get_value( void *ud, char *key, int atom_type, void *value ); +int vj_unicap_select_value( void *ud, int key, double ); + +void vj_unicap_set_pause( void *vut , int status ); +int vj_unicap_get_pause( void *vut ); + +#define UNICAP_BRIGHTNESS 0 +#define UNICAP_COLOR 1 +#define UNICAP_SATURATION 2 +#define UNICAP_HUE 3 +#define UNICAP_CONTRAST 4 +#define UNICAP_SOURCE0 5 +#define UNICAP_SOURCE1 6 +#define UNICAP_SOURCE2 7 +#define UNICAP_SOURCE3 8 +#define UNICAP_SOURCE4 9 +#define UNICAP_PAL 10 +#define UNICAP_NTSC 11 +#define UNICAP_WHITE 12 +#endif + diff --git a/veejay-server/libstream/vj-vloopback.c b/veejay-server/libstream/vj-vloopback.c new file mode 100644 index 00000000..85d407a2 --- /dev/null +++ b/veejay-server/libstream/vj-vloopback.c @@ -0,0 +1,492 @@ +/* veejay - Linux VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + Put vloopback back in place + Re-used large portions of dc1394_vloopback.c + from Dan Dennedy + +*/ + +/* + vloopback pusher (using pipes) + If someone wants to implement mmap, add SIGIO to the signal catcher + and use mutexes for asynchronosouly handling IO. I am too lazy. + */ + +#include +#ifdef HAVE_V4L +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define VLOOPBACK_MMAP 0 // commented out +#define VLOOPBACK_PIPE 1 +#define VLOOPBACK_N_BUFS 2 + +typedef struct +{ + char *dev_name; /* device name */ + int palette; /* palette from vjframe */ + int width; + int height; + int norm; + int mode; /* PAL or NTSC */ + int fd; + int size; /* size of image out_buf */ + uint8_t *out_buf; + uint8_t *out_map; /* mmap segment */ +} vj_vloopback_t; + + +/* Open the vloopback device */ + +void *vj_vloopback_open(const char *device_name, int norm, int mode, + int w, int h, int pixel_format) +{ + void *ret = NULL; + vj_vloopback_t *v = (vj_vloopback_t*) vj_malloc(sizeof(vj_vloopback_t)); + if(!v) return ret; + + memset(v , 0, sizeof(vj_vloopback_t )); + + v->fd = open( device_name, O_RDWR ); + v->norm = norm; + v->mode = mode; + v->width = w; + v->height = h; + v->palette = (pixel_format == 1 ? VIDEO_PALETTE_YUV422P : + VIDEO_PALETTE_YUV420P ); + + if(!v->fd) + { + if(v) free(v); + veejay_msg(VEEJAY_MSG_ERROR, "Cannot open vloopback %s", + device_name ); + return ret; + } + + v->dev_name = strdup( device_name ); + + ret = (void*) v; + + veejay_msg(VEEJAY_MSG_DEBUG, + "Vloopback %s size %d x %d, palette YUV42%sP", + v->dev_name, + v->width, + v->height, + (pixel_format == 1 ? "2" : "0" ) ); + + return (void*) ret; +} + +int vj_vloopback_get_mode( void *vloop ) +{ + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + return v->mode; +} + +/* write mode*/ +int vj_vloopback_start_pipe( void *vloop ) +{ + struct video_capability caps; + struct video_window win; + struct video_picture pic; + + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + + if(!v) return 0; + + if(v->mode != VLOOPBACK_PIPE) + veejay_msg(VEEJAY_MSG_ERROR,"Program error"); + + /* the out_palette defines what format ! */ + + /* get capabilities */ + if( ioctl( v->fd, VIDIOCGCAP, &caps ) < 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Cant get video capabilities"); + return 0; + } + /* get picture */ + if( ioctl( v->fd, VIDIOCGPICT, &pic ) < 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Cant get video picture"); + return 0; + } + /* set palette */ + pic.palette = v->palette; + if( ioctl( v->fd, VIDIOCSPICT, &pic ) < 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Cant set video picture (palette %d)",v->palette); + return 0; + } + /* set window */ + win.width = v->width; + win.height = v->height; + if( ioctl( v->fd, VIDIOCSWIN, &win ) < 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG ,"Cant set video window %d x %d", + v->width,v->height ); + return 0; + } + + int len = v->width * v->height ; + int vshift = (v->palette == + VIDEO_PALETTE_YUV422P ? 0 : 1 ); + int uv_len = (v->width >> 1 ) * (v->height >> vshift); + + v->size = len + (2 * uv_len); + + veejay_msg(VEEJAY_MSG_DEBUG, + "vloopback pipe (Y plane %d bytes, UV plane %d bytes) H=%d, V=%d", + len,uv_len,1,vshift ); + + v->out_buf = (uint8_t*) vj_malloc(sizeof(uint8_t) * v->size ); + + memset(v->out_buf, 0 , v->size ); + + if(!v->out_buf) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cant allocate sufficient memory for vloopback"); + return 0; + } + return 1; +} + +int vj_vloopback_write_pipe( void *vloop ) +{ + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + if(!v) return 0; + int res = write( v->fd, v->out_buf, v->size ); + if(res <= 0) + return 0; + return 1; +} + +int vj_vloopback_fill_buffer( void *vloop, uint8_t **frame ) +{ + // write frame to v->out_buf (veejay_memcpy) + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + if(!v) return 0; + + int len = v->width * v->height ; + int hshift = (v->palette == + VIDEO_PALETTE_YUV422P ? 0 : 1 ); + int uv_len = (v->width >> hshift ) * (v->height >> 1); + + // copy data to linear buffer */ + veejay_memcpy( v->out_buf, frame[0], len ); + + veejay_memcpy( v->out_buf + len, + frame[1], uv_len ); + veejay_memcpy( v->out_buf + len + uv_len, + frame[2], uv_len ); + + return 1; +} + +/* +int vj_vloopback_start_mmap( void *vloop ) +{ + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + if(!v) + return 0; + + + int len = v->width * v->height ; + int hshift = (v->palette == + VIDEO_PALETTE_YUV422P ? 0 : 1 ); + int uv_len = (v->width >> hshift ) * (v->height >> 1); + v->size = len + (2 * uv_len); + v->out_buf = (uint8_t*) vj_malloc( + sizeof(uint8_t) * v->size * VLOOPBACK_N_BUFS ); + + if(!v->out_buf) + return 0; + + v->out_map = mmap( 0, (v->size * VLOOPBACK_N_BUFS), PROT_READ| PROT_WRITE, + MAP_SHARED, v->fd , 0 ); + if( v->out_map == (uint8_t*) -1 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot mmap memory"); + return 0; + } + veejay_msg(VEEJAY_MSG_ERROR, "%s", __FUNCTION__ ); + return 1; +} + +int vj_vloopback_write_mmap( void *vloop, int frame ) +{ + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + veejay_memcpy( v->out_map + (v->size * frame), v->out_buf, v->size ); + return 1; +} + +int vj_vloopback_ioctl( void *vloop, unsigned long int cmd, void *arg ) +{ + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + veejay_msg(VEEJAY_MSG_INFO, "%s %d / %d", + __FUNCTION__, __LINE__ , cmd); + + switch(cmd) + { + case VIDIOCGCAP: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + struct video_capability *cap = arg; + sprintf( cap->name, "Veejay Digital Sampler"); + cap->type = VID_TYPE_CAPTURE; + cap->channels = 1; + cap->audios = 0; + cap->maxwidth = v->width; + cap->maxheight = v->height; + cap->minwidth = v->width; + cap->minheight = v->height; + break; + } + case VIDIOCGTUNER: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + struct video_tuner *tuner = arg; + sprintf( tuner->name, "Veejay Digital Sampler"); + tuner->tuner = 0; + tuner->rangelow = 0; + tuner->rangehigh = 0; + tuner->flags = VIDEO_TUNER_PAL | VIDEO_TUNER_NTSC; + tuner->mode = (v->norm ? VIDEO_MODE_PAL : VIDEO_MODE_NTSC); + tuner->signal = 0; + break; + } + case VIDIOCGCHAN: + { + struct video_channel *vidchan=arg; + vidchan->channel = 0; + vidchan->flags = 0; + vidchan->tuners = 0; + vidchan->type = VIDEO_TYPE_CAMERA; + strcpy(vidchan->name, "Veejay Dummy channel"); + break; + } + case VIDIOCGPICT: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + struct video_picture *vidpic=arg; + + vidpic->colour = 0xffff; + vidpic->hue = 0xffff; + vidpic->brightness = 0xffff; + vidpic->contrast = 0xffff; + vidpic->whiteness = 0xffff; + + vidpic->palette = v->palette; + vidpic->depth = ( + v->palette == VIDEO_PALETTE_YUV420P ? + 12 : 16 ); + break; + } + case VIDIOCSPICT: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + struct video_picture *vidpic=arg; + if(vidpic->palette != v->palette ) + veejay_msg(VEEJAY_MSG_ERROR, + "requested palette %d, but only using %d now", + vidpic->palette, v->palette ); + return 1; + } + + case VIDIOCCAPTURE: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + break; + } + + case VIDIOCGWIN: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + struct video_window *vidwin=arg; + + vidwin->x=0; + vidwin->y=0; + vidwin->width=v->width; + vidwin->height=v->height; + vidwin->chromakey=0; + vidwin->flags=0; + vidwin->samplecount=0; + break; + } + case VIDIOCSWIN: + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot change size ! "); + break; + } + + case VIDIOCGMBUF: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + struct video_mbuf *vidmbuf=arg; + int i; + + vidmbuf->size = v->size; + vidmbuf->frames = VLOOPBACK_N_BUFS; + + for (i=0; i < VLOOPBACK_N_BUFS; i++) + vidmbuf->offsets[i] = i * vidmbuf->size; + vidmbuf->size *= vidmbuf->frames; + break; + } + + case VIDIOCMCAPTURE: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + struct video_mmap *vidmmap=arg; + + if ( vidmmap->format != v->palette ) + { + veejay_msg(VEEJAY_MSG_ERROR, "capture palette not current palette!"); + return 1; + } + + if (vidmmap->height != v->height || + vidmmap->width != v->width) { + veejay_msg(VEEJAY_MSG_ERROR, "caputure: invalid size %dx%d\n", vidmmap->width, vidmmap->height ); + return 1; + } + break; + } + case VIDIOCSYNC: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + struct video_mmap *vidmmap=arg; + if(!vj_vloopback_write_mmap( vloop, vidmmap->frame )) + return 1; + break; + } + default: + { + veejay_msg(VEEJAY_MSG_INFO, "%s %d", + __FUNCTION__, __LINE__ ); + + veejay_msg(VEEJAY_MSG_ERROR, "ioctl %ld unhandled\n", cmd & 0xff); + break; + } + + + } + return 0; +} +*/ +void vj_vloopback_close( void *vloop ) +{ + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + if(v) + { + if(v->fd) + close( v->fd ); + if(v->out_buf) + free(v->out_buf); +/* if(v->out_map) + munmap( v->out_map, + v->size * VLOOPBACK_N_BUFS );*/ + free(v); + } +} + +/* +void vj_vloopback_signal_handler( void *vloop, int sig_no ) +{ + int size,ret; + unsigned long int cmd; + struct pollfd ufds; + char ioctlbuf[1024]; + + vj_vloopback_t *v = (vj_vloopback_t*) vloop; + + if(sig_no != SIGIO ) + return; + + + ufds.fd = v->fd; + ufds.events = POLLIN; + ufds.revents = 0; + + poll( &ufds, 1, 10 ); // 10 ms too small ? + + if( !ufds.revents & POLLIN ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Received signal but got negative on poll"); + return; + } + + size = read( v->fd, ioctlbuf, 1024 ); + if( size >= sizeof( unsigned long int )) + { + veejay_memcpy( &cmd, ioctlbuf, sizeof(unsigned long int)); + if( cmd == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Client closed device"); + return; + } + ret = vj_vloopback_ioctl( vloop, cmd, ioctlbuf + sizeof( unsigned long int )); + if(ret) + { + memset( ioctlbuf + sizeof( unsigned long int ), 1024 - sizeof( unsigned long int ),0xff); + veejay_msg(VEEJAY_MSG_ERROR, + "IOCTL %d unsuccessfull", cmd & 0xff); + } + ioctl( v->fd, cmd, ioctlbuf + sizeof( unsigned long int )); + } + return ; +} +*/ +#endif + diff --git a/veejay-server/libstream/vj-vloopback.h b/veejay-server/libstream/vj-vloopback.h new file mode 100644 index 00000000..bc6396b5 --- /dev/null +++ b/veejay-server/libstream/vj-vloopback.h @@ -0,0 +1,42 @@ +/* veejay - Linux VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + + +void *vj_vloopback_open(const char *device_name, int norm, int mode, + int w, int h, int pixel_format); +// if using write mode +int vj_vloopback_start_pipe( void *vloop ); +int vj_vloopback_write_pipe( void *vloop ); + +// resfresh buffer every cycle +int vj_vloopback_fill_buffer( void *vloop, uint8_t **image ); + +// if using mmap mode +//int vj_vloopback_start_mmap( void *vloop ); + +//int vj_vloopback_ioctl( void *vloop, unsigned long int cmd, void *arg ); +void vj_vlooopback_close( void *vloop ); + +int vj_vloopback_get_mode( void *vloop ); +void vj_vloopback_close( void *vloop ); + + +//void vj_vloopback_signal_handler( void *vloop, int sig_no ); + diff --git a/veejay-server/libstream/vj-yuv4mpeg.c b/veejay-server/libstream/vj-yuv4mpeg.c new file mode 100644 index 00000000..23867323 --- /dev/null +++ b/veejay-server/libstream/vj-yuv4mpeg.c @@ -0,0 +1,281 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* the audio routines are placed here + because its a feature i need. needs to be removed or put elsewhere. +*/ + + +#define L_FOURCC(a,b,c,d) ( (d<<24) | ((c&0xff)<<16) | ((b&0xff)<<8) | (a&0xff) ) + +#define L_FOURCC_RIFF L_FOURCC ('R', 'I', 'F', 'F') +#define L_FOURCC_WAVE L_FOURCC ('W', 'A', 'V', 'E') +#define L_FOURCC_FMT L_FOURCC ('f', 'm', 't', ' ') +#define L_FOURCC_DATA L_FOURCC ('d', 'a', 't', 'a') + +typedef struct { + unsigned long rifftag; + unsigned long rifflen; + unsigned long wavetag; + unsigned long fmt_tag; + unsigned long fmt_len; + unsigned short wFormatTag; + unsigned short nChannels; + unsigned long nSamplesPerSec; + unsigned long nAvgBytesPerSec; + unsigned short nBlockAlign; + unsigned short wBitsPerSample; + unsigned long datatag; + unsigned long datalen; +} t_wave_hdr; + +t_wave_hdr *wave_hdr; + +int bytecount = 0; + +vj_yuv *vj_yuv4mpeg_alloc(editlist * el, int w, int h) +{ + vj_yuv *yuv4mpeg = (vj_yuv *) malloc(sizeof(vj_yuv)); + if(!yuv4mpeg) return NULL; + yuv4mpeg->sar = y4m_sar_UNKNOWN; + yuv4mpeg->dar = y4m_dar_4_3; + y4m_init_stream_info(&(yuv4mpeg->streaminfo)); + y4m_init_frame_info(&(yuv4mpeg->frameinfo)); + yuv4mpeg->width = w; + yuv4mpeg->height = h; + yuv4mpeg->audio_rate = el->audio_rate; + yuv4mpeg->video_fps = el->video_fps; + yuv4mpeg->has_audio = el->has_audio; + yuv4mpeg->audio_bits = el->audio_bps; + return yuv4mpeg; +} + +void vj_yuv4mpeg_free(vj_yuv *v) { +} + + +int vj_yuv_stream_start_read(vj_yuv * yuv4mpeg, char *filename, int width, + int height) +{ + int i, w, h; + + yuv4mpeg->fd = open(filename,O_RDONLY); + + + + if (!yuv4mpeg->fd) { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to open video stream %s\n", + filename); + return -1; + } + i = y4m_read_stream_header(yuv4mpeg->fd, &(yuv4mpeg->streaminfo)); + if (i != Y4M_OK) { + veejay_msg(VEEJAY_MSG_ERROR, "yuv4mpeg: %s", y4m_strerr(i)); + return -1; + } + w = y4m_si_get_width(&(yuv4mpeg->streaminfo)); + h = y4m_si_get_height(&(yuv4mpeg->streaminfo)); + + if( w != width || h != height ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Video dimensions: %d x %d must match %d x %d. Stream cannot be opened", w, h, + width, height); + return -1; + } + + veejay_msg(VEEJAY_MSG_DEBUG, "YUV4MPEG: stream header ok"); + return 0; +} + +int vj_yuv_stream_write_header(vj_yuv * yuv4mpeg, editlist * el) +{ + int i = 0; + y4m_si_set_width(&(yuv4mpeg->streaminfo), yuv4mpeg->width); + y4m_si_set_height(&(yuv4mpeg->streaminfo), yuv4mpeg->height); + y4m_si_set_interlace(&(yuv4mpeg->streaminfo), el->video_inter); + y4m_si_set_framerate(&(yuv4mpeg->streaminfo), + mpeg_conform_framerate(el->video_fps)); + + if (!Y4M_RATIO_EQL(yuv4mpeg->sar, y4m_sar_UNKNOWN)) { + y4m_si_set_sampleaspect(&(yuv4mpeg->streaminfo), yuv4mpeg->sar); + yuv4mpeg->sar.n = el->video_sar_width; + yuv4mpeg->sar.d = el->video_sar_height; + y4m_si_set_sampleaspect(&(yuv4mpeg->streaminfo), yuv4mpeg->sar); + } else { + y4m_ratio_t dar2 = y4m_guess_sar(yuv4mpeg->width, + yuv4mpeg->height, + yuv4mpeg->dar); + y4m_si_set_sampleaspect(&(yuv4mpeg->streaminfo), dar2); + } + + i = y4m_write_stream_header(yuv4mpeg->fd, &(yuv4mpeg->streaminfo)); + + if (i != Y4M_OK) + return -1; + + y4m_log_stream_info(2, "vj-yuv4mpeg", &(yuv4mpeg->streaminfo)); + + return 0; +} + +int vj_yuv_stream_open_pipe(vj_yuv *yuv4mpeg, char *filename,editlist *el) +{ + yuv4mpeg->fd = open(filename,O_WRONLY,0600); + if(!yuv4mpeg->fd) return 0; + return 1; +} +int vj_yuv_stream_header_pipe(vj_yuv *yuv4mpeg,editlist *el) +{ + yuv4mpeg->has_audio = el->has_audio; + vj_yuv_stream_write_header(yuv4mpeg, el); + + //if (el->has_audio) { +// if (!vj_yuv_write_wave_header(el, filename)) +// return 0; + // } + return 1; +} + +int vj_yuv_stream_start_write(vj_yuv * yuv4mpeg, char *filename, + editlist * el) +{ + + //if(mkfifo( filename, 0600)!=0) return -1; + /* if the file exists gamble and simply append, + if it does not exist write header + + */ + struct stat sstat; + + if(strncasecmp( filename, "stdout", 6) == 0) + { + yuv4mpeg->fd = 1; + } + else + { + if(strncasecmp(filename, "stderr", 6) == 0) + { + yuv4mpeg->fd = 2; + } + else + { + if (stat(filename, &sstat) == 0) + { + if (S_ISREG(sstat.st_mode)) + { + /* the file is a regular file */ + yuv4mpeg->fd = open(filename, O_APPEND | O_WRONLY, 0600); + if (!yuv4mpeg->fd) + return -1; + } + else + { + if (S_ISFIFO(sstat.st_mode)) + veejay_msg(VEEJAY_MSG_INFO, "Destination file is a FIFO"); + return 1; // pipe needs handling + } + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Creating YUV4MPEG regular file %s\n", + filename); + yuv4mpeg->fd = open(filename, O_CREAT | O_WRONLY, 0600); + if (!yuv4mpeg->fd) + return -1; + } + } + + } + + vj_yuv_stream_write_header(yuv4mpeg, el); + + yuv4mpeg->has_audio = el->has_audio; + + + + return 0; +} + +void vj_yuv_stream_stop_write(vj_yuv * yuv4mpeg) +{ + y4m_fini_stream_info(&(yuv4mpeg->streaminfo)); + y4m_fini_frame_info(&(yuv4mpeg->frameinfo)); + close(yuv4mpeg->fd); + +} + +void vj_yuv_stream_stop_read(vj_yuv * yuv4mpeg) +{ + y4m_fini_stream_info(&(yuv4mpeg->streaminfo)); + y4m_fini_frame_info(&(yuv4mpeg->frameinfo)); + close(yuv4mpeg->fd); + yuv4mpeg->sar = y4m_sar_UNKNOWN; + yuv4mpeg->dar = y4m_dar_4_3; +} + +int vj_yuv_get_frame(vj_yuv * yuv4mpeg, uint8_t * dst[3]) +{ + int i; + i = y4m_read_frame(yuv4mpeg->fd, &(yuv4mpeg->streaminfo), + &(yuv4mpeg->frameinfo), dst); + + if (i != Y4M_OK) + { + veejay_msg(VEEJAY_MSG_ERROR, "yuv4mpeg %s", y4m_strerr(i)); + return -1; + } + return 0; +} + +int vj_yuv_get_aframe(vj_yuv * yuv4mpeg, uint8_t * audio) +{ + return 0; /*un used */ + +} + +int vj_yuv_put_frame(vj_yuv * vjyuv, uint8_t ** src) +{ + int i; + if (!vjyuv->fd) { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid file descriptor for y4m stream"); + return -1; + } + i = y4m_write_frame(vjyuv->fd, &(vjyuv->streaminfo), + &(vjyuv->frameinfo), src); + if (i != Y4M_OK) { + veejay_msg(VEEJAY_MSG_ERROR, "Yuv4Mpeg : [%s]", y4m_strerr(i)); + return -1; + } + return 0; +} +int vj_yuv_put_aframe(uint8_t * audio, editlist * el, int len) +{ + int i = 0; + return i; +} diff --git a/veejay-server/libstream/vj-yuv4mpeg.h b/veejay-server/libstream/vj-yuv4mpeg.h new file mode 100644 index 00000000..e90c082e --- /dev/null +++ b/veejay-server/libstream/vj-yuv4mpeg.h @@ -0,0 +1,66 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_YUV4MPEG_H +#define VJ_YUV4MPEG_H +#include +#include + +typedef struct { + y4m_stream_info_t streaminfo; + y4m_frame_info_t frameinfo; + y4m_ratio_t sar; + y4m_ratio_t dar; + int width; + int height; + int fd; + int has_audio; + int audio_bits; + float video_fps; + long audio_rate; +} vj_yuv; + +vj_yuv *vj_yuv4mpeg_alloc(editlist * el, int dst_w, int dst_h); + + +void vj_yuv4mpeg_free(vj_yuv *v) ; + +int vj_yuv_stream_start_read(vj_yuv *, char *, int width, int height); + +int vj_yuv_stream_write_header(vj_yuv * yuv4mpeg, editlist * el); + +int vj_yuv_stream_start_write(vj_yuv *, char *, editlist *); + +void vj_yuv_stream_stop_read(vj_yuv * yuv4mpeg); + +void vj_yuv_stream_stop_write(vj_yuv * yuv4mpeg); + +int vj_yuv_get_frame(vj_yuv *, uint8_t **); + +int vj_yuv_put_frame(vj_yuv * vjyuv, uint8_t **); + +int vj_yuv_get_aframe(vj_yuv * vjyuv, uint8_t * audio); + +int vj_yuv_put_aframe(uint8_t * audio, editlist *el, int len); + +int vj_yuv_write_wave_header(editlist * el, char *outfile); + +int vj_yuv_stream_open_pipe(vj_yuv *, char *, editlist *el); + +int vj_yuv_stream_header_pipe( vj_yuv *, editlist *el ); +#endif diff --git a/veejay-server/libvevo/Makefile.am b/veejay-server/libvevo/Makefile.am new file mode 100644 index 00000000..4cb94a8e --- /dev/null +++ b/veejay-server/libvevo/Makefile.am @@ -0,0 +1,10 @@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir)/libvevo -I$(includedir) -I$(top_srcdir)/libhash -I$(top_srcdir)/libvjmem -I$(top_srcdir)/libvjmsg + +VEVO_LIB_FILE = libvevo.la +pkginclude_HEADERS = vevo.h libvevo.h +noinst_LTLIBRARIES = $(VEVO_LIB_FILE) + +libvevo_la_SOURCES = pool.c vevo.c + diff --git a/veejay-server/libvevo/Makefile.in b/veejay-server/libvevo/Makefile.in new file mode 100644 index 00000000..08406a7b --- /dev/null +++ b/veejay-server/libvevo/Makefile.in @@ -0,0 +1,539 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libvevo +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libvevo_la_LIBADD = +am_libvevo_la_OBJECTS = pool.lo vevo.lo +libvevo_la_OBJECTS = $(am_libvevo_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libvevo_la_SOURCES) +DIST_SOURCES = $(libvevo_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir)/libvevo -I$(includedir) -I$(top_srcdir)/libhash -I$(top_srcdir)/libvjmem -I$(top_srcdir)/libvjmsg +VEVO_LIB_FILE = libvevo.la +pkginclude_HEADERS = vevo.h libvevo.h +noinst_LTLIBRARIES = $(VEVO_LIB_FILE) +libvevo_la_SOURCES = pool.c vevo.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libvevo/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libvevo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libvevo.la: $(libvevo_la_OBJECTS) $(libvevo_la_DEPENDENCIES) + $(LINK) $(libvevo_la_OBJECTS) $(libvevo_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vevo.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + 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-pkgincludeHEADERS + +# 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/veejay-server/libvevo/libvevo.h b/veejay-server/libvevo/libvevo.h new file mode 100644 index 00000000..33658ff7 --- /dev/null +++ b/veejay-server/libvevo/libvevo.h @@ -0,0 +1,141 @@ +/* +Copyright (c) 2004-2007 N.Elburg + + This is vevo, veejay video objects. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef LIBVEVO +#define LIBVEVO + +#include +#include + +typedef void vevo_port_t; + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif + +#ifdef STRICT_CHECKING +#define vpn(type) vevo_port_new( type, __FUNCTION__ , __LINE__ ) +#else +#define vpn(type) vevo_port_new( type ) +#endif + +int vevo_property_num_elements( vevo_port_t *p, const char *key); + +int vevo_property_atom_type( vevo_port_t *p, const char *key); + +size_t vevo_property_element_size( vevo_port_t * p, const char *key, const int idx); + +#ifdef STRICT_CHECKING +vevo_port_t *vevo_port_new( int port_type, const char *func, int line_no ); +#else +vevo_port_t *vevo_port_new(int port_type); +#endif +int vevo_property_soft_reference(vevo_port_t * p, const char *key); + +void vevo_strict_init(); + +int vevo_port_verify( vevo_port_t *port ); + +void vevo_port_free( vevo_port_t *port ); + +int vevo_property_set(vevo_port_t * p, const char *key, int atom_type, int num_elements, void *src); + +int vevo_union_ports( void *port_a, void *port_b, int filter_type ); + +int vevo_property_get(vevo_port_t * p, const char *key, int idx, void *dst); + +char **vevo_list_properties(vevo_port_t * p); + +void vevo_port_recursive_free(vevo_port_t *p ); + +void vevo_port_dump( vevo_port_t *p ); + +char *vevo_format_kind( vevo_port_t *port, const char *key ); + +char *vevo_format_property( vevo_port_t *port, const char *key ); + +void vevo_report_stats(); + +int vevo_property_del(vevo_port_t * p, const char *key ); + +char **vevo_port_deepen_namespace( void *port, char *path); + +char **vevo_port_recurse_namespace( vevo_port_t *port, const char *base ); + +void *vevo_port_register( vevo_port_t *in, vevo_port_t *ref ); + +char *vevo_sprintf_property( vevo_port_t *port, const char *key ); + +int vevo_sscanf_property( vevo_port_t *port, const char *s); + +char **vevo_sprintf_port( vevo_port_t *port ); + +int vevo_sscanf_port( vevo_port_t *port, const char *s ); + +int vevo_special_union_ports( void *port_a, void *port_b ); + +int vevo_property_from_string( vevo_port_t *port, const char *s, const char *key, int n_elem, int type); + +char *vevo_sprintf_property_value( vevo_port_t *port, const char *key); + +char *vevo_property_get_string( void *port, const char *key ); + +void vevo_strict_init(); + +#define VEVO_ATOM_TYPE_VOIDPTR 65 +#define VEVO_ATOM_TYPE_INT 1 +#define VEVO_ATOM_TYPE_DOUBLE 2 +#define VEVO_ATOM_TYPE_STRING 4 +#define VEVO_ATOM_TYPE_BOOL 3 +#define VEVO_ATOM_TYPE_PORTPTR 66 +#define VEVO_ATOM_TYPE_HIDDEN 50 +#define VEVO_ATOM_TYPE_UINT64 5 + +#define VEVO_NO_ERROR 0 +#define VEVO_ERROR_MEMORY_ALLOCATION 1 +#define VEVO_ERROR_PROPERTY_READONLY 2 +#define VEVO_ERROR_NOSUCH_ELEMENT 3 +#define VEVO_ERROR_NOSUCH_PROPERTY 4 +#define VEVO_ERROR_WRONG_ATOM_TYPE 5 +#define VEVO_ERROR_TOO_MANY_INSTANCES 6 +#define VEVO_ERROR_HARDWARE 7 +#define VEVO_ERROR_PROPERTY_EMPTY 8 + + +#define VEVO_PORT_POOL 1041 +#define VEVO_ANONYMOUS_PORT -1 + +#define VEVO_PROPERTY_READONLY (1<<1) +#define VEVO_PROPERTY_SOFTREF (1<<2) +#define VEVO_PROPERTY_PROTECTED (1<<10) + +#endif diff --git a/veejay-server/libvevo/lowlevel.h b/veejay-server/libvevo/lowlevel.h new file mode 100644 index 00000000..c05e0580 --- /dev/null +++ b/veejay-server/libvevo/lowlevel.h @@ -0,0 +1,36 @@ +/* +Copyright (c) 2004-2005 N.Elburg + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef VEVO_LOW_LEVEL_H +#define VEVO_LOW_LEVEL_H +/* Mediation layer structures, provided by this host */ +typedef struct { + int type; + void *value; + size_t size; +} atom_t; +#endif diff --git a/veejay-server/libvevo/pool.c b/veejay-server/libvevo/pool.c new file mode 100644 index 00000000..daa62b45 --- /dev/null +++ b/veejay-server/libvevo/pool.c @@ -0,0 +1,291 @@ +/* +Copyright (c) 2004-2005 N.Elburg + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + /** \defgroup mem_pool Efficient Object Caching + * + * To reduce the overhead of malloc/free when allocating and freeing many small objects + * I keep a linked list of Spaces. Each Space holds a continuous + * memory area that is of size ROUNDS_PER_MAG * sizeof(type). This area is divided + * into ROUND_PER_MAG chunks. The malloc() replacement pops a round from the stack, + * whilst the free() replacement pushes a round back to the stack. + * The stack size is limited to ROUNDS_PER_MAG + * When the stack is full, a new magazine is allocated and added to the linked list + * of magazines. + * + * This is basically how the slab allocator works in a linux kernel +*/ +#include +#include +#include +#include +#include +#include "pool.h" + +#ifdef STRICT_CHECKING +#include +#endif + +//! \typedef space_t structure +/*! The space_t structure is a linked list of spaces. + Each space has a magazine that can hold up to ROUNDS_PER_MAG rounds. + The magazine is a stack. + Each round in the magazine is of a fixed size + */ +typedef struct +{ + unsigned char *area; /*!< Pointer to memory space containing ROUNDS_PER_MAG objects */ + unsigned char **mag; /*!< A magazine is a ROUNDS_PER_MAG-element array of pointers to objects */ + int rounds; /*!< Available rounds*/ + void *next; /*!< Pointer to next space */ +} space_t; + +//! \typedef pool_t structure +/*! The pool_t structure is a pool of spaces + * Each pool has 1 or more spaces. + */ +typedef struct +{ + space_t **spaces; /*!< array of spaces */ + space_t *space; /*!< single space */ +} pool_t; + +//!Allocate a new space of a fixed size +/*! + \param bs size in bytes + \return New space that holds ROUNDS_PER_MAG rounds + */ +static space_t *alloc_space( size_t bs ) +{ + int k; + unsigned char *p; + space_t *s; + s = (space_t*) vj_malloc(sizeof(space_t)); +#ifdef STRICT_CHECKING + assert( s != NULL ); +#endif + s->area = vj_malloc(bs * ROUNDS_PER_MAG); + s->mag = vj_malloc( sizeof(void*) * (ROUNDS_PER_MAG + 1) ); + p = s->area; + for( k = 0; k <= ROUNDS_PER_MAG ;k ++ ) + { + s->mag[k] = p; + p += bs; + } + s->rounds = ROUNDS_PER_MAG; + s->next = NULL; + return s; +} + +//! Allocate a new pool with spaces of various fixed sizes +/*! + \param prop_size size in bytes of vevo_property_t + \param stor_size size in bytes of vevo_storage_t + \param atom_size size in bytes of atom_t + \param index_size size in bytes of prop_node_t + \return A new pool that holds various fixed sized Spaces + */ +void *vevo_pool_init(size_t prop_size,size_t stor_size, size_t atom_size, size_t index_size) +{ + unsigned int Msize = Mend + 1; + pool_t *p = (pool_t*) vj_malloc(sizeof(pool_t)); +#ifdef STRICT_CHECKING + assert( p != NULL ); +#endif + p->space = NULL; + p->spaces = (space_t**) vj_malloc(sizeof(space_t*) * Msize ); + p->spaces[M4b] = alloc_space( sizeof(int32_t) ); + p->spaces[M8b] = alloc_space( sizeof(double) ); + p->spaces[Mpb] = alloc_space( sizeof(void*) ); + p->spaces[M64b] = alloc_space(sizeof(uint64_t) ); + p->spaces[Mprop] = alloc_space( prop_size ); + p->spaces[Mstor] = alloc_space( stor_size ); + p->spaces[Matom] = alloc_space( atom_size ); + p->spaces[Midx] = alloc_space( index_size ); + p->spaces[Mend] = NULL; + return (void*)p; +} + +//! Allocate a new pool with a single space of a fixed size +/*! + \param node_size size in bytes of a single block + \return A new pool with a single space + */ +void *vevo_pool_slice_init( size_t node_size ) +{ + pool_t *p = (pool_t*) malloc(sizeof(pool_t)); + p->spaces = NULL; + p->space = alloc_space( node_size ); + return p; +} + +//! Get a pointer to the starting address of an unused block. Pops a round from the magazine and creates a new space if magazine is empty. +/*! + \param p pointer to pool_t structure + \param bs size of block to allocate + \param k base type of block to allocate + \return pointer to free block + */ +void *vevo_pool_alloc( void *p, size_t bs, unsigned int k ) +{ + pool_t *pool = (pool_t*) p; + space_t *space = pool->spaces[k]; + if( space->rounds == 0 ) + { // no more rounds to fire, create a new magazine and add it to the list + space_t *m = alloc_space( bs ); + m->next = space; + pool->spaces[k] = m; + space = m; + } + void **mag = (void**)pool->spaces[k]->mag; + return mag[ --space->rounds ]; +} + +//! Pushes a round to a magazine that is not full +/*! + \param p pointer to pool_t structure + \param ptr pointer to address of block + \param k base type of block to allocate + */ +void vevo_pool_free( void *p, void *ptr, unsigned int k ) +{ + pool_t *pool = (pool_t*) p; + unsigned int n = pool->spaces[k]->rounds; + space_t *space = pool->spaces[k]; + unsigned char **mag = space->mag; + if( n == ROUNDS_PER_MAG ) + { + space_t *l = space; + while( l != NULL ) + { + if( l->rounds < ROUNDS_PER_MAG ) + { + mag = l->mag; + mag[ l->rounds ++ ] = ptr; + return; + } + l = l->next; + } + } + mag[ space->rounds++ ] = ptr; +} + +//! Destroy a pool and all spaces. Frees all used memory +/*! + \param p pointer to pool_t structure + */ +void vevo_pool_destroy( void *p ) +{ + pool_t *pool = (pool_t*) p; + space_t **nS = pool->spaces; + int i ; + for( i = 0 ; nS[i] != NULL ; i ++ ) + { + space_t *n = pool->spaces[i]; + space_t *k = NULL; + while( n != NULL ) + { + k = n; + free( k->area ); + free( k->mag ); + n = k->next; + free( k ); + } + } + free( nS ); + free( pool ); +} + +//! Destroy a pool and the space it holds. Frees all used memory +/*! + \param p pointer to pool_t structure + */ +void vevo_pool_slice_destroy( void *p ) +{ + pool_t *pool = (pool_t*) p; + space_t *s = pool->space; + space_t *n = NULL; + while( s != NULL ) + { + n = s; + free( n->area ); + free( n->mag ); + s = n->next; + free( n ); + } + free( pool->space ); + free( pool ); +} + +//! Get a pointer to the starting address of an unused block. Pops a round from the magazine and creates a new space if magazine is empty. +/*! + \param p pointer to pool_t structure + \param bs size of block to allocate + \return pointer to free block + */ +void *vevo_pool_slice_alloc( void *p, size_t bs ) +{ + pool_t *pool = (pool_t*) p; + space_t *space = pool->space; + if( space->rounds == 0 ) + { // no more rounds to fire, create a new magazine and add it to the list + space_t *m = alloc_space( bs ); + m->next = space; + pool->space = m; + space = m; + } + void **mag =(void**) pool->space->mag; + return mag[ --space->rounds ]; +} + +//! Pushes a round to a magazine that is not full +/*! + \param p pointer to pool_t structure + \param ptr pointer to address of block + */ +void vevo_pool_slice_free( void *p, void *ptr ) +{ + pool_t *pool = (pool_t*) p; + unsigned int n = pool->space->rounds; + space_t *space = pool->space; + void **mag = (void**)space->mag; + if( n == ROUNDS_PER_MAG ) + { + space_t *l = space; + while( l != NULL ) + { + if( l->rounds < ROUNDS_PER_MAG ) + { + mag = (void**)l->mag; + mag[ l->rounds ++ ] = ptr; + return; + } + l = l->next; + } + } + mag[ space->rounds++ ] = ptr; +} diff --git a/veejay-server/libvevo/pool.h b/veejay-server/libvevo/pool.h new file mode 100644 index 00000000..1a04be44 --- /dev/null +++ b/veejay-server/libvevo/pool.h @@ -0,0 +1,70 @@ +/*Copyright (c) 2004-2005 N.Elburg + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef POOLM +#define POOLM +#define ROUNDS_PER_MAG 16 + +#define M4b 0 +#define M8b 1 +#define Mpb 2 +#define Mstor 3 +#define Matom 4 +#define Midx 5 +#define Mprop 6 +#define M64b 7 +#define Mend 8 + +void *vevo_pool_alloc( void *pool, size_t bs, unsigned int k ); +void vevo_pool_free( void *pool, void *ptr, unsigned int k ); +void *vevo_pool_init(size_t property_size, size_t stor_size, size_t atom_size, size_t index_size); +void vevo_pool_destroy( void *p ); +void vevo_pool_slice_destroy( void *p ); +void *vevo_pool_slice_init( size_t node_size ); +void *vevo_pool_slice_alloc( void *pool, size_t bs); +void vevo_pool_slice_free( void *pool, void *ptr ); + +#define vevo_pool_alloc_property(type,pool) vevo_pool_alloc(pool,sizeof(type),Mprop ) +#define vevo_pool_alloc_storage(type,pool) vevo_pool_alloc( pool, sizeof(type),Mstor ) +#define vevo_pool_alloc_atom(type,pool) vevo_pool_alloc( pool, sizeof(type), Matom ) +#define vevo_pool_alloc_node(type,pool) vevo_pool_alloc( pool, sizeof(type), Midx ) +#define vevo_pool_alloc_int(type,pool) vevo_pool_alloc( pool,sizeof(type), M4b ) +#define vevo_pool_alloc_ptr(type,pool) vevo_pool_alloc( pool,sizeof(type), Mpb ) +#define vevo_pool_alloc_dbl(type,pool) vevo_pool_alloc( pool,sizeof(type), M8b ) +#define vevo_pool_alloc_64b(type,pool) vevo_pool_alloc( pool,sizeof(type), M64b ) + +#define vevo_pool_free_property(pool,ptr) vevo_pool_free(pool,ptr,Mprop ) +#define vevo_pool_free_storage( pool,ptr ) vevo_pool_free( pool, ptr, Mstor ) +#define vevo_pool_free_atom( pool,ptr ) vevo_pool_free( pool, ptr, Matom ) +#define vevo_pool_free_node( pool,ptr ) vevo_pool_free( pool, ptr, Midx ) +#define vevo_pool_free_int( pool,ptr ) vevo_pool_free( pool,ptr, M4b ) +#define vevo_pool_free_ptr( pool,ptr ) vevo_pool_free( pool,ptr, Mpb ) +#define vevo_pool_free_dbl( pool,ptr ) vevo_pool_free( pool,ptr,M8b ) +#define vevo_pool_free_64b( pool,ptr ) vevo_pool_free( pool,ptr,M64b ) + + +#endif diff --git a/veejay-server/libvevo/vevo.c b/veejay-server/libvevo/vevo.c new file mode 100644 index 00000000..38541d7f --- /dev/null +++ b/veejay-server/libvevo/vevo.c @@ -0,0 +1,2766 @@ +/* +Copyright (c) 2004-2005 N.Elburg + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** \defgroup VeVo Veejay Video Objects + * + * VeVo provides a data model for handling dynamic + * objects in runtime. + * + * Features: + * -# Efficient object caching with reference counting + * -# Generic per object properties with set/get functions + * -# Fast hashing of keys + * + * To distinguish between objects as in object oriented programming, + * Ports are introduced. A Port is a container of properties. + * + * A property is a tupple of a value and an unique key. + * A key is a human friendly name for a Property. Internally a list + * of mnenomics is kept to translate the human friendly name into a numeric value + * that uniquely identifies an object. + * + * Types of values: + * -# int32_t VEVO_ATOM_TYPE_INT + * -# char* VEVO_ATOM_TYPE_STRING + * -# void* VEVO_ATOM_TYPE_VOIDPTR + * -# void* VEVO_ATOM_TYPE_PORTPTR + * -# int32_t VEVO_ATOM_TYPE_BOOLEAN + * -# uint64_t VEVO_ATOM_TYPE_UINT64 + * + * + * + * Values of type STRING must always be NULL-terminated, vevo creates + * a dynamic copy on both set and get functions. + * + * Values of type VOIDPTR must always be freed by caller. + * + * Values of type PORTPTR will be cleaned up by vevo when no longer needed. + * + * Depending on the type of port that is constructed + * -# the port uses a linked list of objects + * -# the port uses a hash table of objects + * -# the port's type is stored as "type" + * -# the port's type is not stored (anonymous port) + * + * A Port has no limit on the amounts of properties it can hold. + * Vevo can recursivly walk all ports and free them, except for + * those Properties that are of the VEVO_ATOM_TYPE_VOIDPTR + * + * Vevo will complain about: + * -# Ports that have never been freed + * -# Ports that have not been allocated by vevo + * -# Ports that have already been freed + * + * This library is not complete, it contains some loose ends: + * - sscanf/ printf + * - vevo_num_properties + * +*/ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif + +#include +#define PORT_TYPE_PLUGIN_INFO 1 +#define PORT_TYPE_FILTER_CLASS 2 +#define PORT_TYPE_FILTER_INSTANCE 3 +#define PORT_TYPE_CHANNEL_TEMPLATE 4 +#define PORT_TYPE_PARAMETER_TEMPLATE 5 +#define PORT_TYPE_CHANNEL 6 +#define PORT_TYPE_PARAMETER 7 +#define PORT_TYPE_GUI 8 + + +//! \typedef atom_t +/*! \brief atom + * + * the atom_t structure + */ +typedef struct { + int type; + void *value; + size_t size; +} atom_t; + +//! \typedef vevo_storage_t +/*! \brief atom storage + * + * + * the vevo_storage_t structure holds one or more elements + * and some bookkeeping information + */ +typedef struct { + int atom_type; /*!< atom type */ + union { /*! \union elements one or more atoms */ + atom_t *atom; + atom_t **array; + } elements; + int num_elements; /*!< number of atoms */ + int flags; /*!< special flags */ + int softlink; /*! < protected, use to indicate soft link */ +} vevo_storage_t; + +//! \typedef vevo_property_t +/*! \brief tupple of key | object storage + * + * + * the vevo_property_t structure binds a key to a vevo_storage_t structure + */ +typedef struct { + vevo_storage_t *st; + uint64_t key; + void *next; +} vevo_property_t; + +//! \typedef port_index_t +/*! \brief mnemonics of key | hash value pairs + * + * + * the port_index_t keeps a mnemonic of key to hash code + */ +typedef struct { + const char *key; + uint64_t hash_code; /* vevo uses a integer representation of key, eliminates strcmp */ + void *next; +} port_index_t; + +//! \typedef __vevo_port_t +/*! \brief top level container + * + * + * the __vevo_port_t is the top level structure + */ +typedef struct { + hash_t *table; /*!< hashtable to store pairs of key | value */ + vevo_property_t *list; /*!< linked list to store pairs of key | value */ + port_index_t *index; /*!< mnemonic table of key to hashcode */ + void *pool; /*!< pointer to pool_t object caching */ +} __vevo_port_t; + + +//! \var port_ref_ Book keeping of allocated and freed ports +/*#ifdef STRICT_CHECKING +static vevo_port_t *port_ref_ = NULL; +#endif*/ +static size_t atom_sizes_[100]; + +//! Check if an object is soft referenced +/*! + \param p port + \param name of object + \return TRUE if an object is soft referenced + */ +static int vevo_property_is_soft_referenced(vevo_port_t * p, const char *key ); + +//! Recursivly free all ports +/*! +\param sorted_port port to collect all atoms of type VEVO_ATOM_TYPE_PORTPTR in port p + \param p input port + */ +static void vevo_port_recurse_free( vevo_port_t *sorted_port, vevo_port_t *p ); +static char *vevo_scan_token_( const char *s ); +static const char *vevo_split_token_q( const char *s, const char delim, char *buf, int buf_len ); + + +static const char *vevo_split_token_( const char *s, const char delim, char *buf, int buf_len ); + + +//! Construct a new vevo_property_t +/*! + \param port port + \param hash_key hash value + \param stor vevo_storage_t + */ +static vevo_property_t *prop_node_new(__vevo_port_t *port, uint64_t hash_key, + vevo_storage_t * stor) +{ + vevo_property_t *p = + (vevo_property_t*) vevo_pool_alloc_property( vevo_property_t, port->pool ); + // (vevo_property_t *) vevo_malloc(sizeof(vevo_property_t)); + p->st = stor; + p->key = hash_key; + p->next = NULL; + return p; +} + +//! Destroy a property +/*! + \param port port + \param p property to free + */ +static void prop_node_free(__vevo_port_t *port,vevo_property_t * p) +{ + if (p) { + //free(p); + vevo_pool_free_property( port->pool, p ); + } + p = NULL; +} +//! Append a property to the linked list of properties +/*! + \param p port + \param key hash value + \param t vevo_storage_t + */ +static vevo_property_t *prop_node_append(vevo_port_t * p, uint64_t key, + vevo_storage_t * t) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + vevo_property_t *node = prop_node_new(port,key, t); + vevo_property_t *next; + vevo_property_t *list = port->list; + if (list == NULL) + port->list = node; + else { + while (list != NULL) { + next = list->next; + if (next == NULL) { + list->next = node; + return node; + } + list = next; + } + } + return node; +} + +//! Get a property from a port +/*! + \param port + \param key hash value + */ +static vevo_property_t *prop_node_get(vevo_port_t * p, uint64_t key) +{ + __vevo_port_t *port = (__vevo_port_t *) p; +#ifdef STRICT_CHECKING + assert( port != NULL ); +#endif + vevo_property_t *l = port->list; + while (l != NULL) { + if (key == l->key) + return l; + l = l->next; + } + return NULL; +} + +//! Construct a new mnemonic +/*! + \param port port + \param key name of property + \param hash_key calculated hash value + \return port_index_t new mmemonic + */ +static port_index_t *port_node_new(__vevo_port_t *port,const char *key, uint64_t hash_key) +{ + // port_index_t *i = (port_index_t *) vevo_malloc(sizeof(port_index_t)); + port_index_t *i = (port_index_t *) vevo_pool_alloc_node( + port_index_t, port->pool ); +#ifdef STRICT_CHECKING + assert(i != NULL); + assert(key != NULL); + assert(hash_key != 0); +#endif + i->key = strdup(key); + i->hash_code = hash_key; + i->next = NULL; + return i; +} + +//! Destroy a mnemonic from the list of key | hash value pairs +/*! + \param port port + \param node mnemonic to destroy + */ +static void port_node_free(__vevo_port_t *port,port_index_t * node) +{ + if (node) { + if (node->key) + free((void *) node->key); +// free(node); + vevo_pool_free_node( port->pool,(void*)node ); + } + node = NULL; +} + +//! Add a mnemonic to the list of key | hash value pairs +/*! + \param p port + \param key name of property + \param hash_key calculated hash value + */ +static void port_node_append(vevo_port_t * p, const char *key, + uint64_t hash_key) +{ +#ifdef STRICT_CHECKING + assert(p != NULL); + assert(key != NULL); + assert(hash_key != 0); +#endif + __vevo_port_t *port = (__vevo_port_t *) p; + port_index_t *node = port_node_new(p,key, hash_key); + port_index_t *next; + port_index_t *list = port->index; + if (list == NULL) + port->index = node; + else { + while (list != NULL) { + next = list->next; + if (next == NULL) { + list->next = node; + break; + } + list = next; + } + } +} + +#define PROPERTY_KEY_SIZE 128 + +//! \define property_exists Check if a property exists +#define property_exists( port, key ) hash_lookup( (hash_t*) port->table, (const void*) key ) + +//! \define atom_store__ store atom +#define atom_store__(value) {\ +for (i = 0; i < d->num_elements; i++)\ + d->elements.array[i] = vevo_put_atom(port, &value[i], v ); } + +//! \define array_load__ get a value from an array of atom +#define array_load__(value) {\ +for( i = 0; i < t->num_elements ; i ++ )\ + memcpy( &value[i], t->elements.array[i]->value, t->elements.array[i]->size ); } + +//! Construct a new vevo_storage_t object +/*! + \param port port + \return vevo_storage_t a new vevo_storage_t object +*/ +static vevo_storage_t *vevo_new_storage(__vevo_port_t *port ); +/* +static int vevo_port_ref_verify( vevo_port_t *p) ; +*/ +//! Copy a value into a new atom +/*! + \param port port + \param src address of value to store + \param n number of elements to store + \param d vevo_storage_t destination + \param v atom type + */ +static void +storage_put_atom_value(__vevo_port_t * port, void *src, int n, + vevo_storage_t * d, int v); + +//! Calculate a hash value from a given string +/*! + \param str string + \return calculated hash value + */ +static inline uint64_t hash_key_code( const char *str ) +{ + uint64_t hash = 5381; + int c; + + while ((c = *str++)) + hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ + + return hash; +} + +//! Flag a property as soft referenced. Use to avoid freeing a linked pointer. +/*! + \param p port + \param key property to soft reference + \return error code + */ +int vevo_property_soft_reference(vevo_port_t * p, const char *key) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + uint64_t hash_key = hash_key_code(key); + if (!port->table) { + vevo_property_t *node = NULL; + if ((node = prop_node_get(port, hash_key)) != NULL) { + node->st->softlink = 1; + return VEVO_NO_ERROR; + } + } else { + hnode_t *node = NULL; + if ((node = property_exists(port, hash_key)) != NULL) { + vevo_storage_t *stor = (vevo_storage_t *) hnode_get(node); + stor->softlink = 1; + hnode_put( node, (void*) hash_key ); + return VEVO_NO_ERROR; + } + + } + + return VEVO_NO_ERROR; +} + + +//! Flag a property as read-only. Use to avoid overriding the value +/*! + \param p port + \param key property to set as readonly + \return error code + */ +static int vevo_property_finalize(vevo_port_t * p, const char *key) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + uint64_t hash_key = hash_key_code(key); + if (!port->table) { + vevo_property_t *node = NULL; + if ((node = prop_node_get(port, hash_key)) != NULL) { + node->st->flags |= VEVO_PROPERTY_READONLY; + return VEVO_NO_ERROR; + } + } else { + hnode_t *node = NULL; + if ((node = property_exists(port, hash_key)) != NULL) { + vevo_storage_t *stor = (vevo_storage_t *) hnode_get(node); + stor->flags |= VEVO_PROPERTY_READONLY; + hnode_t *new_node = hnode_create((void *) stor); + hnode_put(new_node, (void *) hash_key); + hnode_destroy(new_node); + return VEVO_NO_ERROR; + } + } + return VEVO_NO_ERROR; +} + +static int vevo_property_exists( vevo_port_t *p, const char *key) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + + uint64_t hash_key = hash_key_code(key); + if (!port->table) { + vevo_property_t *node = NULL; + if ((node = prop_node_get(port, hash_key)) != NULL) + return 1; + } else { + hnode_t *node = NULL; + if ((node = property_exists(port, hash_key)) != NULL) + return 1; + } + return 0; +} + +//! Local add, add a property to the list of properties and finalize if needed +/*! + \param p port + \param finalize set property readonly TRUE or FALSE + \param key property name + \param atom_type atom type + \param num_elements number of atoms + \param src address of source variable + */ +static void vevo_port_add_property( vevo_port_t *p,int finalize, const char *key,int atom_type, int num_elements, void * src ) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + + uint64_t hash_key = hash_key_code(key); + vevo_storage_t *stor = vevo_new_storage(p); + storage_put_atom_value(port, src, num_elements, stor, atom_type); + if(finalize) + stor->flags |= VEVO_PROPERTY_READONLY; + port_node_append(port, key, hash_key); + if (!port->table) + prop_node_append(port, hash_key, stor); + else + hash_insert( (hash_t*) port->table, + hnode_create(stor),(const void*) hash_key ); +} + +//! Finalize a port. Add it to the reference list and register port type +/*! + \param port port to finalize + \param port_type port type + */ +static void vevo_port_finalize( vevo_port_t *port, int port_type ) +{ +/* +#ifdef STRICT_CHECKING + if( port_type != VEVO_PORT_REFERENCES ) + { + int ref = 1; + char ref_key[64]; + sprintf(ref_key,"%p",port ); + vevo_property_set( port_ref_, ref_key, VEVO_ATOM_TYPE_INT, 1, &ref ); + } +#endif +*/ + if( port_type <= 1024 && port_type > 0 ) + vevo_port_add_property( port, 1,"type",VEVO_ATOM_TYPE_INT,1, &port_type ); +} + +//! Copy a value from an atom to an address +/*! + \param t vevo_storage_t source + \param idx element at + \param dst destination address + \return error code + */ + + +static int atom_get_value(vevo_storage_t * t, int idx, void *dst) +{ +#ifdef STRICT_CHECKING + assert(t != NULL); +#endif + atom_t *atom = NULL; + + if (t->num_elements == 1 && idx == 0) + { + atom = t->elements.atom; +#ifdef STRICT_CHECKING + assert( atom != NULL ); +#endif + } + + if (t->num_elements > 1 && idx >= 0 && idx <= t->num_elements) + { + atom = t->elements.array[idx]; +#ifdef STRICT_CHECKING + assert( atom != NULL ); +#endif + } + + if( t->num_elements == 0 && idx == 0 ) + { + atom = t->elements.atom; +#ifdef STRICT_CHECKING + assert( atom != NULL ); +#endif + return VEVO_ERROR_PROPERTY_EMPTY; + } + + + if (!atom) + return VEVO_ERROR_NOSUCH_ELEMENT; + + if (atom->size <= 0) + return VEVO_NO_ERROR; + + if( dst == NULL ) + return VEVO_NO_ERROR; + + if (t->atom_type != VEVO_ATOM_TYPE_STRING) { +#ifdef STRICT_CHECKING + assert( atom->size > 0 ); +#endif + memcpy(dst, atom->value, atom->size); + } else { + char **ptr = (char **) dst; + char *p = *ptr; +#ifdef STRICT_CHECKING + assert( (atom->size-1) > 0 ); +#endif + memcpy(p, atom->value, (atom->size - 1)); + p[atom->size - 1] = '\0'; + } + return VEVO_NO_ERROR; +} + +//! Get the byte size of an atom +/*! + \param atom_type atom type + \return byte size + */ +static size_t vevo_atom_size(int atom_type) +{ + return atom_sizes_[atom_type]; + return 0; +} + +//! Construct a new Atom +/*! + \param port port + \param atom_type type of atom to construct + \param atom_size byte size of atom + \return atom_t new atom + */ +static atom_t *vevo_new_atom(__vevo_port_t * port, int atom_type, + size_t atom_size) +{ + atom_t *atom = (atom_t *) vevo_pool_alloc_atom( atom_t , port->pool ); +#ifdef STRICT_CHECKING + assert(atom != NULL); +#endif + atom->size = atom_size; + atom->type = atom_type; + if(atom_type == VEVO_ATOM_TYPE_STRING ) + atom->value = (atom_size > 0 ?(void*)malloc(atom_size):NULL); + else + { if(atom_type == VEVO_ATOM_TYPE_DOUBLE ) { + atom->value = (atom_size > 0 ? (void*) vevo_pool_alloc_dbl(double,port->pool ): NULL); + } else if( atom_type == VEVO_ATOM_TYPE_VOIDPTR || atom_type == VEVO_ATOM_TYPE_PORTPTR ) { + atom->value = (atom_size > 0 ? (void*) vevo_pool_alloc_ptr(void*,port->pool ): NULL ); + } else if( atom_type == VEVO_ATOM_TYPE_UINT64 ) { + atom->value = (atom_size > 0 ? (void*) vevo_pool_alloc_64b(uint64_t,port->pool) : NULL ); + } else { + atom->value = (atom_size > 0 ? (void*) vevo_pool_alloc_int(int32_t, port->pool ): NULL ); + } + } +#ifdef STRICT_CHECING + assert(atom != NULL); +#endif + return atom; +} + +//! Destroy an atom +/*! + \param port port + \param atom atom_t to destroy + */ +static void vevo_free_atom(__vevo_port_t *port,atom_t * atom) +{ +#ifdef STRICT_CHECKING + assert(atom != NULL); +#endif + if (atom) { + if(atom->value) + switch( atom->type ) + { + case VEVO_ATOM_TYPE_VOIDPTR: + case VEVO_ATOM_TYPE_PORTPTR: + vevo_pool_free_ptr( port->pool, atom->value ); + break; + case VEVO_ATOM_TYPE_INT: + case VEVO_ATOM_TYPE_BOOL: + vevo_pool_free_int( port->pool, atom->value ); + break; + case VEVO_ATOM_TYPE_DOUBLE: + vevo_pool_free_dbl( port->pool,atom->value ); + break; + case VEVO_ATOM_TYPE_UINT64: + vevo_pool_free_64b( port->pool,atom->value ); + break; + case VEVO_ATOM_TYPE_STRING: + free( atom->value ); + break; + } + vevo_pool_free_atom( port->pool, atom ); + } + atom = NULL; +} + +//! Copy a value from address into a new Atom +/*! + \param port port + \param dst destination address + \param atom_type type of atom + */ +static atom_t *vevo_put_atom(__vevo_port_t * port, void *dst, + int atom_type) +{ + atom_t *atom = NULL; + size_t atom_size = vevo_atom_size(atom_type); + + if (atom_type == VEVO_ATOM_TYPE_STRING) { + char **s = (char **) dst; + atom_size = strlen(*s) + 1; + atom = vevo_new_atom(port, atom_type, atom_size); + if (atom_size > 0) + memcpy(atom->value, *s, (atom_size - 1)); + } else { + +#ifdef STRICT_CHECKING + assert(atom_size > 0); + assert(dst != NULL); +#endif + atom = vevo_new_atom(port, atom_type, atom_size); +#ifdef STRICT_CHECING + assert(atom != NULL); + assert(atom->value != NULL); +#else + if (!atom) + return NULL; +#endif + memcpy(atom->value, dst, atom_size); + } + return atom; +} + + +//! Copy N values from address into a new Atom +/*! + \param port port + \param src source address + \param n number of elements + \param d vevo_storage_t + \param v type of atom + */ + +static void +storage_put_atom_value(__vevo_port_t * port, void *src, int n, + vevo_storage_t * d, int v) +{ + int i; +#ifdef STRICT_CHECKING + if (n > 0) + assert((src != NULL)); +#endif + if (d->num_elements >= 0) { + if (d->num_elements >= 0 && d->num_elements <= 1) { +#ifdef STRICT_CHECKING + if( d->num_elements == 1 ) + assert( d->elements.atom != NULL ); + if( d->num_elements == 0 ) + assert( d->elements.atom == NULL ); +#endif + if (d->elements.atom) + vevo_free_atom(port,d->elements.atom); + } else if (d->num_elements > 1) { + if (d->elements.array) { + for (i = 0; i < d->num_elements; i++) + vevo_free_atom(port,d->elements.array[i]); + free(d->elements.array); + } + } + } + + d->atom_type = v; + d->num_elements = n; + + switch (n) { + case 0: + d->elements.atom = vevo_new_atom(port, v, vevo_atom_size(v)); + break; + case 1: + d->elements.atom = vevo_put_atom(port, src, v); + break; + default: + d->elements.array = (atom_t **) malloc(sizeof(atom_t *) * n); + if (d->atom_type == VEVO_ATOM_TYPE_DOUBLE) { + double *value = (double *) src; + atom_store__(value); + } else { + if (d->atom_type == VEVO_ATOM_TYPE_INT + || d->atom_type == VEVO_ATOM_TYPE_BOOL) { + int32_t *value = (int *) src; + atom_store__(value); + } else if(d->atom_type == VEVO_ATOM_TYPE_UINT64) { + uint64_t *value = (uint64_t*) src; + atom_store__(value); + } else { + void **value = (void **) src; + atom_store__(value); + } + } + break; + } +} + +//! Construct a new vevo_storage_t object +/*! + \param port Port + \return vevo_storage_t + */ +static vevo_storage_t *vevo_new_storage( __vevo_port_t *port) +//static inline vevo_storage_t *vevo_new_storage(int num_elements) +{ + vevo_storage_t *d = + (vevo_storage_t*) vevo_pool_alloc_storage( vevo_storage_t, port->pool ); +// (vevo_storage_t *) vevo_malloc(sizeof(vevo_storage_t)); +#ifdef HAVE_STRICT + assert(d != NULL); +#endif + memset( d, 0, sizeof(vevo_storage_t)); + return d; +} + +//! Destroy a vevo_storage_t object +/*! + \param port port + \param t vevo_storage_t to destroy + */ +static void vevo_free_storage(__vevo_port_t *port,vevo_storage_t * t) +{ + if (t) { + if (t->num_elements > 1) { + int i; + for (i = 0; i < t->num_elements; i++) + { +#ifdef STRICT_CHECKING + assert( t->elements.array[i] != NULL ); +#endif + vevo_free_atom(port,t->elements.array[i]); + } + free(t->elements.array); + } + if (t->num_elements <= 1) + { +#ifdef STRICT_CHECKING + assert( t->elements.atom != NULL ); +#endif + vevo_free_atom(port,t->elements.atom); + + } +// free(t); + vevo_pool_free_storage( port->pool, t ); + } + t = NULL; +} + +//! Cast a key into a hashing value +/*! + \param key hash key code + \return hash value + */ +static hash_val_t int_hash(const void *key) +{ + return (hash_val_t) key; +} + +//! Compare two keys +/*! + \param key1 key1 + \param key2 key2 + \return error code if keys are unequal + */ +static int key_compare(const void *key1, const void *key2) +{ + return ((const uint64_t) key1 == (const uint64_t) key2 ? 0 : 1); +} + +//! Get the number of elements in an Atom +/*! + \param p port + \param key property name + \return Number of elements + */ +int vevo_property_num_elements(vevo_port_t * p, const char *key) +{ +#ifdef STRICT_CHECKING + assert(p != NULL); + assert(key != NULL); +#endif + if(!p) return -1; + + __vevo_port_t *port = (__vevo_port_t *) p; + uint64_t hash_key = hash_key_code(key); + + if (!port->table) { + vevo_property_t *node; + if ((node = prop_node_get(port, hash_key)) != NULL) + return node->st->num_elements; + } else { + hnode_t *node = NULL; + if ((node = property_exists(port, hash_key)) != NULL) { + vevo_storage_t *stor = (vevo_storage_t *) hnode_get(node); + if (stor) + return stor->num_elements; + } + } + return -1; +} + +//! Get the atom type of a Property +/*! + \param p Port + \param key Property name + \return Atom type + */ +int vevo_property_atom_type(vevo_port_t * p, const char *key) +{ +#ifdef STRICT_CHECKING + assert(p != NULL); + assert(key != NULL); +#endif + __vevo_port_t *port = (__vevo_port_t *) p; +#ifdef STRICT_CHECKING + assert(port != NULL); +#endif + uint64_t hash_key = hash_key_code(key); + + if (!port->table) { + vevo_property_t *node; + if ((node = prop_node_get(port, hash_key)) != NULL) + return node->st->atom_type; + } else { + hnode_t *node = NULL; +#ifdef STRICT_CHECKING + assert(port->table != NULL); +// assert(hash_verify(port->table) != 0); +#endif + + if ((node = property_exists(port, hash_key)) != NULL) { + vevo_storage_t *stor = (vevo_storage_t *) hnode_get(node); + if (stor) + return stor->atom_type; + } + } + return -1; +} + +//! Return size of an Atom at a given index +/*! + \param p Port + \param key Property name + \param idx Index + \return Byte size of value at Index + */ +size_t +vevo_property_element_size(vevo_port_t * p, const char *key, + const int idx) +{ +#ifdef STRICT_CHECKING + assert(p != NULL); + assert(key != NULL); + assert(idx >= 0); +#endif + __vevo_port_t *port = (__vevo_port_t *) p; + uint64_t hash_key = hash_key_code(key); +#ifdef STRICT_CHECKING + assert( port ); +#endif + if (!port->table) { + vevo_property_t *node; + if ((node = prop_node_get(port, hash_key)) != NULL) { +#ifdef STRICT_CHECKING + if (idx > 0) + assert(idx < node->st->num_elements); +#endif + if (node->st->num_elements == 1) + return node->st->elements.atom->size; + else if (node->st->num_elements > 1) + return node->st->elements.array[idx]->size; + return 0; + } + } else { + hnode_t *node = NULL; + if ((node = property_exists(port, hash_key)) != NULL) { + vevo_storage_t *stor = (vevo_storage_t *) hnode_get(node); +#ifdef STRICT_CHECKING + assert(idx <= stor->num_elements); +#endif + //todo: sum all element sizes for index of -1 + if (stor->num_elements == 1) { + return stor->elements.atom->size; + } else if (stor->num_elements > 1) { + return stor->elements.array[idx]->size; + } else { + if (stor->num_elements == 0) + return 0; + } + } + } + + return -1; +} + +//! Construct a new Port +/*! + \param port_type Type of Port to Create. Port types <= 1024 are typed, > 1024 are anonymous ports. + \return A New Port + */ +#ifndef STRICT_CHECKING +vevo_port_t *vevo_port_new(int port_type) +{ + __vevo_port_t *port = (__vevo_port_t *) malloc(sizeof(__vevo_port_t)); + + port->index = NULL; + port->list = NULL; + port->table = NULL; + port->pool = vevo_pool_init( sizeof(vevo_property_t),sizeof( vevo_storage_t ), sizeof( atom_t ) , sizeof( port_index_t ) ); +/* If the port type is a Livido port this or that */ + if ( (port_type >= 1 && port_type <= 50) || port_type < 0) + port->list = NULL; + else + port->table = hash_create(HASHCOUNT_T_MAX, key_compare, int_hash); + + vevo_port_finalize (port, port_type ); + return (vevo_port_t *) port; +} +#else +vevo_port_t *vevo_port_new(int port_type, const char *func, int line_num) +{ + __vevo_port_t *port = (__vevo_port_t *) malloc(sizeof(__vevo_port_t)); + +#ifdef STRICT_CHECKING + assert(port != NULL); +#endif + port->index = NULL; + port->list = NULL; + port->table = NULL; + port->pool = vevo_pool_init( sizeof(vevo_property_t),sizeof( vevo_storage_t ), sizeof( atom_t ) , sizeof( port_index_t ) ); +/* If the port type is a Livido port this or that */ + if ( (port_type >= 1 && port_type <= 50) || port_type < 0) + port->list = NULL; + else + port->table = hash_create(HASHCOUNT_T_MAX, key_compare, int_hash); + + vevo_port_finalize (port, port_type ); + +/* char har[1024]; + sprintf(har,"%s::%d", func,line_num ); + vevo_property_set( port, har, VEVO_ATOM_TYPE_HIDDEN,0,NULL); + */ + return (vevo_port_t *) port; +} + +#endif + +//! Initialize VeVo. Set up bookkeeping information to track Port construction and destruction +void vevo_strict_init() +{ +/* +#ifdef STRICT_CHECKING + port_ref_ = vevo_port_new( VEVO_PORT_REFERENCES, __FUNCTION__,__LINE__ ); +#endif +*/ + memset( atom_sizes_,0,sizeof(atom_sizes_) ); + atom_sizes_[1] = sizeof(int32_t); + atom_sizes_[2] = sizeof(double); + atom_sizes_[3] = sizeof(int32_t); + atom_sizes_[4] = sizeof(char*); + atom_sizes_[5] = sizeof(uint64_t); + atom_sizes_[65] = sizeof(void*); + atom_sizes_[66] = sizeof(vevo_port_t*); +} + +//! Destroy a Port +/*! + \param p (local) Port to destroy + */ +static void vevo_port_free_(vevo_port_t * p) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + + if (port->table) { + if (!hash_isempty((hash_t *) port->table)) { + hscan_t scan; + hash_scan_begin(&scan, (hash_t *) port->table); + hnode_t *node; + + while ((node = hash_scan_next(&scan)) != NULL) { + vevo_storage_t *stor = NULL; + stor = hnode_get(node); +#ifdef STRICT_CHECKING + assert(stor != NULL); + assert(node != NULL); + assert((const char *) hnode_getkey(node) != NULL); +#endif + vevo_free_storage(port,stor); + } + hash_free_nodes((hash_t *) port->table); + hash_destroy((hash_t *) port->table); + } + } + else + { + vevo_property_t *l = port->list; + vevo_property_t *n; + while (l != NULL) { + n = l->next; + vevo_free_storage(port,l->st); + prop_node_free(port,l); + l = n; + } + } + + port_index_t *l = port->index; + port_index_t *n = NULL; + while (l != NULL) { + n = l->next; + port_node_free(port,l); + l = n; + } + + vevo_pool_destroy( port->pool ); + + free(port); + p = port = NULL; +} + +//! Verify if Vevo has allocated a given Port +/*! + \param port Port to verify + \return error code + */ +int vevo_port_verify( vevo_port_t *port ) +{/* +#ifdef STRICT_CHECKING + if( port == port_ref_ ) + return 1; + char pkey[32]; + sprintf(pkey, "%p",port); + + int ref_count = 0; + int error = vevo_property_get( port_ref_, pkey, 0, &ref_count ); + + if( error != 0 ) + { + //veejay_msg(0, "%s: Port '%s' not allocated by vevo_port_new()", __FUNCTION__, pkey ); + return 0; + } + + if( error == VEVO_ERROR_NOSUCH_ELEMENT || error == + VEVO_ERROR_NOSUCH_PROPERTY ) + { + //veejay_msg(0, "%s: Port '%s' does not exist" ); + return 0; + } + + if( ref_count == 0 ) + { + //veejay_msg(0, "%s: Port %s has a reference count of 0 ",__FUNCTION__, pkey); + return 0; + } +#endif +*/ + return 1; +} + +//! Destroy a Port +/*! + \param p Port to destroy + */ + +void vevo_port_free( vevo_port_t *port ) +{ + if(!port) + { + veejay_msg(0, "Port invalid in free()"); +#ifdef STRICT_CHECKING + assert(0); +#endif + return; + } +/* +#ifdef STRICT_CHECKING + char pkey[32]; + sprintf(pkey, "%p",port); + if( port == port_ref_ ) + { + dec_ref = 0; + vevo_port_free_( port ); + } + if( dec_ref) + { + error = vevo_property_get( port_ref_, pkey, 0, &ref_count ); + if( error != VEVO_NO_ERROR ) + { + // veejay_msg(0, "%s: Port '%s' not allocated by vevo_port_new()", __FUNCTION__, pkey ); + assert(0); + } + if( ref_count == 0 ) + { + // veejay_msg(0, "%s: Port '%s' has a reference count of 0 (already freed)", __FUNCTION__, pkey ); + assert(0); + } + if( ref_count > 1 ) + { + // veejay_msg(0, "%s: Port '%s' has a reference count of %d", __FUNCTION__,pkey,ref_count); + return; + } + ref_count --; + assert( ref_count == 0 ); + vevo_property_set( port_ref_, pkey, VEVO_ATOM_TYPE_INT,1,&ref_count ); + vevo_port_free_( port ); + } +#else +*/ + vevo_port_free_(port ); +/* +#endif +*/ +} + +//! Check if a Property is soft referenced +/*! + \param p Port + \param key Property name + \return error code + */ +static int +vevo_property_is_soft_referenced(vevo_port_t * p, + const char *key ) +{ +#ifdef STRICT_CHECKING + assert(p != NULL); + assert( key != NULL ); +#endif + __vevo_port_t *port = (__vevo_port_t *) p; + uint64_t hash_key = hash_key_code(key); +#ifdef STRICT_CHECKING + assert( port != NULL ); +#endif + if (!port->table) { + vevo_property_t *pnode = NULL; + if ((pnode = prop_node_get(port, hash_key)) != NULL) { + return pnode->st->softlink; + } + } else { + hnode_t *old_node = NULL; + if ((old_node = property_exists(port, hash_key)) != NULL) { + vevo_storage_t *oldstor = + (vevo_storage_t *) hnode_get(old_node); + return oldstor->softlink; + } + } + return 0; +} + +//! Store a value as a new Property or overwrite existing value +/*! + \param p Port + \param key Property name + \param atom_type Atom type + \param num_elements Number of elements + \param src Source address + \return error code + */ +int +vevo_property_set(vevo_port_t * p, + const char *key, + int atom_type, int num_elements, void *src) +{ +#ifdef STRICT_CHECKING + assert(p != NULL); + //@ no self referencing + assert( src != p ); + if( num_elements > 0 ) assert( src != NULL ); + assert( key != NULL ); + if( atom_type != VEVO_ATOM_TYPE_HIDDEN ) + assert( vevo_atom_size(atom_type) > 0 ); +#endif + __vevo_port_t *port = (__vevo_port_t *) p; + uint64_t hash_key = hash_key_code(key); + int new = 1; + void *node = NULL; +#ifdef STRICT_CHECKING + assert( port != NULL ); +#endif + if (!port->table) { + vevo_property_t *pnode = NULL; + if ((pnode = prop_node_get(port, hash_key)) != NULL) { +#ifdef STRICT_CHECKING + if (pnode->st->atom_type != atom_type) + return VEVO_ERROR_WRONG_ATOM_TYPE; + if (pnode->st->flags & VEVO_PROPERTY_READONLY) + { + return VEVO_ERROR_PROPERTY_READONLY; + } +#endif + vevo_free_storage(port,pnode->st); + //prop_node_free(pnode); + new = 0; + node = (void *) pnode; + } + } else { + hnode_t *old_node = NULL; + if ((old_node = property_exists(port, hash_key)) != NULL) { + vevo_storage_t *oldstor = + (vevo_storage_t *) hnode_get(old_node); +#ifdef STRICT_CHECKING + if (oldstor->atom_type != atom_type) + return VEVO_ERROR_WRONG_ATOM_TYPE; + + if (oldstor->flags & VEVO_PROPERTY_READONLY) + return VEVO_ERROR_PROPERTY_READONLY; +#endif + vevo_free_storage(port,oldstor); + + hash_delete((hash_t *) port->table, old_node); + hnode_destroy(old_node); + new = 0; + } + } + vevo_storage_t *stor = vevo_new_storage(port); + + storage_put_atom_value(port, src, num_elements, stor, atom_type); + + if (new) { + port_node_append(port, key, hash_key); + if (!port->table) + node = (void *) prop_node_append(port, hash_key, stor); + } +#ifdef STRICT_CHECKING + assert(stor != NULL); +#endif + + if (!port->table) { +#ifdef STRICT_CHECKING + assert(node != NULL); +#endif + if (!new) { + vevo_property_t *current = (vevo_property_t *) node; + current->st = stor; + } + } else { + hnode_t *node2 = hnode_create(stor); + +#ifdef STRICT_CHECKING + assert(node2 != NULL); + assert(!hash_isfull((hash_t *) port->table)); + assert(!property_exists(port, hash_key)); +#endif + + hash_insert((hash_t *) port->table, node2, + (const void *) hash_key); + } + + return VEVO_NO_ERROR; +} + +//! Get a value from a Property +/*! + \param p Port + \param key Property name + \param idx Index + \param dst Destination address + \return error code + */ +int +vevo_property_get(vevo_port_t * p, const char *key, int idx, void *dst) +{ +#ifdef STRICT_CHECKING + assert(p != NULL); + assert( key != NULL ); + assert( idx >= 0 ); +#endif + __vevo_port_t *port = (__vevo_port_t *) p; + uint64_t hash_key = hash_key_code(key); + + if (!port->table) { + vevo_property_t *node = NULL; + if ((node = prop_node_get(port, hash_key)) != NULL) { + // if (dst == NULL) + // return VEVO_NO_ERROR; + // else + return atom_get_value(node->st, idx, dst); + } + } else { + hnode_t *node = NULL; + if ((node = property_exists(port, hash_key)) != NULL) { + // if (dst == NULL) + // return VEVO_NO_ERROR; + // else + return atom_get_value((vevo_storage_t *) hnode_get(node), + idx, dst); + } + } + + return VEVO_ERROR_NOSUCH_PROPERTY; +} + +//! List all properties in a Port +/*! + \param p Port + \return Null terminated list of property names + */ +char **vevo_list_properties(vevo_port_t * p) +{ + if(!p) return NULL; + + __vevo_port_t *port = (__vevo_port_t *) p; + if(!port->index) + return NULL; +#ifdef STRICT_CHECKING + assert(port != NULL); +#endif + char **list = NULL; + +#ifdef STRICT_CHECKING + int nn = 1; + if (port->table) + nn += hash_count((hash_t *) port->table); + else { + vevo_property_t *c = port->list; + while (c != NULL) { + c = c->next; + nn++; + } + } +#endif + + int n = 1; // null terminated list of keys + int i = 0; +#ifdef STRICT_CHECKING + assert( port->index != NULL ); +#endif + port_index_t *l = port->index; + while (l != NULL) { + l = l->next; + n++; + } + +#ifdef STRICT_CHECKING + if( n != nn ) + veejay_msg(0, "%s:%s (%p) Expected %d properties but there are %d", + __FILE__,__FUNCTION__,p,nn, n ); + assert(nn == n); +#endif + + list = (char **) malloc(sizeof(char *) * n); + if (!list) + return NULL; + + l = (port_index_t *) port->index; + i = 0; + while (l != NULL) { +#ifdef STRICT_CHECKING + if( vevo_property_atom_type( p, l->key ) != VEVO_ATOM_TYPE_HIDDEN ) + { +#endif + list[i] = (char *) strdup(l->key); +#ifdef STRICT_CHECING + assert(list[i] != NULL); +#endif + i++; +#ifdef STRICT_CHECKING + } +#endif + + l = l->next; + //i++; + } + list[i] = NULL; + + return list; +} + +int vevo_num_properties(vevo_port_t * p) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + if(!port->index) + return 0; + + int n = 0; + port_index_t *l = port->index; + while (l != NULL) { + l = l->next; + n++; + } + + return n; +} + + +//! Check if this Port holds an Atom of some type +/*! + \param p Port + \param atype Atom type + \return error code +*/ +static int vevo_scan_for_atom( vevo_port_t *p, int atype ) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + if(!p) return 0; + + if( port->table) + { + hnode_t *node; + hscan_t scan; + vevo_storage_t *s; +#ifdef STRICT_CHECKING + assert( port->table != NULL ); +#endif + hash_scan_begin( &scan,(hash_t*) port->table ); + + while((node=hash_scan_next(&scan)) != NULL) + { + s = hnode_get(node); + if( s->atom_type == atype ) + return 1; + } + } + else + { + vevo_property_t *l = port->list; + vevo_property_t *n; + vevo_storage_t *s; + while( l != NULL ) + { + n = l->next; + s = l->st; + + if( s->atom_type == atype ) + return 1; + + l = n; + } + } + return 0; +} + +//! List all Properties in a Port that match Atom type +/*! + \param p Port + \param atype Atom type + \return List of vevo_storage_t + */ +static vevo_storage_t **vevo_list_nodes_(vevo_port_t * p, int atype) +{ + __vevo_port_t *port = (__vevo_port_t *) p; + if(!p) return NULL; + + int n = 256; // null terminated list of keys + int i = 0; + + vevo_storage_t **list = (vevo_storage_t**)malloc(sizeof(vevo_storage_t*) * n ); + memset(list,0,sizeof(vevo_storage_t*) * n ); + + if( port->table) + { + hnode_t *node; + hscan_t scan; + vevo_storage_t *s; + hash_scan_begin( &scan,(hash_t*) port->table ); + while((node=hash_scan_next(&scan)) != NULL) + { + s = hnode_get(node); + if( (s && s->atom_type == atype) || atype == 0) + { + int type = 0; + int ec = atom_get_value(s, 0, &type); + if( ec == VEVO_NO_ERROR && !s->softlink ) + list[i++] = s; + } + } + } + else + { + vevo_property_t *l = port->list; + vevo_property_t *n; + vevo_storage_t *s; + while( l != NULL ) + { + n = l->next; + s = l->st; + + if( s->atom_type == atype || atype == 0 ) + { + int type = 0; + int ec = atom_get_value(l->st, 0, &type); + /* if( (type != PORT_TYPE_FILTER_CLASS || + type != PORT_TYPE_CHANNEL_TEMPLATE || + type != PORT_TYPE_PARAMETER_TEMPLATE || + type != PORT_TYPE_PLUGIN_INFO ) && + ec != VEVO_ERROR_PROPERTY_EMPTY && + !(s->flags & VEVO_PROPERTY_SOFTREF)) + */ + if( ec == VEVO_NO_ERROR && !s->softlink ) + list[i++] = s; + } + l = n; + } + } +#ifdef STRICT_CHECKING + assert( i < 256 ); +#endif + return list; +} + +//! Report statistics and free bookkeeping information +void vevo_report_stats() +{ +/* +#ifdef STRICT_CHECKING + if( port_ref_ ) + { + int errs = vevo_port_ref_verify( port_ref_ ); + if(errs > 0) + veejay_msg(0,"%d VEVO ports are still referenced",errs); + vevo_port_free( port_ref_ ); + } +#endif*/ +} + +static int vevo_port_get_port( void *port, vevo_storage_t *item, void *res ) +{ + if (item->flags & VEVO_PROPERTY_SOFTREF) + return -1; + if(item->num_elements == 1 ) + atom_get_value( item, 0, res ); + return item->num_elements; +} + +//! Add a Port to the reference port or create a new reference port +/*! + \param in Input port + \param ref Reference Port + \return New port or Input port + */ +void *vevo_port_register( vevo_port_t *in, vevo_port_t *ref ) +{ + void *port = in; + const void *store = ref; +#ifndef STRICT_CHECKING + if(!port) + port = vevo_port_new( VEVO_PORT_POOL ); +#else + if(!port) + port = vevo_port_new( VEVO_PORT_POOL, __FUNCTION__, __LINE__ ); +#endif + char pkey[32]; + +#ifdef STRICT_CHECKING + assert( vevo_port_verify( port ) == 1 ); +#endif + + if(store) + { + sprintf(pkey,"%p", ref); + vevo_property_set( port, pkey,VEVO_ATOM_TYPE_PORTPTR, 1 , &ref ); + } + return port; +} + +//! Merge 2 Ports, A + B = AB. Only for properties that have atom VOIDPTR +/**! all in port_a is added to port_b + \param port Port A + \param port Port B + \return Error code + */ +int vevo_union_ports( void *port_a, void *port_b, int filter_type ) +{ + __vevo_port_t *A = (__vevo_port_t *) port_a; + __vevo_port_t *B = (__vevo_port_t *) port_b; + + if(!A || !B ) + return 1; + + char **Ea = vevo_list_properties( port_a ); + int i; + int error; + for( i = 0; Ea[i] != NULL; i ++ ) + { + if(!vevo_property_exists( port_b, Ea[i] )&& vevo_property_atom_type( port_a, Ea[i] ) == + filter_type ) + { +#ifdef STRICT_CHECKING + int n = vevo_property_num_elements( port_b, Ea[i] ); + // clone elements! + assert( n <= 1 ); +#endif + void *v = NULL; + error = vevo_property_get( port_a, Ea[i], 0, &v ); +#ifdef STRICT_CHECKING + assert( error == VEVO_NO_ERROR ); +#endif + error = vevo_property_set( port_b, Ea[i], + VEVO_ATOM_TYPE_VOIDPTR,1, &v ); +#ifdef STRICT_CHECKING + assert( error == VEVO_NO_ERROR ); +#endif + } + free( Ea[i] ); + } + free( Ea ); + + return 0; +} + +//! Adds all elements in port_b of type VOIDPTR to port_a. Key value tupple is reversed. +/*! + * \param port Port A + \param port Port B + \return Error code + */ + +int vevo_special_union_ports( void *port_a, void *port_b ) +{ + __vevo_port_t *A = (__vevo_port_t *) port_a; + __vevo_port_t *B = (__vevo_port_t *) port_b; + + if(!A || !B ) + return 0; + + // port_a contains only slots + + char **Ea = vevo_list_properties( port_a ); + int i; + int error; + if(!Ea) + return 0; + + for( i = 0; Ea[i] != NULL; i ++ ) + { + void *value = NULL; + char key[64]; + + int atom_type = vevo_property_atom_type( port_a, Ea[i] ); + if( atom_type == VEVO_ATOM_TYPE_VOIDPTR ) + { + error = vevo_property_get( port_a, Ea[i], 0, &value ); +#ifdef STRICT_CHECKING + assert( error == VEVO_NO_ERROR ); +#endif + sprintf(key, "%p", value ); + + if(!vevo_property_exists( port_b, key )) + { + error = vevo_property_set( port_b, key, VEVO_ATOM_TYPE_VOIDPTR,1,&value ); +#ifdef STRICT_CHECKING + assert( error == VEVO_NO_ERROR ); +#endif + } + } + free( Ea[i] ); + } + free( Ea ); + return 0; +} +//! Recursivly destroy a Port and all sub ports +/**! + \param port Port to destroy + */ +void vevo_port_recursive_free( vevo_port_t *port ) +{ + if(!port) + return; + void *sor = vevo_port_register( NULL,NULL ); +#ifdef STRICT_CHECKING + assert( sor != NULL ); +#endif + vevo_port_recurse_free( sor, port ); +#ifdef STRICT_CHECKING + assert( sor != NULL ); +#endif + int i; + vevo_storage_t **item = vevo_list_nodes_( sor, VEVO_ATOM_TYPE_PORTPTR ); + if(!item) + { + vevo_port_free(sor); +#ifdef STRICT_CHECKING + assert( 0 ); +#endif + return; + } +#ifdef STRICT_CHECKING + assert( item != NULL ); + int n_freed = 0; +#endif + for( i = 0; item[i] != NULL ; i ++ ) + { + void *sub_port = NULL; + + int ec = atom_get_value( item[i],0,&sub_port ); + if( ec == VEVO_NO_ERROR ) + { +#ifdef STRICT_CHECKING + assert(sub_port != NULL); + n_freed++; +#endif + vevo_port_free( sub_port ); + } + } + free(item); + vevo_port_free( sor ); +} + + +char **vevo_port_deepen_namespace( void *port, char *path) +{ +#ifdef STRICT_CHECKING + assert( port != NULL ); + assert( path != NULL ); +#endif + char **top_level = vevo_list_properties(port); + int k; + int num = 0; + if(!top_level) + { + return 0; + } + num = vevo_num_properties(port ); + + if( num == 0 ) + { + return NULL; + } + char **res = (char**) malloc( sizeof(char*) * (num+1)); + memset(res,0,sizeof(char*) * (num+1)); + int n = 0; + + for( k = 0; top_level[k] != NULL ; k ++ ) + { + int atom_type = vevo_property_atom_type( port, top_level[k] ); + if( atom_type != VEVO_ATOM_TYPE_VOIDPTR && atom_type != VEVO_ATOM_TYPE_PORTPTR ) + { + int len = strlen(path) + 2; + len += strlen( top_level[k] ); + res[n] = (char*) malloc(sizeof(char) * len ); + snprintf(res[n],len,"%s/%s",path,top_level[k]); + n++; + } + free(top_level[k]); + } + free(top_level); + res[n] = NULL; + return res; +} + +char **vevo_port_recurse_namespace( vevo_port_t *port, const char *base ) + +{ + + char **top_level = vevo_list_properties(port); + if(!top_level) + return NULL; + int k; + int num = 0; + for( k = 0; top_level[k] != NULL ; k ++ ) + { + int atom_type = vevo_property_atom_type( port, top_level[k] ); + if( atom_type == VEVO_ATOM_TYPE_PORTPTR ) + { + void *p = NULL; + int error = vevo_property_get( port, top_level[k],0,&p ); + if( error == VEVO_NO_ERROR ) + { +#ifdef STRICT_CHECKING + assert( p != NULL ); +#endif + num += vevo_num_properties(p); + } + } + else if (atom_type != VEVO_ATOM_TYPE_VOIDPTR) + num++; + } + +#ifdef STRICT_CHECKING + assert( num > 0 ); +#endif + + char **namespace = (char**) vj_malloc(sizeof(char*) * (num+1) ); +#ifdef STRICT_CHECKING + assert( namespace != NULL ); +#endif + memset(namespace, 0,sizeof(char*) * (num+1)); + + int methods = 0; + int error; + for( k = 0; top_level[k] != NULL ; k ++ ) + { +#ifdef STRICT_CHECKING + assert( methods <= num ); +#endif + int atom_type = vevo_property_atom_type( port, top_level[k] ); + char path[256]; + + sprintf(path, "%s", base); + + if( atom_type == VEVO_ATOM_TYPE_PORTPTR ) + { + void *exp = NULL; + error = vevo_property_get( port, top_level[k],0,&exp ); +#ifdef STRICT_CHECKING + assert( error == VEVO_NO_ERROR ); +#endif + strcat( path, "/" ); + strcat( path, top_level[k] ); + + char **ns = vevo_port_deepen_namespace( exp, path ); + if( ns ) + { + int j; + for( j = 0; ns[j] != NULL ; j ++ ) + { + namespace[methods] = strdup( ns[j]); + methods++; + free(ns[j]); + } + free(ns); + } + } + else if( atom_type != VEVO_ATOM_TYPE_VOIDPTR ) + { + strcat( path, "/" ); + strcat( path, top_level[k] ); + namespace[ methods ] = strdup( path ); + methods ++; + } + free(top_level[k]); + } + free(top_level); + return namespace; +} +//! Flatten all ports and return list of ports to be destroyed +/*! + \param sorted_port Reference Port + \param p Top level Port to scan + */ +static void vevo_port_recurse_free( vevo_port_t *sorted_port, vevo_port_t *p ) +{ +#ifdef STRICT_CHECKING + assert( p != NULL ); +#endif + vevo_storage_t **item = vevo_list_nodes_( p, VEVO_ATOM_TYPE_PORTPTR ); + if(!item) + { + free(item); + return; + } + + vevo_port_register( sorted_port, p ); + int i; + for( i = 0; item[i] != NULL ; i ++ ) + { + void *q = NULL; + int n = vevo_port_get_port( p, item[i], &q ); + + if( n == 1 && q != NULL ) + { + if(!vevo_scan_for_atom( q, VEVO_ATOM_TYPE_PORTPTR )) + vevo_port_register( sorted_port,q ); + else + vevo_port_recurse_free( sorted_port,q ); + } + else + { + if( n > 1 ) + { + int k = 0; + for( k = 0; k < item[i]->num_elements; k ++ ) + { + void *qq = NULL; + atom_get_value( item[i], k, &qq ); + if(!vevo_scan_for_atom(qq,VEVO_ATOM_TYPE_PORTPTR )) + vevo_port_register( sorted_port,qq ); + else + vevo_port_recurse_free( sorted_port,qq ); + } + } + } + + } + free(item); +} + +//! Run over port reference port and verify that all ports have been freed +/*! + \param p pointer to reference port + \return error code +*/ + +static int vevo_port_ref_verify( vevo_port_t *p) +{ + int err = 0; +/* +#ifdef STRICT_CHECKING + char **item = NULL; + int i; + int ref_count = 0; + item = vevo_list_properties( p ); + if( item == NULL ) + { + veejay_msg(0, "%s: No properties in %p",p); + return 1; + } + for( i = 0; item[i] != NULL ; i ++ ) + { + int error = vevo_property_get( port_ref_,item[i],0,&ref_count); + + if( error == VEVO_ERROR_PROPERTY_EMPTY ) + ref_count = 0; + else + { + if( error != VEVO_NO_ERROR ) + { + veejay_msg(0, "Port '%p' reference unexpected error %d)", item[i],error ); + err++; + } + } + + if( ref_count != 0 ) + { + void *which_port = NULL; + error = vevo_property_get( port_ref_, item[i],0, &which_port ); + if( error ) + veejay_msg(0, "Port '%s' retrieval returns error %d", item[i],error ); +// else +// veejay_msg(0, "Reference to Port %s exists, but may be invalid", item[i]); +// veejay_msg(0, "Port '%s' reference count is %d",item[i], ref_count); + err++; + } + ref_count = 1; + free(item[i]); + } + free(item); +#endif + return err; +*/ + return 1; +} +static char *vevo_property_get_str( vevo_port_t *port, const char *key ) +{ + size_t len = vevo_property_element_size( port, key, 0 ); + char *ret = NULL; + if(len<=0) return NULL; + ret = (char*) malloc(sizeof(char) * len ); + vevo_property_get( port, key, 0, &ret ); + return ret; +} + +static char *vevo_format_inline_property( vevo_port_t *port, int n_elem, int type ) +{ + char *res = NULL; + char token[5]; + bzero(token,5); + switch(type) + { + case VEVO_ATOM_TYPE_INT: + token[0] = 'd'; + break; + case VEVO_ATOM_TYPE_BOOL: + token[0] = 'b'; + break; + case VEVO_ATOM_TYPE_UINT64: + token[0] = 'D'; + break; + case VEVO_ATOM_TYPE_STRING: + token[0] = 's'; + break; + case VEVO_ATOM_TYPE_DOUBLE: + token[0] = 'g'; + break; + + } + + if( token[0]) + { + int len = n_elem * strlen(token) + 1; + res = (char*) calloc(1, sizeof(char) * len ); + int i; + for( i =0; i < n_elem; i ++ ) + strncat( res,token,strlen(token) ); + } + return res; +} + +char *vevo_format_property( vevo_port_t *port, const char *key ) +{ + char *res = NULL; + char token[5]; + int atom_type = vevo_property_atom_type( port, key ); + + int n_elem = vevo_property_num_elements( port, key ); + + if( n_elem <= 0 ) + n_elem = 1; + + bzero(token,5); + + switch( atom_type ) + { + case VEVO_ATOM_TYPE_INT: + case VEVO_ATOM_TYPE_BOOL: + token[0] = 'd'; + break; + case VEVO_ATOM_TYPE_UINT64: + token[0] = 'D'; + break; + case VEVO_ATOM_TYPE_DOUBLE: + token[0] = 'g'; + break; + case VEVO_ATOM_TYPE_STRING: + token[0] = 's'; + break; + case VEVO_ATOM_TYPE_VOIDPTR: + token[0] = 'x'; + break; + case VEVO_ATOM_TYPE_PORTPTR: + token[0] = 'p'; + break; + default: + token[0] = 'g'; + break; + } + + if( token[0]) + { + int len = n_elem * strlen(token) + 1; + res = (char*) calloc(1, sizeof(char) * len ); + int i; + for( i =0; i < n_elem; i ++ ) + strncat( res,token,strlen(token) ); + } + + return res; + +} +char *vevo_format_kind( vevo_port_t *port, const char *key ) +{ + char *res = NULL; + char token[5]; + int atom_type = vevo_property_atom_type( port, key ); + + bzero(token,5); + + switch( atom_type ) + { + case VEVO_ATOM_TYPE_INT: + case VEVO_ATOM_TYPE_BOOL: + token[0] = 'd'; + break; + case VEVO_ATOM_TYPE_UINT64: + token[0] = 'D'; + break; + case VEVO_ATOM_TYPE_DOUBLE: + token[0] = 'g'; + break; + case VEVO_ATOM_TYPE_STRING: + token[0] = 's'; + break; + case VEVO_ATOM_TYPE_VOIDPTR: + token[0] = 'x'; + break; + case VEVO_ATOM_TYPE_PORTPTR: + token[0] = 'p'; + break; + default: + token[0] = 'g'; + break; + } + + if( token[0]) + { + res = strdup( token ); + } + + return res; + +} + + +static const char *vevo_split_token_( const char *s, const char delim, char *buf, int buf_len ) +{ + const char *c = s; + int n = 0; + while(*c && n < buf_len) + { + *c++; + n++; + + if( *c == delim ) + { + strncpy( buf,s,n ); + return c+1; + } + } + return NULL; +} + +static char *vevo_scan_token_( const char *s ) +{ + const char *c = s; + int n = 0; + int ld = 0; + int fk = 0; + while( *c ) + { + if(*c == ':') + ld = n + 1; + if(*c == '=' && ld > 0) + { + fk = 1; + break; + } + *c++; + n++; + } + char *res = NULL; + + if( ld > 0 && fk ) + res = strndup( s, ld ); + + return res; +} + +static const char *vevo_split_token_q( const char *s, const char delim, char *buf, int buf_len ) +{ + const char *c = s; + int n = 0; + + if( *c != '"' ) + return NULL; + + while(*c && n < buf_len) + { + *c++; + n++; + + if( *c == delim && n > 2) + { + strncpy( buf,s+1,n-1 ); + return c; + } + } + return NULL; +} + +//! Write all keys and values in character string to a port' +/*! + \param port Port + \param s Character string + \return Error Code + */ +int vevo_sscanf_port( vevo_port_t *port, const char *s ) +{ + + const char *ptr = s; + int len = strlen(s); + int i = 0; + while( len > 0 ) + { + char *token = vevo_scan_token_(ptr); + int token_len; + if( token ) + { + token_len = strlen(token); + if(vevo_sscanf_property( port, token )) + i++; + } + else + { + token_len = len; + if(vevo_sscanf_property( port, ptr )) + i++; + } + len -= token_len; + ptr += token_len; + } + return i; +} +//! Read a key and value from a character string into a Port' +/*! + \param port Port + \param s character string + \return error code + */ +#define MAX_ELEMENTS 64 +int vevo_sscanf_property( vevo_port_t *port, const char *s) +{ + int done = 0; + char key[PROPERTY_KEY_SIZE]; + bzero(key, PROPERTY_KEY_SIZE ); + const char *value = vevo_split_token_(s, '=', key, PROPERTY_KEY_SIZE ); + if(value==NULL) + return 0; + + char *format = vevo_format_property( port, key ); + int atom = vevo_property_atom_type( port, key ); + + if( format == NULL ) + return done; + if(atom==-1) + atom = VEVO_ATOM_TYPE_DOUBLE; + //@ if a property does not exist, DOUBLE is assumed + //@ DOUBLE is valid for all sample's of type capture. + + uint64_t i64_val[MAX_ELEMENTS]; + int32_t i32_val[MAX_ELEMENTS]; + double dbl_val[MAX_ELEMENTS]; + char *str_val[MAX_ELEMENTS]; + + int cur_elem = 0; + int n = 0; + + const char *p = value; + char *fmt = format; + while( *fmt != '\0' ) + { + char arg[256]; + bzero(arg,256); + + if( *fmt == 's' ) + p = vevo_split_token_q( p, ':', arg, 1024 ); + else + p = vevo_split_token_( p, ':', arg, 1024 ); + + if( p == NULL ) + return 0; + + if( arg[0] != ':' ) + { + switch(*fmt) + { + case 'd': + n = sscanf( arg, "%d", &(i32_val[cur_elem])); + break; + case 'D': + n = sscanf( arg, "%lld", &(i64_val[cur_elem])); + break; + case 'g': + n = sscanf( arg, "%lf", &(dbl_val[cur_elem])); + break; + case 's': + str_val[cur_elem] = strdup( arg ); + n = 1; + break; + default: + n = 0; + break; + } + } + else + { + n = 0; + } + + *fmt++; + cur_elem ++; + } + + void *ptr = NULL; + if( n > 0 ) + switch( *format ) + { + case 'd': + ptr = &(i32_val[0]); + break; + case 'D': + ptr = &(i64_val[0]); + break; + case 'g': + ptr = &(dbl_val[0]); + break; + case 's': + ptr = &(str_val[0]); + break; + } + + int error = 0; + + //veejay_msg(0, "Set: '%s' : %d, %g", key,n, dbl_val[0] ); + + if( n == 0 ) + error = vevo_property_set( port, key, atom, 0, NULL ); + else + error = vevo_property_set( port, key, atom, cur_elem, ptr ); + + if( error == VEVO_NO_ERROR ) + done = 1; + return done; +} + +//! Write all properties in a port to a new character string in the form 'key=[value:value:value]:' +/*! + \param port Port + \return A new character string + */ +char **vevo_sprintf_port( vevo_port_t *port ) +{ + int i; + int k = 0; + int num = vevo_num_properties(port); + if( num == 0 ) + return NULL; + + char **keys = vevo_list_properties(port ); + + char **res = (char**) calloc(1, sizeof(char*) * (num+1) ); + + for( i = 0; keys[i] != NULL; i ++ ) + { + char *buf = vevo_sprintf_property(port, keys[i]); + char *p = buf; + if(buf) + { + res[k++] = strdup( buf ); + free(p); + } + free(keys[i]); + + } + res[num] = NULL; + + free(keys); + + return res; +} +//! Write property value to a new character string in the form 'key=[value:value:value]:' +/*! + \param port Port + \param key Property to write + \return A new character string + */ + +char *vevo_sprintf_property_value( vevo_port_t *port, const char *key) +{ + char tmp[512]; + int n = vevo_property_num_elements( port, key ); + if( n <= 0 ) + return NULL; + int i; + int size = 0; + int atom = vevo_property_atom_type( port , key ); + + bzero(tmp,512); + + if(atom == VEVO_ATOM_TYPE_INT || atom == VEVO_ATOM_TYPE_BOOL) + { + int *a = (int*) malloc(sizeof(int) * n ); + for( i = 0; i < n ; i ++ ) + if( vevo_property_get( port, key, i, &(a[i]) ) != VEVO_NO_ERROR) + { + free(a); + return NULL; + } + else + { + char val[16]; + sprintf(val, "%4d", a[i]); + strcat( tmp, val ); + strcat( tmp, " "); + } + free(a); + } else if (atom == VEVO_ATOM_TYPE_DOUBLE ) + { + double *a = (double*) malloc(sizeof(double) * n ); + for( i = 0; i < n; i ++ ) + if( vevo_property_get( port, key, i , &(a[i])) != VEVO_NO_ERROR) + { + free(a); + return NULL; + } + else + { + char val[16]; + sprintf(val, "%04.2g", a[i]); + strcat( tmp, val ); + strcat( tmp, " " ); + } + free(a); + } else + return NULL; + + return strdup( tmp ); +} + + +#define PROP_MAX_LEN 1024 +#define PROP_ARG_LEN 256 +char *vevo_sprintf_property( vevo_port_t *port, const char *key ) +{ + char *format = vevo_format_property( port, key ); + if( format == NULL ) + return NULL; + char *res = (char*) calloc( 1, sizeof(char) * PROP_MAX_LEN ); + int n_elems = 0; + + int32_t i32_val = 0; + uint64_t i64_val = 0; + double dbl_val = 0.0; + char *str_val = NULL; + int error = 0; + int nerr = 0; + int size = PROP_MAX_LEN; + + void *vport = NULL; + + sprintf(res, "%s=", key ); + + while( *format && nerr == 0) + { + char tmp[1024]; + bzero(tmp,256); + switch(*format) + { + case 'd': + error = vevo_property_get(port,key,n_elems,&i32_val); + if( error == VEVO_NO_ERROR ) { + sprintf(tmp, "%d:", i32_val ); + } else if (error == VEVO_ERROR_PROPERTY_EMPTY ) { + tmp[0] = ':'; + } else + nerr ++; + break; + case 'D': + error = vevo_property_get(port,key,n_elems,&i64_val); + if( error == VEVO_NO_ERROR ) { + sprintf(tmp, "%lld:", i64_val ); + } else if( error == VEVO_ERROR_PROPERTY_EMPTY ) { + tmp[0] = ':'; + } else + nerr ++; + break; + case 'g': + error = vevo_property_get(port,key,n_elems,&dbl_val); + if( error == VEVO_NO_ERROR ) { + sprintf(tmp, "%g:", dbl_val ); + } else if ( error == VEVO_ERROR_PROPERTY_EMPTY ) { + tmp[0] = ':'; + } else + nerr ++; + break; + case 's': + str_val = vevo_property_get_str( port, key ); + if(str_val) + { + tmp[0] = '\"'; + strncat(tmp+1,str_val,250); + int n = strlen(tmp); + tmp[n] = '\"'; + tmp[n+1] = ':'; + } + else + { + tmp[0] = '\"'; + tmp[1] = '\"'; + tmp[2] = ':'; + } + str_val = NULL; + break; + case 'x': + break; + case 'p': + { + int num = 0; + if(n_elems == 0 ) + { + error = vevo_property_get(port,key,0,&vport ); + if(error == VEVO_NO_ERROR ) + num = vevo_num_properties(vport); + } + + if( num > 0 ) + { + char **pstr = vevo_sprintf_port( vport ); + if(pstr) + { + int k; + + sprintf(tmp, "[%s",key); + + for( k = 0; pstr[k] != NULL; k ++ ) + { + strncat(tmp, pstr[k], strlen(pstr[k])); + free(pstr[k]); + } + free(pstr); + + int n = strlen(tmp); + tmp[n] =']'; + tmp[n+1] = ':'; + } + } + } + break; + } + *format++; + n_elems++; + + if( nerr ) + break; + + size -= strlen(tmp); + if(size > 0) + strcat(res, tmp ); + else + nerr++; + } + + if( nerr ) + { + if( res ) free(res); + res = NULL; + } + return res; +} +int vevo_property_from_string( vevo_port_t *port, const char *s, const char *key, int n_elem, int type) +{ + int done = 0; + char *format = vevo_format_inline_property( port, n_elem, type ); + + if( format == NULL ) + return done; + + uint64_t i64_val[MAX_ELEMENTS]; + int32_t i32_val[MAX_ELEMENTS]; + double dbl_val[MAX_ELEMENTS]; + char *str_val[MAX_ELEMENTS]; + + int cur_elem = 0; + int n = 0; + const char *p = s; + char *fmt = format; + while( *fmt != '\0' ) + { + char arg[256]; + bzero(arg,256); + + if( *fmt == 's' ) + p = vevo_split_token_q( p, ':', arg, 1024 ); + else + p = vevo_split_token_( p, ':', arg, 1024 ); + + if( p == NULL ) + { + veejay_msg(0,"Invalid value. Use 'value:' "); + free(format); + return 0; + } + if( arg[0] != ':' ) + { + switch(*fmt) + { + case 'd': + case 'b': + n = sscanf( arg, "%d", &(i32_val[cur_elem])); + break; + case 'D': + n = sscanf( arg, "%lld", &(i64_val[cur_elem])); +#ifdef STRICT_CHECKING + assert( n == 1 ); +#endif + break; + case 'g': + n = sscanf( arg, "%lf", &(dbl_val[cur_elem])); + break; + case 's': + str_val[cur_elem] = strdup( arg ); + n = 1; + break; + default: + n = 0; + break; + } + } + else + { + n = 0; + } + + *fmt++; + cur_elem ++; + } + + void *ptr = NULL; + if( n > 0 ) + switch( *format ) + { + case 'd': + case 'b': + ptr = &(i32_val[0]); + break; + case 'D': + ptr = &(i64_val[0]); + break; + case 'g': + ptr = &(dbl_val[0]); + break; + case 's': + ptr = &(str_val[0]); + break; + } + + int error = 0; + if( n == 0 ) + error = vevo_property_set( port, key, type, 0, NULL ); + else + { +#ifdef STRICT_CHECKING + assert( port != NULL ); + assert( ptr != NULL ); +#endif + error = vevo_property_set( port, key, type, cur_elem, ptr ); + } + if( error == VEVO_NO_ERROR ) + done = 1; + free(format); + return done; +} + +char *vevo_property_get_string( void *port, const char *key ) +{ + size_t len = vevo_property_element_size( port, key, 0 ); + char *ret = NULL; + if(len<=0) return NULL; + + if( vevo_property_get( port, key,0,NULL ) != VEVO_NO_ERROR ) + return NULL; + +#ifdef STRICT_CHECKING + assert( vevo_property_atom_type( port, key ) == VEVO_ATOM_TYPE_STRING ); +#endif + ret = (char*) vj_malloc(sizeof(char) * len ); + vevo_property_get( port, key, 0, &ret ); + return ret; +} + + +int +vevo_property_del(vevo_port_t * p, + const char *key ) +{ +#ifdef STRICT_CHECKING + assert(p != NULL); + //@ no self referencing + assert( key != NULL ); +#endif + __vevo_port_t *port = (__vevo_port_t *) p; + uint64_t hash_key = hash_key_code(key); + void *node = NULL; + if (!port->table) { + veejay_msg(0, "Is LIst"); + vevo_property_t *pnode = NULL; + if ((pnode = prop_node_get(port, hash_key)) != NULL) { + vevo_free_storage(port,pnode->st); + prop_node_free(port,pnode); + //node = (void *) pnode; + } + } else { + veejay_msg(0, "Is Hash"); + hnode_t *old_node = NULL; + if ((old_node = property_exists(port, hash_key)) != NULL) { + vevo_storage_t *oldstor = + (vevo_storage_t *) hnode_get(old_node); + vevo_free_storage(port,oldstor); + hash_delete((hash_t *) port->table, old_node); + hnode_destroy(old_node); + } + } + + port_index_t *l = port->index; + port_index_t *n = NULL; + while (l != NULL) { + n = l->next; + if( l->key == hash_key ) + port_node_free(port,l); + l = n; + } + + return VEVO_NO_ERROR; +} + diff --git a/veejay-server/libvevo/vevo.h b/veejay-server/libvevo/vevo.h new file mode 100644 index 00000000..0c481f9c --- /dev/null +++ b/veejay-server/libvevo/vevo.h @@ -0,0 +1,73 @@ +/* +Copyright (c) 2004-2005 N.Elburg + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +# ifndef VEVO_H_INCLUDED +# define VEVO_H_INCLUDED + +#include +#include +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#define VEVO_FF_PORT 10 // free frame port +#define VEVO_FF_PARAM_PORT 11 // free frame parameter port + +#define VEVO_FR_PORT 20 // frei0r port +#define VEVO_FR_PARAM_PORT 21 // frei0r parameter port + +#define VEVO_LIVIDO_PORT 30 // livido port +#define VEVO_LIVIDO_PARAM_PORT 31 // livido parameter port +#define VEVO_ILLEGAL 100 + +#define VEVO_EVENT_PORT 321 + +#define VEVO_VJE_PORT 32 + + +#define VEVO_CACHE_PORT 40 // linked list +#define VEVO_PORT_REFERENCES 1040 // hash +#define VEVO_SAMPLE_PORT 2035 // sample +#define VEVO_SAMPLE_BANK_PORT 2036 // bank + +#define VEVO_VJE_INSTANCE_PORT 33 + +#define HAVE_LIVIDO_PORT_T +typedef void livido_port_t; +# endif + + +#define LIVIDO_ATOM_TYPE_INT VEVO_ATOM_TYPE_INT +#define LIVIDO_ATOM_TYPE_DOUBLE VEVO_ATOM_TYPE_DOUBLE +#define LIVIDO_ATOM_TYPE_BOOLEAN VEVO_ATOM_TYPE_BOOL +#define LIVIDO_ATOM_TYPE_STRING VEVO_ATOM_TYPE_STRING +#define LIVIDO_ATOM_TYPE_VOIDPTR VEVO_ATOM_TYPE_VOIDPTR +#define LIVIDO_ATOM_TYPE_PORTPTR VEVO_ATOM_TYPE_PORTPTR + diff --git a/veejay-server/libvje/Makefile.am b/veejay-server/libvje/Makefile.am new file mode 100644 index 00000000..35ca41d6 --- /dev/null +++ b/veejay-server/libvje/Makefile.am @@ -0,0 +1,46 @@ +# Makefile for veejay + +MAINTAINERCLEANFILES=Makefile.in +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem -I$(top_srcdir)/libgoom -I$(top_srcdir)/vjmsg $(FFMPEG_CFLAGS) $(GLIB_CFLAGS) + +AM_CFLAGS = $(OP_CFLAGS) -freg-struct-return +pkginclude_HEADERS = vje.h +VJE_LIB_FILE = libvje.la +noinst_LTLIBRARIES = $(VJE_LIB_FILE) + +libvje_la_SOURCES = plugload.c vj-effect.c vj-effman.c effects/common.c \ + effects/diff.c effects/fibdownscale.c effects/killchroma.c \ + effects/lumamagick.c effects/autoeq.c effects/colorhis.c \ + effects/mirrors.c effects/goom.c effects/colormap.c effects/negation.c \ + effects/overclock.c effects/dissolve.c effects/opacity.c effects/posterize.c \ + effects/dither.c effects/dices.c effects/emboss.c effects/flip.c \ + effects/revtv.c effects/softblur.c effects/zoom.c effects/split.c effects/widthmirror.c \ + effects/frameborder.c effects/dummy.c effects/rawman.c effects/rawval.c \ + effects/smuck.c effects/transform.c effects/borders.c effects/colflash.c \ + effects/rgbkey.c effects/solarize.c effects/mirrors2.c effects/timedistort.c \ + effects/whiteframe.c effects/deinterlace.c effects/lumakey.c effects/chameleon.c \ + effects/coloradjust.c effects/gamma.c effects/reflection.c effects/rotozoom.c \ + transitions/transblend.c transitions/slidingdoor.c effects/color.c \ + transitions/transline.c transitions/transop.c transitions/transcarot.c \ + transitions/fadecolor.c effects/lumablend.c effects/chromamagick.c \ + transitions/fadecolorrgb.c effects/magicoverlays.c effects/binaryoverlays.c \ + effects/pencilsketch.c effects/chameleonblend.c effects/diffimg.c \ + effects/swirl.c effects/chromium.c effects/uvcorrect.c effects/chromapalette.c \ + effects/radialblur.c effects/fisheye.c effects/raster.c effects/smear.c effects/magicmirror.c \ + effects/lumamask.c effects/pixelate.c effects/colorshift.c effects/scratcher.c effects/opacitythreshold.c \ + effects/opacityadv.c effects/rgbkeysmooth.c effects/mask.c effects/distort.c effects/motionmap.c \ + transitions/wipe.c effects/magicscratcher.c effects/chromascratcher.c \ + effects/tracer.c effects/mtracer.c effects/dupmagic.c effects/keyselect.c \ + effects/greyselect.c effects/bwselect.c effects/complexsaturate.c \ + effects/complexthreshold.c effects/complexinvert.c effects/complexsync.c \ + effects/isolate.c transitions/vbar.c transitions/3bar.c effects/enhancemask.c effects/noiseadd.c \ + effects/contrast.c effects/motionblur.c effects/sinoids.c effects/average.c \ + effects/ripple.c effects/water.c effects/noisepencil.c effects/bathroom.c effects/slice.c \ + effects/crosspixel.c effects/diffmap.c effects/threshold.c effects/morphology.c effects/colmorphology.c \ + effects/ghost.c effects/blob.c effects/radcor.c effects/boids.c effects/nervous.c \ + effects/cartonize.c effects/tripplicity.c effects/neighbours.c effects/neighbours2.c\ + effects/neighbours3.c effects/neighbours4.c effects/neighbours5.c effects/cutstop.c\ + effects/contourextract.c effects/texmap.c effects/maskstop.c effects/photoplay.c effects/videoplay.c effects/rgbchannel.c \ + effects/videowall.c effects/flare.c effects/radioactive.c effects/baltantv.c effects/constantblend.c effects/picinpic.c + + diff --git a/veejay-server/libvje/Makefile.in b/veejay-server/libvje/Makefile.in new file mode 100644 index 00000000..76563082 --- /dev/null +++ b/veejay-server/libvje/Makefile.in @@ -0,0 +1,1686 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Makefile for veejay + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libvje +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libvje_la_LIBADD = +am_libvje_la_OBJECTS = plugload.lo vj-effect.lo vj-effman.lo common.lo \ + diff.lo fibdownscale.lo killchroma.lo lumamagick.lo autoeq.lo \ + colorhis.lo mirrors.lo goom.lo colormap.lo negation.lo \ + overclock.lo dissolve.lo opacity.lo posterize.lo dither.lo \ + dices.lo emboss.lo flip.lo revtv.lo softblur.lo zoom.lo \ + split.lo widthmirror.lo frameborder.lo dummy.lo rawman.lo \ + rawval.lo smuck.lo transform.lo borders.lo colflash.lo \ + rgbkey.lo solarize.lo mirrors2.lo timedistort.lo whiteframe.lo \ + deinterlace.lo lumakey.lo chameleon.lo coloradjust.lo gamma.lo \ + reflection.lo rotozoom.lo transblend.lo slidingdoor.lo \ + color.lo transline.lo transop.lo transcarot.lo fadecolor.lo \ + lumablend.lo chromamagick.lo fadecolorrgb.lo magicoverlays.lo \ + binaryoverlays.lo pencilsketch.lo chameleonblend.lo diffimg.lo \ + swirl.lo chromium.lo uvcorrect.lo chromapalette.lo \ + radialblur.lo fisheye.lo raster.lo smear.lo magicmirror.lo \ + lumamask.lo pixelate.lo colorshift.lo scratcher.lo \ + opacitythreshold.lo opacityadv.lo rgbkeysmooth.lo mask.lo \ + distort.lo motionmap.lo wipe.lo magicscratcher.lo \ + chromascratcher.lo tracer.lo mtracer.lo dupmagic.lo \ + keyselect.lo greyselect.lo bwselect.lo complexsaturate.lo \ + complexthreshold.lo complexinvert.lo complexsync.lo isolate.lo \ + vbar.lo 3bar.lo enhancemask.lo noiseadd.lo contrast.lo \ + motionblur.lo sinoids.lo average.lo ripple.lo water.lo \ + noisepencil.lo bathroom.lo slice.lo crosspixel.lo diffmap.lo \ + threshold.lo morphology.lo colmorphology.lo ghost.lo blob.lo \ + radcor.lo boids.lo nervous.lo cartonize.lo tripplicity.lo \ + neighbours.lo neighbours2.lo neighbours3.lo neighbours4.lo \ + neighbours5.lo cutstop.lo contourextract.lo texmap.lo \ + maskstop.lo photoplay.lo videoplay.lo rgbchannel.lo \ + videowall.lo flare.lo radioactive.lo baltantv.lo \ + constantblend.lo picinpic.lo +libvje_la_OBJECTS = $(am_libvje_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libvje_la_SOURCES) +DIST_SOURCES = $(libvje_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem -I$(top_srcdir)/libgoom -I$(top_srcdir)/vjmsg $(FFMPEG_CFLAGS) $(GLIB_CFLAGS) +AM_CFLAGS = $(OP_CFLAGS) -freg-struct-return +pkginclude_HEADERS = vje.h +VJE_LIB_FILE = libvje.la +noinst_LTLIBRARIES = $(VJE_LIB_FILE) +libvje_la_SOURCES = plugload.c vj-effect.c vj-effman.c effects/common.c \ + effects/diff.c effects/fibdownscale.c effects/killchroma.c \ + effects/lumamagick.c effects/autoeq.c effects/colorhis.c \ + effects/mirrors.c effects/goom.c effects/colormap.c effects/negation.c \ + effects/overclock.c effects/dissolve.c effects/opacity.c effects/posterize.c \ + effects/dither.c effects/dices.c effects/emboss.c effects/flip.c \ + effects/revtv.c effects/softblur.c effects/zoom.c effects/split.c effects/widthmirror.c \ + effects/frameborder.c effects/dummy.c effects/rawman.c effects/rawval.c \ + effects/smuck.c effects/transform.c effects/borders.c effects/colflash.c \ + effects/rgbkey.c effects/solarize.c effects/mirrors2.c effects/timedistort.c \ + effects/whiteframe.c effects/deinterlace.c effects/lumakey.c effects/chameleon.c \ + effects/coloradjust.c effects/gamma.c effects/reflection.c effects/rotozoom.c \ + transitions/transblend.c transitions/slidingdoor.c effects/color.c \ + transitions/transline.c transitions/transop.c transitions/transcarot.c \ + transitions/fadecolor.c effects/lumablend.c effects/chromamagick.c \ + transitions/fadecolorrgb.c effects/magicoverlays.c effects/binaryoverlays.c \ + effects/pencilsketch.c effects/chameleonblend.c effects/diffimg.c \ + effects/swirl.c effects/chromium.c effects/uvcorrect.c effects/chromapalette.c \ + effects/radialblur.c effects/fisheye.c effects/raster.c effects/smear.c effects/magicmirror.c \ + effects/lumamask.c effects/pixelate.c effects/colorshift.c effects/scratcher.c effects/opacitythreshold.c \ + effects/opacityadv.c effects/rgbkeysmooth.c effects/mask.c effects/distort.c effects/motionmap.c \ + transitions/wipe.c effects/magicscratcher.c effects/chromascratcher.c \ + effects/tracer.c effects/mtracer.c effects/dupmagic.c effects/keyselect.c \ + effects/greyselect.c effects/bwselect.c effects/complexsaturate.c \ + effects/complexthreshold.c effects/complexinvert.c effects/complexsync.c \ + effects/isolate.c transitions/vbar.c transitions/3bar.c effects/enhancemask.c effects/noiseadd.c \ + effects/contrast.c effects/motionblur.c effects/sinoids.c effects/average.c \ + effects/ripple.c effects/water.c effects/noisepencil.c effects/bathroom.c effects/slice.c \ + effects/crosspixel.c effects/diffmap.c effects/threshold.c effects/morphology.c effects/colmorphology.c \ + effects/ghost.c effects/blob.c effects/radcor.c effects/boids.c effects/nervous.c \ + effects/cartonize.c effects/tripplicity.c effects/neighbours.c effects/neighbours2.c\ + effects/neighbours3.c effects/neighbours4.c effects/neighbours5.c effects/cutstop.c\ + effects/contourextract.c effects/texmap.c effects/maskstop.c effects/photoplay.c effects/videoplay.c effects/rgbchannel.c \ + effects/videowall.c effects/flare.c effects/radioactive.c effects/baltantv.c effects/constantblend.c effects/picinpic.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libvje/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libvje/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libvje.la: $(libvje_la_OBJECTS) $(libvje_la_DEPENDENCIES) + $(LINK) $(libvje_la_OBJECTS) $(libvje_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/3bar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/autoeq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/average.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/baltantv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bathroom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binaryoverlays.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blob.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boids.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/borders.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bwselect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cartonize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chameleon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chameleonblend.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chromamagick.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chromapalette.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chromascratcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chromium.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colflash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colmorphology.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coloradjust.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colorhis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colormap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colorshift.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complexinvert.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complexsaturate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complexsync.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complexthreshold.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constantblend.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contourextract.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contrast.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crosspixel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cutstop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deinterlace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dices.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diffimg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diffmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dissolve.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/distort.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dupmagic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emboss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enhancemask.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadecolor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadecolorrgb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fibdownscale.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fisheye.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flare.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frameborder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ghost.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/goom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/greyselect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isolate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyselect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/killchroma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lumablend.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lumakey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lumamagick.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lumamask.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magicmirror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magicoverlays.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magicscratcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maskstop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mirrors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mirrors2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/morphology.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/motionblur.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/motionmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtracer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/negation.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neighbours.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neighbours2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neighbours3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neighbours4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neighbours5.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nervous.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/noiseadd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/noisepencil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opacity.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opacityadv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opacitythreshold.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/overclock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pencilsketch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/photoplay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/picinpic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixelate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugload.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posterize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radcor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radialblur.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radioactive.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raster.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawman.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reflection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/revtv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgbchannel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgbkey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgbkeysmooth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ripple.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotozoom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scratcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinoids.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slice.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slidingdoor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smear.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smuck.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/softblur.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solarize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swirl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threshold.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timedistort.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transblend.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transcarot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tripplicity.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uvcorrect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/videoplay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/videowall.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-effect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-effman.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/water.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/whiteframe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widthmirror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wipe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoom.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +common.lo: effects/common.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT common.lo -MD -MP -MF $(DEPDIR)/common.Tpo -c -o common.lo `test -f 'effects/common.c' || echo '$(srcdir)/'`effects/common.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/common.Tpo $(DEPDIR)/common.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/common.c' object='common.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o common.lo `test -f 'effects/common.c' || echo '$(srcdir)/'`effects/common.c + +diff.lo: effects/diff.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT diff.lo -MD -MP -MF $(DEPDIR)/diff.Tpo -c -o diff.lo `test -f 'effects/diff.c' || echo '$(srcdir)/'`effects/diff.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/diff.Tpo $(DEPDIR)/diff.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/diff.c' object='diff.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o diff.lo `test -f 'effects/diff.c' || echo '$(srcdir)/'`effects/diff.c + +fibdownscale.lo: effects/fibdownscale.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fibdownscale.lo -MD -MP -MF $(DEPDIR)/fibdownscale.Tpo -c -o fibdownscale.lo `test -f 'effects/fibdownscale.c' || echo '$(srcdir)/'`effects/fibdownscale.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fibdownscale.Tpo $(DEPDIR)/fibdownscale.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/fibdownscale.c' object='fibdownscale.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fibdownscale.lo `test -f 'effects/fibdownscale.c' || echo '$(srcdir)/'`effects/fibdownscale.c + +killchroma.lo: effects/killchroma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT killchroma.lo -MD -MP -MF $(DEPDIR)/killchroma.Tpo -c -o killchroma.lo `test -f 'effects/killchroma.c' || echo '$(srcdir)/'`effects/killchroma.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/killchroma.Tpo $(DEPDIR)/killchroma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/killchroma.c' object='killchroma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o killchroma.lo `test -f 'effects/killchroma.c' || echo '$(srcdir)/'`effects/killchroma.c + +lumamagick.lo: effects/lumamagick.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lumamagick.lo -MD -MP -MF $(DEPDIR)/lumamagick.Tpo -c -o lumamagick.lo `test -f 'effects/lumamagick.c' || echo '$(srcdir)/'`effects/lumamagick.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/lumamagick.Tpo $(DEPDIR)/lumamagick.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/lumamagick.c' object='lumamagick.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lumamagick.lo `test -f 'effects/lumamagick.c' || echo '$(srcdir)/'`effects/lumamagick.c + +autoeq.lo: effects/autoeq.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT autoeq.lo -MD -MP -MF $(DEPDIR)/autoeq.Tpo -c -o autoeq.lo `test -f 'effects/autoeq.c' || echo '$(srcdir)/'`effects/autoeq.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/autoeq.Tpo $(DEPDIR)/autoeq.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/autoeq.c' object='autoeq.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o autoeq.lo `test -f 'effects/autoeq.c' || echo '$(srcdir)/'`effects/autoeq.c + +colorhis.lo: effects/colorhis.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT colorhis.lo -MD -MP -MF $(DEPDIR)/colorhis.Tpo -c -o colorhis.lo `test -f 'effects/colorhis.c' || echo '$(srcdir)/'`effects/colorhis.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/colorhis.Tpo $(DEPDIR)/colorhis.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/colorhis.c' object='colorhis.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o colorhis.lo `test -f 'effects/colorhis.c' || echo '$(srcdir)/'`effects/colorhis.c + +mirrors.lo: effects/mirrors.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mirrors.lo -MD -MP -MF $(DEPDIR)/mirrors.Tpo -c -o mirrors.lo `test -f 'effects/mirrors.c' || echo '$(srcdir)/'`effects/mirrors.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mirrors.Tpo $(DEPDIR)/mirrors.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/mirrors.c' object='mirrors.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mirrors.lo `test -f 'effects/mirrors.c' || echo '$(srcdir)/'`effects/mirrors.c + +goom.lo: effects/goom.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT goom.lo -MD -MP -MF $(DEPDIR)/goom.Tpo -c -o goom.lo `test -f 'effects/goom.c' || echo '$(srcdir)/'`effects/goom.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/goom.Tpo $(DEPDIR)/goom.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/goom.c' object='goom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o goom.lo `test -f 'effects/goom.c' || echo '$(srcdir)/'`effects/goom.c + +colormap.lo: effects/colormap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT colormap.lo -MD -MP -MF $(DEPDIR)/colormap.Tpo -c -o colormap.lo `test -f 'effects/colormap.c' || echo '$(srcdir)/'`effects/colormap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/colormap.Tpo $(DEPDIR)/colormap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/colormap.c' object='colormap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o colormap.lo `test -f 'effects/colormap.c' || echo '$(srcdir)/'`effects/colormap.c + +negation.lo: effects/negation.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT negation.lo -MD -MP -MF $(DEPDIR)/negation.Tpo -c -o negation.lo `test -f 'effects/negation.c' || echo '$(srcdir)/'`effects/negation.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/negation.Tpo $(DEPDIR)/negation.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/negation.c' object='negation.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o negation.lo `test -f 'effects/negation.c' || echo '$(srcdir)/'`effects/negation.c + +overclock.lo: effects/overclock.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT overclock.lo -MD -MP -MF $(DEPDIR)/overclock.Tpo -c -o overclock.lo `test -f 'effects/overclock.c' || echo '$(srcdir)/'`effects/overclock.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/overclock.Tpo $(DEPDIR)/overclock.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/overclock.c' object='overclock.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o overclock.lo `test -f 'effects/overclock.c' || echo '$(srcdir)/'`effects/overclock.c + +dissolve.lo: effects/dissolve.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dissolve.lo -MD -MP -MF $(DEPDIR)/dissolve.Tpo -c -o dissolve.lo `test -f 'effects/dissolve.c' || echo '$(srcdir)/'`effects/dissolve.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dissolve.Tpo $(DEPDIR)/dissolve.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/dissolve.c' object='dissolve.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dissolve.lo `test -f 'effects/dissolve.c' || echo '$(srcdir)/'`effects/dissolve.c + +opacity.lo: effects/opacity.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT opacity.lo -MD -MP -MF $(DEPDIR)/opacity.Tpo -c -o opacity.lo `test -f 'effects/opacity.c' || echo '$(srcdir)/'`effects/opacity.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/opacity.Tpo $(DEPDIR)/opacity.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/opacity.c' object='opacity.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o opacity.lo `test -f 'effects/opacity.c' || echo '$(srcdir)/'`effects/opacity.c + +posterize.lo: effects/posterize.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT posterize.lo -MD -MP -MF $(DEPDIR)/posterize.Tpo -c -o posterize.lo `test -f 'effects/posterize.c' || echo '$(srcdir)/'`effects/posterize.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/posterize.Tpo $(DEPDIR)/posterize.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/posterize.c' object='posterize.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posterize.lo `test -f 'effects/posterize.c' || echo '$(srcdir)/'`effects/posterize.c + +dither.lo: effects/dither.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dither.lo -MD -MP -MF $(DEPDIR)/dither.Tpo -c -o dither.lo `test -f 'effects/dither.c' || echo '$(srcdir)/'`effects/dither.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dither.Tpo $(DEPDIR)/dither.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/dither.c' object='dither.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dither.lo `test -f 'effects/dither.c' || echo '$(srcdir)/'`effects/dither.c + +dices.lo: effects/dices.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dices.lo -MD -MP -MF $(DEPDIR)/dices.Tpo -c -o dices.lo `test -f 'effects/dices.c' || echo '$(srcdir)/'`effects/dices.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dices.Tpo $(DEPDIR)/dices.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/dices.c' object='dices.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dices.lo `test -f 'effects/dices.c' || echo '$(srcdir)/'`effects/dices.c + +emboss.lo: effects/emboss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT emboss.lo -MD -MP -MF $(DEPDIR)/emboss.Tpo -c -o emboss.lo `test -f 'effects/emboss.c' || echo '$(srcdir)/'`effects/emboss.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/emboss.Tpo $(DEPDIR)/emboss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/emboss.c' object='emboss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o emboss.lo `test -f 'effects/emboss.c' || echo '$(srcdir)/'`effects/emboss.c + +flip.lo: effects/flip.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flip.lo -MD -MP -MF $(DEPDIR)/flip.Tpo -c -o flip.lo `test -f 'effects/flip.c' || echo '$(srcdir)/'`effects/flip.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/flip.Tpo $(DEPDIR)/flip.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/flip.c' object='flip.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flip.lo `test -f 'effects/flip.c' || echo '$(srcdir)/'`effects/flip.c + +revtv.lo: effects/revtv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT revtv.lo -MD -MP -MF $(DEPDIR)/revtv.Tpo -c -o revtv.lo `test -f 'effects/revtv.c' || echo '$(srcdir)/'`effects/revtv.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/revtv.Tpo $(DEPDIR)/revtv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/revtv.c' object='revtv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o revtv.lo `test -f 'effects/revtv.c' || echo '$(srcdir)/'`effects/revtv.c + +softblur.lo: effects/softblur.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT softblur.lo -MD -MP -MF $(DEPDIR)/softblur.Tpo -c -o softblur.lo `test -f 'effects/softblur.c' || echo '$(srcdir)/'`effects/softblur.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/softblur.Tpo $(DEPDIR)/softblur.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/softblur.c' object='softblur.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o softblur.lo `test -f 'effects/softblur.c' || echo '$(srcdir)/'`effects/softblur.c + +zoom.lo: effects/zoom.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zoom.lo -MD -MP -MF $(DEPDIR)/zoom.Tpo -c -o zoom.lo `test -f 'effects/zoom.c' || echo '$(srcdir)/'`effects/zoom.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/zoom.Tpo $(DEPDIR)/zoom.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/zoom.c' object='zoom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zoom.lo `test -f 'effects/zoom.c' || echo '$(srcdir)/'`effects/zoom.c + +split.lo: effects/split.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT split.lo -MD -MP -MF $(DEPDIR)/split.Tpo -c -o split.lo `test -f 'effects/split.c' || echo '$(srcdir)/'`effects/split.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/split.Tpo $(DEPDIR)/split.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/split.c' object='split.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o split.lo `test -f 'effects/split.c' || echo '$(srcdir)/'`effects/split.c + +widthmirror.lo: effects/widthmirror.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT widthmirror.lo -MD -MP -MF $(DEPDIR)/widthmirror.Tpo -c -o widthmirror.lo `test -f 'effects/widthmirror.c' || echo '$(srcdir)/'`effects/widthmirror.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/widthmirror.Tpo $(DEPDIR)/widthmirror.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/widthmirror.c' object='widthmirror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o widthmirror.lo `test -f 'effects/widthmirror.c' || echo '$(srcdir)/'`effects/widthmirror.c + +frameborder.lo: effects/frameborder.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT frameborder.lo -MD -MP -MF $(DEPDIR)/frameborder.Tpo -c -o frameborder.lo `test -f 'effects/frameborder.c' || echo '$(srcdir)/'`effects/frameborder.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/frameborder.Tpo $(DEPDIR)/frameborder.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/frameborder.c' object='frameborder.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o frameborder.lo `test -f 'effects/frameborder.c' || echo '$(srcdir)/'`effects/frameborder.c + +dummy.lo: effects/dummy.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dummy.lo -MD -MP -MF $(DEPDIR)/dummy.Tpo -c -o dummy.lo `test -f 'effects/dummy.c' || echo '$(srcdir)/'`effects/dummy.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dummy.Tpo $(DEPDIR)/dummy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/dummy.c' object='dummy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dummy.lo `test -f 'effects/dummy.c' || echo '$(srcdir)/'`effects/dummy.c + +rawman.lo: effects/rawman.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rawman.lo -MD -MP -MF $(DEPDIR)/rawman.Tpo -c -o rawman.lo `test -f 'effects/rawman.c' || echo '$(srcdir)/'`effects/rawman.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rawman.Tpo $(DEPDIR)/rawman.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/rawman.c' object='rawman.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rawman.lo `test -f 'effects/rawman.c' || echo '$(srcdir)/'`effects/rawman.c + +rawval.lo: effects/rawval.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rawval.lo -MD -MP -MF $(DEPDIR)/rawval.Tpo -c -o rawval.lo `test -f 'effects/rawval.c' || echo '$(srcdir)/'`effects/rawval.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rawval.Tpo $(DEPDIR)/rawval.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/rawval.c' object='rawval.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rawval.lo `test -f 'effects/rawval.c' || echo '$(srcdir)/'`effects/rawval.c + +smuck.lo: effects/smuck.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT smuck.lo -MD -MP -MF $(DEPDIR)/smuck.Tpo -c -o smuck.lo `test -f 'effects/smuck.c' || echo '$(srcdir)/'`effects/smuck.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/smuck.Tpo $(DEPDIR)/smuck.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/smuck.c' object='smuck.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o smuck.lo `test -f 'effects/smuck.c' || echo '$(srcdir)/'`effects/smuck.c + +transform.lo: effects/transform.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT transform.lo -MD -MP -MF $(DEPDIR)/transform.Tpo -c -o transform.lo `test -f 'effects/transform.c' || echo '$(srcdir)/'`effects/transform.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/transform.Tpo $(DEPDIR)/transform.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/transform.c' object='transform.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o transform.lo `test -f 'effects/transform.c' || echo '$(srcdir)/'`effects/transform.c + +borders.lo: effects/borders.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT borders.lo -MD -MP -MF $(DEPDIR)/borders.Tpo -c -o borders.lo `test -f 'effects/borders.c' || echo '$(srcdir)/'`effects/borders.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/borders.Tpo $(DEPDIR)/borders.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/borders.c' object='borders.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o borders.lo `test -f 'effects/borders.c' || echo '$(srcdir)/'`effects/borders.c + +colflash.lo: effects/colflash.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT colflash.lo -MD -MP -MF $(DEPDIR)/colflash.Tpo -c -o colflash.lo `test -f 'effects/colflash.c' || echo '$(srcdir)/'`effects/colflash.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/colflash.Tpo $(DEPDIR)/colflash.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/colflash.c' object='colflash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o colflash.lo `test -f 'effects/colflash.c' || echo '$(srcdir)/'`effects/colflash.c + +rgbkey.lo: effects/rgbkey.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rgbkey.lo -MD -MP -MF $(DEPDIR)/rgbkey.Tpo -c -o rgbkey.lo `test -f 'effects/rgbkey.c' || echo '$(srcdir)/'`effects/rgbkey.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rgbkey.Tpo $(DEPDIR)/rgbkey.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/rgbkey.c' object='rgbkey.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rgbkey.lo `test -f 'effects/rgbkey.c' || echo '$(srcdir)/'`effects/rgbkey.c + +solarize.lo: effects/solarize.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT solarize.lo -MD -MP -MF $(DEPDIR)/solarize.Tpo -c -o solarize.lo `test -f 'effects/solarize.c' || echo '$(srcdir)/'`effects/solarize.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/solarize.Tpo $(DEPDIR)/solarize.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/solarize.c' object='solarize.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o solarize.lo `test -f 'effects/solarize.c' || echo '$(srcdir)/'`effects/solarize.c + +mirrors2.lo: effects/mirrors2.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mirrors2.lo -MD -MP -MF $(DEPDIR)/mirrors2.Tpo -c -o mirrors2.lo `test -f 'effects/mirrors2.c' || echo '$(srcdir)/'`effects/mirrors2.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mirrors2.Tpo $(DEPDIR)/mirrors2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/mirrors2.c' object='mirrors2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mirrors2.lo `test -f 'effects/mirrors2.c' || echo '$(srcdir)/'`effects/mirrors2.c + +timedistort.lo: effects/timedistort.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT timedistort.lo -MD -MP -MF $(DEPDIR)/timedistort.Tpo -c -o timedistort.lo `test -f 'effects/timedistort.c' || echo '$(srcdir)/'`effects/timedistort.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/timedistort.Tpo $(DEPDIR)/timedistort.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/timedistort.c' object='timedistort.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o timedistort.lo `test -f 'effects/timedistort.c' || echo '$(srcdir)/'`effects/timedistort.c + +whiteframe.lo: effects/whiteframe.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT whiteframe.lo -MD -MP -MF $(DEPDIR)/whiteframe.Tpo -c -o whiteframe.lo `test -f 'effects/whiteframe.c' || echo '$(srcdir)/'`effects/whiteframe.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/whiteframe.Tpo $(DEPDIR)/whiteframe.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/whiteframe.c' object='whiteframe.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o whiteframe.lo `test -f 'effects/whiteframe.c' || echo '$(srcdir)/'`effects/whiteframe.c + +deinterlace.lo: effects/deinterlace.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT deinterlace.lo -MD -MP -MF $(DEPDIR)/deinterlace.Tpo -c -o deinterlace.lo `test -f 'effects/deinterlace.c' || echo '$(srcdir)/'`effects/deinterlace.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/deinterlace.Tpo $(DEPDIR)/deinterlace.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/deinterlace.c' object='deinterlace.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o deinterlace.lo `test -f 'effects/deinterlace.c' || echo '$(srcdir)/'`effects/deinterlace.c + +lumakey.lo: effects/lumakey.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lumakey.lo -MD -MP -MF $(DEPDIR)/lumakey.Tpo -c -o lumakey.lo `test -f 'effects/lumakey.c' || echo '$(srcdir)/'`effects/lumakey.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/lumakey.Tpo $(DEPDIR)/lumakey.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/lumakey.c' object='lumakey.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lumakey.lo `test -f 'effects/lumakey.c' || echo '$(srcdir)/'`effects/lumakey.c + +chameleon.lo: effects/chameleon.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chameleon.lo -MD -MP -MF $(DEPDIR)/chameleon.Tpo -c -o chameleon.lo `test -f 'effects/chameleon.c' || echo '$(srcdir)/'`effects/chameleon.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/chameleon.Tpo $(DEPDIR)/chameleon.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/chameleon.c' object='chameleon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chameleon.lo `test -f 'effects/chameleon.c' || echo '$(srcdir)/'`effects/chameleon.c + +coloradjust.lo: effects/coloradjust.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coloradjust.lo -MD -MP -MF $(DEPDIR)/coloradjust.Tpo -c -o coloradjust.lo `test -f 'effects/coloradjust.c' || echo '$(srcdir)/'`effects/coloradjust.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/coloradjust.Tpo $(DEPDIR)/coloradjust.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/coloradjust.c' object='coloradjust.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coloradjust.lo `test -f 'effects/coloradjust.c' || echo '$(srcdir)/'`effects/coloradjust.c + +gamma.lo: effects/gamma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gamma.lo -MD -MP -MF $(DEPDIR)/gamma.Tpo -c -o gamma.lo `test -f 'effects/gamma.c' || echo '$(srcdir)/'`effects/gamma.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gamma.Tpo $(DEPDIR)/gamma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/gamma.c' object='gamma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gamma.lo `test -f 'effects/gamma.c' || echo '$(srcdir)/'`effects/gamma.c + +reflection.lo: effects/reflection.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reflection.lo -MD -MP -MF $(DEPDIR)/reflection.Tpo -c -o reflection.lo `test -f 'effects/reflection.c' || echo '$(srcdir)/'`effects/reflection.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/reflection.Tpo $(DEPDIR)/reflection.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/reflection.c' object='reflection.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reflection.lo `test -f 'effects/reflection.c' || echo '$(srcdir)/'`effects/reflection.c + +rotozoom.lo: effects/rotozoom.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rotozoom.lo -MD -MP -MF $(DEPDIR)/rotozoom.Tpo -c -o rotozoom.lo `test -f 'effects/rotozoom.c' || echo '$(srcdir)/'`effects/rotozoom.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rotozoom.Tpo $(DEPDIR)/rotozoom.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/rotozoom.c' object='rotozoom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rotozoom.lo `test -f 'effects/rotozoom.c' || echo '$(srcdir)/'`effects/rotozoom.c + +transblend.lo: transitions/transblend.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT transblend.lo -MD -MP -MF $(DEPDIR)/transblend.Tpo -c -o transblend.lo `test -f 'transitions/transblend.c' || echo '$(srcdir)/'`transitions/transblend.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/transblend.Tpo $(DEPDIR)/transblend.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/transblend.c' object='transblend.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o transblend.lo `test -f 'transitions/transblend.c' || echo '$(srcdir)/'`transitions/transblend.c + +slidingdoor.lo: transitions/slidingdoor.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT slidingdoor.lo -MD -MP -MF $(DEPDIR)/slidingdoor.Tpo -c -o slidingdoor.lo `test -f 'transitions/slidingdoor.c' || echo '$(srcdir)/'`transitions/slidingdoor.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/slidingdoor.Tpo $(DEPDIR)/slidingdoor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/slidingdoor.c' object='slidingdoor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o slidingdoor.lo `test -f 'transitions/slidingdoor.c' || echo '$(srcdir)/'`transitions/slidingdoor.c + +color.lo: effects/color.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT color.lo -MD -MP -MF $(DEPDIR)/color.Tpo -c -o color.lo `test -f 'effects/color.c' || echo '$(srcdir)/'`effects/color.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/color.Tpo $(DEPDIR)/color.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/color.c' object='color.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o color.lo `test -f 'effects/color.c' || echo '$(srcdir)/'`effects/color.c + +transline.lo: transitions/transline.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT transline.lo -MD -MP -MF $(DEPDIR)/transline.Tpo -c -o transline.lo `test -f 'transitions/transline.c' || echo '$(srcdir)/'`transitions/transline.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/transline.Tpo $(DEPDIR)/transline.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/transline.c' object='transline.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o transline.lo `test -f 'transitions/transline.c' || echo '$(srcdir)/'`transitions/transline.c + +transop.lo: transitions/transop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT transop.lo -MD -MP -MF $(DEPDIR)/transop.Tpo -c -o transop.lo `test -f 'transitions/transop.c' || echo '$(srcdir)/'`transitions/transop.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/transop.Tpo $(DEPDIR)/transop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/transop.c' object='transop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o transop.lo `test -f 'transitions/transop.c' || echo '$(srcdir)/'`transitions/transop.c + +transcarot.lo: transitions/transcarot.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT transcarot.lo -MD -MP -MF $(DEPDIR)/transcarot.Tpo -c -o transcarot.lo `test -f 'transitions/transcarot.c' || echo '$(srcdir)/'`transitions/transcarot.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/transcarot.Tpo $(DEPDIR)/transcarot.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/transcarot.c' object='transcarot.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o transcarot.lo `test -f 'transitions/transcarot.c' || echo '$(srcdir)/'`transitions/transcarot.c + +fadecolor.lo: transitions/fadecolor.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fadecolor.lo -MD -MP -MF $(DEPDIR)/fadecolor.Tpo -c -o fadecolor.lo `test -f 'transitions/fadecolor.c' || echo '$(srcdir)/'`transitions/fadecolor.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fadecolor.Tpo $(DEPDIR)/fadecolor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/fadecolor.c' object='fadecolor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fadecolor.lo `test -f 'transitions/fadecolor.c' || echo '$(srcdir)/'`transitions/fadecolor.c + +lumablend.lo: effects/lumablend.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lumablend.lo -MD -MP -MF $(DEPDIR)/lumablend.Tpo -c -o lumablend.lo `test -f 'effects/lumablend.c' || echo '$(srcdir)/'`effects/lumablend.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/lumablend.Tpo $(DEPDIR)/lumablend.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/lumablend.c' object='lumablend.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lumablend.lo `test -f 'effects/lumablend.c' || echo '$(srcdir)/'`effects/lumablend.c + +chromamagick.lo: effects/chromamagick.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chromamagick.lo -MD -MP -MF $(DEPDIR)/chromamagick.Tpo -c -o chromamagick.lo `test -f 'effects/chromamagick.c' || echo '$(srcdir)/'`effects/chromamagick.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/chromamagick.Tpo $(DEPDIR)/chromamagick.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/chromamagick.c' object='chromamagick.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chromamagick.lo `test -f 'effects/chromamagick.c' || echo '$(srcdir)/'`effects/chromamagick.c + +fadecolorrgb.lo: transitions/fadecolorrgb.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fadecolorrgb.lo -MD -MP -MF $(DEPDIR)/fadecolorrgb.Tpo -c -o fadecolorrgb.lo `test -f 'transitions/fadecolorrgb.c' || echo '$(srcdir)/'`transitions/fadecolorrgb.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fadecolorrgb.Tpo $(DEPDIR)/fadecolorrgb.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/fadecolorrgb.c' object='fadecolorrgb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fadecolorrgb.lo `test -f 'transitions/fadecolorrgb.c' || echo '$(srcdir)/'`transitions/fadecolorrgb.c + +magicoverlays.lo: effects/magicoverlays.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT magicoverlays.lo -MD -MP -MF $(DEPDIR)/magicoverlays.Tpo -c -o magicoverlays.lo `test -f 'effects/magicoverlays.c' || echo '$(srcdir)/'`effects/magicoverlays.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/magicoverlays.Tpo $(DEPDIR)/magicoverlays.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/magicoverlays.c' object='magicoverlays.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o magicoverlays.lo `test -f 'effects/magicoverlays.c' || echo '$(srcdir)/'`effects/magicoverlays.c + +binaryoverlays.lo: effects/binaryoverlays.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT binaryoverlays.lo -MD -MP -MF $(DEPDIR)/binaryoverlays.Tpo -c -o binaryoverlays.lo `test -f 'effects/binaryoverlays.c' || echo '$(srcdir)/'`effects/binaryoverlays.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/binaryoverlays.Tpo $(DEPDIR)/binaryoverlays.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/binaryoverlays.c' object='binaryoverlays.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o binaryoverlays.lo `test -f 'effects/binaryoverlays.c' || echo '$(srcdir)/'`effects/binaryoverlays.c + +pencilsketch.lo: effects/pencilsketch.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pencilsketch.lo -MD -MP -MF $(DEPDIR)/pencilsketch.Tpo -c -o pencilsketch.lo `test -f 'effects/pencilsketch.c' || echo '$(srcdir)/'`effects/pencilsketch.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pencilsketch.Tpo $(DEPDIR)/pencilsketch.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/pencilsketch.c' object='pencilsketch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pencilsketch.lo `test -f 'effects/pencilsketch.c' || echo '$(srcdir)/'`effects/pencilsketch.c + +chameleonblend.lo: effects/chameleonblend.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chameleonblend.lo -MD -MP -MF $(DEPDIR)/chameleonblend.Tpo -c -o chameleonblend.lo `test -f 'effects/chameleonblend.c' || echo '$(srcdir)/'`effects/chameleonblend.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/chameleonblend.Tpo $(DEPDIR)/chameleonblend.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/chameleonblend.c' object='chameleonblend.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chameleonblend.lo `test -f 'effects/chameleonblend.c' || echo '$(srcdir)/'`effects/chameleonblend.c + +diffimg.lo: effects/diffimg.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT diffimg.lo -MD -MP -MF $(DEPDIR)/diffimg.Tpo -c -o diffimg.lo `test -f 'effects/diffimg.c' || echo '$(srcdir)/'`effects/diffimg.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/diffimg.Tpo $(DEPDIR)/diffimg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/diffimg.c' object='diffimg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o diffimg.lo `test -f 'effects/diffimg.c' || echo '$(srcdir)/'`effects/diffimg.c + +swirl.lo: effects/swirl.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT swirl.lo -MD -MP -MF $(DEPDIR)/swirl.Tpo -c -o swirl.lo `test -f 'effects/swirl.c' || echo '$(srcdir)/'`effects/swirl.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/swirl.Tpo $(DEPDIR)/swirl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/swirl.c' object='swirl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o swirl.lo `test -f 'effects/swirl.c' || echo '$(srcdir)/'`effects/swirl.c + +chromium.lo: effects/chromium.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chromium.lo -MD -MP -MF $(DEPDIR)/chromium.Tpo -c -o chromium.lo `test -f 'effects/chromium.c' || echo '$(srcdir)/'`effects/chromium.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/chromium.Tpo $(DEPDIR)/chromium.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/chromium.c' object='chromium.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chromium.lo `test -f 'effects/chromium.c' || echo '$(srcdir)/'`effects/chromium.c + +uvcorrect.lo: effects/uvcorrect.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uvcorrect.lo -MD -MP -MF $(DEPDIR)/uvcorrect.Tpo -c -o uvcorrect.lo `test -f 'effects/uvcorrect.c' || echo '$(srcdir)/'`effects/uvcorrect.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/uvcorrect.Tpo $(DEPDIR)/uvcorrect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/uvcorrect.c' object='uvcorrect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uvcorrect.lo `test -f 'effects/uvcorrect.c' || echo '$(srcdir)/'`effects/uvcorrect.c + +chromapalette.lo: effects/chromapalette.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chromapalette.lo -MD -MP -MF $(DEPDIR)/chromapalette.Tpo -c -o chromapalette.lo `test -f 'effects/chromapalette.c' || echo '$(srcdir)/'`effects/chromapalette.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/chromapalette.Tpo $(DEPDIR)/chromapalette.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/chromapalette.c' object='chromapalette.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chromapalette.lo `test -f 'effects/chromapalette.c' || echo '$(srcdir)/'`effects/chromapalette.c + +radialblur.lo: effects/radialblur.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT radialblur.lo -MD -MP -MF $(DEPDIR)/radialblur.Tpo -c -o radialblur.lo `test -f 'effects/radialblur.c' || echo '$(srcdir)/'`effects/radialblur.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/radialblur.Tpo $(DEPDIR)/radialblur.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/radialblur.c' object='radialblur.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o radialblur.lo `test -f 'effects/radialblur.c' || echo '$(srcdir)/'`effects/radialblur.c + +fisheye.lo: effects/fisheye.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fisheye.lo -MD -MP -MF $(DEPDIR)/fisheye.Tpo -c -o fisheye.lo `test -f 'effects/fisheye.c' || echo '$(srcdir)/'`effects/fisheye.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fisheye.Tpo $(DEPDIR)/fisheye.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/fisheye.c' object='fisheye.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fisheye.lo `test -f 'effects/fisheye.c' || echo '$(srcdir)/'`effects/fisheye.c + +raster.lo: effects/raster.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT raster.lo -MD -MP -MF $(DEPDIR)/raster.Tpo -c -o raster.lo `test -f 'effects/raster.c' || echo '$(srcdir)/'`effects/raster.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/raster.Tpo $(DEPDIR)/raster.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/raster.c' object='raster.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o raster.lo `test -f 'effects/raster.c' || echo '$(srcdir)/'`effects/raster.c + +smear.lo: effects/smear.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT smear.lo -MD -MP -MF $(DEPDIR)/smear.Tpo -c -o smear.lo `test -f 'effects/smear.c' || echo '$(srcdir)/'`effects/smear.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/smear.Tpo $(DEPDIR)/smear.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/smear.c' object='smear.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o smear.lo `test -f 'effects/smear.c' || echo '$(srcdir)/'`effects/smear.c + +magicmirror.lo: effects/magicmirror.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT magicmirror.lo -MD -MP -MF $(DEPDIR)/magicmirror.Tpo -c -o magicmirror.lo `test -f 'effects/magicmirror.c' || echo '$(srcdir)/'`effects/magicmirror.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/magicmirror.Tpo $(DEPDIR)/magicmirror.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/magicmirror.c' object='magicmirror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o magicmirror.lo `test -f 'effects/magicmirror.c' || echo '$(srcdir)/'`effects/magicmirror.c + +lumamask.lo: effects/lumamask.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lumamask.lo -MD -MP -MF $(DEPDIR)/lumamask.Tpo -c -o lumamask.lo `test -f 'effects/lumamask.c' || echo '$(srcdir)/'`effects/lumamask.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/lumamask.Tpo $(DEPDIR)/lumamask.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/lumamask.c' object='lumamask.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lumamask.lo `test -f 'effects/lumamask.c' || echo '$(srcdir)/'`effects/lumamask.c + +pixelate.lo: effects/pixelate.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pixelate.lo -MD -MP -MF $(DEPDIR)/pixelate.Tpo -c -o pixelate.lo `test -f 'effects/pixelate.c' || echo '$(srcdir)/'`effects/pixelate.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pixelate.Tpo $(DEPDIR)/pixelate.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/pixelate.c' object='pixelate.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pixelate.lo `test -f 'effects/pixelate.c' || echo '$(srcdir)/'`effects/pixelate.c + +colorshift.lo: effects/colorshift.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT colorshift.lo -MD -MP -MF $(DEPDIR)/colorshift.Tpo -c -o colorshift.lo `test -f 'effects/colorshift.c' || echo '$(srcdir)/'`effects/colorshift.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/colorshift.Tpo $(DEPDIR)/colorshift.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/colorshift.c' object='colorshift.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o colorshift.lo `test -f 'effects/colorshift.c' || echo '$(srcdir)/'`effects/colorshift.c + +scratcher.lo: effects/scratcher.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT scratcher.lo -MD -MP -MF $(DEPDIR)/scratcher.Tpo -c -o scratcher.lo `test -f 'effects/scratcher.c' || echo '$(srcdir)/'`effects/scratcher.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/scratcher.Tpo $(DEPDIR)/scratcher.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/scratcher.c' object='scratcher.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o scratcher.lo `test -f 'effects/scratcher.c' || echo '$(srcdir)/'`effects/scratcher.c + +opacitythreshold.lo: effects/opacitythreshold.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT opacitythreshold.lo -MD -MP -MF $(DEPDIR)/opacitythreshold.Tpo -c -o opacitythreshold.lo `test -f 'effects/opacitythreshold.c' || echo '$(srcdir)/'`effects/opacitythreshold.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/opacitythreshold.Tpo $(DEPDIR)/opacitythreshold.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/opacitythreshold.c' object='opacitythreshold.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o opacitythreshold.lo `test -f 'effects/opacitythreshold.c' || echo '$(srcdir)/'`effects/opacitythreshold.c + +opacityadv.lo: effects/opacityadv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT opacityadv.lo -MD -MP -MF $(DEPDIR)/opacityadv.Tpo -c -o opacityadv.lo `test -f 'effects/opacityadv.c' || echo '$(srcdir)/'`effects/opacityadv.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/opacityadv.Tpo $(DEPDIR)/opacityadv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/opacityadv.c' object='opacityadv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o opacityadv.lo `test -f 'effects/opacityadv.c' || echo '$(srcdir)/'`effects/opacityadv.c + +rgbkeysmooth.lo: effects/rgbkeysmooth.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rgbkeysmooth.lo -MD -MP -MF $(DEPDIR)/rgbkeysmooth.Tpo -c -o rgbkeysmooth.lo `test -f 'effects/rgbkeysmooth.c' || echo '$(srcdir)/'`effects/rgbkeysmooth.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rgbkeysmooth.Tpo $(DEPDIR)/rgbkeysmooth.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/rgbkeysmooth.c' object='rgbkeysmooth.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rgbkeysmooth.lo `test -f 'effects/rgbkeysmooth.c' || echo '$(srcdir)/'`effects/rgbkeysmooth.c + +mask.lo: effects/mask.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mask.lo -MD -MP -MF $(DEPDIR)/mask.Tpo -c -o mask.lo `test -f 'effects/mask.c' || echo '$(srcdir)/'`effects/mask.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mask.Tpo $(DEPDIR)/mask.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/mask.c' object='mask.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mask.lo `test -f 'effects/mask.c' || echo '$(srcdir)/'`effects/mask.c + +distort.lo: effects/distort.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT distort.lo -MD -MP -MF $(DEPDIR)/distort.Tpo -c -o distort.lo `test -f 'effects/distort.c' || echo '$(srcdir)/'`effects/distort.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/distort.Tpo $(DEPDIR)/distort.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/distort.c' object='distort.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o distort.lo `test -f 'effects/distort.c' || echo '$(srcdir)/'`effects/distort.c + +motionmap.lo: effects/motionmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT motionmap.lo -MD -MP -MF $(DEPDIR)/motionmap.Tpo -c -o motionmap.lo `test -f 'effects/motionmap.c' || echo '$(srcdir)/'`effects/motionmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/motionmap.Tpo $(DEPDIR)/motionmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/motionmap.c' object='motionmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o motionmap.lo `test -f 'effects/motionmap.c' || echo '$(srcdir)/'`effects/motionmap.c + +wipe.lo: transitions/wipe.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wipe.lo -MD -MP -MF $(DEPDIR)/wipe.Tpo -c -o wipe.lo `test -f 'transitions/wipe.c' || echo '$(srcdir)/'`transitions/wipe.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wipe.Tpo $(DEPDIR)/wipe.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/wipe.c' object='wipe.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wipe.lo `test -f 'transitions/wipe.c' || echo '$(srcdir)/'`transitions/wipe.c + +magicscratcher.lo: effects/magicscratcher.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT magicscratcher.lo -MD -MP -MF $(DEPDIR)/magicscratcher.Tpo -c -o magicscratcher.lo `test -f 'effects/magicscratcher.c' || echo '$(srcdir)/'`effects/magicscratcher.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/magicscratcher.Tpo $(DEPDIR)/magicscratcher.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/magicscratcher.c' object='magicscratcher.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o magicscratcher.lo `test -f 'effects/magicscratcher.c' || echo '$(srcdir)/'`effects/magicscratcher.c + +chromascratcher.lo: effects/chromascratcher.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chromascratcher.lo -MD -MP -MF $(DEPDIR)/chromascratcher.Tpo -c -o chromascratcher.lo `test -f 'effects/chromascratcher.c' || echo '$(srcdir)/'`effects/chromascratcher.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/chromascratcher.Tpo $(DEPDIR)/chromascratcher.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/chromascratcher.c' object='chromascratcher.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chromascratcher.lo `test -f 'effects/chromascratcher.c' || echo '$(srcdir)/'`effects/chromascratcher.c + +tracer.lo: effects/tracer.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tracer.lo -MD -MP -MF $(DEPDIR)/tracer.Tpo -c -o tracer.lo `test -f 'effects/tracer.c' || echo '$(srcdir)/'`effects/tracer.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/tracer.Tpo $(DEPDIR)/tracer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/tracer.c' object='tracer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tracer.lo `test -f 'effects/tracer.c' || echo '$(srcdir)/'`effects/tracer.c + +mtracer.lo: effects/mtracer.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtracer.lo -MD -MP -MF $(DEPDIR)/mtracer.Tpo -c -o mtracer.lo `test -f 'effects/mtracer.c' || echo '$(srcdir)/'`effects/mtracer.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mtracer.Tpo $(DEPDIR)/mtracer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/mtracer.c' object='mtracer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtracer.lo `test -f 'effects/mtracer.c' || echo '$(srcdir)/'`effects/mtracer.c + +dupmagic.lo: effects/dupmagic.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dupmagic.lo -MD -MP -MF $(DEPDIR)/dupmagic.Tpo -c -o dupmagic.lo `test -f 'effects/dupmagic.c' || echo '$(srcdir)/'`effects/dupmagic.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dupmagic.Tpo $(DEPDIR)/dupmagic.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/dupmagic.c' object='dupmagic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dupmagic.lo `test -f 'effects/dupmagic.c' || echo '$(srcdir)/'`effects/dupmagic.c + +keyselect.lo: effects/keyselect.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT keyselect.lo -MD -MP -MF $(DEPDIR)/keyselect.Tpo -c -o keyselect.lo `test -f 'effects/keyselect.c' || echo '$(srcdir)/'`effects/keyselect.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/keyselect.Tpo $(DEPDIR)/keyselect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/keyselect.c' object='keyselect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o keyselect.lo `test -f 'effects/keyselect.c' || echo '$(srcdir)/'`effects/keyselect.c + +greyselect.lo: effects/greyselect.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT greyselect.lo -MD -MP -MF $(DEPDIR)/greyselect.Tpo -c -o greyselect.lo `test -f 'effects/greyselect.c' || echo '$(srcdir)/'`effects/greyselect.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/greyselect.Tpo $(DEPDIR)/greyselect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/greyselect.c' object='greyselect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o greyselect.lo `test -f 'effects/greyselect.c' || echo '$(srcdir)/'`effects/greyselect.c + +bwselect.lo: effects/bwselect.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bwselect.lo -MD -MP -MF $(DEPDIR)/bwselect.Tpo -c -o bwselect.lo `test -f 'effects/bwselect.c' || echo '$(srcdir)/'`effects/bwselect.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bwselect.Tpo $(DEPDIR)/bwselect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/bwselect.c' object='bwselect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bwselect.lo `test -f 'effects/bwselect.c' || echo '$(srcdir)/'`effects/bwselect.c + +complexsaturate.lo: effects/complexsaturate.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT complexsaturate.lo -MD -MP -MF $(DEPDIR)/complexsaturate.Tpo -c -o complexsaturate.lo `test -f 'effects/complexsaturate.c' || echo '$(srcdir)/'`effects/complexsaturate.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/complexsaturate.Tpo $(DEPDIR)/complexsaturate.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/complexsaturate.c' object='complexsaturate.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o complexsaturate.lo `test -f 'effects/complexsaturate.c' || echo '$(srcdir)/'`effects/complexsaturate.c + +complexthreshold.lo: effects/complexthreshold.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT complexthreshold.lo -MD -MP -MF $(DEPDIR)/complexthreshold.Tpo -c -o complexthreshold.lo `test -f 'effects/complexthreshold.c' || echo '$(srcdir)/'`effects/complexthreshold.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/complexthreshold.Tpo $(DEPDIR)/complexthreshold.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/complexthreshold.c' object='complexthreshold.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o complexthreshold.lo `test -f 'effects/complexthreshold.c' || echo '$(srcdir)/'`effects/complexthreshold.c + +complexinvert.lo: effects/complexinvert.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT complexinvert.lo -MD -MP -MF $(DEPDIR)/complexinvert.Tpo -c -o complexinvert.lo `test -f 'effects/complexinvert.c' || echo '$(srcdir)/'`effects/complexinvert.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/complexinvert.Tpo $(DEPDIR)/complexinvert.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/complexinvert.c' object='complexinvert.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o complexinvert.lo `test -f 'effects/complexinvert.c' || echo '$(srcdir)/'`effects/complexinvert.c + +complexsync.lo: effects/complexsync.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT complexsync.lo -MD -MP -MF $(DEPDIR)/complexsync.Tpo -c -o complexsync.lo `test -f 'effects/complexsync.c' || echo '$(srcdir)/'`effects/complexsync.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/complexsync.Tpo $(DEPDIR)/complexsync.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/complexsync.c' object='complexsync.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o complexsync.lo `test -f 'effects/complexsync.c' || echo '$(srcdir)/'`effects/complexsync.c + +isolate.lo: effects/isolate.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isolate.lo -MD -MP -MF $(DEPDIR)/isolate.Tpo -c -o isolate.lo `test -f 'effects/isolate.c' || echo '$(srcdir)/'`effects/isolate.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/isolate.Tpo $(DEPDIR)/isolate.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/isolate.c' object='isolate.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isolate.lo `test -f 'effects/isolate.c' || echo '$(srcdir)/'`effects/isolate.c + +vbar.lo: transitions/vbar.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vbar.lo -MD -MP -MF $(DEPDIR)/vbar.Tpo -c -o vbar.lo `test -f 'transitions/vbar.c' || echo '$(srcdir)/'`transitions/vbar.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vbar.Tpo $(DEPDIR)/vbar.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/vbar.c' object='vbar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vbar.lo `test -f 'transitions/vbar.c' || echo '$(srcdir)/'`transitions/vbar.c + +3bar.lo: transitions/3bar.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 3bar.lo -MD -MP -MF $(DEPDIR)/3bar.Tpo -c -o 3bar.lo `test -f 'transitions/3bar.c' || echo '$(srcdir)/'`transitions/3bar.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/3bar.Tpo $(DEPDIR)/3bar.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transitions/3bar.c' object='3bar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 3bar.lo `test -f 'transitions/3bar.c' || echo '$(srcdir)/'`transitions/3bar.c + +enhancemask.lo: effects/enhancemask.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enhancemask.lo -MD -MP -MF $(DEPDIR)/enhancemask.Tpo -c -o enhancemask.lo `test -f 'effects/enhancemask.c' || echo '$(srcdir)/'`effects/enhancemask.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/enhancemask.Tpo $(DEPDIR)/enhancemask.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/enhancemask.c' object='enhancemask.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enhancemask.lo `test -f 'effects/enhancemask.c' || echo '$(srcdir)/'`effects/enhancemask.c + +noiseadd.lo: effects/noiseadd.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT noiseadd.lo -MD -MP -MF $(DEPDIR)/noiseadd.Tpo -c -o noiseadd.lo `test -f 'effects/noiseadd.c' || echo '$(srcdir)/'`effects/noiseadd.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/noiseadd.Tpo $(DEPDIR)/noiseadd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/noiseadd.c' object='noiseadd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o noiseadd.lo `test -f 'effects/noiseadd.c' || echo '$(srcdir)/'`effects/noiseadd.c + +contrast.lo: effects/contrast.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT contrast.lo -MD -MP -MF $(DEPDIR)/contrast.Tpo -c -o contrast.lo `test -f 'effects/contrast.c' || echo '$(srcdir)/'`effects/contrast.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/contrast.Tpo $(DEPDIR)/contrast.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/contrast.c' object='contrast.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o contrast.lo `test -f 'effects/contrast.c' || echo '$(srcdir)/'`effects/contrast.c + +motionblur.lo: effects/motionblur.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT motionblur.lo -MD -MP -MF $(DEPDIR)/motionblur.Tpo -c -o motionblur.lo `test -f 'effects/motionblur.c' || echo '$(srcdir)/'`effects/motionblur.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/motionblur.Tpo $(DEPDIR)/motionblur.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/motionblur.c' object='motionblur.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o motionblur.lo `test -f 'effects/motionblur.c' || echo '$(srcdir)/'`effects/motionblur.c + +sinoids.lo: effects/sinoids.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sinoids.lo -MD -MP -MF $(DEPDIR)/sinoids.Tpo -c -o sinoids.lo `test -f 'effects/sinoids.c' || echo '$(srcdir)/'`effects/sinoids.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sinoids.Tpo $(DEPDIR)/sinoids.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/sinoids.c' object='sinoids.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sinoids.lo `test -f 'effects/sinoids.c' || echo '$(srcdir)/'`effects/sinoids.c + +average.lo: effects/average.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT average.lo -MD -MP -MF $(DEPDIR)/average.Tpo -c -o average.lo `test -f 'effects/average.c' || echo '$(srcdir)/'`effects/average.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/average.Tpo $(DEPDIR)/average.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/average.c' object='average.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o average.lo `test -f 'effects/average.c' || echo '$(srcdir)/'`effects/average.c + +ripple.lo: effects/ripple.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ripple.lo -MD -MP -MF $(DEPDIR)/ripple.Tpo -c -o ripple.lo `test -f 'effects/ripple.c' || echo '$(srcdir)/'`effects/ripple.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ripple.Tpo $(DEPDIR)/ripple.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/ripple.c' object='ripple.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ripple.lo `test -f 'effects/ripple.c' || echo '$(srcdir)/'`effects/ripple.c + +water.lo: effects/water.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT water.lo -MD -MP -MF $(DEPDIR)/water.Tpo -c -o water.lo `test -f 'effects/water.c' || echo '$(srcdir)/'`effects/water.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/water.Tpo $(DEPDIR)/water.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/water.c' object='water.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o water.lo `test -f 'effects/water.c' || echo '$(srcdir)/'`effects/water.c + +noisepencil.lo: effects/noisepencil.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT noisepencil.lo -MD -MP -MF $(DEPDIR)/noisepencil.Tpo -c -o noisepencil.lo `test -f 'effects/noisepencil.c' || echo '$(srcdir)/'`effects/noisepencil.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/noisepencil.Tpo $(DEPDIR)/noisepencil.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/noisepencil.c' object='noisepencil.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o noisepencil.lo `test -f 'effects/noisepencil.c' || echo '$(srcdir)/'`effects/noisepencil.c + +bathroom.lo: effects/bathroom.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bathroom.lo -MD -MP -MF $(DEPDIR)/bathroom.Tpo -c -o bathroom.lo `test -f 'effects/bathroom.c' || echo '$(srcdir)/'`effects/bathroom.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bathroom.Tpo $(DEPDIR)/bathroom.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/bathroom.c' object='bathroom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bathroom.lo `test -f 'effects/bathroom.c' || echo '$(srcdir)/'`effects/bathroom.c + +slice.lo: effects/slice.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT slice.lo -MD -MP -MF $(DEPDIR)/slice.Tpo -c -o slice.lo `test -f 'effects/slice.c' || echo '$(srcdir)/'`effects/slice.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/slice.Tpo $(DEPDIR)/slice.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/slice.c' object='slice.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o slice.lo `test -f 'effects/slice.c' || echo '$(srcdir)/'`effects/slice.c + +crosspixel.lo: effects/crosspixel.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crosspixel.lo -MD -MP -MF $(DEPDIR)/crosspixel.Tpo -c -o crosspixel.lo `test -f 'effects/crosspixel.c' || echo '$(srcdir)/'`effects/crosspixel.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/crosspixel.Tpo $(DEPDIR)/crosspixel.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/crosspixel.c' object='crosspixel.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crosspixel.lo `test -f 'effects/crosspixel.c' || echo '$(srcdir)/'`effects/crosspixel.c + +diffmap.lo: effects/diffmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT diffmap.lo -MD -MP -MF $(DEPDIR)/diffmap.Tpo -c -o diffmap.lo `test -f 'effects/diffmap.c' || echo '$(srcdir)/'`effects/diffmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/diffmap.Tpo $(DEPDIR)/diffmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/diffmap.c' object='diffmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o diffmap.lo `test -f 'effects/diffmap.c' || echo '$(srcdir)/'`effects/diffmap.c + +threshold.lo: effects/threshold.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT threshold.lo -MD -MP -MF $(DEPDIR)/threshold.Tpo -c -o threshold.lo `test -f 'effects/threshold.c' || echo '$(srcdir)/'`effects/threshold.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/threshold.Tpo $(DEPDIR)/threshold.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/threshold.c' object='threshold.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o threshold.lo `test -f 'effects/threshold.c' || echo '$(srcdir)/'`effects/threshold.c + +morphology.lo: effects/morphology.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT morphology.lo -MD -MP -MF $(DEPDIR)/morphology.Tpo -c -o morphology.lo `test -f 'effects/morphology.c' || echo '$(srcdir)/'`effects/morphology.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/morphology.Tpo $(DEPDIR)/morphology.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/morphology.c' object='morphology.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o morphology.lo `test -f 'effects/morphology.c' || echo '$(srcdir)/'`effects/morphology.c + +colmorphology.lo: effects/colmorphology.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT colmorphology.lo -MD -MP -MF $(DEPDIR)/colmorphology.Tpo -c -o colmorphology.lo `test -f 'effects/colmorphology.c' || echo '$(srcdir)/'`effects/colmorphology.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/colmorphology.Tpo $(DEPDIR)/colmorphology.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/colmorphology.c' object='colmorphology.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o colmorphology.lo `test -f 'effects/colmorphology.c' || echo '$(srcdir)/'`effects/colmorphology.c + +ghost.lo: effects/ghost.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ghost.lo -MD -MP -MF $(DEPDIR)/ghost.Tpo -c -o ghost.lo `test -f 'effects/ghost.c' || echo '$(srcdir)/'`effects/ghost.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ghost.Tpo $(DEPDIR)/ghost.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/ghost.c' object='ghost.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ghost.lo `test -f 'effects/ghost.c' || echo '$(srcdir)/'`effects/ghost.c + +blob.lo: effects/blob.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT blob.lo -MD -MP -MF $(DEPDIR)/blob.Tpo -c -o blob.lo `test -f 'effects/blob.c' || echo '$(srcdir)/'`effects/blob.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/blob.Tpo $(DEPDIR)/blob.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/blob.c' object='blob.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o blob.lo `test -f 'effects/blob.c' || echo '$(srcdir)/'`effects/blob.c + +radcor.lo: effects/radcor.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT radcor.lo -MD -MP -MF $(DEPDIR)/radcor.Tpo -c -o radcor.lo `test -f 'effects/radcor.c' || echo '$(srcdir)/'`effects/radcor.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/radcor.Tpo $(DEPDIR)/radcor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/radcor.c' object='radcor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o radcor.lo `test -f 'effects/radcor.c' || echo '$(srcdir)/'`effects/radcor.c + +boids.lo: effects/boids.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT boids.lo -MD -MP -MF $(DEPDIR)/boids.Tpo -c -o boids.lo `test -f 'effects/boids.c' || echo '$(srcdir)/'`effects/boids.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/boids.Tpo $(DEPDIR)/boids.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/boids.c' object='boids.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o boids.lo `test -f 'effects/boids.c' || echo '$(srcdir)/'`effects/boids.c + +nervous.lo: effects/nervous.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nervous.lo -MD -MP -MF $(DEPDIR)/nervous.Tpo -c -o nervous.lo `test -f 'effects/nervous.c' || echo '$(srcdir)/'`effects/nervous.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/nervous.Tpo $(DEPDIR)/nervous.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/nervous.c' object='nervous.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nervous.lo `test -f 'effects/nervous.c' || echo '$(srcdir)/'`effects/nervous.c + +cartonize.lo: effects/cartonize.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cartonize.lo -MD -MP -MF $(DEPDIR)/cartonize.Tpo -c -o cartonize.lo `test -f 'effects/cartonize.c' || echo '$(srcdir)/'`effects/cartonize.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cartonize.Tpo $(DEPDIR)/cartonize.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/cartonize.c' object='cartonize.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cartonize.lo `test -f 'effects/cartonize.c' || echo '$(srcdir)/'`effects/cartonize.c + +tripplicity.lo: effects/tripplicity.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tripplicity.lo -MD -MP -MF $(DEPDIR)/tripplicity.Tpo -c -o tripplicity.lo `test -f 'effects/tripplicity.c' || echo '$(srcdir)/'`effects/tripplicity.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/tripplicity.Tpo $(DEPDIR)/tripplicity.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/tripplicity.c' object='tripplicity.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tripplicity.lo `test -f 'effects/tripplicity.c' || echo '$(srcdir)/'`effects/tripplicity.c + +neighbours.lo: effects/neighbours.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT neighbours.lo -MD -MP -MF $(DEPDIR)/neighbours.Tpo -c -o neighbours.lo `test -f 'effects/neighbours.c' || echo '$(srcdir)/'`effects/neighbours.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/neighbours.Tpo $(DEPDIR)/neighbours.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/neighbours.c' object='neighbours.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o neighbours.lo `test -f 'effects/neighbours.c' || echo '$(srcdir)/'`effects/neighbours.c + +neighbours2.lo: effects/neighbours2.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT neighbours2.lo -MD -MP -MF $(DEPDIR)/neighbours2.Tpo -c -o neighbours2.lo `test -f 'effects/neighbours2.c' || echo '$(srcdir)/'`effects/neighbours2.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/neighbours2.Tpo $(DEPDIR)/neighbours2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/neighbours2.c' object='neighbours2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o neighbours2.lo `test -f 'effects/neighbours2.c' || echo '$(srcdir)/'`effects/neighbours2.c + +neighbours3.lo: effects/neighbours3.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT neighbours3.lo -MD -MP -MF $(DEPDIR)/neighbours3.Tpo -c -o neighbours3.lo `test -f 'effects/neighbours3.c' || echo '$(srcdir)/'`effects/neighbours3.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/neighbours3.Tpo $(DEPDIR)/neighbours3.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/neighbours3.c' object='neighbours3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o neighbours3.lo `test -f 'effects/neighbours3.c' || echo '$(srcdir)/'`effects/neighbours3.c + +neighbours4.lo: effects/neighbours4.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT neighbours4.lo -MD -MP -MF $(DEPDIR)/neighbours4.Tpo -c -o neighbours4.lo `test -f 'effects/neighbours4.c' || echo '$(srcdir)/'`effects/neighbours4.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/neighbours4.Tpo $(DEPDIR)/neighbours4.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/neighbours4.c' object='neighbours4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o neighbours4.lo `test -f 'effects/neighbours4.c' || echo '$(srcdir)/'`effects/neighbours4.c + +neighbours5.lo: effects/neighbours5.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT neighbours5.lo -MD -MP -MF $(DEPDIR)/neighbours5.Tpo -c -o neighbours5.lo `test -f 'effects/neighbours5.c' || echo '$(srcdir)/'`effects/neighbours5.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/neighbours5.Tpo $(DEPDIR)/neighbours5.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/neighbours5.c' object='neighbours5.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o neighbours5.lo `test -f 'effects/neighbours5.c' || echo '$(srcdir)/'`effects/neighbours5.c + +cutstop.lo: effects/cutstop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cutstop.lo -MD -MP -MF $(DEPDIR)/cutstop.Tpo -c -o cutstop.lo `test -f 'effects/cutstop.c' || echo '$(srcdir)/'`effects/cutstop.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cutstop.Tpo $(DEPDIR)/cutstop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/cutstop.c' object='cutstop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cutstop.lo `test -f 'effects/cutstop.c' || echo '$(srcdir)/'`effects/cutstop.c + +contourextract.lo: effects/contourextract.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT contourextract.lo -MD -MP -MF $(DEPDIR)/contourextract.Tpo -c -o contourextract.lo `test -f 'effects/contourextract.c' || echo '$(srcdir)/'`effects/contourextract.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/contourextract.Tpo $(DEPDIR)/contourextract.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/contourextract.c' object='contourextract.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o contourextract.lo `test -f 'effects/contourextract.c' || echo '$(srcdir)/'`effects/contourextract.c + +texmap.lo: effects/texmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT texmap.lo -MD -MP -MF $(DEPDIR)/texmap.Tpo -c -o texmap.lo `test -f 'effects/texmap.c' || echo '$(srcdir)/'`effects/texmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/texmap.Tpo $(DEPDIR)/texmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/texmap.c' object='texmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o texmap.lo `test -f 'effects/texmap.c' || echo '$(srcdir)/'`effects/texmap.c + +maskstop.lo: effects/maskstop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT maskstop.lo -MD -MP -MF $(DEPDIR)/maskstop.Tpo -c -o maskstop.lo `test -f 'effects/maskstop.c' || echo '$(srcdir)/'`effects/maskstop.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/maskstop.Tpo $(DEPDIR)/maskstop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/maskstop.c' object='maskstop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o maskstop.lo `test -f 'effects/maskstop.c' || echo '$(srcdir)/'`effects/maskstop.c + +photoplay.lo: effects/photoplay.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT photoplay.lo -MD -MP -MF $(DEPDIR)/photoplay.Tpo -c -o photoplay.lo `test -f 'effects/photoplay.c' || echo '$(srcdir)/'`effects/photoplay.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/photoplay.Tpo $(DEPDIR)/photoplay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/photoplay.c' object='photoplay.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o photoplay.lo `test -f 'effects/photoplay.c' || echo '$(srcdir)/'`effects/photoplay.c + +videoplay.lo: effects/videoplay.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT videoplay.lo -MD -MP -MF $(DEPDIR)/videoplay.Tpo -c -o videoplay.lo `test -f 'effects/videoplay.c' || echo '$(srcdir)/'`effects/videoplay.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/videoplay.Tpo $(DEPDIR)/videoplay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/videoplay.c' object='videoplay.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o videoplay.lo `test -f 'effects/videoplay.c' || echo '$(srcdir)/'`effects/videoplay.c + +rgbchannel.lo: effects/rgbchannel.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rgbchannel.lo -MD -MP -MF $(DEPDIR)/rgbchannel.Tpo -c -o rgbchannel.lo `test -f 'effects/rgbchannel.c' || echo '$(srcdir)/'`effects/rgbchannel.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/rgbchannel.Tpo $(DEPDIR)/rgbchannel.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/rgbchannel.c' object='rgbchannel.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rgbchannel.lo `test -f 'effects/rgbchannel.c' || echo '$(srcdir)/'`effects/rgbchannel.c + +videowall.lo: effects/videowall.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT videowall.lo -MD -MP -MF $(DEPDIR)/videowall.Tpo -c -o videowall.lo `test -f 'effects/videowall.c' || echo '$(srcdir)/'`effects/videowall.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/videowall.Tpo $(DEPDIR)/videowall.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/videowall.c' object='videowall.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o videowall.lo `test -f 'effects/videowall.c' || echo '$(srcdir)/'`effects/videowall.c + +flare.lo: effects/flare.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flare.lo -MD -MP -MF $(DEPDIR)/flare.Tpo -c -o flare.lo `test -f 'effects/flare.c' || echo '$(srcdir)/'`effects/flare.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/flare.Tpo $(DEPDIR)/flare.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/flare.c' object='flare.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flare.lo `test -f 'effects/flare.c' || echo '$(srcdir)/'`effects/flare.c + +radioactive.lo: effects/radioactive.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT radioactive.lo -MD -MP -MF $(DEPDIR)/radioactive.Tpo -c -o radioactive.lo `test -f 'effects/radioactive.c' || echo '$(srcdir)/'`effects/radioactive.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/radioactive.Tpo $(DEPDIR)/radioactive.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/radioactive.c' object='radioactive.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o radioactive.lo `test -f 'effects/radioactive.c' || echo '$(srcdir)/'`effects/radioactive.c + +baltantv.lo: effects/baltantv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT baltantv.lo -MD -MP -MF $(DEPDIR)/baltantv.Tpo -c -o baltantv.lo `test -f 'effects/baltantv.c' || echo '$(srcdir)/'`effects/baltantv.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/baltantv.Tpo $(DEPDIR)/baltantv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/baltantv.c' object='baltantv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o baltantv.lo `test -f 'effects/baltantv.c' || echo '$(srcdir)/'`effects/baltantv.c + +constantblend.lo: effects/constantblend.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT constantblend.lo -MD -MP -MF $(DEPDIR)/constantblend.Tpo -c -o constantblend.lo `test -f 'effects/constantblend.c' || echo '$(srcdir)/'`effects/constantblend.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/constantblend.Tpo $(DEPDIR)/constantblend.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/constantblend.c' object='constantblend.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o constantblend.lo `test -f 'effects/constantblend.c' || echo '$(srcdir)/'`effects/constantblend.c + +picinpic.lo: effects/picinpic.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT picinpic.lo -MD -MP -MF $(DEPDIR)/picinpic.Tpo -c -o picinpic.lo `test -f 'effects/picinpic.c' || echo '$(srcdir)/'`effects/picinpic.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/picinpic.Tpo $(DEPDIR)/picinpic.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='effects/picinpic.c' object='picinpic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o picinpic.lo `test -f 'effects/picinpic.c' || echo '$(srcdir)/'`effects/picinpic.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + 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-pkgincludeHEADERS + +# 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/veejay-server/libvje/effects/autoeq.c b/veejay-server/libvje/effects/autoeq.c new file mode 100644 index 00000000..22677259 --- /dev/null +++ b/veejay-server/libvje/effects/autoeq.c @@ -0,0 +1,91 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "autoeq.h" +#include +#include "common.h" +vj_effect *autoeq_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->defaults[0] = 0; // y only, v only, u only, all + ve->defaults[1] = 200; // intensity + ve->defaults[2] = 132; // strength + + ve->description = "Automatic Histogram Equalizer"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static void *histogram_ = NULL; + +int autoeq_malloc(int w, int h) +{ + if( histogram_ ) + veejay_histogram_del(histogram_); + histogram_ = veejay_histogram_new(); + return 1; +} + +void autoeq_free() +{ + if( histogram_ ) + veejay_histogram_del(histogram_); + histogram_ = NULL; +} + + +void autoeq_apply( VJFrame *frame, int width, int height, int val, int intensity, int strength) +{ + if( val == 0 ) + { + VJFrame tmp; + veejay_memcpy( &tmp, frame, sizeof(VJFrame)); + tmp.data[0] = (uint8_t*) vj_malloc( sizeof(uint8_t) * frame->len ); + veejay_memcpy( tmp.data[0], frame->data[0], frame->len ); + + veejay_histogram_draw( histogram_,&tmp, frame, intensity, strength ); + + veejay_memset( frame->data[1], 128, frame->uv_len ); + veejay_memset( frame->data[2], 128, frame->uv_len ); + + free(tmp.data[0]); + } + else + { + veejay_histogram_analyze( histogram_, frame, 0 ); + veejay_histogram_equalize( histogram_, frame, intensity, strength ); + } +} diff --git a/veejay-server/libvje/effects/autoeq.h b/veejay-server/libvje/effects/autoeq.h new file mode 100644 index 00000000..9ac16fef --- /dev/null +++ b/veejay-server/libvje/effects/autoeq.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + */ + +#ifndef AUTOEQ_H +#define AUTOEQ_H +#include +#include +#include + +vj_effect *autoeq_init(int w, int h); +int autoeq_malloc(int w , int h ); +void autoeq_free( ); +void autoeq_apply( VJFrame *frame, int width, int height, int val, int intensity, int strength); +#endif diff --git a/veejay-server/libvje/effects/average.c b/veejay-server/libvje/effects/average.c new file mode 100644 index 00000000..db25f8d3 --- /dev/null +++ b/veejay-server/libvje/effects/average.c @@ -0,0 +1,68 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "average.h" +#include "common.h" +vj_effect *average_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = 100; + ve->defaults[0] = 1; + ve->description = "Average"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void average_apply(VJFrame *frame, int width, int height, int val) +{ + unsigned int i; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + int a,b; + + for (i = 0; i < len; i++) { + a = Y[i]; + b = ((val-1) * a + a)/val; + Y[i] = CLAMP_Y(b); + } + + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + b = ((val-1) * a + a)/val; + Cb[i] = CLAMP_UV(b); + a = Cr[i]; + b = ((val-1) * a + a )/val; + Cr[i] = CLAMP_UV(b); + } +} +void average_free(){} diff --git a/veejay-server/libvje/effects/average.h b/veejay-server/libvje/effects/average.h new file mode 100644 index 00000000..9312abeb --- /dev/null +++ b/veejay-server/libvje/effects/average.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef AVERAGE_H +#define AVERAGE_H +#include +#include +#include + +vj_effect *average_init(); +void average_apply(VJFrame *src, int width, int height, int val); +void average_free(); +#endif diff --git a/veejay-server/libvje/effects/balls.c b/veejay-server/libvje/effects/balls.c new file mode 100644 index 00000000..5072c0ef --- /dev/null +++ b/veejay-server/libvje/effects/balls.c @@ -0,0 +1,455 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +/* Copyright (C) 2002-2003 W.P. van Paassen - peter@paassen.tmfweb.nl + + 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; see the file COPYING. If not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* + + blob , originally from the demo effect collection + extended to video boids. the boids are an implementation of + Craig Reynolds's BOIDS behavioral algorithm + (http://www.vergenet.net/~conrad/boids/pseudocode.html) + + p0: radius + p1: number of blobs + p2: shape (rect,circle) + p3: influence boids trying to fly towards centre of mass of neighbouring boids + p4: influence boids trying to keep a small distance away from other boids + p5: influence boids trying to match velocity with near boids + p6: speed limiter + p7: home position distance to center point + + added optional flock rules: + + limiting speed + +*/ + +#include +#include +#include +#include +#include "common.h" +#include "blob.h" + + +typedef struct +{ + short x; // x + short y; // y + double vx; // velocity x + double vy; // velocity y +} blob_t; + +#define DEFAULT_RADIUS 16 +#define DEFAULT_NUM 100 + +#define BLOB_RECT 0 +#define BLOB_CIRCLE 1 + +static blob_t *blobs_; +static uint8_t **blob_; +static uint8_t *blob_image_; + +static int blob_ready_ = 0; +static int blob_radius_ = 16; +static int blob_dradius_ = 0; +static int blob_sradius_ = 0; +static int blob_num_ = 100; +static int blob_type_ = 1; +static int blob_home_radius_= 203; + +vj_effect *boids_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 8; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = w/2; // radius + ve->limits[0][1] = 2; + ve->limits[1][1] = 256; // num blobs + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; // shape + ve->limits[0][3] = 0; + ve->limits[1][3] = 100; // m1 + ve->limits[0][4] = 0; + ve->limits[1][4] = 100; // m2 + ve->limits[0][5] = 0; + ve->limits[1][5] = 100; // m3 + ve->limits[0][6] = 1; + ve->limits[1][6] = 100; + ve->limits[0][7] = 1; + ve->limits[1][7] = 360; + ve->defaults[0] = DEFAULT_RADIUS; + ve->defaults[1] = DEFAULT_NUM; + ve->defaults[2] = 1; + ve->defaults[3] = 1; + ve->defaults[4] = 0; + ve->defaults[5] = 0; + ve->defaults[6] = 199; + ve->defaults[7] = w/4; + + ve->description = "Video Boids"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user =0; + return ve; +} + + + + +static void blob_home_position( int blob_id, int w, int h , double v[2] ) +{ + double theta = 360.0 / ( (double) blob_num_ ) * blob_id; + double rad = (theta / 180.0 ) * M_PI; + double ratio = (w/h); + double cx = ( double )( w/ 2); + double cy = ( double )( h/ 2) * ratio; + v[0] = cx + cos(rad) * blob_home_radius_; + v[1] = cy + sin(rad) * blob_home_radius_; +} + +static void blob_init_( blob_t *b , int blob_id, int w , int h) +{ + double v[2]; + + blob_home_position( blob_id,w,h,v ); + + b->x = v[0]; + b->y = v[1]; + b->vx = 0.01; + b->vy = 0.01; +} +// FIXME private +int boids_malloc(int w, int h) +{ + int j,i; + double frac; + int dist_sqrt; + + if(blob_radius_ <= 0) + return 0; + + blob_dradius_ = blob_radius_ * 2; + blob_sradius_ = blob_radius_ * blob_radius_; + + blob_ = (uint8_t**) vj_malloc(sizeof(uint8_t*) * blob_dradius_ ); + for(i = 0; i < blob_dradius_ ; i ++ ) + { + blob_[i] = (uint8_t*) vj_calloc(sizeof(uint8_t) * blob_dradius_ ); + if(!blob_[i]) return 0; + } + + blobs_ = (blob_t*) vj_calloc(sizeof(blob_t) * blob_num_ ); + if(!blobs_ ) return 0; + + blob_image_ = (uint8_t*) vj_calloc(sizeof(uint8_t) * w * h ); + if(!blob_image_) return 0; + + + for( i = -blob_radius_ ; i < blob_radius_ ; ++ i ) + { + for( j = -blob_radius_ ; j < blob_radius_ ; ++ j ) + { + dist_sqrt = i * i + j * j; + if( dist_sqrt < blob_sradius_ ) + { + frac = (double) (sqrt(dist_sqrt)) / (double) blob_sradius_; + blob_[i + blob_radius_][j + blob_radius_] = 0xff; + } + else + { + blob_[i + blob_radius_][j + blob_radius_ ] = 0x0; // was 0 + } + } + } + + for( i = 0; i < blob_num_ ; i ++ ) + { + blob_init_( blobs_ + i ,i, w , h ); + } + + veejay_memset( blob_image_ , 0 , w * h ); + + blob_ready_ = 1; + + return 1; +} + + +void boids_free() +{ + int i; + for (i = 0; i < blob_dradius_ ; i ++ ) + if( blob_[i] ) free( blob_[i] ); + if(blobs_) + free(blobs_); + if(blob_image_) + free(blob_image_); +} + +typedef void (*blob_func)(int s, int width); + +static int blob_collision( blob_t b, blob_t this ) +{ + int dx = this.x - b.x; + int dy = this.y - b.y; + double dvx = this.vx - b.vx; + double dvy = this.vy - b.vy; + double D = dx * dx + dy * dy; + + if( abs( dx ) > this.d || abs(dy) > this.d ) + return 0; + if( D > this.d2 ) + return 0; + + + double mag = dvx * dx + dvy * dy; + + if( mag > 0 ) + return 0; + + mag /= D; + + double ovx = dx * mag; + double ovy = dy * mag; + + + this.vx -= ovx; + this.vy -= ovy; + + b.vx += ovx; + b.vy += ovy; + + return 1; +} + +static void blob_render_circle(int s, int width) +{ + int i,j; + for( i = 0; i < blob_dradius_ ; ++ i ) + { + for( j = 0; j < blob_dradius_ ; ++ j) + { + if( blob_image_[ s + j ] + blob_[i][j] > 255 ) + blob_image_[s + j] = 0xff; + else + blob_image_[s + j] += blob_[i][j]; + } + s += width; + } +} + +static void blob_render_rect(int s, int width) +{ + int i,j; + for( i = 0; i < blob_dradius_ ; ++ i ) + { + for( j = 0; j < blob_dradius_ ; ++ j) + { + blob_image_[s + j] = 0xff; + } + s += width; + } +} + +static blob_func blob_render(void) +{ + if( blob_type_ == BLOB_RECT) + return blob_render_rect; + return blob_render_circle; +} + + +// calculate center of mass +static void boid_rule1_( int boid_id, double v1[2] ) +{ + int i; + double v[2] = { 0.0, 0.0 }; + for( i = 0; i < blob_num_ ; i ++ ) + { + if( i != boid_id ) + { + v[0] += (double) blobs_[i].x; + v[1] += (double) blobs_[i].y; + } + } + v[0] = v[0] / ( (double) blob_num_ - 1 ); + v[1] = v[1] / ( (double) blob_num_ - 1 ); + v1[0] = (v[0] - ((double)blobs_[boid_id].x)) / 100.0; + v1[1] = (v[1] - ((double)blobs_[boid_id].y)) / 100.0; +} + + +// try to keep a small distance away from other blobs +static void boid_rule2_( int boid_id, double v1[2] ) +{ + double v[2] = {0.0 , 0.0}; + int i; + for( i = 0; i < blob_num_; i ++ ) + { + if( i != boid_id) + { + // find nearby blob + double d = ( blobs_[boid_id].x - blobs_[i].x ) * ( blobs_[boid_id].x - blobs_[i].x ) + + ( blobs_[boid_id].y - blobs_[i].y ) * ( blobs_[boid_id].y - blobs_[i].y ); + + if( d < blob_sradius_ ) + { + v[0] = v[0] - ((double) ( blobs_[boid_id].x - blobs_[i].x )); + v[1] = v[1] - ((double) ( blobs_[boid_id].y - blobs_[i].y )); + } + } + } + v1[0] = v[0]; + v1[1] = v[1]; +} + +// try to match velocity with near blobs +static void boid_rule3_( int boid_id, double v1[2] ) +{ + double v[2] = { 0.0, 0.0 }; + int i; + for( i = 0; i < blob_num_; i ++ ) + { + if( boid_id != i ) + { + v[0] = v[0] + blobs_[i].vx; + v[1] = v[1] + blobs_[i].vy; + } + } + v1[0] = v[0] /( (double)( blob_num_ -1 )); + v1[0] = ( v[0] - blobs_[boid_id].vx ) / 8; + v1[1] = v[1] /( (double)( blob_num_ -1 )); + v1[1] = ( v[1] - blobs_[boid_id].vy ) / 8; +} + +static void boid_rule4_( int boid_id, int vlim ) +{ + // speed limiter + if( blobs_[boid_id].vx > vlim ) + blobs_[boid_id].vx = ( blobs_[boid_id].vx / fabs( blobs_[boid_id].vx) ) * vlim; + if( blobs_[boid_id].vy > vlim ) + blobs_[boid_id].vy = ( blobs_[boid_id].vy / fabs( blobs_[boid_id].vy) ) * vlim; +} + +void boids_apply(VJFrame *frame, + int width, int height, int radius, int num, int shape, int m1, int m2, int m3, int speed, int home_radius ) +{ + const int len = frame->len; + uint8_t *srcY = frame->data[0]; + uint8_t *srcCb= frame->data[1]; + uint8_t *srcCr= frame->data[2]; + int s,i,j,k; + const double M1 = ( (m1==0? 0.0 : m1/100.0) ); + const double M2 = ( (m2==0? 0.0 : m2/100.0) ); + const double M3 = ( (m3==0? 0.0 : m3/100.0) ); + + blob_func f = blob_render(); + + blob_type_ = shape; + + if( radius != blob_radius_ || num != blob_num_ ) + { // reinitialize + blob_radius_ = radius; + blob_num_ = num; + boids_free(); + boids_malloc(width,height); + } + + if( home_radius != blob_home_radius_ ) + { + blob_home_radius_ = home_radius; + for( i = 0; i < blob_num_ ; i ++ ) + blob_init_(blobs_ + i , i, width, height); + } + + // move boid to new positions + for( i = 0; i < blob_num_; i ++) + { + double v1[2],v2[2],v3[2]; + + boid_rule1_( i, v1 ); + boid_rule2_( i, v2 ); + boid_rule3_( i, v3 ); + + v1[0] *= M1; + v1[1] *= M1; + v2[0] *= M2; + v2[1] *= M2; + v3[0] *= M3; + v3[1] *= M3; + + blobs_[i].vx = blobs_[i].vx + v1[0] + v2[0] + v3[0]; + blobs_[i].vy = blobs_[i].vy + v1[1] + v2[1] + v3[1]; + + boid_rule4_( i, speed * speed ); + + blobs_[i].x = blobs_[i].x + (short) blobs_[i].vx; + blobs_[i].y = blobs_[i].y + (short) blobs_[i].vy; + + } + + // fill blob + for( k = 0; k < blob_num_ ; k ++ ) + { + if( (blobs_[k].x > 0) && + (blobs_[k].x < (width - blob_dradius_)) && + (blobs_[k].y > 0) && + (blobs_[k].y < (height - blob_dradius_)) ) + { + s = blobs_[k].x + blobs_[k].y * width; + f(s,width); + } + else + { + blob_init_( blobs_ + k,k,width ,height ); + } + } + + // project blob onto video frame + for(i = 0; i < len ; i ++ ) + { + if( blob_image_[i] == 0x0 ) + { + srcY[i] = 16; + srcCb[i] = 128; + srcCr[i] = 128; + } + blob_image_[i] = 0x0; + } +} diff --git a/veejay-server/libvje/effects/baltantv.c b/veejay-server/libvje/effects/baltantv.c new file mode 100644 index 00000000..f1b64fb5 --- /dev/null +++ b/veejay-server/libvje/effects/baltantv.c @@ -0,0 +1,120 @@ +/* + * Linux VeeJay + * + * EffecTV - Realtime Digital Video Effector + * Copyright (C) 2001-2006 FUKUCHI Kentaro + * + * BaltanTV - like StreakTV, but following for a long time + * Copyright (C) 2001-2002 FUKUCHI Kentaro + * Ported to veejay by Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "baltantv.h" +#include "common.h" + +vj_effect *baltantv_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; + ve->limits[1][0] = 16; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->defaults[0] = 8; + ve->defaults[1] = 0; + ve->description = "BaltanTV (EffecTV)"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static unsigned int plane_ = 0; + +#define PLANES 64 + +static uint8_t **planetable_ = NULL; + +int baltantv_malloc(int w, int h) +{ + if( planetable_ ) + free(planetable_ ); + planetable_ = (uint8_t**) vj_malloc( sizeof(uint8_t*) * PLANES * + (w * h )); + if(!planetable_) + return 0; + + return 1; +} + +void baltantv_free() +{ + plane_ = 0; + if(planetable_) + free(planetable_); + planetable_ = NULL; +} + +void baltantv_apply( VJFrame *frame, int width, int height, int stride, int mode) +{ + unsigned int i,cf; + const int len = (width * height); + uint8_t *Y = frame->data[0]; + uint8_t *pDst = planetable_ + (plane_ * frame->len); + + for( i = 0; i < len ; i ++ ) + pDst[i] = (Y[i] >> 2 ); + + cf = plane_ & (stride-1); + + uint8_t *pSrc[4] = { + planetable_ + (cf * frame->len), + planetable_ + ((cf+stride) * frame->len), + planetable_ + ((cf+stride*2) * frame->len), + planetable_ + ((cf+stride*3) * frame->len) + }; + + if( mode == 0 ) + { + for( i = 0; i < len; i ++ ) + { + Y[i] = pSrc[0][i] + + pSrc[1][i] + + pSrc[2][i] + + pSrc[3][i]; + pDst[i] = (Y[i] >> 2 ); + } + } + else + { + for( i = 0; i < len ; i++ ) + { + Y[i] = pSrc[0][i] + + pSrc[1][i] + + pSrc[2][i] + + pSrc[3][i]; + } + } + plane_ ++; + + plane_ = plane_ & (PLANES-1); +} diff --git a/veejay-server/libvje/effects/baltantv.h b/veejay-server/libvje/effects/baltantv.h new file mode 100644 index 00000000..7c0f5a3b --- /dev/null +++ b/veejay-server/libvje/effects/baltantv.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BALTAN_TVH +#define BALTAN_TVH +#include +#include +#include + +vj_effect *baltantv_init(int w, int h); +void baltantv_apply( VJFrame *frame, int width, int height, int stride, int mode); +int baltantv_malloc(int w, int h ); +void baltantv_free(); +#endif diff --git a/veejay-server/libvje/effects/bathroom.c b/veejay-server/libvje/effects/bathroom.c new file mode 100644 index 00000000..4fbad9dd --- /dev/null +++ b/veejay-server/libvje/effects/bathroom.c @@ -0,0 +1,170 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + + +/* + shift pixels in row/column to get a 'bathroom' window look. Use the parameters + to set the distance and mode + + */ +#include +#include +#include +#include "bathroom.h" +#include "common.h" +static uint8_t *bathroom_frame[3]; + +vj_effect *bathroom_init(int width,int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + ve->limits[0][1] = 1; + ve->limits[1][1] = 64; + ve->defaults[0] = 1; + ve->defaults[1] = 32; + ve->description = "Bathroom Window"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int n__ = 0; +static int N__ = 0; +// FIXME private + +int bathroom_malloc(int width, int height) +{ + bathroom_frame[0] = (uint8_t*)vj_yuvalloc( width, height ); + if(!bathroom_frame[0]) return 0; + + bathroom_frame[1] = bathroom_frame[0] + (width * height ); + bathroom_frame[2] = bathroom_frame[1] + (width * height ); + n__ = 0; + N__ = 0; + return 1; +} + +void bathroom_free() { + if(bathroom_frame[0]) + free(bathroom_frame[0]); + bathroom_frame[0] = NULL; + bathroom_frame[1] = NULL; + bathroom_frame[2] = NULL; +} + +void bathroom_verti_apply(VJFrame *frame, int width, int height, int val) +{ + unsigned int i; + const unsigned int len = frame->len; + unsigned int y_val = val; + unsigned int x,y; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + veejay_memcpy( bathroom_frame[0], Y, len); + veejay_memcpy( bathroom_frame[1], Cb, len); + veejay_memcpy( bathroom_frame[2], Cr, len); + + if( y_val <= 0 ) + y_val = 1; + + for(y=0; y < height;y++) { + for(x=0; x >1)) + (y*width); + if(i < 0) i = 0; + if(i >= len) i = len-1; + Y[y*width+x] = bathroom_frame[0][i]; + Cb[y*width+x] = bathroom_frame[1][i]; + Cr[y*width+x] = bathroom_frame[2][i]; + } + } + +} + + +void bathroom_hori_apply(VJFrame *frame, int width, int height, int val) +{ + unsigned int i; + unsigned int len = (width * height); + unsigned int y_val = val; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + unsigned int x,y; + veejay_memcpy( bathroom_frame[0], Y, len); + veejay_memcpy( bathroom_frame[1], Cb, len); + veejay_memcpy( bathroom_frame[2], Cr, len); + + for(y=0; y < height;y++) { + for(x=0; x >1)) + x; + if(i < 0) i += width; + Y[(y*width)+x] = bathroom_frame[0][i]; + Cb[(y*width)+x] = bathroom_frame[1][i]; + Cr[(y*width)+x] = bathroom_frame[2][i]; + } + } + +} + +void bathroom_apply(VJFrame *frame, int width, int height, int mode, int val) { + + int interpolate = 1; + int tmp1 = val; + int tmp2 = 0; + int motion = 0; + if(motionmap_active()) + { + motionmap_scale_to( 64, 64, 1, 1, &tmp1, &tmp2, &n__, &N__ ); + motion = 1; + } + else + { + N__ = 0; + n__ = 0; + } + if( n__ == N__ || n__ == 0 ) + interpolate = 0; + + switch(mode) + { + case 1: bathroom_hori_apply(frame,width,height,tmp1); break; + case 0: bathroom_verti_apply(frame,width,height,tmp1); break; + } + + if( interpolate ) + { + motionmap_interpolate_frame( frame, N__,n__ ); + } + + if(motion) + { + motionmap_store_frame( frame ); + } +} diff --git a/veejay-server/libvje/effects/bathroom.h b/veejay-server/libvje/effects/bathroom.h new file mode 100644 index 00000000..6cbded97 --- /dev/null +++ b/veejay-server/libvje/effects/bathroom.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BATHROOM_H +#define BATHROOM_H +#include +#include +#include + +vj_effect *bathroom_init(int w, int h); +int bathroom_malloc(int w, int h); +void bathroom_free(); +void bathroom_apply(VJFrame *Frame, int width, int height,int mode, int val); +#endif diff --git a/veejay-server/libvje/effects/binaryoverlays.c b/veejay-server/libvje/effects/binaryoverlays.c new file mode 100644 index 00000000..62f24a3f --- /dev/null +++ b/veejay-server/libvje/effects/binaryoverlays.c @@ -0,0 +1,315 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "binaryoverlays.h" +#include + +vj_effect *binaryoverlay_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 0; + ve->description = "Binary Overlays"; + ve->limits[0][0] = 0; + ve->limits[1][0] = 10; + ve->extra_frame = 1; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + +/* rename methods in lumamagick and chromamagick */ + +static void _binary_not_and( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int i; + for(i=0; i < len; i++) + { + Y[i] = ~(Y[i]) & ~(Y2[i]); + } + for(i=0; i < uv_len; i++) + { + Cb[i] = ~(Cb[i]) & ~(Cb2[i]); + Cr[i] = ~(Cr[i]) & ~(Cr2[i]); + } +} +static void _binary_not_xor( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int i; + for(i=0; i < len; i++) + { + Y[i] = ~(Y[i]) ^ ~(Y2[i]); + } + for(i=0; i < uv_len; i++) + { + Cb[i] = ~(Cb[i]) ^ ~(Cb2[i]); + Cr[i] = ~(Cr[i]) ^ ~(Cr2[i]); + } +} + +static void _binary_not_or( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int i; + for(i=0; i < len; i++) + { + Y[i] = ~(Y[i]) | ~(Y2[i]); + } + for(i=0; i < uv_len; i++) + { + Cb[i] = ~(Cb[i]) | ~(Cb2[i]); + Cr[i] = ~(Cr[i]) | ~(Cr2[i]); + } +} + +// this is also sub, sub = A & ~(B) +static void _binary_not_and_lh( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + int i; + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + for(i=0; i < len; i++) + { + Y[i] = Y[i] & ~(Y2[i]); + } + for(i=0; i < uv_len; i++) + { + Cb[i] = Cb[i] & ~(Cb2[i]); + Cr[i] = Cr[i] & ~(Cr2[i]); + } +} +static void _binary_not_xor_lh( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int i; + for(i=0; i < len; i++) + { + Y[i] = Y[i] ^ ~(Y2[i]); + } + for(i=0; i < uv_len; i++) + { + Cb[i] = Cb[i] ^ ~(Cb2[i]); + Cr[i] = Cr[i] ^ ~(Cr2[i]); + } +} + +static void _binary_not_or_lh( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int i; + for(i=0; i < len; i++) + { + Y[i] = Y[i] | ~(Y2[i]); + } + for(i=0; i < uv_len; i++) + { + Cb[i] = Cb[i] | ~(Cb2[i]); + Cr[i] = Cr[i] | ~(Cr2[i]); + } +} +static void _binary_not_and_rh( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int i; + for(i=0; i < len; i++) + { + Y[i] = ~(Y[i]) & Y2[i]; + } + for(i=0; i < uv_len; i++) + { + Cb[i] = ~(Cb[i]) & Cb2[i]; + Cr[i] = ~(Cr[i]) & Cr2[i]; + } +} +static void _binary_not_xor_rh( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int i; + for(i=0; i < len; i++) + { + Y[i] = ~(Y[i]) ^ Y2[i]; + } + for(i=0; i < uv_len; i++) + { + Cb[i] = ~(Cb[i]) ^ Cb2[i]; + Cr[i] = ~(Cr[i]) ^ Cr2[i]; + } +} + +static void _binary_not_or_rh( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int i; + for(i=0; i < len; i++) + { + Y[i] = ~(Y[i]) | Y2[i]; + } + for(i=0; i < uv_len; i++) + { + Cb[i] = ~(Cb[i]) | Cb2[i]; + Cr[i] = ~(Cr[i]) | Cr2[i]; + } +} + + + + +static void _binary_or( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + + int i; + for(i=0; i < len; i++) + Y[i] = Y[i] | Y2[i]; + for(i=0; i < uv_len; i++) + { + Cb[i] = Cb[i] | Cb2[i]; + Cr[i] = Cr[i] | Cr2[i]; + } +} +static void _binary_and( VJFrame *frame, VJFrame *frame2, int w, int h ) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + + int i; + for(i=0; i < len; i++) + Y[i] = Y[i] & Y2[i]; + for(i=0; i < uv_len; i++) + { + Cb[i] = Cb[i] & Cb2[i]; + Cr[i] = Cr[i] & Cr2[i]; + } +} + + + +void binaryoverlay_apply( VJFrame *frame, VJFrame *frame2, int w, int h, int mode ) +{ + switch(mode) + { + case 0: _binary_not_and( frame,frame2,w,h ); break;// not a and not b + case 1: _binary_not_or( frame,frame2,w,h); break; // not a or not b + case 2: _binary_not_xor( frame,frame2,w,h); break; // not a xor not b + case 3: _binary_not_and_lh( frame,frame2,w,h ); break; // a and not b + case 4: _binary_not_or_lh( frame,frame2,w,h); break; // a or not b + case 5: _binary_not_xor_lh( frame,frame2,w,h); break; // a xor not b + case 6: _binary_not_and_rh (frame,frame2,w,h); break; // a and not b + case 7: _binary_not_or_rh( frame,frame2,w,h); break; // a or not b + case 8: _binary_or( frame,frame2,w,h); break; // a or b + case 9: _binary_and( frame,frame2,w,h); break; // a and b + case 10: _binary_not_xor_rh(frame,frame2,w,h); break; + } +} + +void binaryoverlay_free() {} diff --git a/veejay-server/libvje/effects/binaryoverlays.h b/veejay-server/libvje/effects/binaryoverlays.h new file mode 100644 index 00000000..63eb2842 --- /dev/null +++ b/veejay-server/libvje/effects/binaryoverlays.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BINARYOVERLAYS_H +#define BINARYOVERLAYS_H +#include +#include +#include + +vj_effect *binaryoverlay_init(int w, int h); + +void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n); + +void magicoverlays_free(); +#endif diff --git a/veejay-server/libvje/effects/blob.c b/veejay-server/libvje/effects/blob.c new file mode 100644 index 00000000..4a208350 --- /dev/null +++ b/veejay-server/libvje/effects/blob.c @@ -0,0 +1,273 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +/* Copyright (C) 2002-2003 W.P. van Paassen - peter@paassen.tmfweb.nl + + 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; see the file COPYING. If not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* + + blob , originally from the demo effect collection + easily modified to videoblob + p0: radius + p1: number of blobs + p2: speed + p3: shape (rect,circle) + + the number of blobs and size of radius determine amount of work for cpu. + +*/ + +#include +#include +#include +#include "common.h" +#include "blob.h" + +typedef struct +{ + short x; + short y; +} blob_t; + +#define DEFAULT_RADIUS 16 +#define DEFAULT_NUM 50 + +#define BLOB_RECT 0 +#define BLOB_CIRCLE 1 + +static blob_t *blobs_; +static uint8_t **blob_; +static uint8_t *blob_image_; +static int blob_ready_ = 0; +static int blob_radius_ = 16; +static int blob_dradius_ = 0; +static int blob_sradius_ = 0; +static int blob_num_ = 50; +static int blob_type_ = 1; + +vj_effect *blob_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = 360; // radius + ve->limits[0][1] = 1; + ve->limits[1][1] = 100; // num blobs + ve->limits[0][2] = 1; + ve->limits[1][2] = 100; // speed + ve->limits[0][3] = 0; + ve->limits[1][3] = 1; // shape + ve->defaults[0] = DEFAULT_RADIUS; + ve->defaults[1] = DEFAULT_NUM; + ve->defaults[2] = 50; + ve->defaults[3] = 1; + ve->description = "Video Blobs"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user =0; + return ve; +} +static void blob_init_( blob_t *b , int w , int h) +{ + b->x = (w >> 1) - blob_radius_; + b->y = (h >> 1) - blob_radius_; +} +// FIXME private +int blob_malloc(int w, int h) +{ + int j,i; + double frac; + int dist_sqrt; + + if(blob_radius_ <= 0) + return 0; + + blob_dradius_ = blob_radius_ * 2; + blob_sradius_ = blob_radius_ * blob_radius_; + + blob_ = (uint8_t**) vj_malloc(sizeof(uint8_t*) * blob_dradius_ ); + for(i = 0; i < blob_dradius_ ; i ++ ) + { + blob_[i] = (uint8_t*) vj_calloc(sizeof(uint8_t) * blob_dradius_ ); + if(!blob_[i]) return 0; + } + + blobs_ = (blob_t*) vj_calloc(sizeof(blob_t) * blob_num_ ); + if(!blobs_ ) return 0; + + blob_image_ = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h ); + if(!blob_image_) return 0; + + for( i = -blob_radius_ ; i < blob_radius_ ; ++ i ) + { + for( j = -blob_radius_ ; j < blob_radius_ ; ++ j ) + { + dist_sqrt = i * i + j * j; + if( dist_sqrt < blob_sradius_ ) + { + frac = (double) (sqrt(dist_sqrt)) / (double) blob_sradius_; + blob_[i + blob_radius_][j + blob_radius_] = 0xff; + } + else + { + blob_[i + blob_radius_][j + blob_radius_ ] = 0x0; // was 0 + } + } + } + + for( i = 0; i < blob_num_ ; i ++ ) + { + blob_init_( blobs_ + i , w , h ); + } + + veejay_memset( blob_image_ , 0 , w * h ); + + blob_ready_ = 1; + + return 1; +} + + +void blob_free() +{ + int i; + for (i = 0; i < blob_dradius_ ; i ++ ) + if( blob_[i] ) free( blob_[i] ); + if(blobs_) + free(blobs_); + if(blob_image_) + free(blob_image_); + blobs_ = NULL; + blob_image_ = NULL; +} + +typedef void (*blob_func)(int s, int width); + +static void blob_render_circle(int s, int width) +{ + int i,j; + for( i = 0; i < blob_dradius_ ; ++ i ) + { + for( j = 0; j < blob_dradius_ ; ++ j) + { + if( blob_image_[ s + j ] + blob_[i][j] > 255 ) + blob_image_[s + j] = 0xff; + else + blob_image_[s + j] += blob_[i][j]; + } + s += width; + } +} + +static void blob_render_rect(int s, int width) +{ + int i,j; + for( i = 0; i < blob_dradius_ ; ++ i ) + { + for( j = 0; j < blob_dradius_ ; ++ j) + { + blob_image_[s + j] = 0xff; + } + s += width; + } +} + +static blob_func blob_render(void) +{ + if( blob_type_ == BLOB_RECT) + return &blob_render_rect; + return &blob_render_circle; +} + +void blob_apply(VJFrame *frame, + int width, int height, int radius, int num, int speed, int shape) +{ + const int len = frame->len; + uint8_t *srcY = frame->data[0]; + uint8_t *srcCb= frame->data[1]; + uint8_t *srcCr= frame->data[2]; + int i,k; + int s; + double max = speed / 10.0; + blob_func f = blob_render(); + + blob_type_ = shape; + + if( radius != blob_radius_ || num != blob_num_ ) + { // reinitialize + blob_radius_ = radius; + blob_num_ = num; + blob_free(); + blob_malloc(width,height); + } + + // move blob + for( i = 0; i < blob_num_; i ++) + { + blobs_[i].x += -2 + (int) ( max * (rand()/(RAND_MAX+1.0))); + blobs_[i].y += -2 + (int) ( max * (rand()/(RAND_MAX+1.0))); + } + + // fill blob + for( k = 0; k < blob_num_ ; k ++ ) + { + if( (blobs_[k].x > 0) && + (blobs_[k].x < (width - blob_dradius_)) && + (blobs_[k].y > 0) && + (blobs_[k].y < (height - blob_dradius_)) ) + { + s = blobs_[k].x + blobs_[k].y * width; + f(s,width); + } + else + { + blob_init_( blobs_ + k,width ,height ); + } + } + + // project blob onto video frame + for(i = 0; i < len ; i ++ ) + { + if( blob_image_[i] == 0x0 ) + { + srcY[i] = 16; + srcCb[i] = 128; + srcCr[i] = 128; + } + blob_image_[i] = 0x0; + } +} diff --git a/veejay-server/libvje/effects/blob.h b/veejay-server/libvje/effects/blob.h new file mode 100644 index 00000000..1a78fee4 --- /dev/null +++ b/veejay-server/libvje/effects/blob.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BLOB_H +#define BLOB_H +#include +#include +#include + +vj_effect *blob_init(int w, int h); +void blob_apply( VJFrame *frame, int width, int height, int p0,int p1, int p2, int p3); +int blob_malloc( int w, int h ); +void blob_free(void); + +#endif diff --git a/veejay-server/libvje/effects/boids.c b/veejay-server/libvje/effects/boids.c new file mode 100644 index 00000000..364f526d --- /dev/null +++ b/veejay-server/libvje/effects/boids.c @@ -0,0 +1,421 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +/* Copyright (C) 2002-2003 W.P. van Paassen - peter@paassen.tmfweb.nl + + 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; see the file COPYING. If not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* + + blob , originally from the demo effect collection + extended to video boids. the boids are an implementation of + Craig Reynolds's BOIDS behavioral algorithm + (http://www.vergenet.net/~conrad/boids/pseudocode.html) + + p0: radius + p1: number of blobs + p2: shape (rect,circle) + p3: influence boids trying to fly towards centre of mass of neighbouring boids + p4: influence boids trying to keep a small distance away from other boids + p5: influence boids trying to match velocity with near boids + p6: speed limiter + p7: home position distance to center point + + added optional flock rules: + + limiting speed + +*/ + +#include +#include +#include +#include +#include "common.h" +#include "blob.h" + + +typedef struct +{ + short x; // x + short y; // y + double vx; // velocity x + double vy; // velocity y +} blob_t; + +#define DEFAULT_RADIUS 16 +#define DEFAULT_NUM 100 + +#define BLOB_RECT 0 +#define BLOB_CIRCLE 1 + +static blob_t *blobs_; +static uint8_t **blob_; +static uint8_t *blob_image_; + +static int blob_ready_ = 0; +static int blob_radius_ = 16; +static int blob_dradius_ = 0; +static int blob_sradius_ = 0; +static int blob_num_ = 100; +static int blob_type_ = 1; +static int blob_home_radius_= 203; + +vj_effect *boids_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 8; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = w/2; // radius + ve->limits[0][1] = 2; + ve->limits[1][1] = 256; // num blobs + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; // shape + ve->limits[0][3] = 0; + ve->limits[1][3] = 100; // m1 + ve->limits[0][4] = 0; + ve->limits[1][4] = 100; // m2 + ve->limits[0][5] = 0; + ve->limits[1][5] = 100; // m3 + ve->limits[0][6] = 1; + ve->limits[1][6] = 100; + ve->limits[0][7] = 1; + ve->limits[1][7] = 360; + ve->defaults[0] = DEFAULT_RADIUS; + ve->defaults[1] = DEFAULT_NUM; + ve->defaults[2] = 1; + ve->defaults[3] = 1; + ve->defaults[4] = 0; + ve->defaults[5] = 0; + ve->defaults[6] = 199; + ve->defaults[7] = w/4; + + ve->description = "Video Boids"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user =0; + return ve; +} + + + + +static void blob_home_position( int blob_id, int w, int h , double v[2] ) +{ + double theta = 360.0 / ( (double) blob_num_ ) * blob_id; + double rad = (theta / 180.0 ) * M_PI; + double ratio = (w/h); + double cx = ( double )( w/ 2); + double cy = ( double )( h/ 2) * ratio; + v[0] = cx + cos(rad) * blob_home_radius_; + v[1] = cy + sin(rad) * blob_home_radius_; +} + +static void blob_init_( blob_t *b , int blob_id, int w , int h) +{ + double v[2]; + + blob_home_position( blob_id,w,h,v ); + + b->x = v[0]; + b->y = v[1]; + b->vx = 0.01; + b->vy = 0.01; +} +// FIXME private +int boids_malloc(int w, int h) +{ + int j,i; + double frac; + int dist_sqrt; + + if(blob_radius_ <= 0) + return 0; + + blob_dradius_ = blob_radius_ * 2; + blob_sradius_ = blob_radius_ * blob_radius_; + + blob_ = (uint8_t**) vj_malloc(sizeof(uint8_t*) * blob_dradius_ ); + for(i = 0; i < blob_dradius_ ; i ++ ) + { + blob_[i] = (uint8_t*) vj_calloc(sizeof(uint8_t) * blob_dradius_ ); + if(!blob_[i]) return 0; + } + + blobs_ = (blob_t*) vj_calloc(sizeof(blob_t) * blob_num_ ); + if(!blobs_ ) return 0; + + blob_image_ = (uint8_t*) vj_calloc(sizeof(uint8_t) * w * h ); + if(!blob_image_) return 0; + + + for( i = -blob_radius_ ; i < blob_radius_ ; ++ i ) + { + for( j = -blob_radius_ ; j < blob_radius_ ; ++ j ) + { + dist_sqrt = i * i + j * j; + if( dist_sqrt < blob_sradius_ ) + { + frac = (double) (sqrt(dist_sqrt)) / (double) blob_sradius_; + blob_[i + blob_radius_][j + blob_radius_] = 0xff; + } + else + { + blob_[i + blob_radius_][j + blob_radius_ ] = 0x0; // was 0 + } + } + } + + for( i = 0; i < blob_num_ ; i ++ ) + { + blob_init_( blobs_ + i ,i, w , h ); + } + + veejay_memset( blob_image_ , 0 , w * h ); + + blob_ready_ = 1; + + return 1; +} + + +void boids_free() +{ + int i; + for (i = 0; i < blob_dradius_ ; i ++ ) + if( blob_[i] ) free( blob_[i] ); + if(blobs_) + free(blobs_); + if(blob_image_) + free(blob_image_); +} + +typedef void (*blob_func)(int s, int width); + +static void blob_render_circle(int s, int width) +{ + int i,j; + for( i = 0; i < blob_dradius_ ; ++ i ) + { + for( j = 0; j < blob_dradius_ ; ++ j) + { + if( blob_image_[ s + j ] + blob_[i][j] > 255 ) + blob_image_[s + j] = 0xff; + else + blob_image_[s + j] += blob_[i][j]; + } + s += width; + } +} + +static void blob_render_rect(int s, int width) +{ + int i,j; + for( i = 0; i < blob_dradius_ ; ++ i ) + { + for( j = 0; j < blob_dradius_ ; ++ j) + { + blob_image_[s + j] = 0xff; + } + s += width; + } +} + +static blob_func blob_render(void) +{ + if( blob_type_ == BLOB_RECT) + return blob_render_rect; + return blob_render_circle; +} + + +// calculate center of mass +static void boid_rule1_( int boid_id, double v1[2] ) +{ + int i; + double v[2] = { 0.0, 0.0 }; + for( i = 0; i < blob_num_ ; i ++ ) + { + if( i != boid_id ) + { + v[0] += (double) blobs_[i].x; + v[1] += (double) blobs_[i].y; + } + } + v[0] = v[0] / ( (double) blob_num_ - 1 ); + v[1] = v[1] / ( (double) blob_num_ - 1 ); + v1[0] = (v[0] - ((double)blobs_[boid_id].x)) / 100.0; + v1[1] = (v[1] - ((double)blobs_[boid_id].y)) / 100.0; +} + + +// try to keep a small distance away from other blobs +static void boid_rule2_( int boid_id, double v1[2] ) +{ + double v[2] = {0.0 , 0.0}; + int i; + for( i = 0; i < blob_num_; i ++ ) + { + if( i != boid_id) + { + // find nearby blob + double d = ( blobs_[boid_id].x - blobs_[i].x ) * ( blobs_[boid_id].x - blobs_[i].x ) + + ( blobs_[boid_id].y - blobs_[i].y ) * ( blobs_[boid_id].y - blobs_[i].y ); + + if( d < blob_sradius_ ) + { + v[0] = v[0] - ((double) ( blobs_[boid_id].x - blobs_[i].x )); + v[1] = v[1] - ((double) ( blobs_[boid_id].y - blobs_[i].y )); + } + } + } + v1[0] = v[0]; + v1[1] = v[1]; +} + +// try to match velocity with near blobs +static void boid_rule3_( int boid_id, double v1[2] ) +{ + double v[2] = { 0.0, 0.0 }; + int i; + for( i = 0; i < blob_num_; i ++ ) + { + if( boid_id != i ) + { + v[0] = v[0] + blobs_[i].vx; + v[1] = v[1] + blobs_[i].vy; + } + } + v1[0] = v[0] /( (double)( blob_num_ -1 )); + v1[0] = ( v[0] - blobs_[boid_id].vx ) / 8; + v1[1] = v[1] /( (double)( blob_num_ -1 )); + v1[1] = ( v[1] - blobs_[boid_id].vy ) / 8; +} + +static void boid_rule4_( int boid_id, int vlim ) +{ + // speed limiter + if( blobs_[boid_id].vx > vlim ) + blobs_[boid_id].vx = ( blobs_[boid_id].vx / fabs( blobs_[boid_id].vx) ) * vlim; + if( blobs_[boid_id].vy > vlim ) + blobs_[boid_id].vy = ( blobs_[boid_id].vy / fabs( blobs_[boid_id].vy) ) * vlim; +} + +void boids_apply(VJFrame *frame, + int width, int height, int radius, int num, int shape, int m1, int m2, int m3, int speed, int home_radius ) +{ + const int len = frame->len; + uint8_t *srcY = frame->data[0]; + uint8_t *srcCb= frame->data[1]; + uint8_t *srcCr= frame->data[2]; + int s,i,j,k; + const double M1 = ( (m1==0? 0.0 : m1/100.0) ); + const double M2 = ( (m2==0? 0.0 : m2/100.0) ); + const double M3 = ( (m3==0? 0.0 : m3/100.0) ); + + blob_func f = blob_render(); + + blob_type_ = shape; + + if( radius != blob_radius_ || num != blob_num_ ) + { // reinitialize + blob_radius_ = radius; + blob_num_ = num; + boids_free(); + boids_malloc(width,height); + } + + if( home_radius != blob_home_radius_ ) + { + blob_home_radius_ = home_radius; + for( i = 0; i < blob_num_ ; i ++ ) + blob_init_(blobs_ + i , i, width, height); + } + + // move boid to new positions + for( i = 0; i < blob_num_; i ++) + { + double v1[2],v2[2],v3[2]; + + boid_rule1_( i, v1 ); + boid_rule2_( i, v2 ); + boid_rule3_( i, v3 ); + + v1[0] *= M1; + v1[1] *= M1; + v2[0] *= M2; + v2[1] *= M2; + v3[0] *= M3; + v3[1] *= M3; + + blobs_[i].vx = blobs_[i].vx + v1[0] + v2[0] + v3[0]; + blobs_[i].vy = blobs_[i].vy + v1[1] + v2[1] + v3[1]; + + boid_rule4_( i, speed * speed ); + + blobs_[i].x = blobs_[i].x + (short) blobs_[i].vx; + blobs_[i].y = blobs_[i].y + (short) blobs_[i].vy; + + } + + // fill blob + for( k = 0; k < blob_num_ ; k ++ ) + { + if( (blobs_[k].x > 0) && + (blobs_[k].x < (width - blob_dradius_)) && + (blobs_[k].y > 0) && + (blobs_[k].y < (height - blob_dradius_)) ) + { + s = blobs_[k].x + blobs_[k].y * width; + f(s,width); + } + else + { + blob_init_( blobs_ + k,k,width ,height ); + } + } + + // project blob onto video frame + for(i = 0; i < len ; i ++ ) + { + if( blob_image_[i] == 0x0 ) + { + srcY[i] = 16; + srcCb[i] = 128; + srcCr[i] = 128; + } + blob_image_[i] = 0x0; + } +} diff --git a/veejay-server/libvje/effects/boids.h b/veejay-server/libvje/effects/boids.h new file mode 100644 index 00000000..8d47d56d --- /dev/null +++ b/veejay-server/libvje/effects/boids.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BOIDS_H +#define BOIDS_H +#include +#include +#include + +vj_effect *boids_init(int w, int h); +void boids_apply( VJFrame *frame, int width, int height, int p0,int p1, int p2, int p3, int p4, int p5, int p6, int p7); +int boids_malloc( int w, int h ); +void boids_free(void); + +#endif diff --git a/veejay-server/libvje/effects/borders.c b/veejay-server/libvje/effects/borders.c new file mode 100644 index 00000000..1a968219 --- /dev/null +++ b/veejay-server/libvje/effects/borders.c @@ -0,0 +1,56 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include + +#include +#include "borders.h" +#include "common.h" + +vj_effect *borders_init(int width,int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + + ve->defaults[0] = 41; + ve->defaults[1] = 0; + ve->limits[0][0] = 1; + ve->limits[1][0] = (height / 2); + ve->limits[0][1] = 0; + ve->limits[1][1] = 7; + ve->description = "Colored Border Translation"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void borders_apply( VJFrame *frame, int width, int height, int size, + int color) +{ + blackborder_yuvdata(frame->data[0], frame->data[1], frame->data[2], + width, height, (size), (size), (size), (size), + frame->shift_h, frame->shift_v,color); + +} +void borders_free(){} diff --git a/veejay-server/libvje/effects/borders.h b/veejay-server/libvje/effects/borders.h new file mode 100644 index 00000000..6149dcff --- /dev/null +++ b/veejay-server/libvje/effects/borders.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BORDERS_H +#define BORDERS_H +#include +#include +#include + +vj_effect *borders_init(int width,int height); +void borders_apply(VJFrame *frame, int width, int height, int size, + int color); +void borders_free(); +#endif diff --git a/veejay-server/libvje/effects/bwselect.c b/veejay-server/libvje/effects/bwselect.c new file mode 100644 index 00000000..40706cfa --- /dev/null +++ b/veejay-server/libvje/effects/bwselect.c @@ -0,0 +1,74 @@ + +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "bwselect.h" +#include "common.h" +vj_effect *bwselect_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 16; + ve->defaults[1] = 235; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->description = "Black and White by Threshold"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user =0 ; + return ve; +} + +void bwselect_apply(VJFrame *frame, int width, int height, int min_threshold, int max_threshold) { + int r,c; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + for(r=0; r < len; r+=width) { + for(c=0; c < width; c++) { + uint8_t p = Y[r+c]; + if( p > min_threshold && p < max_threshold) { + Y[r+c] = 235; + } + else { + Y[r+c] = 16; + } + } + } +#ifdef HAVE_ASM_MMX + memset_ycbcr( Cb, Cb, 128, frame->uv_width, frame->uv_height); + memset_ycbcr( Cr, Cr, 128, frame->uv_width, frame->uv_height); +#else + memset(Cb, 128, frame->uv_len); + memset(Cr, 128, frame->uv_len); +#endif +} + +void bwselect_free(){} diff --git a/veejay-server/libvje/effects/bwselect.h b/veejay-server/libvje/effects/bwselect.h new file mode 100644 index 00000000..39255289 --- /dev/null +++ b/veejay-server/libvje/effects/bwselect.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BWSELECT_H +#define BWSELECT_H +#include +#include +#include + +vj_effect *bwselect_init(); +void bwselect_apply(VJFrame *frame, int width, int height, int min_threshold, + int max_threshold); +void bwselect_free(); +#endif diff --git a/veejay-server/libvje/effects/cartonize.c b/veejay-server/libvje/effects/cartonize.c new file mode 100644 index 00000000..597af03d --- /dev/null +++ b/veejay-server/libvje/effects/cartonize.c @@ -0,0 +1,93 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "cartonize.h" + +vj_effect *cartonize_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->defaults[0] = 64; + ve->defaults[1] = 0; + ve->defaults[2] = 0; + + ve->description = "Cartoon"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void cartonize_apply( VJFrame *frame, int width, int height, int b1, int b2, int b3) +{ + unsigned int i; + int len = (width * height); + int uv_len = frame->uv_len; + uint8_t tmp; + int p; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + const int base = (const int) b1; + int ubase= (const int) b2 - 128; + int vbase= (const int) b3 - 128; + // ubase/vbase cannot be 0 + if(ubase==0) ubase=1; + if(vbase==0) vbase=1; + for( i = 0 ; i < len ; i ++ ) + { + tmp = Y[i]; + // if(tmp < 16 ) tmp = 16; else if(tmp > 235 ) tmp = 235; + Y[i] = (tmp / base) * base; // loose fractional part + } + + if(b2 > 0) + for( i = 0; i < uv_len; i ++ ) + { + p = Cb[i] - 128; + //if( p < -127 ) p = -127; + // if( p > 127 ) p = 127; + Cb[i] = (p / ubase) * ubase + 128; + } + + if(b3> 0 ) + for( i = 0; i < uv_len; i ++ ) + { + p = Cr[i] - 128; + //if( p < -127 ) p = -127; + // if( p > 127 ) p = 127; + Cr[i] = (p / vbase) * vbase + 128; + } + +} diff --git a/veejay-server/libvje/effects/cartonize.h b/veejay-server/libvje/effects/cartonize.h new file mode 100644 index 00000000..3a62b883 --- /dev/null +++ b/veejay-server/libvje/effects/cartonize.h @@ -0,0 +1,29 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CARTONIZE_H +#define CARTONIZE_H +#include +#include +#include + +vj_effect *cartonize_init(int w, int h); +void cartonize_apply( VJFrame *frame, int width, int height, int b1, int b2, int b3); +#endif diff --git a/veejay-server/libvje/effects/chameleon.c b/veejay-server/libvje/effects/chameleon.c new file mode 100644 index 00000000..476c7950 --- /dev/null +++ b/veejay-server/libvje/effects/chameleon.c @@ -0,0 +1,278 @@ +/* + * Linux VeeJay + * EffecTV - Realtime Digital Video Effector + * Copyright (C) 2001-2006 FUKUCHI Kentaro + * + * ChameleonTV - Vanishing into the wall!! + * Copyright (C) 2003 FUKUCHI Kentaro + * + * Ported to veejay by Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "chameleon.h" +#include "common.h" + +vj_effect *chameleon_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->defaults[0] = 0; + ve->defaults[1] = 0; + ve->description = "ChameleonTV (EffectTV)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int refresh_bg_ = -1; +static int last_mode_ = -1; +static int N__ = 0; +static int n__ = 0; + +static int has_bg = 0; +static int32_t *sum = NULL; +static uint8_t *timebuffer = NULL; +static uint8_t *tmpimage[3] = { NULL,NULL,NULL}; +static int plane = 0; +static uint8_t *bgimage[3] = { NULL,NULL,NULL}; + +#define PLANES_DEPTH 6 +#define PLANES (1<< PLANES_DEPTH) + +int chameleon_malloc(int w, int h) +{ + if( bgimage[0] ) + free(bgimage[0]); + bgimage[0] = (uint8_t*)vj_yuvalloc(w,h); + if(!bgimage[0]) + return 0; + bgimage[1] = bgimage[0] + (w*h); + bgimage[2] = bgimage[1] + (w*h); + if(tmpimage[0]) + free(tmpimage[0]); + tmpimage[0] = (uint8_t*)vj_yuvalloc(w,h); + if(!tmpimage[0]) + return 0; + tmpimage[1] = tmpimage[0] + (w*h); + tmpimage[2] = tmpimage[1] + (w*h); + + if( sum ) + free(sum); + sum = (int32_t*) vj_calloc( w * h * sizeof(int32_t)); + if( timebuffer ) + free(timebuffer); + timebuffer = (uint8_t*) vj_calloc( w* h * PLANES ); + + has_bg = 0; + plane = 0; + N__ = 0; + n__ = 0; + last_mode_ = -1; + refresh_bg_ = -1; + + return 1; +} + +void chameleon_free() +{ + if( bgimage[0]) free(bgimage[0]); + if( tmpimage[0]) free(tmpimage[0]); + if( timebuffer ) free(timebuffer); + if( sum ) free(sum); + bgimage[0] = NULL; + tmpimage[0] = NULL; + timebuffer = NULL; + sum = NULL; + has_bg = 0; + plane = 0; +} + +static void drawAppearing(VJFrame *src, VJFrame *dest) +{ + int i; + unsigned int Y; + uint8_t *p, *qy, *qu, *qv; + int32_t *s; + const int video_area = src->len; + + p = timebuffer + plane * video_area; + qy = bgimage[0]; + qu = bgimage[1]; + qv = bgimage[2]; + + uint8_t *lum = src->data[0]; + uint8_t *u0 = src->data[1]; + uint8_t *v0 = src->data[2]; + + uint8_t *Y1 = dest->data[0]; + uint8_t *U1 = dest->data[1]; + uint8_t *V1 = dest->data[2]; + + s = sum; + uint8_t a,b,c; + for(i=0; i>PLANES_DEPTH; + if(Y>255) Y = 255; + a = lum[i]; + b = u0[i]; + c = v0[i]; + a += (( qy[i] - a ) * Y )>>8; + Y1[i] = a; + b += (( qu[i] - b ) * Y )>>8; + U1[i] = b; + c += (( qv[i] - c ) * Y )>>8; + V1[i] = c; + p++; + s++; + } + plane++; + plane = plane & (PLANES-1); +} + + +static void drawDisappearing(VJFrame *src, VJFrame *dest) +{ + int i; + unsigned int Y; + uint8_t *p, *qu, *qv, *qy; + int32_t *s; + const int video_area = src->len; + + uint8_t *Y1 = dest->data[0]; + uint8_t *U1 = dest->data[1]; + uint8_t *V1 = dest->data[2]; + uint8_t *lum = src->data[0]; + uint8_t *u0 = src->data[1]; + uint8_t *v0 = src->data[2]; + + p = timebuffer + (plane * video_area); + qy = bgimage[0]; + qu= bgimage[1]; + qv= bgimage[2]; + s = sum; + + uint8_t a,b,c,A,B,C; + + for(i=0; i < video_area; i++) { + + Y = a = lum[i]; + b = u0[i]; + c = v0[i]; + + A = qy[i]; + B = qu[i]; + C = qv[i]; + + *s -= *p; + *s += Y; + *p = Y; + + Y = (abs(((int)Y<>PLANES_DEPTH; + if(Y>255) Y = 255; + + A += (( a - A ) * Y )>> 8; + Y1[i] = A; + B += (( b - B ) * Y ) >> 8; + U1[i] = B; + C += (( c - C ) * Y ) >> 8; + V1[i] = C; + + p++; + s++; + } + + plane++; + plane = plane & (PLANES-1); +} + +void chameleon_apply( VJFrame *frame, int width, int height, int mode, int refresh_bg) +{ + unsigned int i; + const int len = (width * height); + VJFrame source; + veejay_memcpy( tmpimage[0], frame->data[0], len ); + veejay_memcpy( tmpimage[1], frame->data[1], len ); + veejay_memcpy( tmpimage[2], frame->data[2], len ); + veejay_memcpy( &source, frame, sizeof(VJFrame)); + source.data[0] = tmpimage[0]; + source.data[1] = tmpimage[1]; + source.data[2] = tmpimage[2]; + + int interpolate = 0; + uint32_t activity = 0; + int auto_switch = 0; + int tmp1,tmp2; + if( motionmap_active() ) + { + motionmap_scale_to( 32,32,1,1, &tmp1,&tmp2, &n__, &N__ ); + auto_switch = 1; + activity = motionmap_activity(); + } + else + { + N__ = 0; + n__ = 0; + } + + if( n__ == N__ || n__ == 0 ) + auto_switch = 0; + + + if( refresh_bg != refresh_bg_ ) + { + veejay_memcpy( bgimage[0], frame->data[0], len ); + veejay_memcpy( bgimage[1], frame->data[1], len ); + veejay_memcpy( bgimage[2], frame->data[2], len ); + refresh_bg_ = refresh_bg; + } + + if(auto_switch) + { + if( activity <= 40 ) + { + // into the wall + drawDisappearing( &source, frame ); + } + else + { + // out of the wall + drawAppearing( &source, frame ); + } + } + + if( mode == 0 ) + drawDisappearing( &source, frame ); + else + drawAppearing( &source, frame ); + + +} diff --git a/veejay-server/libvje/effects/chameleon.h b/veejay-server/libvje/effects/chameleon.h new file mode 100644 index 00000000..438346ad --- /dev/null +++ b/veejay-server/libvje/effects/chameleon.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CHAMELEON_H +#define CHAMELEON_H +#include +#include +#include + +vj_effect *chameleon_init(int w, int h); +void chameleon_apply( VJFrame *frame, int width, int height, int mode, int refresh); +int chameleon_malloc(int w, int h ); +void chameleon_free(); +#endif diff --git a/veejay-server/libvje/effects/chameleonblend.c b/veejay-server/libvje/effects/chameleonblend.c new file mode 100644 index 00000000..f6913a9b --- /dev/null +++ b/veejay-server/libvje/effects/chameleonblend.c @@ -0,0 +1,270 @@ +/* + * Linux VeeJay + * EffecTV - Realtime Digital Video Effector + * Copyright (C) 2001-2006 FUKUCHI Kentaro + * + * ChameleonTV - Vanishing into the wall!! + * Copyright (C) 2003 FUKUCHI Kentaro + * + * Ported to veejay by Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "chameleon.h" +#include "common.h" + +vj_effect *chameleonblend_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->defaults[0] = 0; + ve->defaults[1] = 0; + ve->description = "Chameleon BlendTV"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +static int refresh_bg_ = -1; +static int last_mode_ = -1; +static int N__ = 0; +static int n__ = 0; + +static int has_bg = 0; +static int32_t *sum = NULL; +static uint8_t *timebuffer = NULL; +static uint8_t *tmpimage[3] = { NULL,NULL,NULL}; +static int plane = 0; +static uint8_t *bgimage[3] = { NULL,NULL,NULL}; + +#define PLANES_DEPTH 6 +#define PLANES (1<< PLANES_DEPTH) + +int chameleonblend_malloc(int w, int h) +{ + if( bgimage[0] ) + free(bgimage[0]); + bgimage[0] = (uint8_t*)vj_yuvalloc(w,h); + if(!bgimage[0]) + return 0; + bgimage[1] = bgimage[0] + (w*h); + bgimage[2] = bgimage[1] + (w*h); + if(tmpimage[0]) + free(tmpimage[0]); + tmpimage[0] = (uint8_t*)vj_yuvalloc(w,h); + if(!tmpimage[0]) + return 0; + tmpimage[1] = tmpimage[0] + (w*h); + tmpimage[2] = tmpimage[1] + (w*h); + + if( sum ) + free(sum); + sum = (int32_t*) vj_calloc( w * h * sizeof(int32_t)); + if( timebuffer ) + free(timebuffer); + timebuffer = (uint8_t*) vj_calloc( w* h * PLANES ); + + has_bg = 0; + plane = 0; + N__ = 0; + n__ = 0; + last_mode_ = -1; + refresh_bg_ = -1; + + return 1; +} + +void chameleonblend_free() +{ + if( bgimage[0]) free(bgimage[0]); + if( tmpimage[0]) free(tmpimage[0]); + if( timebuffer ) free(timebuffer); + if( sum ) free(sum); + bgimage[0] = NULL; + tmpimage[0] = NULL; + timebuffer = NULL; + sum = NULL; + has_bg = 0; + plane = 0; +} + +static void drawAppearing(VJFrame *src, VJFrame *dest) +{ + int i; + unsigned int Y; + uint8_t *p, *qy, *qu, *qv; + int32_t *s; + const int video_area = src->len; + + p = timebuffer + plane * video_area; + qy = bgimage[0]; + qu = bgimage[1]; + qv = bgimage[2]; + + uint8_t *lum = src->data[0]; + uint8_t *u0 = src->data[1]; + uint8_t *v0 = src->data[2]; + + uint8_t *Y1 = dest->data[0]; + uint8_t *U1 = dest->data[1]; + uint8_t *V1 = dest->data[2]; + + s = sum; + uint8_t a,b,c; + for(i=0; i>PLANES_DEPTH; + if(Y>255) Y = 255; + a = lum[i]; + b = u0[i]; + c = v0[i]; + a += (( qy[i] - a ) * Y )>>8; + Y1[i] = a; + b += (( qu[i] - b ) * Y )>>8; + U1[i] = b; + c += (( qv[i] - c ) * Y )>>8; + V1[i] = c; + p++; + s++; + } + plane++; + plane = plane & (PLANES-1); +} + + +static void drawDisappearing(VJFrame *src, VJFrame *dest) +{ + int i; + unsigned int Y; + uint8_t *p, *qu, *qv, *qy; + int32_t *s; + const int video_area = src->len; + + uint8_t *Y1 = dest->data[0]; + uint8_t *U1 = dest->data[1]; + uint8_t *V1 = dest->data[2]; + uint8_t *lum = src->data[0]; + uint8_t *u0 = src->data[1]; + uint8_t *v0 = src->data[2]; + + p = timebuffer + (plane * video_area); + qy = bgimage[0]; + qu= bgimage[1]; + qv= bgimage[2]; + s = sum; + + uint8_t a,b,c,A,B,C; + + for(i=0; i < video_area; i++) { + + Y = a = lum[i]; + b = u0[i]; + c = v0[i]; + + A = qy[i]; + B = qu[i]; + C = qv[i]; + + *s -= *p; + *s += Y; + *p = Y; + + Y = (abs(((int)Y<>PLANES_DEPTH; + if(Y>255) Y = 255; + + A += (( a - A ) * Y )>> 8; + Y1[i] = A; + B += (( b - B ) * Y ) >> 8; + U1[i] = B; + C += (( c - C ) * Y ) >> 8; + V1[i] = C; + + p++; + s++; + } + + plane++; + plane = plane & (PLANES-1); +} + +void chameleonblend_apply( VJFrame *frame, VJFrame *source, int width, int height, int mode, int refresh_bg) +{ + unsigned int i; + const int len = (width * height); + int interpolate = 0; + uint32_t activity = 0; + int auto_switch = 0; + int tmp1,tmp2; + + if( motionmap_active() ) + { + motionmap_scale_to( 32,32,1,1, &tmp1,&tmp2, &n__, &N__ ); + auto_switch = 1; + activity = motionmap_activity(); + } + else + { + N__ = 0; + n__ = 0; + } + + if( n__ == N__ || n__ == 0 ) + auto_switch = 0; + + + if( refresh_bg != refresh_bg_ ) + { + veejay_memcpy( bgimage[0], frame->data[0], len ); + veejay_memcpy( bgimage[1], frame->data[1], len ); + veejay_memcpy( bgimage[2], frame->data[2], len ); + refresh_bg_ = refresh_bg; + } + + if(auto_switch) + { + if( activity <= 40 ) + { + // into the wall + drawDisappearing( source, frame ); + } + else + { + // out of the wall + drawAppearing( source, frame ); + } + } + + if( mode == 0 ) + drawDisappearing( source, frame ); + else + drawAppearing( source, frame ); + + +} diff --git a/veejay-server/libvje/effects/chameleonblend.h b/veejay-server/libvje/effects/chameleonblend.h new file mode 100644 index 00000000..ab26ec3a --- /dev/null +++ b/veejay-server/libvje/effects/chameleonblend.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CHAMELEONBLEND_H +#define CHAMELEONBLEND_H +#include +#include +#include + +vj_effect *chameleonblend_init(int w, int h); +void chameleonblend_apply( VJFrame *frame, VJFrame *source, int width, int height, int mode, int refresh); +int chameleonblend_malloc(int w, int h ); +void chameleonblend_free(); +#endif diff --git a/veejay-server/libvje/effects/checker.c b/veejay-server/libvje/effects/checker.c new file mode 100644 index 00000000..6f04a122 --- /dev/null +++ b/veejay-server/libvje/effects/checker.c @@ -0,0 +1,246 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + + */ +#include +#include +#include +#include +#include "motionmap.h" +#include "common.h" +#include "softblur.h" +#include "opacity.h" + +#define HIS_DEFAULT 2 +#define HIS_LEN (8*25) +#define ACT_TOP 4000 +#define MAXCAPBUF 55 + +typedef struct { + int p; + int t; +} boxes_t; + +vj_effect *motionmap_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; // motionmap + ve->limits[1][0] = 255; + ve->limits[0][1] = 50; // reverse + ve->limits[1][1] = 10000; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + ve->limits[0][4] = 0; // buffer + ve->limits[1][4] = 255; + ve->limits[0][3] = HIS_DEFAULT; + ve->limits[1][3] = HIS_LEN; + ve->defaults[0] = 40; + ve->defaults[1] = ACT_TOP; + ve->defaults[2] = 1; + ve->defaults[3] = HIS_DEFAULT; + ve->defaults[4] = 0; + ve->description = "Motion Mapping"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + ve->n_out = 2; + return ve; +} + +static uint8_t *binary_img = NULL; +static uint8_t *original_img = NULL; +static uint8_t *previous_img = NULL; +static uint8_t *large_buf = NULL; +static uint32_t key1_ = 0, key2_ = 0, keyv_ = 0, keyp_ = 0; +static int have_bg = 0; +static int running = 0; +static boxes_t *boxes = NULL; + +#define RUP8(num)(((num)+8)&~8) + +int motionmap_malloc(int w, int h ) +{ + binary_img = (uint8_t*) vj_malloc(sizeof(uint8_t) * RUP8(w * h * 3) ); + original_img = binary_img + RUP8(w*h); + previous_img = original_img + RUP8(w*h); + large_buf = vj_malloc(sizeof(uint8_t) * RUP8(w*h*3) * (MAXCAPBUF+1)); + if(!large_buf) + { + veejay_msg(0, "Memory allocation error for Motion Mapping. Too large: %ld bytes",(long) ((RUP8(w*h*3)*(MAXCAPBUF+1)))); + return 0; + } + nframe_ = 0; + boxes = (boxes_t*) vj_malloc(sizeof(boxes_t) * 64 * 64 ); + int i ; + for ( i = 0;i < 64*64; i ++ ) { + boxes[i].p = 0; + boxes[i].t = 0; + } + return 1; +} + +void motionmap_free(void) +{ + if(binary_img) + free(binary_img); + if(large_buf) + free(large_buf); + have_bg = 0; + nframe_ = 0; + running = 0; + binary_img = NULL; +} + +#ifndef MIN +#define MIN(a,b) ( (a)>(b) ? (b) : (a) ) +#endif +#ifndef MAX +#define MAX(a,b) ( (a)>(b) ? (a) : (b) ) +#endif + +static void update_bgmask( uint8_t *dst,uint8_t *in, uint8_t *src, int len, int threshold ) +{ + int i; + unsigned int op0,op1; + for( i =0; i < len ; i ++ ) + { + if( abs(in[i] - src[i]) > threshold ) + { + dst[i] = 1; + in[i] = (in[i] + src[i])>>1; + } + else + { + dst[i] = 0; + } + } +} + + +static void put_photo( uint8_t *dst_plane, uint8_t *src_plane, int dst_w, int dst_h, int index , matrix_t matrix, + int box_w, int box_h) +{ + int x,y; + uint8_t *P = dst_plane + (matrix.h*dst_w); + uint8_t *Q = src_plane + (matrix.h*dst_w); + int offset = matrix.w; + + for( y = 0; y < box_h; y ++ ) + { + for( x = 0; x < box_w; x ++ ) + { + *(P+offset+x) = *(Q+offset+x); + } + P += dst_w; + Q += dst_w; + } +} + +void motionmap_apply( VJFrame *frame, int width, int height, int threshold, int param1, int param2, int history, int capbuf ) +{ + unsigned int i,x,y; + int len = (width * height); + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + int w = frame->width; + int h = frame->height; + + veejay_memcpy( original_img, frame->data[0], len ); + +// softblur_apply( frame, width,height,0 ); + if(!have_bg) + { + veejay_memcpy( previous_img, frame->data[0], len ); + have_bg = 1; + nframe_ = 0; + running = 0; + return; + } + else + { + update_bgmask( binary_img, previous_img, frame->data[0], len , threshold); + } + + int x,y,dx,dy; + int sum; + int dst_x, dst_y; + int step_y; + int step_x; + int box_width = photo_list[index]->w; + int box_height = photo_list[index]->h; + int it = 0; + uint8_t *plane = binary_img; + + matrix_f matrix_placement = get_matrix_func(mode); + + + step_x = w / box_width; + step_y = h / box_height; + + for( y = 0 ; y < h ; y += step_y ) + { + for( x = 0; x < w ; x+= step_x ) + { + sum = 0; + for( dy = 0; dy < step_y; dy ++ ) + { + for( dx = 0; dx < step_x; dx++) + { + sum += plane[ ((y+dy)*w+(dx+x)) ]; + } + } + } + + boxes[ it ].p = sum; + it ++; + sum = 0; + } + + + for( y = 0 ; y < it ; y ++ ) + { + if(boxes[it].p > param1) //@ sufficient motion + { + if( boxes[it].t < 5 ) //@ update timer + boxes[it].t = param2; //@ Time stop + + } + if( boxes[it].t > 0 ) + boxes[it].t --; + if( boxes[it].t == 0 ) { + boxes[it].p = 0; + } + } + for ( i = 0; i < num_photos; i ++ ) + { + matrix_t m = matrix_placement(i, size,width,height ); + put_photo( dstY, photo_list[i]->data[0],width,height,i, m); + put_photo( dstU, photo_list[i]->data[1],width,height,i, m); + put_photo( dstV, photo_list[i]->data[2],width,height,i, m); + } + + + +} diff --git a/veejay-server/libvje/effects/chromamagick.c b/veejay-server/libvje/effects/chromamagick.c new file mode 100644 index 00000000..bd28a451 --- /dev/null +++ b/veejay-server/libvje/effects/chromamagick.c @@ -0,0 +1,1052 @@ +/* + * VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + + +/* Note that the 'opacity' parameter is sometimes used as a + threshold value or substraction value depending on the mode + of this effect */ + +#include +#include +#include "chromamagick.h" +#include +#include "common.h" +// fixme: mode 8 and 9 corrupt (green/purple cbcr) + +vj_effect *chromamagick_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 7; + ve->defaults[1] = 150; + ve->description = "Chroma Magic"; + ve->limits[0][0] = 0; + ve->limits[1][0] = 25; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->has_user = 0; + return ve; +} + +void chromamagic_selectmin(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a, b; + const int op_b = 255 - op_a; + for (i = 0; i < len; i++) { + a = (Y[i] * op_a) >> 8; + b = (Y2[i] * op_b) >> 8; + if (b < a) { + Y[i] = b; + Cb[i] = Cb2[i]; + Cr[i] = Cr2[i]; + } + } +} + +void chromamagic_addsubselectlum(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a) +{ + unsigned int i; + int c, a, b; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + const int op_b = 255 - op_a; + for (i = 0; i < len; i++) { + a = (Y[i] * op_a) >> 8; + b = (Y2[i] * op_b) >> 8; + if (b < a) { + c = (a + b) >> 1; + Y[i] = c; + + a = Cb[i]; + b = Cb2[i]; + c = (a + b) >> 1; + Cb[i] = c; + + a = Cr[i]; + b = Cr2[i]; + c = (a + b) >> 1; + Cr[i] = c; + } + } +} + + +void chromamagic_selectmax(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a, b; + const int op_b = 255 - op_a; + for (i = 0; i < len; i++) { + a = (Y[i] * op_a) >> 8; + b = (Y2[i] * op_b) >> 8; + if (b > a) { + Y[i] = (3 * b + a)>>2; + Cb[i] = Cb2[i]; + Cr[i] = Cr2[i]; + } + } +} +void chromamagic_selectdiff(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a, b; + int op_b = 255 - op_a; + for (i = 0; i < len; i++) { + a = (Y[i] * op_a) >> 8; + b = (Y2[i] * op_b) >> 8; + if (a > b) { + Y[i] = abs(Y[i] - Y2[i]); + Cb[i] = (Cb[i] + Cb2[i]) >> 1; + Cr[i] = (Cr[i] + Cr2[i]) >> 1; + } + } +} + +void chromamagic_diffreplace(VJFrame *frame, VJFrame *frame2, int width, int height, int threshold) +{ + /* op_a = threshold */ + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + unsigned int i ; + int op_b ; + int op_a ; + int a,b; + unsigned long sum = 0; + for(i=0; i < len; i++) + { + sum += Y[i]; + } + op_b = (sum & 0xff); + op_a = 255 - op_b; + for(i=0; i < len; i++) + { + if( abs(Y[i] - Y2[i]) >= threshold ) + { + a = ( Y[i] * op_a ); + b = ( Y2[i] * op_b ); + Y[i] = (a + b) >> 8; + a = ( Cb[i] * op_a ); + b = ( Cb2[i] * op_b ); + + Cb[i] = (a + b) >> 8; + a = ( Cr[i] * op_a ); + b = ( Cr2[i] * op_b ); + + Cr[i] = (a + b) >> 8; + } + } +} + +void chromamagic_selectdiffneg(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a, b,c; + const int op_b = 255 - op_a; + for (i = 0; i < len; i++) { + a = (Y[i] * op_a) >> 8; + b = (Y2[i] * op_b) >> 8; + if (a > b) { + Y[i] = 255 - abs(255 - a - b); + Cb[i] = ((Cb[i] * op_a) + (Cb2[i]*op_b) )>>8; + Cr[i] = ((Cr[i] * op_a) + (Cr2[i]*op_b) )>>8; + } + } +} + +void chromamagic_selectunfreeze(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int c, a, b; + const int op_b = 255 - op_a; + for (i = 0; i < len; i++) { + a = (Y[i] * op_a) >> 8; + b = (Y2[i] * op_b) >> 8; + if (a > b) { + if (a < pixel_Y_lo_) + c = pixel_Y_lo_; + else + c = 255 - ((256 - b) * (256 - b)) / a; + if (c < pixel_Y_lo_) + c = pixel_Y_lo_; + Y[i] = c; + Cb[i] = (Cb[i] + Cb2[i]) >> 1; + Cr[i] = (Cr[i] + Cr2[i]) >> 1; + } + } +} + +void chromamagic_addlum(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int c, a, b; + const int op_b = 255 - op_a; + + for (i = 0; i < len; i++) { + a = (Y[i] * op_a) >> 8; + b = (Y2[i] * op_b) >> 8; + Y[i] = (a * a) / (256- b); + Cb[i] = (Cb[i] + Cb2[i]) >> 1; + Cr[i] = (Cr[i] + Cr2[i]) >> 1; + } +} + +void chromamagic_exclusive(VJFrame *frame, VJFrame *frame2, int width, int height, int op_a) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a=0, b=0, c=0; + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - a; + + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + + a *= o1; + b *= o2; + a = a >> 8; + b = b >> 8; + + Y[i] = (a+b) - ((a * b) >> 8); + + a = Cb[i]-128; + b = Cb2[i]-128; + c = (a + b) - (( a * b) >> 8); + c += 128; + Cb[i] = CLAMP_UV(c); + + + a = Cr[i]-128; + b = Cr2[i]-128; + c = (a + b) - ((a*b) >> 8); + c += 128; + Cr[i] = CLAMP_UV(c); + } +} + +void chromamagic_diffnegate(VJFrame *frame, VJFrame *frame2, int width, int height, int op_a) { + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c,d; + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - o1; +#define MAGIC_THRESHOLD 40 + for(i=0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + d = abs( a - b ); + if ( d > MAGIC_THRESHOLD ) + { + a = Y[i] * o1; + b = Cb2[i] * o2; + Y[i] = 255 - ( (a + b) >>8 ); + + a = (Cb[i]-128) * o1; + b = (Cb2[i]-128) * o2; + Cb[i] = 255 - ( 128 + (( a + b ) >> 8 )); + + + a = (Cr[i]-128) * o1; + b = (Cr2[i]-128) * o2; + Cr[i] = 255 - ( 128 + (( a + b ) >> 8 )); + + } + } +} + +void chromamagic_additive(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a) { + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + for(i=0; i < len; i++) { + a = (Y[i]*o1) >> 7; + b = (Y2[i]*o2) >> 7; + Y[i] = a + (( 2 * b ) - 255); + + a = Cb[i]; + b = Cb2[i]; + + Cb[i] = a + ( ( 2 * b ) - 255 ); + + a = Cr[i] ; + b = Cr2[i] ; + + Cr[i] = a + ( ( 2 * b ) - 255 ); + } + +} + +void chromamagic_basecolor(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a, b, c, d; + const unsigned int o1 = op_a; + for (i = 0; i < len; i++) { + a = o1 - Y[i]; + b = o1 - Y2[i]; + c = a * b >> 8; + Y[i] = c + a * ((255 - (((255 - a) * (255 - b)) >> 8) - c) >> 8); //8 + + + a = Cb[i]-128; + b = Cb2[i]-128; + c = a * b >> 8; + d = c + a * ((255 - (((255-a) * (255-b)) >> 8) -c) >> 8); + d += 128; + Cb[i] = CLAMP_UV(d); + + a = Cr[i]-128; + b = Cr2[i]-128; + c = a * b >> 8; + d = c + a * ((255 - (((255-a) * (255-b)) >> 8) -c ) >> 8); + d += 128; + Cr[i] = CLAMP_UV(d); + + } +} + + +void chromamagic_freeze(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) { + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + unsigned int i; + + int a,b,c; + + if(op_a==0) op_a = 255; + + for(i=0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if ( a < pixel_Y_lo_ ) a = pixel_Y_lo_; + if ( b < pixel_Y_lo_ ) b = pixel_Y_lo_; + c = 255 - ((op_a -a ) * (op_a - a)) / b; + + Y[i] = CLAMP_Y(c); + + a = Cb[i]; + b = Cb2[i]; + if ( a < pixel_U_lo_ ) a = pixel_U_lo_; + if ( b < pixel_U_lo_ ) b = pixel_U_lo_; + if(b) + c = 255 - ((256-a) * (256 - a)) / b; + else + c = 255 - a; + Cb[i] = CLAMP_UV(c); + + a = Cr[i]; + b = Cr2[i]; + if ( a < pixel_U_lo_ ) a = pixel_U_lo_; + if ( b < pixel_U_lo_ ) b = pixel_U_lo_; + + if(b) + c = 255 - (( 256 - a ) * ( 256 - a )) / b; + else + c= 255 -a; + Cr[i] = CLAMP_UV(c); + } + +} + +void chromamagic_unfreeze( VJFrame *frame, VJFrame *frame2, int w, int h, int op_a ) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + + for(i=0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if ( a < pixel_Y_lo_ ) a = pixel_Y_lo_; + if ( b < pixel_Y_lo_ ) b = pixel_Y_lo_; + Y[i] = 255 - (( op_a - b) * (op_a - b)) / a; + + a = Cb[i]; + b = Cb2[i]; + if ( a < pixel_U_lo_ ) a = pixel_U_lo_; + if ( b < pixel_U_lo_ ) b = pixel_U_lo_; + Cb[i] = 255 - (( 256 - b) * ( 256 - b )) / a; + + a = Cr[i]; + b = Cr2[i]; + if ( a < pixel_U_lo_ ) a = pixel_U_lo_; + if ( b < pixel_U_lo_ ) b = pixel_U_lo_; + Cr[i] = 255 - ((256 -b ) * (256 - b)) /a ; + } +} + + +void chromamagic_hardlight( VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + + for(i=0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if ( b < 128 ) { + c = ( a * b ) >> 8; + } + else { + c = 255 - (( op_a - b) * ( op_a - a ) >> 8); + } + Y[i] =CLAMP_Y( c); + + a = Cb[i]-128; + b = Cb2[i]-128; + if ( b < 128 ) c = ( a * b ) >> 8; + else c = 255 - (( 256 - b) * ( 256 - a) >> 8); + c += 128; + Cb[i] = CLAMP_UV(c); + + a = Cr[i]-128; + b = Cr2[i]-128; + if ( b < 128) c = ( a * b ) >> 8; + else c = 255 - (( 256 - b) * ( 256 - a) >> 8 ); + c += 128; + Cr[i] = CLAMP_UV(c); + + } +} + + +void chromamagic_multiply( VJFrame *frame, VJFrame *frame2, int w, int h,int op_a ) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + for( i=0; i < len; i++) { + a = (Y[i] * o1) >> 8; + b = (Y2[i] * o2) >> 8; + Y[i] = (a * b) >> 8; + + a = Cb[i]-128; + b = Cb2[i]-128; + c = ( a * b ) >> 8; + c += 128; + Cb[i] = CLAMP_UV(c); + + a = Cr[i] - 128; + b = Cr2[i] - 128; + c = ( a * b ) >> 8; + c += 128; + Cr[i] = CLAMP_UV(c); + + } +} + + +void chromamagic_divide(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a ) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + const unsigned int o1 = op_a; + + for(i=0; i < len; i++) { + a = Y[i] * Y[i]; + b = o1 - Y2[i]; + if ( b < pixel_Y_lo_ ) b = pixel_Y_lo_; + Y[i] = a / b; + + + a = Cb[i] * Cb2[i]; + b = 255 - Cb2[i]; + if ( b < pixel_U_lo_ ) b = pixel_U_lo_; + Cb[i] = a / b; + + a = Cr[i] * Cr[i];; + b = 255 - Cr2[i]; + if ( b < pixel_U_lo_ ) b = pixel_U_lo_; + Cr[i] = ( a / b ); + } +} + +void chromamagic_substract(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a ,b; + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + + for( i=0; i < len; i++ ) + { + a = Y[i]; + b = Y2[i]; + + Y[i] = a - ((b * o1) >> 8); + + a = Cb[i]; + b = Cb2[i]; + Cb[i] = (((a * o2) + (b * o1))>>8); + + a = Cr[i]; + b = Cr2[i]; + Cr[i] = (((a * o2) + (b * o1)) >> 8); + } + +} + + +void chromamagic_add(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a) { + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + for(i=0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + Y[i] = a + (( 2 * b ) - op_a); + + a = Cb[i]-128; + b = Cb2[i]-128; + c = a + ( 2 * b ); + c += 128; + Cb[i] = CLAMP_UV(c); + + a = Cr[i]-128; + b = Cr2[i]-128; + c = a + ( 2 * b ); + c += 128; + Cr[i] = CLAMP_UV(c); + } +} + +void chromamagic_screen(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + for(i=0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + Y[i] = 255 - ( (op_a-a) * (op_a-b) >> 8); + a = Cb[i]-128; + b = Cb2[i]-128; + c = 255 - ( ( 256-a) * (256 - b) >> 8); + c += 128; + Cb[i] = CLAMP_UV(c); + a = Cr[i]-128; + b = Cr2[i]-128; + c = 255 - ( ( 256 -a) * (256 - b)>>8); + c += 128; + Cr[i] = CLAMP_UV(c); + } +} + +void chromamagic_difference(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + int a,b,c; + for(i=0; i < len; i++) { + a = (Y[i] * o1)>>7; + b = (Y2[i] * o2)>>7; + Y[i] = abs ( a - b ); + + a = (Cb[i]-128); + b = (Cb2[i]-128); + c = abs ( a - b ); + c += 128; + Cb[i] = CLAMP_UV(c); + + a = (Cr[i]-128); + b = (Cr2[i]-128); + c = abs( a - b ); + c += 128; + Cr[i] = CLAMP_UV(c); + } +} + +/* not really softlight but still cool */ +void chromamagic_softlightmode(VJFrame *frame,VJFrame *frame2, + int width,int height, int op_a) { + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c,d; + for(i=0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if ( a < op_a ) { + c = (a * b) >> 8; + Y[i] = (c + a * ( 255 - ( (255-a)*(255-b) >> 8) - c)) >> 8; + + a = abs(Cb[i]-128); + b = abs(Cb2[i]-128); + c = (a * b); + d = (c + a * ( 255 - ( (a * b) >> 7) - c)) >> 7; + d += 128; + Cb[i] = CLAMP_UV(d); + + a = abs(Cr[i]-128); + b = abs(Cr2[i]-128); + c = (a * b) >> 7; + d = (c + a * ( 255 - ( (a * b) >> 7) -c)) >> 7; + d += 128; + Cr[i] = CLAMP_UV(d); + } + } +} + +void chromamagic_dodge(VJFrame *frame, VJFrame *frame2, int w, int h, + int op_a) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + for(i=0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if( a >= op_a) c = a; + else { + if( b > pixel_Y_hi_ ) b = pixel_Y_hi_ - 5; + if( a < pixel_Y_lo_) a = pixel_Y_lo_; + Y[i] = (a << 8) / ( 256 - b ); + + a = Cb[i] - 128; + b = Cb2[i] - 128; + if ( b > 127 ) b = 127; + c = ( a << 7 ) / ( 128 - b ); + c += 128; + Cb[i] = CLAMP_UV(c); + + a = Cr[i] - 128; + b = Cr2[i] - 128; + if ( b > 127 ) b = 127; + c = ( a << 7 ) / ( 128 - b); + c += 128; + Cr[i] = CLAMP_UV(c); + } + } +} + + +void chromamagic_darken(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +{ + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + + for(i=0; i < len; i++) + { + if(Y[i] > Y2[i]) + { + Y[i] = ((Y[i] * o1) + (Y2[i] * o2)) >> 8; + Cb[i] = ((Cb[i] * o1) + (Cb2[i] * o2)) >> 8; + Cr[i] = ((Cr[i] * o1) + (Cr2[i] * o2)) >> 8; + } + } +} + +void chromamagic_lighten(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +{ + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + + for(i=0; i < len; i++) + { + if(Y[i] < Y2[i]) + { + Y[i] = ((Y[i] * o1) + (Y2[i] * o2)) >> 8; + Cb[i] = ((Cb[i] * o1) + (Cb2[i] * o2)) >> 8; + Cr[i] = ((Cr[i] * o1) + (Cr2[i] * o2)) >> 8; + } + } +} + + +void chromamagic_reflect(VJFrame *frame, VJFrame *frame2, + int width,int height, int op_a) { + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b,c; + + for(i=0; i < len ; i++) { + a = Y[i]; + b = Y2[i]; + + if ( b > op_a ) c = b; + else { + if ( b > pixel_Y_hi_ ) b = pixel_Y_hi_ -5; + if ( a < pixel_Y_lo_ ) a = pixel_Y_lo_; + Y[i] = (a * a) / ( 256 - b ); + + a = Cb[i]; + b = Cb2[i]; + if ( a < pixel_U_lo_) a = pixel_U_lo_; + if ( b < pixel_U_lo_ ) b = pixel_U_lo_; + a -= 128; + b -= 128; + if ( b == 128 ) b = 127; + c = ( a * a ) / ( 128 - b); + c += 128; + Cb[i] = CLAMP_UV(c); + + a = Cr[i]; + b = Cr2[i]; + if ( a < pixel_U_lo_ ) a = pixel_U_lo_; + if ( b < pixel_U_lo_ ) b = pixel_U_lo_; + a -= 128; + b -= 128; + if ( b == 128) b = 127; + c = ( a * a ) / ( 128 - b); + c += 128; + Cr[i] = CLAMP_UV(c); + + } + } +} + + +void chromamagic_modadd(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a, b; + const int op_b = 255 - op_a; + + for (i = 0; i < len; i++) + { + a = (Y[i] * op_a) >> 8; + b = (Y2[i] * op_b) >> 8; + Y[i] = (a + ( 2 * b - 128)) & 255; + + a = (Cb[i] * op_a) >> 8; + b = (Cb2[i] * op_b ) >> 8; + + Cb[i] = (a + ( 2 * b )) & 255; + + a = (Cr[i] * op_a ) >> 8; + b = (Cr2[i] * op_b ) >> 8; + + Cr[i] = (a + ( 2 * b ) ) & 255; + + } +} + + +void chromamagick_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int type, int op_a) +{ + + switch (type) { + case 0: + chromamagic_addsubselectlum(frame, frame2, width, height, op_a); + break; + case 1: + chromamagic_selectmin(frame, frame2, width, height, op_a); + break; + case 2: + chromamagic_selectmax(frame, frame2, width, height, op_a); + break; + case 3: + chromamagic_selectdiff(frame, frame2, width, height, op_a); + break; + case 4: + chromamagic_selectdiffneg(frame, frame2, width, height, op_a); + break; + case 5: + chromamagic_addlum(frame, frame2, width, height, op_a); + break; + case 6: + chromamagic_selectunfreeze(frame, frame2, width, height, op_a); + break; + case 7: + chromamagic_exclusive(frame,frame2,width,height,op_a); + break; + case 8: + chromamagic_diffnegate(frame,frame2,width,height,op_a); + break; + case 9: + chromamagic_additive( frame,frame2,width,height,op_a); + break; + case 10: + chromamagic_basecolor(frame,frame2,width,height,op_a); + break; + case 11: + chromamagic_freeze(frame,frame2,width,height,op_a); + break; + case 12: + chromamagic_unfreeze(frame,frame2,width,height,op_a); + break; + case 13: + chromamagic_hardlight(frame,frame2,width,height,op_a); + break; + case 14: + chromamagic_multiply(frame,frame2,width,height,op_a); + break; + case 15: + chromamagic_divide(frame,frame2,width,height,op_a); + break; + case 16: + chromamagic_substract(frame,frame2,width,height,op_a); + break; + case 17: + chromamagic_add(frame,frame2,width,height,op_a); + break; + case 18: + chromamagic_screen(frame,frame2,width,height,op_a); + break; + case 19: + chromamagic_difference(frame,frame2,width,height,op_a); + break; + case 20: + chromamagic_softlightmode(frame,frame2,width,height,op_a); + break; + case 21: + chromamagic_dodge(frame,frame2,width,height,op_a); + break; + case 22: + chromamagic_reflect(frame,frame2,width,height,op_a); + break; + case 23: + chromamagic_diffreplace(frame,frame2,width,height,op_a); + break; + case 24: + chromamagic_darken( frame,frame2,width,height,op_a); + break; + case 25: + chromamagic_lighten( frame,frame2,width,height,op_a); + break; + case 26: + chromamagic_modadd( frame,frame2,width,height,op_a); + break; + } +} + + diff --git a/veejay-server/libvje/effects/chromamagick.h b/veejay-server/libvje/effects/chromamagick.h new file mode 100644 index 00000000..650f1174 --- /dev/null +++ b/veejay-server/libvje/effects/chromamagick.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CHROMAMAGICK_H +#define CHROMAMAGICK_H +#include +#include +#include + +vj_effect *chromamagick_init(); +void chromamagick_apply(VJFrame *frame, VJFrame *frame2 , int width, + int height, int type, int op0); + +void chromamagick_free(); +#endif diff --git a/veejay-server/libvje/effects/chromapalette.c b/veejay-server/libvje/effects/chromapalette.c new file mode 100644 index 00000000..d75d1cfa --- /dev/null +++ b/veejay-server/libvje/effects/chromapalette.c @@ -0,0 +1,188 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "chromapalette.h" +#include "common.h" +#include + +vj_effect *chromapalette_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + //angle,r,g,b,cbc,crc + + ve->limits[0][0] = 1; + ve->limits[1][0] = 900; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 255; + + ve->limits[0][5] = 0; + ve->limits[1][5] = 255; + + ve->defaults[0] = 319;//angle + ve->defaults[1] = 255; //r + ve->defaults[2] = 0; //g + ve->defaults[3] = 0; //b + ve->defaults[4] = 200; //cb default + ve->defaults[5] = 20; //cr default + ve->description = "Chrominance Palette (rgb key) "; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_help = 1; + ve->has_user = 0; + ve->rgb_conv = 1; + return ve; +} + +void chromapalette_help() +{ +/* veejay_msg(1, "Chrominance Palette"); + veejay_msg(1, "Select a color and set a new chroma value for the entire selection"); + veejay_msg(1, "one or both of the parameters p4 and p5"); + veejay_msg(1, "p0 = Accept angle"); + veejay_msg(1, "p1 = Red"); + veejay_msg(1, "p2 = Green"); + veejay_msg(1, "p3 = Blue"); + veejay_msg(1, "p4 = New chroma Blue value"); + veejay_msg(1, "p5 = New chroma Red value"); +*/ +} + +static inline int _chroma_key( uint8_t fg_cb, uint8_t fg_cr, uint8_t cb, uint8_t cr, int angle) +{ + // see rgbkey.c + short xx = ((fg_cb * cb) + (fg_cr * cr)) >> 7; + short yy = ((fg_cr * cb) - (fg_cb * cr)) >> 7; + int val; + + if (xx < -128) { + xx = -128; + } + else + if (xx > 127) { + xx = 127; + } + + if (yy < -128) { + yy = -128; + } + else + if (yy > 127) { + yy = 127; + } + + val = (xx * angle) >> 4; + + if( abs(yy) < val ) return 1; + return 0; +} + + + +void chromapalette_apply(VJFrame *frame, int width, int height, int angle, int r, int g, int b, int color_cb, int color_cr ) +{ + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t U; + uint8_t V; + int y,u,v; + const float cb_mul = 0.492; + const float cr_mul = 0.877; + + _rgb2yuv( r,g,b,y,u,v ); + + const float aa = (const float) u; + const float bb = (const float) v; + + float tmp = sqrt(((aa * aa) + (bb * bb))); + const int colorKeycb = 127 * (aa / tmp); + const int colorKeycr = 127 * (bb / tmp); + float angle_f = (angle*0.1); + const int accept_angle = 0xf * tan(M_PI * angle_f / 180.0); + + /* + + chrominance is defined as the difference between a color and a reference value luminance + + U = blue - Y + V = red - Y + + this effect does (on key selection) + + U = color_cb - Y + V = color_cr - Y + + 4:2:0 is supersampled to 4:4:4 so there is a chroma value for every Y + + */ + + if(color_cb != 0 && color_cr != 0) //both cb and cr + { + for( i = 0 ; i < len ; i ++ ) + { + if( _chroma_key( Cb[i] , Cr[i], colorKeycb,colorKeycr, accept_angle)) + { + U = 128+(int)( (float) (color_cb - Y[i]) * cb_mul ); + Cb[i] = CLAMP_UV( U ); + V = 128+(int)( (float) (color_cr - Y[i]) * cr_mul ); + Cr[i] = CLAMP_UV( V ); + } + } + } + if(color_cr == 0 ) //only cr + { + for( i = 0 ; i < len ; i ++ ) + { + if( _chroma_key( Cb[i], Cr[i], colorKeycb, colorKeycr, accept_angle)) + { + V = 128+(int)( (float) (color_cr - Y[i]) * cr_mul ); + Cr[i] = CLAMP_UV( V ); + } + } + } + if(color_cb == 0 ) // only cb + { + for( i = 0 ; i < len ; i ++ ) + { + if( _chroma_key( Cb[i] , Cr[i], colorKeycb,colorKeycr, accept_angle)) + { + U = 128 + (int)( (float) (color_cb - Y[i]) * cb_mul ); + Cb[i] = CLAMP_UV(U); + } + } + } + + +} diff --git a/veejay-server/libvje/effects/chromapalette.h b/veejay-server/libvje/effects/chromapalette.h new file mode 100644 index 00000000..5c472726 --- /dev/null +++ b/veejay-server/libvje/effects/chromapalette.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CHROMAPAL_H +#define CHROMAPAL_H +#include +#include +#include +#include + +vj_effect *chromapalette_init(int w, int h); +void chromapalette_apply(VJFrame *frame, int width, int height, int a,int r,int g, int b,int c1,int c2); +#endif diff --git a/veejay-server/libvje/effects/chromascratcher.c b/veejay-server/libvje/effects/chromascratcher.c new file mode 100644 index 00000000..fb8502f9 --- /dev/null +++ b/veejay-server/libvje/effects/chromascratcher.c @@ -0,0 +1,208 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "common.h" +#include "chromascratcher.h" +#include "chromamagick.h" +static uint8_t *cframe[3]; +static int cnframe = 0; +static int cnreverse = 0; +static int chroma_restart = 0; + +static VJFrame *_tmp; + +vj_effect *chromascratcher_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 25; /* uses the chromamagick effect for scratchign */ + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 25; + ve->limits[0][3] = 0; + ve->limits[1][3] = 1; + + ve->defaults[0] = 1; + ve->defaults[1] = 150; + ve->defaults[2] = 8; + ve->defaults[3] = 1; + ve->description = "Matte Scratcher"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user =0; + + + return ve; +} +// FIXME private +int chromascratcher_malloc(int w, int h) +{ + cframe[0] = + (uint8_t *) vj_malloc(w * h * sizeof(uint8_t) * 25 * 3 ); + if(!cframe[0]) return 0; + _tmp = (VJFrame*) vj_calloc(sizeof(VJFrame)); + + cframe[1] = cframe[0] + ( w * h * 25 ); + cframe[2] = cframe[1] + ( w * h * 25 ); + + veejay_memset( cframe[0], 0, (w*h*25)); + veejay_memset( cframe[1], 128,(w*h*25)); + veejay_memset( cframe[2], 128,(w*h*25)); + + return 1; +} + +void chromascratcher_free() { + if(cframe[0]) + free(cframe[0]); + if(_tmp) free(_tmp); + cframe[0] = NULL; + cframe[1] = NULL; + cframe[2] = NULL; + _tmp = NULL; +} + +void chromastore_frame(uint8_t * yuv1[3], int w, int h, int n, + int no_reverse) +{ + if (cnreverse) + cnframe--; + else + cnframe++; + + + + if (cnframe >= n) { + if (no_reverse == 0) { + cnreverse = 1; + cnframe = n - 1; + } else { + cnframe = 0; + } + } + if (cnframe == 0) + cnreverse = 0; + + if (!cnreverse) { + veejay_memcpy(cframe[0] + (w * h * cnframe), yuv1[0], (w * h)); + veejay_memcpy(cframe[1] + (w * h * cnframe), yuv1[1], (w * h)); + veejay_memcpy(cframe[2] + (w * h * cnframe), yuv1[2], (w * h)); + } else { + veejay_memcpy(yuv1[0], cframe[0] + (w * h * cnframe), (w * h)); + veejay_memcpy(yuv1[1], cframe[1] + (w * h * cnframe), (w * h)); + veejay_memcpy(yuv1[2], cframe[2] + (w * h * cnframe), (w * h)); + } + +} + +void chromascratcher_apply(VJFrame *frame, + int width, int height, int mode, int opacity, + int n, int no_reverse) +{ + int i; + const int len = frame->len; + const unsigned int op_a = (opacity > 255) ? 255 : opacity; + const unsigned int op_b = 255 - op_a; + const int offset = len * cnframe; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + veejay_memcpy( _tmp, frame, (sizeof(VJFrame))); + _tmp->data[0] = cframe[0]; + _tmp->data[1] = cframe[1]; + _tmp->data[2] = cframe[2]; + + if(no_reverse != chroma_restart) + { + chroma_restart = no_reverse; + cnframe = n; + } + + if (cnframe == 0) + { + veejay_memcpy(cframe[0] + (len * cnframe), Y, len); + veejay_memcpy(cframe[1] + (len * cnframe), Cb, len); + veejay_memcpy(cframe[2] + (len * cnframe), Cr, len); + } + + if(mode>3) { + mode-=3; + chromamagick_apply( frame,_tmp,width, height,mode,opacity); + } + else { + + + switch (mode) { /* scratching with a sequence of frames (no scene changes) */ + + + case 0: + /* moving parts will dissapear over time */ + for (i = 0; i < len; i++) { + if (cframe[0][offset + i] < Y[i]) { + Y[i] = cframe[0][offset + i]; + Cb[i] = cframe[1][offset + i]; + Cr[i] = cframe[2][offset + i]; + } + } + break; + case 1: + for (i = 0; i < len; i++) { + /* moving parts will remain visible */ + if (cframe[0][offset + i] > Y[i]) { + Y[i] = cframe[0][offset + i]; + Cb[i] = cframe[1][offset + i]; + Cr[i] = cframe[2][offset + i]; + } + } + break; + case 2: + for (i = 0; i < len; i++) { + if ((cframe[0][offset + i] * op_a) < (Y[i] * op_b)) { + Y[i] = cframe[0][offset + i]; + Cb[i] = cframe[1][offset + i]; + Cr[i] = cframe[2][offset + i]; + } + } + break; + case 3: + for (i = 0; i < len; i++) { + /* moving parts will remain visible */ + if ((cframe[0][offset + i] * op_a) > (Y[i] * op_b)) { + Y[i] = cframe[0][offset + i]; + Cb[i] = cframe[1][offset + i]; + Cr[i] = cframe[2][offset + i]; + } + } + break; + + } + + } // else + + + chromastore_frame(frame->data, width, height, n, no_reverse); +} diff --git a/veejay-server/libvje/effects/chromascratcher.h b/veejay-server/libvje/effects/chromascratcher.h new file mode 100644 index 00000000..ef3143c8 --- /dev/null +++ b/veejay-server/libvje/effects/chromascratcher.h @@ -0,0 +1,34 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CHROMASCRATCHER_H +#define CHROMASCRATCHER_H +#include +#include +#include +#include + +vj_effect *chromascratcher_init(int w, int h); +int chromascratcher_malloc(int w, int h); +void chromascratcher_free(); +void chromascratcher_apply(VJFrame *frame, + int width, int height, int mode, int opacity, + int nframes, int no_reverse); +#endif diff --git a/veejay-server/libvje/effects/chromium.c b/veejay-server/libvje/effects/chromium.c new file mode 100644 index 00000000..104d3fc4 --- /dev/null +++ b/veejay-server/libvje/effects/chromium.c @@ -0,0 +1,97 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "chromium.h" +#include "common.h" + + +vj_effect *chromium_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 3; + ve->defaults[0] = 0; + ve->description = "Chromium"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void chromium_apply(VJFrame *frame, int width, int height, int m ) +{ + const int len = frame->uv_len; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + unsigned int i; + double tmp; + switch(m) + { + case 0: + for( i = 0; i < len ; i++) + { + Cb[i] = 0xff - Cb[i]; + } + break; + case 1: + for( i = 0; i < len ; i++ ) + { + Cr[i] = 0xff - Cr[i]; + } + break; + case 2: + for( i = 0; i < len; i++) + { + Cb[i] = 0xff - Cb[i]; + Cr[i] = 0xff - Cr[i]; + } + break; + case 3: + // swap cb/cr + for (i = 0; i < len ; i ++ ) + { + tmp = Cb[i]; + Cb[i] = Cr[i]; + Cr[i] = tmp; + } + break; +/* + case 4: + // U - blue - Y , V = Red - Y + // U = 0.492 * ( B - Y ) + for( i = 0; i < len; i++) + { + tmp = 0.492 * (VJ_EFFECT_CB_YELLOW - yuv[0][i * 2]); + t = 128 + (uint8_t) tmp; + Cb[i] = t; + } + break; +*/ + } + +} diff --git a/veejay-server/libvje/effects/chromium.h b/veejay-server/libvje/effects/chromium.h new file mode 100644 index 00000000..e2be719f --- /dev/null +++ b/veejay-server/libvje/effects/chromium.h @@ -0,0 +1,29 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CHROMIUM_H +#define CHROMIUM_H +#include +#include +#include + +vj_effect *chromium_init(int w, int h); +void chromium_apply(VJFrame *frame, int width, int height, int n); +#endif diff --git a/veejay-server/libvje/effects/colflash.c b/veejay-server/libvje/effects/colflash.c new file mode 100644 index 00000000..996e66ee --- /dev/null +++ b/veejay-server/libvje/effects/colflash.c @@ -0,0 +1,101 @@ +/* + * Linux VeeJay + * + * Copyright(C)2006 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "colflash.h" +#include "common.h" + +// very simple color flashing fx + +vj_effect *colflash_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 50; //tempo in frames + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + ve->limits[0][4] = 1; + ve->limits[1][4] = 10; + ve->defaults[0] = 5; + ve->defaults[1] = 0; + ve->defaults[2] = 0; + ve->defaults[3] = 0; + ve->defaults[4] = 3; //delay + ve->description = "Color Flash"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + ve->rgb_conv = 1; + return ve; +} + + +static int color_flash_ = 0; +static int color_delay_ = 0; +static int delay_ = 0; +void colflash_apply( VJFrame *frame, int width, int height, int f,int r, int g, int b, int d) +{ + unsigned int i, op0, op1; + unsigned int len = frame->len; + unsigned int uv_len = frame->uv_len; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + uint8_t y,u,v; + + _rgb2yuv( r,g,b,y,u,v ); + + if( d != delay_ ) + { + delay_ = d; + color_delay_ = d; + } + + if( color_delay_ ) + { + veejay_memset( Y, y, len ); + veejay_memset( Cb, u, uv_len ); + veejay_memset( Cr, v, uv_len ); + color_delay_ -- ; + } + else + { + color_flash_ ++ ; + if( color_flash_ >= f ) + { + color_delay_ = delay_; + color_flash_ = 0; + } + + } + +} + diff --git a/veejay-server/libvje/effects/colflash.h b/veejay-server/libvje/effects/colflash.h new file mode 100644 index 00000000..4623ff0c --- /dev/null +++ b/veejay-server/libvje/effects/colflash.h @@ -0,0 +1,29 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef COLFLASH_H +#define COLFLASH_H +#include +#include +#include + +vj_effect *colflash_init(); +void colflash_apply( VJFrame *frame, int width, int height, int f,int r, int g, int b, int d); +#endif diff --git a/veejay-server/libvje/effects/colmorphology.c b/veejay-server/libvje/effects/colmorphology.c new file mode 100644 index 00000000..9b9108a6 --- /dev/null +++ b/veejay-server/libvje/effects/colmorphology.c @@ -0,0 +1,146 @@ +/* + * Linux VeeJay + * + * Copyright(C)2006 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "colmorphology.h" +#include "common.h" +typedef uint8_t (*morph_func)(uint8_t *kernel, uint8_t mt[9] ); + +vj_effect *colmorphology_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; // threshold + ve->limits[1][0] = 255; + + ve->limits[0][1] = 0; // morpology operator (dilate,erode, ... ) + ve->limits[1][1] = 8; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; // passes + + ve->defaults[0] = 140; + ve->defaults[1] = 0; + ve->defaults[2] = 0; + + ve->description = "Colored Morphology"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + + +static uint8_t *binary_img; + +int colmorphology_malloc(int w, int h ) +{ + binary_img = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h ); + if(!binary_img) return 0; + return 1; +} + +void colmorphology_free(void) +{ + if(binary_img) + free(binary_img); + binary_img = NULL; +} + +static uint8_t _dilate_kernel3x3( uint8_t *kernel, uint8_t img[9]) +{ + register int x; + /* consider all background pixels (0) in input image */ + for(x = 0; x < 9; x ++ ) + if((kernel[x] * img[x]) > 0 ) + return 235; + return 16; +} + + +static uint8_t _erode_kernel3x3( uint8_t *kernel, uint8_t img[9]) +{ + register int x; + /* consider all background pixels (0) in input image */ + for(x = 0; x < 9; x ++ ) + if(kernel[x] && img[x] == 0 ) + return 16; + return 235; +} + +static morph_func _morphology_function(int i) +{ + if( i == 0 ) + return _dilate_kernel3x3; + return _erode_kernel3x3; +} + + +void colmorphology_apply( VJFrame *frame, int width, int height, int threshold, int type, int passes ) +{ + unsigned int i,x,y; + int len = (width * height); + int c = 0,t=0,k=0; + uint8_t pixel; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t kernels[8][9] ={ + { 1,1,1, 1,1,1 ,1,1,1 },//0 + { 0,1,0, 1,1,1, 0,1,0 },//1 + { 0,0,0, 1,1,1, 0,0,0 },//2 + { 0,1,0, 0,1,0, 0,1,0 },//3 + { 0,0,1, 0,1,0, 1,0,0 },//4 + { 1,0,0, 0,1,0, 0,0,1 }, + { 1,1,1, 0,0,0, 0,0,0 }, + { 0,0,0, 0,0,0, 1,1,1 } + }; + + morph_func p = _morphology_function(passes); + + for( i = 0; i < len; i ++ ) + { + binary_img[i] = ( Y[i] < threshold ? 0: 0xff ); + t++; + } + + len -= width; + + /* compute dilation of binary image with kernel */ + for(y = width; y < len; y += width ) + { + for(x = 1; x < width-1; x ++) + { + if(binary_img[x+y] == 0) + { + uint8_t mt[9] = { + binary_img[x-1+y-width], binary_img[x+y-width], binary_img[x+1+y-width], + binary_img[x-1+y], binary_img[x+y] , binary_img[x+1+y], + binary_img[x-1+y+width], binary_img[x+y+width], binary_img[x+1+y+width] + }; + Y[x+y] = p( kernels[type], mt ); + } + } + } +} diff --git a/veejay-server/libvje/effects/colmorphology.h b/veejay-server/libvje/effects/colmorphology.h new file mode 100644 index 00000000..c8d9c4ca --- /dev/null +++ b/veejay-server/libvje/effects/colmorphology.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2006 Niels Elburg + * + * 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. + */ + +#ifndef COLMORPHOLOGY_H +#define COLMORPHOLOGY_H +#include +#include +#include + +vj_effect *colmorphology_init(int w, int h); +void colmorphology_apply( VJFrame *frame, int width, int height, int t, int val, int n); +int colmorphology_malloc(int w, int h); +void colmorphology_free(void); +#endif diff --git a/veejay-server/libvje/effects/color.c b/veejay-server/libvje/effects/color.c new file mode 100644 index 00000000..d4b1d7e3 --- /dev/null +++ b/veejay-server/libvje/effects/color.c @@ -0,0 +1,96 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "color.h" +vj_effect *color_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 150; + ve->defaults[1] = 150; + ve->defaults[2] = 150; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->sub_format = 0; + ve->description = "Color Enhance"; + ve->has_user = 0; + ve->extra_frame = 0; + return ve; +} + + +void color_apply(VJFrame *frame, int width, int height, + int opacity_a, int opacity_b, + int opacity_c) +{ + unsigned int i; + const unsigned int op_a0 = 255 - opacity_a; + const unsigned int op_b0 = 255 - opacity_b; + const unsigned int op_c0 = 255- opacity_c; + + const unsigned int cb_a = opacity_a * 100; + const unsigned int cb_c = opacity_c * 212; + const unsigned int cb_b = opacity_b * 72; + + const unsigned int cr_a = opacity_a * 212; + const unsigned int cr_b = opacity_b * 58; + const unsigned int cr_c = opacity_c * 114; + + int p1,p2,q1,q2; + + const int uv_len = frame->uv_len; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + for (i = 0; i < uv_len; i++) { + p1 = Cb[i]; + p2 = Cr[i]; + + q1 = ( + ((op_a0 * p1 + cb_a)>>8) + + ((op_b0 * p1 + cb_b)>>8) + + ((op_c0 * p1 + cb_c)>>8)) ; + q2 = ( + ((op_a0 * p2 + cr_a)>>8) + + ((op_b0 * p2 + cr_b)>>8) + + ((op_c0 * p2 + cr_c)>>8)) ; + + if( q1 > 512) q1 = q1 / 3; + else if( q1 > 255) q1 = q1 >> 1; + + if( q2 > 512) q2 = q2 / 3; + else if (q2 > 255) q1 = q2 >> 1; + + Cb[i] = q1; + Cr[i] = q2; + + } + +} +void color_free(){} diff --git a/veejay-server/libvje/effects/color.h b/veejay-server/libvje/effects/color.h new file mode 100644 index 00000000..38724277 --- /dev/null +++ b/veejay-server/libvje/effects/color.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef COLORVAL_H +#define COLORVAL_H +#include +#include +#include + +vj_effect *color_init(); +void color_apply( VJFrame *frame , int width, int height, int a, int b, int c); + +void color_free(); +#endif diff --git a/veejay-server/libvje/effects/coloradjust.c b/veejay-server/libvje/effects/coloradjust.c new file mode 100644 index 00000000..9743bd4e --- /dev/null +++ b/veejay-server/libvje/effects/coloradjust.c @@ -0,0 +1,133 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "coloradjust.h" +#include +#include "common.h" +vj_effect *coloradjust_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + /* ve->limits[0][0] = -235; + ve->limits[1][0] = 235; + ve->limits[0][1] = 0; + ve->limits[1][1] = 36000; + ve->defaults[0] = 116; + ve->defaults[1] = 4500;*/ + ve->limits[0][0] = 0; + ve->limits[1][0] = 360; + ve->limits[0][1] = 0; + ve->limits[1][1] = 256; + ve->defaults[0] = 50; + ve->defaults[1] = 50; + + ve->description = "Hue and Saturation"; + ve->extra_frame = 0; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + +/* these methods were derived from yuv-subtitler */ +inline uint8_t ccolor_adjust_u(double dcolor, double dsaturation) +{ + return (sin(dcolor) * dsaturation) + 128; +} +inline uint8_t ccolor_adjust_v(double dcolor, double dsaturation) +{ + return (cos(dcolor) * dsaturation) + 128; +} + + +inline double ccolor_sqrt(double u, double v) +{ +// return sqrt((u * u) + (v * v)); + double r; + fast_sqrt( r,(u*u)+(v*v)); + return r; +} +inline double ccolor_sine(int u, double dsaturation) +{ + return asin((u / dsaturation)); +} + + +void coloradjust_apply(VJFrame *frame, int width, int height, int val, + int _degrees) +{ + unsigned int i; + const int len = frame->uv_len; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; +//@ Hue, Saturation, copied from AVIDEMUX! +//@ the commented out version is the same as the optimized version (?) +// + + float hue = (float) ( (val/180.0) * M_PI); + float sat = (float) ( _degrees * 0.01 ); + + const int s = (int) rint( sin(hue) * (1<<16) * sat ); + const int c = (int) rint( cos(hue) * (1<<16) * sat ); + + for( i = 0 ; i < len ;i ++ ) + { + const int u = Cb[i] - 128; + const int v = Cr[i] - 128; + int new_u = (c * u - s * v + (1<<15) + (128<<16)) >> 16; + int new_v = (s * u + c * v + (1<<15) + (128<<16)) >> 16; + if( new_u & 768 ) new_u = (-new_u) >> 31; + if( new_v & 768 ) new_v = (-new_v) >> 31; + + Cb[i] = new_u; + Cr[i] = new_v; + } + + + /* int cb, cr; + double dsaturation, dcolor; + const double degrees = (_degrees / 100.0); + double co, si; + const double dsat = val / 100.0; + + for (i = 0; i < len; i++) + { + cb = Cb[i] - 128; + cr = Cr[i] - 128; + if (cb != 0 && cr != 0) + { + dsaturation = ccolor_sqrt((double) cb, (double) cr); + dcolor = ccolor_sine(cb, dsaturation); + if (cr < 0) + dcolor = M_PI - dcolor; + + dcolor += (degrees * M_PI) / 180.0; + dsaturation *= dsat; + sin_cos(co,si, dcolor ); + Cb[i] = si * dsaturation + 128; + Cr[i] = co * dsaturation + 128; + } + } +*/ +} +void coloradjust_free(){} diff --git a/veejay-server/libvje/effects/coloradjust.h b/veejay-server/libvje/effects/coloradjust.h new file mode 100644 index 00000000..5c0f148f --- /dev/null +++ b/veejay-server/libvje/effects/coloradjust.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef COLORADJUST_H +#define COLORADJUST_H +#include +#include +#include + +vj_effect *coloradjust_init(); + +void coloradjust_apply(VJFrame *frame, int width, int height, int val, + int degrees); +void coloradjust_free(); +#endif diff --git a/veejay-server/libvje/effects/colorhis.c b/veejay-server/libvje/effects/colorhis.c new file mode 100644 index 00000000..a1714ed3 --- /dev/null +++ b/veejay-server/libvje/effects/colorhis.c @@ -0,0 +1,128 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "colorhis.h" +#include +#include AVUTIL_INC +#include +#include +#include "common.h" +vj_effect *colorhis_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 3; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->defaults[0] = 0; // r only, g only, b only, rgb + ve->defaults[1] = 0; // draw + ve->defaults[2] = 200; // intensity + ve->defaults[3] = 132; // strength + + ve->description = "Color Histogram"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static void *histogram_ = NULL; +static VJFrame *rgb_frame_ = NULL; +static uint8_t *rgb_ = NULL; +static void *convert_yuv = NULL; +static void *convert_rgb = NULL; + +int colorhis_malloc(int w, int h) +{ + if( histogram_ ) + veejay_histogram_del(histogram_); + if( rgb_ ) + free(rgb_); + histogram_ = veejay_histogram_new(); + rgb_ = vj_malloc(sizeof(uint8_t) * w * h * 3 ); + rgb_frame_ = yuv_rgb_template( rgb_, w, h, PIX_FMT_RGB24 ); + + + return 1; +} + +void colorhis_free() +{ + if( histogram_ ) + veejay_histogram_del(histogram_); + if( rgb_ ) + free(rgb_); + if( rgb_frame_) + free(rgb_frame_); + rgb_ = NULL; + rgb_frame_ = NULL; + histogram_ = NULL; + + if( convert_yuv ) + yuv_fx_context_destroy( convert_yuv ); + if( convert_rgb ) + yuv_fx_context_destroy( convert_rgb ); + + convert_rgb = NULL; + convert_yuv = NULL; + +} + + +void colorhis_apply( VJFrame *frame, int width, int height,int mode, int val, int intensity, int strength) +{ + int src_fmt = (frame->uv_height == height ? PIX_FMT_YUV422P : PIX_FMT_YUV420P); + + if(!convert_yuv) + convert_yuv = yuv_fx_context_create( frame, rgb_frame_, src_fmt, PIX_FMT_RGB24 ); + + yuv_fx_context_process( convert_yuv, frame, rgb_frame_ ); + + //yuv_convert_any_ac( frame, rgb_frame_, src_fmt, PIX_FMT_RGB24 ); + + if( val == 0 ) + { + veejay_histogram_draw_rgb( histogram_, frame, rgb_, intensity, strength, mode ); + } + else + { + veejay_histogram_analyze_rgb( histogram_,rgb_, frame ); + veejay_histogram_equalize_rgb( histogram_, frame, rgb_, intensity, strength, mode ); + + if(!convert_rgb ) + convert_rgb = yuv_fx_context_create( rgb_frame_, frame, PIX_FMT_RGB24, src_fmt ); + yuv_fx_context_process( convert_rgb, rgb_frame_, frame ); + +// yuv_convert_any_ac( rgb_frame_, frame, PIX_FMT_RGB24, src_fmt ); + } +} + diff --git a/veejay-server/libvje/effects/colorhis.h b/veejay-server/libvje/effects/colorhis.h new file mode 100644 index 00000000..554ea63d --- /dev/null +++ b/veejay-server/libvje/effects/colorhis.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + */ + +#ifndef COLORHIS_H +#define COLORHIS_H +#include +#include +#include + +vj_effect *colorhis_init(int w, int h); +int colorhis_malloc(int w , int h ); +void colorhis_free( ); +void colorhis_apply( VJFrame *frame, int width, int height, int mode,int val, int intensity, int strength); +#endif diff --git a/veejay-server/libvje/effects/colormap.c b/veejay-server/libvje/effects/colormap.c new file mode 100644 index 00000000..3f72db24 --- /dev/null +++ b/veejay-server/libvje/effects/colormap.c @@ -0,0 +1,86 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include +#include "colormap.h" + +vj_effect *colormap_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->defaults[0] = 46; + ve->defaults[1] = 109; + ve->defaults[2] = 92; + + ve->description = "Color mapping"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static uint8_t u_[256]; +static uint8_t v_[256]; + +void colormap_apply( VJFrame *frame, int width, int height, int r, int g, int b) +{ + int i; + int len = (width * height); + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t dummy = 0; + for(i = 1; i < 256; i ++ ) + { + COLOR_rgb2yuv( (r % i),(g % i),(b % i), dummy, u_[i-1],v_[i-1]); + + } + + +/* for (i = 0; i < len; i++) { + *(Y) = val - *(Y); + *(Y)++; + }*/ + + for (i = 0; i < len; i++) { +// *(Cb) = val - *(Cb); + // *(Cb)++; + // *(Cr) = val - *(Cr); +// *(Cr)++; + *(Cb) = u_[ (*Y) ]; + *(Cr) = v_[ (*Y) ]; + *(Cb)++; + *(Cr)++; + *(Y)++; + } +} diff --git a/veejay-server/libvje/effects/colormap.h b/veejay-server/libvje/effects/colormap.h new file mode 100644 index 00000000..0b95b1cd --- /dev/null +++ b/veejay-server/libvje/effects/colormap.h @@ -0,0 +1,29 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef COLORMAP_H +#define COLORMAP_H +#include +#include +#include + +vj_effect *colormap_init(int w, int h); +void colormap_apply( VJFrame *frame, int width, int height, int vala , int valb, int valc); +#endif diff --git a/veejay-server/libvje/effects/colorshift.c b/veejay-server/libvje/effects/colorshift.c new file mode 100644 index 00000000..1c9178e5 --- /dev/null +++ b/veejay-server/libvje/effects/colorshift.c @@ -0,0 +1,218 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "colorshift.h" + +vj_effect *colorshift_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 5; + ve->defaults[1] = 235; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 9; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->description = "Shift pixel values YCbCr"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + + +/* bitwise and test */ + +void softmask2_apply(VJFrame *frame, int width, int height, int paramt) +{ + const unsigned int len = frame->len; + unsigned int x; + uint8_t *Y = frame->data[0]; + for (x = 0; x < len; x++) + Y[x] &= paramt; +} + +void softmask2_applycb(VJFrame *frame, int width, int height, + int paramt) +{ + const unsigned int len = frame->uv_len; + uint8_t *Cb = frame->data[1]; + unsigned int x; + for (x = 0; x < len; x++) + Cb[x] &= paramt; +} + +void softmask2_applycr(VJFrame *frame, int width, int height, + int paramt) +{ + uint8_t *Cr = frame->data[2]; + const unsigned int len = frame->uv_len; + unsigned int x; + for (x = 0; x < len; x++) + Cr[x] &= paramt; +} + +void softmask2_applycbcr(VJFrame *frame, int width, int height, + int paramt) +{ + const unsigned int len = frame->uv_len; + unsigned int x; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + for (x = 0; x < len; x++) { + Cb[x] &= paramt; + Cr[x] &= paramt; + } +} + +void softmask2_applyycbcr(VJFrame *frame, int width, int height, + int paramt) +{ + const unsigned int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + unsigned int x; + + for (x = 0; x < len; x++) + Y[x] &= paramt; + + for (x = 0; x < uv_len; x++) { + Cb[x] &= paramt; + Cr[x] &= paramt; + } +} + +void softmask_apply(VJFrame *frame, int width, int height, int paramt) +{ + const unsigned int len = frame->len; + unsigned int x; + uint8_t *Y = frame->data[0]; + + + for (x = 0; x < len; x++) + Y[x] |= paramt; +} + + +void softmask_applycb(VJFrame *frame, int width, int height, int paramt) +{ + const unsigned int len = frame->uv_len; + uint8_t *Cb = frame->data[1]; + + + unsigned int x; + for (x = 0; x < len; x++) + Cb[x] |= paramt; +} + + +void softmask_applycr(VJFrame *frame, int width, int height, int paramt) +{ + const unsigned int len = frame->uv_len; + uint8_t *Cr = frame->data[2]; + + + unsigned int x; + for (x = 0; x < len; x++) + Cr[x] |= paramt; +} + + +void softmask_applycbcr(VJFrame *frame, int width, int height, + int paramt) +{ + const unsigned int len = frame->uv_len; + unsigned int x; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + for (x = 0; x < len; x++) + { + Cb[x] |= paramt; + Cr[x] |= paramt; + } +} + +void softmask_applyycbcr(VJFrame *frame, int width, int height, + int paramt) +{ + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + const int uv_len = frame->uv_len; + + unsigned int x; + for (x = 0; x < len; x++) + Y[x] |= paramt; + + for (x = 0; x < uv_len; x++) { + Cb[x] |= paramt; + Cr[x] |= paramt; + } +} + + +void colorshift_apply(VJFrame *frame, int width, int height, int type, + int n) +{ + switch (type) { + case 0: + softmask_apply(frame, width, height, n); + break; + case 1: + softmask_applycb(frame, width, height, n); + break; + case 2: + softmask_applycr(frame, width, height, n); + break; + case 3: + softmask_applycbcr(frame, width, height, n); + break; + case 4: + softmask_applyycbcr(frame, width, height, n); + break; + case 5: + softmask2_apply(frame, width, height, n); + break; + case 6: + softmask2_applycb(frame, width, height, n); + break; + case 7: + softmask2_applycr(frame, width, height, n); + break; + case 8: + softmask2_applycbcr(frame, width, height, n); + break; + case 9: + softmask2_applyycbcr(frame, width, height, n); + break; + } +} +void colorshift_free(){} diff --git a/veejay-server/libvje/effects/colorshift.h b/veejay-server/libvje/effects/colorshift.h new file mode 100644 index 00000000..f48ec689 --- /dev/null +++ b/veejay-server/libvje/effects/colorshift.h @@ -0,0 +1,34 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef COLORSHIFT_H +#define COLORSHIFT_H +#include +#include +#include + +/* this effect uses bit masking to increase/decrease the luma cq chroma values + in a frame. with this you can create distorted colours. */ + +vj_effect *colorshift_init(); +void colorshift_apply( VJFrame *frame, int width, int height, int n, + int type); +void colorshift_free(); +#endif diff --git a/veejay-server/libvje/effects/common.c b/veejay-server/libvje/effects/common.c new file mode 100644 index 00000000..6207e056 --- /dev/null +++ b/veejay-server/libvje/effects/common.c @@ -0,0 +1,2027 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#include +#include +#include +#include +#include +#include + +#include "common.h" + +static inline void linearBlend(unsigned char *src, int stride) +{ + int x; + for (x=0; x<8; x++) + { + src[0 ] = (src[0 ] + 2*src[stride ] + src[stride*2])>>2; + src[stride ] = (src[stride ] + 2*src[stride*2] + src[stride*3])>>2; + src[stride*2] = (src[stride*2] + 2*src[stride*3] + src[stride*4])>>2; + src[stride*3] = (src[stride*3] + 2*src[stride*4] + src[stride*5])>>2; + src[stride*4] = (src[stride*4] + 2*src[stride*5] + src[stride*6])>>2; + src[stride*5] = (src[stride*5] + 2*src[stride*6] + src[stride*7])>>2; + src[stride*6] = (src[stride*6] + 2*src[stride*7] + src[stride*8])>>2; + src[stride*7] = (src[stride*7] + 2*src[stride*8] + src[stride*9])>>2; + + src++; + } +//#endif +} + + +matrix_t matrix_placementA(int photoindex, int size, int w , int h) +{ + matrix_t m; + m.w = (photoindex % size) * (w/size); + m.h = (photoindex / size) * (h/size); + return m; +} + +matrix_t matrix_placementB(int photoindex, int size, int w , int h) +{ + matrix_t m; + m.w = (photoindex/size) * (w/size); + m.h = (photoindex % size) * (h/size); + return m; +} + +matrix_t matrix_placementC(int photoindex, int size, int w , int h) +{ + matrix_t m; + int n = size*size-1; + m.w = ((n-photoindex) % size) * (w/size); + m.h = ((n-photoindex) / size) * (h/size); + return m; +} + +matrix_t matrix_placementD(int photoindex, int size, int w , int h) +{ + matrix_t m; + int n = size*size-1; + m.w = ((n-photoindex) / size) * (w/size); + m.h = ((n-photoindex) % size) * (h/size); + return m; +} + +matrix_f get_matrix_func(int type) +{ + if(type==0) + return &matrix_placementA; + if(type==1) + return &matrix_placementB; + if(type==2) + return &matrix_placementC; + return &matrix_placementD; +} + + +int power_of(int size) +{ + int power = 1; + while( size-- ) + power *= 2; + + return power; +} + +int max_power(int w) +{ + int i=1; + while(power_of(i) < w) + i++; + return i; +} +/* some parts (linearBlend() and deinterlace() from : + * + * Simple xawtv deinterlacing plugin - linear blend + * + * CAVEATS: Still some interlacing effects in high motion perhaps + * Some ghosting in instant transitions, slightly noticeable + * + * BENEFITS: NO DROP IN FRAMERATE =] + * Looks absolutely beautiful + * Doesn't lower framerate + * Oh and did I mention it doesn't lower framerate? + * Plus, its MMX'itized now, so it really doesn't lower framerate. + * + * AUTHORS: + * Conrad Kreyling + * Patrick Barrett + * + * This is licenced under the GNU GPL until someone tells me I'm stealing code + * and can't do that ;) www.gnu.org for any version of the license. + * + * Based on xawtv-3.72/libng/plugins/flt-nop.c (also GPL) + * Linear blend deinterlacing algorithm adapted from mplayer's libpostproc + */ + + + +void deinterlace(uint8_t *data, int w, int h, int v) +{ + int x,y; + uint8_t *src; + for(y=1; y < h-8; y+=8) + { + for(x=0; x < w; x+=8) + { + src = data + x + y * w; + linearBlend(src, w); + } + } +} + + +void frameborder_yuvdata(uint8_t * input_y, uint8_t * input_u, + uint8_t * input_v, uint8_t * putin_y, + uint8_t * putin_u, uint8_t * putin_v, int width, + int height, int top, int bottom, int left, + int right, int shift_h, int shift_v) +{ + + int line, x; + int input_active_width; + int input_active_height; + uint8_t *rightvector; + shift_h = 0; + shift_v = 0; + input_active_height = height - top - bottom; + input_active_width = width - left - right; + + /* Y component TOP */ + for (line = 0; line < top; line++) { + for (x = 0; x < width; x++) { + *(input_y + x) = *(putin_y + x); + } + //memcpy (input_y, putin_y, width); + input_y += width; + putin_y += width; + } + rightvector = input_y + left + input_active_width; + /* Y component LEFT AND RIGHT */ + for (line = 0; line < input_active_height; line++) { + for (x = 0; x < left; x++) { + *(input_y + x) = *(putin_y + x); + } + //memcpy (input_y, putin_y, left); + for (x = 0; x < right; x++) { + *(rightvector + x) = + *(putin_y + left + input_active_width + x); + } + //memcpy (rightvector, putin_y + left + input_active_width, right); + input_y += width; + rightvector += width; + putin_y += width; + } + /* Y component BOTTOM */ + for (line = 0; line < bottom; line++) { + for (x = 0; x < width; x++) + *(input_y + x) = *(putin_y + x); + + //memcpy (input_y, putin_y, width); + input_y += width; + putin_y += width; + } + + + /* U component TOP */ + for (line = 0; line < (top >> shift_v); line++) { + for (x = 0; x < (width >> shift_h); x++) { + *(input_u + x) = *(putin_u + x); + } + //memcpy (input_u, putin_u, width >> 1); + input_u += width >> shift_h; + putin_u += width >> shift_h; + } + + rightvector = input_u + ((left + input_active_width) >> shift_h); + for (line = 0; line < (input_active_height >> shift_v); line++) { + //memcpy (input_u, putin_u, left >> 1); + for (x = 0; x < (left >> shift_h); x++) { + *(input_u + x) = *(putin_u + x); + } + //memcpy (rightvector, putin_u + ((left + input_active_width)>>1) , right >> 1); + for (x = 0; x < (right >> shift_h); x++) { + *(rightvector + x) = *(putin_u + + ((left + input_active_width + x) >> shift_h)); + + } + input_u += width >> shift_h; + rightvector += width >> shift_h; + putin_u += width >> shift_h; + } + + for (line = 0; line < (bottom >> shift_v); line++) { + for (x = 0; x < (width >> shift_h); x++) + *(input_u + x) = *(putin_u + x); + //memcpy (input_u, putin_u, width >> 1); + input_u += width >> shift_h; + putin_u += width >> shift_h; + } + + /* V component Top */ + for (line = 0; line < (top >> shift_v); line++) { + //memcpy (input_v, putin_v, width >> 1); + for (x = 0; x < (width >> shift_h); x++) { + *(input_v + x) = *(putin_v + x); + } + input_v += width >> shift_h; + putin_v += width >> shift_h; + } + /* Left and Right */ + rightvector = input_v + ((left + input_active_width) >> shift_h); + for (line = 0; line < (input_active_height >> shift_v); line++) { + for (x = 0; x < (left >> shift_h); x++) + *(input_v + x) = *(putin_v + x); + + //memcpy (input_v, putin_v, left >> 1); + //memcpy (rightvector, putin_v + ((left+input_active_width)>>1), right >> 1); + for (x = 0; x < (right >> shift_h); x++) + *(rightvector + x) = + *(putin_v + ((left + input_active_width + x) >> shift_h)); + + input_v += width >> shift_h; + rightvector += width >> shift_h; + putin_v += width >> shift_h; + } + /* Bottom */ + for (line = 0; line < (bottom >> shift_v); line++) { + //memcpy (input_v, putin_v, width >> 1); + for (x = 0; x < (width >> shift_h); x++) + *(input_v + x) = *(putin_v + x); + input_v += width >> shift_h; + putin_v += width >> shift_h; + } + + +} + + + +/********************************************************************************************** + * + * frameborder_yuvdata, based upon blackborder_yuvdata. + * instead of making the borders black, fill it with pixels coming from the second YUV420 frame. + **********************************************************************************************/ +void ffframeborder_yuvdata(uint8_t * input_y, uint8_t * input_u, + uint8_t * input_v, uint8_t * putin_y, + uint8_t * putin_u, uint8_t * putin_v, int width, + int height, int top, int bottom, int left, + int right, int wshift, int hshift) +{ + + int line, x; + int input_active_width = (height - top - bottom); + int input_active_height = (width - left -right); + uint8_t *rightvector; + int uv_top = top >> hshift; + int uv_bottom = bottom >> hshift; + int uv_left = left >> wshift; + int uv_right = right >> wshift; + int uv_width = width >> wshift; + int uv_height = height >> hshift; + int uv_input_active_height = uv_height - uv_top - uv_bottom; + int uv_input_active_width = uv_width - uv_left - uv_right; + + /* Y component TOP */ + + if(top) + { + for (line = 0; line < top; line++) { + for (x = 0; x < width; x++) { + *(input_y + x) = *(putin_y + x); + } + //memcpy (input_y, putin_y, width); + input_y += width; + putin_y += width; + } + } + + if(left && right) + { + rightvector = input_y + left + input_active_width; + /* Y component LEFT AND RIGHT */ + for (line = 0; line < input_active_height; line++) { + for (x = 0; x < left; x++) { + *(input_y + x) = *(putin_y + x); + } + //memcpy (input_y, putin_y, left); + for (x = 0; x < right; x++) { + *(rightvector + x) = + *(putin_y + left + input_active_width + x); + } + //memcpy (rightvector, putin_y + left + input_active_width, right); + input_y += width; + rightvector += width; + putin_y += width; + } + } + + + /* Y component BOTTOM */ + if(bottom) + { + for (line = 0; line < bottom; line++) { + for (x = 0; x < width; x++) + *(input_y + x) = *(putin_y + x); + + //memcpy (input_y, putin_y, width); + input_y += width; + putin_y += width; + } + } + + + /* U V components */ + /* U component TOP */ + + if(uv_top) + { + for (line = 0; line < uv_top; line++) + { + for (x = 0; x < uv_width; x++) + { + *(input_u + x) = *(putin_u + x); + } + input_u += uv_width; + putin_u += uv_width; + } + } + + + if(left && right) + { + rightvector = input_u + uv_left + uv_input_active_width; + for (line = 0; line < uv_input_active_height; line++) + { + //memcpy (input_u, putin_u, left >> 1); + for (x = 0; x < uv_left; x++) + { + *(input_u + x) = *(putin_u + x); + } + //memcpy (rightvector, putin_u + ((left + input_active_width)>>1) , right >> 1); + for (x = 0; x < uv_right; x++) + { + *(rightvector + x) = *(putin_u + + uv_left + uv_input_active_width + x ); + + } + input_u += uv_width; + rightvector += uv_width; + putin_u += uv_width; + } + } + + if(uv_bottom) + { + for (line = 0; line < uv_bottom; line++) + { + for (x = 0; x < uv_width; x++) + *(input_u + x) = *(putin_u + x); + input_u += uv_width; + putin_u += uv_width; + } + } + + /* V component Top */ + if(uv_top) + { + for (line = 0; line < uv_top; line++) + { + for (x = 0; x < uv_width; x++) + *(input_v + x) = *(putin_v + x); + input_v += uv_width; + putin_v += uv_width; + } + } + + if(uv_left && uv_right) + { + /* Left and Right */ + rightvector = input_v + uv_left + uv_input_active_width; + for (line = 0; line < uv_input_active_height; line++) + { + for (x = 0; x < uv_left; x++) + *(input_v + x) = *(putin_v + x); + + for (x = 0; x < uv_right; x++) + *(rightvector + x) = + *(putin_v + uv_left + uv_input_active_width + x); + + input_v += uv_width; + rightvector += uv_width; + putin_v += uv_width; + + } + } + + if(uv_bottom) + { + /* Bottom */ + for (line = 0; line < uv_bottom; line++) { + for (x = 0; x < uv_width; x++) + *(input_v + x) = *(putin_v + x); + input_v += uv_width; + putin_v += uv_width; + } + } +} + + + +void blackborder_yuvdata(uint8_t * input_y, uint8_t * input_u, + uint8_t * input_v, int width, int height, int top, + int bottom, int left, int right, int wshift, int hshift, int color) +{ + int line, x; + int input_active_width; + int input_active_height; + uint8_t *rightvector; + uint8_t colorY = bl_pix_get_color_y(color); + uint8_t colorCb= bl_pix_get_color_cb(color); + uint8_t colorCr= bl_pix_get_color_cr(color); + input_active_height = height - top - bottom; + input_active_width = width - left - right; + + /* Y component TOP */ + for (line = 0; line < top; line++) { + for (x = 0; x < width; x++) { + *(input_y + x) = colorY; + } + //memcpy (input_y, putin_y, width); + input_y += width; + } + rightvector = input_y + left + input_active_width; + /* Y component LEFT AND RIGHT */ + for (line = 0; line < input_active_height; line++) { + for (x = 0; x < left; x++) { + *(input_y + x) = colorY; + } + //memcpy (input_y, putin_y, left); + for (x = 0; x < right; x++) { + *(rightvector + x) = colorY; + } + //memcpy (rightvector, putin_y + left + input_active_width, right); + input_y += width; + rightvector += width; + } + /* Y component BOTTOM */ + for (line = 0; line < bottom; line++) { + for (x = 0; x < width; x++) + *(input_y + x) = colorY; + + //memcpy (input_y, putin_y, width); + input_y += width; + } + + + /* U component TOP */ + for (line = 0; line < (top >> hshift); line++) { + for (x = 0; x < (width >> wshift); x++) { + *(input_u + x) = colorCb; + } + //memcpy (input_u, putin_u, width >> 1); + input_u += width >> wshift; + } + + rightvector = input_u + ((left + input_active_width) >> wshift); + for (line = 0; line < (input_active_height >> hshift); line++) { + //memcpy (input_u, putin_u, left >> 1); + for (x = 0; x < (left >> wshift); x++) { + *(input_u + x) = colorCb; + } + //memcpy (rightvector, putin_u + ((left + input_active_width)>>1) , right >> 1); + for (x = 0; x < (right >> wshift); x++) { + *(rightvector + x) = colorCb; + } + input_u += width >> wshift; + rightvector += width >> wshift; + } + + for (line = 0; line < (bottom >> hshift); line++) { + for (x = 0; x < (width >> wshift); x++) + *(input_u + x) = colorCb; + //memcpy (input_u, putin_u, width >> 1); + input_u += width >> wshift; + } + + /* V component Top */ + for (line = 0; line < (top >> hshift); line++) { + //memcpy (input_v, putin_v, width >> 1); + for (x = 0; x < (width >> wshift); x++) { + *(input_v + x) = colorCr; + } + input_v += width >> wshift; + } + /* Left and Right */ + rightvector = input_v + ((left + input_active_width) >> wshift); + for (line = 0; line < (input_active_height >> hshift); line++) { + for (x = 0; x < (left >> wshift); x++) + *(input_v + x) = colorCr; + + //memcpy (input_v, putin_v, left >> 1); + //memcpy (rightvector, putin_v + ((left+input_active_width)>>1), right >> 1); + for (x = 0; x < (right >> wshift); x++) + *(rightvector + x) =colorCr; + + input_v += width >> wshift; + rightvector += width >> wshift; + } + /* Bottom */ + for (line = 0; line < (bottom >> hshift); line++) { + //memcpy (input_v, putin_v, width >> 1); + for (x = 0; x < (width >> wshift); x++) + *(input_v + x) = colorCr; + input_v += width >> wshift; + } +} + + +// fastrand (C) FUKUCHI, Kentaro (EffectTV) +unsigned int fastrand(int val) +{ + return (val = val * 1103516245 + 12345); +} + + +/* function to blend luminance pixel */ +pix_func_Y get_pix_func_Y(const int pix_type) +{ + if (pix_type == 0) + return &bl_pix_swap_Y; + if (pix_type == VJ_EFFECT_BLEND_ADDDISTORT) + return &bl_pix_add_distorted_Y; + if (pix_type == VJ_EFFECT_BLEND_SUBDISTORT) + return &bl_pix_sub_distorted_Y; + if (pix_type == VJ_EFFECT_BLEND_MULTIPLY) + return &bl_pix_multiply_Y; + if (pix_type == VJ_EFFECT_BLEND_DIVIDE) + return &bl_pix_divide_Y; + if (pix_type == VJ_EFFECT_BLEND_ADDITIVE) + return &bl_pix_additive_Y; + if (pix_type == VJ_EFFECT_BLEND_SUBSTRACTIVE) + return &bl_pix_substract_Y; + if (pix_type == VJ_EFFECT_BLEND_SOFTBURN) + return &bl_pix_softburn_Y; + if (pix_type == VJ_EFFECT_BLEND_INVERSEBURN) + return &bl_pix_inverseburn_Y; + if (pix_type == VJ_EFFECT_BLEND_COLORDODGE) + return &bl_pix_colordodge_Y; + if (pix_type == VJ_EFFECT_BLEND_MULSUB) + return &bl_pix_mulsub_Y; + if (pix_type == VJ_EFFECT_BLEND_LIGHTEN) + return &bl_pix_lighten_Y; + if (pix_type == VJ_EFFECT_BLEND_DIFFERENCE) + return &bl_pix_difference_Y; + if (pix_type == VJ_EFFECT_BLEND_DIFFNEGATE) + return &bl_pix_diffnegate_Y; + if (pix_type == VJ_EFFECT_BLEND_EXCLUSIVE) + return &bl_pix_exclusive_Y; + if (pix_type == VJ_EFFECT_BLEND_BASECOLOR) + return &bl_pix_basecolor_Y; + if (pix_type == VJ_EFFECT_BLEND_FREEZE) + return &bl_pix_freeze_Y; + if (pix_type == VJ_EFFECT_BLEND_UNFREEZE) + return &bl_pix_unfreeze_Y; + if (pix_type == VJ_EFFECT_BLEND_HARDLIGHT) + return &bl_pix_hardlight_Y; + if (pix_type == VJ_EFFECT_BLEND_RELADD) + return &bl_pix_relativeadd_Y; + if (pix_type == VJ_EFFECT_BLEND_RELSUB) + return &bl_pix_relativesub_Y; + if (pix_type == VJ_EFFECT_BLEND_MAXSEL) + return &bl_pix_maxsel_Y; + if (pix_type == VJ_EFFECT_BLEND_MINSEL) + return &bl_pix_minsel_Y; + if (pix_type == VJ_EFFECT_BLEND_RELADDLUM) + return &bl_pix_relativeadd_Y; + if (pix_type == VJ_EFFECT_BLEND_RELSUBLUM) + return &bl_pix_relativesub_Y; + if (pix_type == VJ_EFFECT_BLEND_MINSUBSEL) + return &bl_pix_minsubsel_Y; + if (pix_type == VJ_EFFECT_BLEND_MAXSUBSEL) + return &bl_pix_maxsubsel_Y; + if (pix_type == VJ_EFFECT_BLEND_ADDSUBSEL) + return &bl_pix_addsubsel_Y; + if (pix_type == VJ_EFFECT_BLEND_ADDAVG) + return &bl_pix_dblbneg_Y; + if (pix_type == VJ_EFFECT_BLEND_ADDTEST2) + return &bl_pix_dblbneg_Y; + if (pix_type == VJ_EFFECT_BLEND_ADDTEST3) + return &bl_pix_relneg_Y; + if (pix_type == VJ_EFFECT_BLEND_ADDTEST4) + return &bl_pix_test3_Y; + /* + if(pix_type == VJ_EFFECT_BLEND_SELECTMIN) return &bl_pix_minsel_Y; + if(pix_type == VJ_EFFECT_BLEND_SELECTMAX) return &bl_pix_maxsel_Y; + if(pix_type == VJ_EFFECT_BLEND_SELECTDIFF) return &bl_pix_seldiff_Y; + if(pix_type == VJ_EFFECT_BLEND_SELECTDIFFNEG) return &bl_pix_seldiffneg_Y; + if(pix_type == VJ_EFFECT_BLEND_ADDLUM) return &bl_pix_relativeadd_Y; + if(pix_type == VJ_EFFECT_BLEND_SELECTFREEZE) return &bl_pix_selfreeze_Y; + if(pix_type == VJ_EFFECT_BLEND_SELECTUNFREEZE) return &bl_pix_selunfreeze_Y; + */ + return &bl_pix_noswap_Y; +} + +/* function to blend chrominance pixel */ +pix_func_C get_pix_func_C(const int pix_type) +{ + if (pix_type == 0) + return &bl_pix_swap_C; + if (pix_type == VJ_EFFECT_BLEND_ADDDISTORT) + return &bl_pix_add_distorted_C; + if (pix_type == VJ_EFFECT_BLEND_SUBDISTORT) + return &bl_pix_sub_distorted_C; + if (pix_type == VJ_EFFECT_BLEND_RELADD) + return &bl_pix_relativeadd_C; + if (pix_type == VJ_EFFECT_BLEND_ADDTEST2) + return &bl_pix_dblbneg_C; + if (pix_type == VJ_EFFECT_BLEND_ADDTEST3) + return &bl_pix_relneg_C; + if (pix_type == VJ_EFFECT_BLEND_ADDTEST4) + return &bl_pix_test3_C; + /* + if(pix_type == VJ_EFFECT_BLEND_SELECTMAX) return &bl_pix_swap_C; + if(pix_type == VJ_EFFECT_BLEND_SELECTDIFF) return &bl_pix_swap_C; + if(pix_type == VJ_EFFECT_BLEND_SELECTDIFFNEG) return &bl_pix_swap_C; + if(pix_type == VJ_EFFECT_BLEND_SELECTFREEZE) return &bl_pix_swap_C; + if(pix_type == VJ_EFFECT_BLEND_SELECTUNFREEZE) return &bl_pix_swap_C; + */ + return &bl_pix_noswap_C; +} + + +/* point arithemetic , these are blending functions. */ + +/* multiply pixel a with pixel b */ +uint8_t bl_pix_multiply_Y(uint8_t y1, uint8_t y2) +{ + return ( (y1 * y2) >> 8); +} +/* divide pixel a with pixel b */ +uint8_t bl_pix_divide_Y(uint8_t y1, uint8_t y2) +{ + int c = y1 * y2; + int b = 0xff - y2; + if( b < pixel_Y_lo_ || c < pixel_Y_lo_ ) + return pixel_Y_lo_; + return ( c / b ); +} + +uint8_t bl_pix_additive_Y(uint8_t y1, uint8_t y2) +{ + return (y1 + ((2 * y2) - 0xff) ); +} + + +uint8_t bl_pix_substract_Y(uint8_t y1, uint8_t y2) +{ + return ( y1 + (y2 - 0xff ) ); +} + +uint8_t bl_pix_softburn_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if( a < pixel_Y_lo_) a = pixel_Y_lo_; + if( b < pixel_Y_lo_) b = pixel_Y_lo_; + if (a + b < 0xff) { + if (a > pixel_Y_hi_) { + new_Y = pixel_Y_hi_; + } else { + new_Y = (b >> 7) / (0xff - a); + if (new_Y > pixel_Y_hi_) + new_Y = pixel_Y_hi_; + } + } else { + new_Y = 0xff - (((0xff - a) >> 7) / b); + } + return new_Y; +} + +uint8_t bl_pix_inverseburn_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if (a < pixel_Y_lo_) { + new_Y = pixel_Y_lo_; + } else { + new_Y = 0xff - (((0xff - b) >> 8) / a); + } + return new_Y; +} + + +uint8_t bl_pix_colordodge_Y(uint8_t y1, uint8_t y2) +{ + if(y1 > pixel_Y_hi_ ) + y1 = pixel_Y_hi_; + return ((y2 >> 8) / (256 - y1)); +} + +uint8_t bl_pix_mulsub_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b; + a = y1; + b = (0xff - y2); + if( a < 16 ) + a = 16; + if (b < 16) + b = 16; + return ( a / b ); +} + +uint8_t bl_pix_lighten_Y(uint8_t y1, uint8_t y2) +{ + if (y1 > y2) + return y1; + return y2; +} + +uint8_t bl_pix_difference_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + new_Y = abs(a - b); + return new_Y; +} + +uint8_t bl_pix_diffnegate_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = 0xff - y1; + b = y2; + return ( 0xff - abs(a - b) ); +} + +uint8_t bl_pix_exclusive_Y(uint8_t y1, uint8_t y2) +{ + return ( y1 + y2 - ((y1 * y2) >> 8) ); +} + + +uint8_t bl_pix_basecolor_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, c, new_Y; + a = y1; + b = y2; + if (a < 16) + a = 16; + if (b < 16) + b = 16; + c = a * b >> 7; + new_Y = c + a * ((0xff - (((0xff - a) * (0xff - b)) >> 7) - c) >> 7); + return new_Y; +} + +uint8_t bl_pix_freeze_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if (b < 16) { + new_Y = 16; + } else { + new_Y = 0xff - ((0xff - a) * (0xff - a)) / b; + } + return new_Y; +} + +uint8_t bl_pix_unfreeze_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if (a < 16) { + new_Y = 16; + } else { + if(b > 235) b = 235; + new_Y = 0xff - ((0xff - b) * (0xff - b)) / a; + } + return new_Y; +} + +uint8_t bl_pix_hardlight_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if (b < 128) { + new_Y = (a * b) >> 7; + } else { + new_Y = 0xff - ((0xff - b) * (0xff - a) >> 7); + } + return new_Y; +} + +uint8_t bl_pix_relativeadd_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, c, d, new_Y; + a = y1; + b = y2; + c = a >> 1; + d = b >> 1; + new_Y = c + d; + return new_Y; +} + +uint8_t bl_pix_relativeadd_C(uint8_t y1, uint8_t y2) +{ + uint8_t new_C; + new_C = (y1 - y2 + 0xff) >> 1; + return new_C; +} + +uint8_t bl_pix_relativesub_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + new_Y = (a - b + 0xff) >> 1; + return new_Y; +} + +uint8_t bl_pix_maxsubsel_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if (b > a) { + new_Y = (b - a + 0xff) >> 1; + } else { + new_Y = (a - b + 0xff) >> 1; + } + return new_Y; +} + +uint8_t bl_pix_minsubsel_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if (b < a) { + new_Y = (b - a + 0xff) >> 1; + } else { + new_Y = (a - b + 0xff) >> 1; + } + return new_Y; +} + +uint8_t bl_pix_addsubsel_Y(uint8_t y1, uint8_t y2) +{ + return ( (y1 + y2) >> 1 ); +} + +uint8_t bl_pix_maxsel_Y(uint8_t y1, uint8_t y2) +{ + return ( (y2>y1 ? y2 : y1 ) ); +} + +uint8_t bl_pix_minsel_Y(uint8_t y1, uint8_t y2) +{ + return ( (y2 < y1 ? y2: y1 )); +} + + +uint8_t bl_pix_dblbneg_Y(uint8_t y1, uint8_t y2) +{ + return ( (y1 + (y2 << 1 ) - 0xff ) ); +} + +uint8_t bl_pix_dblbneg_C(uint8_t y1, uint8_t y2) +{ + return ( (y1 + (y2 << 1 ) - 0xff )); +} + +uint8_t bl_pix_muldiv_Y(uint8_t y1, uint8_t y2) +{ + if( y2 > 235 ) y2 = 235; + if( y1 < 16 ) y1 = 16; + return ( (y1*y1) / (0xff - y2 ) ); +} + +uint8_t bl_pix_add_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if (b < 16) + b = 16; + if (a < 16) + a = 16; + if ((0xff - b) <= 0) { + new_Y = (a * a) >> 8; + } else { + if( b > 235) + b= 235; + new_Y = (a * a) / (0xff - b); + } + return new_Y; +} + +uint8_t bl_pix_relneg_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = 0xff - y2; + if (a < 16) + a = 16; + if (b < 16) + b = y1; + if (b < 16) + b = 16; + new_Y = (a * a) / b; + return new_Y; +} + +uint8_t bl_pix_relneg_C(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_C; + a = y1; + b = 0xff - y2; + if (b < 16) + b = y2; + if (b < 16) + b = 16; + if (a < 16) + a = 16; + new_C = (a >> 1) + (b >> 1); + if (new_C < 16) + new_C = 16; + return new_C; +} + +uint8_t bl_pix_selfreeze_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + + a = y1; + b = y2; + if (a > b) { + if (a < 16) { + new_Y = 16; + } else { + new_Y = 0xff - ((0xff - b) * (0xff - b)) / a; + } + return new_Y; + } + return 0; +} + +uint8_t bl_pix_selunfreeze_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + + a = y1; + b = y2; + if (a > b) { + if (b < 16) { + new_Y = 16; + } else { + if( a > 235 ) a = 235; + new_Y = 0xff - ((0xff - a) * (0xff - a)) / b; + if (new_Y < 16) + new_Y = 16; + } + return new_Y; + } + return 0; +} + +uint8_t bl_pix_seldiff_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b; + a = y1; + b = y2; + if (a > b) { + return (uint8_t) abs(y1 - y2); + } + return y1; +} + + +uint8_t bl_pix_seldiffneg_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + + a = y1; + b = y2; + if (a > b) { + new_Y = 0xff - abs(0xff - a - b); + return new_Y; + } + return 0; +} + +uint8_t bl_pix_swap_Y(uint8_t y1, uint8_t y2) +{ + return y2; +} + +uint8_t bl_pix_swap_C(uint8_t y1, uint8_t y2) +{ + return y2; +} + +uint8_t bl_pix_noswap_C(uint8_t y1, uint8_t y2) +{ + return y1; +} + +uint8_t bl_pix_noswap_Y(uint8_t y1, uint8_t y2) +{ + return y1; +} + +uint8_t bl_pix_add_distorted_Y(uint8_t y1, uint8_t y2) +{ + return ( y1 + y2 ); +} + +uint8_t bl_pix_add_distorted_C(uint8_t y1, uint8_t y2) +{ + return ( y1 + y2 ); +} + +uint8_t bl_pix_sub_distorted_Y(uint8_t y1, uint8_t y2) +{ + uint8_t new_Y, a, b; + a = y1; + b = y2; + new_Y = y1 - y2; + new_Y -= y2; + return new_Y; +} + +uint8_t bl_pix_sub_distorted_C(uint8_t y1, uint8_t y2) +{ + uint8_t new_C; + new_C = y1 - y2; + new_C -= y2; + return new_C; +} + + +uint8_t bl_pix_test3_Y(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_Y; + a = y1; + b = y2; + if (b < 16) + b = 16; + if (a < 16) + a = 16; + new_Y = (a >> 1) + (b >> 1); + return new_Y; +} + +uint8_t bl_pix_test3_C(uint8_t y1, uint8_t y2) +{ + uint8_t a, b, new_C; + a = y1; + b = 0xff - y2; + if (b < 16) + b = y2; + if (a < 16) + a = 16; + new_C = (a >> 1) + (b >> 1); + return new_C; +} + +void _4byte_copy( uint8_t *src, uint8_t *dst, int width,int height, int x_start, int y_start) +{ + unsigned int x = 0, y = 0; + int *in,*out; + + width = width >> 2; + + for(y = y_start; y < height; y++ ) + { + out = (int*) &dst[y*width]; + in = (int*) &src[y*width]; + for(x=x_start;x < width; x++) + { + out[x] =(((in[x] >> 24) & 0xff)) + (((in[x] >> 16) & 0xff) << 8) + (((in[x] >> 8) & 0xff) << 16) + (((in[x]) & 0xff) << 24); + } + } + +} + +int bl_pix_get_color_y(int color_num) +{ + switch (color_num) { + case VJ_EFFECT_COLOR_RED: + return VJ_EFFECT_LUM_RED; + case VJ_EFFECT_COLOR_BLUE: + return VJ_EFFECT_LUM_BLUE; + case VJ_EFFECT_COLOR_GREEN: + return VJ_EFFECT_LUM_GREEN; + case VJ_EFFECT_COLOR_CYAN: + return VJ_EFFECT_LUM_CYAN; + case VJ_EFFECT_COLOR_MAGNETA: + return VJ_EFFECT_LUM_MAGNETA; + case VJ_EFFECT_COLOR_YELLOW: + return VJ_EFFECT_LUM_YELLOW; + case VJ_EFFECT_COLOR_BLACK: + return VJ_EFFECT_LUM_BLACK; + case VJ_EFFECT_COLOR_WHITE: + return VJ_EFFECT_LUM_WHITE; + } + return VJ_EFFECT_LUM_BLACK; +} +int bl_pix_get_color_cb(int color_num) +{ + switch (color_num) { + case VJ_EFFECT_COLOR_RED: + return VJ_EFFECT_CB_RED; + case VJ_EFFECT_COLOR_BLUE: + return VJ_EFFECT_CB_BLUE; + case VJ_EFFECT_COLOR_GREEN: + return VJ_EFFECT_CB_GREEN; + case VJ_EFFECT_COLOR_CYAN: + return VJ_EFFECT_CB_CYAN; + case VJ_EFFECT_COLOR_MAGNETA: + return VJ_EFFECT_CB_MAGNETA; + case VJ_EFFECT_COLOR_YELLOW: + return VJ_EFFECT_CB_YELLOW; + case VJ_EFFECT_COLOR_BLACK: + return VJ_EFFECT_CB_BLACK; + case VJ_EFFECT_COLOR_WHITE: + return VJ_EFFECT_CB_WHITE; + } + return VJ_EFFECT_CB_BLACK; +} + +int bl_pix_get_color_cr(int color_num) +{ + switch (color_num) { + case VJ_EFFECT_COLOR_RED: + return VJ_EFFECT_CR_RED; + case VJ_EFFECT_COLOR_BLUE: + return VJ_EFFECT_CR_BLUE; + case VJ_EFFECT_COLOR_GREEN: + return VJ_EFFECT_CR_GREEN; + case VJ_EFFECT_COLOR_CYAN: + return VJ_EFFECT_CR_CYAN; + case VJ_EFFECT_COLOR_MAGNETA: + return VJ_EFFECT_CR_MAGNETA; + case VJ_EFFECT_COLOR_YELLOW: + return VJ_EFFECT_CR_YELLOW; + case VJ_EFFECT_COLOR_BLACK: + return VJ_EFFECT_CR_BLACK; + case VJ_EFFECT_COLOR_WHITE: + return VJ_EFFECT_CR_WHITE; + } + return VJ_EFFECT_CR_BLACK; +} + + +uint8_t _pf_dneg(uint8_t a, uint8_t b) +{ + uint8_t t = + 255 - ( abs ( (255 - abs((255-a)-a)) - (255-abs((255-b)-b))) ); + return ( abs( abs(t-b) - b )); +} + +uint8_t _pf_lghtn(uint8_t a, uint8_t b) +{ + if( a > b ) return a; + return b; +} + +uint8_t _pf_dneg2(uint8_t a,uint8_t b) +{ + return ( 255 - abs ( (255-a)- b ) ); +} + +uint8_t _pf_min(uint8_t a, uint8_t b) +{ + uint8_t p = ( (b < a) ? b : a); + return ( 255 - abs( (255-p) - b ) ); +} + +uint8_t _pf_max(uint8_t a,uint8_t b) +{ + uint8_t p = ( (b > a) ? b : a); + if( p<=16) p = 16; + return ( 255 - ((255 - b) * (255 - b)) / p); + +} + +uint8_t _pf_pq(uint8_t a,uint8_t b) +{ + if( a <= 16) a = 16; + if( b <= 16) b = 16; + int p = 255 - ((255-a) * (255-a)) / a; + int q = 255 - ((255-b) * (255-b)) / b; + + return ( 255 - ((255-p) * (255 - a)) / q); +} + +uint8_t _pf_none(uint8_t a, uint8_t b) +{ + return a; +} + +_pf _get_pf(int type) +{ + + switch(type) + { + + case 0: return &_pf_dneg; + case 3: return &_pf_lghtn; + case 1: return &_pf_min; + case 2: return &_pf_max; + case 5: return &_pf_pq; + case 6: return &_pf_dneg2; + + } + return &_pf_none; +} + +int calculate_luma_value(uint8_t *Y, int w , int h) { + unsigned int len = (w * h); + unsigned int sum = 0; + unsigned int i = len; + while( i ) { + sum += *(Y++); + i--; + } + return (sum/len); +} + +int calculate_cbcr_value(uint8_t *Cb,uint8_t *Cr, int w, int h) { + unsigned int len = (w * h) >> 1; + unsigned int sum = 0; + unsigned int i = len; + while( i ) { + sum += ( Cb[i] + Cr[i] ) >> 1; + i--; + } + return (sum/len); + +} + +#ifdef HAVE_ASM_MMX + +#define MMX_load8byte_mm7(data)__asm__("\n\t movq %0,%%mm7\n" : "=m" (data):) + +#endif + +void memset_ycbcr( uint8_t *in, + uint8_t *out, + uint8_t val, + unsigned int width, + unsigned int height) +{ + +#ifdef HAVE_ASM_MMX + double mmtemp_d; + uint8_t *mmtemp = (uint8_t*) &mmtemp_d; + int i; + unsigned int len = width * height; + + for(i = 0; i < 8; i++) mmtemp[i] = val; + MMX_load8byte_mm7( mmtemp_d ); + + for(i = 0; i < len; i+=width) + { + double *ipt = (double*) &in[i]; + double *opt = (double*) &out[i]; + int index = 0; + int k = width / 8; + while( index < k ) + { + __asm__( + "\n\t movq %0,%%mm0 \t" + "\n\t movq %1,%%mm1 \t" + "\n\t movq %%mm0,%%mm2 \t" + "\n\t movq %%mm7,%%mm2 \t" + "\n\t movq %%mm2,%0 \t" + : "=m" (opt[index]) + : "m" (ipt[index]) + ); + index ++; + } + } + __asm__("emms" : : ); +#else + memset( in, val, (width*height) ); +#endif +} + +double m_get_radius( int x, int y ) +{ + return (sqrt( (x*x) + (y*y) )); +} +double m_get_angle( int x, int y ) +{ + return (atan2( (float)y,x)); +} + +double m_get_polar_x( double r, double a) +{ + return ( r * cos(a) ); +} +double m_get_polar_y( double r, double a) +{ + return ( r * sin(a) ); +} + +//copied from xine +inline void blur(uint8_t *dst, uint8_t *src, int w, int radius, int dstStep, int srcStep){ + int x; + const int length= radius*2 + 1; + const int inv= ((1<<16) + length/2)/length; + + int sum= 0; + + for(x=0; x>16; + } + + for(; x>16; + } + + for(; x>16; + } +} + +//copied from xine +inline void blur2(uint8_t *dst, uint8_t *src, int w, int radius, int power, int dstStep, int srcStep){ + uint8_t temp[2][4096]; + uint8_t *a= temp[0], *b=temp[1]; + + if(radius){ + blur(a, src, w, radius, 1, srcStep); + for(; power>2; power--){ + uint8_t *c; + blur(b, a, w, radius, 1, 1); + c=a; a=b; b=c; + } + if(power>1) + blur(dst, a, w, radius, dstStep, 1); + else{ + int i; + for(i=0; ihR; + Hg = h->hG; + Hb = h->hB; + + int W = f->width; + int H = f->height; + int r = W * 3; + + veejay_memset( Hr, 0,sizeof(uint32_t) * 256 ); + veejay_memset( Hg, 0,sizeof(uint32_t) * 256 ); + veejay_memset( Hb, 0,sizeof(uint32_t) * 256 ); + + for( i = 0; i < H; i ++ ) + { + for( j = 0; j < r; j += 3 ) + { + Hr[ (rgb[i*r+j] ) ] ++; + Hg[ (rgb[i*r+j+1]) ] ++; + Hb[ (rgb[i*r+j+2]) ] ++; + } + } +} + +static void build_histogram( histogram_t *h, VJFrame *f ) +{ + unsigned int i, len; + uint32_t *H; + uint8_t *p; + + // intensity histogram + H = h->hY; + p = f->data[0]; + len = f->len; + veejay_memset( H, 0, sizeof(uint32_t) * 256 ); + for( i = 0; i < len; i ++ ) + H[ p[i] ] ++; + +} + +static void veejay_lut_calc( uint32_t *h, uint32_t *lut, int intensity, int strength, int len ) +{ + unsigned int i; + unsigned int op0 = 255 - strength; + unsigned int op1 = strength; + lut[0] = h[0]; + for( i = 1; i < 256; i ++ ) + lut[i] = lut[i-1] + h[i]; + for( i = 0; i < 256; i ++ ) + lut[i] = (lut[i] * intensity ) / len; + for( i = 0; i < 256; i ++ ) + lut[i] = (op1 * lut[i] + op0 * i ) >> 8; +} + +static void veejay_blit_histogram( uint8_t *D, uint32_t *h, int len ) +{ + unsigned int i; + for( i = 0; i < 256; i ++ ) + D[i] = (h[i] > 0 ? (len / h[i]) : 0 ); +} + + +static inline void veejay_histogram_qdraw( uint32_t *histi, histogram_t *h, VJFrame *f, uint8_t *plane, int left, int down) +{ + uint8_t lut[256]; + unsigned int i,j,len; + + len = f->len; + veejay_blit_histogram( lut, histi, len ); + + int his_height = f->height/5; + int his_width = f->width/5; + + float sx = his_width/256.0f; + float sy = his_height/256.0f; + +//@ slow! + for ( i = 0; i < 256; i ++ ) + { + for( j = 0; j < 256 ; j ++ ) + { + int dx = j * sx; + int dy = i * sy; + + int pos = (f->height - dy - 1 - down) * f->width + dx + left; + if( plane[pos] != 0xff) + plane[pos] = (lut[j] >= i ? 0xff: 0); + } + } +} + +void veejay_histogram_draw( void *his, VJFrame *org, VJFrame *f, int intensity, int strength ) +{ + histogram_t *h = (histogram_t*) his; + + veejay_histogram_analyze( his, org, 0 ); + veejay_histogram_qdraw( h->hY, h, f, f->data[0],0,0 ); + + + veejay_histogram_equalize( his, org, intensity, strength ); + veejay_histogram_analyze( his, org, 0 ); + veejay_histogram_qdraw( h->hY, h, f, f->data[0],f->width/4 + 10,0 ); +} + +void veejay_histogram_draw_rgb( void *his, VJFrame *f, uint8_t *rgb, int in, int st, int mode ) +{ + histogram_t *h = (histogram_t*) his; + + veejay_histogram_analyze_rgb(his,rgb,f ); + switch(mode) + { + case 0: + veejay_histogram_qdraw( h->hR, h, f, f->data[0], 0,f->height/4 ); + break; + case 1: + veejay_histogram_qdraw( h->hG, h, f, f->data[0], 0,f->height/4 ); + break; + case 2: + veejay_histogram_qdraw( h->hB, h, f, f->data[0], 0,f->height/4 ); + break; + case 3: + veejay_histogram_qdraw( h->hR, h , f, f->data[0], 0, f->height/4 ); + veejay_histogram_qdraw( h->hG, h , f, f->data[0], (f->width/4+10), f->height/4 ); + veejay_histogram_qdraw( h->hB, h, f, f->data[0], (f->width/4+10)*2, f->height/4 ); + break; + } + + veejay_histogram_equalize_rgb( his, f, rgb, in,st, mode ); + veejay_histogram_analyze_rgb(his,rgb,f ); + + switch(mode) + { + case 0: + veejay_histogram_qdraw( h->hR, h,f,f->data[0], 0,0 ); + break; + case 1: + veejay_histogram_qdraw( h->hG, h,f,f->data[0], 0,0); + break; + case 2: + veejay_histogram_qdraw( h->hB, h,f, f->data[0],0,0); + break; + case 3: + veejay_histogram_qdraw( h->hR, h,f,f->data[0], 0, 0 ); + veejay_histogram_qdraw( h->hG, h,f,f->data[0], (f->width/4 + 10),0 ); + veejay_histogram_qdraw( h->hB, h,f,f->data[0], (f->width/4 + 10)*2,0 ); + break; + } +} + +void veejay_histogram_equalize_rgb( void *his, VJFrame *f, uint8_t *rgb, int intensity, int strength, int mode ) +{ + histogram_t *h = (histogram_t*) his; + uint32_t LUTr[256]; + uint32_t LUTg[256]; + uint32_t LUTb[256]; + unsigned int i,j; + unsigned int len = f->len; + + uint32_t r = f->width * 3; + uint32_t H = f->height; + + switch(mode) + { + case 0: + veejay_lut_calc( h->hR, LUTr, intensity , strength , len ); + for( i = 0; i < H; i ++ ) + { + for( j = 0; j < r ; j +=3 ) + rgb[i*r+j] = LUTr[ rgb[i*r+j] ]; + } + break; + case 1: + veejay_lut_calc( h->hG, LUTg, intensity , strength , len ); + for( i = 0; i < H; i ++ ) + { + for( j = 0; j < r; j += 3 ) + rgb[ i*r+j+1 ] = LUTg[rgb[i*r+j+1]]; + } + break; + case 2: + veejay_lut_calc( h->hB, LUTb, intensity , strength , len ); + for( i = 0; i < H; i ++ ) + { + for( j = 0; j < r; j += 3 ) + rgb[i*r+j+2] = LUTb[ rgb[i*r+j+2]]; + } + break; + case 3: + veejay_lut_calc( h->hR, LUTr, intensity , strength , len ); + veejay_lut_calc( h->hG, LUTg, intensity , strength , len ); + veejay_lut_calc( h->hB, LUTb, intensity , strength , len ); + + for( i = 0; i < H; i ++ ) + { + for( j = 0; j < r ; j +=3 ) + { + rgb[i*r+j] = LUTr[ rgb[i*r+j] ]; + rgb[i*r+j+1] = LUTg[rgb[i*r+j+1]]; + rgb[i*r+j+2] = LUTb[ rgb[i*r+j+2]]; + } + } + break; + } +} + +void veejay_histogram_equalize( void *his, VJFrame *f , int intensity, int strength) +{ + histogram_t *h = (histogram_t*) his; + uint32_t LUT[256]; + unsigned int i; + uint8_t *u,*v,*y; + unsigned int len; + + len = f->len; + veejay_lut_calc( h->hY, LUT, intensity, strength, len ); + y = f->data[0]; + for( i = 0; i < len ; i ++ ) + y[i] = LUT[ y[i] ]; +} + +void veejay_histogram_analyze_rgb( void *his, uint8_t *rgb, VJFrame *f ) +{ + histogram_t *h = (histogram_t*) his; + build_histogram_rgb( rgb,h,f ); +} + +void veejay_histogram_analyze( void *his, VJFrame *f, int type ) +{ + histogram_t *h = (histogram_t*) his; + + build_histogram( h, f ); +} + +#ifndef MIN +#define MIN(a,b) ( (a)>(b) ? (b) : (a) ) +#endif +#define min4(a,b,c,d) MIN(MIN(MIN(a,b),c),d) +#define min5(a,b,c,d,e) MIN(MIN(MIN(MIN(a,b),c),d),e) + +#ifndef MAX +#define MAX(a,b) ( (a)>(b) ? (a) : (b) ) +#endif + +#define max4(a,b,c,d) MAX(MAX(MAX(a,b),c),d) + +void veejay_distance_transform8( uint8_t *plane, int w, int h, uint32_t *output) +{ + register unsigned int x,y; + const uint8_t *I = plane; + uint32_t *Id = output; + const uint32_t wid = w - 1; + const uint32_t hei = h - 2; + + for( y = 1; y < hei; y ++ ) + { + for( x = 1; x < wid; x ++ ) + { + if( I[ y * w + x ] ) + Id[ y * w + x ] = min4( + (Id[ (y-1) * w + (x-1) ]) + 1, + (Id[ (y-1) * w + x ]) + 1, + (Id[ (y-1) * w + (x+1) ]) + 1, + (Id[ y * w + (x-1) ]) + 1 ); + } + } + + for( y = hei; y > 1; y -- ) + { + for( x = wid; x > 1; x -- ) + { + if( I[ y * w + x ] ) + Id[ y * w + x ] = min5( + (Id[ (y+1) * w + (x-1) ]) + 1, + Id[ y * w + x ], + (Id[ (y+1) * w + x ]) + 1, + (Id[ y * w + (x + 1) ]) + 1, + (Id[ (y+1) * w + (x+1) ]) + 1 + ); + } + } +} + + + +void veejay_distance_transform( uint32_t *plane, int w, int h, uint32_t *output) +{ + register unsigned int x,y; + const uint32_t *I = plane; + uint32_t *Id = output; + const uint32_t wid = w - 1; + const uint32_t hei = h - 2; + + for( y = 1; y < hei; y ++ ) + { + for( x = 1; x < wid; x ++ ) + { + if( I[ y * w + x ] ) + Id[ y * w + x ] = min4( + (Id[ (y-1) * w + (x-1) ]) + 1, + (Id[ (y-1) * w + x ]) + 1, + (Id[ (y-1) * w + (x+1) ]) + 1, + (Id[ y * w + (x-1) ]) + 1 ); + } + } + + for( y = hei; y > 1; y -- ) + { + for( x = wid; x > 1; x -- ) + { + if( I[ y * w + x ] ) + Id[ y * w + x ] = min5( + (Id[ (y+1) * w + (x-1) ]) + 1, + Id[ y * w + x ], + (Id[ (y+1) * w + x ]) + 1, + (Id[ y * w + (x + 1) ]) + 1, + (Id[ (y+1) * w + (x+1) ]) + 1 + ); + } + } +} + +uint32_t veejay_component_labeling(int w, int h, uint32_t *I , uint32_t *M) +{ + uint32_t label = 0; + uint32_t x,y,i; + uint32_t p1,p2; + uint32_t Mi=0,Ma=0; + uint32_t Eq[5000]; + + uint32_t n_labels = 0; + + for( y = 1; y < (h-1); y ++ ) + { + for ( x = 1; x < (w-1); x ++ ) + { + if( I[ y * w + x] ) + { + p1 = I[ (y-1) * w + x ]; + p2 = I[ y * w + (x-1) ]; + + if( p1 == 0 && p2 == 0 ) + { + label++; + if( label > 5000 ) + return 0; + + I[ y * w + x ] = Eq[ label ] = label; + } else if ( p1 == 0 ) { + I[ y * w + x ] = p2; + } else if ( p2 == 0 ) { + I[ y * w + x ] = p1; + } else if ( p1 == p2 ) { + I[ y * w + x ] = p1; + } else { + + // Mi = min4(p1,p2,p3,p4); + // Ma = max4(p1,p2,p3,p4); + //Mi = MIN( p1,p2 ); + //Ma = MAX( p1,p2 ); + + I[ y * w + x ] = Mi; + + while( Eq[ Ma ] != Ma ) + Ma = Eq[ Ma ]; + while( Eq[ Mi ] != Mi ) + Mi = Eq[ Mi ]; + + if( Ma >= Mi ) + Eq[ Ma ] = Mi; + else + Eq[ Mi ] = Ma; + } + } + } + } + n_labels = 0; + for( i = 1; i <= label; i ++ ) + { + if( Eq[ i ] == i ) { + n_labels ++; + Eq[i] = n_labels; + } + else { + Eq[i] = Eq[ Eq[i] ]; + } + } + + if( n_labels > 5000 ) + return 0; + + for( i = 1; i < n_labels ; i ++ ) + M[ i ] = 0; + + for( y = 0; y < h ; y ++ ) + { + for( x = 0; x < w ; x ++ ) + { + if( I[y * w + x ] ) + { + I[y * w + x ] = Eq[ I[y * w + x] ]; + M[ I[y * w +x ] ]++; + } + } + } + + return n_labels; +} + +static inline int center_of_blob( + uint8_t *img, + int width, + int height, + uint8_t label, + uint32_t *dx, uint32_t *dy, uint32_t *xsize, uint32_t *ysize) +{ + unsigned int i,j; + uint32_t product_row = 0; + uint32_t pixels_row = 0; + uint32_t product_col = 0; + uint32_t pixels_col = 0; + uint32_t pixels_row_c = 0; + uint32_t product_col_c = 0; + + for( i = 0; i < height; i ++ ) + { + pixels_row = 0; + for( j = 0; j < width; j ++ ) + { + if ( img[i * width + j] == label ) + pixels_row++; + } + if( pixels_row > *(xsize) ) + *xsize = pixels_row; + product_row += (i * pixels_row); + pixels_row_c += pixels_row; + } + + for( j = 0; j < width; j ++ ) + { + pixels_col = 0; + for( i = 0; i < height; i ++ ) + { + if( img[i * width + j ] == label ) + pixels_col ++; + } + if( pixels_col > *(ysize) ) + *ysize = pixels_col; + product_col += (j * pixels_col); + product_col_c += pixels_col; + } + + + if( pixels_row_c == 0 || product_col_c == 0 ) + return 0; + + *dy = ( product_row / pixels_row_c ); + *dx = ( product_col / product_col_c ); + + return 1; +} + +int compare_l8( const void *a, const void *b ) +{ + return ( *(int*)a - *(int*)b ); +} + +uint8_t veejay_component_labeling_8(int w, int h, uint8_t *I , uint32_t *M, + uint32_t *XX, + uint32_t *YY, + uint32_t *xsize, + uint32_t *ysize, + int min_blob_weight) +{ + uint8_t label = 0; + uint32_t x,y,i; + uint8_t p1,p2; + uint32_t Mi=0,Ma=0; + uint8_t Eq[256]; + + uint8_t n_labels = 0; + + veejay_memset( Eq, 0, sizeof(Eq) ); + + for( y = 1; y < (h-1); y ++ ) + { + for ( x = 1; x < (w-1); x ++ ) + { + if( I[ y * w + x] ) + { + p1 = I[ (y-1) * w + x ]; + p2 = I[ y * w + (x-1) ]; + + if( p1 == 0 && p2 == 0 ) + { + label++; + if( label > 254 ) + { + veejay_msg(0, "available labels exceeded"); + return 0; + } + I[ y * w + x ] = Eq[ label ] = label; + } else if ( p1 == 0) { + I[ y * w + x ] = p2; + } else if ( p2 == 0 ) { + I[ y * w + x ] = p1; + } else if ( p1 == p2 ) { + I[ y * w + x ] = p1; + } else { + + Mi = MIN( p1,p2 ); + Ma = MAX( p1,p2 ); + + I[ y * w + x ] = Mi; + + while( Eq[ Ma ] != Ma ) + Ma = Eq[ Ma ]; + while( Eq[ Mi ] != Mi ) + Mi = Eq[ Mi ]; + + if( Ma >= Mi ) + Eq[ Ma ] = Mi; + else + Eq[ Mi ] = Ma; + } + } + } + } + n_labels = 0; + for( i = 1; i <= label; i ++ ) + { + if( Eq[ i ] == i ) { + n_labels ++; + Eq[i] = n_labels; + } + else { + Eq[i] = Eq[ Eq[i] ]; + } + } + + if( n_labels > 254 ) + { + veejay_msg(0, "Too many blobs"); + return 0; + } + for( i = 0; i <= n_labels ; i ++ ) + M[ i ] = 0; + + for( y = 0; y < h ; y ++ ) + { + for( x = 0; x < w ; x ++ ) + { + if( I[y * w + x ] ) + { + I[y * w + x ] = Eq[ I[y * w + x] ]; + M[ I[y * w +x ] ]++; + } + } + } + + if( n_labels <= 0 ) + return 0; + + for( i = 1; i <= n_labels; i ++ ) + { + if( (M[i] * 8) >= min_blob_weight ) + { + if(! center_of_blob( I,w,h, i, &(XX[i]), &(YY[i]), &(xsize[i]), &(ysize[i]) ) ) + { + M[i] = 0; + } + } + else + { + M[i] = 0; + } + } + + return n_labels; +} + diff --git a/veejay-server/libvje/effects/common.h b/veejay-server/libvje/effects/common.h new file mode 100644 index 00000000..db11012c --- /dev/null +++ b/veejay-server/libvje/effects/common.h @@ -0,0 +1,319 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg + * + * some portion by: (referenced) + * Copyright (C) 2001 Matthew J. Marjanovic + * + * 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. + */ + + +#include +#include +#include +#include +#include +#include +#define MAX_SCRATCH_FRAMES 25 +#define func_opacity(a,b,p,q) ( ((a * p) + (b * q)) >> 8 ) +#define limit_luma(c) ( c < 16 ? 16 : ( c > 235 ? 235 : c) ) +#define limit_chroma(c) ( c < 16 ? 16 : ( c > 240 ? 240 : c) ) +#define func_multiply(a,b) ( (a * b) >> 8 ) +#define func_additive(a,b) ( a + (2 * b) - 235 ) +#define func_substractive(a,b) ( a + (b - 235) ) + + +extern int pixel_Y_hi_; +extern int pixel_U_hi_; +extern int pixel_Y_lo_; +extern int pixel_U_lo_; + +#define CLAMP_Y( a ) ( a < pixel_Y_lo_ ? pixel_Y_lo_ : (a > pixel_Y_hi_ ? pixel_Y_hi_ : a ) ) +#define CLAMP_UV( a )( a < pixel_U_lo_ ? pixel_U_lo_ : (a > pixel_U_hi_ ? pixel_U_hi_ : a ) ) + +extern void set_pixel_range(uint8_t Yhi,uint8_t Uhi, uint8_t lo); + +#ifndef ARCH_X86 +# define sin_cos(si, co, x) si = sin(x); co = cos(x) +# define fast_sqrt( res,x ) res = sqrt(x) +# define fast_sin(res,x ) res = sin(x) +# define fast_cos(res,x ) res = cos(x) +# define fast_abs(res,x ) res = abs(x) +# define fast_exp(res,x ) res = exp(x) +#else +# define sin_cos(si, co, x) asm ("fsincos" : "=t" (co), "=u" (si) : "0" (x)) +# define fast_sqrt(res,x) asm ("fsqrt" : "=t" (res) : "0" (x)) +# define fast_sin(res,x) asm ("fsin" : "=t" (res) : "0" (x)) +# define fast_cos(res,x) asm ("fcos" : "=t" (res) : "0" (x)) +# define fast_abs(res,x) asm ("fabs" : "=t" (res) : "0" (x)) +# define fast_exp(res,x) asm ("fexp" : "=t" (res) : "0" (x)) +#endif + + + +#define Y_Red ( 0.29900) +#define Y_Green ( 0.58700) +#define Y_Blue ( 0.11400) + +#define U_Red (-0.16874) +#define U_Green (-0.33126) +#define U_Blue ( 0.50000) + +#define V_Red ( 0.50000) +#define V_Green (-0.41869) +#define V_Blue (-0.08131) + +/* RGB to YUV conversion, www.fourcc.org */ + +#define Y_Redco ( 0.257f ) +#define Y_Greenco ( 0.504f ) +#define Y_Blueco ( 0.098f ) + +#define U_Redco ( 0.439f ) +#define U_Greenco ( 0.368f ) +#define U_Blueco ( 0.071f ) + +#define V_Redco ( 0.148f ) +#define V_Greenco (0.291f ) +#define V_Blueco (0.439f ) + + +#define COLOR_rgb2yuv(r,g,b, y,u,v ) \ + {\ + y = (int) ( (Y_Redco * (float) r) + (Y_Greenco * (float)g) + (Y_Blueco * (float)b) + 16.0);\ + u = (int) ( (U_Redco * (float) r) - (U_Greenco * (float)g) + (U_Blueco * (float)b) + 128.0);\ + v = (int) ( -(V_Redco * (float) r) - (V_Greenco * (float)g) + (V_Blueco * (float)b) + 128.0);\ + } + +#define CCIR601_rgb2yuv(r,g,b,y,u,v) \ + {\ + float Ey = (0.299f * (float)r) + (0.587f * (float) g) + (0.114f * (float)b );\ + float Eu = (0.713f * ( ((float)r) - Ey ) );\ + float Ev = (0.564f * ( ((float)b) - Ey ) );\ + y = (int) ( 255.0 * Ey );\ + u = (int) (( 255.0 * Eu ) + 128);\ + v = (int) (( 255.0 * Ev ) + 128);\ +} + +/* + http://www.w3.org/Graphics/JPEG/jfif.txt + YCbCr (256 levels) can be computed directly from 8-bit RGB as follows: + IEC 601 + */ + +/* MJPEGtools lavtools/colorspace.c by matthew */ +#define YCBCR_to_IEC601 ( y, u, v ) \ + {\ + y = y * 219.0 / 256.0 + 16 ;\ + u = (u - 128 ) * 224.0 / 256.0 + 128;\ + v = (v - 128 ) * 224.0 / 256.0 + 128;\ + } + +#define IEC601_to_YCBCR( y, u, v ) \ + {\ + y = ( y - 16 ) / 219.0 * 256.0;\ + u = ( u - 128 ) / 224.0 * 256.0 + 128;\ + v = ( v - 128 ) / 224.0 * 256.0 + 128;\ + } + +static inline int myround(float n) +{ + if (n >= 0) + return (int)(n + 0.5); + else + return (int)(n - 0.5); +} +/* End colorspace.c */ + + +#define GIMP_rgb2yuv(r,g,b,y,u,v)\ + {\ + float Ey = (0.299 * (float)r) + (0.587 * (float)g) + (0.114 * (float) b);\ + float Eu = (-0.168736 * (float)r) - (0.331264 * (float)g) + (0.500 * (float)b) + 128.0;\ + float Ev = (0.500 * (float)r) - (0.418688 * (float)g) - (0.081312 * (float)b)+ 128.0;\ + y = myround(Ey);\ + u = myround(Eu);\ + v = myround(Ev);\ + if( y > 0xff ) y = 0xff ; else if ( y < 0 ) y = 0;\ + if( u > 0xff ) u = 0xff ; else if ( u < 0 ) u = 0;\ + if( v > 0xff ) v = 0xff ; else if ( v < 0 ) v = 0;\ + } + +#define CCYUV_red( r,y,u,v )\ + r = (int)( (float) y + 1.14f * (float) v) + +#define CCYUV_green( g,y,u,v )\ + g = (int)( (float)y - 0.396f * (float)u - 0.581f * (float)v) + +#define CCYUV_blue( b,y,u,v )\ + b = (int)( (float) y + 2.029f * (float) u ) + +enum +{ + GIMP_RGB=0, + CCIR601_RGB=1, + OLD_RGB=2, +}; + +#define _rgb2yuv(r,g,b,y,u,v)\ +{\ + if( rgb_parameter_conversion_type_ == GIMP_RGB )\ + GIMP_rgb2yuv(r,g,b,y,u,v)\ + if( rgb_parameter_conversion_type_ == CCIR601_RGB )\ + CCIR601_rgb2yuv(r,g,b,y,u,v)\ + if( rgb_parameter_conversion_type_ == OLD_RGB )\ + COLOR_rgb2yuv(r,g,b,y,u,v)\ +} + +typedef uint8_t (*pix_func_Y) (uint8_t y1, uint8_t y2); +typedef uint8_t (*pix_func_C) (uint8_t y1, uint8_t y2); +typedef uint8_t (*_pf) (uint8_t a, uint8_t b); + + +pix_func_Y get_pix_func_Y(const int pix_type); /* get blend function for luminance values */ +pix_func_C get_pix_func_C(const int pix_type); /* get blend function for chrominance values */ + +typedef struct +{ + uint8_t *data[3]; + int w; + int h; +} picture_t; + +typedef struct +{ + int w; + int h; +} matrix_t; + +typedef matrix_t (*matrix_f)(int i, int s, int w, int h); +matrix_t matrix_placementA(int photoindex, int size, int w , int h); +matrix_t matrix_placementB(int photoindex, int size, int w , int h); +matrix_f get_matrix_func(int type); + + + +int power_of(int size); +int max_power(int w); + +void frameborder_yuvdata(uint8_t * input_y, uint8_t * input_u, + uint8_t * input_v, uint8_t * putin_y, + uint8_t * putin_u, uint8_t * putin_v, int width, + int height, int top, int bottom, int left, + int right, int shiftw, int shifth); + +void blackborder_yuvdata(uint8_t * input_y, uint8_t * input_u, + uint8_t * input_v, int width, int height, int top, + int bottom, int left, int right, int shiftw, int shifth, int color); + +void +deinterlace(uint8_t *data, int width, int height, int noise); + + +_pf _get_pf(int type); + + +uint8_t bl_pix_additive_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_divide_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_multiply_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_substract_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_softburn_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_inverseburn_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_colordodge_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_mulsub_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_lighten_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_difference_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_diffnegate_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_exclusive_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_basecolor_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_freeze_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_unfreeze_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_hardlight_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_relativeadd_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_relativeadd_C(uint8_t y1, uint8_t y2); +uint8_t bl_pix_relativesub_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_maxsubsel_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_minsubsel_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_addsubsel_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_maxsel_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_minsel_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_dblbneg_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_dblbneg_C(uint8_t y1, uint8_t y2); +uint8_t bl_pix_muldiv_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_add_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_relneg_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_relneg_C(uint8_t y1, uint8_t y2); +uint8_t bl_pix_selfreeze_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_selunfreeze_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_seldiffneg_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_swap_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_swap_C(uint8_t y1, uint8_t y2); +uint8_t bl_pix_test3_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_test3_C(uint8_t y1, uint8_t y2); +uint8_t bl_pix_sub_distorted_C(uint8_t y1, uint8_t y2); +uint8_t bl_pix_sub_distorted_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_add_distorted_C(uint8_t y1, uint8_t y2); +uint8_t bl_pix_add_distorted_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_noswap_Y(uint8_t y1, uint8_t y2); +uint8_t bl_pix_noswap_C(uint8_t y1, uint8_t y2); +uint8_t bl_pix_seldiff_Y(uint8_t y1, uint8_t y2); +void _4byte_copy( uint8_t *src, uint8_t *dst, int width,int height, int x_start, int y_start); +unsigned int fastrand(int val); +int bl_pix_get_color_y(int color_num); +int bl_pix_get_color_cb(int color_num); +int bl_pix_get_color_cr(int color_num); + +void memset_ycbcr( uint8_t *in, + uint8_t *out, + uint8_t val, + unsigned int width, + unsigned int height); + +double m_get_radius(int x, int y); +double m_get_angle(int x, int y); +double m_get_polar_x(double r, double a); +double m_get_polar_y(double r, double a); + +inline void blur(uint8_t *dst, uint8_t *src, int w, int radius, int dstStep, int srcStep); +inline void blur2(uint8_t *dst, uint8_t *src, int w, int radius, int power, int dstStep, int srcStep); + + +extern int motionmap_active(); +extern void motionmap_scale_to( int p1max, int p2max,int p1min,int p2min, int *p1val, int *p2val, int *pos, int *len ); +extern void motionmap_lerp_frame( VJFrame *cur, VJFrame *prev, int N, int n ); +extern void motionmap_store_frame(VJFrame *fx); +extern void motionmap_interpolate_frame(VJFrame *fx, int N, int n); +extern uint8_t *motionmap_bgmap(); +extern uint32_t motionmap_activity(); + +void veejay_histogram_analyze( void *his, VJFrame *f , int t); +void veejay_histogram_del(void *his); +void *veejay_histogram_new(); +void veejay_histogram_draw( void *his, VJFrame *src, VJFrame *dst , int intensity, int strength ); +void veejay_histogram_equalize( void *his, VJFrame *f, int intensity, int strength ); + +void veejay_histogram_analyze_rgb( void *his, uint8_t *rgb, VJFrame *f ); +void veejay_histogram_equalize_rgb( void *his, VJFrame *f, uint8_t *rgb, int in, int st, int mode ); +void veejay_histogram_draw_rgb( void *his, VJFrame *f, uint8_t *rgb, int in, int st, int mode ); + +void veejay_distance_transform( uint32_t *plane, int w, int h, uint32_t *output); +void veejay_distance_transform8( uint8_t *plane, int w, int h, uint32_t *output); + + +uint8_t veejay_component_labeling_8(int w, int h, uint8_t *I , uint32_t *M, uint32_t *XX, uint32_t *YY, + uint32_t *xsize, uint32_t *ysize, int blob); + diff --git a/veejay-server/libvje/effects/complexinvert.c b/veejay-server/libvje/effects/complexinvert.c new file mode 100644 index 00000000..75b7dfd3 --- /dev/null +++ b/veejay-server/libvje/effects/complexinvert.c @@ -0,0 +1,179 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "rgbkey.h" +#include +#include "common.h" +#include "complexinvert.h" + + +vj_effect *complexinvert_init(int w, int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 300; /* angle */ + ve->defaults[1] = 255; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 0; /* b */ + ve->defaults[4] = 2400; /* noise suppression*/ + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 3500; + ve->has_user = 0; + ve->description = "Complex Invert"; + ve->extra_frame = 0; + ve->sub_format = 1; + ve->rgb_conv = 1; + return ve; +} + +void complexinvert_apply(VJFrame *frame, int width, + int height, int i_angle, int r, int g, int b, int i_noise) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + int cb, cr; + int kbg, x1, y1; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle * 0.1f; + float noise_level = (i_noise / 100.0); + unsigned int pos; + uint8_t val, tmp1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + int iy=pixel_Y_lo_,iu=128,iv=128; + _rgb2yuv( r,g,b, iy,iu,iv ); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = frame->data[0]; + fg_cb = frame->data[1]; + fg_cr = frame->data[2]; + + bg_y = frame->data[0]; + bg_cb = frame->data[1]; + bg_cr = frame->data[2]; + + for (pos = 0; pos < frame->len; pos++) + { + short xx, yy; + + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + + if (xx < -128) + xx = -128; + + if (xx > 127) + xx = 127; + + + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + + if (yy < -128) + yy = -128; + + if (yy > 127) + yy = 127; + + + + /* accept angle should not be > 90 degrees + reasonable results between 10 and 80 degrees. + */ + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + + if (abs(yy) < val ) + { + val = (yy * accept_angle_ctg) >> 4; + + x1 = abs(val); + y1 = yy; + tmp1 = xx - x1; + + kbg = (tmp1 * one_over_kc) >> 1; + if (kbg < 0) + kbg = 0; + if (kbg > 255) + kbg = 255; + + val = (tmp1 * kfgy_scale) >> 4; + val = fg_y[pos] - val; + Y[pos] = val; + val = ((x1 * (cb-128)) - (y1 * (cr-128))) >> 7; + Cb[pos] = val; + val = ((x1 * (cr-128)) - (y1 * (cb-128))) >> 7; + Cr[pos] = val; + + val = (yy * yy) + (kg * kg); + if (val < (noise_level * noise_level)) { + kbg = 255; + } + + + val = 255 - ((Y[pos] + (kbg * bg_y[pos])) >> 8); + Y[pos] = CLAMP_Y(val); + + val = 255 - ((Cb[pos] + (kbg * bg_cb[pos])) >> 8); + Cb[pos] = CLAMP_UV(val); + + val = 255 - ( (Cr[pos] + (kbg * bg_cr[pos])) >> 8); + Cr[pos] = CLAMP_UV(val); + } + } +} +void complexinvert_free(){} diff --git a/veejay-server/libvje/effects/complexinvert.h b/veejay-server/libvje/effects/complexinvert.h new file mode 100644 index 00000000..e1f629d2 --- /dev/null +++ b/veejay-server/libvje/effects/complexinvert.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef COMPLEXINVERT_H +#define COMPLEXINVERT_H +#include +#include +#include + +vj_effect *complexinvert_init(); +void complexinvert_apply(VJFrame *frame, int width, + int height, int i_angle, + int red, int green, int blue, int i_noise); +void complexinvert_free(); +#endif diff --git a/veejay-server/libvje/effects/complexopacity.c b/veejay-server/libvje/effects/complexopacity.c new file mode 100644 index 00000000..b8b7cbb6 --- /dev/null +++ b/veejay-server/libvje/effects/complexopacity.c @@ -0,0 +1,222 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#include "rgbkey.h" +#include +#include +#include +#include +#include +#include "common.h" +#include "complexopacity.h" + + +vj_effect *complexopacity_init(int w, int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 80; /* angle */ + ve->defaults[1] = 0; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 255; /* b */ + ve->defaults[4] = 150; /* opacity */ + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 255; + ve->has_user = 0; + ve->description = "Complex Overlay"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->rgb_conv = 1; + return ve; +} + +/* this method decides whether or not a pixel from the fg will be accepted for keying */ +int accept_ipixel(uint8_t fg_cb, uint8_t fg_cr, int cb, int cr, + int accept_angle_tg) +{ + short xx, yy; + /* convert foreground to xz coordinates where x direction is + defined by key color */ + uint8_t val; + + xx = ((fg_cb * cb) + (fg_cr * cr)) >> 7; + + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + + yy = ((fg_cr * cb) - (fg_cb * cr)) >> 7; + + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + + + /* accept angle should not be > 90 degrees + reasonable results between 10 and 80 degrees. + */ + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + if (abs(yy) < val) { + return 1; + } + return 0; +} + +void complexopacity_apply(VJFrame *frame, int width, + int height, int i_angle, int r, int g, int b, + int level ) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + + int cb, cr; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle / 10.0; + //float noise_level = 350.0; + unsigned int pos; + int matrix[5]; + uint8_t val; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + int iy,iu,iv; + _rgb2yuv(r,g,b,iy,iu,iv); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = frame->data[0]; + fg_cb = frame->data[1]; + fg_cr = frame->data[2]; + + bg_y = frame->data[0]; + bg_cb = frame->data[1]; + bg_cr = frame->data[2]; + + for (pos = width + 1; pos < (len) - width - 1; pos++) { + int i = 0; + int smooth = 0; + /* setup matrix + [ - 0 - ] = do not accept. [ - 1 - ] = level 5 , accept only when all n = 1 + [ 0 0 0 ] [ 1 1 1 ] + [ - 0 - ] [ - 1 - ] + + [ - 0 - ] sum of all n is acceptance value for level + [ 1 0 1 ] + [ 0 1 0 ] + */ + matrix[0] = accept_ipixel(fg_cb[pos], fg_cr[pos], cb, cr, accept_angle_tg); /* center pixel */ + matrix[1] = accept_ipixel(fg_cb[pos - 1], fg_cr[pos - 1], cb, cr, accept_angle_tg); /* left pixel */ + matrix[2] = accept_ipixel(fg_cb[pos + 1], fg_cr[pos + 1], cb, cr, accept_angle_tg); /* right pixel */ + matrix[3] = accept_ipixel(fg_cb[pos + width], fg_cr[pos + width], cb, cr, accept_angle_tg); /* top pixel */ + matrix[4] = accept_ipixel(fg_cb[pos - width], fg_cr[pos - width], cb, cr, accept_angle_tg); /* bottom pixel */ + for (i = 0; i < 5; i++) { + if (matrix[i] == 1) + smooth++; + } + if (smooth >= level) { + short xx, yy; + /* get bg/fg pixels */ + uint8_t p1 = (matrix[0] == 0 ? fg_y[pos] : bg_y[pos]); + uint8_t p2 = (matrix[1] == 0 ? fg_y[pos - 1] : bg_y[pos - 1]); + uint8_t p3 = (matrix[2] == 0 ? fg_y[pos + 1] : bg_y[pos + 1]); + uint8_t p4 = + (matrix[3] == 0 ? fg_y[pos + width] : bg_y[pos + width]); + uint8_t p5 = + (matrix[4] == 0 ? fg_y[pos - width] : bg_y[pos - width]); + /* and blur the pixel */ + fg_y[pos] = (p1 + p2 + p3 + p4 + p5) / 5; + + /* convert foreground to xz coordinates where x direction is + defined by key color */ + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + /* see if pixel is within range of color and opacity it */ + if (abs(yy) < val ) { + Y[pos] = 255 - Y[pos]; + Cb[pos] = 255 - Cb[pos]; + Cr[pos] = 255 - Cr[pos]; + } + } + } +} +void complexopacity_free(){} diff --git a/veejay-server/libvje/effects/complexsaturate.c b/veejay-server/libvje/effects/complexsaturate.c new file mode 100644 index 00000000..2d34c3d6 --- /dev/null +++ b/veejay-server/libvje/effects/complexsaturate.c @@ -0,0 +1,225 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "complexsaturate.h" +#include "common.h" + +vj_effect *complexsaturation_init(int w, int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 7; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 300; /* angle */ + ve->defaults[1] = 255; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 0; /* b */ + ve->defaults[4] = 50; /* v_adjust */ + ve->defaults[5] = 50; /* degrees */ + ve->defaults[6] = 2400; /* noise suppression */ + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 360; + + ve->limits[0][5] = 0; + ve->limits[1][5] = 256; + + ve->limits[0][6] = 0; + ve->limits[1][6] = 3500; + ve->has_user = 0; + ve->description = "Complex Saturation"; + ve->extra_frame = 0; + ve->sub_format = 1; + ve->rgb_conv = 1; + return ve; +} + +void complexsaturation_apply(VJFrame *frame, int width, + int height, int i_angle, int r, int g, + int b, int adjust_v, int adjust_degrees, int i_noise) +{ +// double degrees = adjust_degrees * 0.01; +// double dsat = adjust_v * 0.01; + + + float hue = (adjust_degrees/180.0)*M_PI; + float sat = (adjust_v * 0.01); + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + int cb, cr; + int kbg, x1, y1; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle * 0.1f; + float noise_level = (i_noise * 0.01f); + unsigned int pos; + uint8_t val, tmp1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + int iy=pixel_Y_lo_,iu=128,iv=128; + _rgb2yuv( r,g,b, iy,iu,iv ); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = frame->data[0]; + fg_cb = frame->data[1]; + fg_cr = frame->data[2]; + + bg_y = frame->data[0]; + bg_cb = frame->data[1]; + bg_cr = frame->data[2]; + const int s = (int) rint( sin(hue) * (1<<16) * sat ); + const int c = (int) rint( cos(hue) * (1<<16) * sat ); + for (pos = 0; pos < frame->len; pos++) + { + short xx, yy; + + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + + if (xx < -128) + xx = -128; + + if (xx > 127) + xx = 127; + + + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + + if (yy < -128) + yy = -128; + + if (yy > 127) + yy = 127; + + + + /* accept angle should not be > 90 degrees + reasonable results between 10 and 80 degrees. + */ + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + + if (abs(yy) > val) { /* pixel is within selected color range, saturate */ + val = (yy * accept_angle_ctg) >> 4; + + x1 = abs(val); + y1 = yy; + tmp1 = xx - x1; + + kbg = (tmp1 * one_over_kc) >> 1; + if (kbg < 0) + kbg = 0; + if (kbg > 255) + kbg = 255; + + val = (tmp1 * kfgy_scale) >> 4; + val = fg_y[pos] - val; + Y[pos] = val; + val = ((x1 * (cb-128)) - (y1 * (cr-128))) >> 7; + Cb[pos] = val; + val = ((x1 * (cr-128)) - (y1 * (cb-128))) >> 7; + Cr[pos] = val; + + val = (yy * yy) + (kg * kg); + if (val < (noise_level * noise_level)) { + kbg = 255; + } + + val = (Y[pos] + (kbg * bg_y[pos])) >> 8; + Y[pos] = CLAMP_Y(val); + + val = (Cb[pos] + (kbg * bg_cb[pos])) >> 8; + Cb[pos] = CLAMP_UV(val); + + val = (Cr[pos] + (kbg * bg_cr[pos])) >> 8; + Cr[pos] = CLAMP_UV(val); + + int _cb = Cb[pos] - 128; + int _cr = Cr[pos] - 128; + if( _cb != 0 && _cr != 0) + { + /* double co=0.0,si=0.0; + //fast_sqrt( dsaturation, (double) (_cb * cr + _cr * _cr) ); + dsaturation = ccolor_sqrt( (double) _cb, (double) _cr); + dcolor = ccolor_sine( _cb, dsaturation); + if( _cr < 0) { + dcolor = M_PI - dcolor; + } + dcolor += (degrees * M_PI) / 180.0; + dsaturation *= dsat; + sin_cos( co, si , dcolor ); + Cb[pos] = si * dsaturation + 128; + const int u = Cb[i] - 128; + const int v = Cr[i] - 128; + int new_u = (c * u - s * v + (1<<15) + (128<<16)) >> 16; + int new_v = (s * u + c * v + (1<<15) + (128<<16)) >> 16; + if( new_u & 768 ) new_u = (-new_u) >> 31; + if( new_v & 768 ) new_v = (-new_v) >> 31; +Cr[pos] = co * dsaturation + 128;*/ + const int u = Cb[pos] - 128; + const int v = Cr[pos] - 128; + int new_u = (c * u - s * v + (1<<15) + (128<<16)) >> 16; + int new_v = (s * u + c * v + (1<<15) + (128<<16)) >> 16; + if( new_u & 768 ) new_u = (-new_u) >> 31; + if( new_v & 768 ) new_v = (-new_v) >> 31; + Cb[pos] = new_u; + Cr[pos] = new_v; + } + } + + } +} + +void complexsaturate_free(){} diff --git a/veejay-server/libvje/effects/complexsaturate.h b/veejay-server/libvje/effects/complexsaturate.h new file mode 100644 index 00000000..c85de617 --- /dev/null +++ b/veejay-server/libvje/effects/complexsaturate.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef COMPLEXSATURATE_H +#define COMPLEXSATURATE_H +#include +#include +#include + +vj_effect *complexsaturation_init(); +void complexsaturation_apply(VJFrame *frame, int width, + int height, int i_angle, + int red, int green, int blue, int adjust_degrees, int adjust_v, int i_noise ); +void complexsaturate_free(); +#endif diff --git a/veejay-server/libvje/effects/complexsync.c b/veejay-server/libvje/effects/complexsync.c new file mode 100644 index 00000000..3934c5b5 --- /dev/null +++ b/veejay-server/libvje/effects/complexsync.c @@ -0,0 +1,93 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#include "complexsync.h" +#include + +static uint8_t *c_outofsync_buffer[3]; + +vj_effect *complexsync_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = height-1; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->limits[0][2] = 1; + ve->limits[1][2] = (25 * 10); + ve->defaults[0] = 36; + ve->defaults[1] = 1; + ve->defaults[2] = 1; + ve->description = "Out of Sync -Replace selection-"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +int complexsync_malloc(int width, int height) +{ + c_outofsync_buffer[0] = (uint8_t*)vj_yuvalloc(width ,height ); + c_outofsync_buffer[1] = c_outofsync_buffer[0] + (width * height ); + c_outofsync_buffer[2] = c_outofsync_buffer[1] + ( width * height ); + return 1; + +} + +void complexsync_free() { + if(c_outofsync_buffer[0]) + free(c_outofsync_buffer[0]); + c_outofsync_buffer[0] = NULL; + c_outofsync_buffer[1] = NULL; + c_outofsync_buffer[2] = NULL; +} +void complexsync_apply(VJFrame *frame, VJFrame *frame2, int width, int height, int val) +{ + + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + const unsigned int region = width * val; + + veejay_memcpy( c_outofsync_buffer[0], Y, region ); + veejay_memcpy( c_outofsync_buffer[1], Cb, region ); + veejay_memcpy( c_outofsync_buffer[2], Cr, region ); + + veejay_memcpy( Y, Y2, region ); + veejay_memcpy( Cb, Cb2, region ); + veejay_memcpy( Cr, Cr2, region ); + + if( (len - region) > 0) + { + veejay_memcpy( Y + region, c_outofsync_buffer[0], (len-region) ); + veejay_memcpy( Cb + region, c_outofsync_buffer[1], (len - region) ); + veejay_memcpy( Cr + region, c_outofsync_buffer[2], (len - region) ); + } +} diff --git a/veejay-server/libvje/effects/complexsync.h b/veejay-server/libvje/effects/complexsync.h new file mode 100644 index 00000000..c9e426a0 --- /dev/null +++ b/veejay-server/libvje/effects/complexsync.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef COMPLEXSYNC_H +#define COMPLEXSYNC_H +#include +#include +#include +#include + +vj_effect *complexsync_init(int width, int height); +int complexsync_malloc(int w, int h); +void complexsync_free(); +void complexsync_apply(VJFrame *frame, VJFrame *frame2, int width, int height, int val); +#endif diff --git a/veejay-server/libvje/effects/complexthreshold.c b/veejay-server/libvje/effects/complexthreshold.c new file mode 100644 index 00000000..ee0ede66 --- /dev/null +++ b/veejay-server/libvje/effects/complexthreshold.c @@ -0,0 +1,265 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "rgbkey.h" +#include +#include +#include "common.h" +#include "complexthreshold.h" + + +vj_effect *complexthreshold_init(int w, int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 80; /* angle */ + ve->defaults[1] = 0; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 255; /* b */ + ve->defaults[4] = 1; /* smoothen level */ + ve->defaults[5] = 255; /* threshold */ + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][5] = 0; + ve->limits[1][5] = 255; + ve->limits[0][4] = 0; + ve->limits[1][4] = 4; + ve->description = "Complex Threshold (fixme)"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->has_user = 0; + ve->rgb_conv = 1; + return ve; +} + +/* this method decides whether or not a pixel from the fg will be accepted for keying */ +int accept_tpixel(uint8_t fg_cb, uint8_t fg_cr, int cb, int cr, + int accept_angle_tg) +{ + short xx, yy; + /* convert foreground to xz coordinates where x direction is + defined by key color */ + int val; + + xx = ((fg_cb * cb) + (fg_cr * cr)) >> 7; + + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + + yy = ((fg_cr * cb) - (fg_cb * cr)) >> 7; + + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + + + /* accept angle should not be > 90 degrees + reasonable results between 10 and 80 degrees. + */ + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + if (abs(yy) < val) { + return 1; + } + return 0; +} + +void complexthreshold_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int r, int g, int b, + int level, int threshold) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + + int cb, cr; + int kbg, x1, y1; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle / 10.0; + //float noise_level = 350.0; + unsigned int pos; + int matrix[5]; + int val, tmp1; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + int iy,iv,iu; + _rgb2yuv(r,g,b,iy,iu,iv); + _y = (float)iy; + aa = (float)iu; + bb = (float)iv; + + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = Y2; + fg_cb = Cb2; + fg_cr = Cr2; + + bg_y = Y; + bg_cb = Cb; + bg_cr = Cr; + + for (pos = width + 1; pos < (len) - width - 1; pos++) { + int i = 0; + int smooth = 0; + /* setup matrix + [ - 0 - ] = do not accept. [ - 1 - ] = level 5 , accept only when all n = 1 + [ 0 0 0 ] [ 1 1 1 ] + [ - 0 - ] [ - 1 - ] + + [ - 0 - ] sum of all n is acceptance value for level + [ 1 0 1 ] + [ 0 1 0 ] + */ + matrix[0] = accept_tpixel(fg_cb[pos], fg_cr[pos], cb, cr, accept_angle_tg); /* center pixel */ + matrix[1] = accept_tpixel(fg_cb[pos - 1], fg_cr[pos - 1], cb, cr, accept_angle_tg); /* left pixel */ + matrix[2] = accept_tpixel(fg_cb[pos + 1], fg_cr[pos + 1], cb, cr, accept_angle_tg); /* right pixel */ + matrix[3] = accept_tpixel(fg_cb[pos + width], fg_cr[pos + width], cb, cr, accept_angle_tg); /* top pixel */ + matrix[4] = accept_tpixel(fg_cb[pos - width], fg_cr[pos - width], cb, cr, accept_angle_tg); /* bottom pixel */ + for (i = 0; i < 5; i++) { + if (matrix[i] == 1) + smooth++; + } + if (smooth >= level) { + short xx, yy; + /* get bg/fg pixels */ + uint8_t p1 = (matrix[0] == 0 ? fg_y[pos] : bg_y[pos]); + uint8_t p2 = (matrix[1] == 0 ? fg_y[pos - 1] : bg_y[pos - 1]); + uint8_t p3 = (matrix[2] == 0 ? fg_y[pos + 1] : bg_y[pos + 1]); + uint8_t p4 = + (matrix[3] == 0 ? fg_y[pos + width] : bg_y[pos + width]); + uint8_t p5 = + (matrix[4] == 0 ? fg_y[pos - width] : bg_y[pos - width]); + /* and blur the pixel */ + fg_y[pos] = (p1 + p2 + p3 + p4 + p5 + p1) / 6; + + /* convert foreground to xz coordinates where x direction is + defined by key color */ + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + /* see if pixel is within range of color and threshold */ + if (abs(yy) < val && fg_y[pos] > threshold) { + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + val = (yy * accept_angle_ctg) >> 4; + + x1 = abs(val); + y1 = yy; + tmp1 = xx - x1; + + kbg = (tmp1 * one_over_kc) >> 1; + if (kbg < 0) + kbg = 0; + if (kbg > 255) + kbg = 255; + + val = (tmp1 * kfgy_scale) >> 4; + if (val > 0xff) + val = 0xff; + + Y[pos] = fg_y[pos] - val; + /* convert suppressed fg back to cbcr */ + Cb[pos] = ((x1 * cb) - (y1 * cr)) >> 7; + Cr[pos] = ((x1 * cr) - (y1 * cb)) >> 7; + + val = (yy * yy) + (kg * kg); + if (val > 0xff) + val = 0xff; + if (val < (35 * 35)) { + kbg = 255; + } + + Y[pos] = (Y[pos] + (kbg * bg_y[pos])) >> 8; + // Y[pos] = CLAMP_Y(val); + + Cb[pos] = (Cb[pos] + (kbg * bg_cb[pos])) >> 8; + // Cb[pos] = CLAMP_UV(val); + + Cr[pos] = (Cr[pos] + (kbg * bg_cr[pos])) >> 8; + // Cr[pos] = CLAMP_UV(val); + } + } + } +} +void complexthreshold_free(){} diff --git a/veejay-server/libvje/effects/complexthreshold.h b/veejay-server/libvje/effects/complexthreshold.h new file mode 100644 index 00000000..ebfc3db3 --- /dev/null +++ b/veejay-server/libvje/effects/complexthreshold.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef COMPLEXTHRESHOLD_H +#define COMPLEXTHRESHOLD_H +#include +#include +#include + +vj_effect *complexthreshold_init(); +void complexthreshold_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int red, int green, + int blue, int level, int threshold); +void complexthreshold_free(); +#endif diff --git a/veejay-server/libvje/effects/constantblend.c b/veejay-server/libvje/effects/constantblend.c new file mode 100644 index 00000000..b36b3247 --- /dev/null +++ b/veejay-server/libvje/effects/constantblend.c @@ -0,0 +1,75 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +/* Blend + (add, substract,mult, divide) between source image and constant value + cat libvje/internal.h |grep BLEND + Most of the blending parameters ignore p3 and p4 (default values 128) + + */ + +#include +#include +#include +#include "constantblend.h" +#include "common.h" +vj_effect *constantblend_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 31; + ve->limits[0][1] = 0; // scale from 0.0 to 5.0 (only luma) + ve->limits[1][1] = 500; + ve->limits[0][2] = pixel_Y_lo_; + ve->limits[1][2] = pixel_Y_hi_; + ve->defaults[0] = 1; // blend type (additive) + ve->defaults[1] = 110; // scale before blend + ve->defaults[2] = 16; // constant Y + ve->description = "Constant Luminance Blend"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void constantblend_apply( VJFrame *frame, int width, int height, + int type, int scale, int valY ) +{ + unsigned int i; + const int len = (width * height); + const uint8_t y = (uint8_t) valY; + const float s = ((float) scale / 100.0 ); + + pix_func_Y blend_y = get_pix_func_Y( type ); + + uint8_t *Y = frame->data[0]; + + for (i = 0; i < len; i++) + { + int tmp_val =(int)( ((float) *(Y)) * s); + *(Y)++ = blend_y( (uint8_t) ( (uint8_t) tmp_val ) , y ); + } + +} diff --git a/veejay-server/libvje/effects/constantblend.h b/veejay-server/libvje/effects/constantblend.h new file mode 100644 index 00000000..577d3439 --- /dev/null +++ b/veejay-server/libvje/effects/constantblend.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +#ifndef constantblend_H +#define constantblend_H +#include +#include +#include + +vj_effect *constantblend_init(int w, int h); +void constantblend_apply( VJFrame *frame, int width, int height, int a, + int b, int c ); +#endif diff --git a/veejay-server/libvje/effects/contourextract.c b/veejay-server/libvje/effects/contourextract.c new file mode 100644 index 00000000..7c11e610 --- /dev/null +++ b/veejay-server/libvje/effects/contourextract.c @@ -0,0 +1,401 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "diff.h" +#include "common.h" +#include +#include +#include +#include AVUTIL_INC +#include +#include +#include + +#include "softblur.h" +static uint8_t *static_bg = NULL; +static int take_bg_ = 0; +static uint32_t *dt_map = NULL; +static void *shrink_ = NULL; +static sws_template template_; +static VJFrame to_shrink_; +static VJFrame shrinked_; +static int dw_, dh_; +static int x_[255]; +static int y_[255]; +static void *proj_[255]; + +typedef struct +{ + uint32_t *data; + uint8_t *bitmap; + uint8_t *current; +} contourextract_data; + +typedef struct +{ + int x; + int y; +} point_t; + +static point_t **points = NULL; + + +vj_effect *contourextract_init(int width, int height) +{ + //int i,j; + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; /* reverse */ + ve->limits[1][1] = 1; + ve->limits[0][2] = 0; /* show thresholded image / contour */ + ve->limits[1][2] = 2; + ve->limits[0][3] = 0; /* switch to take bg mask */ + ve->limits[1][3] = 1; + ve->limits[0][4] = 1; /* thinning */ + ve->limits[1][4] = 100; + ve->limits[0][5] = 1; /* minimum blob weight */ + ve->limits[1][5] = 5000; + + ve->defaults[0] = 30; + ve->defaults[1] = 0; + ve->defaults[2] = 0; + ve->defaults[3] = 0; + ve->defaults[4] = 3; + ve->defaults[5] = 200; + + ve->description = "Contour extraction"; + ve->extra_frame = 0; + ve->sub_format = 0; + ve->has_user = 1; + ve->user_data = NULL; + return ve; +} + +void contourextract_destroy(void) +{ + if(static_bg) + free(static_bg); + if(dt_map) + free(dt_map); + static_bg = NULL; + dt_map = NULL; + +} + +#define ru8(num)(((num)+8)&~8) +static int nearest_div(int val ) +{ + int r = val % 8; + while(r--) + val--; + return val; +} +int contourextract_malloc(void **d, int width, int height) +{ + contourextract_data *my; + *d = (void*) vj_calloc(sizeof(contourextract_data)); + my = (contourextract_data*) *d; + + dw_ = nearest_div( width / 8 ); + dh_ = nearest_div( height / 8 ); + + my->current = (uint8_t*) vj_calloc( ru8( sizeof(uint8_t) * dw_ * dh_ * 3 ) ); + my->data = (uint32_t*) vj_calloc( ru8(sizeof(uint32_t) * width * height) ); + my->bitmap = (uint8_t*) vj_calloc( ru8(sizeof(uint8_t) * width * height )); + + if(static_bg == NULL) + static_bg = (uint8_t*) vj_calloc( ru8( width + width * height * sizeof(uint8_t)) ); + if(dt_map == NULL ) + dt_map = (uint32_t*) vj_calloc( ru8(width * height * sizeof(uint32_t) + width ) ); + + veejay_memset( &template_, 0, sizeof(sws_template) ); + veejay_memset( proj_, 0, sizeof(proj_) ); + + template_.flags = 1; + + vj_get_yuvgrey_template( &to_shrink_, width, height ); + vj_get_yuvgrey_template( &shrinked_ , dw_, dh_ ); + + shrink_ = yuv_init_swscaler( + &(to_shrink_), + &(shrinked_), + &template_ , + yuv_sws_get_cpu_flags() ); + + points = (point_t**) vj_calloc( sizeof(point_t*) * 12000 ); + int i; + for( i = 0; i < 12000; i ++ ) + { + points[i] = (point_t*) vj_calloc( sizeof(point_t) ); + } + + veejay_memset( x_, 0, sizeof(x_) ); + veejay_memset( y_, 0, sizeof(y_) ); + + return 1; +} + +void contourextract_free(void *d) +{ + if(d) + { + contourextract_data *my = (contourextract_data*) d; + if(my->data) free(my->data); + if(my->current) free(my->current); + if(my->bitmap) free(my->bitmap); + free(d); + } + + if( shrink_ ) + { + yuv_free_swscaler( shrink_ ); + shrink_ = NULL; + } + + int i; + for( i = 0; i < 255; i++ ) + if( proj_[i] ) + viewport_destroy( proj_[i] ); + for( i = 0; i < 12000; i ++ ) + { + if(points[i]) + free(points[i]); + } + free(points); + + d = NULL; +} + +void contourextract_prepare(void *user, uint8_t *map[3], int width, int height) +{ + if(!static_bg ) + { + veejay_msg(0,"FX \"Map B to A (substract background mask)\" not initialized"); + return; + } + + veejay_memcpy( static_bg, map[0], (width*height)); + + VJFrame tmp; + veejay_memset( &tmp, 0, sizeof(VJFrame)); + tmp.data[0] = static_bg; + tmp.width = width; + tmp.height = height; + softblur_apply( &tmp, width,height,0); + + veejay_msg(0, "Snapped and softblurred current frame to use as background mask"); +} + +static void binarify( uint8_t *bm, uint32_t *dst, uint8_t *bg, uint8_t *src,int threshold,int reverse, const int len ) +{ + int i; + if(!reverse) + { + for( i = 0; i < len; i ++ ) + { + if ( abs(bg[i] - src[i]) <= threshold ) + { dst[i] = 0; bm[i] = 0; } + else + { dst[i] = 1; bm[i] = 0xff; } + } + + } + else + { + for( i = 0; i < len; i ++ ) + { + if ( abs(bg[i] - src[i]) >= threshold ) + { dst[i] = 0; bm[i] = 0; } + else + { dst[i] = 1; bm[i] = 0xff; } + + } + } +} + +static void contourextract_centroid() +{ + +} + +static int bg_frame_ = 0; + +extern void vj_composite_transform( void *coords, int points, int blob_id, int cx , int cy, int w, int h, int num_objects,uint8_t *plane); +extern int vj_composite_active(); + +void contourextract_apply(void *ed, VJFrame *frame,int width, int height, + int threshold, int reverse,int mode, int take_bg, int feather, int min_blob_weight) +{ + + unsigned int i,j,k; + const uint32_t len = frame->len; + const uint32_t uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + uint32_t cx[256]; + uint32_t cy[256]; + uint32_t xsize[256]; + uint32_t ysize[256]; + + float sx = (float) width / (float) dw_; + float sy = (float) height / (float) dh_; + float sw = (float) sqrt( sx * sy ); + + veejay_memset( cx,0,sizeof(cx)); + veejay_memset( cy,0,sizeof(cy)); + + veejay_memset( xsize,0,sizeof(xsize)); + veejay_memset( ysize,0,sizeof(ysize)); + + contourextract_data *ud = (contourextract_data*) ed; + + if( take_bg != take_bg_ ) + { + veejay_memcpy( static_bg, frame->data[0], frame->len ); + take_bg_ = take_bg; + bg_frame_ ++; + return; + } + if( bg_frame_ > 0 && bg_frame_ < 4 ) + { + for( i = 0 ; i < len ; i ++ ) + { + static_bg[i] = (static_bg[i] + Y[i] ) >> 1; + } + bg_frame_ ++; + return; + } + + int packets = 0; + + //@ clear distance transform map + veejay_memset( dt_map, 0 , len * sizeof(uint32_t) ); + + //@ todo: optimize with mmx + binarify( ud->bitmap, ud->data, static_bg, frame->data[0], threshold, reverse,len ); + + if(mode==1) + { + //@ show difference image in grayscale + veejay_memcpy( Y, ud->bitmap, len ); + veejay_memset( Cb, 128, uv_len ); + veejay_memset( Cr, 128, uv_len ); + vj_dummy_send(); + return; + } + + //@ calculate distance map + veejay_distance_transform( ud->data, width, height, dt_map ); + + to_shrink_.data[0] = ud->bitmap; + shrinked_.data[0] = ud->current; + + uint32_t blobs[255]; + + veejay_memset( blobs, 0, sizeof(blobs) ); + + yuv_convert_and_scale_grey( shrink_, &to_shrink_, &shrinked_ ); + + uint32_t labels = veejay_component_labeling_8(dw_,dh_, shrinked_.data[0], blobs, cx,cy,xsize,ysize, + min_blob_weight); + + veejay_memset( Y, 0, len ); + veejay_memset( Cb , 128, uv_len); + veejay_memset( Cr , 128, uv_len ); + + int num_objects = 0; + for( i = 1 ; i <= labels; i ++ ) + if( blobs[i] ) + num_objects ++; + + + //@ Iterate over blob's bounding boxes and extract contours + for( i = 1; i <= labels; i ++ ) + { + if( blobs[i] > 0 ) + { + int nx = cx[i] * sx; + int ny = cy[i] * sy; + int size_x = xsize[i] * sx; + int size_y = ysize[i] * sy * 0.5; + int x1 = nx - size_x; + int y1 = ny - size_y; + int x2 = nx + size_y; + int y2 = ny + size_y; + int n_points = 0; + int center = 0; + int dx1 = 0,dy1=0; + + + if( x1 < 0 ) x1 = 0; else if ( x1 > width ) x1 = width; + if( x2 < 0 ) x2 = 0; else if ( x2 > width ) x2 = width; + if( y1 < 0 ) y1 = 0; else if ( y1 >= height ) y1 = height -1; + if( y2 < 0 ) y2 = 0; else if ( y2 >= height ) y2 = height -1; + + + for( k = y1; k < y2; k ++ ) + { + for( j = x1; j < x2; j ++ ) + { + //@ use distance transform map to find centroid (fuzzy) + if( dt_map[ (k * width + j) ] > center ) + { + center = dt_map[ (k* width +j) ]; + dx1 = j; + dy1 = k; + } + if( dt_map[ (k * width + j) ] == feather ) + { + Y[ (k * width +j)] = 0xff; + points[ n_points ]->x = j; + points[ n_points ]->y = k; + n_points++; + if( n_points >= 11999 ) + { + veejay_msg(0, "Too many points in contour"); + return; + } + } + } + } + if( vj_composite_active() ) + { + packets ++; + vj_composite_transform( (void*) points, n_points, i,dx1,dy1, width,height,num_objects,(mode == 2 ? Y: NULL)); + } + } + } + + if(!packets) + vj_dummy_send(); + +} + + + + diff --git a/veejay-server/libvje/effects/contourextract.h b/veejay-server/libvje/effects/contourextract.h new file mode 100644 index 00000000..0f7a9fd1 --- /dev/null +++ b/veejay-server/libvje/effects/contourextract.h @@ -0,0 +1,34 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CONTEFFECT_H +#define CONTEFFECT_H +#include +#include +#include + +vj_effect *contourextract_init(int width, int height); +void contourextract_free(void *d); +int contourextract_malloc(void **c, int w, int h); +void contourextract_prepare(void *d, uint8_t *map[3], int w, int h); +void contourextract_apply(void *d , VJFrame *frame,int width, int height, + int th, int reverse, int show, int take, int feather, int blob); +void contourextract_destroy(); +#endif diff --git a/veejay-server/libvje/effects/contrast.c b/veejay-server/libvje/effects/contrast.c new file mode 100644 index 00000000..09023ed9 --- /dev/null +++ b/veejay-server/libvje/effects/contrast.c @@ -0,0 +1,109 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "contrast.h" +#include "common.h" +vj_effect *contrast_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults[0] = 2; /* type */ + ve->defaults[1] = 125; + ve->defaults[2] = 200; + ve->limits[0][0] = 0; + ve->limits[1][0] = 2; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->description = "Contrast"; + ve->has_user = 0; + ve->extra_frame = 0; + ve->sub_format = 0; + + return ve; +} + +/* also from yuvdenoise */ +void contrast_cb_apply(VJFrame *frame, int width,int height, int *s) { + unsigned int r; + register int cb; + register int cr; + const int uv_len = frame->uv_len; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + for(r=0; r < uv_len; r++) { + cb = Cb[r]; + cb -= 128; + cb *= s[2]; + cb = (cb + 50)/100; + cb += 128; + + cr = Cr[r]; + cr -= 128; + cr *= s[2]; + cr = (cr + 50)/100; + cr += 128; + + Cb[r] = CLAMP_UV(cb); + Cr[r] = CLAMP_UV(cr); + } +} + +void contrast_y_apply(VJFrame *frame, int width, int height, int *s) { + unsigned int r; + register int m; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + + for(r=0; r < len; r++) { + m = Y[r]; + m -= 128; + m *= s[1]; + m = (m + 50)/100; + m += 128; + Y[r] = CLAMP_Y(m); + } + +} + +void contrast_apply(VJFrame *frame, int width, int height, int *s ) { + + switch(s[0]) { + case 0: + contrast_y_apply(frame, width,height, s); + break; + case 1: + contrast_cb_apply(frame,width,height,s); + break; + case 2: + contrast_y_apply(frame,width,height,s); + contrast_cb_apply(frame,width,height,s); + break; + } +} + +void contrast_free(){} diff --git a/veejay-server/libvje/effects/contrast.h b/veejay-server/libvje/effects/contrast.h new file mode 100644 index 00000000..89be1eb6 --- /dev/null +++ b/veejay-server/libvje/effects/contrast.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CONTRAST_H +#define CONTRAST_H +#include +#include +#include + +vj_effect *contrast_init(); + + +void contrast_apply(VJFrame *frame, int w, int h, int *t); + +void contrast_free(); +#endif diff --git a/veejay-server/libvje/effects/crosspixel.c b/veejay-server/libvje/effects/crosspixel.c new file mode 100644 index 00000000..9682b3fc --- /dev/null +++ b/veejay-server/libvje/effects/crosspixel.c @@ -0,0 +1,146 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "crosspixel.h" +#include "common.h" +#include + +static uint8_t *cross_pixels[3]; + +vj_effect *crosspixel_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + ve->limits[0][1] = 1; + ve->limits[1][1] = 40; + ve->defaults[0] = 0; + ve->defaults[1] = 2; + ve->description = "Pixel Raster"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} +// FIXME private + +int crosspixel_malloc(int w, int h) +{ + cross_pixels[0] = (uint8_t*)vj_yuvalloc(w,h ); + cross_pixels[1] = cross_pixels[0] + (w * h ); + cross_pixels[2] = cross_pixels[1] + (w * h); + return 1; +} + +void crosspixel_free() { + if(cross_pixels[0]) + free(cross_pixels[0]); + cross_pixels[0] = NULL; + cross_pixels[1] = NULL; + cross_pixels[2] = NULL; +} + +void crosspixel_apply(VJFrame *frame, int w, int h, int t,int v) { + unsigned int x,y,pos; + const unsigned int vv = v * 2; // only even numbers + const unsigned int u_vv = vv >> frame->shift_h; // sfhit = / 2, shift_v = 2 + + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + const int uv_width = frame->uv_width; + const int uv_height = frame->uv_height; + + unsigned int p = 0; + + veejay_memcpy( cross_pixels[0], Y, len); + veejay_memcpy( cross_pixels[1], Cb, uv_len); + veejay_memcpy( cross_pixels[2], Cr, uv_len); + + if(t==0) { + veejay_memset(Y, pixel_Y_lo_, len); + veejay_memset(Cb, 128, uv_len); + veejay_memset(Cr, 128, uv_len); + } + else + { + veejay_memset(Y, 235, len); + veejay_memset(Cb, 128, uv_len); + veejay_memset(Cr, 128, uv_len); + } + + for(y=0; y < (h>>1); y++) { + if( (y%vv)==1) { + for(x=0; x < w; x+=vv) { + for(p=0; p < vv; p++) { + pos = (x+p) + ( y * w ); + Y[(x+(y*w))] = cross_pixels[0][pos]; + } + } + } + } + + for(y=0; y < (uv_height >> frame->shift_v); y++) { + if( (y%u_vv)==1) { + for(x=0; x < uv_width; x+=u_vv) { + for(p=0; p < u_vv; p++) { + pos = (x+p) + ( y * uv_width ); + Cb[(x+(y*uv_width))] = cross_pixels[1][pos]; + Cr[(x+(y*uv_width))] = cross_pixels[2][pos]; + } + } + } + } + + + for(y=(h>>1); y < h; y++) { + if( (y%vv)==1) { + for(x=0; x < w; x+=vv) { + for(p=0; p < vv; p++) { + pos = (x+p) + ( y * w ); + Y[(x+(y*w))] = cross_pixels[0][pos]; + } + } + } + } + for(y=(uv_height >> frame->shift_v); y < uv_height; y++) { + if( (y%u_vv)==1) { + for(x=0; x < uv_width; x+=u_vv) { + for(p=0; p < u_vv; p++) { + pos = (x+p) + ( y * uv_width ); + Cb[(x+(y*uv_width))] = cross_pixels[1][pos]; + Cr[(x+(y*uv_width))] = cross_pixels[2][pos]; + } + } + } + } + + +} + + diff --git a/veejay-server/libvje/effects/crosspixel.h b/veejay-server/libvje/effects/crosspixel.h new file mode 100644 index 00000000..07fc3b94 --- /dev/null +++ b/veejay-server/libvje/effects/crosspixel.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef CROSSPIXEL_H +#define CROSSPIXEL_H +#include +#include +#include +#include + +vj_effect *crosspixel_init(int w, int h); +int crosspixel_malloc(int w, int h); +void crosspixel_free(); +void crosspixel_apply(VJFrame *frame, int width, int height, int type, int val); +#endif diff --git a/veejay-server/libvje/effects/cutstop.c b/veejay-server/libvje/effects/cutstop.c new file mode 100644 index 00000000..a6eca156 --- /dev/null +++ b/veejay-server/libvje/effects/cutstop.c @@ -0,0 +1,140 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * vvCutStop - ported from vvFFPP_basic + * Copyright(C)2005 Maciek Szczesniak + * + * 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. +*/ +#include +#include +#include "common.h" +#include "split.h" +#include +#include + +static uint8_t *vvcutstop_buffer[3]; +static unsigned int frq_cnt; + +vj_effect *cutstop_init(int width , int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 40; // treshold + ve->defaults[1] = 50; // hold frame freq + ve->defaults[2] = 0; // cut mode + ve->defaults[3] = 0; // hold front/back + + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 1; + + ve->description = "vvCutStop"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + + frq_cnt = 256; + + return ve; +} + +int cutstop_malloc(int width, int height) +{ + vvcutstop_buffer[0] = (uint8_t*)vj_yuvalloc(width,height); + vvcutstop_buffer[1] = vvcutstop_buffer[0] + (width * height ); + vvcutstop_buffer[2] = vvcutstop_buffer[1] + (width * height ); + veejay_memset( vvcutstop_buffer[1],128,(width*height)); + veejay_memset( vvcutstop_buffer[2],128,(width*height)); + return 1; +} + +void cutstop_free() { + if(vvcutstop_buffer[0]) + free(vvcutstop_buffer[0]); + vvcutstop_buffer[0] = NULL; + vvcutstop_buffer[1] = NULL; + vvcutstop_buffer[2] = NULL; +} + + +void cutstop_apply( VJFrame *frame, int width, int height, int threshold, int freq, int cutmode, int holdmode) { + int i=0; + const unsigned int len = frame->len; + + uint8_t *Yb = vvcutstop_buffer[0]; + uint8_t *Ub = vvcutstop_buffer[1]; + uint8_t *Vb = vvcutstop_buffer[2]; + uint8_t *Yd = frame->data[0]; + uint8_t *Ud = frame->data[1]; + uint8_t *Vd = frame->data[2]; + + frq_cnt = frq_cnt + freq; + + if (freq == 255 || frq_cnt > 255) { + veejay_memcpy(Yb, Yd, len); + veejay_memcpy(Ub, Ud, len); + veejay_memcpy(Vb, Vd, len); + frq_cnt = 0; + } + // moved cutmode & holdmode outside loop + if(cutmode && !holdmode) + { + for( i = 0; i < len; i ++ ) + if( threshold > Yb[i] ) + { + Yd[i] = Yb[i]; Ud[i] = Ub[i]; Vd[i] = Vb[i]; + } + } + if(cutmode && holdmode) + { + for( i = 0; i < len; i ++ ) + if( threshold > Yd[i] ) + { + Yd[i] = Yb[i]; Ud[i] = Ub[i]; Vd[i] = Vb[i]; + } + } + if(!cutmode && holdmode) + { + for( i =0 ; i < len; i ++ ) + if( threshold < Yd[i]) + { + Yd[i] = Yb[i]; Ud[i] = Ub[i]; Vd[i] = Vb[i]; + } + } + if(!cutmode && !holdmode) + { + for( i = 0; i < len; i ++ ) + if(threshold < Yb[i]) + { + Yd[i] = Yb[i]; Ud[i] = Ub[i]; Vd[i] = Vb[i]; + } + } + +} + diff --git a/veejay-server/libvje/effects/cutstop.h b/veejay-server/libvje/effects/cutstop.h new file mode 100644 index 00000000..bbacf957 --- /dev/null +++ b/veejay-server/libvje/effects/cutstop.h @@ -0,0 +1,14 @@ +#ifndef CUTSTOP_H +#define CUTSTOP_H +#include +void cutstop_free() ; + +vj_effect *cutstop_init(int width , int height); + +int cutstop_malloc(int width, int height); + +void cutstop_apply( VJFrame *frame, + int width, int height, int treshold, + int freq, int cutmode, int holdmode); + +#endif diff --git a/veejay-server/libvje/effects/deinterlace.c b/veejay-server/libvje/effects/deinterlace.c new file mode 100644 index 00000000..0e6a9c89 --- /dev/null +++ b/veejay-server/libvje/effects/deinterlace.c @@ -0,0 +1,56 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "common.h" +#include "deinterlace.h" + +vj_effect *deinterlace_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->defaults[0] = 0; + + ve->description = "Deinterlace (yuvkineco)"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void deinterlace_apply(VJFrame *frame, int width, int height, int val) +{ + const unsigned int uv_width = frame->uv_width; + const unsigned int uv_height = frame->uv_height; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + deinterlace( Y, width,height,val); + deinterlace( Cb, uv_width,uv_height,val); + deinterlace( Cr, uv_width,uv_height,val); +} + +void deinterlace_free(){} diff --git a/veejay-server/libvje/effects/deinterlace.h b/veejay-server/libvje/effects/deinterlace.h new file mode 100644 index 00000000..eee7de8c --- /dev/null +++ b/veejay-server/libvje/effects/deinterlace.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DEINTERLACE_H +#define DEINTERLACE_H +#include +#include +#include + +vj_effect *deinterlace_init(); +void deinterlace_apply(VJFrame *frame, int width, int height, int val); +void deinterlace_free(); +#endif diff --git a/veejay-server/libvje/effects/dices.c b/veejay-server/libvje/effects/dices.c new file mode 100644 index 00000000..730e4e0a --- /dev/null +++ b/veejay-server/libvje/effects/dices.c @@ -0,0 +1,182 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + * + * This Effect was ported from: + * EffecTV - Realtime Digital Video Effector + * Copyright (C) 2001-2002 FUKUCHI Kentaro + * + * dice.c: a 'dicing' effect + * copyright (c) 2001 Sam Mertens. This code is subject to the provisions of + * the GNU Public License. + * + */ +#include +#include +#include +#include "dices.h" + +static int g_map_width = 0; +static int g_map_height = 0; +static int g_cube_size = 0; +static int g_cube_bits = 0; +static uint8_t *g_dicemap=NULL; + +void dice_create_map(int w, int h); + +typedef enum _dice_dir { + Up = 0, + Right = 1, + Down = 2, + Left = 3, +} DiceDir; + +vj_effect *dices_init(int width, int height) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 4; + ve->limits[0][0] = 0; + ve->limits[1][0] = 5; + ve->description = "Dices (EffectTV)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} +// FIXME: private +int dices_malloc(int width, int height) +{ + g_dicemap = (uint8_t *) vj_malloc(sizeof(uint8_t) * width * height); + if(!g_dicemap) return 0; + dice_create_map(width, height); + return 1; +} + +void dices_free() { + if(g_dicemap) + free(g_dicemap); + g_dicemap = NULL; +} + +unsigned int dices_fastrand_val; +/* effectv's rand val */ +unsigned int dices_fastrand() +{ + return (dices_fastrand_val = dices_fastrand_val * 1103515245 + 12345); +} + +void dice_create_map(int w, int h) +{ + int k,x, y, i = 0; + int maplen = (w * h); + g_map_height = h >> g_cube_bits; + g_map_width = w >> g_cube_bits; + g_cube_size = 1 << g_cube_bits; + maplen = maplen / (g_map_height * g_map_width); + for( k = 0; k < maplen;k++) { + for (y = 0; y < g_map_height; y++) { + for (x = 0; x < g_map_width; x++) { + //g_dicemap[i] = j++; + //if(j==3) j=0; + g_dicemap[i] = ((1 + (rand() * (i + y))) & 0x03); + i++; + } + } + } +// fprintf(stderr, "created map of %d, %d did %d in dicemap, total is %d\n", +// w,h,i,(w*h)); +} + +void dices_apply( void* data, VJFrame *frame, int width, int height, + int cube_bits) +{ + + int i = 0, map_x, map_y, map_i = 0, base, dx, dy, di; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + if (cube_bits != g_cube_bits) { + g_cube_bits = cube_bits; + dice_create_map(width, height); + } + //printf("g_cube_bits = %d, g_cube_size= %d range = %d, %d\n", g_cube_bits, g_cube_size, g_map_width,g_map_height); + + + for (map_y = 0; map_y < g_map_height; map_y++) { + for (map_x = 0; map_x < g_map_width; map_x++) { + base = (map_y << g_cube_bits) * width + (map_x << g_cube_bits); + switch (g_dicemap[map_i]) { + case Left: + for (dy = 0; dy < g_cube_size; dy++) { + i = base + dy * width; + for (dx = 0; dx < g_cube_size; dx++) { + di = base + (dx * width) + (g_cube_size - dy - 1); + Y[di] = Y[i]; + Cb[di] = Cb[i]; + Cr[di] = Cr[i]; + i++; + } + } + break; + case Down: + for (dy = 0; dy < g_cube_size; dy++) { + di = base + dy * width; + i = base + (g_cube_size - dy - 1) * width + + g_cube_size; + for (dx = 0; dx < g_cube_size; dx++) { + i--; + Y[di] = Y[i]; + Cb[di] = Cb[i]; + Cr[di] = Cr[i]; + di++; + } + } + break; + case Right: + for (dy = 0; dy < g_cube_size; dy++) { + i = base + (dy * width); + for (dx = 0; dx < g_cube_size; dx++) { + di = base + dy + (g_cube_size - dx - 1) * width; + Y[di] = Y[i]; + Cb[di] = Cb[i]; + Cr[di] = Cr[i]; + i++; + } + } + break; + case Up: + for( dy = 0; dy < g_cube_size ; dy ++ ) + { + i = base + dy * width; + for( dx = 0; dx < g_cube_size ; dx ++ ) + { + Y[di] = Y[i]; Cb[di] = Cb[i]; Cr[di] = Cr[i]; i ++; + } + } + break; + } + map_i++; + } + } +} diff --git a/veejay-server/libvje/effects/dices.h b/veejay-server/libvje/effects/dices.h new file mode 100644 index 00000000..efc2a61e --- /dev/null +++ b/veejay-server/libvje/effects/dices.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DICES_H +#define DICES_H +#include +#include +#include + +vj_effect *dices_init(int width, int height); +int dices_malloc(int w, int h); +void dices_free(); +void dices_apply( void * data, VJFrame *frame, int width, int height, + int cube_bits); +#endif diff --git a/veejay-server/libvje/effects/diff.c b/veejay-server/libvje/effects/diff.c new file mode 100644 index 00000000..0222e170 --- /dev/null +++ b/veejay-server/libvje/effects/diff.c @@ -0,0 +1,256 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "diff.h" +#include "common.h" +#include +#include +#include +#include AVUTIL_INC +#include +#include +#include "softblur.h" +static uint8_t *static_bg = NULL; +static int take_bg_ = 0; +static int *dt_map = NULL; + +typedef struct +{ + uint8_t *data; + uint8_t *current; +} diff_data; + +vj_effect *diff_init(int width, int height) +{ + //int i,j; + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; /* reverse */ + ve->limits[1][1] = 1; + ve->limits[0][2] = 0; /* show mask */ + ve->limits[1][2] = 2; + ve->limits[0][3] = 0; /* switch to take bg mask */ + ve->limits[1][3] = 1; + ve->limits[0][4] = 1; /* thinning */ + ve->limits[1][4] = 100; + + ve->defaults[0] = 30; + ve->defaults[1] = 0; + ve->defaults[2] = 2; + ve->defaults[3] = 0; + ve->defaults[4] = 5; + + ve->description = "Map B to A (substract background mask)"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->has_user = 1; + ve->user_data = NULL; + return ve; +} + +void diff_destroy(void) +{ + if(static_bg) + free(static_bg); + if(dt_map) + free(dt_map); + static_bg = NULL; + dt_map = NULL; + +} + +#define ru8(num)(((num)+8)&~8) + +int diff_malloc(void **d, int width, int height) +{ + diff_data *my; + *d = (void*) vj_calloc(sizeof(diff_data)); + my = (diff_data*) *d; + my->data = (uint8_t*) vj_calloc( ru8(sizeof(uint8_t) * width * height) ); +// my->current = my->data + (width*height); + + if(static_bg == NULL) + static_bg = (uint8_t*) vj_calloc( ru8( width + width * height * sizeof(uint8_t)) ); + if(dt_map == NULL ) + dt_map = (uint32_t*) vj_calloc( ru8(width * height * sizeof(uint32_t) + width ) ); + return 1; +} + +void diff_free(void *d) +{ + if(d) + { + diff_data *my = (diff_data*) d; + if(my->data) free(my->data); + free(d); + } + d = NULL; +} + +void diff_prepare(void *user, uint8_t *map[3], int width, int height) +{ + if(!static_bg ) + { + veejay_msg(0,"FX \"Map B to A (substract background mask)\" not initialized"); + return; + } + + veejay_memcpy( static_bg, map[0], (width*height)); + + VJFrame tmp; + veejay_memset( &tmp, 0, sizeof(VJFrame)); + tmp.data[0] = static_bg; + tmp.width = width; + tmp.height = height; + softblur_apply( &tmp, width,height,0); + + veejay_msg(0, "Snapped and softblurred current frame to use as background mask"); +} + +static void binarify( uint8_t *dst, uint8_t *bg, uint8_t *src,int threshold,int reverse, const int len ) +{ + int i; + + if(!reverse) + { + for( i = 0; i < len; i ++ ) + { + if ( abs(bg[i] - src[i]) <= threshold ) + dst[i] = 0; + else + dst[i] = 0xff; + } + + } + else + { + for( i = 0; i < len; i ++ ) + { + if ( abs(bg[i] - src[i]) >= threshold ) + dst[i] = 0; + else + dst[i] = 0xff; + + } + } +} + + +void diff_apply(void *ed, VJFrame *frame, + VJFrame *frame2, int width, int height, + int threshold, int reverse,int mode, int take_bg, int feather) +{ + + unsigned int i; + const uint32_t len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + diff_data *ud = (diff_data*) ed; + + + if( take_bg != take_bg_ ) + { + veejay_memcpy( static_bg, frame->data[0], frame->len ); + VJFrame tmp; + veejay_memset( &tmp, 0, sizeof(VJFrame)); + tmp.data[0] = static_bg; + tmp.width = width; + tmp.height = height; + softblur_apply( &tmp, width,height,0); + take_bg_ = take_bg; + return; + } + +/* VJFrame *tmp = yuv_yuv_template( ud->current, NULL,NULL, width,height, + PIX_FMT_YUV444P ); + veejay_memcpy( ud->current, frame->data[0], len ); + softblur_apply(tmp,width,height,0); + free(tmp); +*/ + //@ clear distance transform map + veejay_memset( dt_map, 0 , len * sizeof(uint32_t) ); + + //@ todo: optimize with mmx + binarify( ud->data, static_bg, frame->data[0], threshold, reverse,len ); + + //@ calculate distance map + veejay_distance_transform8( ud->data, width, height, dt_map ); + + if(mode==1) + { + //@ show difference image in grayscale + veejay_memcpy( Y, ud->data, len ); + veejay_memset( Cb, 128, len ); + veejay_memset( Cr, 128, len ); + + return; + } else if (mode == 2 ) + { + //@ show dt map as grayscale image, intensity starts at 128 + for( i = 0; i < len ; i ++ ) + { + + if( dt_map[i] == feather ) + Y[i] = 0xff; //@ border white + else if( dt_map[i] > feather ) { + Y[i] = 128 + (dt_map[i] % 128); //grayscale value + } else if ( dt_map[i] == 1 ) { + Y[i] = 0xff; + } else { + Y[i] = 0; //@ black (background) + } + Cb[i] = 128; + Cr[i] = 128; + } + return; + } + + //@ process dt map + uint8_t *bin = ud->data; + for( i = 0; i < len ;i ++ ) + { + if( dt_map[ i ] >= feather ) + { + Y[i] = Y2[i]; + Cb[i] = Cb2[i]; + Cr[i] = Cr2[i]; + } + else + { + Y[i] = 0; + Cb[i] = 128; + Cr[i] = 128; + } + } +} + + + + diff --git a/veejay-server/libvje/effects/diff.h b/veejay-server/libvje/effects/diff.h new file mode 100644 index 00000000..8ff9923a --- /dev/null +++ b/veejay-server/libvje/effects/diff.h @@ -0,0 +1,35 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DIFFEFFECT_H +#define DIFFEFFECT_H +#include +#include +#include + +vj_effect *diff_init(int width, int height); +void diff_free(void *d); +int diff_malloc(void **c, int w, int h); +void diff_prepare(void *d, uint8_t *map[3], int w, int h); +void diff_apply(void *d , VJFrame *frame, + VJFrame *frame2, int width, int height, + int th, int reverse, int show, int take, int feather); +void diff_destroy(); +#endif diff --git a/veejay-server/libvje/effects/diffimg.c b/veejay-server/libvje/effects/diffimg.c new file mode 100644 index 00000000..fb9c4ccc --- /dev/null +++ b/veejay-server/libvje/effects/diffimg.c @@ -0,0 +1,90 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "diffimg.h" +#include "common.h" + +vj_effect *diffimg_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults[0] = 6;/* type */ + ve->defaults[1] = 15; /* min */ + ve->defaults[2] = 235; /* max */ + + ve->limits[0][0] = 0; + ve->limits[1][0] = 7; + /* 0,179,0253,0127 */ + ve->limits[0][1] = 1; + ve->limits[1][1] = 255; + + ve->limits[1][2] = 255; + ve->limits[0][2] = 1; + + ve->description = "Enhanced Magic Blend"; + ve->extra_frame = 0; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + + + +void diffimg_apply( + VJFrame *frame, + int width, + int height, + int type, + int threshold_min, + int threshold_max + ) +{ + unsigned int i; + const int len = frame->len - width - 2; + int d,m; + uint8_t y,yb; + uint8_t *Y = frame->data[0]; + + _pf _pff = _get_pf(type); + + for(i=0; i < len; i++) + { + y = Y[i]; + if( y < 16 ) y = 16; else if (y > 235) y = 235; + yb = y; + if(y >= threshold_min && y <= threshold_max) + { + m = (Y[i+1] + Y[i+width] + Y[i+width+1]+2) >> 2; + d = Y[i] - m; + d *= 500; + d /= 100; + m = m + d; + y = ((((y << 1) - (255 - m))>>1) + Y[i])>>1; + if(y < 16) y = 16; else if (y>235) y = 235; + Y[i] = _pff(y,yb); + } + } +} +void diffimg_free(){} diff --git a/veejay-server/libvje/effects/diffimg.h b/veejay-server/libvje/effects/diffimg.h new file mode 100644 index 00000000..addab2ca --- /dev/null +++ b/veejay-server/libvje/effects/diffimg.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DIFFIMGEFFECT_H +#define DIFFIMGEFFECT_H +#include +#include +#include + +vj_effect *diffimg_init(); +void diffimg_apply(VJFrame *frame, int w, int h, int type, int threshold, int opacity); + +void diffimg_free(); +#endif diff --git a/veejay-server/libvje/effects/diffmap.c b/veejay-server/libvje/effects/diffmap.c new file mode 100644 index 00000000..cbd3a947 --- /dev/null +++ b/veejay-server/libvje/effects/diffmap.c @@ -0,0 +1,363 @@ +/* + * Linux VeeJay + * + * Copyright(C)2006 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "diffmap.h" +#include "common.h" +#include "softblur.h" + +typedef int (*morph_func)(uint8_t *kernel, uint8_t mt[9] ); + +vj_effect *differencemap_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; // threshold + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; // reverse + ve->limits[1][1] = 1; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; // show map + ve->defaults[0] = 40; + ve->defaults[1] = 0; + ve->defaults[2] = 1; + ve->description = "Map B to A (bitmask)"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + + +static uint8_t *binary_img = NULL; +static uint8_t *previous_img = NULL; +static int nframe = 0; +#define RUP8(num)(((num)+8)&~8) + +int differencemap_malloc(int w, int h ) +{ + if(binary_img || previous_img) + differencemap_free(); + + binary_img = (uint8_t*) vj_malloc(sizeof(uint8_t) * RUP8(w*h*2) ); + previous_img = binary_img + RUP8(w*h); + nframe = 0; + if(!binary_img) return 0; + return 1; +} + +void differencemap_free(void) +{ + if(binary_img) + free(binary_img); + binary_img = NULL; + previous_img = NULL; +} + +#ifndef MIN +#define MIN(a,b) ( (a)>(b) ? (b) : (a) ) +#endif +#ifndef MAX +#define MAX(a,b) ( (a)>(b) ? (a) : (b) ) +#endif + +static int _dilate_kernel3x3( uint8_t *kernel, uint8_t img[9]) +{ + register int x; + /* consider all background pixels (0) in input image */ + for(x = 0; x < 9; x ++ ) + if((kernel[x] * img[x]) > 0 ) + return 1; + return 0; +} +/* +#ifdef HAVE_ASM_MMX +#undef HAVE_K6_2PLUS +#if !defined( HAVE_ASM_MMX2) && defined( HAVE_ASM_3DNOW ) +#define HAVE_K6_2PLUS +#endif + +#undef _EMMS + +#ifdef HAVE_K6_2PLUS +#define _EMMS "femms" +#else +#define _EMMS "emms" +#endif + +static inline void load_binary_map( uint8_t *mask ) +{ + __asm __volatile( + "movq (%0), %%mm0\n\t" + :: "r" (mask) + ); +} + +static inline void map_luma( uint8_t *dst, uint8_t *B ) +//static inline void map_luma( uint8_t *dst, uint8_t *B, uint8_t *mask ) +{ + __asm __volatile( + // "movq (%0), %%mm0\n\t" + "movq (%0), %%mm1\n\t" + "pand %%mm0, %%mm1\n\t" + "movq %%mm1, (%1)\n\t" + // :: "r" (mask), "r" (B), "r" (dst) + :: "r" (B) , "r" (dst) + ); +} + +static inline void load_chroma( uint8_t val ) +{ + uint8_t mask[8] = { val,val,val,val, val,val,val,val }; + uint8_t *m = &mask[0]; + + __asm __volatile( + "movq (%0), %%mm3\n\t # mm3: 128,128,128,128, ..." + :: "r" (m) + ); +} + +static inline void map_chroma( uint8_t *dst, uint8_t *B ) +{ + __asm __volatile( + "movq (%0), %%mm1\n\t" + "pand %%mm0, %%mm1\n\t" + "pxor %%mm5, %%mm5\n\t" + "pcmpeqb %%mm1,%%mm5\n\t" + "pand %%mm3,%%mm5\n\t" + "paddb %%mm5,%%mm1\n\t" + "movq %%mm1, (%1) \n\t" + :: "r" (B), "r" (dst) + ); + +} + +static void load_differencemapmm7(uint8_t v) +{ + uint8_t mm[8] = { v,v,v,v, v,v,v,v }; + uint8_t *m = (uint8_t*) &(mm[0]); + __asm __volatile( + "movq (%0), %%mm7\n\t" + :: "r" (m) ); +} +#endif + + + +static void binarify( uint8_t *dst, uint8_t *src, uint8_t *prev, uint8_t threshold, int reverse,int w, int h ) +{ + int len = (w * h)>>3; + int i; + uint8_t *s = src; + uint8_t *d = dst; + load_differencemapmm7( threshold ); + + + uint8_t *p = dst; + + for( i = 0; i < len ; i ++ ) + { + __asm __volatile( + "movq (%0),%%mm0\n\t" + "pcmpgtb %%mm7,%%mm0\n\t" + "movq %%mm0,(%1)\n\t" + :: "r" (s), "r" (d) + ); + s += 8; + d += 8; + } + + if( reverse ) + { + __asm __volatile( + "pxor %%mm4,%%mm4" :: + ); + for( i = 0; i < len ; i ++ ) + { + __asm __volatile( + "movq (%0), %%mm0\n\t" + "pcmpeqb %%mm4, %%mm0\n\t" + "movq %%mm0, (%1)\n\t" + :: "r" (p), "r" (p) + ); + p += 8; + } + } +} + + +#else*/ +static void binarify( uint8_t *dst, uint8_t *src,int threshold,int reverse, int w, int h ) +{ + const int len = w*h; + int i; + if(!reverse) + { + for( i = 0; i < len; i ++ ) + dst[i] = ( src[i] <= threshold ? 0: 0xff ); + } + else + { + for( i = 0; i < len; i ++ ) + dst[i] = ( src[i] >= threshold ? 0: 0xff ); + } +} + +void differencemap_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int threshold, int reverse, + int show ) +{ + unsigned int i,x,y; + int len = (width * height); + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2=frame2->data[1]; + uint8_t *Cr2=frame2->data[2]; + + const uint8_t kernel[9] = { 1,1,1, 1,1,1, 1,1,1 }; + uint8_t *bmap = binary_img; + +// morph_func p = _dilate_kernel3x3; + +//@ take copy of image + VJFrame *tmp = vj_malloc(sizeof(VJFrame)); + veejay_memcpy(tmp, frame, sizeof(VJFrame)); + tmp->data[0] = previous_img; + veejay_memcpy( previous_img, Y, len ); + softblur_apply( tmp, width,height,0 ); + free(tmp); + + binarify( binary_img,previous_img,threshold,reverse, width,height); +/* + +#ifdef HAVE_ASM_MMX + int work = (width*height)>>3; + load_chroma( 128 ); + for( y = 0 ; y < work; y ++ ) + { + load_binary_map( bmap ); + map_luma(Y , Y2 ); + map_chroma( Cb, Cb2 ); + map_chroma( Cr, Cr2 ); + //@ we could mmx-ify dilation + Y += 8; + Y2 += 8; + Cb += 8; + Cb2 += 8; + Cr += 8; + Cr2 +=8; + bmap += 8; + } + + __asm__ __volatile__ ( _EMMS:::"memory"); +#else +*/ + + //@ clear image + + if(show) + { + veejay_memcpy(frame->data[0], binary_img, len ); + veejay_memset(frame->data[1],128, len); + veejay_memset(frame->data[2],128, len); + return; + } + + veejay_memset( Y, 0, width ); + veejay_memset( Cb, 128, width ); + veejay_memset( Cr, 128, width ); + + len -= width; + +// if(!reverse) +// { + for(y = width; y < len; y += width ) + { + for(x = 1; x < width-1; x ++) + { + if(binary_img[x+y]) //@ found white pixel + { + /* uint8_t mt[9] = { + binary_img[x-1+y-width], binary_img[x+y-width], binary_img[x+1+y-width], + binary_img[x-1+y], binary_img[x+y] , binary_img[x+1+y], + binary_img[x-1+y+width], binary_img[x+y+width], binary_img[x+1+y+width] + }; + if( p( kernel, mt ) ) //@ replace pixel for B + { + Y[x + y] = Y2[x+y]; + Cb[x + y] = Cb2[1][x+y]; + Cr[x + y] = Cr[2][x+y]; + } + else //@ black + { + Y[x + y] = 0; + Cb[x + y] = 128; + Cr[x+ y] = 128; + }*/ + Y[x+y] = Y2[x+y]; + Cb[x+y] = Cb2[x+y]; + Cr[x+y] = Cr2[x+y]; + } + else + { + Y[x+y] = 0; + Cb[x+y] = 128; + Cr[x+y] = 128; + } + } + } +// } +/* else + { + for(y = width; y < len; y += width ) + { + for(x = 1; x < width-1; x ++) + { + if(!binary_img[x+y]) //@ found black pixel + { + uint8_t mt[9] = { + 0xff-binary_img[x-1+y-width], 0xff-binary_img[x+y-width], 0xff-binary_img[x+1+y-width], + 0xff-binary_img[x-1+y], 0xff-binary_img[x+y] , 0xff-binary_img[x+1+y], + 0xff-binary_img[x-1+y+width], 0xff-binary_img[x+y+width], 0xff-binary_img[x+1+y+width] + }; + if( p( kernel, mt ) ) + { + Y[x + y] = frame2->data[0][x+y]; + Cb[x + y] = frame2->data[1][x+y]; + Cr[x + y] = frame2->data[2][x+y]; + } + else + { + Y[x + y] = 0; + Cb[x + y] = 128; + Cr[x + y] = 128; + } + } + } + } +//#endif +*/ +} diff --git a/veejay-server/libvje/effects/diffmap.h b/veejay-server/libvje/effects/diffmap.h new file mode 100644 index 00000000..91964d94 --- /dev/null +++ b/veejay-server/libvje/effects/diffmap.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DIFFERENCEMAP_H +#define DIFFERENCEMAP_H +#include +#include +#include + +vj_effect *differencemap_init(int w, int h); +void differencemap_apply( VJFrame *frame,VJFrame *frame2, int width, int height, int t, int n, int show); +int differencemap_malloc(int w, int h); +void differencemap_free(void); +#endif diff --git a/veejay-server/libvje/effects/dissolve.c b/veejay-server/libvje/effects/dissolve.c new file mode 100644 index 00000000..ad96caa2 --- /dev/null +++ b/veejay-server/libvje/effects/dissolve.c @@ -0,0 +1,80 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "dissolve.h" +#include + +vj_effect *dissolve_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->defaults[0] = 150; + ve->description = "Dissolve Overlay"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + + + +void dissolve_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int opacity) +{ + unsigned int i; + unsigned int len = frame->len; + const int op1 = (opacity > 255) ? 255 : opacity; + const int op0 = 255 - op1; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + for (i = 0; i < len; i++) + { + // set pixel as completely transparent or completely solid + + if(Y[i] > opacity) // completely transparent + { + Y[i] = (op0 * Y[i] + op1 * Y2[i]) >> 8; + Cb[i] = (op0 * Cb[i] + op1 * Cb2[i]) >> 8; + Cr[i] = (op0 * Cr[i] + op1 * Cr2[i]) >> 8; + } + else // pixel is solid + { + Y[i] = Y2[i]; + Cb[i] = Cb2[i]; + Cr[i] = Cr2[i]; + } + + } +} + +void dissolve_free(){} diff --git a/veejay-server/libvje/effects/dissolve.h b/veejay-server/libvje/effects/dissolve.h new file mode 100644 index 00000000..3c0a6851 --- /dev/null +++ b/veejay-server/libvje/effects/dissolve.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DISSOLVE_H +#define DISSOLVE_H +#include +#include +#include + +vj_effect *dissolve_init(int w, int h); +void dissolve_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int dissolve); +#endif diff --git a/veejay-server/libvje/effects/distort.c b/veejay-server/libvje/effects/distort.c new file mode 100644 index 00000000..57529745 --- /dev/null +++ b/veejay-server/libvje/effects/distort.c @@ -0,0 +1,164 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +/* distortion effects */ +#include +#include +#include +#include "distort.h" +#include "widthmirror.h" + +static int *plasma_table = NULL; +static int plasma_pos1 = 0; +static int plasma_pos2 = 0; + +vj_effect *distortion_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + int i; + float rad; + plasma_table = (int *) vj_calloc(sizeof(int) * 512); + for (i = 0; i < 512; i++) { + rad = ((float) i * 0.703125) * 0.0174532; + plasma_table[i] = sin(rad) * (1024); + } + + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 5; + ve->defaults[1] = 3; + ve->limits[0][0] = 0; + ve->limits[1][0] = 8; + ve->limits[0][1] = 0; + ve->limits[1][1] = 8; + ve->description = "Distortion"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} +// FIXME private + +void distortion_free() { + if(plasma_table) free(plasma_table); +} + +void distortion_destroy() +{ + if(plasma_table) + free( plasma_table ); +} + +/* the distortion effect comes originally from the demo effects collection, + it is the plasma effect */ + +void distortion_apply(VJFrame *frame, int width, int height, + int inc_val1, int inc_val2) +{ + + unsigned int x, y, i, j; + uint8_t index; + int tpos1 = 0, tpos2 = 0, tpos3 = 0, tpos4 = 0; + int z = 511; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + const int uv_width = frame->uv_width; + const int uv_height = frame->uv_height; + unsigned int yi; + + uint8_t p, cb, cr; + + for (i = 0; i < height; ++i) { + tpos1 = plasma_pos1 + inc_val1; + tpos2 = plasma_pos2 + inc_val2; + + tpos3 &= z; + tpos4 &= z; + + for (j = 0; j < width; ++j) { + tpos1 &= z; + tpos2 &= z; + x = plasma_table[tpos1] + plasma_table[tpos2] + + plasma_table[tpos3] + plasma_table[tpos4]; + + index = 128 + (x >> 4); + + /* image = index */ + Y[(i * width) + j] = Y[index]; + + tpos1 += inc_val1; + tpos2 += inc_val2; + } + tpos4 += 3; + tpos3 += 1; + } + + + + for (i = 0; i < uv_height; ++i) { + tpos1 = plasma_pos1 + inc_val1; + tpos2 = plasma_pos2 + inc_val2; + + tpos3 &= z; + tpos4 &= z; + + for (j = 0; j < uv_width; ++j) { + tpos1 &= z; + tpos2 &= z; + x = plasma_table[tpos1] + plasma_table[tpos2] + + plasma_table[tpos3] + plasma_table[tpos4]; + + index = 128 + (x >> 4); + + /* image = index */ + Cb[(j * uv_width) + i] = Cb[index]; + Cr[(j * uv_width) + i] = Cr[index]; + tpos1 += inc_val1; + tpos2 += inc_val2; + } + tpos4 += 3; + tpos3 += 1; + } + + plasma_pos1 += 9; + plasma_pos2 += 8; + + for (y = 0; y < height; y++) { + yi = y * width; + for (x = 0; x < width; x++) { + p =Y[yi + x]; + Y[yi + (width - x - 1)] = p; + } + } + for (y = 0; y < uv_height; y++) { + yi = y * uv_width; + for (x = 0; x < uv_width; x++) { + cb = Cb[yi + x]; + cr = Cr[yi + x]; + Cb[yi + uv_width - x - 1] = cb; + Cr[yi + uv_width - x - 1] = cr; + } + } + +} +void distort_free(){} diff --git a/veejay-server/libvje/effects/distort.h b/veejay-server/libvje/effects/distort.h new file mode 100644 index 00000000..4278366a --- /dev/null +++ b/veejay-server/libvje/effects/distort.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DISTORT_H +#define DISTORT_H +#include +#include +#include + +vj_effect *distortion_init(int w, int h); +void distortion_apply( VJFrame *frame, int width, int height, int n, + int type); +void distort_free(); +void distortion_destroy(); +#endif diff --git a/veejay-server/libvje/effects/dither.c b/veejay-server/libvje/effects/dither.c new file mode 100644 index 00000000..686bacd8 --- /dev/null +++ b/veejay-server/libvje/effects/dither.c @@ -0,0 +1,72 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "dither.h" +vj_effect *dither_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 2; + ve->defaults[1] = 0; + + ve->limits[0][0] = 2; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + + ve->description = "Matrix Dithering"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void dither_apply(VJFrame *frame, int width, int height, int size, + int random_on) +{ + long int w_, h_; + long int dith[size][size]; + long int i, j, d, v, l, m; + uint8_t *Y = frame->data[0]; + + for (l = 0; l < size; l++) { + for (m = 0; m < size; m++) { + dith[l][m] = + 1 + (int) ((double) size * rand() / (RAND_MAX + 1.0)); + } + } + + for (h_ = 0; h_ < height; h_++) { + j = h_ % size; + for (w_ = 0; w_ < width; w_++) { + i = w_ % size; + d = dith[i][j] << 4; + /* Luminance , dither image. Do + this for U and V too, see what happens hehe */ + v = ((long) Y[((h_ * width) + w_)] + d); + Y[(h_ * width) + w_] = (uint8_t) ((v >> 7) << 7); + } + } +} +void dither_free(){} diff --git a/veejay-server/libvje/effects/dither.h b/veejay-server/libvje/effects/dither.h new file mode 100644 index 00000000..91968fba --- /dev/null +++ b/veejay-server/libvje/effects/dither.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DITHER_H +#define DITHER_H +#include +#include +#include + +vj_effect *dither_init(); +void dither_apply( VJFrame *frame, int width, int height, int size, + int n); +void dither_free(); +#endif diff --git a/veejay-server/libvje/effects/dummy.c b/veejay-server/libvje/effects/dummy.c new file mode 100644 index 00000000..8dc23aef --- /dev/null +++ b/veejay-server/libvje/effects/dummy.c @@ -0,0 +1,89 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include +#include +#include + +vj_effect *dummy_init(int w, int h) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + /* + ve->param_description = (char**)vj_calloc(sizeof(char)* ve->num_params); + for(i=0; i < ve->num_params; i++) { + ve->param_description[i] = (char*)vj_calloc(sizeof(char) * 100); + } + sprintf(ve->param_description[0], "Static color"); + */ + ve->defaults[0] = 3; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 7; + + ve->description = "Dummy Frame"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user= 0; + return ve; +} +void dummy_apply( VJFrame *frame, int width, int height, int color) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + char colorCb, colorCr, colorY; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + colorY = bl_pix_get_color_y(color); + colorCb = bl_pix_get_color_cb(color); + colorCr = bl_pix_get_color_cr(color); + + veejay_memset( Y, colorY, len); + veejay_memset( Cb,colorCb,uv_len); + veejay_memset( Cr,colorCr,uv_len); +} + +void dummy_rgb_apply( VJFrame *frame, int width, int height, int r,int g, int b) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + int colorCb, colorCr, colorY; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + + _rgb2yuv(r,g,b,colorY,colorCb,colorCr); + + veejay_memset( Y, colorY, len); + veejay_memset( Cb,colorCb,uv_len); + veejay_memset( Cr,colorCr,uv_len); +} +void dummy_free(){} diff --git a/veejay-server/libvje/effects/dummy.h b/veejay-server/libvje/effects/dummy.h new file mode 100644 index 00000000..f202d504 --- /dev/null +++ b/veejay-server/libvje/effects/dummy.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DUMMY_H +#define DUMMY_H +#include +#include +#include + +vj_effect *dummy_init(); +void dummy_apply(VJFrame *frame, int width, int height, int n); +void dummy_rgb_apply(VJFrame *frame, int width, int height, int r, int g, int b); +void dummy_free(); +#endif diff --git a/veejay-server/libvje/effects/dupmagic.c b/veejay-server/libvje/effects/dupmagic.c new file mode 100644 index 00000000..a0ef6217 --- /dev/null +++ b/veejay-server/libvje/effects/dupmagic.c @@ -0,0 +1,113 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "dupmagic.h" +#include "magicoverlays.h" + +vj_effect *dupmagic_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 5; + ve->description = "Strong Luma Overlay"; + ve->limits[0][0] = 1; + ve->limits[1][0] = 13; + ve->extra_frame = 1; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + +void dupmagic_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n) +{ + switch (n) { + case 1: + _overlaymagic_additive(frame, frame, width, height); + _overlaymagic_additive(frame2, frame2, width, height); + _overlaymagic_additive(frame, frame2, width, height); + break; + case 2: + _overlaymagic_multiply(frame, frame, width, height); + _overlaymagic_multiply(frame2, frame2, width, height); + _overlaymagic_multiply(frame, frame2, width, height); + break; + case 3: + _overlaymagic_divide(frame, frame, width, height); + _overlaymagic_divide(frame2, frame2, width, height); + _overlaymagic_divide(frame, frame2, width, height); + break; + case 4: + _overlaymagic_lighten(frame, frame, width, height); + _overlaymagic_lighten(frame2, frame2, width, height); + _overlaymagic_lighten(frame, frame2, width, height); + break; + case 5: + _overlaymagic_diffnegate(frame, frame, width, height); + _overlaymagic_diffnegate(frame2, frame2, width, height); + _overlaymagic_diffnegate(frame, frame2, width, height); + break; + case 6: + _overlaymagic_freeze(frame, frame, width, height); + _overlaymagic_freeze(frame2, frame2, width, height); + _overlaymagic_freeze(frame, frame2, width, height); + break; + case 7: + _overlaymagic_unfreeze(frame, frame, width, height); + _overlaymagic_unfreeze(frame2, frame2, width, height); + _overlaymagic_unfreeze(frame, frame2, width, height); + break; + case 8: + _overlaymagic_relativeadd(frame, frame2, width, height); + _overlaymagic_relativeadd(frame2, frame2, width, height); + _overlaymagic_relativeadd(frame, frame2, width, height); + break; + case 9: + _overlaymagic_relativeaddlum(frame, frame, width, height); + _overlaymagic_relativeaddlum(frame2, frame2, width, height); + _overlaymagic_relativeaddlum(frame, frame2, width, height); + break; + case 10: + _overlaymagic_maxselect(frame, frame, width, height); + _overlaymagic_maxselect(frame2, frame2, width, height); + _overlaymagic_maxselect(frame, frame2, width, height); + break; + case 11: + _overlaymagic_minselect(frame, frame, width, height); + _overlaymagic_minselect(frame2, frame2, width, height); + _overlaymagic_minselect(frame, frame2, width, height); + break; + case 12: + _overlaymagic_addtest2(frame, frame, width, height); + _overlaymagic_addtest2(frame2, frame2, width, height); + _overlaymagic_addtest2(frame, frame2, width, height); + break; + case 13: + _overlaymagic_softburn(frame, frame, width, height); + _overlaymagic_softburn(frame2, frame2, width, height); + _overlaymagic_softburn(frame, frame2, width, height); + break; + } +} +void dupmagic_free(){} diff --git a/veejay-server/libvje/effects/dupmagic.h b/veejay-server/libvje/effects/dupmagic.h new file mode 100644 index 00000000..7a0f8192 --- /dev/null +++ b/veejay-server/libvje/effects/dupmagic.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef DUPMAGIC_H +#define DUPMAGIC_H +#include +#include +#include + +vj_effect *dupmagic_init(); + +void dupmagic_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int n); + +void dupmagic_free(); +#endif diff --git a/veejay-server/libvje/effects/emboss.c b/veejay-server/libvje/effects/emboss.c new file mode 100644 index 00000000..940d82cb --- /dev/null +++ b/veejay-server/libvje/effects/emboss.c @@ -0,0 +1,350 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "emboss.h" +#include +#include +#include "common.h" +vj_effect *emboss_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 10; + ve->limits[0][0] = 0; + ve->limits[1][0] = 10; + ve->description = "Various Weird Effects"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + + +void simpleedge_framedata(VJFrame *frame, int width, int height) +{ + unsigned int x, y; + uint8_t a1, a2, a3, b1, b2, b3, c1, c2, c3; + uint8_t *Y = frame->data[0]; + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + a1 = Y[(y - 1) * width + (x - 1)]; + a2 = Y[(y - 1) * width + x]; + a3 = Y[(y - 1) * width + (x + 1)]; + b1 = Y[y * width + (x - 1)]; + b2 = Y[y * width + x]; /* center */ + b3 = Y[y * width + (x + 1)]; + c1 = Y[(y + 1) * width + (x - 1)]; + c2 = Y[(y + 1) * width + x]; + c3 = Y[(y + 1) * width + (x + 1)]; + if (b2 > a1 && b2 > a2 && b2 > a3 && + b2 > b1 && b2 > b3 && b3 > c1 && b2 > c2 && b2 > c2) + Y[y * width + x] = pixel_Y_hi_; + else + Y[y * width + x] = pixel_Y_lo_; + } + } +} + +/********************************************************************************************** + * + * xtreme_emboss: looks a bit like emboss, but with dark colours and distorted edges + * + **********************************************************************************************/ +void xtreme_emboss_framedata(VJFrame *frame, int width, int height) +{ + unsigned int r, c; + uint8_t *Y = frame->data[0]; + for (r = 0; r < (width * height); r += width) { + for (c = 0; c < width; c++) { + Y[c + r] = (Y[r - 1 + c - 1] - + Y[r - 1 + c] - + Y[r - 1 + c + 1] + + Y[r + c - 1] - + Y[r + c] + + Y[r + c + 1] + + Y[r + 1 + c - 1] + + Y[r + 1 + c] - Y[r + 1 + c + 1] + ) / 9; + } + } +} + +void another_try_edge(VJFrame *frame, int w, int h) { + uint8_t p; + const unsigned int len=(w*h)-w; + unsigned int r,c; + uint8_t *Y = frame->data[0]; + for(r=w; r < len; r+= w) { + for(c=1; c < w-1; c++) { + p = ((Y[r+c-w] * -1) + (Y[r+c-w-1] * -1) + + (Y[r+c-w+1] * -1) + (Y[r+c-1] * -1) + + (Y[r+c] * -8) + (Y[r+c+1] * -1) + + (Y[r+c+w] * -1) + (Y[r+c+w-1] * -1) + + (Y[r+c+w+1] * -1))/9; + Y[r+c] = CLAMP_Y(p); + } + } +} + + +/********************************************************************************************** + * + * lines_white_balanced_framedata: it looks cool, just try it. + * + **********************************************************************************************/ +void lines_white_balance_framedata(VJFrame *frame, int width, int height) +{ + unsigned int r, c; + const unsigned int len = (width * height); + uint8_t val; + uint8_t *Y = frame->data[0]; + for (r = 0; r < len; r += width) { + for (c = 0; c < width; c++) { + val = (Y[r - 1 + c - 1] - + Y[r - 1 + c] - + Y[r - 1 + c + 1] + + Y[r + c - 1] - + Y[r + c] + + Y[r + c + 1] + + Y[r + 1 + c - 1] - + Y[r + 1 + c] - Y[r + 1 + c + 1] + ) / 9; + Y[c + r] = CLAMP_Y(val); + } + } +} + +/********************************************************************************************** + * + * white_emboss_framedata: again, i cannot explain what it looks like. + * + **********************************************************************************************/ +void white_emboss_framedata(VJFrame *frame, int width, int height) +{ + unsigned int r, c; + int val; + uint8_t *Y = frame->data[0]; + for (r = 0; r < (width * height); r += width) { + for (c = 0; c < width; c++) { + val = (Y[r - 1 + c - 1] - + Y[r - 1 + c] - + Y[r - 1 + c + 1] + + Y[r + c - 1] + + Y[r + c] - + Y[r + c + 1] - + Y[r + 1 + c - 1] - + Y[r + 1 + c] - Y[r + 1 + c + 1] + ) / 9; + Y[c + r] = CLAMP_Y(val); + + } + } +} + +void emboss_test_framedata(VJFrame *frame, int width, int height) +{ + int a, b, c; + int i; + const int len = width * height; + uint8_t *Y = frame->data[0]; + for (i = 0; i < len; i++) { + a = Y[i]; + b = (a + 235) >> 1; + c = (b + 235) >> 1; + Y[i] = c; + } +} + +/********************************************************************************************** + * + * gray_emboss_framedata: similar as white_emboss_framedata, but image is more grayish + * + **********************************************************************************************/ +void gray_emboss_framedata(VJFrame *frame, int width, int height) +{ + int r, c; + uint8_t val; + uint8_t *Y = frame->data[0]; + for (r = 0; r < (width * height); r += width) { + for (c = 0; c < width; c++) { + val = (Y[r - 1 + c - 1] - + Y[r - 1 + c] - + Y[r - 1 + c + 1] + + Y[r + c - 1] - + Y[r + c] - + Y[r + c + 1] - + Y[r + 1 + c - 1] - + Y[r + 1 + c] - Y[r + 1 + c + 1] + ) / 9; + Y[r + c] = CLAMP_Y(val); + } + } + +} + +/********************************************************************************************** + * + * aggressive_emboss_framedata: much like the above two, but more aggressive. + * + **********************************************************************************************/ +void aggressive_emboss_framedata(VJFrame *frame, int width, int height) +{ + int r, c; + uint8_t val; + uint8_t *Y = frame->data[0]; + const int len = width * height; + for (r = 0; r < len; r += width) { + for (c = 0; c < width; c++) { + val = (Y[r - 1 + c - 1] - + Y[r - 1 + c] - + Y[r - 1 + c + 1] + + Y[r + c - 1] - + Y[r + c] - + Y[r + c + 1] - + Y[r + 1 + c - 1] + + Y[r + 1 + c] + Y[r + 1 + c + 1] + ) / 9; + Y[c + r] = CLAMP_Y(val); + } + } + +} + +/********************************************************************************************** + * + * dark_emboss_framedata: like the above, but much less light. + * + **********************************************************************************************/ +void dark_emboss_framedata(VJFrame *frame, int width, int height) +{ + int r, c; + uint8_t *Y = frame->data[0]; + for (r = 0; r < (width * height); r += width) { + for (c = 0; c < width; c++) { + Y[c + r] = (Y[r - 1 + c - 1] - + Y[r - 1 + c] - + Y[r - 1 + c + 1] + + Y[r + c - 1] + + Y[r + c] - + Y[r + c + 1] - + Y[r + 1 + c - 1] + + Y[r + 1 + c] + Y[r + 1 + c + 1] + ) / 9; + } + } + +} + +/********************************************************************************************** + * + * grayish_mood_framedata: less light, more gray, only overal colour changes. + * Name probably does not reflect resulting effects. + **********************************************************************************************/ +void grayish_mood_framedata(VJFrame *frame, int width, int height) +{ + int r, c; + uint8_t *Y = frame->data[0]; + for (r = 0; r < (width * height); r += width) { + for (c = 0; c < width; c++) { + Y[c + r] = (Y[r - 1 + c - 1] - + Y[r - 1 + c] - + Y[r - 1 + c + 1] - + Y[r + c - 1] - + Y[r + c] - + Y[r + c + 1] - + Y[r + 1 + c - 1] - + Y[r + 1 + c] - Y[r + 1 + c + 1] + ) / 9; + } + } + + +} + +/********************************************************************************************** + * + * blur_dark_framedata: blurs the image a little and decreases luminance + * + **********************************************************************************************/ + +void blur_dark_framedata(VJFrame *frame, int width, int height) +{ + int r, c; + int len = (width*height) - width; + /* incomplete */ + uint8_t *Y = frame->data[0]; + for (r = width; r < len; r += width) { + for (c = 1; c < width-1; c++) { + Y[c + r] = (Y[r - 1 + c - 1] - + Y[r - 1 + c] - + Y[r - 1 + c + 1] + + Y[r + c - 1] + + Y[r + c] + + Y[r + c + 1] + + Y[r + 1 + c - 1] - + Y[r + 1 + c] + Y[r + 1 + c + 1] + ) / 9; + } + } +} + +void emboss_apply(VJFrame *frame, int width, int height, int n) +{ + switch (n) { + case 1: + xtreme_emboss_framedata(frame, width, height); + break; + case 2: + lines_white_balance_framedata(frame, width, height); + break; + case 3: + white_emboss_framedata(frame, width, height); + break; + case 4: + gray_emboss_framedata(frame, width, height); + break; + case 5: + aggressive_emboss_framedata(frame, width, height); + break; + case 6: + dark_emboss_framedata(frame, width, height); + break; + case 7: + grayish_mood_framedata(frame, width, height); + break; + case 8: + simpleedge_framedata(frame, width, height); + break; + case 9: + emboss_test_framedata(frame, width, height); + break; + case 10: + another_try_edge(frame,width,height); + break; + default: + blur_dark_framedata(frame, width, height); + break; + } +} +void emboss_free(){} diff --git a/veejay-server/libvje/effects/emboss.h b/veejay-server/libvje/effects/emboss.h new file mode 100644 index 00000000..2caf4fae --- /dev/null +++ b/veejay-server/libvje/effects/emboss.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef EMBOSS_H +#define EMBOSS_H +#include +#include +#include + +vj_effect *emboss_init(); +void emboss_apply( VJFrame *frame, int width, int height, int n); +void emboss_free(); +#endif diff --git a/veejay-server/libvje/effects/enhancemask.c b/veejay-server/libvje/effects/enhancemask.c new file mode 100644 index 00000000..314ac732 --- /dev/null +++ b/veejay-server/libvje/effects/enhancemask.c @@ -0,0 +1,106 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include + +#include "enhancemask.h" +#include "common.h" +vj_effect *enhancemask_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults[0] = 125; /* type */ + // ve->defaults[1] = 255; /* yuvdenoise's default sharpen parameter */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 2048; + // ve->limits[0][1] = 0; + // ve->limits[1][1] = 255; + ve->description = "Sharpen"; + + ve->extra_frame = 0; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + +void enhancemask_apply(VJFrame *frame, int width, int height, int *s ) { + + //int s[9]= { 1, 0, -1, 2, 0, -2, 1 , 0 , -1}; + unsigned int r; + const unsigned int len = (width*height)-width-1; + uint8_t *Y = frame->data[0]; + /* + int sum=0; + for(r=0; r < 9; r++) sum+=s[r]; + + for(r=width; r < len; r+=width) { + for(c=1; c < width-1; c++) { + int p1 = ( + (Y[r - width + c - 1] * s[0]) + + (Y[r - width + c ] * s[1]) + + (Y[r - width + c + 1] * s[2]) + + (Y[r + c - 1] * s[3]) + + (Y[r + c] * s[4]) + + (Y[r + c + 1] * s[5]) + + (Y[r + width + c - 1] * s[6]) + + (Y[r + width + c ] * s[7]) + + (Y[r + width + c + 1] * s[8]) ); + Y[r+c] = (p1/sum); + } + } + */ + + /* The sharpen comes from yuvdenoiser, we like grainy video so 512 is allowed. */ + + + register int d,m; +// unsigned int op0,op1; + // op0 = (s[1] > 255) ? 255 : s[1]; + // op1 = 255 - op1; + for(r=0; r < len; r++) { + m = ( Y[r] + Y[r+1] + Y[r+width] + Y[r+width+1] + 2) >> 2; + d = Y[r] - m; + d *= s[0]; + d /= 100; + m = m + d; +// a = Y[r]; + if( m > pixel_Y_hi_) m = pixel_Y_hi_; + if( m < pixel_Y_lo_) m = pixel_Y_lo_; +// Y[r] = (m * op0 + a * op1) / 255; + Y[r] = m; + } + for(r=len; r < (width*height); r++) { + m = (Y[r] + Y[r+1] + Y[r-width] + Y[r-width+1] + 2) >> 2; + d = Y[r]-m; + d *= s[0]; + d /= 100; + m = m + d; + if( m > pixel_Y_hi_) m = pixel_Y_hi_; + if( m < pixel_Y_lo_) m = pixel_Y_lo_; + Y[r] = m; + } + +} + +void enhancemask_free(){} diff --git a/veejay-server/libvje/effects/enhancemask.h b/veejay-server/libvje/effects/enhancemask.h new file mode 100644 index 00000000..f092bf11 --- /dev/null +++ b/veejay-server/libvje/effects/enhancemask.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef ENHANCEMASK_H +#define ENHANCEMASK_H +#include +#include +#include + +vj_effect *enhancemask_init(int w, int h); + + +void enhancemask_apply(VJFrame *frame, int w, int h, int *t); + +void enhancemask_free(); +#endif diff --git a/veejay-server/libvje/effects/fibdownscale.c b/veejay-server/libvje/effects/fibdownscale.c new file mode 100644 index 00000000..06b0278b --- /dev/null +++ b/veejay-server/libvje/effects/fibdownscale.c @@ -0,0 +1,132 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#include "fibdownscale.h" +#include +#include +#include + +vj_effect *fibdownscale_init(int w, int h) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->description = "Fibonacci Downscaler"; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 0; + ve->defaults[1] = 1; + ve->limits[0][0] = 0; + ve->limits[0][1] = 1; + ve->limits[1][0] = 1; + ve->limits[1][1] = 8; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user =0; + return ve; +} + +void fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n) +{ + if (n == 0) + _fibdownscale_apply(frame, frame2, width, height); + if (n == 1) + _fibrectangle_apply(frame, frame2, width, height); +} + +void _fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + + unsigned i, f1; + unsigned int len = frame->len / 2; + unsigned int uv_len = frame->uv_len / 2; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + + + + /* do fib over half of image. (now we have 2 squares in upper half) */ + for (i = 2; i < len; i++) { + f1 = (i + 1) + (i - 1); + Y[i] = Y2[f1]; + } + + /* copy over first half (we could use veejay_memcpy) */ +// for (i = len; i < (width * height); i++) { +// Y[i] = Y[i - len]; + // } + veejay_memcpy( Y + len, Y, len ); + + /* do the same thing for UV to get correct image */ + + for (i = 2; i < uv_len; i++) { + f1 = (i + 1) + (i - 1); + Cb[i] = Cb2[f1]; + Cr[i] = Cr2[f1]; + } + + veejay_memcpy( Cb + uv_len, Cb , uv_len ); + veejay_memcpy( Cr + uv_len, Cr , uv_len ); +} + +void _fibrectangle_apply(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int i, f1; + const uint32_t len = frame->len /2; + const uint32_t uv_len = frame->uv_len/2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + for (i = 2; i < len; i++) { + f1 = (i - 1) + (i - 2); +// if (f1 < len) + Y[i] = Y2[f1]; +// else +// Y[i] = Y[(f1 - len)]; + } + + for (i = 2; i < uv_len; i++) { + + f1 = (i - 1) + (i - 2); +// if (f1 < len) { + Cb[i] = Cb2[f1]; + Cr[i] = Cr2[f1]; +// } else { +// Cb[i] = Cb2[f1 - len]; +// Cr[i] = Cr2[f1 - len]; +// } + } +} +void fibdownscale_free(){} diff --git a/veejay-server/libvje/effects/fibdownscale.h b/veejay-server/libvje/effects/fibdownscale.h new file mode 100644 index 00000000..75172dd4 --- /dev/null +++ b/veejay-server/libvje/effects/fibdownscale.h @@ -0,0 +1,36 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef FIBDOWNSCALE_H +#define FIBDOWNSCALE_H +#include +#include +#include +#include +vj_effect *fibdownscale_init(); + +void fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n); +void _fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int width, + int height); +void _fibrectangle_apply(VJFrame *frame, VJFrame *frame2, int width, + int height); +void fibdownscale_free(); +#endif diff --git a/veejay-server/libvje/effects/fisheye.c b/veejay-server/libvje/effects/fisheye.c new file mode 100644 index 00000000..0d9800c1 --- /dev/null +++ b/veejay-server/libvje/effects/fisheye.c @@ -0,0 +1,194 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include "fisheye.h" +#include +#include "common.h" +#include +vj_effect *fisheye_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = -1000; + ve->limits[1][0] = 1000; + ve->defaults[0] = 1; + ve->description = "Fish Eye"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +//FIXME private +static int _v = 0; + +static double *polar_map; +static double *fish_angle; +static int *cached_coords; +static uint8_t *buf[3]; + +int fisheye_malloc(int w, int h) +{ + int x,y; + int h2=h/2; + int w2=w/2; + int p =0; + + buf[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 3 ); + if(!buf[0]) return 0; + buf[1] = buf[0] + (w*h); + buf[2] = buf[1] + (w*h); + + polar_map = (double*) vj_calloc(sizeof(double) * w* h ); + if(!polar_map) return 0; + fish_angle = (double*) vj_calloc(sizeof(double) * w* h ); + if(!fish_angle) return 0; + + cached_coords = (int*) vj_calloc(sizeof(int) * w * h); + if(!cached_coords) return 0; + + for(y=(-1 *h2); y < (h-h2); y++) + { + for(x= (-1 * w2); x < (w-w2); x++) + { + double res; + fast_sqrt( res,(double) (y*y+x*x)); + p = (h2+y)*w+(w2+x); + polar_map[p] = res; + //polar_map[p] = sqrt( y*y + x*x ); + fish_angle[p] = atan2( (float) y, x); + } + } + _v = 0; + return 1; +} + +void fisheye_free() +{ + if(buf[0]) + free(buf[0]); + buf[0] = NULL; + buf[1] = NULL; + buf[2] = NULL; + + if(polar_map) free(polar_map); + if(fish_angle) free(fish_angle); + if(cached_coords) free(cached_coords); + +} + +static double __fisheye(double r,double v, double e) +{ + return (exp( r / v )-1) / e; +} + +static double __fisheye_i(double r, double v, double e) +{ + return v * log(1 + e * r); +} + + + +void fisheye_apply(VJFrame *frame, int w, int h, int v ) +{ + int i; + double (*pf)(double a, double b, double c); + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + if( v==0) v =1; + + if( v < 0 ) { + pf = &__fisheye_i; + v = v * -1; + } + else { + pf = &__fisheye; + } + + if( v != _v ) + { + const double curve = 0.001 * v; + const unsigned int R = h/2; + const double coeef = R / log(curve * R + 1); + /* pre calculate */ + unsigned int i; + int px,py; + double r,a,co,si; + const int w2 = w/2; + const int h2 = h/2; + + for(i=0; i < len; i++) + { + r = polar_map[i]; + a = fish_angle[i]; + if(r <= R) + { + r = pf( r, coeef, curve ); + sin_cos( si,co, a); + px =(int) ( r * co); + py =(int) ( r * si); + + px += w2; + py += h2; + + if(px < 0) px =0; + if(px > w) px = w; + if(py < 0) py = 0; + if(py >= (h-1)) py = h-1; + + cached_coords[i] = (py * w)+px; + } + else + { + cached_coords[i] = -1; + + } + } + _v = v; + } + + veejay_memcpy(buf[0], Y,(w*h)); + veejay_memcpy(buf[1], Cb,(w*h)); + veejay_memcpy(buf[2], Cr,(w*h)); + + for(i=0; i < len; i++) + { + if(cached_coords[i] == -1) + { + Y[i] = pixel_Y_lo_; + Cb[i] = 128; + Cr[i] = 128; + } + else + { + + Y[i] = buf[0][ cached_coords[i] ]; + Cb[i] = buf[1][ cached_coords[i] ]; + Cr[i] = buf[2][ cached_coords[i] ]; + } + } +} diff --git a/veejay-server/libvje/effects/fisheye.c_wip b/veejay-server/libvje/effects/fisheye.c_wip new file mode 100644 index 00000000..2c958921 --- /dev/null +++ b/veejay-server/libvje/effects/fisheye.c_wip @@ -0,0 +1,240 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include "fisheye.h" +#include +#include "common.h" +#include +vj_effect *fisheye_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) malloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) malloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) malloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) malloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = -1000; + ve->limits[1][0] = 1000; + ve->defaults[0] = 1; + ve->description = "Fish Eye"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_internal_data= 1; + + return ve; +} + + +static double *polar_map; +static double *fish_angle; +static int *cached_coords; +static uint8_t *buf[3]; + +int fisheye_malloc(int w, int h) +{ + int x,y; + int h2=h/2; + int w2=w/2; + int p =0; + + buf[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h ); + if(!buf[0]) return -1; + buf[1] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h ); + if(!buf[1]) return -1; + + buf[2] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h ); + if(!buf[2]) return -1; + + polar_map = (double*) vj_malloc(sizeof(double) * w* h ); + if(!polar_map) return -1; + fish_angle = (double*) vj_malloc(sizeof(double) * w* h ); + if(!fish_angle) return -1; + + cached_coords = (int*) vj_malloc(sizeof(int) * w * h); + if(!cached_coords) return -1; + for(y=(-1 *h2); y < (h-h2); y++) + { + for(x= (-1 * w2); x < (w-w2); x++) + { + double res; + fast_sqrt( res,(double) (y*y+x*x)); + p = (h2+y)*w+(w2+x); + polar_map[p] = res; + //polar_map[p] = sqrt( y*y + x*x ); + fish_angle[p] = atan2( (float) y, x); + } + } + + + + return 1; +} + +void fisheye_free() +{ + if(buf[0]) free(buf[0]); + if(buf[1]) free(buf[1]); + if(buf[2]) free(buf[2]); + + if(polar_map) free(polar_map); + if(fish_angle) free(fish_angle); + if(cached_coords) free(cached_coords); + +} + +static double __fisheye(double r,double v, double e) +{ + return (exp( r / v )-1) / e; +} + +static double __fisheye_i(double r, double v, double e) +{ + return v * log(1 + e * r); +} + + +extern void *(* veejay_memcpy)(void *to, const void *from, size_t len) ; + + +static int _v = 0; +void fisheye_apply(uint8_t *yuv[3], int w, int h, int v ) +{ + int i; + const int len = w * h; + double (*pf)(double a, double b, double c); + + if( v==0) v =1; + + if( v < 0 ) { + pf = &__fisheye_i; + v = v * -1; + } + else { + pf = &__fisheye; + } + + if( v != _v ) + { + const double curve = 0.001 * v; + const unsigned int R = h/2; + const double coeef = R / log(curve * R + 1); + /* pre calculate */ + int i; + int px,py,x,y; + double r,a,co,si; + const int w2 = w/2; + const int h2 = h/2; + int j=0; + int c = (h2 * w + w2); + int count = 0; + for (i=1; i w2) px = w2; + if(py > h2) py = h2; + + cached_coords[c+i+((i-1)*w)] = ((py-1) * w) + px; + cached_coords[c-i+((i-1)*w)+1] = ((py-1) * w) - px; + cached_coords[c+i-((i-1)*w)-w] = -((py-1) * w) + px; + cached_coords[c-i-((i-1)*w)-w+1] = -((py-1) * w) - px; + + for (j=1; j w2) px = w2; + if(py > h2) py = h2; + + cached_coords[c+i+((j-1)*w)] = ((py-1) * w) + px; + cached_coords[c-i+((j-1)*w)+1] = ((py-1) * w) - px; + cached_coords[c+i-((j-1)*w)-w] = -((py-1) * w) + px; + cached_coords[c-i-((j-1)*w)-w+1] = -((py-1) * w) - px; + + cached_coords[c+j+((i-1)*w)] = ((px-1) * w) + py; + cached_coords[c-j+((i-1)*w)+1] = ((px-1) * w) - py; + cached_coords[c+j-((i-1)*w)-w] = -((px-1) * w) + py; + cached_coords[c-j-((i-1)*w)-w+1] = -((px-1) * w) - py; + } + } + /* for(i=0; i < len; i++) + { + r = polar_map[i]; + a = fish_angle[i]; + if(r <= R) + { + r = pf( r, coeef, curve ); + sin_cos( si,co, a); + px =(int) ( r * co); + py =(int) ( r * si); + + px += w2; + py += h2; + + if(px < 0) px =0; + if(px > w) px = w; + if(py < 0) py = 0; + if(py >= (h-1)) py = h-1; + + cached_coords[i] = (py * w)+px; + } + else + { + cached_coords[i] = -1; + + } + } + */ + + + _v = v; + } + + veejay_memcpy(buf[0], yuv[0],(w*h)); + veejay_memcpy(buf[1], yuv[1],(w*h)); + veejay_memcpy(buf[2], yuv[2],(w*h)); + + for(i=0; i < len; i++) + { + if(cached_coords[i] == -1) + { + yuv[0][i] = 16; + yuv[1][i] = 128; + yuv[2][i] = 128; + } + else + { + + yuv[0][i] = buf[0][ cached_coords[i] ]; + yuv[1][i] = buf[1][ cached_coords[i] ]; + yuv[2][i] = buf[2][ cached_coords[i] ]; + } + } +} diff --git a/veejay-server/libvje/effects/fisheye.h b/veejay-server/libvje/effects/fisheye.h new file mode 100644 index 00000000..b0f02387 --- /dev/null +++ b/veejay-server/libvje/effects/fisheye.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef FISHEYE_H +#define FISHEYE_H +#include +#include +#include +#include + +vj_effect *fisheye_init(int w, int h); +int fisheye_malloc(int w, int h); +void fisheye_free(); +void fisheye_apply(VJFrame *frame, int width, int height, int val ); +#endif diff --git a/veejay-server/libvje/effects/flare.c b/veejay-server/libvje/effects/flare.c new file mode 100644 index 00000000..0dc3e4ba --- /dev/null +++ b/veejay-server/libvje/effects/flare.c @@ -0,0 +1,327 @@ +/* + * VeeJay + * + * Copyright(C)2002-2005 Niels Elburg + * + * 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. + */ + + +#include +#include +#include +#include +#include "flare.h" +#include "common.h" + +/* blend by blurred mask. + derived from radial blur and chromamagick effect. + + */ + +vj_effect *flare_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 3; + ve->defaults[1] = 25; + ve->defaults[2] = 100; + ve->description = "Flare (Glow)"; + ve->limits[0][0] = 0; /* p0 = type, p2 = opacity, p3 = radius */ + ve->limits[1][0] = 5; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 100; + ve->extra_frame = 0; + ve->sub_format = 1; + ve->has_user = 0; + + return ve; +} + +static uint8_t *flare_buf[3]; + +int flare_malloc(int w, int h) +{ + flare_buf[0] = (uint8_t*)vj_yuvalloc(w,h); + if(!flare_buf[0]) + return 0; + flare_buf[1] = flare_buf[0] + (w*h); + flare_buf[2] = flare_buf[1] + (w*h); + return 1; +} + +void flare_free(void) +{ + if(flare_buf[0]) free(flare_buf[0]); + flare_buf[0] = NULL; + flare_buf[1] = NULL; + flare_buf[2] = NULL; +} + +void flare_exclusive(VJFrame *frame, VJFrame *frame2, int width, int height, int op_a) { + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a=0, b=0, c=0; + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - a; + + + for (i = 0; i < len; i++) + { + a = Y[i]; + b = Y2[i]; + + a *= o1; + b *= o2; + a = a >> 8; + b = b >> 8; + Y[i] = (a+b) - ((a * b) >> 8); + // CLAMP_Y(c); + + a = Cb[i]-128; + b = Cb2[i]-128; + c = (a + b) - (( a * b) >> 8); + c += 128; + Cb[i] = CLAMP_UV(c); + + a = Cr[i]-128; + b = Cr2[i]-128; + c = (a + b) - ((a*b) >> 8); + c += 128; + Cr[i] = CLAMP_UV(c); + } +} + +void flare_additive(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a) { + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b; + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + + for(i=0; i < len; i++) + { + a = (Y[i]*o1) >> 7; + b = (Y2[i]*o2) >> 7; + Y[i] = a + (( 2 * b ) - 255); + + a = Cb[i]; + b = Cb2[i]; + + Cb[i] = a + ( ( 2 * b ) - 255 ); + + a = Cr[i] ; + b = Cr2[i] ; + + Cr[i] = a + ( ( 2 * b ) - 255 ); + } +} + +void flare_unfreeze( VJFrame *frame, VJFrame *frame2, int w, int h, int op_a ) { + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + int a,b; + + for(i=0; i < len; i++) + { + a = Y[i]; + b = Y2[i]; + if ( a < 1 ) a = 1; + Y[i] = 255 - (( op_a - b) * (op_a - b)) / a; + //Y[i] = CLAMP_Y(c); + + a = Cb[i]; + b = Cb2[i]; + if ( a < 1) a = 1; + Cb[i] = 255 - (( 255 - b) * ( 255 - b )) / a; + //Cb[i] = CLAMP_UV(c); + + a = Cr[i]; + b = Cr2[i]; + if ( a < 1 ) a = 1; + Cr[i] = 255 - ((255 -b ) * (255 - b)) /a ; + //Cr[i] = CLAMP_UV(c); + } +} + + +void flare_darken(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +{ + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + + for(i=0; i < len; i++) + { + if(Y[i] > Y2[i]) + { + Y[i] = ((Y[i] * o1) + (Y2[i] * o2)) >> 8; + Cb[i] = ((Cb[i] * o1) + (Cb2[i] * o2)) >> 8; + Cr[i] = ((Cr[i] * o1) + (Cr2[i] * o2)) >> 8; + } + } +} + +void flare_simple( VJFrame *frame, VJFrame *frame2, int w, int h, int op_a ) +{ + unsigned int i; + unsigned int len = w* h; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + const uint8_t solid = 255 - op_a; + uint8_t premul; + for (i = 0; i < len; i++) + { + premul = ((Y2[i] * op_a) + (solid * 0xff )) >> 8; + Y[i] = ( (Y[i] >> 1) + (premul >> 1 ) ); + } + +} + +void flare_lighten(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +{ + + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + const unsigned int o1 = op_a; + const unsigned int o2 = 255 - op_a; + + for(i=0; i < len; i++) + { + if(Y[i] < Y2[i]) + { + Y[i] = ((Y[i] * o1) + (Y2[i] * o2)) >> 8; + Cb[i] = ((Cb[i] * o1) + (Cb2[i] * o2)) >> 8; + Cr[i] = ((Cr[i] * o1) + (Cr2[i] * o2)) >> 8; + } + } +} + + +void flare_apply(VJFrame *A, + int width, int height, int type, int op_a, int radius) +{ + int y,x; + int plane = 0; + /* clone A */ + VJFrame B; + veejay_memcpy( &B, A, sizeof(VJFrame)); + /* data is local */ + B.data[0] = flare_buf[0]; + B.data[1] = flare_buf[1]; + B.data[2] = flare_buf[2]; + + /* copy image data */ + veejay_memcpy( B.data[0], A->data[0], A->len ); + veejay_memcpy( B.data[1], A->data[1], A->len ); + veejay_memcpy( B.data[2], A->data[2], A->len ); + + /* apply blur on Image, horizontal and vertical + (blur2 is from xine, see radial blur */ + + for( plane = 0; plane < 2; plane ++ ) + { + for( y = 0; y < height; y ++ ) + blur2( A->data[plane] + (y * width), + B.data[plane] + (y * width), + width, + radius, + 2, + 1, + 1 ); + + for( x = 0; x < width; x ++ ) + blur2( A->data[plane] + x , + B.data[plane] + x, + height, + radius, + 2, + width, + width ); + + } + /* overlay original on top of blurred image */ + switch( type ) + { + case 1: + flare_exclusive(A,&B,width,height,op_a); + break; + case 2: + flare_additive(A,&B,width,height,op_a); + break; + case 3: + flare_unfreeze(A,&B,width,height,op_a); + break; + case 4: + flare_darken(A,&B,width,height,op_a); + break; + case 5: + flare_lighten( A, &B, width, height, op_a ); + break; + + default: + flare_simple( A, &B, width,height, op_a ); + break; + + } +} + + diff --git a/veejay-server/libvje/effects/flare.h b/veejay-server/libvje/effects/flare.h new file mode 100644 index 00000000..56afb73c --- /dev/null +++ b/veejay-server/libvje/effects/flare.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2005 Niels Elburg + * + * 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. + */ + +#ifndef FLARE_H +#define FLARE_H +#include +#include +#include + +vj_effect *flare_init(int w, int h); +int flare_malloc(int w, int h); +void flare_apply(VJFrame *A, int width, int height, int type, int theshold,int radius ); +void flare_free(); +#endif diff --git a/veejay-server/libvje/effects/flip.c b/veejay-server/libvje/effects/flip.c new file mode 100644 index 00000000..e4853da6 --- /dev/null +++ b/veejay-server/libvje/effects/flip.c @@ -0,0 +1,151 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "flip.h" +#include +vj_effect *flip_init(int w, int h) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 0; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + + ve->description = "Flip Frane"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void flip_apply(VJFrame *frame, int width, int height, int n) +{ + if (n == 0) + _flip_y_yuvdata(frame, width, height); + if (n == 1) + _flip_x_yuvdata(frame, width, height); +} + + +void _flip_x_yuvdata(VJFrame *frame, int width, int height) +{ + unsigned int y = height, x; + unsigned int pos = 0; + int w2 = width >> 1; + uint8_t temp; + const unsigned int uv_width = frame->uv_width; + unsigned int uy = frame->uv_height; + unsigned int uw2 = w2 >> frame->shift_h; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + /* Luminance */ + do { + x = w2; + do { + temp = Y[pos + x]; + Y[pos + x] = Y[pos + width - x]; + Y[pos + width - x] = temp; + } while (--x); + pos += width; + + } while (--y); + + pos = 0; + + do { + x = uw2; + do { + temp = Cb[pos + x]; + Cb[pos + x] = Cb[pos + uv_width - x]; + Cb[pos + uv_width - x] = temp; + temp = Cr[pos + x]; + Cr[pos + x] = Cr[pos + uv_width - x]; + Cr[pos + uv_width - x] = temp; + + } while (--x); + pos += uv_width; + + } while (--uy); + +} + +/********************************************************************************************** + * flip_y_yuvdata + * flips the image horizontal, derived from SDLcam-0.7.0 (flip_y.c) + * added uv routine to cope with Cb and Cr data + **********************************************************************************************/ +/* fixme: put all chroma supersample subsample routines elsewhere to be smart */ +void _flip_y_yuvdata(VJFrame *frame, int width, int height) +{ + unsigned int x, pos_a = 0, pos_b; + uint8_t temp; + unsigned int w1 = width - 1; + unsigned int y = height >> 1; + unsigned int uy = y >> frame->shift_v; + const unsigned int uv_height = frame->uv_height; + const unsigned int uv_width = frame->uv_width; + const unsigned int uw1 = width >> frame->shift_h; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + /* Luminance */ + pos_b = (height - 1) * width; + do { + x = w1; + do { + temp = Y[pos_a + x]; + Y[pos_a + x] = Y[pos_b + x]; + Y[pos_b + x] = temp; + } while (--x); + pos_a += width; + pos_b -= width; + } while (--y); + + /* Chrominance */ + pos_a = 0; + pos_b = (uv_height - 1) * uv_width; + do { + x = uw1; + do { + temp = Cb[pos_a + x]; + Cb[pos_a + x] = Cb[pos_b + x]; + Cb[pos_b + x] = temp; + + temp = Cr[pos_a + x]; + Cr[pos_a + x] = Cr[pos_b + x]; + Cr[pos_b + x] = temp; + + } while (--x); + pos_a += uv_width; + pos_b -= uv_width; + } while (--uy); + + +} +void flip_free(){} diff --git a/veejay-server/libvje/effects/flip.h b/veejay-server/libvje/effects/flip.h new file mode 100644 index 00000000..dbe5b283 --- /dev/null +++ b/veejay-server/libvje/effects/flip.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef FLIP_H +#define FLIP_H +#include +#include +#include + +vj_effect *flip_init(); +void flip_apply(VJFrame *frame, int width, int height, int n); +void _flip_y_yuvdata(VJFrame *frame, int width, int height); +void _flip_x_yuvdata(VJFrame *frame, int width, int height); +void flip_free(); +#endif diff --git a/veejay-server/libvje/effects/frameborder.c b/veejay-server/libvje/effects/frameborder.c new file mode 100644 index 00000000..905fcd13 --- /dev/null +++ b/veejay-server/libvje/effects/frameborder.c @@ -0,0 +1,53 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "frameborder.h" +#include "common.h" + +vj_effect *frameborder_init(int width, int height) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = width/8; + ve->limits[0][0] = 1; + ve->limits[1][0] = height / 2; + ve->has_user = 0; + ve->description = "Frame Border Translation"; + ve->sub_format = 1; + ve->extra_frame = 1; + return ve; +} + + +void frameborder_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int size) +{ + frameborder_yuvdata(frame->data[0], frame->data[1], frame->data[2], frame2->data[0], frame2->data[1], + frame2->data[2], width, height, (size), (size), (size), + (size),frame->shift_h,frame->shift_v); + +} +void frameborder_free(){} diff --git a/veejay-server/libvje/effects/frameborder.h b/veejay-server/libvje/effects/frameborder.h new file mode 100644 index 00000000..cbd69c4a --- /dev/null +++ b/veejay-server/libvje/effects/frameborder.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef FRAMEBORDER_H +#define FRAMEBORDER_H +#include +#include +#include + +vj_effect *frameborder_init(int width, int height); +void frameborder_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int size); +void frameborder_free(); +#endif diff --git a/veejay-server/libvje/effects/gamma.c b/veejay-server/libvje/effects/gamma.c new file mode 100644 index 00000000..c632fc51 --- /dev/null +++ b/veejay-server/libvje/effects/gamma.c @@ -0,0 +1,73 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "gamma.h" +#include +static int gamma_flag = 0; + +static uint8_t table[256]; + +vj_effect *gamma_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 124; + ve->limits[0][0] = 0; + ve->limits[1][0] = 500; + ve->description = "Gamma Correction"; + ve->extra_frame = 0; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} +// FIXME private + +inline void gamma_setup(int width, int height, + double gamma_value) +{ + int i; + double val; + + for (i = 0; i < 256; i++) { + val = i / 256.0; + val = pow(val, gamma_value); + val = 256.0 * val; + table[i] = val; + } +} + +void gamma_apply(VJFrame *frame, int width, + int height, int gamma_value) +{ + unsigned int i, len = frame->len; + uint8_t *Y = frame->data[0]; + /* gamma correction YCbCr, only on luminance not on chroma */ + if (gamma_value != gamma_flag) + gamma_setup(width, height, (double) (gamma_value / 100.0)); + + for (i = 0; i < len; i++) { + Y[i] = (uint8_t) table[Y[i]]; + } +} +void gamma_free(){} diff --git a/veejay-server/libvje/effects/gamma.h b/veejay-server/libvje/effects/gamma.h new file mode 100644 index 00000000..8250ee76 --- /dev/null +++ b/veejay-server/libvje/effects/gamma.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef GAMMA_H +#define GAMMA_H +#include +#include +#include + +vj_effect *gamma_init(); +void gamma_apply(VJFrame *frame, int width, + int height, int gamma_val); +void gamma_free(); +#endif diff --git a/veejay-server/libvje/effects/ghost.c b/veejay-server/libvje/effects/ghost.c new file mode 100644 index 00000000..be99f4e4 --- /dev/null +++ b/veejay-server/libvje/effects/ghost.c @@ -0,0 +1,149 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#include +#include +#include +#include "common.h" +#include "ghost.h" + +static uint8_t *ghost_buf[3]; +static uint8_t *diff_map; +static int diff_period; + +vj_effect *ghost_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 16; + ve->limits[1][0] = 255; // opacity + ve->defaults[0] = 134; + ve->description = "Motion Ghost"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user =0; + return ve; +} + +// FIXME private +int ghost_malloc(int w, int h) +{ + const int len = (w * h ); + int i; + + for( i = 0; i < 3 ; i ++ ) + { + ghost_buf[i] = (uint8_t*) vj_calloc( sizeof(uint8_t) * len); + if(!ghost_buf[i]) + return 0; + } + diff_map = (uint8_t*) vj_calloc( sizeof(uint8_t) * len); + diff_period = 0; + + return 1; +} + +void ghost_free() +{ + int i; + for(i = 0 ; i < 3; i ++ ) + { + if(ghost_buf[i]) + free(ghost_buf[i]); + ghost_buf[i] = NULL; + } + if( diff_map ) + free(diff_map); +} + +void ghost_apply(VJFrame *frame, + int width, int height, int opacity) +{ + register int q,z=0; + int x,y,i,tmp; + const int len = frame->len; + const unsigned int op_a = opacity; + const unsigned int op_b = 255 - op_a; + uint8_t *srcY = frame->data[0]; + uint8_t *srcCb= frame->data[1]; + uint8_t *srcCr= frame->data[2]; + uint8_t *dY = ghost_buf[0]; + uint8_t *dCb = ghost_buf[1]; + uint8_t *dCr = ghost_buf[2]; + uint8_t *bm = diff_map; + + const uint8_t kernel[9] = + { + 1,1,1,1,1,1,1,1,1 + }; + // first time running + if(diff_period == 0) + { + veejay_memcpy( dY, srcY, len ); + veejay_memcpy( dCb,srcCb, len ); + veejay_memcpy( dCr,srcCr, len ); + diff_period = 1; + return; + } + + + // absolute difference on threshold + + for(i = 0; i < len; i ++ ) + bm[i] = ( abs(srcY[i] - dY[i]) > 1 ? 0xff: 0x0); + + + + for( y = width; y < (len-width); y += width ) + { + for( x = 1; x < width - 1; x ++ ) + { + // input matrix + uint8_t mt[9] = { + bm[ x-1+y-width], bm[ x+y-width], bm[x+1+y-width], + bm[ x-1+y ], bm[ x+y ], bm[x+1+y], + bm[ x-1+y+width], bm[ x+y+width ], bm[x+1+y+width] + }; + + for( q = 0; q < 9; q ++ ) + { + if( kernel[q] && mt[q] ) // dilation + { z ++; break; } + } + + if( z > 0 ) // accept + { + // new pixel value back in ghost buf (feedback) + dY[x+y] = ( (op_a * srcY[x+y] ) + (op_b * dY[x+y]) ) >> 8; + dCb[x+y] = ((op_a * srcCb[x+y] ) + (op_b * dCb[x+y])) >> 8; + dCr[x+y] = ((op_a * srcCr[x+y] ) + (op_b * dCr[x+y])) >> 8; + // put result to screen + srcY[x+y] = dY[x+y]; + srcCb[x+y]= dCb[x+y]; + srcCr[x+y] = dCr[x+y]; + } + + z = 0; + } + } +} diff --git a/veejay-server/libvje/effects/ghost.h b/veejay-server/libvje/effects/ghost.h new file mode 100644 index 00000000..01d51e5c --- /dev/null +++ b/veejay-server/libvje/effects/ghost.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef GHOST_H +#define GHOST_H +#include +#include +#include + +vj_effect *ghost_init(int w, int h); +void ghost_apply( VJFrame *frame, int width, int height, int op); +int ghost_malloc( int w, int h ); +void ghost_free(void); + +#endif diff --git a/veejay-server/libvje/effects/goom.c b/veejay-server/libvje/effects/goom.c new file mode 100644 index 00000000..5223db64 --- /dev/null +++ b/veejay-server/libvje/effects/goom.c @@ -0,0 +1,125 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "goom.h" +#include AVUTIL_INC +#include +#include +#include + +static VJFrame *rgb_frame_ = NULL; +static PluginInfo *goom_ = NULL; +static uint8_t *goom_buffer_ = NULL; +static int last_= 0; +static void *convert_rgb = NULL; + +vj_effect *goomfx_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 10; + ve->limits[0][1] = 100; + ve->limits[1][1] = 5000; + ve->defaults[0] = 0; + ve->defaults[1] = 2500; + ve->description = "Goom"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +int goomfx_malloc(int width, int height) +{ + goom_ = goom_init( width,height ); + if(!goom_ ) + return 0; + goom_buffer_ = vj_malloc( width * height * 4 ); + goom_set_screenbuffer( goom_, goom_buffer_); + rgb_frame_ = yuv_rgb_template( goom_buffer_, width,height, PIX_FMT_RGBA); + return 1; +} +void goomfx_free() +{ + goom_close( goom_ ); + if(goom_buffer_) + free(goom_buffer_); + if(rgb_frame_) + free(rgb_frame_); + goom_buffer_ = NULL; + goom_ = NULL; + rgb_frame_ = NULL; + + if( convert_rgb ) + yuv_fx_context_destroy( convert_rgb ); + convert_rgb = NULL; +} + + + + +void goomfx_apply( VJFrame *frame, int width, int height, int val, int val2) +{ + unsigned int i; + int chunks = frame->len / 1024; + int16_t data[2][1024]; + float fps = (float)val2 * 0.01f; + int len = frame->width * frame->height; + int uv_len = frame->uv_len; + uint8_t hisUV[512]; + uint8_t hisY[256]; + int j; + + if( last_ >= chunks ) + last_ = 0; + i = last_; + last_ ++; + + for( j = 0; j < 512; j ++ ) + { + data[0][j] = -32765 * rand()/(RAND_MAX); + data[1][j] = -32765 * rand()/(RAND_MAX); + } + + goom_update( goom_, + data, + val, + fps, + NULL, + NULL ); + + if( !convert_rgb ) + convert_rgb = yuv_fx_context_create( rgb_frame_, frame, PIX_FMT_RGBA, + (frame->shift_v == 0 ? PIX_FMT_YUV422P : + PIX_FMT_YUV420P) ); + + //yuv_convert_any_ac( rgb_frame_, frame, PIX_FMT_RGBA, (frame->shift_v == 0 ? PIX_FMT_YUV422P : + // PIX_FMT_YUV420P) ); + + yuv_fx_context_process( convert_rgb, rgb_frame_, frame ); + +} diff --git a/veejay-server/libvje/effects/goom.h b/veejay-server/libvje/effects/goom.h new file mode 100644 index 00000000..4b49b52e --- /dev/null +++ b/veejay-server/libvje/effects/goom.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef GOOM_H +#define GOOM_H +#include +#include +#include + +vj_effect *goomfx_init(int w, int h); +void goomfx_apply( VJFrame *frame, int width, int height, int val, int val2); +int goomfx_malloc(int w, int h); +void goomfx_free(); +#endif diff --git a/veejay-server/libvje/effects/greyselect.c b/veejay-server/libvje/effects/greyselect.c new file mode 100644 index 00000000..da5faa81 --- /dev/null +++ b/veejay-server/libvje/effects/greyselect.c @@ -0,0 +1,129 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "rgbkey.h" +#include +#include "common.h" + +vj_effect *greyselect_init(int w, int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 300; /* angle */ + ve->defaults[1] = 255; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 0; /* b */ + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + ve->has_user = 0; + ve->description = "Grayscale by Color Key"; + ve->extra_frame = 0; + ve->sub_format = 1; + ve->rgb_conv = 1; + return ve; +} + +void greyselect_apply( VJFrame *frame, int width, + int height, int i_angle, int r, int g, + int b) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + int cb, cr; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle / 10.0; + unsigned int pos; + uint8_t val; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + int iy,iu,iv; + _rgb2yuv(r,g,b,iy,iu,iv); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = Y; + fg_cb = Cb; + fg_cr = Cr; + + bg_y = Y; + bg_cb = Cb; + bg_cr = Cr; + + for (pos = (width * height); pos != 0; pos--) { + short xx, yy; + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + + if (abs(yy) > val) { + Cb[pos]=128; + Cr[pos]=128; + } + } +} + +void greyselect_free(){} diff --git a/veejay-server/libvje/effects/greyselect.h b/veejay-server/libvje/effects/greyselect.h new file mode 100644 index 00000000..5635b331 --- /dev/null +++ b/veejay-server/libvje/effects/greyselect.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef GREYSELECT_H +#define GREYSELECT_H +#include +#include +#include + +vj_effect *greyselect_init(); +void greyselect_apply( VJFrame *frame, int width, + int height, int i_angle, + int red, int green, int blue); +void greyselect_free(); +#endif diff --git a/veejay-server/libvje/effects/isolate.c b/veejay-server/libvje/effects/isolate.c new file mode 100644 index 00000000..da934ee2 --- /dev/null +++ b/veejay-server/libvje/effects/isolate.c @@ -0,0 +1,144 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include +#include "common.h" +#include "isolate.h" + +vj_effect *isolate_init(int w, int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 300; /* angle */ + ve->defaults[1] = 255; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 0; /* b */ + ve->defaults[4] = 150; /* white transparency */ + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 255; + ve->has_user = 0; + ve->description = "Isolate Color"; + ve->extra_frame = 0; + ve->sub_format = 1; + ve->rgb_conv = 1; + return ve; +} + +/* another key derivate */ + +void isolate_apply( VJFrame *frame, int width, + int height, int i_angle, int r, int g, + int b, int opacity) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + int cb, cr; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle / 10.0; + unsigned int pos; + uint8_t val; + unsigned int op1 = (opacity > 255) ? 255: opacity; + unsigned int op0 = 255 - op1; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + int iy,iu,iv; + _rgb2yuv(r,g,b,iy,iu,iv); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = Y; + fg_cb = Cb; + fg_cr = Cr; + + bg_y = Y; + bg_cb = Cb; + bg_cr = Cr; + + for (pos = (width * height); pos != 0; pos--) { + short xx, yy; + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + + if (abs(yy) > val) { + Y[pos]=235; + Cb[pos]=128; + Cr[pos]=128; + } + else { + Y[pos] = (op0 * Y[pos] + (op1 * 235)) / 255; + Cb[pos] = (op0 * Cb[pos] + (op1 * 128)) / 255; + Cr[pos] = (op0 * Cr[pos] + (op1 * 128)) / 255; + } + } +} + +void isolate_free(){} diff --git a/veejay-server/libvje/effects/isolate.h b/veejay-server/libvje/effects/isolate.h new file mode 100644 index 00000000..dfd47e02 --- /dev/null +++ b/veejay-server/libvje/effects/isolate.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef ISOLATE_H +#define ISOLATE_H +#include +#include +#include + +vj_effect *isolate_init(); +void isolate_apply( VJFrame *frame, int width, + int height, int i_angle, + int red, int green, int blue, int opacity); +void isolate_free(); +#endif diff --git a/veejay-server/libvje/effects/keyselect.c b/veejay-server/libvje/effects/keyselect.c new file mode 100644 index 00000000..2a5eec68 --- /dev/null +++ b/veejay-server/libvje/effects/keyselect.c @@ -0,0 +1,260 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "rgbkey.h" +#include +#include "common.h" + +vj_effect *keyselect_init(int w, int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 300; /* angle */ + ve->defaults[1] = 255; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 0; /* b */ + ve->defaults[4] = 3; /* blend type */ + ve->defaults[5] = 2400; /* noise suppression */ + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 256; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 256; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 256; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 7; + + ve->limits[0][5] = 0; + ve->limits[1][5] = 3500; + ve->has_user = 0; + ve->description = "Blend by Color Key"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->rgb_conv = 1; + return ve; +} + +typedef uint8_t(*blend_func)(uint8_t y1, uint8_t y2); +blend_func get_blend_func(const int mode); + +uint8_t blend_func1(uint8_t a, uint8_t b) { + return (uint8_t) 255 - (abs(255-a-b)); +} + +uint8_t blend_func2(uint8_t a, uint8_t b) { + uint8_t val; + if(a < pixel_Y_lo_) a = pixel_Y_lo_; + if(b < pixel_Y_lo_) b = pixel_Y_lo_; + val = 255 - ((255-b) * (255-b))/a; + return CLAMP_Y(val); +} + +uint8_t blend_func3(uint8_t a , uint8_t b) { + return (uint8_t) (a * b)>>8; +} + + +uint8_t blend_func4(uint8_t a, uint8_t b) { + uint8_t val; + if(b > pixel_Y_hi_) b = pixel_Y_hi_; + val = (a * a) / ( 255 - b ); + return CLAMP_Y(val); +} + +uint8_t blend_func5(uint8_t a, uint8_t b) { + uint8_t val; + int c = 255 - b; + if( c < pixel_Y_lo_ ) + c = pixel_Y_lo_; + val = b / c; + return CLAMP_Y(val); +} + +uint8_t blend_func6(uint8_t a, uint8_t b) { + uint8_t val = a + (2 * (b)) - 255; + return CLAMP_Y(val); +} + +uint8_t blend_func7(uint8_t a, uint8_t b) { + return (uint8_t) ( a + ( b - 255) ); +} + +uint8_t blend_func8(uint8_t a, uint8_t b) { + int c; + if(b < 128) c = (a * b) >> 7; + else c = 255 - ((255-b)*(255-a)>>7); + return CLAMP_Y(c); +} + + + +blend_func get_blend_func(const int mode) { + switch(mode) { + case 0: return &blend_func1; + case 1: return &blend_func2; + case 2: return &blend_func3; + case 3: return &blend_func4; + case 4: return &blend_func5; + case 5: return &blend_func6; + case 6: return &blend_func7; + case 7: return &blend_func8; + } + return &blend_func1; +} + +/* +http://www.cs.utah.edu/~michael/chroma/ +*/ +void keyselect_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int r, int g, + int b, int mode, int i_noise) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + int cb, cr; + int kbg, x1, y1; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle * 0.1f; + float noise_level = (i_noise * 0.01f); + unsigned int pos; + uint8_t val, tmp1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + int iy=pixel_Y_lo_,iu=128,iv=128; + _rgb2yuv( r,g,b, iy,iu,iv ); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + + blend_func blend_pixel = get_blend_func(mode); + + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = Y; + fg_cb = Cb; + fg_cr = Cr; + /* 2005: swap these !! */ + bg_y = Y2; + bg_cb = Cb2; + bg_cr = Cr2; + + for (pos = (width * height); pos != 0; pos--) { + short xx, yy; + /* convert foreground to xz coordinates where x direction is + defined by key color */ + + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + + + /* accept angle should not be > 90 degrees + reasonable results between 10 and 80 degrees. + */ + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + if (abs(yy) < val) { + /* compute fg, suppress fg in xz according to kfg + */ + val = (yy * accept_angle_ctg) >> 4; + + x1 = abs(val); + y1 = yy; + tmp1 = xx - x1; + + kbg = (tmp1 * one_over_kc) >> 1; + if (kbg < 0) + kbg = 0; + if (kbg > 255) + kbg = 255; + + val = (tmp1 * kfgy_scale) >> 4; + val = fg_y[pos] - val; + + Y[pos] = val; + + // convert suppressed fg back to cbcr + // cb,cr are signed, go back to unsigned ! + val = ((x1 * (cb-128)) - (y1 * (cr-128))) >> 7; + Cb[pos] = val; + val = ((x1 * (cr-128)) - (y1 * (cb-128))) >> 7; + Cr[pos] = val; + // deal with noise + + val = (yy * yy) + (kg * kg); + if (val < (noise_level * noise_level)) { + kbg = 255; + } + val = (Y[pos] + (kbg * bg_y[pos])) >> 8; + Y[pos] = blend_pixel( val, fg_y[pos] ); + + } + } + + +} + +void keyselect_free(){} diff --git a/veejay-server/libvje/effects/keyselect.h b/veejay-server/libvje/effects/keyselect.h new file mode 100644 index 00000000..8837aa15 --- /dev/null +++ b/veejay-server/libvje/effects/keyselect.h @@ -0,0 +1,32 @@ +/* +* Linux VeeJay +* +* Copyright(C)2004 Niels Elburg +* +* 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. +*/ + +#ifndef KEYSELECT_H +#define KEYSELECT_H +#include +#include +#include + +vj_effect *keyselect_init(); +void keyselect_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, + int red, int green, int blue, int mode, int noise); +void keyselect_free(); +#endif diff --git a/veejay-server/libvje/effects/killchroma.c b/veejay-server/libvje/effects/killchroma.c new file mode 100644 index 00000000..ece9688f --- /dev/null +++ b/veejay-server/libvje/effects/killchroma.c @@ -0,0 +1,68 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "killchroma.h" +#include "common.h" +#include +#include +#include +vj_effect *killchroma_init(int w, int h) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->sub_format = 0; + ve->limits[0][0] = 0; + ve->limits[1][0] = 2; + ve->defaults[0] = 0; + ve->has_user = 0; + ve->description = "Filter out chroma channels"; + ve->extra_frame = 0; + return ve; +} + + +void killchroma_apply(VJFrame *frame, int width, int height, int n) +{ + if(n==0) + { +#ifdef HAVE_ASM_MMX + memset_ycbcr( frame->data[1], frame->data[1], 128, frame->uv_width,frame->uv_height ); + memset_ycbcr( frame->data[2], frame->data[2], 128, frame->uv_width,frame->uv_height ); +#else + memset( frame->data[1], 128, frame->uv_len); + memset( frame->data[2], 128, frame->uv_len); +#endif + } + else + { +#ifdef HAVE_ASM_MMX + memset_ycbcr( frame->data[n], frame->data[n], 128,frame->uv_width, frame->uv_height ); +#else + memset( frame->data[n], 128, frame->uv_len ); +#endif + } +} +void killchroma_free(){} diff --git a/veejay-server/libvje/effects/killchroma.h b/veejay-server/libvje/effects/killchroma.h new file mode 100644 index 00000000..daef44b0 --- /dev/null +++ b/veejay-server/libvje/effects/killchroma.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef KILLCHROMA_H +#define KILLCHROMA_H +#include +#include +#include + +vj_effect *killchroma_init(); + +void killchroma_apply( VJFrame *v, int width, int height, int n); + +void killchroma_free(); +#endif diff --git a/veejay-server/libvje/effects/lumablend.c b/veejay-server/libvje/effects/lumablend.c new file mode 100644 index 00000000..94d638af --- /dev/null +++ b/veejay-server/libvje/effects/lumablend.c @@ -0,0 +1,176 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#include +#include +#include "lumablend.h" + +vj_effect *lumablend_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; /* type */ + ve->limits[1][0] = 2; + ve->limits[0][1] = 0; /* threshold 1 */ + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; /* threshold 2 */ + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; /*opacity */ + ve->limits[1][3] = 255; + ve->defaults[0] = 2; + ve->defaults[1] = 0; + ve->defaults[2] = 35; + ve->defaults[3] = 150; + ve->description = "Opacity by Threshold"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->has_user = 0; + return ve; +} + + +void opacity_by_threshold(uint8_t * yuv1[3], uint8_t * yuv2[3], int width, + int height, int threshold, int threshold2, + int opacity) +{ + + unsigned int x, y, len = width * height; + uint8_t a1, a2; + unsigned int op0, op1; + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + + for (y = 0; y < len; y += width) { + for (x = 0; x < width; x++) { + a1 = yuv1[0][x + y]; + a2 = yuv2[0][x + y]; + if (a1 >= threshold && a1 <= threshold2) { + yuv1[0][x + y] = (op0 * a1 + op1 * a2) >> 8; + yuv1[1][x + y] = + (op0 * yuv1[1][x + y] + op1 * yuv2[1][x + y]) >> 8; + yuv1[2][x + y] = + (op0 * yuv1[2][x + y] + op1 * yuv2[2][x + y]) >> 8; + } + } + } + +} + + +void opacity_by_threshold_(uint8_t * yuv1[3], uint8_t * yuv2[3], int width, + int height, int threshold, int threshold2, + int opacity) +{ + + unsigned int x, y, len = width * height; + uint8_t a1, a2; + unsigned int op0, op1; + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + for (y = 0; y < len; y += width) { + for (x = 0; x < width; x++) { + a1 = yuv1[0][x + y]; + a2 = yuv2[0][x + y]; + if (a2 > threshold && a2 < threshold2) { + yuv1[0][x + y] = (op0 * a1 + op1 * a2) >> 8; + yuv1[1][x + y] = + (op0 * yuv1[1][x + y] + op1 * yuv2[1][x + y]) >> 8; + yuv1[2][x + y] = + (op0 * yuv1[2][x + y] + op1 * yuv2[2][x + y]) >> 8; + } + } + } +} + + + +void opacity_by_threshold_blur(uint8_t * yuv1[3], uint8_t * yuv2[3], + int width, int height, int threshold, + int threshold2, int opacity) +{ + + unsigned int x, y, len = width * height - width; + uint8_t a1, a2; + unsigned int op0, op1; + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + /* incomplete */ + for (y = width; y < len; y += width) { + for (x = 1; x < width-1; x++) { + a1 = yuv1[0][x + y]; + a2 = yuv2[0][x + y]; + if (a1 >= threshold && a1 <= threshold2) { + a1 = (yuv1[0][y - width + x - 1] + + yuv1[0][y - width + x + 1] + + yuv1[0][y - width + x] + + yuv1[0][y + x] + + yuv1[0][y + x - 1] + + yuv1[0][y + x + 1] + + yuv1[0][y + width + x] + + yuv1[0][y + width + x + 1] + + yuv1[0][y + width + x - 1] + ) / 9; + + a2 = (yuv2[0][y - width + x - 1] + + yuv2[0][y - width + x + 1] + + yuv2[0][y - width + x] + + yuv2[0][y + x] + + yuv2[0][y + x - 1] + + yuv2[0][y + x + 1] + + yuv2[0][y + width + x] + + yuv2[0][y + width + x + 1] + + yuv2[0][y + width + x - 1] + ) / 9; + + yuv1[0][x + y] = (op0 * a1 + op1 * a2) >> 8; + yuv1[1][x + y] = + (op0 * yuv1[1][x + y] + op1 * yuv2[1][x + y]) >> 8; + yuv1[2][x + y] = + (op0 * yuv1[2][x + y] + op1 * yuv2[2][x + y]) >> 8; + } + } + } +} + +void lumablend_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int type, int t1, int t2, int opacity) +{ + + switch (type) { + case 0: + opacity_by_threshold(frame->data, frame2->data, width, height, t1, t2, opacity); + break; + case 1: + opacity_by_threshold_(frame->data, frame2->data, width, height, t1, t2, opacity); + break; + case 2: + opacity_by_threshold_blur(frame->data, frame2->data, width, height, t1, t2, + opacity); + break; + + } + +} +void lumablend_free(){} diff --git a/veejay-server/libvje/effects/lumablend.h b/veejay-server/libvje/effects/lumablend.h new file mode 100644 index 00000000..004bb4ba --- /dev/null +++ b/veejay-server/libvje/effects/lumablend.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef LUMABLEND_H +#define LUMABLEND_H +#include +#include +#include + +vj_effect *lumablend_init(); +void lumablend_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int threhold1, int threshold2, + int opacity, int type); + +void lumablend_free(); +#endif diff --git a/veejay-server/libvje/effects/lumakey.c b/veejay-server/libvje/effects/lumakey.c new file mode 100644 index 00000000..794b1c43 --- /dev/null +++ b/veejay-server/libvje/effects/lumakey.c @@ -0,0 +1,326 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "lumakey.h" + +vj_effect *lumakey_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; /* feather */ + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; /* threshold min */ + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; /* threshold max */ + ve->limits[1][2] = 255; + ve->limits[0][3] = 1; /* distance */ + ve->limits[1][3] = width; + ve->limits[0][4] = 0; /* type */ + ve->limits[1][4] = 2; + ve->defaults[0] = 255; + ve->defaults[1] = 150; + ve->defaults[2] = 200; + ve->defaults[3] = 1; + ve->defaults[4] = 1; + ve->description = "Luma Key"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->has_user = 0; + + return ve; +} + + + +void lumakey_simple(uint8_t * yuv1[3], uint8_t * yuv2[3], int width, + int height, int threshold, int threshold2, int opacity) +{ + + unsigned int x, y, len = width * height; + uint8_t a1, a2; + unsigned int op0, op1; + uint8_t Y, Cb, Cr; + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + for (y = 0; y < len; y += width) { + for (x = 0; x < width; x++) { + a1 = yuv1[0][x + y]; + a2 = yuv2[0][x + y]; + /* + if ( a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2 )/255; + Cb = (op0 * yuv1[1][x+y] + op1 * yuv2[1][x+y])/255; + Cr =(op0 * yuv1[2][x+y] + op1 * yuv2[2][x+y])/255; + + } + */ + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][x + y] + op1 * yuv2[1][x + y]) >> 1; + Cr = (op0 * yuv1[2][x + y] + op1 * yuv2[2][x + y]) >> 1; + yuv1[0][x + y] = Y; // < 16 ? 16 : Y > 235 ? 235 : Y; + yuv1[1][x + y] = Cb; // < 16 ? 16 : Cb > 240 ? 240 : Cb; + yuv1[2][x + y] = Cr; // < 16 ? 16 : Cr > 240 ? 240 : Cr; + } + + } + } +} + + +void lumakey_smooth(uint8_t * yuv1[3], uint8_t * yuv2[3], int width, + int height, int threshold, int threshold2, int opacity, + int distance) +{ + + unsigned int x, y = 0, len = width * height; + uint8_t a1, a2; + unsigned int op0, op1; + uint8_t Y, Cb, Cr; + unsigned int soft0, soft1; + unsigned int t2, t3; + uint8_t p1, p2; + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + soft0 = 255 / distance; + soft1 = 255 - soft0; + + t2 = threshold - distance; // 0 - 4 + t3 = threshold2 + distance; // 3 + 4 + + /* first row */ + + if (t2 < 0) + t2 = 0; + if (t3 > 255) + t3 = 255; + + for (x = 0; x < width; x++) { + a1 = yuv1[0][x]; + a2 = yuv2[0][x]; + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][x] + op1 * yuv2[1][x]) >> 8; + Cr = (op0 * yuv1[2][x] + op1 * yuv2[2][x]) >> 8; + + yuv1[0][x] = Y; //< 16 ? 16 : Y > 235 ? 235 : Y; + yuv1[1][x] = Cb; // < 16 ? 16 : Cb > 240 ? 240 : Cb; + yuv1[2][x] = Cr; // < 16 ? 16 : Cr > 240 ? 240 : Cr; + } + } + + for (y = width; y < len - width; y += width) { + /* first pixel in column */ + a1 = yuv1[0][y]; + a2 = yuv2[0][y]; + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][y] + op1 * yuv2[1][y]) >> 8; + Cr = (op0 * yuv1[2][y] + op1 * yuv2[2][y]) >> 8; + } + /* rest of pixels in column */ + for (x = 1; x < width - 1; x++) { + a1 = yuv1[0][x + y]; + a2 = yuv2[0][x + y]; + + if ((a1 >= t2 && a1 < threshold) + || (a1 > threshold2 && a1 <= t3)) { + /* special case */ + p1 = ( /* calculate mean of a1 */ + yuv1[0][y - width + x - 1] + + yuv1[0][y - width + x + 1] + + yuv1[0][y - width + x] + + yuv1[0][y + x] + + yuv1[0][y + x - 1] + + yuv1[0][y + x + 1] + + yuv1[0][y + width + x] + + yuv1[0][y + width + x + 1] + + yuv1[0][y + width + x - 1] + ) / 9; + p2 = ( /* calculate mean of a1 */ + yuv2[0][y - width + x - 1] + + yuv2[0][y - width + x + 1] + + yuv2[0][y - width + x] + + yuv2[0][y + x] + + yuv2[0][y + x - 1] + + yuv2[0][y + x + 1] + + yuv2[0][y + width + x] + + yuv2[0][y + width + x + 1] + + yuv2[0][y + width + x - 1] + ) / 9; + + yuv1[0][x + y] = (op0 * p1 + op1 * p2) >> 8; + yuv1[1][x + y] = + (op0 * yuv1[1][x + y] + op1 * yuv2[1][x + y]) >> 8; + yuv1[2][x + y] = + (op0 * yuv1[2][x + y] + op1 * yuv2[2][x + y]) >> 8; + + } else { + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][x + y] + + op1 * yuv2[1][x + y]) >> 8; + Cr = (op0 * yuv1[2][x + y] + + op1 * yuv2[2][x + y]) >> 8; + + yuv1[0][x + y] = Y; // < 16 ? 16 : Y > 235 ? 235 : Y; + yuv1[1][x + y] = Cb; // < 16 ? 16 : Cb > 240 ? 240 : Cb; + yuv1[2][x + y] = Cr; // < 16 ? 16 : Cr > 240 ? 240 : Cr; + } + } + } + } + /* last row */ + for (x = len - width; x < len; x++) { + a1 = yuv1[0][x]; + a2 = yuv2[0][x]; + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][x] + op1 * yuv2[1][x]) >> 8; + Cr = (op0 * yuv1[2][x] + op1 * yuv2[2][x]) >> 8; + + yuv1[0][x] = Y; // < 16 ? 16 : Y > 235 ? 235 : Y; + yuv1[1][x] = Cb; // < 16 ? 16 : Cb > 240 ? 240 : Cb; + yuv1[2][x] = Cr; // < 16 ? 16 : Cr > 240 ? 240 : Cr; + } + } + +} + +void lumakey_smooth_white(uint8_t * yuv1[3], uint8_t * yuv2[3], int width, + int height, int threshold, int threshold2, + int opacity, int distance) +{ + + unsigned int x, y = 0, len = width * height; + uint8_t a1, a2; + unsigned int op0, op1; + uint8_t Y, Cb, Cr; + unsigned int soft0, soft1; + unsigned int t2, t3; + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + soft0 = 255 / distance; + soft1 = 255 - soft0; + + t2 = threshold - distance; + t3 = threshold2 + distance; + + /* first row */ + + for (x = 0; x < width; x++) { + a1 = yuv1[0][x]; + a2 = yuv2[0][x]; + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][x] + op1 * yuv2[1][x]) >> 8; + Cr = (op0 * yuv1[2][x] + op1 * yuv2[2][x]) >> 8; + + yuv1[0][x] = Y; // < 16 ? 16 : Y > 235 ? 235 : Y; + yuv1[1][x] = Cb; // < 16 ? 16 : Cb > 240 ? 240 : Cb; + yuv1[2][x] = Cr; // < 16 ? 16 : Cr > 240 ? 240 : Cr; + } + } + + for (y = width; y < len - width; y += width) { + /* first pixel in column */ + a1 = yuv1[0][y]; + a2 = yuv2[0][y]; + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][y] + op1 * yuv2[1][y]) >> 8; + Cr = (op0 * yuv1[2][y] + op1 * yuv2[2][y]) >> 8; + } + /* rest of pixels in column */ + /* rest of pixels in column */ + for (x = 1; x < width - 1; x++) { + a1 = yuv1[0][x + y]; + a2 = yuv2[0][x + y]; + + if ((a1 >= t2 && a1 < threshold) + || (a1 > threshold2 && a1 <= t3)) { + /* special case */ + yuv1[0][x + y] = 235; + yuv1[1][x + y] = 128; + yuv1[2][x + y] = 128; + } else { + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][x + y] + + op1 * yuv2[1][x + y]) >> 8; + Cr = (op0 * yuv1[2][x + y] + + op1 * yuv2[2][x + y]) >> 8; + + yuv1[0][x + y] = Y; // < 16 ? 16 : Y > 235 ? 235 : Y; + yuv1[1][x + y] = Cb; // < 16 ? 16 : Cb > 240 ? 240 : Cb; + yuv1[2][x + y] = Cr; // < 16 ? 16 : Cr > 240 ? 240 : Cr; + } + } + } + } + /* last row */ + for (x = len - width; x < len; x++) { + a1 = yuv1[0][x]; + a2 = yuv2[0][x]; + if (a1 >= threshold && a1 <= threshold2) { + Y = (op0 * a1 + op1 * a2) >> 8; + Cb = (op0 * yuv1[1][x] + op1 * yuv2[1][x]) >> 8; + Cr = (op0 * yuv1[2][x] + op1 * yuv2[2][x]) >> 8; + + yuv1[0][x] = Y; // < 16 ? 16 : Y > 235 ? 235 : Y; + yuv1[1][x] = Cb; // < 16 ? 16 : Cb > 240 ? 240 : Cb; + yuv1[2][x] = Cr; // < 16 ? 16 : Cr > 240 ? 240 : Cr; + } + } +} + + + +void lumakey_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int type, int threshold, int threshold2, + int feather, int d) +{ + + switch (type) { + case 0: + /* normal overlay */ + lumakey_simple(frame->data, frame2->data, width, height, threshold, threshold2, + feather); + break; + case 1: + /* threshold */ + lumakey_smooth_white(frame->data, frame2->data, width, height, threshold, + threshold2, feather, d); + break; + case 2: + lumakey_smooth(frame->data, frame2->data, width, height, threshold, threshold2, + feather, d); + break; + } + +} +void lumakey_free(){} diff --git a/veejay-server/libvje/effects/lumakey.h b/veejay-server/libvje/effects/lumakey.h new file mode 100644 index 00000000..85e7d5cf --- /dev/null +++ b/veejay-server/libvje/effects/lumakey.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef LUMAKEY_H +#define LUMAKEY_H +#include +#include +#include + +vj_effect *lumakey_init(); +void lumakey_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int type, int threshold, int threshold2, + int feather, int d); + +void lumakey_free(); +#endif diff --git a/veejay-server/libvje/effects/lumamagick.c b/veejay-server/libvje/effects/lumamagick.c new file mode 100644 index 00000000..572bd271 --- /dev/null +++ b/veejay-server/libvje/effects/lumamagick.c @@ -0,0 +1,1064 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +/* 7 ,14, 24, 25, 26 */ +#include +#include +#include +#include "magicoverlays.h" +#include "common.h" +/* 04/01/03: added transparency parameters for frame a and frame b in each function */ + +vj_effect *lumamagick_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + //ve->param_description = (char**)vj_calloc(sizeof(char)* ve->num_params); + ve->defaults[0] = 1; + ve->defaults[1] = 100; + ve->defaults[2] = 100; + ve->description = "Luma Magick"; + ve->limits[0][0] = 1; + ve->limits[1][0] = 39; + ve->limits[0][1] = 0; + ve->limits[1][1] = 200; + ve->limits[0][2] = 0; + ve->limits[1][2] = 200; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +/* 33 = illumination . it increases or decreases light intensity and associate color pixel*/ + + +void _lumamagick_adddistorted(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + int a, b, c; + const double opacity_a = op_a * 0.01; + const int opacity_b = op_b * 0.01; + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + c = a + b; + Y[i] = CLAMP_Y(c); + } + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + b = Cb2[i]; + c = a + b; + Cb[i] = CLAMP_UV(c); + + a = Cr[i]; + b = Cr2[i]; + c = a + b; + Cr[i] = CLAMP_UV(c); + } +} + +/*FIXME : overlay magic add distorted */ +void _lumamagick_add_distorted(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + + unsigned int i; + uint8_t y1, y2, y3, cb, cr, cs; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + y1 = Y[i] * opacity_a; + y2 = Y2[i] * opacity_b; + y3 = y1 + y2; + y3 *= opacity_a; + y3 += y2; + Y[i] = y3; + } + for (i = 0; i < uv_len; i++) { + cb = Cb[i] * opacity_a; + cr = Cb2[i] * opacity_b; + cs = cb + cr; + cs += cr; + Cb[i] = cs; + + cb = Cr[i]; + cr = Cr2[i]; + + cs = cb + cr; + cs += cr; + Cr[i] = cs; + } + +} + +void _lumamagick_subdistorted(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + uint8_t y1, y2, cb, cr; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + y1 = Y[i] * opacity_a; + y2 = Y2[i] * opacity_b; + y1 -= y2; + Y[i] = y1; + } + for (i = 0; i < uv_len; i++) { + cb = Cb[i]; + cr = Cb2[i]; + cb -= cr; + Cb[i] = cb; + cb = Cr[i]; + cr = Cr2[i]; + cb -= cr; + Cr[i] = cb; + } +} + +void _lumamagick_sub_distorted(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + + unsigned int i; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + uint8_t y1, y2, cb, cr, y3, cs; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + y1 = Y[i] * opacity_a; + y2 = Y2[i] * opacity_b; + y3 = y1 - y2; + y3 *= opacity_a; + y3 -= y2; + Y[i] = y3; + } + for (i = 0; i < uv_len; i++) { + cb = Cb[i]; + cr = Cb2[i]; + cs = cb - cr; + cs -= cr; + Cb[i] = cs; + + cb = Cr[i]; + cr = Cr2[i]; + + cs = cb - cr; + cs -= cr; + Cr[i] = cs; + + } +} + +void _lumamagick_multiply(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + uint8_t y1, y2; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + y1 = Y[i] * opacity_a; + y2 = Y2[i] * opacity_b; + y1 = (y1 * y2) >> 8; + Y[i] = y1; + } +} + +void _lumamagick_divide(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + const unsigned int len = width * height; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + b = (Y[i] * opacity_a) * (Y[i] * opacity_a); + c = 255 - (Y2[i] * opacity_b); + if (c < pixel_Y_lo_) + c = pixel_Y_lo_; + a = b / c; + Y[i] = a; + } +} + +void _lumamagick_additive(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a=0; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = (Y[i] * opacity_a) + (2 * (Y2[i] * opacity_b)) - 255; + Y[i] = a; + } +} + +void _lumamagick_substractive(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = (Y[i] * opacity_a) + ((Y2[i] - 255) * opacity_b); + Y[i] = a; + } +} + +void _lumamagick_softburn(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + + if (a + b < 255) { + if (a > pixel_Y_hi_) + c = a; + else + c = (b >> 7) / (256 - a); + } else { + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = 255 - (((255 - a) >> 7) / b); + if (c < pixel_Y_lo_) + c = pixel_Y_lo_; + } + Y[i] = c; + } +} + +void _lumamagick_inverseburn(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (a < pixel_Y_lo_) + c = pixel_Y_lo_; + else + c = 255 - (((255 - b) >> 8) / a); + Y[i] = c; + } +} + + +void _lumamagick_colordodge(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (a >= pixel_Y_hi_) + c = pixel_Y_hi_; + else + c = (b >> 8) / (pixel_Y_hi_ - a); + + Y[i] = c; + } +} + +void _lumamagick_mulsub(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = (pixel_Y_hi_ - Y2[i]) * opacity_b; + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = a / b; + Y[i] = c; + } +} + +void _lumamagick_lighten(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (a > b) + c = a; + else + c = b; + Y[i] = c; + } +} + +void _lumamagick_difference(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + Y[i] = abs(a - b); + } +} + +void _lumamagick_diffnegate(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = (255 - Y[i]) * opacity_a; + b = Y2[i] * opacity_b; + Y[i] = 255 - abs(a - b); + } +} + +void _lumamagick_exclusive(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + c = a + b - ((a * b) >> 8); + // Y[i] = Y[i] + Y2[i] - + // ((Y[i]*Y2[i])>>8); //or try 7 + Y[i] = c; + } +} + +void _lumamagick_basecolor(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c, d; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (a < pixel_Y_lo_) + a = pixel_Y_lo_; + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = a * b >> 7; + d = c + a * ((255 - (((255 - a) * (255 - b)) >> 7) - c) >> 7); //8 + Y[i] = d; + } +} + +void _lumamagick_freeze(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + + if (b < pixel_Y_lo_) + c = pixel_Y_lo_; + else + c = 255 - ((255 - a) * (255 - a)) / b; + + Y[i] = c; + } +} + +void _lumamagick_unfreeze(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + + if (a < pixel_Y_lo_) + c = pixel_Y_lo_; + else + c = 255 - ((256 - b) * (256 - b)) / a; + if (c < pixel_Y_lo_) + c = pixel_Y_lo_; + + Y[i] = c; + } +} + +void _lumamagick_hardlight(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + + if (b < 128) + c = (a * b) >> 7; + else + c = 255 - ((256 - b) * (256 - a) >> 7); + if (c < pixel_Y_lo_) + c = pixel_Y_lo_; + + Y[i] = c; + } +} +void _lumamagick_relativeaddlum(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + int a, b, c, d; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + c = a >> 1; + b = Y2[i] * opacity_b; + d = b >> 1; + Y[i] = c + d; + } +} + +void _lumamagick_relativesublum(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + Y[i] = (a - b + 255) >> 1; + } +} + +void _lumamagick_relativeadd(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b, c, d; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + c = a >> 1; + b = Y2[i] * opacity_b; + d = b >> 1; + Y[i] = c + d; + } + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + c = a >> 1; + b = Cb2[i]; + d = b >> 1; + Cb[i] = c + d; + + a = Cr[i]; + c = a >> 1; + b = Cr2[i]; + d = b >> 1; + Cr[i] = c + d; + } +} + +void _lumamagick_relativesub(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + Y[i] = (a - b + 255) >> 1; + } + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + b = Cb2[i]; + Cb[i] = (a - b + 255) >> 1; + a = Cr[i]; + b = Cr2[i]; + Cr[i] = (a - b + 255) >> 1; + } + +} +void _lumamagick_minsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (b < a) + Y[i] = (b - a + 255) >> 1; + else + Y[i] = (a - b + 255) >> 1; + } +} + +void _lumamagick_maxsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (b > a) + Y[i] = (b - a + 255) >> 1; + else + Y[i] = (a - b + 255) >> 1; + } +} + + + +void _lumamagick_addsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b) +{ + unsigned int i; + int c, a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + + if (b < a) { + c = (a + b) >> 1; + Y[i] = c; + } + } +} + + +void _lumamagick_maxselect(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (b > a) + Y[i] = b; + } +} + +void _lumamagick_minselect(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (b < a) + Y[i] = b; + } +} + +void _lumamagick_addtest(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int c, a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + c = a + (2 * b) - 255; + Y[i] = c; + } +} +void _lumamagick_addtest2(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int c, a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + c = a + (2 * b) - 255; + Y[i] = c; + } + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + b = Cb2[i]; + c = a + (2 * b) - 255; + Cb[i] = c; + + a = Cr[i]; + b = Cr2[i]; + c = a + (2 * b) - 255; + Cr[i] = c; + + } + +} +void _lumamagick_addtest4(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int c, a, b; + double opacity_a = op_a * 0.01; + double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + b = b - 255; + if (a < pixel_Y_lo_) + a = pixel_Y_lo_; + if (b < pixel_Y_lo_) + b = Y2[i] * opacity_b; + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = (a * a) / b; + + Y[i] = c; + } + +} + +void _lumamagick_selectmin(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + a = Y[(i<<2)] * opacity_a; + b = Y2[(i<<2)] * opacity_b; + if (a > b) { + Cb[i] = Cb2[i]; + Cr[i] = Cr2[i]; + } + } + + + for (i = 0; i < uv_len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (b < a) { + Y[i] = b; + } + } +} + +void _lumamagick_addtest3(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int c, a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = (255 - Y2[i]) * opacity_b; + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = (a * a) / b; + + Y[i] = c; + } + for (i = 0; i < uv_len; i++) { + //a = Cb[i] * opacity_a; + //b = (pixel_Y_hi_ - Cb2[i]) * opacity_b; + //if (b < pixel_Y_lo_) b = Cb2[i] * opacity_b; + a = Cb[i]; + b = 255 - Cb2[i]; + if (b < pixel_U_lo_) + b = Cb2[i]; + + c = (a >> 1) + (b >> 1); + + Cb[i] = c; + + //a = Cr[i] * opacity_a; + //b = (pixel_Y_hi_ - Cr2[i]) * opacity_b; + //if (b < pixel_Y_lo_) b = Cr2[i] * opacity_b; + + a = Cr[i]; + b = 255 - Cr2[i]; + if (b < pixel_U_lo_) + b = Cr2[i]; + + + c = (a >> 1) + (b >> 1); + + Cr[i] = c; + + } + +} + + +void _lumamagick_addlum(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b) +{ + unsigned int i; + int c, a, b; + const double opacity_a = op_a * 0.01; + const double opacity_b = op_b * 0.01; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] * opacity_a; + b = Y2[i] * opacity_b; + if (b > pixel_Y_hi_) + b = pixel_Y_hi_; + if ((255 - b) > 0) { + c = (a * a) / 255; + } else { + c = (a * a) / (256 - b); + } + Y[i] = c; + + } +} + + +void lumamagic_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n, int op_a, int op_b) +{ + switch (n) { + case VJ_EFFECT_BLEND_ADDDISTORT: + _lumamagick_add_distorted(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_SUBDISTORT: + _lumamagick_sub_distorted(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_MULTIPLY: + _lumamagick_multiply(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_DIVIDE: + _lumamagick_divide(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_ADDITIVE: + _lumamagick_additive(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_SUBSTRACTIVE: + _lumamagick_substractive(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_SOFTBURN: + _lumamagick_softburn(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_INVERSEBURN: + _lumamagick_inverseburn(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_COLORDODGE: + _lumamagick_colordodge(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_MULSUB: + _lumamagick_mulsub(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_LIGHTEN: + _lumamagick_lighten(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_DIFFERENCE: + _lumamagick_difference(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_DIFFNEGATE: + _lumamagick_diffnegate(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_EXCLUSIVE: + _lumamagick_exclusive(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_BASECOLOR: + _lumamagick_basecolor(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_HARDLIGHT: + _lumamagick_hardlight(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_RELADD: + _lumamagick_relativeadd(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_RELSUB: + _lumamagick_relativesub(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_MAXSEL: + _lumamagick_maxselect(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_MINSEL: + _lumamagick_minselect(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_RELADDLUM: + _lumamagick_relativeaddlum(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_RELSUBLUM: + _lumamagick_relativesublum(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_MINSUBSEL: + _lumamagick_minsubselect(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_MAXSUBSEL: + _lumamagick_maxsubselect(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_ADDSUBSEL: + _lumamagick_addsubselect(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_ADDAVG: + _lumamagick_addtest(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_ADDTEST2: + _lumamagick_addtest2(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_ADDTEST4: + _lumamagick_addtest3(frame, frame2, width, height, op_a, op_b); + break; + case VJ_EFFECT_BLEND_ADDTEST3: + _lumamagick_addtest4(frame, frame2, width, height, op_a, op_b); + break; + } +} diff --git a/veejay-server/libvje/effects/lumamagick.h b/veejay-server/libvje/effects/lumamagick.h new file mode 100644 index 00000000..82764088 --- /dev/null +++ b/veejay-server/libvje/effects/lumamagick.h @@ -0,0 +1,149 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef LUMAMAGIC_H +#define LUMAMAGIC_H +#include +#include +#include + +vj_effect *lumamagick_init(); + +void lumamagic_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n, int op_a, int op_b); + +void _lumamagick_add_distorted(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_sub_distorted(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_multiply(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_divide(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_additive(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_substractive(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_softburn(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_inverseburn(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_colordodge(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_mulsub(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_lighten(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_difference(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_diffnegate(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_exclusive(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_basecolor(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_freeze(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_unfreeze(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_hardlight(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + + +void _lumamagick_relativesublum(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + + +void _lumamagick_relativeaddlum(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + + +void _lumamagick_relativesub(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_relativeadd(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + + +void _lumamagick_maxselect(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + + +void _lumamagick_minselect(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + + +void _lumamagick_minsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); +void _lumamagick_maxsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); +void _lumamagick_addsubselectlum(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, + int op_b); + +void _lumamagick_addsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); +void _lumamagick_addtest(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); +void _lumamagick_addtest2(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); +void _lumamagick_addtest3(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); +void _lumamagick_addtest4(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_selectmin(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_selectmax(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +void _lumamagick_selectfreeze(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_selectunfreeze(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_selectdiff(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); + +void _lumamagick_selectdiffneg(VJFrame *frame, VJFrame *frame2, + int width, int height, int op_a, int op_b); +void _lumamagick_addlum(VJFrame *frame, VJFrame *frame2, int width, + int height, int op_a, int op_b); + +#endif diff --git a/veejay-server/libvje/effects/lumamask.c b/veejay-server/libvje/effects/lumamask.c new file mode 100644 index 00000000..08c018c8 --- /dev/null +++ b/veejay-server/libvje/effects/lumamask.c @@ -0,0 +1,188 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +/* + this effect takes lumaninance information of frame B (0=no displacement,255=max displacement) + to extract distortion offsets for frame A. + h_scale and v_scale can be used to limit the scaling factor. + if the value is < 128, the pixels will be shifted to the left + otherwise to the right. + + + +*/ +#include +#include +#include +#include "lumamask.h" +#include "common.h" +static uint8_t *buf[3] = { NULL,NULL,NULL }; + +vj_effect *lumamask_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = width; + ve->limits[0][1] = 1; + ve->limits[1][1] = height; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + ve->defaults[0] = width/20; + ve->defaults[1] = height/10; + ve->defaults[2] = 0; // border + ve->description = "Displacement Map"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +// FIXME: private + +static int n__ = 0; +static int N__ = 0; + + +int lumamask_malloc(int width, int height) +{ + buf[0] = (uint8_t*)vj_yuvalloc(width,height); + if(!buf[0]) return 0; + buf[1] = buf[0] + (width *height); + buf[2] = buf[1] + (width *height); + + n__ = 0; + N__ = 0; + return 1; +} + +void lumamask_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int v_scale, int h_scale, int border ) +{ + unsigned int x,y; + int dx,dy,nx,ny; + int tmp; + int interpolate = 1; + int tmp1 = v_scale; + int tmp2 = h_scale; + int motion = 0; + + if( motionmap_active() ) + { + motionmap_scale_to(width,height,1,1,&tmp1,&tmp2,&n__,&N__ ); + motion = 1; + } + else + { + n__ = 0; + N__ = 0; + } + if( n__ == N__ || n__ == 0 ) + interpolate = 0; + + double w_ratio = (double) tmp1 / 128.0; + double h_ratio = (double) tmp2 / 128.0; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + // keep copy of original frame + veejay_memcpy(buf[0], Y, width * height ); + veejay_memcpy(buf[1], Cb, (width * height) ); + veejay_memcpy(buf[2], Cr, (width * height) ); + + + if( border ) + { + for(y=0; y < height; y++) + { + for(x=0; x < width ; x++) + { + // calculate new location of pixel + tmp = Y2[(y*width+x)] - 128; + // new x offset + dx = w_ratio * tmp; + // new y offset + dy = h_ratio * tmp; + // new pixel coordinates + nx = x + dx; + ny = y + dy; + + + if( nx < 0 || ny < 0 || nx >= width || ny >= height ) + { + Y[y*width+x] = 16; + Cb[y*width+x] = 128; + Cr[y*width+x] = 128; + } + else + { + Y[y*width+x] = Y2[ny * width + nx]; + Cb[y*width+x] = Cb2[ny * width + nx]; + Cr[y*width+x] = Cr2[ny * width + nx]; + } + } + } + } + else + { + for(y=0; y < height; y++) + { + for(x=0; x < width ; x++) + { + tmp = Y2[(y*width+x)] - 128; + dx = w_ratio * tmp; + dy = h_ratio * tmp; + nx = x + dx; + ny = y + dy; + while( nx < 0 ) + nx += width; + while( ny < 0 ) + ny += height; + if( ny >= height ) ny = height - 1; + if( nx > width ) nx = width; + + Y[y*width+x] = Y2[ny * width + nx]; + Cb[y*width+x] = Cb2[ny * width + nx]; + Cr[y*width+x] = Cr2[ny * width + nx]; + } + } + } + + if( interpolate ) + motionmap_interpolate_frame( frame, N__, n__ ); + + if( motion ) + motionmap_store_frame( frame ); + +} +void lumamask_free() +{ + if(buf[0]) free(buf[0]); + buf[0] = NULL; + buf[1] = NULL; + buf[2] = NULL; +} diff --git a/veejay-server/libvje/effects/lumamask.h b/veejay-server/libvje/effects/lumamask.h new file mode 100644 index 00000000..c36eafcc --- /dev/null +++ b/veejay-server/libvje/effects/lumamask.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef LUMAMASK_H +#define LUMAMASK_H +#include +#include +#include + +void lumamask_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int mode, int h_scale, int border); +vj_effect *lumamask_init(int w, int h); +int lumamask_malloc(int w, int h); +void lumamask_free(); +#endif diff --git a/veejay-server/libvje/effects/magicmirror.c b/veejay-server/libvje/effects/magicmirror.c new file mode 100644 index 00000000..f00781a7 --- /dev/null +++ b/veejay-server/libvje/effects/magicmirror.c @@ -0,0 +1,234 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include "magicmirror.h" +#include +#include +#include "common.h" +// if d or n changes, tables need to be calculated +static uint8_t *magicmirrorbuf[3]; +static double *funhouse_x = NULL; +static double *funhouse_y = NULL; +static unsigned int *cache_x = NULL; +static unsigned int *cache_y = NULL; +static unsigned int last[2] = {0,0}; +//static uint8_t *p0_frame_ = NULL; + +vj_effect *magicmirror_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + + ve->defaults[0] = w/4; + ve->defaults[1] = h/4; + ve->defaults[2] = 20; + ve->defaults[3] = 20; + + ve->limits[0][0] = 0; + ve->limits[1][0] = w/2; + ve->limits[0][1] = 0; + ve->limits[1][1] = h/2; + ve->limits[0][2] = 0; + ve->limits[1][2] = 100; + ve->limits[0][3] = 0; + ve->limits[1][3] = 100; + + ve->sub_format = 1; + ve->description = "Magic Mirror Surface"; + ve->has_user =0; + ve->extra_frame = 0; + + return ve; +} +// FIXME private +#define RUP8(num)(((num)+8)&~8) + +static int n__ = 0; +static int N__ = 0; +int magicmirror_malloc(int w, int h) +{ + magicmirrorbuf[0] = (uint8_t*)vj_yuvalloc(w,h); + if(!magicmirrorbuf[0]) return 0; + magicmirrorbuf[1] = magicmirrorbuf[0] + (w*h); + magicmirrorbuf[2] = magicmirrorbuf[1] + (w*h); + + funhouse_x = (double*)vj_calloc(sizeof(double) * w ); + if(!funhouse_x) return 0; + + cache_x = (unsigned int *)vj_calloc(sizeof(unsigned int)*w); + if(!cache_x) return 0; + + funhouse_y = (double*)vj_calloc(sizeof(double) * h ); + if(!funhouse_y) return 0; + + cache_y = (unsigned int*)vj_calloc(sizeof(unsigned int)*h); + if(!cache_y) return 0; + veejay_memset(cache_x,0,w); + veejay_memset(cache_y,0,h); + + n__ =0; + N__ =0; + //p0_frame_ = (uint8_t*) vj_malloc( sizeof(uint8_t) * RUP8( w * h * 3) ); + + return 1; +} + +void magicmirror_free() +{ + if(magicmirrorbuf[0]) free(magicmirrorbuf[0]); + if(funhouse_x) free(funhouse_x); + if(funhouse_y) free(funhouse_y); + if(cache_x) free(cache_x); + if(cache_y) free(cache_y); +// if(p0_frame_) free(p0_frame_); +// p0_frame_=0; + magicmirrorbuf[0] = NULL; + magicmirrorbuf[1] = NULL; + magicmirrorbuf[2] = NULL; + cache_x = NULL; + cache_y = NULL; + funhouse_x = NULL; + funhouse_y = NULL; +} + +void magicmirror_apply( VJFrame *frame, int w, int h, int vx, int vy, int d, int n ) +{ + double c1 = (double)vx; + double c2 = (double)vy; + int motion = 0; + if( motionmap_active()) + { + motionmap_scale_to( 100,100,0,0, &d, &n, &n__, &N__ ); + motion = 1; + } + else + { + n__ = 0; + N__ = 0; + } + + double c3 = (double)d * 0.001; + unsigned int dx,dy,x,y,p,q,len=w*h; + double c4 = (double)n * 0.001; + int changed = 0; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + int interpolate = 1; + + if( n__ == N__ || n__ == 0) + interpolate = 0; + + if( d != last[1] ) + { + changed = 1; last[1] =d; + } + if( n != last[0] ) + { + changed = 1; last[0] = n; + } + + if(changed==1) + { // degrees x or y changed, need new sin + for(x=0; x < w ; x++) + { + double res; + fast_sin(res,(double)(c3*x)); + funhouse_x[x] = res; + //funhouse_x[x] = sin(c3 * x); + } + for(y=0; y < h; y++) + { + double res; + fast_sin(res,(double)(c4*y)); + funhouse_y[y] = res; + //funhouse_y[y] = sin(c4 * y); + } + } + + veejay_memcpy( magicmirrorbuf[0], Y, len ); + veejay_memcpy( magicmirrorbuf[1], Cb, len ); + veejay_memcpy( magicmirrorbuf[2], Cr, len ); + + + for(x=0; x < w; x++) + { + dx = x + funhouse_x[x] * c1; + if(dx < 0) dx += w; + if(dx < 0) dx = 0; else if (dx >= w) dx = w-1; + cache_x[x] = dx; + } + for(y=0; y < h; y++) + { + dy = y + funhouse_y[y] * c2; + if(dy < 0) dy += h; + if(dy < 0) dy = 0; else if (dy >= h) dy = h-1; + cache_y[y] = dy; + } + + for(y=1; y < h-1; y++) + { + for(x=1; x < w-1; x++) + { + p = cache_y[y] * w + cache_x[x]; + q = y * w + x; + Y[q] = magicmirrorbuf[0][p]; + Cb[q] = magicmirrorbuf[1][p]; + Cr[q] = magicmirrorbuf[2][p]; + } + } +/* + uint8_t *p0[3] = { + p0_frame_ + 0, + p0_frame_ + (w*h), + p0_frame_ + (2*w*h) }; + + if(interpolate) + { + VJFrame prev; + veejay_memcpy(&prev, frame, sizeof(VJFrame)); + prev->data[0] = p0_frame_; + prev->data[1] = p0_frame_ + (w*h); + prev->data[2] = p0_frame_ + (2*w*h); + + motionmap_lerp_frame( frame, &prev, N__, n__ ); + } + + if( motionmap_active()) + { + veejay_memcpy( prev->data[0], Y, w*h); + veejay_memcpy( prev->data[1], Cb, w*h); + veejay_memcpY( prev->data[2], Cr,w*h); + }*/ + + if( interpolate ) + { + motionmap_interpolate_frame( frame, N__, n__ ); + } + + if( motion ) + { + motionmap_store_frame(frame); + } + +} diff --git a/veejay-server/libvje/effects/magicmirror.h b/veejay-server/libvje/effects/magicmirror.h new file mode 100644 index 00000000..dde65fba --- /dev/null +++ b/veejay-server/libvje/effects/magicmirror.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef MAGICMIRROR_H +#define MAGICMIRROR_H +#include +#include +#include +#include + +vj_effect *magicmirror_init(int w, int h); +int magicmirror_malloc(int w, int h); +void magicmirror_apply( VJFrame *frame, int width, int height, int a, int b, + int na, int nb); +void magicmirror_free(); +#endif diff --git a/veejay-server/libvje/effects/magicoverlays.c b/veejay-server/libvje/effects/magicoverlays.c new file mode 100644 index 00000000..7ee8cf31 --- /dev/null +++ b/veejay-server/libvje/effects/magicoverlays.c @@ -0,0 +1,927 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "magicoverlays.h" +#include + +#include "common.h" +vj_effect *overlaymagic_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 7; + ve->description = "Overlay Magic"; + ve->limits[0][0] = 1; + ve->limits[1][0] = 32; + ve->extra_frame = 1; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + +/* rename methods in lumamagick and chromamagick */ + + +void _overlaymagic_adddistorted(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + c = a + b; + Y[i] = CLAMP_Y(c); + } + + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + b = Cb2[i]; + c = a + b; + Cb[i] = CLAMP_UV(c); + + a = Cr[i]; + b = Cr2[i]; + c = a + b; + Cr[i] = CLAMP_UV(c); + } +} + +void _overlaymagic_add_distorted(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + + unsigned int i; + uint8_t y1, y2, cb, cr; + unsigned int len = width * height; + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (i = 0; i < len; i++) { + y1 = Y[i]; + y2 = Y2[i]; + Y[i] = y1 + y2; + } + + for (i = 0; i < uv_len; i++) { + cb = Cb[i]; + cr = Cb2[i]; + Cb[i] = cb + cr; + + cb = Cr[i]; + cr = Cr2[i]; + + Cr[i] = cb + cr; + } + +} + +void _overlaymagic_subdistorted(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + uint8_t y1, y2, cb, cr; + for (i = 0; i < len; i++) { + y1 = Y[i]; + y2 = Y2[i]; + y1 -= y2; + Y[i] = y1; + } + for (i = 0; i < uv_len; i++) { + cb = Cb[i]; + cr = Cb2[i]; + cb -= cr; + Cb[i] = cb; + cb = Cr[i]; + cr = Cr2[i]; + cb -= cr; + Cr[i] = cb; + } +} + +void _overlaymagic_sub_distorted(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + + unsigned int i ; + unsigned int len = width * height; + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + uint8_t y1, y2, cb, cr; + for (i = 0; i < len; i++) { + y1 = Y[i]; + y2 = Y2[i]; + Y[i] = y1 - y2; + } + for (i = 0; i < uv_len; i++) { + cb = Cb[i]; + cr = Cb2[i]; + Cb[i] = cb - cr; + + cb = Cr[i]; + cr = Cr2[i]; + + Cr[i] = cb - cr; + + } +} + +void _overlaymagic_multiply(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + uint8_t y1, y2; + for (i = 0; i < len; i++) { + y1 = Y[i]; + y2 = Y2[i]; + y1 = (y1 * y2) >> 8; + Y[i] = y1; + } +} + +void _overlaymagic_divide(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int i; + int a, b, c; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + for (i = 0; i < len; i++) { + b = Y[i] * Y[i]; + c = 255 - Y2[i]; + if (c == 0) + c = pixel_Y_lo_; + a = b / c; + Y[i] = a; + } +} + +void _overlaymagic_additive(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a; + while(len--) { + a = Y[len] + (2 * Y2[len]) - 255; + Y[len] = CLAMP_Y(a); + } +} + + +void _overlaymagic_substractive(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + + unsigned int i; + int a; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i] + (Y2[i] - 255); + Y[i] = a; + } +} + +void _overlaymagic_softburn(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + + if (a + b < pixel_Y_hi_) { + if (a == pixel_Y_hi_) + c = a; + else + c = (b >> 7) / (256 - a); + } else { + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = 255 - (((255 - a) >> 7) / b); + } + Y[i] = c; + } +} + +void _overlaymagic_inverseburn(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if (a < pixel_Y_lo_) + c = pixel_Y_lo_; + else + c = 255 - (((255 - b) >> 8) / a); + Y[i] = CLAMP_Y(c); + } +} + + +void _overlaymagic_colordodge(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if (a >= pixel_Y_hi_) + c = pixel_Y_hi_; + else + c = (b >> 8) / (256 - a); + + if (c > pixel_Y_hi_) + c = pixel_Y_hi_; + Y[i] = c; + } +} + +void _overlaymagic_mulsub(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = 255 - Y2[i]; + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = a / b; + Y[i] = c; + } +} + +void _overlaymagic_lighten(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if (a > b) + c = a; + else + c = b; + Y[i] = c; + } +} + +void _overlaymagic_difference(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + Y[i] = abs(a - b); + } +} + +void _overlaymagic_diffnegate(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + int a, b; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = (255 - Y[i]); + b = Y2[i]; + Y[i] = 255 - abs(a - b); + } +} + +void _overlaymagic_exclusive(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + c = a + b - ((a * b) >> 8); + Y[i] = c; + } + + for( i=0; i < uv_len; i++) { + a = Cb[i]-128; + b = Cb2[i]-128; + c = a +b - (( a * b ) >> 8); + c += 128; + Cb[i] = CLAMP_UV(c); + + + a = Cr[i] - 128; + b = Cr2[i] - 128; + c = a + b - (( a * b) >> 8); + c += 128; + Cr[i] = CLAMP_UV(c); + } +} + +void _overlaymagic_basecolor(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + int a, b, c, d; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if (a < pixel_Y_lo_) + a = pixel_Y_lo_; + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = a * b >> 7; + d = c + a * ((255 - (((255 - a) * (255 - b)) >> 7) - c) >> 7); //8 + Y[i] = d; + } +} + +void _overlaymagic_freeze(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + + if (b < pixel_Y_lo_) + c = a; + else + c = 255 - ((256 - a) * (256 - a)) / b; + Y[i] = c; + } +} + +void _overlaymagic_unfreeze(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + + if (a < pixel_Y_lo_) + c = pixel_Y_lo_; + else + c = 255 - ((255 - b) * (255 - b)) / a; + Y[i] = c; + } +} + +void _overlaymagic_hardlight(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b, c; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + + if (b < 128) + c = (a * b) >> 7; + else + c = 256 - ((256 - b) * (256 - a) >> 7); + Y[i] = c; + } +} +void _overlaymagic_relativeaddlum(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + int a, b, c, d; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + a = Y[i]; + c = a >> 1; + b = Y2[i]; + d = b >> 1; + if ((c + d) < a) + c = a; + else + c += d; + Y[i] = c; + } +} + +void _overlaymagic_relativesublum(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + Y[i] = (a - b + 255) >> 1; + } +} + +void _overlaymagic_relativeadd(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + int a, b, c, d; + for (i = 0; i < len; i++) { + a = Y[i]; + c = a >> 1; + b = Y2[i]; + d = b >> 1; + Y[i] = c + d; + } + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + c = a >> 1; + b = Cb2[i]; + d = b >> 1; + Cb[i] = c + d; + + a = Cr[i]; + c = a >> 1; + b = Cr2[i]; + d = b >> 1; + Cr[i] = c + d; + } +} + +void _overlaymagic_relativesub(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + int a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + Y[i] = (a - b + 255) >> 1; + } + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + b = Cb2[i]; + Cb[i] = (a - b + 255) >> 1; + a = Cr[i]; + b = Cr2[i]; + Cr[i] = (a - b + 255) >> 1; + } + +} +void _overlaymagic_minsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if (b < a) + Y[i] = (b - a + 255) >> 1; + else + Y[i] = (a - b + 255) >> 1; + } +} + +void _overlaymagic_maxsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if (b > a) + Y[i] = (b - a + 255) >> 1; + else + Y[i] = (a - b + 255) >> 1; + } +} + + + +void _overlaymagic_addsubselect(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + int c, a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + + if (b < a) { + c = (a + b) >> 1; + Y[i] = c; + } + } +} + + +void _overlaymagic_maxselect(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if (b > a) + Y[i] = b; + } +} + +void _overlaymagic_minselect(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + if (b < a) + Y[i] = b; + } +} + +void _overlaymagic_addtest(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + int c, a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + c = a + (2 * b) - 255; + Y[i] = c; + } +} +void _overlaymagic_addtest2(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + int c, a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + c = a + (2 * b) - 255; + Y[i] = c; + } + + for (i = 0; i < uv_len; i++) { + a = Cb[i]; + b = Cb2[i]; + c = a + (2 * b) - 255; + Cb[i] = c; + + a = Cr[i]; + b = Cr2[i]; + c = a + (2 * b) - 255; + Cr[i] = c; + + } + +} +void _overlaymagic_addtest4(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int i; + unsigned int len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + int c, a, b; + for (i = 0; i < len; i++) { + a = Y[i]; + b = Y2[i]; + b = b - 255; + if (a < pixel_Y_lo_) + a = pixel_Y_lo_; + if (b < pixel_Y_lo_) + b = Y2[i]; + if (b < pixel_Y_lo_) + b = pixel_Y_lo_; + c = (a * a) / b; + + Y[i] = c; + } + +} + +void _overlaymagic_try + (VJFrame *frame, VJFrame *frame2, int width, int height) { + unsigned int i; + unsigned int len = width * height; + int a, b, p, q; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + + for (i = 0; i < len; i++) { + /* calc p */ + a = Y[i]; + b = Y[i]; + + if (b < pixel_Y_lo_) + p = pixel_Y_lo_; + else + p = 255 - ((256 - a) * (256 - a)) / b; + if (p < pixel_Y_lo_) + p = pixel_Y_lo_; + + /* calc q */ + a = Y2[i]; + b = Y2[i]; + if (b < pixel_Y_lo_) + q = pixel_Y_lo_; + else + q = 255 - ((256 - a) * (256 - a)) / b; + if (b < pixel_Y_lo_) + q = pixel_Y_lo_; + + /* calc pixel */ + if (q < pixel_Y_lo_) + q = pixel_Y_lo_; + else + q = 255 - ((256 - p) * (256 - a)) / q; + if (q < pixel_Y_lo_) + q = pixel_Y_lo_; + + + Y[i] = q; + + + } +} + +void overlaymagic_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n) +{ + switch (n) { + case VJ_EFFECT_BLEND_ADDITIVE: + _overlaymagic_additive(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_SUBSTRACTIVE: + _overlaymagic_substractive(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_MULTIPLY: + _overlaymagic_multiply(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_DIVIDE: + _overlaymagic_divide(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_LIGHTEN: + _overlaymagic_lighten(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_DIFFERENCE: + _overlaymagic_difference(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_DIFFNEGATE: + _overlaymagic_diffnegate(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_EXCLUSIVE: + _overlaymagic_exclusive(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_BASECOLOR: + _overlaymagic_basecolor(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_FREEZE: + _overlaymagic_freeze(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_UNFREEZE: + _overlaymagic_unfreeze(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_RELADD: + _overlaymagic_relativeadd(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_RELSUB: + _overlaymagic_relativesub(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_RELADDLUM: + _overlaymagic_relativeaddlum(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_RELSUBLUM: + _overlaymagic_relativesublum(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_MAXSEL: + _overlaymagic_maxselect(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_MINSEL: + _overlaymagic_minselect(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_MINSUBSEL: + _overlaymagic_minsubselect(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_MAXSUBSEL: + _overlaymagic_maxsubselect(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_ADDSUBSEL: + _overlaymagic_addsubselect(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_ADDAVG: + _overlaymagic_add_distorted(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_ADDTEST2: + _overlaymagic_addtest(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_ADDTEST3: + _overlaymagic_addtest2(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_ADDTEST4: + _overlaymagic_addtest4(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_MULSUB: + _overlaymagic_mulsub(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_SOFTBURN: + _overlaymagic_softburn(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_INVERSEBURN: + _overlaymagic_inverseburn(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_COLORDODGE: + _overlaymagic_colordodge(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_ADDDISTORT: + _overlaymagic_adddistorted(frame, frame2, width, height); + break; + case VJ_EFFECT_BLEND_SUBDISTORT: + _overlaymagic_subdistorted(frame, frame2, width, height); + break; + case 32: + _overlaymagic_try(frame, frame2, width, height); + break; + + } +} +void overlaymagic_free(){} diff --git a/veejay-server/libvje/effects/magicoverlays.h b/veejay-server/libvje/effects/magicoverlays.h new file mode 100644 index 00000000..01c1ab31 --- /dev/null +++ b/veejay-server/libvje/effects/magicoverlays.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef MAGICOVERLAYS_H +#define MAGICOVERLAYS_H +#include +#include +#include + +vj_effect *overlaymagic_init(int w, int h); + +void overlaymagic_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int n); + +void magicoverlays_free(); +#endif diff --git a/veejay-server/libvje/effects/magicphotos.c b/veejay-server/libvje/effects/magicphotos.c new file mode 100644 index 00000000..dcc38330 --- /dev/null +++ b/veejay-server/libvje/effects/magicphotos.c @@ -0,0 +1,227 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +#include "photoplay.h" +#include +#include "common.h" + +vj_effect *photoplay_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; // divider + ve->limits[1][0] = max_power(w); + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; // waterfall + ve->limits[0][2] = 0; + ve->limits[1][2] = 3; // mode + ve->defaults[0] = 2; + ve->defaults[1] = 0; + ve->defaults[2] = 1; + ve->description = "Photoplay (timestretched mosaic)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static picture_t **photo_list = NULL; +static int num_photos = 0; +static int frame_counter = 0; + + +static int prepare_filmstrip(int film_length, int w, int h) +{ + int i,j; + int picture_width = w / sqrt(film_length); + int picture_height = h / sqrt(film_length); + + photo_list = (picture_t**) vj_malloc(sizeof(picture_t*) * (film_length + 1) ); + if(!photo_list) + return 0; + + num_photos = film_length; + + uint8_t val = 0; + int inc = num_photos % 255; + + for ( i = 0; i < num_photos; i ++ ) + { + photo_list[i] = vj_malloc(sizeof(picture_t)); + if(!photo_list[i]) + return 0; + photo_list[i]->w = picture_width; + photo_list[i]->h = picture_height; + for( j = 0; j < 3; j ++ ) + { + photo_list[i]->data[j] = vj_malloc(sizeof(uint8_t) * picture_width * picture_height ); + if(!photo_list[i]->data[j]) + return 0; + memset(photo_list[i]->data[j], (j==0 ? val : 128), picture_width *picture_height ); + } + val+= inc; + } + frame_counter = 0; + + return 1; +} + +static void destroy_filmstrip(void) +{ + if(photo_list) + { + int i = 0; + while(i < num_photos) + { + if( photo_list[i] ) + { + int j; + for( j = 0; j < 3; j ++ ) + if(photo_list[i]->data[j]) + free(photo_list[i]->data[j]); + free(photo_list[i]); + } + i++; + } + free(photo_list); + } + photo_list = NULL; + num_photos = 0; + frame_counter = 0; +} + + + +int photoplay_malloc(int w, int h ) +{ + num_photos = 0; + return 1; +} + + +void photoplay_free(void) +{ + destroy_filmstrip(); +} + +static void take_photo( uint8_t *plane, uint8_t *dst_plane, int w, int h, int index ) +{ + + int x,y,dx,dy; + int sum; + int dst_x, dst_y; + int step_y; + int step_x; + int box_width = photo_list[index]->w; + int box_height = photo_list[index]->h; + + step_x = w / box_width; + step_y = h / box_height; + + for( y = 0 ,dst_y = 0; y < h && dst_y < box_height; y += step_y ) + { + for( x = 0, dst_x = 0; x < w && dst_x < box_width; x+= step_x ) + { + sum = 0; + for( dy = 0; dy < step_y; dy ++ ) + { + for( dx = 0; dx < step_x; dx++) + { + sum += plane[ ((y+dy)*w+(dx+x)) ]; + } + } + // still problem here! + if(sum > 0) + dst_plane[(dst_y*box_width)+dst_x] = sum / (step_y*step_x); + else + dst_plane[(dst_y*box_width)+dst_x] = 16; + + dst_x++; + } + dst_y++; + } +} + +static void put_photo( uint8_t *dst_plane, uint8_t *photo, int dst_w, int dst_h, int index , matrix_t matrix) +{ + int box_w = photo_list[index]->w; + int box_h = photo_list[index]->h; + int x,y; + + uint8_t *P = dst_plane + (matrix.h*dst_w); + int offset = matrix.w; + + for( y = 0; y < box_h; y ++ ) + { + for( x = 0; x < box_w; x ++ ) + { + *(P+offset+x) = photo[(y*box_w)+x]; + } + P += dst_w; + } +} + +void photoplay_apply( VJFrame *frame, int width, int height, int size, int delay, int mode ) +{ + unsigned int i; + uint8_t *dstY = frame->data[0]; + uint8_t *dstU = frame->data[1]; + uint8_t *dstV = frame->data[2]; + + matrix_f matrix_placement = get_matrix_func(mode); + + if( (size*size) != num_photos || num_photos == 0 ) + { + destroy_filmstrip(); + if(!prepare_filmstrip(size*size, width,height)) + { + return; + } + } + + + if(frame_counter < num_photos) + { + for( i = 0; i < 3 ; i ++ ) + memset( frame->data[i], (i==0?16:128), (width*height)); + frame_counter ++; + return; + } + + for( i = 0; i < 3; i ++ ) + { + take_photo( frame->data[i], photo_list[(frame_counter%num_photos)]->data[i], width, height , frame_counter % num_photos); + } + + for ( i = 0; i < num_photos; i ++ ) + { + matrix_t m = matrix_placement(i, size,width,height ); + put_photo( dstY, photo_list[i]->data[0],width,height,i, m); + put_photo( dstU, photo_list[i]->data[1],width,height,i, m); + put_photo( dstV, photo_list[i]->data[2],width,height,i, m); + } + + + frame_counter ++; +} + diff --git a/veejay-server/libvje/effects/magicscratcher.c b/veejay-server/libvje/effects/magicscratcher.c new file mode 100644 index 00000000..acd0ec89 --- /dev/null +++ b/veejay-server/libvje/effects/magicscratcher.c @@ -0,0 +1,179 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "magicscratcher.h" +#include "common.h" + +static uint8_t *mframe; +static int m_frame = 0; +static int m_reverse = 0; + +vj_effect *magicscratcher_init(int w, int h) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 9; + ve->limits[0][1] = 1; + ve->limits[1][1] = MAX_SCRATCH_FRAMES - 1; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + ve->defaults[0] = 1; + ve->defaults[1] = 7; + ve->defaults[2] = 1; + ve->description = "Magic Overlay Scratcher"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} +//FIXME: private +int magicscratcher_malloc(int w, int h) +{ + mframe = + (uint8_t *) vj_calloc(w * h * sizeof(uint8_t) * MAX_SCRATCH_FRAMES); + if(!mframe) return 0; + return 1; + +} +void magicscratcher_free() { + if(mframe) free(mframe); +} + +void store_mframe(uint8_t * yuv1[3], int w, int h, int n, int no_reverse) +{ + if (!m_reverse) { + veejay_memcpy(mframe + (w * h * m_frame), yuv1[0], (w * h)); + } else { + veejay_memcpy(yuv1[0], mframe + (w * h * m_frame), (w * h)); + } + if (m_reverse) + m_frame--; + else + m_frame++; + + if (m_frame >= n ) { + if (no_reverse == 0) { + m_reverse = 1; + m_frame = n - 1; + } else { + m_frame = 0; + } + } + + if (m_frame == 0) + m_reverse = 0; + + +} + + +void magicscratcher_apply(VJFrame *frame, + int width, int height, int mode, int n, + int no_reverse) +{ + + unsigned int x, len = width * height; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + int uv_width = frame->uv_width; + int uv_height = frame->uv_height; + /* param 6 is cool ,8,7,10,13,15, ,9,11,12,14, + + 16 voor default ?, 17 (!),18,19, 20(!), 21, 24,,25,30 */ + int offset = len * m_frame; + + pix_func_Y func_y; + + switch (mode) { + //case 0: mode = 5; break; + case 1: + mode = 22; + break; + case 2: + mode = 25; + break; + //case 3: mode = 30; break; + case 3: + mode = 24; + break; + //case 5: mode = 21; break; + //case 6: mode = 20; break; + //case 7: mode = 19; break; + //case 8: mode = 18; break; + case 4: + mode = 17; + break; + case 5: + mode = 16; + break; + //case 11: mode = 14; break; + //case 12: mode = 12; break; + //case 13: mode = 11; break; + case 6: + mode = 9; + break; + case 7: + mode = 8; + break; + case 8: + mode = 7; + break; + case 9: + mode = 6; + break; + } + + func_y = get_pix_func_Y((const int) mode); + + /* kill chroma in channel */ + veejay_memset( Cb, 128, frame->uv_len); + veejay_memset( Cr, 128, frame->uv_len); + + + /* fixme : m_frame 0 + yuv1[0] = black screen, + it must be m_frame - 1 + yuv1[0] = result + need perhaps to introduce dup_frame, + which retrieves the previous frame as well, + */ + + if (m_frame == 0) { + veejay_memcpy(mframe + (len * m_frame), Y, len); + m_frame++; + } + + for (x = 0; x < len; x++) { + Y[x] = func_y( mframe[offset + x], Y[x]); + } + if (m_frame > 0) { + veejay_memset(mframe + (len * (m_frame - 1)), 16, len); + } + + store_mframe(frame->data, width, height, n, no_reverse); + + //printf( "[%d] , reverse = %d, offset = %d, n = %d\n",m_frame,m_reverse,offset,n); +} diff --git a/veejay-server/libvje/effects/magicscratcher.h b/veejay-server/libvje/effects/magicscratcher.h new file mode 100644 index 00000000..9dc872eb --- /dev/null +++ b/veejay-server/libvje/effects/magicscratcher.h @@ -0,0 +1,34 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef MAGICSCRATCHER_H +#define MAGICSCRATCHER_H +#include +#include +#include +#include + +vj_effect *magicscratcher_init(int w, int h); +int magicscratcher_malloc(int w, int h); +void magicscratcher_free(); +void magicscratcher_apply( VJFrame *frame, + int width, int height, int type, int nframes, + int no_reverse); +#endif diff --git a/veejay-server/libvje/effects/mask.c b/veejay-server/libvje/effects/mask.c new file mode 100644 index 00000000..17e4681e --- /dev/null +++ b/veejay-server/libvje/effects/mask.c @@ -0,0 +1,85 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "mask.h" + + +vj_effect *simplemask_init(int w, int h ) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->defaults[0] = 128; + ve->defaults[1] = 0; + ve->description = "Simple Mask (black and white)"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user =0; + return ve; +} + + +void mask_replace_black(uint8_t *yuv1[3], uint8_t *yuv2[3], int w, int h, int threshold) { + unsigned int len = w * h; + unsigned int i=0; + for(i=0; i < len; i++) { + if (yuv1[0][i] > threshold) { + yuv1[0][i] = yuv2[0][i]; + yuv1[1][i] = yuv2[1][i]; + yuv1[2][i] = yuv2[2][i]; + } + } +} +void mask_replace_black_fill(uint8_t *yuv1[3], uint8_t *yuv2[3], int w, int h, int threshold) { + unsigned int len = w * h; + unsigned int i=0; + for(i=0; i < len; i++) { + if (yuv1[0][i] > threshold) { + yuv1[0][i] = yuv2[0][i]; + yuv1[1][i] = yuv2[1][i]; + yuv1[2][i] = yuv2[2][i]; + } + else { + yuv1[0][i] = 16; + yuv1[1][i] = 128; + yuv1[2][i] = 128; + } + } +} + +void simplemask_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int threshold, int invert) +{ + + switch(invert) { + case 0 : mask_replace_black(frame->data,frame2->data,width,height,threshold); break; + case 1 : mask_replace_black_fill(frame->data,frame2->data,width,height,threshold); break; + } + +} +void mask_free(){} diff --git a/veejay-server/libvje/effects/mask.h b/veejay-server/libvje/effects/mask.h new file mode 100644 index 00000000..b79f6675 --- /dev/null +++ b/veejay-server/libvje/effects/mask.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SIMPLEMASK_H +#define SIMPLEMASK_H +#include +#include +#include + +vj_effect *simplemask_init(); +void simplemask_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int threshold, int invert); +void mask_free(); +#endif diff --git a/veejay-server/libvje/effects/maskstop.c b/veejay-server/libvje/effects/maskstop.c new file mode 100644 index 00000000..1f44e58a --- /dev/null +++ b/veejay-server/libvje/effects/maskstop.c @@ -0,0 +1,198 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * vvMaskStop - ported from vvFFPP_basic + * Copyright(C)2005 Maciek Szczesniak + * + * 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. + */ +#include +#include +#include "common.h" +#include "split.h" +#include +#include + +static uint8_t *vvmaskstop_buffer[6]; +static unsigned int frq_frame; +static unsigned int frq_mask; + +vj_effect *maskstop_init(int width , int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 0; // negate mask + ve->defaults[1] = 0; // swap mask/frame + ve->defaults[2] = 80; // hold frame freq + ve->defaults[3] = 20; // hold mask freq + + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->description = "vvMaskStop"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + + frq_frame = 256; + frq_mask = 256; + + return ve; +} + +int maskstop_malloc(int width, int height) +{ + int i; + vvmaskstop_buffer[0] = (uint8_t*) vj_malloc( sizeof(uint8_t) * width * height * 6 ); + for( i = 1; i < 6; i ++ ) + vvmaskstop_buffer[i] = vvmaskstop_buffer[(i-1)] + (width * height); + veejay_memset( vvmaskstop_buffer[1], 128, (width*height)*2); + veejay_memset( vvmaskstop_buffer[2], 128, (width*height)*2); + + return 1; +} + +void maskstop_free() { + if(vvmaskstop_buffer[0]) + free(vvmaskstop_buffer[0]); + int i; + for(i = 0 ;i < 6 ; i++) + vvmaskstop_buffer[i] = NULL; +} + + +void maskstop_apply( VJFrame *frame, int width, int height, int negmask, int swapmask, int framefreq, int maskfreq) { + int i=0; + const unsigned int len = frame->len; + + uint8_t *Yframe = vvmaskstop_buffer[0]; + uint8_t *Uframe = vvmaskstop_buffer[1]; + uint8_t *Vframe = vvmaskstop_buffer[2]; + uint8_t *Ymask = vvmaskstop_buffer[3]; + uint8_t *Umask = vvmaskstop_buffer[4]; + uint8_t *Vmask = vvmaskstop_buffer[5]; + uint8_t *Ydest = frame->data[0]; + uint8_t *Udest = frame->data[1]; + uint8_t *Vdest = frame->data[2]; + + float val, valN; + + frq_frame = frq_frame + framefreq; + frq_mask = frq_mask + maskfreq; + + if (frq_frame > 255) { + veejay_memcpy(Yframe, Ydest, len); + veejay_memcpy(Uframe, Udest, len); + veejay_memcpy(Vframe, Vdest, len); + frq_frame = 0; + } + + if (frq_mask > 255) { + veejay_memcpy(Ymask, Ydest, len); + veejay_memcpy(Umask, Udest, len); + veejay_memcpy(Vmask, Vdest, len); + frq_mask = 0; + } + + // negmask acts like transparency mask: new p = ((p0 * a) + (p1 * (255-a))) / 255 + if(swapmask && negmask) + { + for( i = 0; i < len; i ++ ) + { + Ydest[i] = ((Yframe[i] * Ymask[i]) + ((0xff-Ydest[i]) * (0xff-Ymask[i])))>>8; + Udest[i] = ((Uframe[i] * Umask[i]) + ((0xff-Udest[i]) * (0xff-Umask[i])))>>8; + Vdest[i] = ((Vframe[i] * Vmask[i]) + ((0xff-Vdest[i]) * (0xff-Vmask[i])))>>8; + } + } + if(swapmask && !negmask) + { + for( i = 0; i < len ; i ++ ) + { + Ydest[i] = ((Yframe[i] * (0xff-Ymask[i]) + (Ydest[i] * Ymask[i])))>>8; + Udest[i] = ((Uframe[i] * (0xff-Umask[i]) + (Udest[i] * Umask[i])))>>8; + Vdest[i] = ((Vframe[i] * (0xff-Vmask[i]) + (Vdest[i] * Vmask[i])))>>8; + } + } + if(!swapmask && negmask) + { + for( i = 0; i < len; i ++ ) + { + Ydest[i] = ((Ymask[i] * Yframe[i]) + ( (0xff-Ydest[i]) * (0xff-Yframe[i])) ) >> 8; + Udest[i] = ((Umask[i] * Uframe[i]) + ( (0xff-Udest[i]) * (0xff-Uframe[i])) ) >> 8; + Vdest[i] = ((Vmask[i] * Vframe[i]) + ( (0xff-Vdest[i]) * (0xff-Vframe[i])) ) >> 8; + } + } + if(!swapmask && !negmask) + { + for( i = 0; i < len; i ++ ) + { + Ydest[i] = ((Ymask[i] * (0xff-Yframe[i])) + ( Ydest[i] * Yframe[i]) ) >> 8; + Udest[i] = ((Umask[i] * (0xff-Uframe[i])) + ( Udest[i] * Uframe[i]) ) >> 8; + Vdest[i] = ((Vmask[i] * (0xff-Vframe[i])) + ( Vdest[i] * Vframe[i]) ) >> 8; + } + + } + + +/* + for (i = 0; i < len; i++) { + if (swapmask) { + + if (negmask) { + val = (float)Ymask[i]/255; + valN = (float)1 - val; + } else { + valN = (float)Ymask[i]/255; + val = (float)1 - valN; + } + + Ydest[i] = (uint8_t) Yframe[i] * val + Ydest[i] * valN; + Udest[i] = (uint8_t) Uframe[i] * val + Udest[i] * valN; + Vdest[i] = (uint8_t) Vframe[i] * val + Vdest[i] * valN; + + } else { + + if (negmask) { + val = (float)Yframe[i]/255; + valN = (float)1 - val; + } else { + valN = (float)Yframe[i]/255; + val = (float)1 - valN; + } + + Ydest[i] = (uint8_t) Ymask[i] * val + Ydest[i] * valN; + Udest[i] = (uint8_t) Umask[i] * val + Udest[i] * valN; + Vdest[i] = (uint8_t) Vmask[i] * val + Vdest[i] * valN; + + } + + } + */ +} + diff --git a/veejay-server/libvje/effects/maskstop.h b/veejay-server/libvje/effects/maskstop.h new file mode 100644 index 00000000..48c24798 --- /dev/null +++ b/veejay-server/libvje/effects/maskstop.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef MASKSTOP_H +#define MASKSTOP_H +#include +#include +#include + +vj_effect *maskstop_init(int width, int height); +int maskstop_malloc(int w, int h); +void maskstop_free(); +void maskstop_apply( VJFrame *frame, int width, int height, int negmask, int swapmask, int framefreq, int maskfreq); +#endif + diff --git a/veejay-server/libvje/effects/mirrors.c b/veejay-server/libvje/effects/mirrors.c new file mode 100644 index 00000000..57d39235 --- /dev/null +++ b/veejay-server/libvje/effects/mirrors.c @@ -0,0 +1,174 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "mirrors.h" +#include "common.h" + +vj_effect *mirrors_init(int width,int height) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 0; + ve->defaults[1] = 1; + ve->limits[0][0] = 0; /* horizontal or vertical mirror */ + ve->limits[1][0] = 3; + ve->limits[0][1] = 0; + ve->limits[1][1] = (int)((float)(width * 0.33)); + ve->sub_format = 1; + ve->description = "Multi Mirrors"; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void _mirrors_v( uint8_t *yuv[3], int width, int height, int factor, int swap) +{ + const int len = width * height; + int r,c; + const int line_width = width / ( factor + 1); + int i=0; + + if(swap) + { + for(r = 0; r < len; r += width ) + { + for( c = 0 ; c < width; c+= line_width) + { + for(i = 0; i < line_width; i++) + { + yuv[0][r + c + (line_width-i)] = yuv[0][r + c + i]; + yuv[1][r + c + (line_width-i)] = yuv[1][r + c + i]; + yuv[2][r + c + (line_width-i)] = yuv[2][r + c + i]; + } + } + + } + } + else + { + for(r = 0; r < len; r += width ) + { + for( c = 0 ; c < width; c+= line_width) + { + for(i = 0; i < line_width; i++) + { + yuv[0][r + c + i] = yuv[0][r + c + (line_width-i)]; + yuv[1][r + c + i] = yuv[1][r + c + (line_width-i)]; + yuv[2][r + c + i] = yuv[2][r + c + (line_width-i)]; + } + } + + } + } +} +void _mirrors_h( uint8_t *yuv[3], int width, int height, int factor, int swap) +{ + int line_height = height / ( factor + 1); + + int nr = height / line_height; + int x,y,i; + int slice = 0; + int slice_end = 0; + if(swap) + { + for(i=0; i < nr; i++) + { + slice = i * line_height; + slice_end = slice + line_height; + for(y=slice; y < slice_end; y++) + { + for(x=0; x < width; x++) + { + yuv[0][(y*width)+x] = yuv[0][(slice_end-y)*width+x]; + yuv[1][y*width+x] = yuv[1][(slice_end-y)*width+x]; + yuv[2][y*width+x] = yuv[2][(slice_end-y)*width+x]; + } + } + } + } + else + { + for(i=0; i < nr; i++) + { + slice = i * line_height; + slice_end = slice + line_height; + for(y=slice_end; y > 0; y--) + { + for(x=0; x < width; x++) + { + yuv[0][y*width+x] = yuv[0][(slice_end-y)*width+x]; + yuv[1][y*width+x] = yuv[1][(slice_end-y)*width+x]; + yuv[2][y*width+x] = yuv[2][(slice_end-y)*width+x]; + } + } + } + } +} + +static int n__ = 0; +static int N__ = 0; + +void mirrors_apply(VJFrame *frame, int width, int height, int type, + int factor ) +{ + int interpolate = 1; + int motion = 0; + int tmp1 = 0; + int tmp2 = factor; + if( motionmap_active() ) + { + int hi = (int)((float)(width * 0.33)); + + motionmap_scale_to( hi,hi,0,0,&tmp1,&tmp2,&n__,&N__); + motion = 1; + } + else + { + n__ = 0; + N__ = 0; + interpolate=0; + } + + switch (type) { + case 0: + _mirrors_v(frame->data, width, height, tmp2, 0); + break; + case 1: + _mirrors_v(frame->data,width,height,tmp2,1); + break; + case 2: + _mirrors_h(frame->data,width,height,tmp2,0); + break; + case 3: + _mirrors_h(frame->data,width,height,tmp2,1); + break; + } + + if( interpolate ) + motionmap_interpolate_frame( frame, N__,n__ ); + if( motion ) + motionmap_store_frame( frame ); +} +void mirrors_free(){} diff --git a/veejay-server/libvje/effects/mirrors.h b/veejay-server/libvje/effects/mirrors.h new file mode 100644 index 00000000..b1654e3e --- /dev/null +++ b/veejay-server/libvje/effects/mirrors.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef MIRRORS_H +#define MIRRORS_H +#include +#include +#include + +vj_effect *mirrors_init(int width,int height); + +void mirrors_apply( VJFrame *frame, int width, int height, int type, + int factor); + +void mirrors_free(); +#endif diff --git a/veejay-server/libvje/effects/mirrors2.c b/veejay-server/libvje/effects/mirrors2.c new file mode 100644 index 00000000..926d75af --- /dev/null +++ b/veejay-server/libvje/effects/mirrors2.c @@ -0,0 +1,212 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "mirrors2.h" + +vj_effect *mirrors2_init(int w, int h) +{ + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 4; + ve->limits[0][0] = 0; /* horizontal or vertical mirror */ + ve->limits[1][0] = 5; + ve->sub_format = 1; + ve->description = "Mirror"; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + + + +void mirror_multi_dr(uint8_t * yuv[3], int width, int height) +{ + + unsigned int x, y; + unsigned int hlen = height / 2; + unsigned int vlen = width / 2; + unsigned int yi1, yi2; + uint8_t p, cr, cb; + + for (y = hlen; y < height; y++) { + yi1 = y * width; + yi2 = (height - y - 1) * width; + for (x = vlen; x < width; x++) { + p = yuv[0][yi1 + x]; + yuv[0][yi1 + x + (width - x - 1)] = p; + yuv[0][yi2 + x] = p; + yuv[0][yi2 + (width - x - 1)] = p; + cb = yuv[1][yi1 + x]; + cr = yuv[2][yi1 + x]; + yuv[1][yi1 + x + (width - x - 1)] = cb; + yuv[1][yi2 + x] = cb; + yuv[1][yi2 + (width - x - 1)] = cb; + yuv[2][yi1 + x + (width - x - 1)] = cr; + yuv[2][yi2 + x] = cr; + yuv[2][yi2 + (width - x - 1)] = cr; + } + } +} + +void mirror_multi_u(uint8_t * yuv[3], int width, int height) +{ + unsigned int x, y; + + unsigned int yi1, yi2; + unsigned int hlen = height / 2; + + uint8_t p, cb, cr; + + for (y = 0; y < hlen; y++) { + yi1 = y * width; + yi2 = (height - y - 1) * width; + for (x = 0; x < width; x++) { + p = yuv[0][yi1 + x]; + yuv[0][yi2 + x] = p; + cb = yuv[1][yi1 + x]; + cr = yuv[2][yi1 + x]; + yuv[1][yi2 + x] = cb; + yuv[2][yi2 + x] = cr; + } + } +} + +void mirror_multi_d(uint8_t * yuv[3], int width, int height) +{ + unsigned int x, y; + unsigned int yi1 = 0; + unsigned int yi2 = 0; + unsigned int hlen = height / 2; + uint8_t p, cb, cr; + + for (y = hlen; y < height; y++) { + yi1 = y * width; + yi2 = (height - y - 1) * width; + + for (x = 0; x < width; x++) { + p = yuv[0][yi1 + x]; + yuv[0][yi2 + x] = p; + cb = yuv[1][yi1 + x]; + cr = yuv[2][yi1 + x]; + yuv[1][yi2 + x] = cb; + yuv[2][yi2 + x] = cr; + } + } +} + +void mirror_multi_l(uint8_t * yuv[3], int width, int height) +{ + unsigned int x, y; + + unsigned int yi; + unsigned int vlen = width / 2; + uint8_t p, cb, cr; + for (y = 0; y < height; y++) { + yi = y * width; + for (x = vlen; x < width; x++) { + p = yuv[0][yi + x]; + yuv[0][yi + (width - x - 1)] = p; + cb = yuv[1][yi + x]; + yuv[1][yi + (width - x - 1)] = cb; + cr = yuv[2][yi + x]; + yuv[2][yi + (width - x - 1)] = cr; + } + } +} + +void mirror_multi_r(uint8_t * yuv[3], int width, int height) +{ + unsigned int x, y; + + unsigned int yi; + + uint8_t p, cb, cr; + + for (y = 0; y < height; y++) { + yi = y * width; + for (x = 0; x < width; x++) { + p = yuv[0][yi + x]; + yuv[0][yi + (width - x - 1)] = p; + cb = yuv[1][yi + x]; + cr = yuv[2][yi + x]; + yuv[1][yi + (width - x - 1)] = cb; + yuv[2][yi + (width - x - 1)] = cr; + } + } +} + +void mirror_multi_ur(uint8_t * yuv[3], int width, int height) +{ + unsigned int x, y; + + unsigned int yi, yi2; + unsigned int vlen = width / 2; + unsigned int hlen = width / 2; + uint8_t p, cb, cr; + + for (y = hlen; y < height; y++) { + yi = y * width; + yi2 = (height - y - 1) * width; + for (x = 0; x < vlen; x++) { + p = yuv[0][yi + x]; + yuv[0][yi + (width - x - 1)] = p; + yuv[0][yi2 + x] = p; + yuv[0][yi2 + x + (width - x - 1)] = p; + cb = yuv[1][yi + x]; + cr = yuv[2][yi + x]; + yuv[1][yi + (width - x - 1)] = cb; + yuv[1][yi2 + x] = cb; + yuv[1][yi2 + x + (width - x - 1)] = cb; + yuv[2][yi + (width - x - 1)] = cr; + yuv[2][yi2 + x] = cr; + yuv[2][yi2 + x + (width - x - 1)] = cr; + } + } +} + +void mirrors2_apply( VJFrame *frame, int width, int height, int type) +{ + switch (type) { + case 0: + mirror_multi_dr(frame->data, width, height); + break; + case 1: + mirror_multi_ur(frame->data, width, height); + break; + case 2: + mirror_multi_u(frame->data, width, height); + break; + case 3: + mirror_multi_d(frame->data, width, height); + break; + case 4: + mirror_multi_l(frame->data, width, height); + break; + case 5: + mirror_multi_r(frame->data, width, height); + break; + } +} +void mirrors2_free(){} diff --git a/veejay-server/libvje/effects/mirrors2.h b/veejay-server/libvje/effects/mirrors2.h new file mode 100644 index 00000000..9660afe1 --- /dev/null +++ b/veejay-server/libvje/effects/mirrors2.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef MIRRORS2_H +#define MIRRORS2_H +#include +#include +#include + +vj_effect *mirrors2_init(); + +void mirrors2_apply( VJFrame *frame, int width, int height, int type); + +void mirrors2_free(); +#endif diff --git a/veejay-server/libvje/effects/morphology.c b/veejay-server/libvje/effects/morphology.c new file mode 100644 index 00000000..04ccaaa4 --- /dev/null +++ b/veejay-server/libvje/effects/morphology.c @@ -0,0 +1,151 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "morphology.h" + +typedef uint8_t (*morph_func)(uint8_t *kernel, uint8_t mt[9] ); + +vj_effect *morphology_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; // threshold + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; // morpology operator (dilate,erode, ... ) + ve->limits[1][1] = 8; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; // passes + ve->defaults[0] = 140; + ve->defaults[1] = 0; + ve->defaults[2] = 0; + ve->description = "Morphology (experimental)"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + + +static uint8_t *binary_img; + +int morphology_malloc(int w, int h ) +{ + binary_img = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h ); + if(!binary_img) return 0; + return 1; +} + +void morphology_free(void) +{ + if(binary_img) + free(binary_img); + binary_img = NULL; +} + +static uint8_t _dilate_kernel3x3( uint8_t *kernel, uint8_t img[9]) +{ + register int x; + /* consider all background pixels (0) in input image */ + for(x = 0; x < 9; x ++ ) + if((kernel[x] * img[x]) > 0 ) + return 235; + return 16; +} + + +static uint8_t _erode_kernel3x3( uint8_t *kernel, uint8_t img[9]) +{ + register int x; + /* consider all background pixels (0) in input image */ + for(x = 0; x < 9; x ++ ) + if(kernel[x] && img[x] == 0 ) + return 16; + return 235; +} + +morph_func _morphology_function(int i) +{ + if( i == 0 ) + return _dilate_kernel3x3; + return _erode_kernel3x3; +} + + +void morphology_apply( VJFrame *frame, int width, int height, int threshold, int type, int passes ) +{ + unsigned int i,x,y; + int len = (width * height); + int c = 0,t=0,k=0; + int uv_len = frame->uv_len; + uint8_t pixel; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t kernels[8][9] ={ + { 1,1,1, 1,1,1 ,1,1,1 },//0 + { 0,1,0, 1,1,1, 0,1,0 },//1 + { 0,0,0, 1,1,1, 0,0,0 },//2 + { 0,1,0, 0,1,0, 0,1,0 },//3 + { 0,0,1, 0,1,0, 1,0,0 },//4 + { 1,0,0, 0,1,0, 0,0,1 }, + { 1,1,1, 0,0,0, 0,0,0 }, + { 0,0,0, 0,0,0, 1,1,1 } + }; + + morph_func p = _morphology_function(passes); + + /* threshold image --> binary img + 0 = bg + 255 = fg + */ + for( i = 0; i < len; i ++ ) + { + binary_img[i] = ( Y[i] < threshold ? 0: 0xff ); + t++; + } + + veejay_memset( Cb, 128, uv_len ); + veejay_memset( Cr, 128, uv_len ); + + len -= width; + + /* compute dilation of binary image with kernel */ + for(y = width; y < len; y += width ) + { + for(x = 1; x < width-1; x ++) + { + if(binary_img[x+y] == 0) + { + uint8_t mt[9] = { + binary_img[x-1+y-width], binary_img[x+y-width], binary_img[x+1+y-width], + binary_img[x-1+y], binary_img[x+y] , binary_img[x+1+y], + binary_img[x-1+y+width], binary_img[x+y+width], binary_img[x+1+y+width] + }; + Y[x+y] = p( kernels[type], mt ); + } + } + } +} diff --git a/veejay-server/libvje/effects/morphology.h b/veejay-server/libvje/effects/morphology.h new file mode 100644 index 00000000..46d00fb7 --- /dev/null +++ b/veejay-server/libvje/effects/morphology.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef MORPHOLOGY_H +#define MORPHOLOGY_H +#include +#include +#include + +vj_effect *morphology_init(int w, int h); +void morphology_apply( VJFrame *frame, int width, int height, int t, int val, int n); +int morphology_malloc(int w, int h); +void morphology_free(void); +#endif diff --git a/veejay-server/libvje/effects/motionblur.c b/veejay-server/libvje/effects/motionblur.c new file mode 100644 index 00000000..619a6e12 --- /dev/null +++ b/veejay-server/libvje/effects/motionblur.c @@ -0,0 +1,109 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "motionblur.h" +#include + +static uint8_t *previous_frame[3]; +vj_effect *motionblur_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 15; + ve->limits[0][0] = 0; + ve->limits[1][0] = 1000; /* time in frames */ + ve->description = "Motion blur"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +int motionblur_malloc(int width, int height) +{ + previous_frame[0] = (uint8_t*) vj_yuvalloc( width , height ); + if(!previous_frame[0]) return 0; + previous_frame[1] = previous_frame[0] + (width * height); + previous_frame[2] = previous_frame[1] + (width * height); + return 1; +} + +void motionblur_free() { + if(previous_frame[0]) + free(previous_frame[0]); + previous_frame[0] = NULL; + previous_frame[1] = NULL; + previous_frame[2] = NULL; +} + + +static int n_motion_frames = 0; +void motionblur_apply( VJFrame *frame, int width, int height, int n) { + const int len = width * height; + const int uv_len = frame->uv_len; + + unsigned int i; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + + if(n_motion_frames > 0) { + + for(i=0; i < len; i++) { + Y[i] = (Y[i] + previous_frame[0][i])>>1; + previous_frame[0][i] = Y[i]; + } + + + for(i=0; i < uv_len; i++) { + Cb[i] = (Cb[i] + previous_frame[1][i])>>1; + Cr[i] = (Cr[i] + previous_frame[2][i])>>1; + previous_frame[1][i] = Cb[i]; + previous_frame[2][i] = Cr[i]; + } + + } + else + { + /* just copy to previous */ + veejay_memcpy( previous_frame[0], Y, len ); + veejay_memcpy( previous_frame[1], Cb, uv_len); + veejay_memcpy( previous_frame[2], Cr, uv_len); + + } + + n_motion_frames ++; + + if(n_motion_frames >= n ) { + n_motion_frames = 0; + + veejay_memset( previous_frame[0], 0, (width*height)); + veejay_memset( previous_frame[1], 0, uv_len); + veejay_memset( previous_frame[2], 0, uv_len); + + } + +} + diff --git a/veejay-server/libvje/effects/motionblur.h b/veejay-server/libvje/effects/motionblur.h new file mode 100644 index 00000000..b2f9b37c --- /dev/null +++ b/veejay-server/libvje/effects/motionblur.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef MOTIONBLUR_H +#define MOTIONBLUR_H +#include +#include +#include +#include + +vj_effect *motionblur_init(int w, int h); +int motionblur_malloc(int w, int h); +void motionblur_free(); +void motionblur_apply( VJFrame *frame, int width, int height, int n); + +#endif diff --git a/veejay-server/libvje/effects/motiondetect.c b/veejay-server/libvje/effects/motiondetect.c new file mode 100644 index 00000000..6c3f7f05 --- /dev/null +++ b/veejay-server/libvje/effects/motiondetect.c @@ -0,0 +1,25 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#include "transop.h" +#include +#include + +void motiondetect_free(){} diff --git a/veejay-server/libvje/effects/motionmap.c b/veejay-server/libvje/effects/motionmap.c new file mode 100644 index 00000000..fc06a431 --- /dev/null +++ b/veejay-server/libvje/effects/motionmap.c @@ -0,0 +1,416 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + + This is a quite simple motion detection filter + + There are 5 parameters: + p0 = Threshold + p1 = Acitivity Maximum Level + p2 = Draw difference frame (no processing) + p3 = Ringbuffer length N + p4 = Opacity level + + This filter detects the amount of motion in a frame. It keeps an internal + buffer to average (smoothen) the acitivity levels over N frames + At each step in N , a new value is linearly interpolated which is later + pulled by other FX to override their parameter values. + To compensate for jumpy video, the frames n+1 to N are linearly interpolated + from frame n+0 to frame N automatically. + + + */ +#include +#include +#include +#include +#include "motionmap.h" +#include "common.h" +#include "softblur.h" +#include "opacity.h" + +typedef int (*morph_func)(uint8_t *kernel, uint8_t mt[9] ); +#define HIS_DEFAULT 2 +#define HIS_LEN (8*25) +#define ACT_TOP 4000 +#define MAXCAPBUF 55 +vj_effect *motionmap_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; // motionmap + ve->limits[1][0] = 255; + ve->limits[0][1] = 50; // reverse + ve->limits[1][1] = 10000; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + ve->limits[0][4] = 0; // buffer + ve->limits[1][4] = 255; + ve->limits[0][3] = HIS_DEFAULT; + ve->limits[1][3] = HIS_LEN; + ve->defaults[0] = 40; + ve->defaults[1] = ACT_TOP; + ve->defaults[2] = 1; + ve->defaults[3] = HIS_DEFAULT; + ve->defaults[4] = 0; + ve->description = "Motion Mapping"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + ve->n_out = 2; + return ve; +} + +static uint8_t *binary_img = NULL; +static uint8_t *original_img = NULL; +static uint8_t *previous_img = NULL; +static uint32_t histogram_[HIS_LEN]; +static uint8_t *large_buf = NULL; +static uint32_t nframe_ =0; +static uint32_t activity_total_ = 0; +static uint32_t max_d = ACT_TOP; +static int current_his_len = HIS_DEFAULT; +static uint32_t key1_ = 0, key2_ = 0, keyv_ = 0, keyp_ = 0; +static int have_bg = 0; +static int n_captured = 0; +static int n_played = 0; +static int capturing = 0; +static int playing = 0; +static uint8_t *interpolate_buf = NULL; +static int running = 0; + +#define RUP8(num)(((num)+8)&~8) + +int motionmap_malloc(int w, int h ) +{ + binary_img = (uint8_t*) vj_malloc(sizeof(uint8_t) * RUP8(w * h * 3) ); + original_img = binary_img + RUP8(w*h); + previous_img = original_img + RUP8(w*h); + large_buf = vj_malloc(sizeof(uint8_t) * RUP8(w*h*3) * (MAXCAPBUF+1)); + if(!large_buf) + { + veejay_msg(0, "Memory allocation error for Motion Mapping. Too large: %ld bytes",(long) ((RUP8(w*h*3)*(MAXCAPBUF+1)))); + return 0; + } + interpolate_buf = vj_malloc( sizeof(uint8_t) * RUP8(w*h*3)); + veejay_msg(2, "This is 'Motion Mapping'"); + veejay_msg(2, "Add any of the following to the FX chain (if not already present)"); + veejay_msg(2, "\tBathroom Window, Displacement Mapping, Multi Mirrors, Magic Mirror, Sinoids"); + veejay_msg(2, "\tSlice Window , Smear, ChameleonTV and TimeDistort TV"); + veejay_msg(2, "Using %2.2fMb for large buffer", (RUP8(w*h*3)*(MAXCAPBUF+1))/1048576.0f); + veejay_memset( histogram_, 0, sizeof(uint32_t) * HIS_LEN ); + nframe_ = 0; + running = 0; + return 1; +} + +void motionmap_free(void) +{ + if(binary_img) + free(binary_img); + if(large_buf) + free(large_buf); + if( interpolate_buf ) + free(interpolate_buf); + have_bg = 0; + interpolate_buf = NULL; + nframe_ = 0; + running = 0; + keyv_ = 0; + keyp_ = 0; + binary_img = NULL; +} + +#ifndef MIN +#define MIN(a,b) ( (a)>(b) ? (b) : (a) ) +#endif +#ifndef MAX +#define MAX(a,b) ( (a)>(b) ? (a) : (b) ) +#endif + +static void update_bgmask( uint8_t *dst,uint8_t *in, uint8_t *src, int len, int threshold ) +{ + int i; + unsigned int op0,op1; + for( i =0; i < len ; i ++ ) + { + if( abs(in[i] - src[i]) > threshold ) + { + dst[i] = 0xff; + in[i] = (in[i] + src[i])>>1; + } + else + { + dst[i] = 0; + } + } +} + +uint8_t *motionmap_interpolate_buffer() +{ + return interpolate_buf; +} + +uint8_t *motionmap_bgmap() +{ + return binary_img; +} + +int motionmap_active() +{ + return running; +} + +uint32_t motionmap_activity() +{ + return keyv_; +} + +void motionmap_scale_to( int p1max, int p2max, int p1min, int p2min, int *p1val, int *p2val, int *pos, int *len ) +{ + if(nframe_ <= 1) + return; + + if( keyv_ > max_d ) + { + veejay_msg(0, "Motion rollover = %d", keyv_ % max_d ); + keyv_ = max_d; + } + + int n = ((nframe_-1) % current_his_len)+1; + + float q = 1.0f / (float) current_his_len * n; + float diff = (float) keyv_ - (float) keyp_ ; + float pu = keyp_ + (q * diff); + + float m = (float) max_d; + + if( pu > m ) + pu = m; + + + float w = 1.0 / max_d; + float pw = w * pu; + + *p1val = p1min + (int) ((p1max-p1min) * pw); + *p2val = p2min + (int) ((p2max-p2min) * pw); + *len = current_his_len; + *pos = n; +// veejay_msg(0, "%s:%s p1=%d,p2=%d, len=%d,pos=%d", +// __FILE__,__FUNCTION__,*p1val,*p2val, *len, *pos ); + +} + +void motionmap_lerp_frame( VJFrame *cur, VJFrame *prev, int N, int n ) +{ + unsigned int i; + int n1 = (( n-1) % N ) + 1; + float frac = 1.0f / (float) N * n1; + + const int len = cur->len; + uint8_t *Y0 = cur->data[0]; + uint8_t *Y1 = prev->data[0]; + uint8_t *U0 = cur->data[1]; + uint8_t *U1 = prev->data[1]; + uint8_t *V0 = cur->data[2]; + uint8_t *V1 = prev->data[2]; + + for ( i = 0; i < len ; i ++ ) + { + Y0[i] = Y1[i] + ( frac * (Y0[i] - Y1[i])); + U0[i] = U1[i] + ( frac * (U0[i] - U1[i])); + V0[i] = V1[i] + ( frac * (V0[i] - V1[i])); + } +} + + +void motionmap_store_frame( VJFrame *fx ) +{ + veejay_memcpy( interpolate_buf, fx->data[0], fx->len ); + veejay_memcpy( interpolate_buf+fx->len,fx->data[1],fx->len); + veejay_memcpy( interpolate_buf+fx->len+fx->len,fx->data[2],fx->len); +} + +void motionmap_interpolate_frame( VJFrame *fx, int N, int n ) +{ + if( n == 0 || N == 0 ) + return; + + VJFrame prev; + veejay_memcpy(&prev, fx, sizeof(VJFrame)); + prev.data[0] = interpolate_buf; + prev.data[1] = interpolate_buf + (fx->len); + prev.data[2] = interpolate_buf + (2*fx->len); + + motionmap_lerp_frame( fx, &prev, N, n ); +} + +static int stop_capture_ = 0; +static int reaction_ready_ = 0; +void motionmap_apply( VJFrame *frame, int width, int height, int threshold, int reverse, int draw, int history, int capbuf ) +{ + unsigned int i,x,y; + int len = (width * height); + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + veejay_memcpy( original_img, frame->data[0], len ); + + softblur_apply( frame, width,height,0 ); + if(!have_bg) + { + veejay_memcpy( previous_img, frame->data[0], len ); + have_bg = 1; + nframe_ = 0; + running = 0; + return; + } + else + { + update_bgmask( binary_img, previous_img, frame->data[0], len , threshold); + } + + + uint32_t sum = 0,min=0xffff,max=0; + uint64_t activity_level1 = 0; + uint64_t activity_level2 = 0; + uint64_t activity_level3 = 0; + uint64_t activity_level4 = 0; + for( i = 0; i < len; i += 4 ) + { + + activity_level1 += binary_img[i]; + activity_level2 += binary_img[i+1]; + activity_level3 += binary_img[i+2]; + activity_level4 += binary_img[i+3]; + } + uint32_t activity_level = ( (activity_level1>>8) + (activity_level2>>8) + (activity_level3>>8) + (activity_level4>>8)); + + max_d = reverse; + + current_his_len = history; + + histogram_[ (nframe_%current_his_len) ] = activity_level; + + for( i = 0; i < current_his_len; i ++ ) + { + sum += histogram_[i]; + if(histogram_[i] > max ) max = histogram_[i]; + if(histogram_[i] < min ) min = histogram_[i]; + } + if( (nframe_ % current_his_len)==0 ) + { + key1_ = min; + key2_ = max; + keyp_ = keyv_; + keyv_ = (sum > 0 ? (sum/current_his_len):0 ); + } + + if( draw ) + { + veejay_memset( Cb, 128, len ); + veejay_memset( Cr, 128, len ); + veejay_memcpy( frame->data[0], binary_img, len ); + nframe_++; + return; + } + + + if( capbuf ) + { + if(!capturing) + { + if( keyv_ > max_d ) + { + if( !reaction_ready_ ) + { + stop_capture_ = keyv_ / 5; + capturing = 1; + } + else + { + playing = 1; + } + } + } + + if( stop_capture_ && !reaction_ready_) + { + if( keyv_ < stop_capture_ || n_captured >= MAXCAPBUF ) + { + capturing = 0; + stop_capture_= 0; + reaction_ready_ =1; + } + } + } + else + { + capturing = 0; playing = 0; stop_capture_ = 0; reaction_ready_ = 0; n_captured = 0; + } + + if( capturing ) + { + uint8_t *dst[3]; + dst[0] = large_buf + ( n_captured * (len*3) ); + dst[1] = dst[0] + len; + dst[2] = dst[1] + len; + veejay_memcpy( dst[0], frame->data[0], len ); + veejay_memcpy( dst[1], frame->data[1], len ); + veejay_memcpy( dst[2], frame->data[2], len ); + n_captured ++; + if( n_captured >= MAXCAPBUF ) + { + capturing = 0; + stop_capture_ = 0; + } + } + else if (playing ) + { + uint8_t *src[3]; + src[0] = large_buf + ( n_played * (len*3)); + src[1] = src[0]+ len; + src[2] = src[1]+ len; + /* veejay_memcpy( frame->data[0], src[0], len ); + veejay_memcpy( frame->data[1], src[1], len ); + veejay_memcpy( frame->data[2], src[2], len );*/ + + VJFrame b; + veejay_memcpy(&b, frame, sizeof(VJFrame)); + b.data[0] = src[0]; b.data[1] = src[1]; b.data[2] = src[2]; + opacity_apply( frame, &b, frame->width,frame->height, capbuf ); + + + n_played ++; + if( n_played >= n_captured) + { + n_played = 0; n_captured = 0; playing = 0; capturing = 0; + reaction_ready_ = 0; + } + nframe_++; + return; + } + veejay_memcpy( frame->data[0], original_img, len ); + nframe_ ++; + running = 1; +} diff --git a/veejay-server/libvje/effects/motionmap.h b/veejay-server/libvje/effects/motionmap.h new file mode 100644 index 00000000..cb36879b --- /dev/null +++ b/veejay-server/libvje/effects/motionmap.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + */ + +#ifndef MOTIONMAP_H +#define MOTIONMAP_H +#include +#include +#include + +vj_effect *motionmap_init(int w, int h); +void motionmap_apply( VJFrame *frame, int width, int height, int t, int n, int draw, int histo, int op); +int motionmap_malloc(int w, int h); +void motionmap_free(void); +#endif diff --git a/veejay-server/libvje/effects/mtracer.c b/veejay-server/libvje/effects/mtracer.c new file mode 100644 index 00000000..f586fecf --- /dev/null +++ b/veejay-server/libvje/effects/mtracer.c @@ -0,0 +1,93 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "scratcher.h" +#include "common.h" +#include "magicoverlays.h" + + +uint8_t *mtrace_buffer[3]; +static int mtrace_counter = 0; + +vj_effect *mtracer_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 30; + ve->limits[0][1] = 1; + ve->limits[1][1] = 25; + ve->defaults[0] = 150; + ve->defaults[1] = 8; + ve->description = "Magic Tracer"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} +// FIXME private +void mtracer_free() { + if(mtrace_buffer[0]) free(mtrace_buffer[0]); + mtrace_buffer[0] = NULL; + mtrace_buffer[1] = NULL; +} + +int mtracer_malloc(int w, int h) +{ + mtrace_buffer[0] = (uint8_t *) vj_yuvalloc(w,h ); + if(!mtrace_buffer[0]) return 0; + mtrace_buffer[1] = mtrace_buffer[0] + (w*h); + mtrace_buffer[2] = mtrace_buffer[1] + (w*h); + return 1; +} + +void mtracer_apply( VJFrame *frame, VJFrame *frame2, + int width, int height, int mode, int n) +{ + + unsigned int len = frame->len; + unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + if (mtrace_counter == 0) { + overlaymagic_apply(frame, frame2, width, height, mode); + veejay_memcpy(mtrace_buffer[0], Y, len); + veejay_memcpy(mtrace_buffer[1], Cb, uv_len); + veejay_memcpy(mtrace_buffer[2], Cr, uv_len); + } else { + overlaymagic_apply(frame, frame2, width, height, mode); + veejay_memcpy(mtrace_buffer[0], Y, len); + veejay_memcpy(mtrace_buffer[1], Cb, uv_len); + veejay_memcpy(mtrace_buffer[2], Cr, uv_len); + + } + + mtrace_counter++; + if (mtrace_counter >= n) + mtrace_counter = 0; + + +} diff --git a/veejay-server/libvje/effects/mtracer.h b/veejay-server/libvje/effects/mtracer.h new file mode 100644 index 00000000..24e81f38 --- /dev/null +++ b/veejay-server/libvje/effects/mtracer.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef MTRACER_H +#define MTRACER_H +#include +#include +#include +#include + +vj_effect *mtracer_init(int w, int h); +int mtracer_malloc(int w, int h); +void mtracer_free(); +void mtracer_apply( VJFrame *frame, VJFrame *frame2, + int width, int height, int mode, int nframes); +#endif diff --git a/veejay-server/libvje/effects/negation.c b/veejay-server/libvje/effects/negation.c new file mode 100644 index 00000000..fe2fa707 --- /dev/null +++ b/veejay-server/libvje/effects/negation.c @@ -0,0 +1,149 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "negation.h" + +vj_effect *negation_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->defaults[0] = 255; + ve->description = "Negation"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +#ifdef HAVE_ASM_MMX +#undef HAVE_K6_2PLUS +#if !defined( HAVE_ASM_MMX2) && defined( HAVE_ASM_3DNOW ) +#define HAVE_K6_2PLUS +#endif + +#undef _EMMS + +#ifdef HAVE_K6_2PLUS +/* On K6 femms is faster of emms. On K7 femms is directly mapped on emms. */ +#define _EMMS "femms" +#else +#define _EMMS "emms" +#endif +static inline void negate_mask(uint8_t val) +{ + uint8_t mask[8] = { val,val,val,val, val,val,val,val }; +// uint64_t mask = 0xffffffffffffffffLL; + uint8_t *m = (uint8_t*)&mask; + + __asm __volatile( + "movq (%0), %%mm4\n\t" + :: "r" (m) ); +} + +static inline void mmx_negate( uint8_t *dst, uint8_t *in ) +{ + __asm __volatile( + "movq (%0), %%mm0\n\t" + "movq %%mm4, %%mm1\n\t" + "psubb %%mm0, %%mm1\n\t" + "movq %%mm1, (%1)\n\t" + :: "r" (in) , "r" (dst) + ); +} + +#endif + +void negation_apply( VJFrame *frame, int width, int height, int val) +{ + int i; + int len = (width * height); + int uv_len = frame->uv_len; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + +#ifndef HAVE_ASM_MMX + for (i = 0; i < len; i++) { + *(Y) = val - *(Y); + *(Y)++; + } + + for (i = 0; i < uv_len; i++) { + *(Cb) = val - *(Cb); + *(Cb)++; + *(Cr) = val - *(Cr); + *(Cr)++; + } +#else + + int left = len % 8; + int work= len >> 3; + + negate_mask(val); + + for( i = 0; i < work ; i ++ ) + { + mmx_negate( Y, Y ); + Y += 8; + } + + if (left ) + { + for( i = 0; i < left; i ++ ) + { + *(Y) = val - *(Y); + *(Y)++; + } + } + + work = uv_len >> 3; + left = uv_len % 8; + for( i = 0; i < work ; i ++ ) + { + mmx_negate( Cb, Cb ); + mmx_negate( Cr, Cr ); + Cb += 8; + Cr += 8; + } + + if(left ) + { + for( i = 0; i < left; i ++ ) + { + *(Cb) = val - *(Cb); + *(Cb)++; + *(Cr) = val - *(Cr); + *(Cr)++; + } + } + + __asm__ __volatile__ ( _EMMS:::"memory"); + +#endif +} diff --git a/veejay-server/libvje/effects/negation.h b/veejay-server/libvje/effects/negation.h new file mode 100644 index 00000000..431699e3 --- /dev/null +++ b/veejay-server/libvje/effects/negation.h @@ -0,0 +1,29 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef NEGATION_H +#define NEGATION_H +#include +#include +#include + +vj_effect *negation_init(int w, int h); +void negation_apply( VJFrame *frame, int width, int height, int val); +#endif diff --git a/veejay-server/libvje/effects/neighbours.c b/veejay-server/libvje/effects/neighbours.c new file mode 100644 index 00000000..5e150c37 --- /dev/null +++ b/veejay-server/libvje/effects/neighbours.c @@ -0,0 +1,281 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "neighbours.h" + +vj_effect *neighbours_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; + ve->limits[1][0] = 16; /* brush size (shape is rectangle)*/ + ve->limits[0][1] = 1; + ve->limits[1][1] = 255; /* smoothness */ + ve->limits[0][2] = 0; /* luma only / include chroma */ + ve->limits[1][2] = 1; + ve->defaults[0] = 4; + ve->defaults[1] = 4; + ve->defaults[2] = 0; + ve->description = "ZArtistic Filter (Oilpainting, acc. add )"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int pixel_histogram[256]; +static int y_map[256]; +static int cb_map[256]; +static int cr_map[256]; +static uint8_t *tmp_buf[2]; +static uint8_t *chromacity[2]; + + +int neighbours_malloc(int w, int h ) +{ + tmp_buf[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 2); + if(!tmp_buf[0] ) return 0; + tmp_buf[1] = tmp_buf[0] + (w*h); + chromacity[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h *2); + if(!chromacity[0]) return 0; + chromacity[1] = chromacity[0] + (w*h); + return 1; +} + +void neighbours_free(void) +{ + if(tmp_buf[0]) + free(tmp_buf[0]); + if(chromacity[0]) + free(chromacity[0]); + tmp_buf[0] = NULL; + tmp_buf[1] = NULL; + chromacity[0] = NULL; + chromacity[1] = NULL; +} + +static inline uint8_t evaluate_pixel( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image /* image data */ +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + if( y0 < 0 ) y0 = 0; + if( y1 >= h ) y1 = h-1; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + } + + /* fill histogram, cummulative add of luma values */ + for( i = y0; i < y1; i ++ ) + { + for( j = x0; j < x1; j ++ ) + { + brightness = premul[ i * w + j]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] += image[ i * w + j]; + } + } + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + if( peak_value < 16) + return image[ y * w + x]; + + return( (uint8_t) ( y_map[ peak_index] / peak_value )); +} + +typedef struct +{ + uint8_t y; + uint8_t u; + uint8_t v; +} pixel_t; + + +static inline pixel_t evaluate_pixel_c( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image, /* image data */ + const uint8_t *image_cb, + const uint8_t *image_cr +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + if( y0 < 0 ) y0 = 0; + if( y1 >= h ) y1 = h-1; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + cb_map[i] = 0; + cr_map[i] = 0; + } + + /* fill histogram, cummulative add of luma values */ + /* this innerloop is executed w * h * brush_size * brush_size and counts + many loads and stores. */ + for( i = y0; i < y1; i ++ ) + { + for( j = x0; j < x1; j ++ ) + { + brightness = premul[ i * w + j]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] += image[ i * w + j]; + cb_map[ brightness ] += image_cb[ i * w + j ]; + cr_map[ brightness ] += image_cr[ i * w + j ]; + } + } + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + pixel_t val; + + val.y = y_map[peak_index] / peak_value; + val.u = cb_map[peak_index] / peak_value; + val.v = cr_map[peak_index] / peak_value; + + return val; + +} + + +void neighbours_apply( VJFrame *frame, int width, int height, int brush_size, int intensity_level, int mode ) +{ + int x,y; + const double intensity = intensity_level / 255.0; + uint8_t *Y = tmp_buf[0]; + uint8_t *Y2 = tmp_buf[1]; + uint8_t *dstY = frame->data[0]; + uint8_t *dstCb = frame->data[1]; + uint8_t *dstCr = frame->data[2]; + // keep luma + veejay_memcpy( Y2, frame->data[0], frame->len ); + + if(mode) + { + veejay_memcpy( chromacity[0], frame->data[1], frame->len ); + veejay_memcpy( chromacity[1], frame->data[2], frame->len ); + } + + // premultiply intensity map + for( y = 0 ; y < frame->len ; y ++ ) + Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); + + if(!mode) + { + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + *(dstY)++ = evaluate_pixel( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2 + ); + } + } + } + else + { + pixel_t tmp; + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + tmp = evaluate_pixel_c( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2, + chromacity[0], + chromacity[1] + ); + *(dstY++) = tmp.y; + *(dstCb++) = tmp.u; + *(dstCr++) = tmp.v; + } + } + } +} diff --git a/veejay-server/libvje/effects/neighbours.h b/veejay-server/libvje/effects/neighbours.h new file mode 100644 index 00000000..9f130179 --- /dev/null +++ b/veejay-server/libvje/effects/neighbours.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +#ifndef NEIGHBOURS_H +#define NEIGHBOURS_H +#include +#include +#include + +vj_effect *neighbours_init(int w, int h); +int neighbours_malloc(int w, int h); +void neighbours_free(void); +void neighbours_apply( VJFrame *frame, int width, int height, int brush_size, int level,int mode); +#endif diff --git a/veejay-server/libvje/effects/neighbours2.c b/veejay-server/libvje/effects/neighbours2.c new file mode 100644 index 00000000..247e7891 --- /dev/null +++ b/veejay-server/libvje/effects/neighbours2.c @@ -0,0 +1,283 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "neighbours2.h" + +vj_effect *neighbours2_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; + ve->limits[1][0] = 16; /* brush size (shape is rectangle)*/ + ve->limits[0][1] = 1; + ve->limits[1][1] = 255; /* smoothness */ + ve->limits[0][2] = 0; /* luma only / include chroma */ + ve->limits[1][2] = 1; + ve->defaults[0] = 4; + ve->defaults[1] = 15; + ve->defaults[2] = 0; + ve->description = "ZArtistic Filter (Oilpaint, acc. avg)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int pixel_histogram[256]; +static int y_map[256]; +static int cb_map[256]; +static int cr_map[256]; +static uint8_t *tmp_buf[2]; +static uint8_t *chromacity[2]; + + +int neighbours2_malloc(int w, int h ) +{ + tmp_buf[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 2); + if(!tmp_buf[0] ) return 0; + tmp_buf[1] = tmp_buf[0] + (w*h); + chromacity[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h *2); + if(!chromacity[0]) return 0; + chromacity[1] = chromacity[0] + (w*h); + return 1; +} + +void neighbours2_free(void) +{ + if(tmp_buf[0]) + free(tmp_buf[0]); + if(chromacity[0]) + free(chromacity[0]); + tmp_buf[0] = NULL; + tmp_buf[1] = NULL; + chromacity[0] = NULL; + chromacity[1] = NULL; +} + +typedef struct +{ + uint8_t y; + uint8_t u; + uint8_t v; +} pixel_t; + + +static inline pixel_t evaluate_pixel_bc( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image, /* image data */ + const uint8_t *image_cb, + const uint8_t *image_cr +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + if( y0 < 0 ) y0 = 0; + if( y1 >= h ) y1 = h-1; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + cb_map[i] = 0; + cr_map[i] = 0; + } + + /* fill histogram, cummulative add of luma values */ + /* this innerloop is executed w * h * brush_size * brush_size and counts + many loads and stores. */ + for( i = y0; i < y1; i ++ ) + { + for( j = x0; j < x1; j ++ ) + { + brightness = premul[ i * w + j]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] = (image[ i * w + j] + y_map[brightness])>>1; + cb_map[ brightness ] = (cb_map[brightness] + image_cb[ i * w + j ])>>1; + cr_map[ brightness ] = (cr_map[brightness] + image_cr[ i * w + j ])>>1; + } + } + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + pixel_t val; + + val.y = y_map[peak_index]; + val.u = cb_map[peak_index]; + val.v = cr_map[peak_index]; + + return val; + +} + + +static inline uint8_t evaluate_pixel_b( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image /* image data */ +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + if( y0 < 0 ) y0 = 0; + if( y1 > h ) y1 = h; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + } + + /* fill histogram, cummulative add of luma values */ + for( i = y0; i < y1; i ++ ) + { + for( j = x0; j < x1; j ++ ) + { + // average while adding + brightness = premul[ i * w + j]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] = (y_map[brightness] + image[ i * w + j]) / 2; + + } + } + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + if( peak_value < 16) + return image[y*w+x]; + + return( (uint8_t) ( y_map[ peak_index] )); +} + +void neighbours2_apply( VJFrame *frame, int width, int height, int brush_size, int intensity_level, int mode ) +{ + int x,y; + const double intensity = intensity_level / 255.0; + uint8_t *Y = tmp_buf[0]; + uint8_t *Y2 = tmp_buf[1]; + uint8_t *dstY = frame->data[0]; + uint8_t *dstCb = frame->data[1]; + uint8_t *dstCr = frame->data[2]; + // keep luma + veejay_memcpy( Y2, frame->data[0], frame->len ); + + if(mode) + { + veejay_memcpy( chromacity[0], frame->data[1], frame->len ); + veejay_memcpy( chromacity[1], frame->data[2], frame->len ); + } + + // premultiply intensity map + for( y = 0 ; y < frame->len ; y ++ ) + Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); + + if(!mode) + { + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + *(dstY)++ = evaluate_pixel_b( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2 + ); + } + } + } + else + { + pixel_t tmp; + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + tmp = evaluate_pixel_bc( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2, + chromacity[0], + chromacity[1] + ); + *(dstY++) = tmp.y; + *(dstCb++) = tmp.u; + *(dstCr++) = tmp.v; + } + } + } +} diff --git a/veejay-server/libvje/effects/neighbours2.h b/veejay-server/libvje/effects/neighbours2.h new file mode 100644 index 00000000..8759bf92 --- /dev/null +++ b/veejay-server/libvje/effects/neighbours2.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +#ifndef NEIGHBOURS2_H +#define NEIGHBOURS2_H +#include +#include +#include + +vj_effect *neighbours2_init(int w, int h); +int neighbours2_malloc(int w, int h); +void neighbours2_free(void); +void neighbours2_apply( VJFrame *frame, int width, int height, int brush_size, int level,int mode); +#endif diff --git a/veejay-server/libvje/effects/neighbours3.c b/veejay-server/libvje/effects/neighbours3.c new file mode 100644 index 00000000..4befd84a --- /dev/null +++ b/veejay-server/libvje/effects/neighbours3.c @@ -0,0 +1,287 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +#include +#include +#include +#include "neighbours3.h" + +vj_effect *neighbours3_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; + ve->limits[1][0] = 32; /* line size */ + ve->limits[0][1] = 1; + ve->limits[1][1] = 255; /* smoothness */ + ve->limits[0][2] = 0; /* luma only / include chroma */ + ve->limits[1][2] = 1; + ve->defaults[0] = 9; + ve->defaults[1] = 7; + ve->defaults[2] = 1; + ve->description = "ZArtistic Filter (Horizontal strokes)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int pixel_histogram[256]; +static int y_map[256]; +static int cb_map[256]; +static int cr_map[256]; +static uint8_t *tmp_buf[2]; +static uint8_t *chromacity[2]; + + +int neighbours3_malloc(int w, int h ) +{ + tmp_buf[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 2); + if(!tmp_buf[0] ) return 0; + tmp_buf[1] = tmp_buf[0] + (w*h); + chromacity[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h *2); + if(!chromacity[0]) return 0; + chromacity[1] = chromacity[0] + (w*h); + return 1; +} + +void neighbours3_free(void) +{ + if(tmp_buf[0]) + free(tmp_buf[0]); + if(chromacity[0]) + free(chromacity[0]); + tmp_buf[0] = NULL; + tmp_buf[1] = NULL; + chromacity[0] = NULL; + chromacity[1] = NULL; +} +typedef struct +{ + uint8_t y; + uint8_t u; + uint8_t v; +} pixel_t; + +static inline pixel_t evaluate_pixel_bc( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image, /* image data */ + const uint8_t *image_cb, + const uint8_t *image_cr +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + if( y0 < 0 ) y0 = 0; + if( y1 >= h ) y1 = h-1; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + cb_map[i] = 0; + cr_map[i] = 0; + } + + /* fill histogram, cummulative add of luma values */ + /* this innerloop is executed w * h * brush_size and counts + many loads and stores. */ + i = y; + for( j = x0; j < x1; j ++ ) + { + brightness = premul[ i * w + j]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] += image[ i * w + j]; + cb_map[ brightness ] += image_cb[ i * w + j ]; + cr_map[ brightness ] += image_cr[ i * w + j ]; + } + + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + pixel_t val; + + if( peak_value > 0 ) + { + val.y = y_map[peak_index] / peak_value; + val.u = cb_map[peak_index] / peak_value; + val.v = cr_map[peak_index] / peak_value; + } + else + { + val.y = image[y * w + x]; + val.u = image_cb[y * w + x]; + val.v = image_cr[y * w + x]; + } + return val; + +} + + +static inline uint8_t evaluate_pixel_b( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image /* image data */ +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + if( y0 < 0 ) y0 = 0; + if( y1 >= h ) y1 = h-1; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + } + + i = y; + for( j = x0; j < x1; j ++ ) + { + // average while adding + brightness = premul[ i * w + j]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] += image[ i * w + j]; + } + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + if( peak_value < 16) + return image[ y * w + x]; + + return( (uint8_t) ( y_map[ peak_index] / peak_value )); +} + +void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int intensity_level, int mode ) +{ + int x,y; + const double intensity = intensity_level / 255.0; + uint8_t *Y = tmp_buf[0]; + uint8_t *Y2 = tmp_buf[1]; + uint8_t *dstY = frame->data[0]; + uint8_t *dstCb = frame->data[1]; + uint8_t *dstCr = frame->data[2]; + // keep luma + veejay_memcpy( Y2, frame->data[0], frame->len ); + + if(mode) + { + veejay_memcpy( chromacity[0], frame->data[1], frame->len ); + veejay_memcpy( chromacity[1], frame->data[2], frame->len ); + } + + // premultiply intensity map + for( y = 0 ; y < frame->len ; y ++ ) + Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); + + if(!mode) + { + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + *(dstY)++ = evaluate_pixel_b( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2 + ); + } + } + veejay_memset( frame->data[1], 128, frame->len ); + veejay_memset( frame->data[2], 128, frame->len ); + } + else + { + pixel_t tmp; + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + tmp = evaluate_pixel_bc( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2, + chromacity[0], + chromacity[1] + ); + *(dstY++) = tmp.y; + *(dstCb++) = tmp.u; + *(dstCr++) = tmp.v; + } + } + } +} diff --git a/veejay-server/libvje/effects/neighbours3.h b/veejay-server/libvje/effects/neighbours3.h new file mode 100644 index 00000000..84793af8 --- /dev/null +++ b/veejay-server/libvje/effects/neighbours3.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +#ifndef NEIGHBOURS3_H +#define NEIGHBOURS3_H +#include +#include +#include + +vj_effect *neighbours3_init(int w, int h); +int neighbours3_malloc(int w, int h); +void neighbours3_free(void); +void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int level,int mode); +#endif diff --git a/veejay-server/libvje/effects/neighbours4.c b/veejay-server/libvje/effects/neighbours4.c new file mode 100644 index 00000000..e44689c9 --- /dev/null +++ b/veejay-server/libvje/effects/neighbours4.c @@ -0,0 +1,334 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "neighbours4.h" + +vj_effect *neighbours4_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; + ve->limits[1][0] = 32; /* radius */ + ve->limits[0][1] = 1; + ve->limits[1][1] = 200; /* distance from center */ + ve->limits[0][2] = 1; + ve->limits[1][2] = 255; /* smoothness */ + ve->limits[0][3] = 0; /* luma only / include chroma */ + ve->limits[1][3] = 1; + ve->defaults[0] = 4; + ve->defaults[1] = 24; + ve->defaults[2] = 8; + ve->defaults[3] = 1; + ve->description = "ZArtistic Filter (Round Brush)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int pixel_histogram[256]; +static int y_map[256]; +static int cb_map[256]; +static int cr_map[256]; +static uint8_t *tmp_buf[2]; +static uint8_t *chromacity[2]; +typedef struct +{ + uint8_t y; + uint8_t u; + uint8_t v; +} pixel_t; + +typedef struct +{ + double x; + double y; +} relpoint_t; + +static relpoint_t points[2048]; + + + +int neighbours4_malloc(int w, int h ) +{ + tmp_buf[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 2); + if(!tmp_buf[0] ) return 0; + tmp_buf[1] = tmp_buf[0] + (w*h); + chromacity[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h *2); + if(!chromacity[0]) return 0; + chromacity[1] = chromacity[0] + (w*h); + int i; + for(i = 0; i < w; i ++ ) + { + points[i].x = 0.0; + points[i].y = 0.0; + } + return 1; +} + +void neighbours4_free(void) +{ + if(tmp_buf[0]) + free(tmp_buf[0]); + if(chromacity[0]) + free(chromacity[0]); + tmp_buf[0] = NULL; + tmp_buf[1] = NULL; + chromacity[0] = NULL; + chromacity[1] = NULL; +} + +static void create_circle( double radius, int depth, int w ) +{ + double t = 0.0; + int index = 0; + double theta = ((double)w/depth); + while( index <= depth) + { + double r = (t / 180.0) * M_PI; + points[index].x = cos(r) * radius; + points[index].y = sin(r) * radius; + t += theta; + index++; + } +} + +static inline pixel_t evaluate_pixel_bc( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image, /* image data */ + const uint8_t *image_cb, + const uint8_t *image_cr, + const relpoint_t *points /* relative coordinate map */ +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + const int max_ = (int) ( 0xff * intensity ); + int dx,dy; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + cb_map[i] = 0; + cr_map[i] = 0; + } + + /* fill histogram, cummulative add of luma values */ + /* this innerloop is executed w * h * brush_size and counts + many loads and stores. */ + i = y; + + /* loop over perimter of circle (!) */ + for( i = 0; i < brush_size; i ++) + { + dx = points[i].x + x; + dy = points[i].y + y; + if(dx < 0) dx = 0; else if (dx >= w) dx = w-1; + if(dy < 0) dy = 0; else if (dy >= h) dy = h-1; + + brightness = premul[ dy * w + dx]; + pixel_histogram[ brightness ] ++; + + y_map[ brightness ] += image[ dy * w + dx]; + cb_map[ brightness ] += image_cb[ dy * w + dx ]; + cr_map[ brightness ] += image_cr[ dy * w + dx ]; + } + + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + pixel_t val; + + if(peak_value > 0) + { + val.y = y_map[peak_index] / peak_value; + val.u = cb_map[peak_index] / peak_value; + val.v = cr_map[peak_index] / peak_value; + } + else + { + val.y = image[y * w + x]; + val.u = image_cb[y * w + x]; + val.v = image_cr[y * w + x]; + } + return val; + +} + + +static inline uint8_t evaluate_pixel_b( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image, /* image data */ + const relpoint_t *points /* relative coordinate map*/ +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + int dx,dy; + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + if( y0 < 0 ) y0 = 0; + if( y1 >= h ) y1 = h-1; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + } + + // points in circle + for( i = 0; i < brush_size; i ++) + { + dx = points[i].x + x; + dy = points[i].y + y; + if(dx < 0) dx = 0; else if (dx > w) dx = w; + if(dy < 0) dy = 0; else if (dy >= h) dy = h-1; + + brightness = premul[ dy * w + dx]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] += image[ dy * w + dx]; + } + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + if( peak_value < 16) + return image[ y * w + x]; + + return( (uint8_t) ( y_map[ peak_index] / peak_value )); +} + +void neighbours4_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int intensity_level, int mode ) +{ + int x,y; + const double intensity = intensity_level / 255.0; + uint8_t *Y = tmp_buf[0]; + uint8_t *Y2 = tmp_buf[1]; + uint8_t *dstY = frame->data[0]; + uint8_t *dstCb = frame->data[1]; + uint8_t *dstCr = frame->data[2]; + double r = (double)radius; + // keep luma + veejay_memcpy( Y2, frame->data[0], frame->len ); + + create_circle( r, brush_size,width ); + + relpoint_t *p_points = &points[0]; + + if(mode) + { + veejay_memcpy( chromacity[0], frame->data[1], frame->len ); + veejay_memcpy( chromacity[1], frame->data[2], frame->len ); + } + + + // premultiply intensity map + for( y = 0 ; y < frame->len ; y ++ ) + Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); + + if(!mode) + { + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + *(dstY)++ = evaluate_pixel_b( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2, + p_points + ); + } + } + veejay_memset( frame->data[1], 128, frame->len ); + veejay_memset( frame->data[2], 128, frame->len ); + } + else + { + pixel_t tmp; + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + tmp = evaluate_pixel_bc( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2, + chromacity[0], + chromacity[1], + p_points + ); + *(dstY++) = tmp.y; + *(dstCb++) = tmp.u; + *(dstCr++) = tmp.v; + } + } + } + +} diff --git a/veejay-server/libvje/effects/neighbours4.h b/veejay-server/libvje/effects/neighbours4.h new file mode 100644 index 00000000..13939f7c --- /dev/null +++ b/veejay-server/libvje/effects/neighbours4.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +#ifndef NEIGHBOURS4_H +#define NEIGHBOURS4_H +#include +#include +#include + +vj_effect *neighbours4_init(int w, int h); +int neighbours4_malloc(int w, int h); +void neighbours4_free(void); +void neighbours4_apply( VJFrame *frame, int width, int height, int radius,int brush_size, int level,int mode); +#endif diff --git a/veejay-server/libvje/effects/neighbours5.c b/veejay-server/libvje/effects/neighbours5.c new file mode 100644 index 00000000..e4124585 --- /dev/null +++ b/veejay-server/libvje/effects/neighbours5.c @@ -0,0 +1,287 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "neighbours5.h" + +vj_effect *neighbours5_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; + ve->limits[1][0] = 32; /* line size */ + ve->limits[0][1] = 1; + ve->limits[1][1] = 255; /* smoothness */ + ve->limits[0][2] = 0; /* luma only / include chroma */ + ve->limits[1][2] = 1; + ve->defaults[0] = 6; + ve->defaults[1] = 5; + ve->defaults[2] = 1; + ve->description = "ZArtistic Filter (Vertical strokes)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int pixel_histogram[256]; +static int y_map[256]; +static int cb_map[256]; +static int cr_map[256]; +static uint8_t *tmp_buf[2]; +static uint8_t *chromacity[2]; + + +int neighbours5_malloc(int w, int h ) +{ + tmp_buf[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 2); + if(!tmp_buf[0] ) return 0; + tmp_buf[1] = tmp_buf[0] + (w*h); + chromacity[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h *2); + if(!chromacity[0]) return 0; + chromacity[1] = chromacity[0] + (w*h); + return 1; +} + +void neighbours5_free(void) +{ + if(tmp_buf[0]) + free(tmp_buf[0]); + if(chromacity[0]) + free(chromacity[0]); + tmp_buf[0] = NULL; + tmp_buf[1] = NULL; + chromacity[0] = NULL; + chromacity[1] = NULL; +} + +typedef struct +{ + uint8_t y; + uint8_t u; + uint8_t v; +} pixel_t; + +static inline pixel_t evaluate_pixel_bc( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image, /* image data */ + const uint8_t *image_cb, + const uint8_t *image_cr +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + + if( y0 < 0 ) y0 = 0; + if( y1 >= h ) y1 = h-1; + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + cb_map[i] = 0; + cr_map[i] = 0; + } + + /* fill histogram, cummulative add of luma values */ + /* this innerloop is executed w * h * brush_size and counts + many loads and stores. + vertical passing + */ + for( j = y0; j < y1; j ++ ) + { + brightness = premul[ j * w + x]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] += (image[ j * w + x]); + cb_map[ brightness ] += (image_cb[ j * w + x ]); + cr_map[ brightness ] += (image_cr[ j * w + x ]); + } + + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + pixel_t val; + + if(peak_value > 0) + { + val.y = y_map[peak_index] / peak_value; + val.u = cb_map[peak_index] / peak_value; + val.v = cr_map[peak_index] / peak_value; + } + else + { + val.y = image[ y * w + x]; + val.u = image_cb[ y * w + x]; + val.v = image_cr[ y * w + x]; + } + return val; + +} + + +static inline uint8_t evaluate_pixel_b( + int x, int y, /* center pixel */ + const int brush_size, /* brush size (works like equal sized rectangle) */ + const double intensity, /* Luma value * scaling factor */ + const int w, /* width of image */ + const int h, /* height of image */ + const uint8_t *premul, /* map data */ + const uint8_t *image /* image data */ +) +{ + unsigned int brightness; /* scaled brightnes */ + int peak_value = 0; + int peak_index = 0; + int i,j; + int x0 = x - brush_size; + int x1 = x + brush_size; + int y0 = y - brush_size; + int y1 = y + brush_size; + const int max_ = (int) ( 0xff * intensity ); + + if( y0 < 0 ) y0 = 0; + if( y1 >= h ) y1 = h - 1; + if( x0 < 0 ) x0 = 0; + if( x1 > w ) x1 = w; + + /* clear histogram and y_map */ + for( i =0 ; i < max_; i ++ ) + { + pixel_histogram[i] = 0; + y_map[i] = 0; + } + + for( j = y0; j < y1; j ++ ) + { + // average while adding + brightness = premul[ j * w + x]; + pixel_histogram[ brightness ] ++; + y_map[ brightness ] += image[ j * w + x]; + } + + /* find most occuring value */ + for( i = 0; i < max_ ; i ++ ) + { + if( pixel_histogram[i] >= peak_value ) + { + peak_value = pixel_histogram[i]; + peak_index = i; + } + } + if( peak_value < 16) + return image[ y * w + x]; + + return( (uint8_t) ( y_map[ peak_index] / peak_value )); +} + +void neighbours5_apply( VJFrame *frame, int width, int height, int brush_size, int intensity_level, int mode ) +{ + int x,y; + const double intensity = intensity_level / 255.0; + uint8_t *Y = tmp_buf[0]; + uint8_t *Y2 = tmp_buf[1]; + uint8_t *dstY = frame->data[0]; + uint8_t *dstCb = frame->data[1]; + uint8_t *dstCr = frame->data[2]; + // keep luma + veejay_memcpy( Y2, frame->data[0], frame->len ); + + if(mode) + { + veejay_memcpy( chromacity[0], frame->data[1], frame->len ); + veejay_memcpy( chromacity[1], frame->data[2], frame->len ); + } + + // premultiply intensity map + for( y = 0 ; y < frame->len ; y ++ ) + Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); + + if(!mode) + { + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + *(dstY)++ = evaluate_pixel_b( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2 + ); + } + } + veejay_memset( frame->data[1], 128, frame->len ); + veejay_memset( frame->data[2], 128, frame->len ); + } + else + { + pixel_t tmp; + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < width; x ++ ) + { + tmp = evaluate_pixel_bc( + x,y, + brush_size, + intensity, + width, + height, + Y, + Y2, + chromacity[0], + chromacity[1] + ); + *(dstY++) = tmp.y; + *(dstCb++) = tmp.u; + *(dstCr++) = tmp.v; + } + } + } +} diff --git a/veejay-server/libvje/effects/neighbours5.h b/veejay-server/libvje/effects/neighbours5.h new file mode 100644 index 00000000..f0df5417 --- /dev/null +++ b/veejay-server/libvje/effects/neighbours5.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +#ifndef NEIGHBOURS5_H +#define NEIGHBOURS5_H +#include +#include +#include + +vj_effect *neighbours5_init(int w, int h); +int neighbours5_malloc(int w, int h); +void neighbours5_free(void); +void neighbours5_apply( VJFrame *frame, int width, int height, int radius,int brush_size, int level); +#endif diff --git a/veejay-server/libvje/effects/nervous.c b/veejay-server/libvje/effects/nervous.c new file mode 100644 index 00000000..c41e3a31 --- /dev/null +++ b/veejay-server/libvje/effects/nervous.c @@ -0,0 +1,117 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + + +/* + Nervous is loosly based on Kentaro's Nervous effect, found + in EffecTV ( http://effectv.sf.net ). + +*/ +#include +#include +#include +#include "nervous.h" + +#define N_MAX 25 + +static uint8_t *nervous_buf[3]; // huge buffer +static int frames_elapsed; + +vj_effect *nervous_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = N_MAX; + ve->defaults[0] = N_MAX; + ve->description = "Nervous"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +int nervous_malloc(int w, int h ) +{ + nervous_buf[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * N_MAX * 3); + + if(!nervous_buf[0]) return 0; + nervous_buf[1] = nervous_buf[0] + (w*h*N_MAX); + nervous_buf[2] = nervous_buf[1] + (w*h*N_MAX); + frames_elapsed = 0; + + veejay_memset( nervous_buf[0], 0, (w*h) * N_MAX ); + veejay_memset( nervous_buf[1], 128, (w*h) * N_MAX ); + veejay_memset( nervous_buf[2], 128, (w*h) * N_MAX ); + + return 1; +} + +void nervous_free(void) +{ + if( nervous_buf[0] ) free(nervous_buf[0]); + nervous_buf[0] = NULL; + nervous_buf[1] = NULL; + nervous_buf[2] = NULL; +} + + +void nervous_apply( VJFrame *frame, int width, int height, int delay) +{ + unsigned int i; + int len = (width * height); + int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *NY = nervous_buf[0] + (len * frames_elapsed ); + uint8_t *NCb= nervous_buf[1] + (uv_len * frames_elapsed ); + uint8_t *NCr= nervous_buf[2] + (uv_len * frames_elapsed ); + + // copy original into nervous buf + veejay_memcpy( NY, Y, len ); + veejay_memcpy( NCb, Cb, uv_len ); + veejay_memcpy( NCr, Cr, uv_len ); + + if(frames_elapsed > 0) + { + // take a random frame + unsigned int index = (unsigned int) ((double)frames_elapsed * + rand() / (RAND_MAX+1.0) ); + // setup pointers + uint8_t *sY = nervous_buf[0] + (len * index); + uint8_t *sCb = nervous_buf[1] + (uv_len * index); + uint8_t *sCr = nervous_buf[2] + (uv_len * index); + // copy it to dst + veejay_memcpy( Y, sY, len ); + veejay_memcpy( Cb, sCb, uv_len ); + veejay_memcpy( Cr, sCr, uv_len ); + } + + frames_elapsed ++; + + if( frames_elapsed == N_MAX ) + frames_elapsed = 0; + +} diff --git a/veejay-server/libvje/effects/nervous.h b/veejay-server/libvje/effects/nervous.h new file mode 100644 index 00000000..e1e741cc --- /dev/null +++ b/veejay-server/libvje/effects/nervous.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef NERVOUS_H +#define NERVOUS_H +#include +#include +#include + +vj_effect *nervous_init(int w, int h); +int nervous_malloc(int w, int h); +void nervous_free(void); +void nervous_apply(VJFrame *Frame, int width, int height,int delay); +#endif diff --git a/veejay-server/libvje/effects/noiseadd.c b/veejay-server/libvje/effects/noiseadd.c new file mode 100644 index 00000000..8f999940 --- /dev/null +++ b/veejay-server/libvje/effects/noiseadd.c @@ -0,0 +1,197 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "noiseadd.h" + +static uint8_t *Yb_frame; + +vj_effect *noiseadd_init(int width , int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults[0] = 0; /* type */ + ve->defaults[1] = 1000; + ve->limits[0][0] = 0; + ve->limits[1][0] = 2; + ve->limits[0][1] = 1; + ve->limits[1][1] = 10000; + ve->description = "Amplify low noise"; + + ve->extra_frame = 0; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} +// FIXME private + +int noiseadd_malloc(int width, int height) +{ + + Yb_frame = (uint8_t *) vj_calloc( sizeof(uint8_t) * width * height); + if(!Yb_frame) return 0; + return 1; +} + +void noiseadd_free() { + if(Yb_frame) free(Yb_frame); + Yb_frame = NULL; +} + +void noiseblur1x3_maskapply(uint8_t *src[3], int width, int height, int coeef ) { + + int r, c; + double k = (coeef/100.0); + uint8_t d; + + const int len = (width*height); + + for (r = 0; r < len; r += width) { + for (c = 1; c < width-1; c++) { + Yb_frame[c + r] = (src[0][r + c - 1] + + src[0][r + c] + + src[0][r + c + 1] + ) / 3; + } + } + + for(c=0; c < len; c++) { + /* get higher signal frequencies and*/ + /* multiply result with coeffcient to get d*/ + d = (Yb_frame[c] - src[0][c]) * k; + src[0][c] = d; + } + +} +void noiseblur3x3_maskapply(uint8_t *src[3], int width, int height, int coeef ) { + + int r, c; + const double k = (coeef/1000.0); + uint8_t d; + + const int len = (width*height)-width; + + + for (r = width; r < len; r += width) { + for (c = 1; c < width-1; c++) { + Yb_frame[c + r] = (src[0][r - width + c - 1] + + src[0][r - width + c] + + src[0][r - width + c + 1] + + src[0][r + width + c - 1] + + src[0][r + width + c] + + src[0][r + width + c + 1] + + src[0][r + c] + + src[0][r + c + 1] + + src[0][r + c - 1] + ) / 9; + } + } + + for(c=width; c < len; c++) { + /* get higher signal frequencies and*/ + /* multiply result with coeffcient to get d*/ + d = (Yb_frame[c] - src[0][c]) * k; + src[0][c] = d; + } + +} + +void noiseneg3x3_maskapply(uint8_t *src[3], int width, int height, int coeef ) { + + int r, c; + const double k = (coeef/1000.0); + uint8_t d; + + int len = (width*height)-width; + + + for (r = width; r < len; r += width) { + for (c = 1; c < width-1; c++) { + Yb_frame[c + r] = 255 - ((src[0][r - width + c - 1] + + src[0][r - width + c] + + src[0][r - width + c + 1] + + src[0][r + width + c - 1] + + src[0][r + width + c] + + src[0][r + width + c + 1] + + src[0][r + c] + + src[0][r + c + 1] + + src[0][r + c - 1] + )) / 9; + } + } + + for(c=width; c < len; c++) { + /* get higher signal frequencies and*/ + /* multiply result with coeffcient to get d*/ + d = (src[0][c] - Yb_frame[c]) * k; + src[0][c] = d; + } + +} + +void noiseadd3x3_maskapply(uint8_t *src[3], int width, int height, int coeef ) { + + int r, c; + const double k = (coeef/1000.0); + uint8_t d; + + const int len = (width*height)-width; + + + for (r = width; r < len; r += width) { + for (c = 1; c < width-1; c++) { + Yb_frame[c + r] = (src[0][r - width + c - 1] + + src[0][r - width + c] + + src[0][r - width + c + 1] + + src[0][r + width + c - 1] + + src[0][r + width + c] + + src[0][r + width + c + 1] + + src[0][r + c] + + src[0][r + c + 1] + + src[0][r + c - 1] + ) / 9; + } + } + + for(c=width; c < len; c++) { + /* get higher signal frequencies and*/ + /* multiply result with coeffcient to get d*/ + d = (src[0][c] - Yb_frame[c]) * k; + src[0][c] = d; + } + +} + + +void noiseadd_apply( VJFrame *frame, int width, int height, int type, int coeef) { + + switch(type) { + case 0: + noiseblur1x3_maskapply(frame->data,width,height,coeef); break; + case 1: + noiseblur3x3_maskapply(frame->data,width,height,coeef); break; + case 2: + noiseneg3x3_maskapply(frame->data,width,height,coeef); break; + } +} diff --git a/veejay-server/libvje/effects/noiseadd.h b/veejay-server/libvje/effects/noiseadd.h new file mode 100644 index 00000000..f5554017 --- /dev/null +++ b/veejay-server/libvje/effects/noiseadd.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef NOISEADD_H +#define NOISEADD_H +#include +#include +#include + +vj_effect *noiseadd_init(int w, int h); +void noiseadd_free(); +int noiseadd_malloc(int w, int h); +void noiseadd_apply( VJFrame *frame, int w, int h, int t, int n); + +#endif diff --git a/veejay-server/libvje/effects/noisepencil.c b/veejay-server/libvje/effects/noisepencil.c new file mode 100644 index 00000000..84656864 --- /dev/null +++ b/veejay-server/libvje/effects/noisepencil.c @@ -0,0 +1,269 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#include +#include +#include "noisepencil.h" + +static uint8_t *Yb_frame; + +vj_effect *noisepencil_init(int width , int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults[0] = 0; /* type */ + ve->defaults[1] = 1000; + ve->defaults[2] = 68; + ve->defaults[3] = 110; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 3; + ve->limits[0][1] = 1; + ve->limits[1][1] = 10000; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->description = "Noise Pencil"; + + ve->extra_frame = 0; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + +//FIXME private +int noisepencil_malloc(int width,int height) +{ + Yb_frame = (uint8_t *) vj_calloc( sizeof(uint8_t) * width * height); + if(!Yb_frame) return 0; + return 1; +} + +void noisepencil_free() { + if(Yb_frame) free(Yb_frame); + Yb_frame = NULL; +} + +void noisepencil_1_apply(uint8_t *src[3], int width, int height, int coeef, int min_t, int max_t ) { + + int r, c; + double k = (coeef/100.0); + int len = (width*height); + uint8_t tmp; + + for( r = 0; r < width ; r ++ ) + { + Yb_frame[ r ] = (src[0][r] + src[0][r+width])>>1; + if(Yb_frame[r] < min_t || Yb_frame[r] > max_t) + { + Yb_frame[r] = 0; + } + } + + for (r = 0; r < len; r += width) { + for (c = 1; c < width-1; c++) { + tmp = (src[0][r + c - 1] + + src[0][r + c] + + src[0][r + c + 1] + ) / 3; + + if( tmp >= min_t && tmp <= max_t ) + { + Yb_frame[r + c ] = tmp; + } + else + { + Yb_frame[r + c ] = 0; + } + } + } + + for(c=0; c < len; c++) { + /* get higher signal frequencies and*/ + /* multiply result with coeffcient to get d*/ + if( Yb_frame[c] != 0) src[0][c] = (Yb_frame[c] - src[0][c]) * k; + } + +} +void noisepencil_2_apply(uint8_t *src[3], int width, int height, int coeef , int min_t, int max_t) { + + int r, c; + double k = (coeef/1000.0); + int len = (width*height)-width; + uint8_t tmp; + + for( r = 0; r < width; r++) + { + Yb_frame[ r ] = (src[0][r + width] + src[0][r]) >> 1; + if(Yb_frame[r] < min_t || Yb_frame[r] > max_t) + { + Yb_frame[r] = 0; + } + } + + for (r = width; r < len; r += width) { + for (c = 1; c < width-1; c++) { + tmp = (src[0][r - width + c - 1] + + src[0][r - width + c] + + src[0][r - width + c + 1] + + src[0][r + width + c - 1] + + src[0][r + width + c] + + src[0][r + width + c + 1] + + src[0][r + c] + + src[0][r + c + 1] + + src[0][r + c - 1] + ) / 9; + + if( tmp >= min_t && tmp <= max_t) + { + Yb_frame[c + r ] = tmp; + } + else + { + Yb_frame[c + r ] = 0; + } + } + } + + for(c=0; c < len; c++) { + /* get higher signal frequencies and*/ + /* multiply result with coeffcient to get d*/ + if(Yb_frame[c] != 0) src[0][c] = (Yb_frame[c] - src[0][c]) * k; + } + +} + +void noisepencil_3_apply(uint8_t *src[3], int width, int height, int coeef, int min_t , int max_t ) { + + int r, c; + double k = (coeef/1000.0); + int len = (width*height)-width; + uint8_t tmp; + for ( r = 0 ; r < width ; r++) + { + Yb_frame[r] = ( src[0][r + width] + src[0][r] ) >> 1; + if( Yb_frame[r] max_t) { + Yb_frame[r] = 0; + } + } + + for (r = width; r < len; r += width) { + for (c = 1; c < width-1; c++) { + tmp = (src[0][r - width + c - 1] + + src[0][r - width + c] + + src[0][r - width + c + 1] + + src[0][r + width + c - 1] + + src[0][r + width + c] + + src[0][r + width + c + 1] + + src[0][r + c] + + src[0][r + c + 1] + + src[0][r + c - 1] + ) / 9; + + if( min_t >= tmp && tmp <= max_t) + { + Yb_frame[c + r] = tmp; + } + else + { + Yb_frame[c + r] = 0; + } + + } + } + + for(c=0; c < len; c++) { + /* get higher signal frequencies and*/ + /* multiply result with coeffcient to get d*/ + if(Yb_frame[c] > 0 ) src[0][c] = (src[0][c] - Yb_frame[c]) * k; + } + +} + +void noisepencil_4_apply(uint8_t *src[3], int width, int height, int coeef, int min_t, int max_t ) { + + int r, c; + double k = (coeef/1000.0); + int len = (width*height)-width; + uint8_t tmp; + + for ( r = 0; r < width ; r++ ) + { + Yb_frame[r] = (src[0][ r + width ] + src[0][ r ] ) >> 1; + if(Yb_frame[r] < min_t || Yb_frame[r] > max_t ) + { + Yb_frame[r] = 0; + } + } + + for (r = width; r < len; r += width) { + for (c = 1; c < width-1; c++) { + tmp = (src[0][r - width + c - 1] + + src[0][r - width + c] + + src[0][r - width + c + 1] + + src[0][r + width + c - 1] + + src[0][r + width + c] + + src[0][r + width + c + 1] + + src[0][r + c] + + src[0][r + c + 1] + + src[0][r + c - 1] + ) / 9; + + if( tmp >= min_t && tmp <= max_t ) + { + Yb_frame[r] = tmp; + } + else + { + Yb_frame[r] = 16; + } + } + } + + + + for(c=0; c < len; c++) { + /* get higher signal frequencies and*/ + /* multiply result with coeffcient to get d*/ + if(Yb_frame[c] > 0) src[0][c] = (src[0][c] - Yb_frame[c]) * k; + } + +} + +/* with min_t -> max_t select the threshold to 'noise ' */ +void noisepencil_apply(VJFrame *frame, int width, int height, int type, int coeef, int min_t, + int max_t) { + + switch(type) { + case 0: + noisepencil_1_apply(frame->data,width,height,coeef,min_t,max_t); break; + case 1: + noisepencil_2_apply(frame->data,width,height,coeef,min_t,max_t); break; + case 2: + noisepencil_3_apply(frame->data,width,height,coeef,min_t,max_t); break; + case 3: + noisepencil_4_apply(frame->data,width,height,coeef,min_t,max_t); break; + } +} diff --git a/veejay-server/libvje/effects/noisepencil.h b/veejay-server/libvje/effects/noisepencil.h new file mode 100644 index 00000000..f003278d --- /dev/null +++ b/veejay-server/libvje/effects/noisepencil.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef NOISEPENCIL_H +#define NOISEPENCIL_H +#include +#include +#include + +vj_effect *noisepencil_init (int w, int h); +void noisepencil_free(); +int noisepencil_malloc(int w, int h); +void noisepencil_apply( VJFrame *frame, int w, int h, int t, int n, int a, int b); + +#endif diff --git a/veejay-server/libvje/effects/opacity.c b/veejay-server/libvje/effects/opacity.c new file mode 100644 index 00000000..36e45324 --- /dev/null +++ b/veejay-server/libvje/effects/opacity.c @@ -0,0 +1,160 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + + +/* Alpha blending with MMX, shamelessy ripped from libvisual + * + * + * Libvisual-plugins - Standard plugins for libvisual + * + * Copyright (C) 2004, 2005, 2006 Dennis Smit + * + * Authors: Dennis Smit + * + * $Id: morph_alphablend.c,v 1.19 2006/01/27 20:19:18 synap Exp $ + * + * + * + */ +#include +#include +#include +#include "opacity.h" + +vj_effect *opacity_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->defaults[0] = 150; + ve->description = "Normal Overlay"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + + return ve; +} + +#ifdef HAVE_ASM_MMX +static inline int blend_plane(uint8_t *dst, uint8_t *A, uint8_t *B, int size, int alpha) +{ + uint32_t ialpha = alpha; + int i; + + ialpha |= ialpha << 16; + + __asm __volatile + ("\n\t pxor %%mm6, %%mm6" + ::); + + for (i = size; i > 4; i -= 4) { + __asm __volatile + ("\n\t movd %[alpha], %%mm3" + "\n\t movd %[src2], %%mm0" + "\n\t psllq $32, %%mm3" + "\n\t movd %[alpha], %%mm2" + "\n\t movd %[src1], %%mm1" + "\n\t por %%mm3, %%mm2" + "\n\t punpcklbw %%mm6, %%mm0" /* interleaving dest */ + "\n\t punpcklbw %%mm6, %%mm1" /* interleaving source */ + "\n\t psubsw %%mm1, %%mm0" /* (src - dest) part */ + "\n\t pmullw %%mm2, %%mm0" /* alpha * (src - dest) */ + "\n\t psrlw $8, %%mm0" /* / 256 */ + "\n\t paddb %%mm1, %%mm0" /* + dest */ + "\n\t packuswb %%mm0, %%mm0" + "\n\t movd %%mm0, %[dest]" + : [dest] "=m" (*(dst + i)) + : [src1] "m" (*(A + i)) + , [src2] "m" (*(B + i)) + , [alpha] "m" (ialpha)); + } + return i; +} +#else +static inline int blend_plane( uint8_t *dst, uint8_t *A, uint8_t *B, int size, int opacity ) +{ + unsigned int i, op0, op1; + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + for( i = 0; i < size; i ++ ) + dst[i] = (op0 * A[i] + op1 * B[i] ) >> 8; + + + return 0; +} +#endif + + +void opacity_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int opacity) +{ + int y = blend_plane( frame->data[0], frame->data[0], frame2->data[0], frame->len, opacity ); + int u = blend_plane( frame->data[1], frame->data[1], frame2->data[1], frame->uv_len, opacity ); + int v = blend_plane( frame->data[2], frame->data[2], frame2->data[2], frame->uv_len, opacity ); +#ifdef HAVE_ASM_MMX + __asm __volatile( "\n\t emms" ); +#endif + if( y>0) while (y--) + frame->data[0][y] = ((opacity * (frame->data[0][y] - frame2->data[0][y])) >> 8 ) + frame->data[0][y]; + + if( u>0) while( u-- ) + frame->data[1][u] = ((opacity * (frame->data[1][u] - frame2->data[1][u])) >> 8 ) + frame->data[1][u]; + + if(v>0) while( v-- ) + frame->data[2][v] = ((opacity * (frame->data[2][v] - frame2->data[2][v])) >> 8 ) + frame->data[2][v]; + +} + +void opacity_blend_apply( uint8_t *src1[3], uint8_t *src2[3], int len, int uv_len, int opacity ) +{ + int y = blend_plane( src1[0], src1[0], src2[0], len, opacity ); + int u = blend_plane( src1[1], src1[1], src2[1], uv_len,opacity); + int v = blend_plane( src1[2], src1[2], src2[2], uv_len, opacity); +#ifdef HAVE_ASM_MMX + __asm __volatile( "\n\t emms" ); +#endif + + while (y--) + src1[0][y] = ((opacity * (src1[0][y] - src2[0][y])) >> 8) + src1[0][y]; + while( u-- ) + src1[1][u] = ((opacity * (src1[1][u] - src2[1][u])) >> 8) + src1[1][u]; + while( v-- ) + src1[2][v] = ((opacity * (src1[2][v] - src2[2][v])) >> 8) + src1[2][v]; + + +} + + +void opacity_blend_luma_apply( uint8_t *A, uint8_t *B, int len,int opacity ) +{ + int y = blend_plane( A,A,B, len, opacity ); +#ifdef HAVE_ASM_MMX + __asm __volatile( "\n\t emms" ); +#endif + while (y--) + A[y] = ((opacity * (A[y] - B[y])) >> 8 ) + A[y]; +} + +void opacity_free(){} diff --git a/veejay-server/libvje/effects/opacity.h b/veejay-server/libvje/effects/opacity.h new file mode 100644 index 00000000..82ea0d65 --- /dev/null +++ b/veejay-server/libvje/effects/opacity.h @@ -0,0 +1,35 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef OPACITY_H +#define OPACITY_H +#include +#include +#include + +vj_effect *opacity_init(); +void opacity_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int opacity); + +void opacity_blend_luma_apply( uint8_t *src, uint8_t *dst, int len, int opacity ); +void opacity_blend_apply( uint8_t *src[3], uint8_t *dst[3], int len, int uv_len, int opacity ); + +void opacity_free(); +#endif diff --git a/veejay-server/libvje/effects/opacityadv.c b/veejay-server/libvje/effects/opacityadv.c new file mode 100644 index 00000000..aa6eef3c --- /dev/null +++ b/veejay-server/libvje/effects/opacityadv.c @@ -0,0 +1,90 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "opacityadv.h" + +vj_effect *opacityadv_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->defaults[0] = 150; + ve->defaults[1] = 40; + ve->defaults[2] = 176; + ve->description = "Overlay by Threshold Range"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user =0; + return ve; +} + +void opacityadv_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int opacity, int threshold, + int threshold2) +{ + + unsigned int x, y, len = width * height; + uint8_t a1, a2; + unsigned int op0, op1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + for (y = 0; y < len; y += width) { + for (x = 0; x < width; x++) { + a1 = Y[x + y]; + a2 = Y2[x + y]; + /* + if(a2 > a1) { + d = abs(a2-a1); + if (d > threshold && d < threshold2) { + Y[x+y] = (op0 * a1 + op1 * a2 )/255; + Cb[x+y] = (op0 * Cb[x+y] + op1 * Cb2[x+y])/255; + Cr[x+y] = (op0 * Cr[x+y] + op1 * Cr2[x+y])/255; + } + } */ + if (a1 >= threshold && a1 <= threshold2) { + Y[x + y] = (op0 * a1 + op1 * a2) >> 8; + + Cb[x + y] = + (op0 * Cb[x + y] + op1 * Cb2[x + y]) >> 8; + Cr[x + y] = + (op0 * Cr[x + y] + op1 * Cr2[x + y]) >> 8; + } + } + } +} +void opacityadv_free(){} diff --git a/veejay-server/libvje/effects/opacityadv.h b/veejay-server/libvje/effects/opacityadv.h new file mode 100644 index 00000000..26a84f9f --- /dev/null +++ b/veejay-server/libvje/effects/opacityadv.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef OPACITYADV_H +#define OPACITYADV_H +#include +#include +#include + +vj_effect *opacityadv_init(); +void opacityadv_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int opacity, int threshold, + int threshold2); +void opacityadv_free(); +#endif diff --git a/veejay-server/libvje/effects/opacitythreshold.c b/veejay-server/libvje/effects/opacitythreshold.c new file mode 100644 index 00000000..afe326e3 --- /dev/null +++ b/veejay-server/libvje/effects/opacitythreshold.c @@ -0,0 +1,106 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "opacitythreshold.h" + +vj_effect *opacitythreshold_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->defaults[0] = 180; + ve->defaults[1] = 50; + ve->defaults[2] = 255; + ve->description = "Threshold blur with overlay"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + + + +void opacitythreshold_apply( VJFrame *frame, VJFrame *frame2, + int width, int height, int opacity, + int threshold, int t2) +{ + + unsigned int x, y, len = width * height-width; + uint8_t a1, a2; + unsigned int op0, op1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + for (y = width; y < len; y += width) { + for (x = 1; x < width-1; x++) { + a1 = Y[x + y]; + a2 = Y2[x + y]; + if (a1 < threshold || a1 > t2) { + a1 = (Y[y - width + x - 1] + + Y[y - width + x + 1] + + Y[y - width + x] + + Y[y + x] + + Y[y + x - 1] + + Y[y + x + 1] + + Y[y + width + x] + + Y[y + width + x + 1] + + Y[y + width + x - 1] + ) / 9; + + a2 = (Y2[y - width + x - 1] + + Y2[y - width + x + 1] + + Y2[y - width + x] + + Y2[y + x] + + Y2[y + x - 1] + + Y2[y + x + 1] + + Y2[y + width + x] + + Y2[y + width + x + 1] + + Y2[y + width + x - 1] + ) / 9; + + Y[x + y] = (op0 * a1 + op1 * a2) >> 8; + Cb[x + y] = + (op0 * Cb[x + y] + + op1 * Cb2[x + y]) >> 8; + Cr[x + y] = + (op0 * Cr[x + y] + + op1 * Cr2[x + y]) >> 8; + } + } + } +} +void opacitythreshold_free(){} diff --git a/veejay-server/libvje/effects/opacitythreshold.h b/veejay-server/libvje/effects/opacitythreshold.h new file mode 100644 index 00000000..95829603 --- /dev/null +++ b/veejay-server/libvje/effects/opacitythreshold.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef OPACITYTHRESHOLD_H +#define OPACITYTHRESHOLD_H +#include +#include +#include + +vj_effect *opacitythreshold_init(); +void opacitythreshold_apply( VJFrame *frame, VJFrame *frame2, + int width, int height, int opacity, + int threshold, int t2); +void opacitythreshold_free(); +#endif diff --git a/veejay-server/libvje/effects/overclock.c b/veejay-server/libvje/effects/overclock.c new file mode 100644 index 00000000..b688659a --- /dev/null +++ b/veejay-server/libvje/effects/overclock.c @@ -0,0 +1,154 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "overclock.h" + +vj_effect *overclock_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; + ve->limits[1][0] = (h/8); + ve->limits[0][1] = 1; + ve->limits[1][1] = 90; + ve->defaults[0] = 5; + ve->defaults[1] = 2; + ve->description = "Radial cubics"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static uint8_t *oc_buf[3]; + +//copied from xine +static inline void blur(uint8_t *dst, uint8_t *src, int w, int radius, int dstStep, int srcStep){ + int x; + const int length= radius*2 + 1; + const int inv= ((1<<16) + length/2)/length; + + int sum= 0; + + for(x=0; x>16; + } + + for(; x>16; + } + + for(; x>16; + } +} + +//copied from xine +static inline void blur2(uint8_t *dst, uint8_t *src, int w, int radius, int power, int dstStep, int srcStep){ + uint8_t temp[2][4096]; + uint8_t *a= temp[0], *b=temp[1]; + + if(radius){ + blur(a, src, w, radius, 1, srcStep); + for(; power>2; power--){ + uint8_t *c; + blur(b, a, w, radius, 1, 1); + c=a; a=b; b=c; + } + if(power>1) + blur(dst, a, w, radius, dstStep, 1); + else{ + int i; + for(i=0; idata[0]; + + for ( y = 0 ; y < height ; y ++) + { + blur2( oc_buf[0] + (y*width),Y + (y*width) ,width, radius,1,1,1); + } + + for( y = N ; y < (height-N); y += (1+rand()%N) ) + { + int r = 1 + rand() % N; + for( x = 0; x < width; x+= r ) + { + s = 0; + for(dy = 0; dy < N; dy++ ) + { + for(dx = 0; dx < N; dx ++ ) + { + s += oc_buf[0][(y+dy)*width+x+dx]; + } + } + t = (uint8_t) (s / (N*N)); + for(dy = 0; dy < N; dy++ ) + { + for(dx = 0; dx < N; dx ++ ) + { + i = (y+dy)*width+x+dx; + Y[i] = ( oc_buf[0][i] > Y[i] ? ((Y[i]+t)>>1) : t ); + } + } + } + } +} diff --git a/veejay-server/libvje/effects/overclock.h b/veejay-server/libvje/effects/overclock.h new file mode 100644 index 00000000..892ff307 --- /dev/null +++ b/veejay-server/libvje/effects/overclock.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef OVERCLOCK_H +#define OVERCLOCK_H +#include +#include +#include +vj_effect *overclock_init(int w, int h); +int overclock_malloc(int w, int h ); +void overclock_free(); +void overclock_apply(VJFrame *frame, int width, int height, int val, int r); +#endif diff --git a/veejay-server/libvje/effects/pencilsketch.c b/veejay-server/libvje/effects/pencilsketch.c new file mode 100644 index 00000000..ee329831 --- /dev/null +++ b/veejay-server/libvje/effects/pencilsketch.c @@ -0,0 +1,208 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "pencilsketch.h" +#include "common.h" + +vj_effect *pencilsketch_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults[0] = 0;/* type */ + ve->defaults[1] = pixel_Y_lo_; /* min */ + ve->defaults[2] = pixel_Y_hi_; /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 8; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[1][2] = 255; + ve->limits[0][2] = 0; + + ve->description = "Pencil Sketch (8)"; + ve->extra_frame = 0; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + +/* PenCil sketch pixel Function + applies some artithematic on pixel a and b, + if the resulting pixel is within some range, + it will be made black otherwise white +*/ +typedef uint8_t (*_pcf) (uint8_t a, uint8_t b, int t_max); +typedef uint8_t (*_pcbcr) (uint8_t a, uint8_t b); + + static uint8_t _pcf_dneg(uint8_t a, uint8_t b, int t_max) + { + uint8_t p = + 255 - ( abs ( (255 - abs((255-a)-a)) - (255-abs((255-b)-b))) ); + p = (abs(abs(p-b) - b)); + return p; + } + + static uint8_t _pcf_lghtn(uint8_t a, uint8_t b, int t_max) + { + return (a > b ? a : b ); + } + + static uint8_t _pcf_dneg2(uint8_t a,uint8_t b, int t_max) + { + uint8_t p = ( 255 - abs ( (255-a)- b ) ); + return p; + } + + static uint8_t _pcf_min(uint8_t a, uint8_t b, int t_max) + { + uint8_t p = ( (b < a) ? b : a); + p = ( 255 - abs( (255-p) - b ) ); + return p; + } + + static uint8_t _pcf_max(uint8_t a,uint8_t b, int t_max) + { + int p = ( (b > a) ? b : a); + p = CLAMP_Y(p); + p = ( 255 - ((256 - b) * (256 - b)) / p); + return (uint8_t)p; + } + + static uint8_t _pcf_pq(uint8_t a,uint8_t b, int t_max) + { + a = CLAMP_Y(a); + b = CLAMP_Y(b); + int p = 255 - ((256-a) * (256-a)) / a; + int q = 255 - ((256-b) * (256-b)) / b; + p = ( 255 - ((256-p) * (256 - a)) / q); + return (uint8_t)p; + } + + static uint8_t _pcf_color(uint8_t a, uint8_t b, int t_max) + { + uint8_t p = + 255 - ( abs ( (255 - abs((255-a)-a)) - (255-abs((255-b)-b))) ); + p = (abs(abs(p-b) - b)); + p = p + b - (( p * b ) >> 8); + return p; + } + static uint8_t _pcbcr_color(uint8_t a,uint8_t b) + { + int p = a - 128; + int q = b - 128; + return ( p + q - (( p * q ) >> 8) ) + 128 ; + } + + static uint8_t _pcf_none(uint8_t a, uint8_t b, int t_max) + { + if( a > pixel_Y_lo_ || a <= t_max) a = pixel_Y_lo_ ; else a = pixel_Y_hi_; + return a; + } + + /* get a pointer to a pixel function */ + _pcf _get_pcf(int type) + { + + switch(type) + { + + case 0: return &_pcf_dneg; + case 3: return &_pcf_lghtn; + case 1: return &_pcf_min; + case 2: return &_pcf_max; + case 5: return &_pcf_pq; + case 6: return &_pcf_dneg2; + case 7: return &_pcf_color; + } + + return &_pcf_none; + } + + +void pencilsketch_apply( + VJFrame *frame, + int width, + int height, + int type, + int threshold_min, + int threshold_max + ) +{ + unsigned int i; + int len = frame->len; + int uv_len = frame->uv_len; + int m,d; + uint8_t y,yb; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + + /* get a pointer to a pixel blend function */ + _pcf _pff = _get_pf(type); + _pcbcr _pcbcrff = &_pcbcr_color; + + len = len - width - 1 ; + + for(i=0; i < len; i++) + { + y = Y[i]; + yb = y; + + /* substract user defined mask from image */ + if(y >= threshold_min && y <= threshold_max) + { + /* sharpen the pixels */ + m = (Y[i+1] + Y[i+width] + Y[i+width+1]+2) >> 2; + d = Y[i] - m; + d *= 500; + d /= 100; + m = m + d; + /* a magical forumula to combine the pixel with the original*/ + y = ((((y << 1) - (255 - m))>>1) + Y[i])>>1; + /* apply blend operation on masked pixel */ + Y[i] = _pff(y,yb,threshold_max); + } + else + { + Y[i] = pixel_Y_hi_; + } + } + + /* data in I420 or YV12 */ + + if(type != 7) /* all b/w sketches */ + { + veejay_memset( Cb, 128, uv_len ); + veejay_memset( Cr, 128, uv_len ); + } + else /* all colour sketches */ + { + for(i=0; i < uv_len; i++) + { + Cb[i] = _pcbcrff(128, Cb[i]); + Cr[i] = _pcbcrff(128, Cr[i]); + } + } +} +void pencilsketch_free(){} diff --git a/veejay-server/libvje/effects/pencilsketch.h b/veejay-server/libvje/effects/pencilsketch.h new file mode 100644 index 00000000..6fdbf54b --- /dev/null +++ b/veejay-server/libvje/effects/pencilsketch.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef PENCILSKETCH_EFFECT_H +#define PENCILSKETCH_EFFECT_H +#include +#include +#include + +vj_effect *pencilsketch_init(); +void pencilsketch_apply(VJFrame *frame, int w, int h, int type, int threshold, int opacity); + +void pencilsketch_free(); +#endif diff --git a/veejay-server/libvje/effects/photoplay.c b/veejay-server/libvje/effects/photoplay.c new file mode 100644 index 00000000..5d856e69 --- /dev/null +++ b/veejay-server/libvje/effects/photoplay.c @@ -0,0 +1,230 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +#include +#include +#include "photoplay.h" +#include "common.h" + +vj_effect *photoplay_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; // divider + ve->limits[1][0] = max_power(w); + ve->limits[0][1] = 1; + ve->limits[1][1] = 250; // waterfall + ve->limits[0][2] = 0; + ve->limits[1][2] = 3; // mode + ve->defaults[0] = 2; + ve->defaults[1] = 1; + ve->defaults[2] = 1; + ve->description = "Photoplay (timestretched mosaic)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static picture_t **photo_list = NULL; +static int num_photos = 0; +static int frame_counter = 0; +static int frame_delay = 0; + +static int prepare_filmstrip(int film_length, int w, int h) +{ + int i,j; + int picture_width = w / sqrt(film_length); + int picture_height = h / sqrt(film_length); + + photo_list = (picture_t**) vj_calloc(sizeof(picture_t*) * (film_length + 1) ); + if(!photo_list) + return 0; + + num_photos = film_length; + + uint8_t val = 0; +// int inc = num_photos % 255; + + for ( i = 0; i < num_photos; i ++ ) + { + photo_list[i] = vj_malloc(sizeof(picture_t)); + if(!photo_list[i]) + return 0; + photo_list[i]->w = picture_width; + photo_list[i]->h = picture_height; + for( j = 0; j < 3; j ++ ) + { + photo_list[i]->data[j] = vj_malloc(sizeof(uint8_t) * picture_width * picture_height ); + if(!photo_list[i]->data[j]) + return 0; + veejay_memset(photo_list[i]->data[j], (j==0 ? pixel_Y_lo_ : 128), picture_width *picture_height ); + } + // val+= inc; + } + frame_counter = 0; + + return 1; +} + +static void destroy_filmstrip(void) +{ + if(photo_list) + { + int i = 0; + while(i < num_photos) + { + if( photo_list[i] ) + { + int j; + for( j = 0; j < 3; j ++ ) + if(photo_list[i]->data[j]) + free(photo_list[i]->data[j]); + free(photo_list[i]); + } + i++; + } + free(photo_list); + } + photo_list = NULL; + num_photos = 0; + frame_counter = 0; +} + + + +int photoplay_malloc(int w, int h ) +{ + num_photos = 0; + return 1; +} + + +void photoplay_free(void) +{ + destroy_filmstrip(); +} + +static void take_photo( uint8_t *plane, uint8_t *dst_plane, int w, int h, int index ) +{ + + int x,y,dx,dy; + int sum; + int dst_x, dst_y; + int step_y; + int step_x; + int box_width = photo_list[index]->w; + int box_height = photo_list[index]->h; + + step_x = w / box_width; + step_y = h / box_height; + + for( y = 0 ,dst_y = 0; y < h && dst_y < box_height; y += step_y ) + { + for( x = 0, dst_x = 0; x < w && dst_x < box_width; x+= step_x ) + { + sum = 0; + for( dy = 0; dy < step_y; dy ++ ) + { + for( dx = 0; dx < step_x; dx++) + { + sum += plane[ ((y+dy)*w+(dx+x)) ]; + } + } + // still problem here! + if(sum > 0) + dst_plane[(dst_y*box_width)+dst_x] = sum / (step_y*step_x); + else + dst_plane[(dst_y*box_width)+dst_x] = pixel_Y_lo_; + + dst_x++; + } + dst_y++; + } +} + +static void put_photo( uint8_t *dst_plane, uint8_t *photo, int dst_w, int dst_h, int index , matrix_t matrix) +{ + int box_w = photo_list[index]->w; + int box_h = photo_list[index]->h; + int x,y; + + uint8_t *P = dst_plane + (matrix.h*dst_w); + int offset = matrix.w; + + for( y = 0; y < box_h; y ++ ) + { + for( x = 0; x < box_w; x ++ ) + { + *(P+offset+x) = photo[(y*box_w)+x]; + } + P += dst_w; + } +} + +void photoplay_apply( VJFrame *frame, int width, int height, int size, int delay, int mode ) +{ + unsigned int i; + uint8_t *dstY = frame->data[0]; + uint8_t *dstU = frame->data[1]; + uint8_t *dstV = frame->data[2]; + + matrix_f matrix_placement = get_matrix_func(mode); + + if( (size*size) != num_photos || num_photos == 0 ) + { + destroy_filmstrip(); + if(!prepare_filmstrip(size*size, width,height)) + { + return; + } + frame_delay = 0; + } + + if( frame_delay ) + frame_delay --; + + if( frame_delay == 0) + { + for( i = 0; i < 3; i ++ ) + { + take_photo( frame->data[i], photo_list[(frame_counter%num_photos)]->data[i], width, height , frame_counter % num_photos); + } + frame_delay = delay; + } + + + + for ( i = 0; i < num_photos; i ++ ) + { + matrix_t m = matrix_placement(i, size,width,height ); + put_photo( dstY, photo_list[i]->data[0],width,height,i, m); + put_photo( dstU, photo_list[i]->data[1],width,height,i, m); + put_photo( dstV, photo_list[i]->data[2],width,height,i, m); + } + + + if(frame_delay == delay) + frame_counter ++; +} + diff --git a/veejay-server/libvje/effects/photoplay.h b/veejay-server/libvje/effects/photoplay.h new file mode 100644 index 00000000..52ff0859 --- /dev/null +++ b/veejay-server/libvje/effects/photoplay.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef PHOTOPLAY_H +#define PHOTOPLAY_H +#include +#include +#include + +vj_effect *photoplay_init(int w, int h); +int photoplay_malloc(int w, int h); +void photoplay_free(void); +void photoplay_apply( VJFrame *frame, int width, int height, int size, int behaviour, int mode); +#endif diff --git a/veejay-server/libvje/effects/picinpic.c b/veejay-server/libvje/effects/picinpic.c new file mode 100644 index 00000000..0612c075 --- /dev/null +++ b/veejay-server/libvje/effects/picinpic.c @@ -0,0 +1,192 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2005 Niels Elburg + * + * 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. + */ + +/* + This effect uses libpostproc , it should be enabled at compile time + (--with-swscaler) if you want to use this Effect. + */ +#include +#include +#include "picinpic.h" +#include + +extern void vj_get_yuv444_template(VJFrame *src, int w, int h); +typedef struct +{ + void *scaler; + VJFrame frame; + sws_template template; + void *sampler; + int cached; + int w; + int h; +} pic_t; + +static int nearest_div(int val); + +vj_effect *picinpic_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 64; /* width of view port */ + ve->defaults[1] = 64; /* height of viewport */ + ve->defaults[2] = 64; /* x1 */ + ve->defaults[3] = 64; /* y1 */ + + ve->limits[0][0] = 8; + ve->limits[1][0] = nearest_div(width); + ve->limits[0][1] = 8; + ve->limits[1][1] = nearest_div(height); + ve->limits[0][2] = 8; + ve->limits[1][2] = nearest_div(width); + ve->limits[0][3] = 8; + ve->limits[1][3] = nearest_div(height); + + ve->description = "Picture in picture"; + ve->sub_format = 1; + ve->extra_frame = 1; + + ve->has_user = 1; + ve->user_data = NULL; + return ve; +} + +int picinpic_malloc(void **d, int w, int h) +{ + int i; + pic_t *my; + *d = (void*) vj_calloc(sizeof(pic_t)); + my = (pic_t*) *d; + + my->scaler = NULL; + my->template.flags = 1; + my->w = 0; + my->h = 0; + + return 1; +} + +static int nearest_div(int val ) +{ + int r = val % 8; + while(r--) + val--; + return val; +} + +void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, int width, int height, + int twidth, int theight, int x1, int y1 ) +{ + int x, y; + uint8_t *dY = frame->data[0]; + uint8_t *dCb = frame->data[1]; + uint8_t *dCr = frame->data[2]; + uint8_t *sY = frame2->data[0]; + uint8_t *sCb = frame2->data[1]; + uint8_t *sCr = frame2->data[2]; + pic_t *picture = (pic_t*) user_data; + int view_width = nearest_div(twidth); + int view_height = nearest_div(theight); + int dy = nearest_div(y1); + int dx = nearest_div(x1); + + //@ round view_width to nearest multiple of 2,4,8 + + + if ( (dx + view_width ) > width ) + view_width = width - dx; + if ( (dy + view_height ) > height ) + view_height = height - dy; + + if(view_width < 8 || view_height < 1 ) + return; // nothing to do + + /* pic in pic, using 444p */ + VJFrame scale_src; + vj_get_yuv444_template( &(scale_src), width,height ); + + scale_src.data[0] = frame2->data[0]; + scale_src.data[1] = frame2->data[1]; + scale_src.data[2] = frame2->data[2]; + + /* Setup preview scaler */ + if( picture->w != view_width || picture->h != view_height || picture->w == 0 || picture->h == 0) + { + int len = (view_width * view_height); + + if(picture->scaler) + yuv_free_swscaler( picture->scaler ); + if(picture->frame.data[0]) + free( picture->frame.data[0] ); + if(picture->frame.data[1]) + free( picture->frame.data[1] ); + if(picture->frame.data[2]) + free( picture->frame.data[2] ); + /* Allocate in picture */ + vj_get_yuv444_template( &(picture->frame), view_width,view_height ); + + picture->scaler = yuv_init_swscaler( + &(scale_src), + &(picture->frame), + &(picture->template), + yuv_sws_get_cpu_flags() + ); + picture->frame.data[0] = (uint8_t*) vj_calloc(sizeof(uint8_t) * len ); + picture->frame.data[1] = (uint8_t*) vj_malloc(sizeof(uint8_t) * len ); + picture->frame.data[2] = (uint8_t*) vj_malloc(sizeof(uint8_t) * len ); + veejay_memset( picture->frame.data[1],128, len ); + veejay_memset( picture->frame.data[2],128, len ); + picture->w = view_width; + picture->h = view_height; + + } + + yuv_convert_and_scale( picture->scaler, scale_src.data, picture->frame.data ); + + /* Copy the scaled image to output */ + for( y = 0 ; y < picture->h-1; y ++ ) + { + for( x = 0 ; x < picture->w-1; x ++ ) + { + dY[ (dy + y ) * width + dx + x ] = + picture->frame.data[0][ y * picture->w + x]; + dCb[(dy + y ) * width + dx + x ] = + picture->frame.data[1][ y * picture->w + x]; + dCr[ (dy + y ) * width + dx + x ] = + picture->frame.data[2][ y * picture->w + x]; + } + } + +} + +void picinpic_free(void *d) +{ + if(d) + { + pic_t *my = (pic_t*) d; + if(my->scaler) + yuv_free_swscaler( my->scaler ); + free( my ); + } + d=NULL; +} diff --git a/veejay-server/libvje/effects/picinpic.h b/veejay-server/libvje/effects/picinpic.h new file mode 100644 index 00000000..7ab59af0 --- /dev/null +++ b/veejay-server/libvje/effects/picinpic.h @@ -0,0 +1,37 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2005 Niels Elburg + * + * 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. + */ + +#ifndef PICINPIC_H +#define PICINPIC_H + +#include +#include +#include +vj_effect *picinpic_init( int w, int h ); + +void picinpic_free(void *d); + +int picinpic_malloc( void **c, int w , int h ); + + +void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, + int w, int h, int twidth, int theight, int x1, int y1 ); + +#endif diff --git a/veejay-server/libvje/effects/pixelate.c b/veejay-server/libvje/effects/pixelate.c new file mode 100644 index 00000000..9cb8a608 --- /dev/null +++ b/veejay-server/libvje/effects/pixelate.c @@ -0,0 +1,83 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "pixelate.h" + +static uint8_t values[512]; + +vj_effect *pixelate_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + int i; + int nvalues=0; + for(i=1; i < width; i++) + { + if( (width%i)== 0) + { + values[nvalues] = i; + nvalues++; + } + } + + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = nvalues-2; + ve->defaults[0] = 8; + ve->description = "Pixelate"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user =0; + + return ve; +} + +void pixelate_apply( VJFrame *frame, int w, int h , int vv ) +{ + unsigned int i,j ; + unsigned int len = frame->len; + const unsigned int v = values[vv]; + const unsigned int uv_len = frame->uv_len; + const unsigned int u_v = v >> frame->shift_h; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + for (i = 0; i < len; i+=v) { + for(j=0; j < v; j++) + { + Y[i+j] = Y[i]; + } + } + + for (i = 0; i < uv_len; i+=u_v) { + for(j=0; j < u_v; j++) + { + Cb[i+j] = Cb[i]; + Cr[i+j] = Cr[i]; + } + } +} + diff --git a/veejay-server/libvje/effects/pixelate.h b/veejay-server/libvje/effects/pixelate.h new file mode 100644 index 00000000..0c2de417 --- /dev/null +++ b/veejay-server/libvje/effects/pixelate.h @@ -0,0 +1,29 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef PIXELATE_H +#define PIXELATE_H +#include +#include +#include + +vj_effect *pixelate_init(int w, int h); +void pixelate_apply( VJFrame *frame, int width, int height, int val); +#endif diff --git a/veejay-server/libvje/effects/posterize.c b/veejay-server/libvje/effects/posterize.c new file mode 100644 index 00000000..80b6be72 --- /dev/null +++ b/veejay-server/libvje/effects/posterize.c @@ -0,0 +1,77 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "posterize.h" +vj_effect *posterize_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 4; + ve->defaults[1] = 16; + ve->defaults[2] = 235; + + ve->limits[0][0] = 1; + ve->limits[1][0] = 256; + ve->limits[0][1] = 0; + ve->limits[1][1] = 256; + ve->limits[0][2] = 0; + ve->limits[1][2] = 256; + + ve->description = "Posterize (Threshold Range)"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + + + +static void _posterize_y_simple(uint8_t *src[3], int len, int value, int threshold_min,int threshold_max) +{ + int i; + uint8_t Y; + uint8_t *y = src[0]; + const unsigned int factor = (256 / value); + for( i = 0; i < len ; i++ ) + { + Y = y[i]; + Y = Y - ( Y % factor ); + + if( Y >= threshold_min && Y <= threshold_max) + { + y[i] = Y; + + } + else + { + if( Y < threshold_min) Y = 16; else Y = 235; + } + } +} + +void posterize_apply(VJFrame *frame, int width, int height, int factor, int t1,int t2) +{ + _posterize_y_simple( frame->data, (width*height), factor, t1,t2); +} +void posterize_free(){} diff --git a/veejay-server/libvje/effects/posterize.h b/veejay-server/libvje/effects/posterize.h new file mode 100644 index 00000000..1b13ad0f --- /dev/null +++ b/veejay-server/libvje/effects/posterize.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef POSTERIZE_H +#define POSTERIZE_H +#include +#include +#include + +vj_effect *posterize_init(); +void posterize_apply(VJFrame *frame, int width, int height, int factor,int t1,int t2); +void posterize_free(); +#endif diff --git a/veejay-server/libvje/effects/radcor.c b/veejay-server/libvje/effects/radcor.c new file mode 100644 index 00000000..52b8fa99 --- /dev/null +++ b/veejay-server/libvje/effects/radcor.c @@ -0,0 +1,173 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + */ + +/* Radial Distortion Correction + * http://local.wasp.uwa.edu.au/~pbourke/projection/lenscorrection/ + * + */ +#include +#include +#include +#include "radcor.h" + +vj_effect *radcor_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = 1000; + ve->limits[0][1] = 1; + ve->limits[1][1] = 1000; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + ve->defaults[0] = 10; + ve->defaults[1] = 40; + ve->defaults[2] = 0; + ve->description = "Lens correction"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static uint8_t *badbuf = NULL; +static uint32_t *Map = NULL; +static int map_upd[3] = {0,0,0}; + +int radcor_malloc( int width, int height ) +{ + badbuf = (uint8_t*) vj_malloc( width * height * 3 * sizeof(uint8_t)); + if(!badbuf) + return 0; + Map = (uint32_t*) vj_malloc( width * height * sizeof(uint32_t)); + if(!Map) + return 0; + return 1; +} + +void radcor_free() +{ + free(badbuf); + free(Map); + badbuf = NULL; + Map = NULL; +} + +typedef struct +{ + uint32_t y; + uint32_t v; + uint32_t u; +} pixel_t; + + +void radcor_apply( VJFrame *frame, int width, int height, int alpaX, int alpaY, int dir) +{ + int i,j; + int len = (width * height); + int i2,j2,ii,jj,aacount; + double x,y,x2,x3,y2,y3,r; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + pixel_t csum,c; + int aa = 1; + int nx = width; + int ny = height; + int nxout = nx; + int nyout = ny; + + //@ copy source image to internal buffer + veejay_memcpy( badbuf, Y, width * height ); + veejay_memcpy( badbuf + len, Cb, len ); + veejay_memcpy( badbuf + len + len, Cr, len ); + + uint8_t *Yi = badbuf; + uint8_t *Cbi = badbuf + len; + uint8_t *Cri = badbuf + len + len; + + double alphax = alpaX / (double) 1000.0; + double alphay = alpaY / (double) 1000.0; + + if(!dir) + { + alphax *= -1.0; // inward, outward, change sign + alphay *= -1.0; + } + + veejay_memset( Y, 0, len ); + veejay_memset( Cb, 128, len ); + veejay_memset( Cr, 128, len ); + + int update_map = 0; + + if( map_upd[0] != alpaX || map_upd[1] != alpaY || map_upd[2] != dir ) + { + map_upd[0] = alpaX; + map_upd[1] = alpaY; + map_upd[2] = dir; + update_map = 1; + } + + if( update_map ) + { + for( i = 0; i < nyout; i ++ ) + { + for( j = 0; j < nxout; j ++ ) + { + x = ( 2 * j - nxout ) / (double) nxout; + y = ( 2 * i - nyout ) / (double) nyout; + + r = x*x + y*y; + x3 = x / (1 - alphax * r); + y3 = y / (1 - alphay * r); + x2 = x / (1 - alphax * (x3*x3+y3*y3)); + y2 = y / (1 - alphay * (x3*x3+y3*y3)); + i2 = (y2 + 1) * ny / 2; + j2 = (x2 + 1) * nx / 2; + + if( i2 >= 0 && i2 < ny && j2 >= 0 && j2 < nx ) + Map[ i * nxout + j ] = i2 * nx + j2; + else + Map[ i * nxout + j ] = 0; + + } + } + + } + + + // process + + for( i = 0; i < height; i ++ ) + { + for( j = 0; j < width ; j ++ ) + { + Y[ i * width + j ] = Yi[ Map[i * width + j] ]; + Cb[ i * width + j ] = Cbi[ Map[i * width + j] ]; + Cr[ i * width + j ] = Cri[ Map[i * width + j] ]; + } + } + +} diff --git a/veejay-server/libvje/effects/radcor.h b/veejay-server/libvje/effects/radcor.h new file mode 100644 index 00000000..3e2f4cb7 --- /dev/null +++ b/veejay-server/libvje/effects/radcor.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef LENSCOR_H +#define LENSCOR_H +#include +#include +#include + +vj_effect *radcor_init(int w, int h); +int radcor_malloc(int w, int h); +void radcor_free(); +void radcor_apply( VJFrame *frame, int width, int height, int a, int b, int c); +#endif diff --git a/veejay-server/libvje/effects/radialblur.c b/veejay-server/libvje/effects/radialblur.c new file mode 100644 index 00000000..8a21a806 --- /dev/null +++ b/veejay-server/libvje/effects/radialblur.c @@ -0,0 +1,151 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +/* + * Copyright (C) 2000-2004 the xine project + * + * This file is part of xine, a free video player. + * + * xine 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. + * + * xine 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 + * + * $Id: radialblur.c,v 1.1.1.1 2004/10/27 23:49:01 niels Exp $ + * + * mplayer's boxblur + * Copyright (C) 2002 Michael Niedermayer + */ +#include +#include +#include "radialblur.h" +#include "common.h" +//FIXME: private +static uint8_t *radial_src[3]; + +vj_effect *radialblur_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 15; + ve->defaults[1] = 0; + ve->defaults[2] = 2; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 90; // radius + ve->limits[0][1] = 0; // power + ve->limits[1][1] = 100; + ve->limits[0][2] = 0; // direction + ve->limits[1][2] = 2; // 2 = both + ve->description = "Radial Blur"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +int radialblur_malloc(int w, int h) +{ + radial_src[0] = (uint8_t*) vj_yuvalloc(w,h); + if(!radial_src[0]) return 0; + radial_src[1] = radial_src[0] + (w * h); + radial_src[2] = radial_src[1] + (w * h); + return 1; +} + + +static void rhblur_apply( uint8_t *dst , uint8_t *src, int w, int h, int r , int p) +{ + int y; + for(y = 0; y < h ; y ++ ) + { + blur2( dst + y * w, src + y *w , w, r,p, 1, 1); + } + +} +static void rvblur_apply( uint8_t *dst, uint8_t *src, int w, int h, int r , int p) +{ + int x; + for(x=0; x < w; x++) + { + blur2( dst + x, src + x , h, r, p, w, w ); + } +} + + +void radialblur_apply(VJFrame *frame, int width, int height, int radius, int power, int direction) +{ + const int len = frame->len; + const int uv_len = frame->uv_len; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + if(radius == 0) return; + // inplace + + veejay_memcpy( radial_src[0] , Y, len); + veejay_memcpy( radial_src[1] , Cb, uv_len); + veejay_memcpy( radial_src[2] , Cr, uv_len); + + switch(direction) + { + case 0: rhblur_apply( Y, radial_src[0],width, height, radius, power ); + rhblur_apply( Cb, radial_src[1],frame->uv_width, frame->uv_height, radius, power ); + rhblur_apply( Cr, radial_src[2],frame->uv_width, frame->uv_height, radius, power ); + break; + case 1: rvblur_apply( Y, radial_src[0],width, height, radius, power ); + rvblur_apply( Cb, radial_src[1],frame->uv_width, frame->uv_height, radius, power ); + rvblur_apply( Cr, radial_src[2],frame->uv_width, frame->uv_height, radius, power ); + break; + case 2: + rhblur_apply( Y, radial_src[0],width, height, radius, power ); + rhblur_apply( Cb, radial_src[1],frame->uv_width, frame->uv_height, radius, power ); + rhblur_apply( Cr, radial_src[2],frame->uv_width, frame->uv_height, radius, power ); + rvblur_apply( Y, radial_src[0],width, height, radius, power ); + rvblur_apply( Cb, radial_src[1],frame->uv_width, frame->uv_height, radius, power ); + rvblur_apply( Cr, radial_src[2],frame->uv_width, frame->uv_height, radius, power ); + break; + + } + +} + + +void radialblur_free() +{ + if( radial_src[0] ) + free(radial_src[0]); + radial_src[0] = NULL; + radial_src[1] = NULL; + radial_src[2] = NULL; +} diff --git a/veejay-server/libvje/effects/radialblur.h b/veejay-server/libvje/effects/radialblur.h new file mode 100644 index 00000000..f09e4d7f --- /dev/null +++ b/veejay-server/libvje/effects/radialblur.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef RADIALBLUR_H +#define RADIALBLUR_H +#include +#include +#include + +vj_effect *radialblur_init(int w, int h); +int radialblur_malloc(int w, int h); +void radialblur_apply(VJFrame *frame, int width, int height, int r, + int p, int n); +void radialblur_free(); +#endif diff --git a/veejay-server/libvje/effects/radioactive.c b/veejay-server/libvje/effects/radioactive.c new file mode 100644 index 00000000..b32070b5 --- /dev/null +++ b/veejay-server/libvje/effects/radioactive.c @@ -0,0 +1,377 @@ +/* + * EffecTV - Realtime Digital Video Effector + * RadioacTV - motion-enlightment effect. + * I referred to "DUNE!" by QuoVadis for this effect. + * Copyright (C) 2001-2006 FUKUCHI Kentaro + * + * Veejay FX 'RadioActiveVJ' + * (C) 2007 Niels Elburg + * This effect was ported from EffecTV. + * Differences: + * - difference frame over 2 frame interval intsead of bg substraction + * - several mask methods + * - more parameters + * - no palette (but mixing source) + * + * 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. + */ +#include +#include +#include +#include "radioactive.h" +#include "softblur.h" +#include +#include AVUTIL_INC +#include "common.h" +#include + +vj_effect *radioactivetv_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; /* methods */ + ve->limits[1][0] = 6; + ve->limits[0][1] = 50;// zoom ratio + ve->limits[1][1] = 100; + ve->limits[0][2] = 0; // strength + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; //diff threhsold + ve->limits[1][3] = 255; + ve->defaults[0] = 0; + ve->defaults[1] = 95; + ve->defaults[2] = 200; + ve->defaults[3] = 30; + ve->description = "RadioActive EffecTV"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} +#define RUP8(num)(((num)+8)&~8) + + +static uint8_t *diffbuf = NULL; +static uint8_t *blurzoombuf = NULL; +static int *blurzoomx = NULL; +static int *blurzoomy = NULL; +static int buf_width_blocks = 0; +static int buf_width = 0; +static int buf_height = 0; +static int buf_area = 0; +static int buf_margin_left = 0; +static int buf_margin_right = 0; +static void *convert_rgb = NULL; +static int first_frame=0; +static int last_mode=0; +static float ratio_ = 0.95; + +#define VIDEO_HWIDTH (buf_width/2) +#define VIDEO_HHEIGHT (buf_height/2) + + +/* this table assumes that video_width is times of 32 */ +static void setTable(void) +{ + unsigned int bits; + int x, y, tx, ty, xx; + int ptr, prevptr; + + prevptr = (int)(0.5+ratio_*(-VIDEO_HWIDTH)+VIDEO_HWIDTH); + for(xx=0; xx<(buf_width_blocks); xx++){ + bits = 0; + for(x=0; x<32; x++){ + ptr= (int)(0.5+ratio_*(xx*32+x-VIDEO_HWIDTH)+VIDEO_HWIDTH); + bits = bits>>1; + if(ptr != prevptr) + bits |= 0x80000000; + prevptr = ptr; + } + blurzoomx[xx] = bits; + } + + ty = (int)(0.5+ratio_*(-VIDEO_HHEIGHT)+VIDEO_HHEIGHT); + tx = (int)(0.5+ratio_*(-VIDEO_HWIDTH)+VIDEO_HWIDTH); + xx=(int)(0.5+ratio_*(buf_width-1-VIDEO_HWIDTH)+VIDEO_HWIDTH); + blurzoomy[0] = ty * buf_width + tx; + prevptr = ty * buf_width + xx; + for(y=1; y0; y--) { + for(x=width-2; x>0; x--) { + v = (*(p-width) + *(p-1) + *(p+1) + *(p+width))/4 - 1; + if(v == 255) v = 0; + *q = v; + p++; + q++; + } + p += 2; + q += 2; + } +} +static void zoom(void) +{ + int b, x, y; + unsigned char *p, *q; + int blocks, height; + int dx; + + p = blurzoombuf + buf_area; + q = blurzoombuf; + height = buf_height; + blocks = buf_width_blocks; + + for(y=0; y>1; + } + } + } +} +void blurzoomcore(void) +{ + kentaro_blur(); + zoom(); +} + +int radioactivetv_malloc(int w, int h) +{ + buf_width_blocks = (w / 32 ); + if( buf_width_blocks > 255 ) + { + return 0; + } + buf_width = buf_width_blocks * 32; + buf_height = h; + + buf_area = buf_width * buf_height; + buf_margin_left = (w - buf_width ) >> 1; + buf_margin_right = (w - buf_width - buf_margin_left); + + blurzoombuf = (uint8_t*) vj_calloc( RUP8(buf_area * 2 )); + if(!blurzoombuf) + return 0; + + blurzoomx = (int*) vj_calloc( RUP8(buf_width * sizeof(int))); + blurzoomy = (int*) vj_calloc( RUP8(buf_width * sizeof(int))); + + if( blurzoomx == NULL || blurzoomy == NULL ) + { + if(blurzoombuf) free(blurzoombuf); + return 0; + } + + diffbuf = (uint8_t*) vj_malloc( RUP8((4*w) + 2 * w * h * sizeof(uint8_t))); + + setTable(); + + first_frame = 0; + last_mode = 0; + ratio_ = 0.95; + return 1; +} + +void radioactivetv_free() +{ + if(blurzoombuf) + free(blurzoombuf); + blurzoombuf = NULL; + if(blurzoomx ) free(blurzoomx); + blurzoomx = NULL; + if(blurzoomy ) free(blurzoomy); + blurzoomy = NULL; + + if(diffbuf) free(diffbuf); + diffbuf = NULL; + +} +void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int width, int height, + int mode, int snapRatio, int snapInterval, int threshold) +{ + unsigned int x, y; + uint8_t *diff = diffbuf; + uint8_t *prev = diff + frame->len; + const int len = frame->len; + uint8_t *lum = frame->data[0]; + uint8_t *dstY = lum; + uint8_t *dstU = frame->data[1]; + uint8_t *dstV = frame->data[2]; + uint8_t *p, *src = lum; + uint8_t *blueY = blue->data[0]; + uint8_t *blueU = blue->data[1]; + uint8_t *blueV = blue->data[2]; + float new_ratio = ratio_; + VJFrame smooth; + veejay_memcpy( &smooth, frame, sizeof(VJFrame)); + smooth.data[0] = prev; + + //@ set new zoom ratio + new_ratio = (snapRatio * 0.01); + if ( ratio_ != new_ratio ) + { + ratio_ = new_ratio; + setTable(); + } + + if( !first_frame ) + { //@ take current + veejay_memcpy( prev, lum , len ); + softblur_apply( &smooth, width,height,0); + first_frame++; + return; + } + if( last_mode != mode ) + { +//@ mode changed, reset + veejay_memset( blurzoombuf, 0, 2*len); + veejay_memset( diff, 0, len ); + last_mode = mode; + } + + uint8_t *d = diff; + +//@ varying diff methods (strobe, normal, average, etc) + switch( mode ) + { + case 0: + for( y = 0; y < len; y ++ ){ + diff[y] = abs(lum[y] - prev[y]); + if(diff[y] < threshold ) + diff[y] = 0; + prev[y] = (prev[y] + lum[y])>>1; + } + break; + case 1: + for( y = 0; y < len; y ++ ) { + diff[y] = abs(lum[y] - prev[y]); + if(diff[y] < threshold ) + diff[y] = 0; + prev[y] = lum[y]; + } + break; + case 2: + for( y = 0; y < len; y ++ ){ + diff[y] = ( prev[y] >> 1 ) + lum[y] >> 1; + if( diff[y] < threshold ) + diff[y] = 0; + prev[y] = lum[y]; + } + break; + case 3: + for( y = 0; y < len; y ++ ) { + diff[y] = abs( lum[y] - prev[y] ); + diff[y] = (prev[y] + lum[y] + lum[y] + lum[y])>>2; + if( diff[y] < threshold ) + diff[y] = 0; + prev[y] = diff[y]; + } + break; + case 4: + for( y = 0; y < len; y ++ ) { + diff[y] = abs( lum[y] - prev[y] ); + diff[y] = (lum[y] - prev[y])>>1; + if( diff[y] < threshold ) + { + if(diff[y]) diff[y]--; + } + prev[y] = lum[y]; + } + break; + case 5: + for( y = 0; y < len; y ++ ) { + diff[y] = abs(lum[y] - prev[y]); + if(diff[y] < threshold ) + diff[y] = 0; + prev[y] = lum[y]; + } + break; + case 6: + for( y = 0; y < len; y ++ ){ + if( abs( lum[y] - prev[y]) > threshold ) + diff[y] = lum[y]>>2; + else + diff[y] = 0; + prev[y] = lum[y]; + } + + break; + } +//@ end of diff + + + p = blurzoombuf; + d += buf_margin_left; + for( y = 0; y < buf_height; y++ ) { + for( x = 0; x< buf_width; x ++ ) { + p[x] |= ( (d[x] * snapInterval)>>7); + } + d += width; + p += buf_width; + } + //@ prepare frame for next difference take + softblur_apply( &smooth, width,height,0); + + blurzoomcore(); + p = blurzoombuf; + + if(mode >= 3 ) + { + veejay_memset( dstU,128,len); + veejay_memset( dstV,128,len); + veejay_memcpy( dstY, blurzoombuf, len ); + return; + } + + + uint32_t k =0; + for( y = 0; y < height; y ++ ) + { + k += buf_margin_left; + for( x = 0; x < buf_width; x ++ ) + { + uint8_t op0 = (*p ++); + uint8_t op1 = 0xff - op0; + + dstY[k] = (op0 * blueY[k] + op1 * dstY[k])>>8; + dstU[k] = (op0 * blueU[k] + op1 * dstU[k])>>8; + dstV[k] = (op0 * blueV[k] + op1 * dstV[k])>>8; + + k ++; + } + k += buf_margin_right; + } +} diff --git a/veejay-server/libvje/effects/radioactive.h b/veejay-server/libvje/effects/radioactive.h new file mode 100644 index 00000000..0538b8c2 --- /dev/null +++ b/veejay-server/libvje/effects/radioactive.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2007 Niels Elburg + * + * 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. + */ + +#ifndef RADIOACTIVE_TVH +#define RADIOACTIVE_TVH +#include +#include +#include + +vj_effect *radioactivetv_init(int w, int h); +void radioactivetv_apply( VJFrame *frame, VJFrame *blue,int width, int height, int bla,int stride, int mode, int thres); +int radioactivetv_malloc(int w, int h ); +void radioactivetv_free(); +#endif diff --git a/veejay-server/libvje/effects/raster.c b/veejay-server/libvje/effects/raster.c new file mode 100644 index 00000000..8c8add10 --- /dev/null +++ b/veejay-server/libvje/effects/raster.c @@ -0,0 +1,163 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "raster.h" +#include "common.h" +#include + +vj_effect *raster_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 4; + ve->limits[1][0] = h/4; + ve->defaults[0] = 4; + ve->description = "Grid"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void raster_apply(VJFrame *frame, int w, int h, int v ) +{ + int x,y; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + for(y=0; y < h; y++) + { + for(x=0; x < w; x++) + { + Y[y*w+x] = ((x%v>1)? ((y%v>1) ? Y[y*w+x]: 235):235); + } + } + w= frame->uv_width; + h= frame->uv_height; + + for(y=0; y < h; y++) + { + for(x=0; x < w; x++) + { + Cb[y*w+x] = ((x%v>1)? ((y%v>1) ? Cb[y*w+x]:128):128); + Cr[y*w+x] = ((x%v>1)? ((y%v>1) ? Cr[y*w+x]:128):128); + } + } +/* + int x,y; + int px,py; + int i,j; + double r,a; + unsigned int R = h/2; + double curve; //curve + double coeef; + int w2 = w/2; + int h2 = h/2; + int n1=0,n2=0,n3=0; + int k,l,m,o1=0,o2=0; + + double (*pf)(double a, double b, double c); + + if( v==0) v =1; + if( v < 0 ) { + pf = &__fisheye_i; + v = v * -1; + } + else { + pf = &__fisheye; + } + + curve = 0.001 * v; //curve + coeef = R / log(curve * R + 1); + + if(!buf) + { + buf = (uint8_t*)vj_calloc(sizeof(uint8_t) * w * h ); + if(!buf)return; + } + memcpy(buf, Y,(w*h)); + + for(y= (-1*h2); y < (h-h2); y++) +// for(y=0; y < h; y++) + //for(y=0; y < h; y++) + { + for(x = (-1*w2); x < (w-w2); x++) + // for(x=0 ;x < w; x++) + { + //if(x > 0 && y > 0) + // + if(x==0 && y==0) r = 0; + else r = sqrt( y*y+x*x); + if(x==0 && y==0) + a= 1; + else + a = atan2( (float)y,x); + + //if(x > 0 && y < 0) a += 240; + + //if(x < 0 && y > 0) a+= 180; + + //if(x < 0 && y < 0) a+= 180; + + i = (y+h2)*w+(w2+x); + if( r <= R) + { + //r = coeef * log(1 + curve * r); + r = pf( r, coeef, curve); + //px en py ook zonder + + px = (int) ( r * cos(a) ); + py = (int) ( r * sin(a) ); + px += w2; + py += h2; + if(px < 0) px =0; + if(px > w) px = w; + if(py < 0) py = 0; + if(py > (h-1)) py = h-1; + j = px + py * w; + //k = py * w + (w - px); + Y[i] = buf[j]; + } + else + { + Y[i] = 16; + } + + + + } + + } + + + printf(" n1 = %d n2 = %d n3 = %d \n",n1,n2,n3); + + + memset(Cb,128,(w*h)/4); + memset(Cr,128,(w*h)/4); + */ + +} diff --git a/veejay-server/libvje/effects/raster.h b/veejay-server/libvje/effects/raster.h new file mode 100644 index 00000000..648f98fc --- /dev/null +++ b/veejay-server/libvje/effects/raster.h @@ -0,0 +1,29 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef RASTER_H +#define RASTER_H +#include +#include +#include + +vj_effect *raster_init(int w, int h); +void raster_apply( VJFrame *frame, int width, int height, int val); +#endif diff --git a/veejay-server/libvje/effects/rawman.c b/veejay-server/libvje/effects/rawman.c new file mode 100644 index 00000000..13085400 --- /dev/null +++ b/veejay-server/libvje/effects/rawman.c @@ -0,0 +1,101 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "rawman.h" +#include +vj_effect *rawman_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 0; + ve->defaults[1] = 15; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 4; + ve->limits[0][1] = 1; + ve->limits[1][1] = 255; + ve->sub_format = 0; + ve->description = "Raw Data Manipulation"; + ve->has_user = 0; + ve->extra_frame = 0; + return ve; +} + +void rawman_apply(VJFrame *frame, unsigned int width, + unsigned int height, unsigned int mode, unsigned int YY) +{ + unsigned int len = width * height; + unsigned int i; + uint8_t *Y = frame->data[0]; + + /* playing with data. experimentation gives the greatest results. + maybe these routine don't seem usefull, but combine them with + other effects. + */ + switch (mode) { + + case 1: /* 1 in reverse, if Y == 0 this darkens the image */ + for (i = 0; i < len; i++) { + if ((Y[i] < YY)) { + Y[i] *= 2; + } else { + Y[i] /= 2; + } + } + break; + case 2: + + for (i = 0; i < len; i++) { + Y[i] -= YY; + } + break; + case 3: /* divide action */ + for (i = 0; i < len; i++) { + if ((Y[i] < YY)) { + Y[i] /= 2; + } else { + /* divide by 2 */ + Y[i] *= 2; + } + } + break; + case 4: /* addition */ + for (i = 0; i < len; i++) { + if ((Y[i] < YY)) { + Y[i] += YY; + } else { + Y[i] -= YY; + } + } + break; + default: + /* brightness */ + for (i = 0; i < len; i++) { + Y[i] += YY; + } + break; + + } +} +void rawman_free(){} diff --git a/veejay-server/libvje/effects/rawman.h b/veejay-server/libvje/effects/rawman.h new file mode 100644 index 00000000..35d64ed2 --- /dev/null +++ b/veejay-server/libvje/effects/rawman.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef RAWMAN_H +#define RAWMAN_H +#include +#include +#include + +vj_effect *rawman_init(); + +void rawman_apply(VJFrame *frame, unsigned int width, + unsigned int height, unsigned int mode, unsigned int Y); +void rawman_free(); +#endif diff --git a/veejay-server/libvje/effects/rawval.c b/veejay-server/libvje/effects/rawval.c new file mode 100644 index 00000000..58653504 --- /dev/null +++ b/veejay-server/libvje/effects/rawval.c @@ -0,0 +1,71 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "rawval.h" +#include +#include +vj_effect *rawval_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 232; + ve->defaults[1] = 16; + ve->defaults[2] = 16; + ve->defaults[3] = 16; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->sub_format = 0; + ve->description = "Raw Chroma Pixel Replacement"; + ve->has_user = 0; + ve->extra_frame = 0; + return ve; +} + + + +void rawval_apply( VJFrame *frame, int width, int height, + const int color_cb, const int color_cr, + const int new_color_cb, const int new_color_cr) +{ + unsigned int i; + const int uv_len = frame->uv_len; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + for (i = 0; i < uv_len; i++) { + if (Cb[i] >= new_color_cb) + Cb[i] = color_cb; + if (Cr[i] >= new_color_cr) + Cr[i] = color_cr; + } +} +void rawval_free(){} diff --git a/veejay-server/libvje/effects/rawval.h b/veejay-server/libvje/effects/rawval.h new file mode 100644 index 00000000..274ca11a --- /dev/null +++ b/veejay-server/libvje/effects/rawval.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef RAWVAL_H +#define RAWVAL_H +#include +#include +#include + +vj_effect *rawval_init(); +void rawval_apply( VJFrame *frame, int width, int height, int a, int b, + int na, int nb); +void rawval_free(); +#endif diff --git a/veejay-server/libvje/effects/reflection.c b/veejay-server/libvje/effects/reflection.c new file mode 100644 index 00000000..ccd41f0c --- /dev/null +++ b/veejay-server/libvje/effects/reflection.c @@ -0,0 +1,206 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +/* Copyright (C) 2002 W.P. van Paassen - peter@paassen.tmfweb.nl + + 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; see the file COPYING. If not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* This effect was inspired by an article by Sqrt(-1) */ +/* 08-22-02 Optimized by WP */ +/* note that the code has not been fully optimized */ + +/* orignal code for RGB, define INTENSITY( r + b + g / 3 ), + this effect works in YCbCr space now. */ + +#include +#include +#include "reflection.h" +#include + +static short reflect_aSin[2048]; +static int reflection_map[2048][256]; +static int sin_index = 0; +static int sin_index2 = 20; +static uint8_t *reflection_buffer; + +vj_effect *reflection_init(int width,int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 2; + ve->defaults[1] = 5; + ve->defaults[2] = 1; + ve->limits[0][0] = 1; + ve->limits[1][0] = 256; + ve->limits[0][1] = 1; + ve->limits[1][1] = 256; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + ve->description = "Bump 2D"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} +// FIXME private +int reflection_malloc(int width, int height) +{ + int i, x, y; + float rad; + + for (i = 0; i < width; i++) { + rad = (float) i * 0.0174532 * 0.703125; + reflect_aSin[i] = (short) ((sin(rad) * 100.0) + 256.0); + } + for (x = 0; x < width; ++x) { + for (y = 0; y < 256; ++y) { + float xx = (x - 128) / 128.0; + float yy = (y - 128) / 128.0; + float zz = 1.0 - sqrt(xx * xx + yy * yy); + zz *= 255.0; + if (zz < 0.0) + zz = 0.0; + reflection_map[x][y] = (int) zz; + } + } + reflection_buffer = (uint8_t *) vj_malloc(sizeof(uint8_t) * width + 1); /* fixme */ + if(!reflection_buffer) return 0; + + return 1; + + +} + + + +void reflection_free() { + if(reflection_buffer) free(reflection_buffer); + reflection_buffer = NULL; +} + + +void reflection_apply(VJFrame *frame, int width, int height, int index1, + int index2, int move) +{ + unsigned int normalx, normaly, x, y; + unsigned int lightx, lighty, temp; + int uv_height = frame->uv_height; + int uv_width = frame->uv_width; + uint8_t *row = frame->data[0] + width + 1; + uint8_t *cbrow = frame->data[1] + uv_width + 1; + uint8_t *crrow = frame->data[2] + uv_width + 1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + lightx = reflect_aSin[sin_index]; + lighty = reflect_aSin[sin_index2]; + + + if (!move) { + sin_index = index1; + sin_index2 = index2; + } else { + sin_index += index1; + sin_index2 += index2; + } + sin_index &= 511; + sin_index2 &= 511; + + for (x = 0; x < width; x++) { + reflection_buffer[x]= Y[x]; + } + + + for (y = 1; y < height - 1; y++) { + uint8_t p; + temp = lighty - y; + p = Y[x + (y * width)]; + + for (x = 0; x < width; x++) { + int i1 = (int) p; + int i2 = Y[x + 1 + (y * width)]; /* deviate */ + int i3 = (int) reflection_buffer[x]; + normalx = i2 - i1 + lightx - x; + normaly = i1 - i3 + temp; + if (normalx < 0) + normalx = 0; + else if (normalx > 255) + normalx = 255; + if (normaly < 0) + normaly = 0; + else if (normaly > 255) + normaly = 255; + *row++ = reflection_map[normalx][normaly]; + p = i2; + reflection_buffer[x] = i2; + } + *row += 2; + } + + for (y = 1; y < uv_height - 1; y++) { + uint8_t p; + temp = lighty - y; + p = Y[(x<shift_h) + (y << frame->shift_v) * width]; + + for (x = 0; x < uv_width; x++) { + int i1 = (int) p; + int i2 = Y[(x<shift_h) + 1 + ((y<shift_v) * width)]; + int i3 = (int) reflection_buffer[(x<shift_h)]; + normalx = i2 - i1 + lightx - x; + normaly = i1 - i3 + temp; + if (normalx < 0) + normalx = 0; + else if (normalx > 255) + normalx = 255; + if (normaly < 0) + normaly = 0; + else if (normaly > 255) + normaly = 255; + *cbrow++ = ((reflection_map[normalx][normaly] * (Cb[x + 1 + (y * uv_width)]-128)) >> 8) +128; + *crrow++ = ((reflection_map[normalx][normaly] * (Cr[x + 1 + (y * uv_width)]-128)) >> 8) +128; + p = i2; + reflection_buffer[x] = i2; + } + *row += 2; + } + + + //sin_index+=n; + //sin_index &= 511; + //sin_index2 +=n-2; + //sin_index2 &= 511; + +} diff --git a/veejay-server/libvje/effects/reflection.h b/veejay-server/libvje/effects/reflection.h new file mode 100644 index 00000000..c3b01e68 --- /dev/null +++ b/veejay-server/libvje/effects/reflection.h @@ -0,0 +1,54 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + + +/* Copyright (C) 2002 W.P. van Paassen - peter@paassen.tmfweb.nl + + 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; see the file COPYING. If not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* This effect was inspired by an article by Sqrt(-1) */ +/* 08-22-02 Optimized by WP */ +/* note that the code has not been fully optimized */ + + +#ifndef REFLECTION_H +#define REFLECTION_H +#include +#include +#include + +vj_effect *reflection_init(int width,int hei); +int reflection_malloc(int width, int height); +void reflection_free(); +void reflection_apply(VJFrame *frame, int width, int height, int n1, + int n2, int move); +#endif diff --git a/veejay-server/libvje/effects/revtv.c b/veejay-server/libvje/effects/revtv.c new file mode 100644 index 00000000..e057671d --- /dev/null +++ b/veejay-server/libvje/effects/revtv.c @@ -0,0 +1,107 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "revtv.h" +#include "common.h" + +#include +vj_effect *revtv_init(int max_width, int max_height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 2; + ve->defaults[1] = 42; + ve->defaults[2] = 201; + ve->defaults[3] = 6; + ve->limits[0][0] = 1; /* line spacing */ + ve->limits[1][0] = max_height; + ve->limits[0][1] = 1; /* vscale */ + ve->limits[1][1] = max_width; + ve->limits[0][2] = 0; /* luminance intensity */ + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; /* color range */ + ve->limits[1][3] = 7; + ve->description = "RevTV (EffectTV)"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +/********************************************************************************************** + * + * revTV: taken from effectv-0.3.5. linespace = 1 gives a nice result. + * added the variable 'color' , so the user is free to choose replacement result. Default was 0xff. + * + **********************************************************************************************/ +void revtv_apply(VJFrame *frame, int width, int height, int linespace, + int vscale, int color, int color_num) +{ + int x, y; + uint8_t *nsrc; + int X1, X2, X3; + int yval; + int uv_width = frame->uv_width; + int uv_height = frame->uv_height; + + + int colorCb = bl_pix_get_color_cb(color); + int colorCr = bl_pix_get_color_cr(color_num); + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + for (y = 0; y < height; y += linespace) { + for (x = 0; x <= width; x++) { + nsrc = Y + (y * width) + x; + X1 = ((*nsrc) & 0xff0000) >> (16 - 1); + X2 = ((*nsrc) & 0xff00) >> (8 - 2); + X3 = (*nsrc) & 0xff; + yval = y - ((short) (X1 + X2 + X3) / vscale); + if (yval > 0) + Y[x + (yval * width)] = color; + } + } + if (color_num > 0) { + for (y = 0; y < uv_height; y += linespace) { + for (x = 0; x <= uv_width; x++) { + nsrc = Cb + (y * uv_width) + x; + X1 = ((*nsrc) & 0xff0000) >> (8 - 1); + X2 = ((*nsrc) & 0xff00) >> (4 - 2); + X3 = ((*nsrc) & 0xff) >> 1; + yval = y - ((short) (X1 + X2 + X3) / vscale); + if (yval > 0) + Cb[x + (yval * uv_width)] = colorCr; + nsrc = Cr + (y * uv_width) + x; + X1 = ((*nsrc) & 0xff0000) >> (8 - 1); + X2 = ((*nsrc) & 0xff00) >> (4 - 2); + X3 = ((*nsrc) & 0xff) >> 1; + yval = y - ((short) (X1 + X2 + X3) / vscale); + if (yval > 0) + Cr[x + (yval * uv_width)] = colorCb; + } + } + } +} +void revtv_free(){} diff --git a/veejay-server/libvje/effects/revtv.h b/veejay-server/libvje/effects/revtv.h new file mode 100644 index 00000000..c2871171 --- /dev/null +++ b/veejay-server/libvje/effects/revtv.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef REVTV_H +#define REVTV_H +#include +#include +#include + +vj_effect *revtv_init(int max_width, int max_height); +void revtv_apply(VJFrame *frame, int width, int height, int space, + int vscale, int c, int cn); +void revtv_free(); +#endif diff --git a/veejay-server/libvje/effects/rgbchannel.c b/veejay-server/libvje/effects/rgbchannel.c new file mode 100644 index 00000000..03432697 --- /dev/null +++ b/veejay-server/libvje/effects/rgbchannel.c @@ -0,0 +1,142 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include +#include +#include AVUTIL_INC +#include "rgbchannel.h" + +vj_effect *rgbchannel_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + + ve->defaults[0] = 0; + ve->defaults[0] = 0; + ve->defaults[0] = 0; + ve->description = "RGB Channel"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static uint8_t *rgb_ = NULL; +static VJFrame *rgb_frame_ = NULL; +static void *convert_yuv = NULL; +static void *convert_rgb = NULL; +int rgbchannel_malloc( int w, int h ) +{ + if(!rgb_) + rgb_ = vj_malloc( sizeof(uint8_t) * w * h * 3 ); + if(!rgb_) + return 0; + if(!rgb_frame_) + rgb_frame_ = yuv_rgb_template( rgb_, w, h , PIX_FMT_RGB24 ); + return 1; +} + +void rgbchannel_free( ) +{ + if(rgb_) + free(rgb_); + if(rgb_frame_) + free(rgb_frame_); + rgb_frame_ = NULL; + rgb_ = NULL; + + if(convert_rgb) + yuv_fx_context_destroy( convert_rgb ); + if(convert_yuv) + yuv_fx_context_destroy( convert_yuv ); + convert_rgb = NULL; + convert_yuv = NULL; +} + +void rgbchannel_apply( VJFrame *frame, int width, int height, int chr, int chg , int chb) +{ + unsigned int x,y,i; + + VJFrame *tmp = yuv_yuv_template( frame->data[0], + frame->data[1], + frame->data[2], + width, height, PIX_FMT_YUV444P ); + +// yuv_convert_any_ac( tmp, rgb_frame_, PIX_FMT_YUV444P, PIX_FMT_RGB24 ); + + if(!convert_yuv ) + convert_yuv = yuv_fx_context_create( tmp, rgb_frame_, PIX_FMT_YUV444P, PIX_FMT_RGB24 ); + if(!convert_rgb ) + convert_rgb = yuv_fx_context_create( rgb_frame_,tmp, PIX_FMT_RGB24, PIX_FMT_YUV444P ); + + yuv_fx_context_process( convert_yuv, tmp, rgb_frame_ ); + + int row_stride = width * 3; + + if(chr) + { + for( y = 0; y < height; y ++ ) + { + for( x = 0; x < row_stride; x += 3 ) + { + rgb_[ y * row_stride + x ] = 0; + } + } + } + if(chg) + { + for( y = 0; y < height; y ++ ) + { + for( x = 1; x < row_stride-1; x += 3 ) + { + rgb_[ y * row_stride + x ] = 0; + } + } + } + if(chb) + { + for( y = 0; y < height; y ++ ) + { + for( x = 2; x < row_stride-2; x += 3 ) + { + rgb_[ y * row_stride + x ] = 0; + } + } + } + +// yuv_convert_any_ac( rgb_frame_, tmp, PIX_FMT_RGB24, PIX_FMT_YUV444P ); + + yuv_fx_context_process( convert_rgb, rgb_frame_, tmp ); + + free(tmp); + +} diff --git a/veejay-server/libvje/effects/rgbchannel.h b/veejay-server/libvje/effects/rgbchannel.h new file mode 100644 index 00000000..4cb9a0ea --- /dev/null +++ b/veejay-server/libvje/effects/rgbchannel.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg + * + * 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. + */ + +#ifndef RGBCHANNEL_H +#define RGBCHANNEL_H +#include +#include +#include + +vj_effect *rgbchannel_init(int w, int h); +void rgbchannel_apply( VJFrame *frame, int width, int height, int r, int g, int b); +int rgbchannel_malloc(int w, int h ); +void rgbchannel_free(); +#endif diff --git a/veejay-server/libvje/effects/rgbkey.c b/veejay-server/libvje/effects/rgbkey.c new file mode 100644 index 00000000..f3e982db --- /dev/null +++ b/veejay-server/libvje/effects/rgbkey.c @@ -0,0 +1,361 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "rgbkey.h" +#include +#include +#include "common.h" + +/* + + This effect is based on this small project: + + http://www.cs.utah.edu/~michael/chroma/ + + The algorithm decides which pixels belong to resp. foreground + or background. Other effects that make use of this same algorithm are + + Complex Invert, Complex Negation, Complex Saturation, Smooth RGB Key + Isolate by Color , Complex Threshold and Blend by Color Key, +*/ + +/* + (march,2005) fixed flaw (signed vs. unsigned) in algorithm + use selectable rgb -> yuv formula, + */ + +vj_effect *rgbkey_init(int w,int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 319; /* angle , 45 degrees*/ + ve->defaults[1] = 0; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 255; /* b */ + ve->defaults[4] = 1; /* type */ + ve->defaults[5] = 3500; /* noise */ + + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 1; /* total noise suppression off */ + + ve->limits[0][5] = 1; + ve->limits[1][5] = 6300; + + + ve->has_user = 0; + ve->description = "Chroma Key (RGB)"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->rgb_conv = 1; + return ve; +} +/* +void rgbkey_scan_fg(uint8_t * src2[3], int *r, int *g, int *b) +{ + *r = (int) (+(1.0 * Y2[0]) + (0 * Cb2[0]) + + (1.402 * Cr2[0])); + *g = (int) (+(1.0 * Y2[0]) - (0.344136 * Cb2[0]) + + (-0.714136 * Cr2[0])); + *b = (int) (+(1.0 * Y2[0]) + (1.772 * Cb2[0]) + + (0 * Cr2[0])); +} +*/ +void rgbkey_apply1(VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int r, int g, + int b, int i_noise) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + int cb, cr; + int kbg, x1, y1; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle * 0.1f; + float noise_level = (i_noise / 100.0); + unsigned int pos; + uint8_t val, tmp1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + int iy=16,iu=128,iv=128; + _rgb2yuv( r,g,b, iy,iu,iv ); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = Y; + fg_cb = Cb; + fg_cr = Cr; + /* 2005: swap these !! */ + bg_y = Y2; + bg_cb = Cb2; + bg_cr = Cr2; + + for (pos = (width * height); pos != 0; pos--) { + short xx, yy; + /* convert foreground to xz coordinates where x direction is + defined by key color */ + + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + + + /* accept angle should not be > 90 degrees + reasonable results between 10 and 80 degrees. + */ + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + // if (abs(yy) > val) { + if (abs(yy) < val) { + /* compute fg, suppress fg in xz according to kfg + */ + val = (yy * accept_angle_ctg) >> 4; + + x1 = abs(val); + y1 = yy; + tmp1 = xx - x1; + + kbg = (tmp1 * one_over_kc) >> 1; + if (kbg < 0) + kbg = 0; + if (kbg > 255) + kbg = 255; + + val = (tmp1 * kfgy_scale) >> 4; + val = fg_y[pos] - val; + + Y[pos] = val; + + // convert suppressed fg back to cbcr + // cb,cr are signed, go back to unsigned ! + Cb[pos] = ((x1 * (cb-128)) - (y1 * (cr-128))) >> 7; + Cr[pos] = ((x1 * (cr-128)) - (y1 * (cb-128))) >> 7; + + // deal with noise + val = (yy * yy) + (kg * kg); + if (val < (noise_level * noise_level)) { + kbg = 255; + } + + Y[pos] = (Y[pos] + (kbg * bg_y[pos])) >> 8; + Cb[pos] = (Cb[pos] + (kbg * bg_cb[pos])) >> 8; + Cr[pos] = (Cr[pos] + (kbg * bg_cr[pos])) >> 8; + } + } +} + +void rgbkey_apply2(VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle,int r, int g, + int b, int i_noise) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + int cb, cr; + int kbg, x1, y1; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle * 0.1f; + float noise_level = (i_noise / 100.0); + unsigned int pos; + uint8_t val, tmp1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + int iy=16,iu=128,iv=128; + _rgb2yuv( r,g,b, iy,iu,iv ); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = Y; + fg_cb = Cb; + fg_cr = Cr; + + bg_y = Y2; + bg_cb = Cb2; + bg_cr = Cr2; + + int len = frame->len; + + for (pos = 0; pos < len; pos++) { + short xx, yy; + /* convert foreground to xz coordinates where x direction is + defined by key color */ + + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + + + /* accept angle should not be > 90 degrees + reasonable results between 10 and 80 degrees. + */ + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + // if (abs(yy) > val) { + if (abs(yy) < val) { + /* compute fg, suppress fg in xz according to kfg */ + + val = (yy * accept_angle_ctg) >> 4; + + x1 = abs(val); + y1 = yy; + tmp1 = xx - x1; + + kbg = (tmp1 * one_over_kc) >> 1; + if (kbg < 0) + kbg = 0; + if (kbg > 255) + kbg = 255; + + val = (tmp1 * kfgy_scale) >> 4; + val = fg_y[pos] - val; + + Y[pos] = val; + + /* convert suppressed fg back to cbcr */ + + Cb[pos] = ((x1 * (cb-128)) - (y1 * (cr-128))) >> 7; + Cr[pos] = ((x1 * (cr-128)) - (y1 * (cb-128))) >> 7; + + /* deal with noise */ + + val = (yy * yy) + (kg * kg); + if (val < (noise_level * noise_level)) { + Y[pos] = Cb[pos] = Cr[pos] = 0; + kbg = 255; + } + + Y[pos] = (Y[pos] + (kbg * bg_y[pos])) >> 8; + Cb[pos] = (Cb[pos] + (kbg * bg_cb[pos])) >> 8; + Cr[pos] = (Cr[pos] + (kbg * bg_cr[pos])) >> 8; + } + } +} + + /* this is the same as rgbkey_apply1, but here we have total noise suppression + */ + +void rgbkey_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int red, int green, + int blue, int type, int i_noise) +{ + + switch (type) { + case 0: + rgbkey_apply1(frame, frame2, width, height, i_angle, red, + green, blue, i_noise); + break; + case 1: + rgbkey_apply2(frame, frame2, width, height, i_angle, red, + green, blue, i_noise); + break; + } + +} +void rgbkey_free(){} diff --git a/veejay-server/libvje/effects/rgbkey.h b/veejay-server/libvje/effects/rgbkey.h new file mode 100644 index 00000000..0544f27f --- /dev/null +++ b/veejay-server/libvje/effects/rgbkey.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef RGBKEY_H +#define RGBKEY_H +#include +#include +#include +vj_effect *rgbkey_init(); +void rgbkey_scan_fg(uint8_t * src2[3], int *r, int *g, int *b); +void rgbkey_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int i_noise, + int red, int green, int blue, int type ); +void rgbkey_free(); +#endif diff --git a/veejay-server/libvje/effects/rgbkeysmooth.c b/veejay-server/libvje/effects/rgbkeysmooth.c new file mode 100644 index 00000000..9bd3694a --- /dev/null +++ b/veejay-server/libvje/effects/rgbkeysmooth.c @@ -0,0 +1,196 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +#include +#include +#include "rgbkey.h" +#include +#include +#include "common.h" +#include "rgbkey.h" + + +vj_effect *rgbkeysmooth_init(int w,int h) +{ + vj_effect *ve; + ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 290; /* angle */ + ve->defaults[1] = 255; /* r */ + ve->defaults[2] = 0; /* g */ + ve->defaults[3] = 0; /* b */ + ve->defaults[4] = 150; /* opacity */ + ve->defaults[5] = 1500; /* noise level */ + ve->limits[0][0] = 5; + ve->limits[1][0] = 900; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 255; + + ve->limits[0][5] = 0; + ve->limits[1][5] = 3500; + + ve->has_user = 0; + ve->description = "Transparent Chroma Key (RGB)"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->rgb_conv = 1; + return ve; +} + + +void rgbkeysmooth_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int r, int g, int b, + int opacity, int i_noise) +{ + + uint8_t *fg_y, *fg_cb, *fg_cr; + uint8_t *bg_y, *bg_cb, *bg_cr; + int accept_angle_tg, accept_angle_ctg, one_over_kc; + int kfgy_scale, kg; + int cb, cr; + int kbg, x1, y1; + float kg1, tmp, aa = 128, bb = 128, _y = 0; + float angle = (float) i_angle * 0.1f; + float noise_level = (i_noise / 100.0); + unsigned int pos; + uint8_t val, tmp1; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + int iy=16,iu=128,iv=128; + unsigned int op0 = opacity > 255 ? 255 : opacity; + unsigned int op1 = 255 - op0; + + _rgb2yuv( r,g,b, iy,iu,iv ); + _y = (float) iy; + aa = (float) iu; + bb = (float) iv; + tmp = sqrt(((aa * aa) + (bb * bb))); + cb = 127 * (aa / tmp); + cr = 127 * (bb / tmp); + kg1 = tmp; + + /* obtain coordinate system for cb / cr */ + accept_angle_tg = 0xf * tan(M_PI * angle / 180.0); + accept_angle_ctg = 0xf / tan(M_PI * angle / 180.0); + + tmp = 1 / kg1; + one_over_kc = 0xff * 2 * tmp - 0xff; + kfgy_scale = 0xf * (float) (_y) / kg1; + kg = kg1; + + /* intialize pointers */ + fg_y = Y; + fg_cb = Cb; + fg_cr = Cr; + /* 2005: swap these !! */ + bg_y = Y2; + bg_cb = Cb2; + bg_cr = Cr2; + + for (pos = (width * height); pos != 0; pos--) { + short xx, yy; + /* convert foreground to xz coordinates where x direction is + defined by key color */ + + xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; + + if (xx < -128) { + xx = -128; + } + if (xx > 127) { + xx = 127; + } + + yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; + + if (yy < -128) { + yy = -128; + } + if (yy > 127) { + yy = 127; + } + + + /* accept angle should not be > 90 degrees + reasonable results between 10 and 80 degrees. + */ + + val = (xx * accept_angle_tg) >> 4; + if (val > 127) + val = 127; + // if (abs(yy) > val) { + if (abs(yy) < val) { + /* compute fg, suppress fg in xz according to kfg + */ + val = (yy * accept_angle_ctg) >> 4; + + x1 = abs(val); + y1 = yy; + tmp1 = xx - x1; + + kbg = (tmp1 * one_over_kc) >> 1; + if (kbg < 0) + kbg = 0; + if (kbg > 255) + kbg = 255; + + val = (tmp1 * kfgy_scale) >> 4; + val = fg_y[pos] - val; + + Y[pos] = val; + + // convert suppressed fg back to cbcr + // cb,cr are signed, go back to unsigned ! + Cb[pos] = ((x1 * (cb-128)) - (y1 * (cr-128))) >> 7; + Cr[pos] = ((x1 * (cr-128)) - (y1 * (cb-128))) >> 7; + + // deal with noise + val = (yy * yy) + (kg * kg); + if (val < (noise_level * noise_level)) { + kbg = 255; + } + + Y[pos] = ( Y[pos] + (kbg * bg_y[pos])) >> 8; + Y[pos] = ( Y[pos] * op0 + bg_y[pos] * op1 ) >> 8; + Cb[pos] = (Cb[pos] + (kbg * bg_cb[pos])) >> 8; + Cb[pos] = (Cb[pos] * op0 + bg_cb[pos] * op1) >> 8; + Cr[pos] = (Cr[pos] + (kbg * bg_cr[pos])) >> 8; + Cr[pos] = (Cr[pos] * op0 + bg_cr[pos] * op1 ) >> 8; + + } + } + +} diff --git a/veejay-server/libvje/effects/rgbkeysmooth.h b/veejay-server/libvje/effects/rgbkeysmooth.h new file mode 100644 index 00000000..84b2064e --- /dev/null +++ b/veejay-server/libvje/effects/rgbkeysmooth.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ + +#ifndef RGBKEYSMOOTH_H +#define RGBKEYSMOOTH_H +#include +#include +#include + +vj_effect *rgbkeysmooth_init(); +void rgbkeysmooth_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int red, int green, + int blue, int op, int noise); +void rgbkeysmooth_free(); +#endif diff --git a/veejay-server/libvje/effects/ripple.c b/veejay-server/libvje/effects/ripple.c new file mode 100644 index 00000000..f209f7db --- /dev/null +++ b/veejay-server/libvje/effects/ripple.c @@ -0,0 +1,188 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + + +/* This effect recalculates a pretty large table if 'waves' or 'amplitude' + is changed. Results will be placed in ripple_table, a copy of the + frame is kept in ripple_data. So is the calculation of the first frame slow, + the following frames will use the cached coordinates until the user changes + the number of waves or the amplitude. + + +*/ + +#include "ripple.h" +#include +#include +#include + +#define RIPPLE_DEGREES 360.0 +#define RIPPLE_VAL 180.0 + +static double *ripple_table; +static uint8_t *ripple_data[3]; +static double *ripple_sin; +static double *ripple_cos; + +static int ripple_waves = 0; +static int ripple_ampli = 0; +static int ripple_attn = 0; +// FIXME private +vj_effect *ripple_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = 3600; + ve->limits[0][1] = 1; + ve->limits[1][1] = 80; + ve->limits[0][2] = 1; + ve->limits[1][2] = 360; + ve->defaults[0] = 132; + ve->defaults[1] = 47; + ve->defaults[2] = 7; + ve->description = "Ripple"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +int ripple_malloc(int width, int height) +{ + int i; + ripple_table = (double*) vj_malloc(sizeof(double) * width * height + 16); + if(!ripple_table) return 0; + ripple_data[0] = (uint8_t*)vj_yuvalloc(width,height ); + if(!ripple_data[0]) return 0; + ripple_data[1] = ripple_data[0] + (width * height); + ripple_data[2] = ripple_data[1] + (width * height); + + ripple_sin = (double*) vj_malloc(sizeof(double) * RIPPLE_DEGREES); + if(!ripple_sin) return 0; + ripple_cos = (double*) vj_malloc(sizeof(double) * RIPPLE_DEGREES); + if(!ripple_cos) return 0; + + for(i=0; i < RIPPLE_DEGREES; i++) { + ripple_sin[i] = sin ((M_PI * i) / RIPPLE_VAL); + ripple_cos[i] = sin ((M_PI * i) / RIPPLE_VAL); + } + + return 1; + +} + +void ripple_free() { + if(ripple_table) free(ripple_table); + if(ripple_sin) free(ripple_sin); + if(ripple_cos) free(ripple_cos); + if(ripple_data[0]) + free(ripple_data[0]); + ripple_data[0] = NULL; + ripple_data[1] = NULL; + ripple_data[2] = NULL; + ripple_sin = NULL; + ripple_cos = NULL; + ripple_table = NULL; +} + + +void ripple_apply(VJFrame *frame, int width, int height, int _w, int _a , int _att ) { + + double wp2 = width * 0.5; + double hp2 = height * 0.5; + int x,y,dx,dy,a=0,sx=0,sy=0,angle=0; + double r,z; + double maxradius,frequency,amplitude; + double waves = (_w/10.0); + double ampli = (double) (_a/10.0); + double attenuation = (_att/10.0); + int have_calc_data = 1; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + maxradius = sqrt(wp2 * wp2 + hp2 * hp2); + frequency = 360.0 * waves / maxradius; + amplitude = maxradius / ampli; + + + if(ripple_waves != _w) { + ripple_waves = _w; + have_calc_data=0; + } + if(ripple_ampli != _a) { + ripple_ampli = _a; + have_calc_data=0; + } + if(ripple_attn != _att) { + ripple_attn = _att; + have_calc_data = 0; + } + veejay_memcpy( ripple_data[0], Y, (width*height)); + veejay_memcpy( ripple_data[1], Cb, (width*height)); + veejay_memcpy( ripple_data[2], Cr, (width*height)); + + if (have_calc_data==0) { + for(y=0; y < height-1;y++) { + for (x=0; x < width; x++) { + dx = x - wp2; + dy = y - hp2; + + angle = 180.0 * (atan2(dx,dy)/M_PI); + + if (angle < 0) angle+=360.0; + + r = sqrt( dx * dx + dy * dy); + + z = amplitude/ pow(r,attenuation) * ripple_sin[ ((int)(frequency * r)) % 360 ]; + + a = ((int) (angle)) % 360; + sx = (int) (x+z * ripple_cos[a]); + sy = (int) (y+z * ripple_sin[a]); + + if(sy > (height-1)) sy = height-1; + if(sx > width) sx = width; + if(sx < 0) sx =0; + if(sy < 0) sy =0; + + ripple_table[(y*width)+x] = (sx + (sy * width)); + + Y[((y * width) +x)] = ripple_data[0][(sx +( sy * width)) ]; + Cb[((y * width) +x)] = ripple_data[1][(sx +( sy * width)) ]; + Cr[((y * width) +x)] = ripple_data[2][(sx +( sy * width)) ]; + } + } + } + else { + for(y=0; y < height-1;y++) { + for (x=0; x < width; x++) { + sx = ripple_table[(y*width)+x]; + Y[(y * width) +x] = ripple_data[0][sx]; + Cb[(y * width) +x] = ripple_data[1][sx]; + Cr[(y * width) +x] = ripple_data[2][sx]; + } + } + } +} diff --git a/veejay-server/libvje/effects/ripple.h b/veejay-server/libvje/effects/ripple.h new file mode 100644 index 00000000..a5afbef0 --- /dev/null +++ b/veejay-server/libvje/effects/ripple.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef RIPPLE_H +#define RIPPLE_H +#include +#include +#include +#include + +vj_effect *ripple_init(int w, int h); +void ripple_free(); +int ripple_malloc(int w, int h); +void ripple_apply(VJFrame *frame, int width, int height, int waves, int ampli,int atten); +#endif diff --git a/veejay-server/libvje/effects/rippletv.h b/veejay-server/libvje/effects/rippletv.h new file mode 100644 index 00000000..f4a3d632 --- /dev/null +++ b/veejay-server/libvje/effects/rippletv.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef RIPPLETV_H +#define RIPPLETV_H +#include +#include +#include +#include + +vj_effect* water_init(int width, int height); +int water_malloc(void **d,int w, int h); +void water_free(void *d); +void water_apply(void *user_data, VJFrame *frame, VJFrame *frame2, int width, int height, int fresh_rate, int loopnum, int decay, int mode, int threshold ); +#endif diff --git a/veejay-server/libvje/effects/rotozoom.c b/veejay-server/libvje/effects/rotozoom.c new file mode 100644 index 00000000..af79a1ba --- /dev/null +++ b/veejay-server/libvje/effects/rotozoom.c @@ -0,0 +1,241 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +/* distortion effects */ + +#include "rotozoom.h" +#include +#include +#include + + +static int *test_roto[9]; +static int *test_roto2[9]; +static int new_zpath = 0; +static int new_path = 0; +static int roto_old_p = 0; +static int roto_old_z = 0; +static uint8_t *rotobuffer[3]; +// FIXME private +vj_effect *rotozoom_init(int width, int height) +{ + int i, j; + + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 0; + ve->defaults[1] = 1; + ve->defaults[2] = 1; + ve->defaults[3] = 1; + ve->limits[0][0] = 0; + ve->limits[1][0] = 8; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; + ve->limits[1][3] = 3; + ve->description = "Rotozoom"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + for (j = 0; j < 9; j++) { + test_roto[j] = (int *) vj_malloc(sizeof(int) * 256); + test_roto2[j] = (int *) vj_malloc(sizeof(int) * 256); + } + + for (i = 0; i < 256; i++) { + float rad = (float) i * 1.41176 * 0.0174532; + float c = sin(rad); + test_roto[0][i] = (c + 0.8) * 4096.0; + test_roto2[0][i] = (2.0 * c) * 4096.0; + } + for (i = 0; i < 256; i++) { + float rad = (float) i * 2.41176 * 0.0174532; + float c = sin(rad); + test_roto[1][i] = (c + 0.8) * 4096.0; + test_roto2[1][i] = (2.0 * c) * 4096.0; + } + for (i = 0; i < 256; i++) { + float rad = (float) i * 3.41576 * 0.0174532; + float c = sin(rad); + test_roto[2][i] = (c + 0.8) * 4096.0; + test_roto2[2][i] = (2.0 * c) * 4096.0; + } + for (i = 0; i < 256; i++) { + float rad = (float) i * 4.74176 * 0.0174532; + float c = sin(rad); + test_roto[3][i] = (c + 0.8) * 4096.0; + test_roto2[3][i] = (2.0 * c) * 4096.0; + } + for (i = 0; i < 256; i++) { + float rad = (float) i * 5.91176 * 0.0174532; + float c = sin(rad); + test_roto[4][i] = (c + 0.8) * 4096.0; + test_roto2[4][i] = (2.0 * c) * 4096.0; + } + for (i = 0; i < 256; i++) { + float rad = (float) i * 9.12345 * 0.0174532; + float c = sin(rad); + test_roto[5][i] = (c + 0.8) * 4096.0; + test_roto2[5][i] = (2.0 * c) * 4096.0; + } + for (i = 0; i < 256; i++) { + float rad = (float) i * 9.12345 * 0.0174532; + float c = sin(rad); + test_roto[6][i] = (c + 0.8) * 8096.0; + test_roto2[6][i] = (2.0 * c) * 8096.0; + } + for (i = 0; i < 256; i++) { + float rad = (float) i * 1.41176 * 0.0174532; + float c = sin(rad); + test_roto[7][i] = c * 4096.0; + test_roto2[7][i] = c * 4096.0; + } + for (i = 0; i < 256; i++) { + float rad = (float) i * 1.0 * 0.0174532; + float c = sin(rad); + test_roto[8][i] = c * 4096.0; + test_roto2[8][i] = c * 4096.0; + } + + return ve; +} + +void rotozoom_destroy() +{ + int j; + for (j = 0; j < 9; j++) { + if( test_roto[j] ) + free(test_roto[j]); + if( test_roto2[j]); + free(test_roto2[j]); + } +} + +int rotozoom_malloc(int width, int height) +{ + + + rotobuffer[0] = (uint8_t *) vj_calloc(sizeof(uint8_t) * width * height * 3); + if(!rotobuffer[0]) + return 0; + rotobuffer[1] = rotobuffer[0] + (width * height); + rotobuffer[2] = rotobuffer[1] + (width * height); + return 1; + +} + +void rotozoom_free() { + if(rotobuffer[0]) + free(rotobuffer[0]); + rotobuffer[0] = NULL; + rotobuffer[1] = NULL; + rotobuffer[2] = NULL; +} + +/* rotozoomer, from the demo effects collection, works in supersampled YCbCr space. + printf("Retro Rotozoom Effect - B. Ellacott, W.P. van Paassen - 2002\n"); + */ +void draw_tile(int stepx, int stepy, int zoom, int w, int h, + uint8_t * src1[3], uint8_t * src2[3]) +{ + + int x, y, i, j, xd, yd, a, b, sx, sy; + + sx = sy = 0; + xd = (stepx * zoom) >> 12; + yd = (stepy * zoom) >> 12; + + for (j = 0; j < h; j++) { + x = sx; + y = sy; + for (i = 0; i < w; i++) { + a = (x >> 12) & 255; + b = (y >> 12) & 255; + src1[0][(j * w) + i] = src2[0][b * w + a]; + src1[1][(j * w) + i] = src2[1][b * w + a]; + src1[2][(j * w) + i] = src2[2][b * w + a]; + x += xd; + y += yd; + } + sx -= yd; + sy += xd; + } +} + +void rotozoom2_apply(VJFrame *frame, uint8_t *data[3], int width, + int height, int n, int p, int z) +{ + + + draw_tile(test_roto[n][p], + test_roto[n][(p + 128) & 0xFF], + test_roto2[n][z], width, height, frame->data, data); +} + +void rotozoom1_apply(VJFrame *frame, uint8_t *data[3], int w, int h, + int n, int p, int z) +{ + + if (roto_old_p != p) { + roto_old_p = p; + new_path = p & 255; + } + if (roto_old_z != z) { + roto_old_z = z; + new_zpath = z & 255; + } + + draw_tile(test_roto[n][new_path], + test_roto[n][(new_path + 128) & 0xff], + test_roto2[n][new_zpath], w, h, frame->data, data); + + new_path = (new_path - 1) & 255; + new_zpath = (new_zpath + 1) & 255; + +} + + +void rotozoom_apply( VJFrame *frame, int width, int height, int mode, + int rotate, int zoom, int autom) +{ + switch (autom) { /* alas must do memcpy */ + case 0: + veejay_memcpy(rotobuffer[0], frame->data[0], (width * height)); + veejay_memcpy(rotobuffer[1], frame->data[1], (width * height)); + veejay_memcpy(rotobuffer[2], frame->data[2], (width * height)); + rotozoom2_apply(frame, rotobuffer, width, height, mode, rotate, + zoom); + break; + case 1: + veejay_memcpy(rotobuffer[0], frame->data[0], (width * height)); + veejay_memcpy(rotobuffer[1], frame->data[1], (width * height)); + veejay_memcpy(rotobuffer[2], frame->data[2], (width * height)); + rotozoom1_apply(frame, rotobuffer, width, height, mode, rotate, + zoom); + break; + } + + +} diff --git a/veejay-server/libvje/effects/rotozoom.h b/veejay-server/libvje/effects/rotozoom.h new file mode 100644 index 00000000..58de653d --- /dev/null +++ b/veejay-server/libvje/effects/rotozoom.h @@ -0,0 +1,34 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef ROTOZOOM_H +#define ROTOZOOM_H +#include +#include +#include +#include + +vj_effect *rotozoom_init(int width, int height); +int rotozoom_malloc(int w, int h); +void rotozoom_destroy(); +void rotozoom_free(); +void rotozoom_apply( VJFrame *frame, int width, int height, int mode, + int rot, int zoom, int autom); +#endif diff --git a/veejay-server/libvje/effects/scratcher.c b/veejay-server/libvje/effects/scratcher.c new file mode 100644 index 00000000..c7426567 --- /dev/null +++ b/veejay-server/libvje/effects/scratcher.c @@ -0,0 +1,170 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#include "scratcher.h" +#include +#include +#include "common.h" +#include + +static uint8_t *frame[3]; +static int nframe = 0; +static int nreverse = 0; + +vj_effect *scratcher_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 1; + ve->limits[1][1] = (MAX_SCRATCH_FRAMES-1); + ve->limits[0][2] = 0; + ve->limits[1][2] = 1; + ve->defaults[0] = 150; + ve->defaults[1] = 8; + ve->defaults[2] = 1; + ve->description = "Overlay Scratcher"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; + +} + +//FIXME private + +void scratcher_free() { + if(frame[0]) + free(frame[0]); + frame[0] = NULL; + frame[1] = NULL; + frame[2] = NULL; +} + +int scratcher_malloc(int w, int h) +{ + /* need memory for bounce mode ... */ + frame[0] = + (uint8_t *) vj_malloc(w * h * 2 * sizeof(uint8_t) * MAX_SCRATCH_FRAMES); + if(!frame[0]) return 0; + + veejay_memset( frame[0], pixel_Y_lo_, w * h * MAX_SCRATCH_FRAMES ); + + frame[1] = + frame[0] + ( w * h * MAX_SCRATCH_FRAMES ); + frame[2] = + frame[1] + ( ((w*h)/4) * MAX_SCRATCH_FRAMES ); + + veejay_memset( frame[1], 128, ((w * h)/4 ) * MAX_SCRATCH_FRAMES); + veejay_memset( frame[2], 128, ((w * h)/4) * MAX_SCRATCH_FRAMES); + return 1; +} + + +void store_frame(VJFrame *src, int w, int h, int n, int no_reverse) +{ + int uv_len = src->uv_len; + uint8_t *Y = src->data[0]; + uint8_t *Cb= src->data[1]; + uint8_t *Cr= src->data[2]; + + + if (!nreverse) { + //printf("copy from buffer at pos %d to display", (w*h*nframe)); + veejay_memcpy(frame[0] + (w * h * nframe), Y, (w * h)); + veejay_memcpy(frame[1] + (uv_len * nframe), Cb, uv_len); + veejay_memcpy(frame[2] + (uv_len * nframe), Cr, uv_len); + } else { + //printf("copy frame to buffer at pos %d", (w*h*nframe)); + veejay_memcpy(Y, frame[0] + (w * h * nframe), (w * h)); + veejay_memcpy(Cb, frame[1] + (uv_len * nframe), uv_len); + veejay_memcpy(Cr, frame[2] + (uv_len * nframe), uv_len); + } + + if (nreverse) + nframe--; + else + nframe++; + + + + if (nframe >= n) { + if (no_reverse == 0) { + nreverse = 1; + nframe = n - 1; + } else { + nframe = 0; + } + } + + if (nframe == 0) + nreverse = 0; + + // printf("nframe=%d, n=%d, nreverse=%d. no_reverse=%d\n", nframe,n,nreverse,no_reverse); +} + + +void scratcher_apply(VJFrame *src, + int width, int height, int opacity, int n, + int no_reverse) +{ + + unsigned int x,len = src->len; + unsigned int op1 = (opacity > 255) ? 255 : opacity; + unsigned int op0 = 255 - op1; + int offset = len * nframe; + int uv_len = src->uv_len; + int uv_offset = uv_len * nframe; + uint8_t *Y = src->data[0]; + uint8_t *Cb = src->data[1]; + uint8_t *Cr = src->data[2]; + VJFrame copy; + + if (nframe== 0) { + veejay_memcpy(frame[0] + (len * nframe), Y, len); + veejay_memcpy(frame[1] + (uv_len * nframe), Cb, uv_len); + veejay_memcpy(frame[2] + (uv_len * nframe), Cr, uv_len); + return; + } + + for (x = 0; x < len; x++) { + Y[x] = + ((op0 * Y[x]) + (op1 * frame[0][offset + x])) >> 8; + } + + for(x=0; x < uv_len; x++) { + Cr[x] = + ((op0 * Cr[x]) + (op1 * frame[2][uv_offset + x])) >> 8; + + Cb[x] = + ((op0 * Cb[x]) + (op1 * frame[1][uv_offset + x])) >> 8; + } + + copy.uv_len = src->uv_len; + copy.data[0] = frame[0]; + copy.data[1] = frame[1]; + copy.data[2] = frame[2]; + store_frame( ©, width, height, n, no_reverse); + +} diff --git a/veejay-server/libvje/effects/scratcher.h b/veejay-server/libvje/effects/scratcher.h new file mode 100644 index 00000000..7402aeed --- /dev/null +++ b/veejay-server/libvje/effects/scratcher.h @@ -0,0 +1,34 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SCRATCHER_H +#define SCRATCHER_H +#include +#include +#include +#include + +vj_effect *scratcher_init(int w, int h); +int scratcher_malloc(int w, int h); +void scratcher_free(); +void scratcher_apply(VJFrame *frame, + int width, int height, int opacity, int nframes, + int no_reverse); +#endif diff --git a/veejay-server/libvje/effects/sinoids.c b/veejay-server/libvje/effects/sinoids.c new file mode 100644 index 00000000..0e15b7f8 --- /dev/null +++ b/veejay-server/libvje/effects/sinoids.c @@ -0,0 +1,160 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + + +#include +#include +#include +#include +#include "sinoids.h" +#include "common.h" + +static int *sinoids_X; +static uint8_t *sinoid_frame[3]; + +vj_effect *sinoids_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 1; + ve->defaults[1] = 70; + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1000; /* sinoids */ + ve->description = "Sinoids"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int n__ = 0; +static int N__= 0; +//FIXME private +int sinoids_malloc(int width, int height) +{ + int i = 0; + sinoids_X = (int*) vj_calloc(sizeof(int) * width); + if(!sinoids_X) return 0; + + sinoid_frame[0] = (uint8_t*)vj_yuvalloc(width,height); + if(!sinoid_frame[0]) return 0; + sinoid_frame[1] = sinoid_frame[0] + (width * height); + sinoid_frame[2] = sinoid_frame[1] + (width * height); + + n__ = 0; + N__ = 0; + for(i=0; i < width; i++ ) { + sinoids_X[i] = (int) ( sin( ((double)i/(double)width) * 2 * 3.1415926) * 1); + sinoids_X[i] *= 4; + } + + return 1; + +} + +void sinoids_free() { + if(sinoids_X) free(sinoids_X); + if(sinoid_frame[0]) + free(sinoid_frame[0]); + sinoid_frame[0] = NULL; + sinoid_frame[1] = NULL; + sinoid_frame[2] = NULL; +} + +void sinoids_recalc(int width, int z) { + int i=0; + double zoom = ( (double)z / 10.0); + for(i=0; i < width; i++ ) { + //fast_sin(si, ( ((double)i/(double)width)*2*3.1415926));// + //sinoids_X[i] = (int) si; + sinoids_X[i] = (int) ( sin( ((double)i/(double)width) * 2 * 3.1415926) * zoom); + sinoids_X[i] *= 4; + } +} + +static int current_sinoids = 100; +void sinoids_apply(VJFrame *frame, int width, int height, int m, int s) { + unsigned int len = width * height; + unsigned int r,c; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + int interpolate = 1; + int tmp1 = m; + int tmp2 = s; + int motion = 0; + if( motionmap_active()) + { + motionmap_scale_to( 1,1000,0, 0, &tmp1, &tmp2, &n__, &N__ ); + motion = 1; + } + else + { + n__ = 0; + N__ = 0; + } + if( n__ == N__ || n__ == 0 ) + interpolate = 0; + + + + if(tmp2 != current_sinoids) { + sinoids_recalc( width, tmp2); + current_sinoids = tmp2; + } + + if(m==0) { + for( r=width ; r < len-width; r+=width) { + for( c = 0; c < width; c++) { + Y[r+c] = Y[(r+c+sinoids_X[c])]; + Cb[r+c] = Cb[(r+c+sinoids_X[c])]; + Cr[r+c] = Cr[(r+c+sinoids_X[c])]; + } + } + } + else { + /* on copy */ + for(r=0; r < len ;r++) { + sinoid_frame[0][r] = Y[r]; + sinoid_frame[1][r] = Cb[r]; + sinoid_frame[2][r] = Cr[r]; + } + for(r=width; r < len-width; r+= width) { + for(c=0; c < width; c++) { + Y[r+c] = sinoid_frame[0][(r+c+sinoids_X[c])]; + Cb[r+c] = sinoid_frame[1][(r+c+sinoids_X[c])]; + Cr[r+c] = sinoid_frame[2][(r+c+sinoids_X[c])]; + } + } + } + + if( interpolate ) + motionmap_interpolate_frame( frame, N__, n__ ); + + if (motion) + motionmap_store_frame( frame ); + +} diff --git a/veejay-server/libvje/effects/sinoids.h b/veejay-server/libvje/effects/sinoids.h new file mode 100644 index 00000000..810765e6 --- /dev/null +++ b/veejay-server/libvje/effects/sinoids.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SINOIDS_H +#define SINOIDS_H +#include +#include +#include + +vj_effect *sinoids_init(int w, int h); +void sinoids_free(); +int sinoids_malloc(int w, int h); +void sinoids_apply(VJFrame *frame, int width, int height, int a,int b); + +#endif diff --git a/veejay-server/libvje/effects/slice.c b/veejay-server/libvje/effects/slice.c new file mode 100644 index 00000000..adcef710 --- /dev/null +++ b/veejay-server/libvje/effects/slice.c @@ -0,0 +1,171 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include "slice.h" +#include +#include "common.h" + +static uint8_t *slice_frame[3]; +static int *slice_xshift; +static int *slice_yshift; +static int n__ = 0; +static int N__ = 0; +void slice_recalc(int width, int height, int val); + + + +vj_effect *slice_init(int width,int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; + ve->limits[1][0] = 128; + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->defaults[0] = 63; + ve->defaults[1] = 0; + ve->description = "Slice Window"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user =0; + return ve; +} +//FIXME private + +int slice_malloc(int width, int height) +{ + slice_frame[0] = (uint8_t*)vj_yuvalloc(width,height); + if(!slice_frame[0]) + return 0; + slice_frame[1] = slice_frame[0] + (width * height); + slice_frame[2] = slice_frame[1] + (width * height); + slice_xshift = (int*) vj_malloc(sizeof(int) * height); + if(!slice_xshift) return 0; + slice_yshift = (int*) vj_malloc(sizeof(int) * width); + if(!slice_yshift) return 0; + slice_recalc(width,height, 63); + n__ = 0; + N__ = 0; + return 1; +} + + +void slice_free() { + if(slice_frame[0]) + free(slice_frame[0]); + slice_frame[0] = NULL; + slice_frame[1] = NULL; + slice_frame[2] = NULL; + if(slice_xshift) + free(slice_xshift); + if(slice_yshift) + free(slice_yshift); + slice_yshift = NULL; + slice_xshift = NULL; +} + +/* much like the bathroom window, width height indicate block size within frame */ +void slice_recalc(int width, int height, int val) { + unsigned int x,y,dx,dy,r; + for(x = dx = 0; x < width; x++) + { + if(dx==0) + { + r = ((rand() & val))-((val>>1)+1); + dx = 8 + (rand() & ((val>>1))-1); + } + else + { + dx--; + } + slice_yshift[x] = r; + } + + for(y=dy=0; y < height; y++) { + if(dy==0) { r = (rand() & val)-((val>>1)+1); dy = 8 + rand() & ((val>>1)-1); } else dy--; + slice_xshift[y] = r; + } +} + + +void slice_apply(VJFrame *frame, int width, int height, int val, int re_init) { + unsigned int x,y,dx,dy; + unsigned int len = (width*height); + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + + int interpolate = 1; + int tmp1 = val; + int tmp2 = re_init; + int motion = 0; + if( motionmap_active()) + { + motionmap_scale_to( 128,1, 2, 0, &tmp1, &tmp2, &n__ , &N__ ); + if( val >= 64 ) + { + if( (rand() % 25 )== 0) + tmp2 = 1; + } + else + { + tmp2 = 1; + } + motion = 1; + } + else + { + n__ = 0; + N__ = 0; + } + + if( n__ == N__ || n__ == 0 ) + interpolate = 0; + + if(tmp2==1) slice_recalc(width,height,tmp1); + + veejay_memcpy( slice_frame[0], Y, len); + veejay_memcpy( slice_frame[1], Cb, len); + veejay_memcpy( slice_frame[2], Cr, len); + + for(y=0; y < height; y++){ + for(x=0; x < width; x++) { + dx = x + slice_xshift[y] ; dy = y + slice_yshift[x]; + if(dx < width && dy < height && dx >= 0 && dy >= 0) { + Y[(y*width)+x] = slice_frame[0][(dy*width)+dx]; + Cb[(y*width)+x] = slice_frame[1][(dy*width)+dx]; + Cr[(y*width)+x] = slice_frame[2][(dy*width)+dx]; + } + } + } + + if( interpolate ) + motionmap_interpolate_frame( frame, N__, n__ ); + + if( motion ) + motionmap_store_frame( frame ); + +} + diff --git a/veejay-server/libvje/effects/slice.h b/veejay-server/libvje/effects/slice.h new file mode 100644 index 00000000..99c14388 --- /dev/null +++ b/veejay-server/libvje/effects/slice.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SLICE_H +#define SLICE_H +#include +#include +#include +#include + +vj_effect *slice_init(int width, int height); +int slice_malloc(int width, int height); +void slice_free(); +void slice_apply(VJFrame *frame, int width, int height,int val, int re_init); +#endif diff --git a/veejay-server/libvje/effects/smear.c b/veejay-server/libvje/effects/smear.c new file mode 100644 index 00000000..ff0c420e --- /dev/null +++ b/veejay-server/libvje/effects/smear.c @@ -0,0 +1,181 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "smear.h" +#include "common.h" + +vj_effect *smear_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 3; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->defaults[0] = 0; + ve->defaults[1] = 1; + ve->description = "Pixel Smear"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} +static void _smear_apply_x(VJFrame *frame, int width, int height, int val) +{ + unsigned int j; + unsigned int x,y; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + for(y=0; y < height-1; y++) + { + for(x=0; x < width; x++) + { + j = Y[y*width+x]; + if(j >= val) + { + Y[y*width+x] = Y[y*width+x+j]; + Cb[y*width+x] = Cb[y*width+x+j]; + Cr[y*width+x] = Cr[y*width+x+j]; + } + } + } +} +static void _smear_apply_x_avg(VJFrame *frame, int width, int height, int val) +{ + unsigned int i,j; + unsigned int x,y; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + for(y=0; y < height-1; y++) + { + for(x=0; x < width; x++) + { + j = Y[y*width+x]; + if(j >= val) + { + Y[y*width+x] = ((Y[y*width+x+j] + Y[y*width+x])) >> 1; + Cb[y*width+x] = (((Cb[y*width+x+j]-128)+(Cb[y*width+x]-128))>>1)+128; + Cr[y*width+x] = (((Cb[y*width+x+j]-128)+(Cr[y*width+x]-128))>>1)+128; + } + } + } +} +static void _smear_apply_y_avg(VJFrame *frame, int width, int height, int val) +{ + unsigned int i,j; + unsigned int x,y; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + for(y=1; y < height; y++) + { + for(x=0; x < width; x++) + { + j = Y[y*width+x]; + if(j >= val) + { + if(j >= height) j = height-1; + i = j * width + x; + Y[y*width+x] = (Y[i]+Y[y*width+x])>>1; + Cb[y*width+x] = (((Cb[i]-128)+(Cb[y*width+x]-128))>>1)+128; + Cr[y*width+x] = (((Cr[i]-128)+(Cr[y*width+x]-128))>>1)+128; + } + } + } +} +static void _smear_apply_y(VJFrame *frame, int width, int height, int val) +{ + unsigned int i,j; + unsigned int x,y; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + for(y=1; y < height; y++) + { + for(x=0; x < width; x++) + { + j = Y[y*width+x]; + if(j >= val) + { + if(j >= height) j = height-1; + i = j * width + x; + Y[y*width+x] = Y[i]; + Cb[y*width+x] = Cb[i]; + Cr[y*width+x] = Cr[i]; + } + } + } +} + + +static int n__ = 0; +static int N__ = 0; + +void smear_apply( VJFrame *frame, int width, int height,int mode, int val) +{ + int interpolate = 1; + int tmp1 = mode; + int tmp2 = val; + int motion = 0; + if(motionmap_active()) + { + motionmap_scale_to( 255, 3, 0, 0, &tmp2, &tmp1, &n__, &N__ ); + motion = 1; + } + else + { + N__ = 0; + n__ = 0; + } + + if( n__ == N__ || n__ == 0 ) + interpolate = 0; + + switch(mode) + { + case 0: _smear_apply_x(frame,width,height,tmp2); break; + case 1: _smear_apply_x_avg(frame,width,height,tmp2); break; + case 2: _smear_apply_y(frame,width,height,tmp2); break; + case 3: _smear_apply_y_avg(frame,width,height,tmp2); break; + default: break; + } + + if( interpolate ) + { + motionmap_interpolate_frame( frame, N__,n__ ); + } + + if(motion) + { + motionmap_store_frame( frame ); + } + +} + diff --git a/veejay-server/libvje/effects/smear.h b/veejay-server/libvje/effects/smear.h new file mode 100644 index 00000000..2bddf94f --- /dev/null +++ b/veejay-server/libvje/effects/smear.h @@ -0,0 +1,29 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SMEAR_H +#define SMEAR_H +#include +#include +#include + +vj_effect *smear_init(int w, int h); +void smear_apply(VJFrame *frame, int width, int height,int mode, int val); +#endif diff --git a/veejay-server/libvje/effects/smuck.c b/veejay-server/libvje/effects/smuck.c new file mode 100644 index 00000000..6c1e7132 --- /dev/null +++ b/veejay-server/libvje/effects/smuck.c @@ -0,0 +1,77 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "smuck.h" +#include "common.h" +#include +#include + +static int smuck_rand_val; + +vj_effect *smuck_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 1; + ve->limits[0][0] = 0; + ve->limits[1][0] = 14; + + ve->description = "SmuckTV (EffectTV)"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static inline unsigned int smuck_fastrand() +{ + return (smuck_rand_val = smuck_rand_val * 1103516245 + 12345); +} + +/* this effect comes from Effect TV as well; the code for this one is in Transform + different is the smuck table containing some values. + This effect was originally created by Buddy Smith, one of EffecTV's developers from the USA +*/ +void smuck_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int n) +{ + unsigned int yd, xd, x, y; + // different table ... + const unsigned int smuck[15] = + { 30, 60, 58, 59, 57, 56, 55, 54, 53, 89, 90, 88, 87, 86, 85 }; + uint8_t *Y = frame->data[0]; + uint8_t *Y2 = frame2->data[0]; + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + yd = y + (smuck_fastrand() >> smuck[n]) - 2; + xd = x + (smuck_fastrand() >> smuck[n]) - 2; + if (xd > width) + xd = width-1; + if (yd > height) + yd = height; + Y[x + y * width] = Y2[xd + yd * width]; + } + } +} +void smuck_free(){} diff --git a/veejay-server/libvje/effects/smuck.h b/veejay-server/libvje/effects/smuck.h new file mode 100644 index 00000000..e6bd6ff7 --- /dev/null +++ b/veejay-server/libvje/effects/smuck.h @@ -0,0 +1,34 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SMUCK_H +#define SMUCK_H + + + +#include +#include +#include + +vj_effect *smuck_init(); +void smuck_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int level); +void smuck_free(); +#endif diff --git a/veejay-server/libvje/effects/softblur.c b/veejay-server/libvje/effects/softblur.c new file mode 100644 index 00000000..e64fe24a --- /dev/null +++ b/veejay-server/libvje/effects/softblur.c @@ -0,0 +1,208 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "softblur.h" +#include +#include + +vj_effect *softblur_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 0; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 1; /* 3*/ + ve->description = "Soft Blur (1x3) and (3x3)"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void softblur1_apply( VJFrame *frame, int width, int height) +{ + int r, c; + int len = (width * height); + uint8_t *Y = frame->data[0]; + for (r = 0; r < len; r += width) { + for (c = 1; c < width-1; c++) { + Y[c + r] = (Y[r + c - 1] + + Y[r + c] + + Y[r + c + 1] + ) / 3; + + } + } + +} + +void softblur3_apply(VJFrame *frame, int width, int height ) { + int r,c; + uint8_t *Y = frame->data[0]; + const int len = frame->len; + + for(c = 1; c < width - 1; c ++ ) + Y[c ] = (Y[c - 1] + + Y[c ] + + Y[c + 1] + ) / 3; + + + + + for(r=width; r < (len-width); r+=width) { + for(c=1; c < (width-1); c++) { + Y[r+c] = ( Y[r - width + c - 1] + + Y[r - width + c ] + + Y[r + c + 1] + + Y[r - width + c] + + Y[r + c] + + Y[r + c + 1] + + Y[r + width + c - 1] + + Y[r + width + c] + + Y[r + width + c + 1] ) / 9; + + } + } + + for( c = (len-width) ; c < len; c ++ ) + Y[c ] = (Y[c - 1] + + Y[c] + + Y[c + 1] + ) / 3; + + +} +#ifdef HAVE_ASM_MMX + +#undef HAVE_K6_2PLUS +#if !defined( HAVE_ASM_MMX2) && defined( HAVE_ASM_3DNOW ) +#define HAVE_K6_2PLUS +#endif + +#undef _EMMS + +#ifdef HAVE_K6_2PLUS +/* On K6 femms is faster of emms. On K7 femms is directly mapped on emms. */ +#define _EMMS "femms" +#else +#define _EMMS "emms" +#endif + + +/* mmx_blur() taken from libvisual plugins + * + * Libvisual-plugins - Standard plugins for libvisual + * + * Copyright (C) 2002, 2003, 2004, 2005 Dennis Smit + * + * Authors: Dennis Smit + */ + +static void mmx_blur(uint8_t *buffer, int width, int height) +{ + __asm __volatile + ("\n\t pxor %%mm6, %%mm6" + ::); + + int scrsh = (width * height) >> 1; + int i; + + int len = (width * height); + + uint8_t *buf = buffer; + /* Prepare substraction register */ + for (i = 0; i < scrsh; i += 4) { + __asm __volatile + ("\n\t movd %[buf], %%mm0" + "\n\t movd %[add1], %%mm1" + "\n\t punpcklbw %%mm6, %%mm0" + "\n\t movd %[add2], %%mm2" + "\n\t punpcklbw %%mm6, %%mm1" + "\n\t movd %[add3], %%mm3" + "\n\t punpcklbw %%mm6, %%mm2" + "\n\t paddw %%mm1, %%mm0" + "\n\t punpcklbw %%mm6, %%mm3" + "\n\t paddw %%mm2, %%mm0" + "\n\t paddw %%mm3, %%mm0" + "\n\t psrlw $2, %%mm0" + "\n\t packuswb %%mm6, %%mm0" + "\n\t movd %%mm0, %[buf]" + :: [buf] "m" (*(buf + i)) + , [add1] "m" (*(buf + i + width)) + , [add2] "m" (*(buf + i + width + 1)) + , [add3] "m" (*(buf + i + width - 1)) + ); + // : "mm0", "mm1", "mm2", "mm3", "mm6"); + } + + len = (width*height)-1; + + for (i = len-1; i > scrsh; i -= 4) { + __asm __volatile + ("\n\t movd %[buf], %%mm0" + "\n\t movd %[add1], %%mm1" + "\n\t punpcklbw %%mm6, %%mm0" + "\n\t movd %[add2], %%mm2" + "\n\t punpcklbw %%mm6, %%mm1" + "\n\t movd %[add3], %%mm3" + "\n\t punpcklbw %%mm6, %%mm2" + "\n\t paddw %%mm1, %%mm0" + "\n\t punpcklbw %%mm6, %%mm3" + "\n\t paddw %%mm2, %%mm0" + "\n\t paddw %%mm3, %%mm0" + "\n\t psrlw $2, %%mm0" + "\n\t packuswb %%mm6, %%mm0" + "\n\t movd %%mm0, %[buf]" + :: [buf] "m" (*(buf + i)) + , [add1] "m" (*(buf + i - width)) + , [add2] "m" (*(buf + i - width + 1)) + , [add3] "m" (*(buf + i - width - 1)) + );// : "mm0", "mm1", "mm2", "mm3", "mm6"); + } + + __asm__ __volatile__ ( _EMMS:::"memory"); + +} + +#endif + +void softblur_apply(VJFrame *frame, int width, int height, int type) +{ + switch (type) { + case 0: +#ifdef HAVE_ASM_MMX + mmx_blur( frame->data[0],width,height ); +#else + softblur1_apply(frame, width, height); +#endif + break; + break; + case 1: + softblur3_apply(frame, width, height); + break; + } +} + diff --git a/veejay-server/libvje/effects/softblur.h b/veejay-server/libvje/effects/softblur.h new file mode 100644 index 00000000..994b5309 --- /dev/null +++ b/veejay-server/libvje/effects/softblur.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SOFTBLUR_H +#define SOFTBLUR_H +#include +#include +#include + +vj_effect *softblur_init(int w, int h); +void softblur_apply(VJFrame *frame, int width, int height, int n); +void softblur_free(); +#endif diff --git a/veejay-server/libvje/effects/solarize.c b/veejay-server/libvje/effects/solarize.c new file mode 100644 index 00000000..0d5ae6fe --- /dev/null +++ b/veejay-server/libvje/effects/solarize.c @@ -0,0 +1,61 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "solarize.h" +#include +vj_effect *solarize_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults[0] = 16; + + ve->limits[0][0] = 1; /* threshold */ + ve->limits[1][0] = 255; + // negation by threshold + ve->description = "Solarize"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void solarize_apply( VJFrame *frame, int width, int height, int threshold) +{ + int i, len; + uint8_t val; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + len = frame->len; + for (i = 0; i < len; i++) { + val = Y[i]; + if (val > threshold) + { + Y[i] = 255 - val; + Cb[i] = 255 - Cb[i]; + Cr[i] = 255 - Cr[i]; + } + } +} +void solarize_free(){} diff --git a/veejay-server/libvje/effects/solarize.h b/veejay-server/libvje/effects/solarize.h new file mode 100644 index 00000000..b974d8cc --- /dev/null +++ b/veejay-server/libvje/effects/solarize.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SOLARIZE_H +#define SOLARIZE_H +#include +#include +#include + +vj_effect *solarize_init(); +void solarize_apply(VJFrame *frame, int width, int height, + int threshold); +void solarize_free(); +#endif diff --git a/veejay-server/libvje/effects/split.c b/veejay-server/libvje/effects/split.c new file mode 100644 index 00000000..08fafeec --- /dev/null +++ b/veejay-server/libvje/effects/split.c @@ -0,0 +1,772 @@ + /* Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * 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. + */ +#include "split.h" +static uint8_t *split_fixme[3]; +vj_effect *split_init(int width,int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 8; + ve->defaults[1] = 1; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 13; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + + ve->description = "Splitted Screens"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} +int split_malloc(int width, int height) +{ + split_fixme[0] = (uint8_t *) vj_calloc(sizeof(uint8_t) * width * height + 1); + if(!split_fixme[0]) return 0; + split_fixme[1] = (uint8_t *) vj_calloc(sizeof(uint8_t) * width * height ); + if(!split_fixme[1]) return 0; + split_fixme[2] = (uint8_t *) vj_calloc(sizeof(uint8_t) * width * height); + if(!split_fixme[2]) return 0; + return 1; + +} + +void split_free() { + if(split_fixme[0]) free(split_fixme[0]); + if(split_fixme[1]) free(split_fixme[1]); + if(split_fixme[2]) free(split_fixme[2]); +} + +void split_fib_downscale(VJFrame *frame, int width, int height) +{ + unsigned int i, len = frame->len/2; + unsigned int f; + unsigned int x, y; + int uv_width; + const int ilen = frame->len; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + i = 0; + for (y = 0; y < len; y += width) + { + for (x = 0; x < width; x++) + { + i++; + f = (i + 1) + (i - 1); + if( f >= ilen ) break; + Y[y + x] = Y[f]; + } + } + + i = 0; + uv_width = frame->uv_width; + + for (y = 0; y < uv_len; y += uv_width) + { + for (x = 0; x < uv_width; x++) { + i++; + f = (i + 1) + (i - 1); + if( f >= uv_len ) break; + Cb[y + x] = Cb[f]; + Cr[y + x] = Cr[f]; + } + } + +} +void split_fib_downscaleb(VJFrame *frame, int width, int height) +{ + unsigned int len = frame->len / 2; + unsigned int uv_len = frame->uv_len /2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + split_fib_downscale(frame, width, height); + veejay_memcpy( Y+len, Y , len ); + veejay_memcpy( Cb+uv_len, Cb, uv_len); + veejay_memcpy( Cr+uv_len, Cr, uv_len); +} + +void dosquarefib(VJFrame *frame, int width, int height) +{ + unsigned int i, len = frame->len / 2; + unsigned int f; + unsigned int x, y, y1, y2; + unsigned int uv_len = frame->uv_len; + unsigned int uv_width = frame->uv_width; + const unsigned int uv_height = frame->uv_height; + unsigned int w3 = width >> 2; + const unsigned int u_w3 = w3 >> frame->shift_h; + const unsigned int muv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + i = 0; + + for (y = 0; y < len; y += width) + { + for (x = 0; x < width; x++) { + i++; + f = (i + 1) + (i - 1); + split_fixme[0][y + x] = Y[f]; + } + } + i = 0; + for (y = 0; y < uv_len; y += uv_width) { + for (x = 0; x < uv_width; x++) { + i++; + f = (i + 1) + (i - 1); + if(f > muv_len) break; + // split_fixme[0][y + x] = Y[f]; + split_fixme[1][y + x] = Cb[f]; + split_fixme[2][y + x] = Cr[f]; + } + } + + len = len >> 1; + width = width >> 1; + for (y = 0; y < len; y += width) { + for (x = 0; x < width; x++) { + i++; + f = (i + 1) + (i - 1); + split_fixme[0][y + x] = split_fixme[0][f]; + // split_fixme[0][y + x] = split_fixme[1][f]; + // split_fixme[0][y + x] = split_fixme[2][f]; + } + } + uv_len = uv_len >> 1; + uv_width = uv_width >> 1; + for (y = 0; y < uv_len; y += uv_width) { + for (x = 0; x < uv_width; x++) { + i++; + f = (i + 1) + (i - 1); + if(f > muv_len) break; + split_fixme[1][y + x] = split_fixme[1][f]; + split_fixme[2][y + x] = split_fixme[2][f]; + } + } + + + for (y = 0; y < height; y++) { + y1 = (y * width) >> 1; + y2 = y * width; + for (i = 0; i < 4; i++) + for (x = 0; x < w3; x++) { + Y[y2 + x + (i * w3)] = split_fixme[0][y1 + x]; + } + } + for (y = 0; y < uv_height; y++) { + y1 = (y * uv_width) >> 1; + y2 = y * uv_width; + for (i = 0; i < 4; i++) + for (x = 0; x < u_w3; x++) { + Y[y2 + x + (i * u_w3)] = split_fixme[0][y1 + x]; + } + } + +} + +void split_push_downscale_uh(VJFrame *frame, int width, int height) +{ + + unsigned int len = frame->len/2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + veejay_memcpy( split_fixme[0], Y, len); + veejay_memcpy( split_fixme[1], Cb, len); + veejay_memcpy( split_fixme[2], Cr, len); + +} +void split_push_downscale_lh(VJFrame *frame, int width, int height) +{ + + unsigned int x, y, y1, y2, j = 0; + + int hlen = height / 2; + const int uv_width = frame->uv_width; + const int uv_height = frame->uv_height; + const int uv_hlen = frame->uv_len / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + for (y = 0; y < height; y+=2) + { + j++; + y2 = j * width; + y1 = y * width; + for (x = 0; x < width; x++) { + split_fixme[0][y2 + x] = Y[y1 + x]; + } + } + + j = 0; + for (y = 0; y < uv_height; y+=2) { + j++; + y2 = j * uv_width; + y1 = y * uv_width; + for (x = 0; x < uv_width; x++) { + split_fixme[1][y2 + x] = Cb[y1 + x]; + split_fixme[2][y2 + x] = Cr[y1 + x]; + } + } + + veejay_memcpy( Y+hlen, split_fixme[0] , hlen ); + veejay_memcpy( Cb+uv_hlen, split_fixme[1], uv_hlen); + veejay_memcpy( Cr+uv_hlen, split_fixme[2], uv_hlen); +} + +void split_push_vscale_left(VJFrame *frame, int width, int height) +{ + unsigned int x, y, y1; + + unsigned int wlen = width >> 1; //half + const int uv_height = frame->uv_height; + const int uv_width = frame->uv_width; + const int uv_wlen = frame->uv_width >> frame->shift_h; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + for (y = 0; y < height; y++) + { + y1 = y * width; + for (x = 0; x < wlen; x++) + { + split_fixme[0][y1 + x] = Y[y1 + (x << 1)]; + } + } + + for (y = 0; y < uv_height; y++) + { + y1 = y * uv_width; + for (x = 0; x < uv_wlen; x++) + { + split_fixme[1][y1 + x] = Cb[y1 + (x << 1)]; + split_fixme[2][y1 + x] = Cr[y1 + (x << 1)]; + } + } + + + for (y = 0; y < height; y++) + { + y1 = y * width; + for (x = 0; x < wlen; x++) + { + Y[y1 + x] = split_fixme[0][y1 + x]; + } + } + + for (y = 0; y < uv_height; y++) { + y1 = y * uv_width; + for (x = 0; x < uv_wlen; x++) { + Cb[y1 + x] = split_fixme[1][y1 + x]; + Cr[y1 + x] = split_fixme[2][y1 + x]; + } + } + + +} +void split_push_vscale_right(VJFrame *frame, int width, int height) +{ + unsigned int x, y, y1; + unsigned int wlen = width >> 1; + const int uv_height = frame->uv_height; + const int uv_width = frame->uv_width; + const int uv_wlen = frame->uv_width / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + + for (y = 0; y < height; y++) { + y1 = y * width; + for (x = 0; x < wlen; x++) { + split_fixme[0][y1 + x] = Y[y1 + (x * 2)]; +// split_fixme[1][y1 + x] = Cb[y1 + (x * 2)]; +// split_fixme[2][y1 + x] = Cr[y1 + (x * 2)]; + } + } + for (y = 0; y < uv_height; y++) { + y1 = y * uv_width; + for (x = 0; x < uv_wlen; x++) { +// split_fixme[0][y1 + x] = Y[y1 + (x * 2)]; + split_fixme[1][y1 + x] = Cb[y1 + (x * 2)]; + split_fixme[2][y1 + x] = Cr[y1 + (x * 2)]; + } + } + + for (y = 0; y < height; y++) { + y1 = y * width; + for (x = 0; x < wlen; x++) { + Y[y1 + x + wlen] = split_fixme[0][y1 + x]; +// Cb[y1 + x + wlen] = split_fixme[1][y1 + x]; +// Cr[y1 + x + wlen] = split_fixme[2][y1 + x]; + } + } + for (y = 0; y < uv_height; y++) { + y1 = y * uv_width; + for (x = 0; x < uv_wlen; x++) { +// Y[y1 + x + wlen] = split_fixme[0][y1 + x]; + Cb[y1 + x + uv_wlen] = split_fixme[1][y1 + x]; + Cr[y1 + x + uv_wlen] = split_fixme[2][y1 + x]; + } + } + +} + + + +void split_corner_framedata_ul(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int w_len = width / 2; + unsigned int h_len = height / 2; + unsigned int x, y; + unsigned int y1; + const int uv_width = frame->uv_width; + const int uv_wlen = frame->uv_width / 2; + const int uv_hlen = frame->uv_height / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (y = 0; y < h_len; y++) { + y1 = width * y; + for (x = 0; x < w_len; x++) { + Y[y1 + x] = Y2[y1 + x]; + } + } + for (y = 0; y < uv_hlen; y++) { + y1 = uv_width * y; + for (x = 0; x < uv_wlen; x++) { + Cb[y1 + x] = Cb2[y1 + x]; + Cr[y1 + x] = Cr2[y1 + x]; + } + } + + +} +void split_corner_framedata_ur(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int w_len = width / 2; + unsigned int h_len = height / 2; + unsigned int x, y; + unsigned int y1; + const int uv_width = frame->uv_width; + const int uv_wlen = frame->uv_width / 2; + const int uv_hlen = frame->uv_height / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + for (y = 0; y < h_len; y++) { + y1 = width * y; + for (x = w_len; x < width; x++) { + Y[y1 + x] = Y2[y1 + x]; + // Cb[y1 + x] = Cb2[y1 + x]; + // Cr[y1 + x] = Cr2[y1 + x]; + + } + } + for (y = 0; y < uv_hlen; y++) { + y1 = uv_width * y; + for (x = uv_wlen; x < uv_width; x++) { + // Y[y1 + x] = Y2[y1 + x]; + Cb[y1 + x] = Cb2[y1 + x]; + Cr[y1 + x] = Cr2[y1 + x]; + + } + } + +} +void split_corner_framedata_dl(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int w_len = width / 2; + unsigned int h_len = height / 2; + unsigned int x, y; + unsigned int y1; + const int uv_height = frame->uv_height; + const int uv_width = frame->uv_width; + const int uv_wlen = frame->uv_width / 2; + const int uv_hlen = frame->uv_height / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + + for (y = h_len; y < height; y++) { + y1 = width * y; + for (x = 0; x < w_len; x++) { + Y[y1 + x] = Y2[y1 + x]; + // Cb[y1 + x] = Cb2[y1 + x]; + // Cr[y1 + x] = Cr2[y1 + x]; + } + } + for (y = uv_hlen; y < uv_height; y++) { + y1 = uv_width * y; + for (x = 0; x < uv_wlen; x++) { + Cb[y1 + x] = Cb2[y1 + x]; + Cr[y1 + x] = Cr2[y1 + x]; + } + } + +} + + +void split_corner_framedata_dr(VJFrame *frame, VJFrame *frame2, + int width, int height) +{ + unsigned int w_len = width / 2; + unsigned int h_len = height / 2; + unsigned int x, y; + unsigned int y1; + const int uv_height = frame->uv_height; + const int uv_width = frame->uv_width; + const int uv_wlen = frame->uv_width / 2; + const int uv_hlen = frame->uv_height / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + + for (y = h_len; y < height; y++) { + y1 = width * y; + for (x = w_len; x < width; x++) { + Y[y1 + x] = Y2[y1 + x]; +// Cb[y1 + x] = Cb2[y1 + x]; +// Cr[y1 + x] = Cr2[y1 + x]; + } + } + for (y = uv_hlen; y < uv_height; y++) { + y1 = uv_width * y; + for (x = uv_wlen; x < uv_width; x++) { + Cb[y1 + x] = Cb2[y1 + x]; + Cr[y1 + x] = Cr2[y1 + x]; + } + } + +} + + +void split_v_first_halfs(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + + unsigned int r, c; + const int uv_height = frame->uv_height; + const int uv_width = frame->uv_width; + const int uv_len = uv_height * uv_width; + + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + + for (r = 0; r < (width * height); r += width) { + for (c = width / 2; c < width; c++) { + Y[c + r] = Y2[(width - c) + r]; + // Cb[c + r] = Cb2[(width - c) + r]; + // Cr[c + r] = Cr2[(width - c) + r]; + } + } + for (r = 0; r < uv_len; r += uv_width) { + for (c = uv_width/2; c < uv_width; c++) { + Cb[c + r] = Cb2[(uv_width - c) + r]; + Cr[c + r] = Cr2[(uv_width - c) + r]; + } + } + +} +void split_v_second_half(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int r, c; + const int uv_height = frame->uv_height; + const int uv_width = frame->uv_width; + const int uv_len = uv_height * uv_width; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + + for (r = 0; r < (width * height); r += width) { + for (c = width / 2; c < width; c++) { + Y[c + r] = Y2[c + r]; +// Cb[c + r] = Cb2[c + r]; +// Cr[c + r] = Cr2[c + r]; + } + } + + + for (r = 0; r < uv_len; r += uv_width) { + for (c = uv_width / 2; c < uv_width; c++) { + // Y[c + r] = Y2[c + r]; + Cb[c + r] = Cb2[c + r]; + Cr[c + r] = Cr2[c + r]; + } + } +} + +void split_v_first_half(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int r, c; + + const int uv_height = frame->uv_height; + const int uv_width = frame->uv_width; + const int uv_len = uv_height * uv_width; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + + for (r = 0; r < (width * height); r += width) { + for (c = 0; c < width / 2; c++) { + Y[c + r] = Y2[c + r]; + // Cb[c + r] = Cb2[c + r]; + // Cr[c + r] = Cr2[c + r]; + } + } + + for (r = 0; r < uv_len; r += uv_width) { + for (c = 0; c < uv_width / 2; c++) { +// Y[c + r] = Y2[c + r]; + Cb[c + r] = Cb2[c + r]; + Cr[c + r] = Cr2[c + r]; + } + } + +} + +void split_v_second_halfs(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int r, c; + const int lw = width / 2; + const int len = frame->len; + const int uv_height = frame->uv_height; + const int uv_width = frame->uv_width; + const int uv_len = uv_height * uv_width; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + + for (r = 0; r < len; r += width) { + for (c = 0; c < lw; c++) { + Y[c + r] = Y2[(width - c) + r]; +// Cb[c + r] = Cb2[(width - c) + r]; +// Cr[c + r] = Cr2[(width - c) + r]; + } + } + + for (r = 0; r < uv_len; r += uv_width) { + for (c = 0; c < (uv_width/2); c++) { +// Y[c + r] = Y2[(width - c) + r]; + Cb[c + r] = Cb2[(width - c) + r]; + Cr[c + r] = Cr2[(width - c) + r]; + } + } + + + + + +} + +void split_h_first_half(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + const int len = frame->len / 2; + const int uv_len = frame->uv_len / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + veejay_memcpy(Y, Y2, len); + veejay_memcpy(Cb, Cb2, uv_len); + veejay_memcpy(Cr, Cr2, uv_len); + +} +void split_h_second_half(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + const unsigned int len = frame->len / 2; + const unsigned int uv_len = frame->uv_len / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + veejay_memcpy( Y, Y2+len, len ); + veejay_memcpy( Cb, Cb2+uv_len, uv_len ); + veejay_memcpy( Cr, Cr2+uv_len, uv_len ); +} +void split_h_first_halfs(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + const unsigned int len = frame->len / 2; + const unsigned int uv_len = frame->uv_len / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + veejay_memcpy( Y, Y2, len ); + veejay_memcpy( Cb, Cb2, uv_len); + veejay_memcpy( Cr, Cr2, uv_len); +} +void split_h_second_halfs(VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + const unsigned int len = frame->len / 2; + const unsigned int uv_len = frame->uv_len / 2; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + veejay_memcpy( Y+len, Y2, len ); + veejay_memcpy( Cb+uv_len, Cb2, uv_len); + veejay_memcpy( Cr+uv_len, Cr2, uv_len); +} + +void split_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n, int swap) +{ + switch (n) { + case 0: + if (swap) + split_push_downscale_uh(frame2, width, height); + split_h_first_half(frame, frame2, width, height); + break; + case 1: + //if (swap) + // split_push_downscale_lh(frame2, width, height); + split_h_second_half(frame, frame2, width, height); + break; + case 2: + //if (swap) + // split_push_downscale_lh(frame2, width, height); + /**/ split_h_first_halfs(frame, frame2, width, height); + break; + case 3: + if (swap) + split_push_downscale_uh(frame2, width, height); + /**/ split_h_second_halfs(frame, frame2, width, height); + break; + case 4: + if (swap) + split_push_vscale_left(frame2, width, height); + /**/ split_v_first_half(frame, frame2, width, height); + break; + case 5: + if (swap) + split_push_vscale_right(frame2, width, height); + /**/ split_v_second_half(frame, frame2, width, height); + break; + case 6: + if (swap) + split_push_vscale_left(frame2, width, height); + /**/ split_v_first_halfs(frame, frame2, width, height); + break; + + case 7: + //if (swap) + split_push_vscale_right(frame2, width, height); + // split_v_second_halfs(frame, frame2, width, height); + break; + case 8: + if (swap) + split_fib_downscale(frame2, width, height); + split_corner_framedata_ul(frame, frame2, width, height); + break; + case 9: + if (swap) + split_fib_downscale(frame2, width, height); + split_corner_framedata_ur(frame, frame2, width, height); + break; + case 10: + if (swap) + split_fib_downscaleb(frame2, width, height); + split_corner_framedata_dr(frame, frame2, width, height); + break; + case 11: + if (swap) + split_fib_downscaleb(frame2, width, height); + /**/ split_corner_framedata_dl(frame, frame2, width, height); + break; + case 12: + split_push_vscale_left(frame2, width, height); + /**/ split_push_vscale_right(frame, width, height); + split_v_first_half(frame, frame2, width, height); + break; + case 13: + split_push_downscale_uh(frame2, width, height); + // split_push_downscale_lh(frame, width, height); + split_h_first_half(frame, frame2, width, height); + break; + } + +} diff --git a/veejay-server/libvje/effects/split.h b/veejay-server/libvje/effects/split.h new file mode 100644 index 00000000..c3febc8f --- /dev/null +++ b/veejay-server/libvje/effects/split.h @@ -0,0 +1,34 @@ + +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SPLIT_H +#define SPLIT_H +#include +#include +#include +#include + +vj_effect *split_init(int width, int height); +int split_malloc(int w, int h); +void split_free(); +void split_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int n, int swap); +#endif diff --git a/veejay-server/libvje/effects/swirl.c b/veejay-server/libvje/effects/swirl.c new file mode 100644 index 00000000..0cc7b9a8 --- /dev/null +++ b/veejay-server/libvje/effects/swirl.c @@ -0,0 +1,180 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "swirl.h" +#include +#include "common.h" +#include + +vj_effect *swirl_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = 360; + ve->defaults[0] = 250; + ve->description = "Swirl"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} +// FIXME private +static double *polar_map; +static double *fish_angle; +static int *cached_coords; +static uint8_t *buf[3]; + + +int swirl_malloc(int w, int h) +{ + int x,y; + int h2=h/2; + int w2=w/2; + int p = 0; + + buf[0] = (uint8_t*) vj_yuvalloc( w , h ); + if(!buf[0]) return 0; + buf[1] = buf[0] + (w * h); + buf[2] = buf[1] + (w * h); + + polar_map = (double*) vj_calloc(sizeof(double) * w* h ); + if(!polar_map) return 0; + fish_angle = (double*) vj_calloc(sizeof(double) * w* h ); + if(!fish_angle) return 0; + + cached_coords = (int*) vj_calloc(sizeof(int) * w * h ); + if(!cached_coords) return 0; + + for(y=(-1 *h2); y < (h-h2); y++) + { + for(x=(-1 * w2); x < (w-w2); x++) + { + p = (h2+y) * w + (w2+x); + polar_map[p] = sqrt( y*y + x*x ); + fish_angle[p] = atan2( (float) y, x); + } + } + + return 1; +} + +void swirl_free() +{ + if(buf[0]) + free(buf[0]); + buf[1] = NULL; + buf[2] = NULL; + + if(polar_map) + free(polar_map); + if(fish_angle) + free(fish_angle); +} + + +static int _v = 0; +void swirl_apply(VJFrame *frame, int w, int h, int v) +{ + int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + + if( v != _v ) + { + //const double curve = (double) v; + const unsigned int R = w; + const double coeef = v; + //const double coeef = R / log(curve * R + 1); + //const double coeef = R / log( curve * R + 2); + /* pre calculate */ + unsigned int i; + int px,py; + double r,a; + double si,co; + const int w2 = w/2; + const int h2 = h/2; + + for(i=0; i < len; i++) + { + r = polar_map[i]; + a = fish_angle[i]; + if(r <= R) + { + //uncomment for simple fisheye + //p_y = a; + //p_r = (r*r)/R; + //sin_cos( co, si, p_y ); + sin_cos( co,si, (a+r/coeef)); + px = (int) ( r * co ); + py = (int) ( r * si ); + //sin_cos( co, si, (double)v ); + //px = (int) (r * co); + //py = (int) (r * si); + //px = (int) ( p_r * co); + //py = (int) ( p_r * si); + px += w2; + py += h2; + + if(px < 0) px =0; + if(px > w) px = w; + if(py < 0) py = 0; + if(py >= (h-1)) py = h-1; + + cached_coords[i] = (py * w)+px; + + } + else + { + cached_coords[i] = -1; + + } + } + _v = v; + + } + veejay_memcpy(buf[0], Y,len); + veejay_memcpy(buf[1], Cb,len); + veejay_memcpy(buf[2], Cr,len); + + for(i=0; i < len; i++) + { + if(cached_coords[i] == -1) + { + Y[i] = pixel_Y_lo_; + Cb[i] = 128; + Cr[i] = 128; + } + else + { + + Y[i] = Y[ cached_coords[i] ]; + Cb[i] = Cb[ cached_coords[i] ]; + Cr[i] = Cr[ cached_coords[i] ]; + } + } +} diff --git a/veejay-server/libvje/effects/swirl.h b/veejay-server/libvje/effects/swirl.h new file mode 100644 index 00000000..9ad054bf --- /dev/null +++ b/veejay-server/libvje/effects/swirl.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SWIRL_H +#define SWIRL_H +#include +#include +#include + +vj_effect *swirl_init(int w, int h); +int swirl_malloc(int w, int h); +void swirl_free(); +void swirl_apply(VJFrame *frame, int width, int height, int val); +#endif diff --git a/veejay-server/libvje/effects/texmap.c b/veejay-server/libvje/effects/texmap.c new file mode 100644 index 00000000..98c7f612 --- /dev/null +++ b/veejay-server/libvje/effects/texmap.c @@ -0,0 +1,532 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "diff.h" +#include "common.h" +#include +#include +#include +#include AVUTIL_INC +#include +#include +#include + +#include "softblur.h" +static uint8_t *static_bg = NULL; +static int take_bg_ = 0; +static uint32_t *dt_map = NULL; +static void *shrink_ = NULL; +static sws_template template_; +static VJFrame to_shrink_; +static VJFrame shrinked_; +static int dw_, dh_; +static int x_[255]; +static int y_[255]; +static void *proj_[255]; +static int *coord_x = NULL; +static int *coord_y = NULL; + +typedef struct +{ + uint32_t *data; + uint8_t *bitmap; + uint8_t *current; +} texmap_data; + +typedef struct +{ + int x; + int y; +} point_t; + +static point_t **points = NULL; + +vj_effect *texmap_init(int width, int height) +{ + //int i,j; + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; /* reverse */ + ve->limits[1][1] = 1; + ve->limits[0][2] = 0; /* show mask */ + ve->limits[1][2] = 4; + ve->limits[0][3] = 0; /* switch to take bg mask */ + ve->limits[1][3] = 1; + ve->limits[0][4] = 1; /* thinning */ + ve->limits[1][4] = 100; + ve->limits[0][5] = 1; /* minimum blob weight */ + ve->limits[1][5] = 5000; + + ve->defaults[0] = 30; + ve->defaults[1] = 0; + ve->defaults[2] = 2; + ve->defaults[3] = 0; + ve->defaults[4] = 5; + ve->defaults[5] = 200; + + ve->description = "Map B to A (sub bg, texture map))"; + ve->extra_frame = 1; + ve->sub_format = 1; + ve->has_user = 1; + ve->user_data = NULL; + return ve; +} + +void texmap_destroy(void) +{ + if(static_bg) + free(static_bg); + if(dt_map) + free(dt_map); + static_bg = NULL; + dt_map = NULL; + +} + +#define ru8(num)(((num)+8)&~8) +static int nearest_div(int val ) +{ + int r = val % 8; + while(r--) + val--; + return val; +} +int texmap_malloc(void **d, int width, int height) +{ + texmap_data *my; + *d = (void*) vj_calloc(sizeof(texmap_data)); + my = (texmap_data*) *d; + + dw_ = nearest_div( width / 8 ); + dh_ = nearest_div( height / 8 ); + + my->current = (uint8_t*) vj_calloc( ru8( sizeof(uint8_t) * dw_ * dh_ * 4 ) ); + my->data = (uint32_t*) vj_calloc( ru8(sizeof(uint32_t) * width * height * 2) ); + my->bitmap = (uint8_t*) vj_calloc( ru8(sizeof(uint8_t) * width * height * 2)); + + if(static_bg == NULL) + static_bg = (uint8_t*) vj_calloc( ru8( width + width * height * sizeof(uint8_t)) ); + if(dt_map == NULL ) + dt_map = (uint32_t*) vj_calloc( ru8(width * height * sizeof(uint32_t) + width ) ); + + veejay_memset( &template_, 0, sizeof(sws_template) ); + veejay_memset( proj_, 0, sizeof(proj_) ); + + template_.flags = 1; + + vj_get_yuvgrey_template( &to_shrink_, width, height ); + vj_get_yuvgrey_template( &shrinked_ , dw_, dh_ ); + + shrink_ = yuv_init_swscaler( + &(to_shrink_), + &(shrinked_), + &template_ , + yuv_sws_get_cpu_flags() ); + + points = (point_t**) vj_calloc( sizeof(point_t) * 12000 ); + int i; + for( i = 0; i < 12000;i ++ ) + points[i] = (point_t*) vj_calloc(sizeof(point_t)); + + + veejay_memset( x_, 0, sizeof(x_) ); + veejay_memset( y_, 0, sizeof(y_) ); + + return 1; +} + +void texmap_free(void *d) +{ + if(d) + { + texmap_data *my = (texmap_data*) d; + if(my->data) free(my->data); + if(my->current) free(my->current); + if(my->bitmap) free(my->bitmap); + free(d); + } + + if( shrink_ ) + { + yuv_free_swscaler( shrink_ ); + shrink_ = NULL; + } + + int i; + for( i = 0; i < 255; i++ ) + if( proj_[i] ) + viewport_destroy( proj_[i] ); + + if( points ) + { + for( i = 0; i < 12000; i ++ ) + if( points[i]) free(points[i]); + free(points); + } + + d = NULL; +} + +void texmap_prepare(void *user, uint8_t *map[3], int width, int height) +{ + if(!static_bg ) + { + veejay_msg(0,"FX \"Map B to A (substract background mask)\" not initialized"); + return; + } + + veejay_memcpy( static_bg, map[0], (width*height)); + + VJFrame tmp; + veejay_memset( &tmp, 0, sizeof(VJFrame)); + tmp.data[0] = static_bg; + tmp.width = width; + tmp.height = height; + softblur_apply( &tmp, width,height,0); + + veejay_msg(0, "Snapped and softblurred current frame to use as background mask"); +} + +static void binarify( uint8_t *bm, uint32_t *dst, uint8_t *bg, uint8_t *src,int threshold,int reverse, const int len ) +{ + int i; + if(!reverse) + { + for( i = 0; i < len; i ++ ) + { + if ( abs(bg[i] - src[i]) <= threshold ) + { dst[i] = 0; bm[i] = 0; } + else + { dst[i] = 1; bm[i] = 0xff; } + } + + } + else + { + for( i = 0; i < len; i ++ ) + { + if ( abs(bg[i] - src[i]) >= threshold ) + { dst[i] = 0; bm[i] = 0; } + else + { dst[i] = 1; bm[i] = 0xff; } + + } + } +} + +static void texmap_centroid() +{ + +} + +static int bg_frame_ = 0; + +extern int vj_composite_active(); + +extern void vj_composite_transform( void *points, int n_points, int blob_id, int dx, int dy, int w, int h, int num, + void *plane ); + +void texmap_apply(void *ed, VJFrame *frame, + VJFrame *frame2, int width, int height, + int threshold, int reverse,int mode, int take_bg, int feather, int min_blob_weight) +{ + + unsigned int i,j,k; + const uint32_t len = frame->len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + uint32_t cx[256]; + uint32_t cy[256]; + uint32_t xsize[256]; + uint32_t ysize[256]; + + float sx = (float) width / (float) dw_; + float sy = (float) height / (float) dh_; + float sw = (float) sqrt( sx * sy ); + + int packets = 0; + + veejay_memset( cx,0,sizeof(cx)); + veejay_memset( cy,0,sizeof(cy)); + + veejay_memset( xsize,0,sizeof(xsize)); + veejay_memset( ysize,0,sizeof(ysize)); + + texmap_data *ud = (texmap_data*) ed; + + if( take_bg != take_bg_ ) + { + veejay_memcpy( static_bg, frame->data[0], frame->len ); + /* VJFrame tmp; + veejay_memset( &tmp, 0, sizeof(VJFrame)); + tmp.data[0] = static_bg; + tmp.width = width; + tmp.height = height; + softblur_apply( &tmp, width,height,0); + */ + take_bg_ = take_bg; + bg_frame_ ++; + return; + } + if( bg_frame_ > 0 && bg_frame_ < 4 ) + { + for( i = 0 ; i < len ; i ++ ) + { + static_bg[i] = (static_bg[i] + Y[i] ) >> 1; + } + bg_frame_ ++; + return; + } + + //@ clear distance transform map + veejay_memset( dt_map, 0 , len * sizeof(uint32_t) ); + + //@ todo: optimize with mmx + binarify( ud->bitmap, ud->data, static_bg, frame->data[0], threshold, reverse,len ); + + if(mode==1) + { + //@ show difference image in grayscale + veejay_memcpy( Y, ud->bitmap, len ); + veejay_memset( Cb, 128, len ); + veejay_memset( Cr, 128, len ); + vj_dummy_send(); + return; + } + + //@ calculate distance map + veejay_distance_transform( ud->data, width, height, dt_map ); + + if( mode ==3 ) + { + //@ process dt map + for( i = 0; i < len ;i ++ ) + { + if( dt_map[ i ] >= feather ) + { + Y[i] = Y2[i]; + Cb[i] = Cb2[i]; + Cr[i] = Cr2[i]; + } + else + { + Y[i] = 0; + Cb[i] = 128; + Cr[i] = 128; + } + } + vj_dummy_send(); + return; + } + + to_shrink_.data[0] = ud->bitmap; + shrinked_.data[0] = ud->current; + + uint32_t blobs[255]; + + veejay_memset( blobs, 0, sizeof(blobs) ); + + yuv_convert_and_scale_grey( shrink_, &to_shrink_, &shrinked_ ); + + uint32_t labels = veejay_component_labeling_8(dw_,dh_, shrinked_.data[0], blobs, cx,cy,xsize,ysize, + min_blob_weight); + + + + if (mode == 2 ) + { + //@ show dt map as grayscale image, intensity starts at 128 + for( i = 0; i < len ; i ++ ) + { + if( dt_map[i] == feather ) + Y[i] = 0xff; //@ border white + else if( dt_map[i] > feather ) { + Y[i] = 128 + (dt_map[i] % 128); //grayscale value + } else if ( dt_map[i] == 1 ) { + Y[i] = 0xff; + } else { + Y[i] = 0; //@ black (background) + } + Cb[i] = 128; + Cr[i] = 128; + } + vj_dummy_send(); + return; + } + + if(! vj_composite_active() ) + { + vj_dummy_send(); + return; + } + + int num_objects = 0; + for( i = 1; i <=labels; i ++ ) + if( blobs[i] ) + num_objects ++; + + //@ Iterate over blob's bounding boxes and extract contours + for( i = 1; i <= labels; i ++ ) + { + if( blobs[i] > 0 ) + { + int nx = cx[i] * sx; + int ny = cy[i] * sy; + int size_x = xsize[i] * sx; + int size_y = ysize[i] * sy * 0.5; + + int x1 = nx - size_x; + int y1 = ny - size_y; + int x2 = nx + size_y; + int y2 = ny + size_y; + + int n_points = 0; + int dx1 = 0, dy1=0; + int center = 0; + + if( x1 < 0 ) x1 = 0; else if ( x1 > width ) x1 = width; + if( x2 < 0 ) x2 = 0; else if ( x2 > width ) x2 = width; + if( y1 < 0 ) y1 = 0; else if ( y1 >= height ) y1 = height -1; + if( y2 < 0 ) y2 = 0; else if ( y2 >= height ) y2 = height -1; + + for( k = y1; k < y2; k ++ ) + { + for( j = x1; j < x2; j ++ ) + { + if( dt_map[ (k* width + j) ] > center ) + { + center = dt_map[ (k*width+j) ]; + dx1 = j; + dy1 = k; + } + if( dt_map[ (k * width + j) ] == feather ) + { + points[n_points]->x = j; //@ produces unsorted list of coordinates + points[n_points]->y = k; + n_points++; + if( n_points >= 10000 ) + { + veejay_msg(0, "Too many points in contour"); + return; + } + } + } + } + vj_composite_transform( + (void*) points, + n_points, i, + dx1, + dy1, + width, + height, + num_objects,(mode == 2 ? Y: NULL)); + + } + } + + veejay_memset( Y, 0 , len ); + veejay_memset( Cb, 128, len ); + veejay_memset( Cr, 128, len ); + + for( i = 1; i <= labels; i ++ ) + { + if( blobs[i] > 0 ) + { + int radius = (int) ( 0.5 + sqrt( sw * blobs[i]) ); + int nx = cx[i] * sx; + int ny = cy[i] * sy; + int size_x = xsize[i] * sx; + int size_y = ysize[i] * sy * 0.5; // over size in x axis + + if( mode != 4 && ( abs( nx - x_[i] ) > 10 || abs( ny - y_[i] ) > 10 ) ) + //if( mode!=4 && cx[i] != x_[i] || cy[i] != y_[i] || !proj_[i]) + { + x_[i] = nx; + y_[i] = ny; + + int x1 = nx - size_x; + int y1 = ny - size_y; + int x2 = nx + size_x; + int y2 = ny + size_y; + + if( x1 < 0 ) x1 = 0; else if ( x1 > width ) x1 = width; + if( x2 < 0 ) x2 = 0; else if ( x2 > width ) x2 = width; + if( y1 < 0 ) y1 = 0; else if ( y1 >= height ) y1 = height -1; + if( y2 < 0 ) y2 = 0; else if ( y2 >= height ) y2 = height -1; + + if(proj_[i]) + viewport_destroy( proj_[i] ); + proj_[i] = viewport_fx_init_map( width,height, + x1, + y1, + x2, + y1, + x2, + y2, + x1, + y2 ); + if(!proj_[i]) + return; + } + + if( mode == 4 ) + { + viewport_line( Y, nx - size_x, ny - size_y , + nx + size_x, ny - size_y , + width, height, 0xff ); + + viewport_line( Y, nx - size_x, ny - size_y , + nx - size_x, ny + size_y , + width, height, 0xff ); + + viewport_line( Y, nx + size_x, ny - size_y , + nx + size_x, ny + size_y , + width, height, 0xff ); + + viewport_line( Y, nx - size_x, ny + size_y, + nx + size_x, ny + size_y , + width, height, 128 ); + } + else + { + viewport_process_dynamic_map( proj_[i], frame2->data, frame->data, dt_map, feather ); + packets++; + } + } + } + if(!packets) + vj_dummy_send(); + +} + + + + diff --git a/veejay-server/libvje/effects/texmap.h b/veejay-server/libvje/effects/texmap.h new file mode 100644 index 00000000..d6b430cb --- /dev/null +++ b/veejay-server/libvje/effects/texmap.h @@ -0,0 +1,35 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TMAPEFFECT_H +#define TMAPEFFECT_H +#include +#include +#include + +vj_effect *texmap_init(int width, int height); +void texmap_free(void *d); +int texmap_malloc(void **c, int w, int h); +void texmap_prepare(void *d, uint8_t *map[3], int w, int h); +void texmap_apply(void *d , VJFrame *frame, + VJFrame *frame2, int width, int height, + int th, int reverse, int show, int take, int feather, int blob); +void texmap_destroy(); +#endif diff --git a/veejay-server/libvje/effects/threshold.c b/veejay-server/libvje/effects/threshold.c new file mode 100644 index 00000000..bfc6c795 --- /dev/null +++ b/veejay-server/libvje/effects/threshold.c @@ -0,0 +1,311 @@ +/* + * Linux VeeJay + * + * Copyright(C)2006 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "threshold.h" +#include "common.h" +#include "softblur.h" + +typedef int (*morph_func)(uint8_t *kernel, uint8_t mt[9] ); + +vj_effect *threshold_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; // threshold + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; // reverse + ve->limits[1][1] = 1; + + ve->defaults[0] = 40; + ve->defaults[1] = 0; + ve->description = "Map B from threshold mask"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + + +static uint8_t *binary_img; +#define RUP8(num)(((num)+8)&~8) + +int threshold_malloc(int w, int h ) +{ + binary_img = (uint8_t*) vj_malloc(sizeof(uint8_t) * RUP8(w * h) ); + if(!binary_img) return 0; + return 1; +} + +void threshold_free(void) +{ + if(binary_img) + free(binary_img); + binary_img = NULL; +} + +#ifndef MIN +#define MIN(a,b) ( (a)>(b) ? (b) : (a) ) +#endif +#ifndef MAX +#define MAX(a,b) ( (a)>(b) ? (a) : (b) ) +#endif + +static int _dilate_kernel3x3( uint8_t *kernel, uint8_t img[9]) +{ + register int x; + /* consider all background pixels (0) in input image */ + for(x = 0; x < 9; x ++ ) + if((kernel[x] * img[x]) > 0 ) + return 1; + return 0; +} + +#ifdef HAVE_ASM_MMX +#undef HAVE_K6_2PLUS +#if !defined( HAVE_ASM_MMX2) && defined( HAVE_ASM_3DNOW ) +#define HAVE_K6_2PLUS +#endif + +#undef _EMMS + +#ifdef HAVE_K6_2PLUS +/* On K6 femms is faster of emms. On K7 femms is directly mapped on emms. */ +#define _EMMS "femms" +#else +#define _EMMS "emms" +#endif + +static inline void load_binary_map( uint8_t *mask ) +{ + __asm __volatile( + "movq (%0), %%mm0\n\t" + :: "r" (mask) + ); +} + +static inline void map_luma( uint8_t *dst, uint8_t *B ) +//static inline void map_luma( uint8_t *dst, uint8_t *B, uint8_t *mask ) +{ + __asm __volatile( + // "movq (%0), %%mm0\n\t" + "movq (%0), %%mm1\n\t" + "pand %%mm0, %%mm1\n\t" + "movq %%mm1, (%1)\n\t" + // :: "r" (mask), "r" (B), "r" (dst) + :: "r" (B) , "r" (dst) + ); +} + +static inline void load_chroma( uint8_t val ) +{ + uint8_t mask[8] = { val,val,val,val, val,val,val,val }; + uint8_t *m = &mask[0]; + + __asm __volatile( + "movq (%0), %%mm3\n\t # mm3: 128,128,128,128, ..." + :: "r" (m) + ); +} + +static inline void map_chroma( uint8_t *dst, uint8_t *B ) +{ + __asm __volatile( + "movq (%0), %%mm1\n\t" + "pand %%mm0, %%mm1\n\t" + "pxor %%mm5, %%mm5\n\t" + "pcmpeqb %%mm1,%%mm5\n\t" + "pand %%mm3,%%mm5\n\t" + "paddb %%mm5,%%mm1\n\t" + "movq %%mm1, (%1) \n\t" + :: "r" (B), "r" (dst) + ); + +} + +static void load_threshold_mm7(uint8_t v) +{ + uint8_t mm[8] = { v,v,v,v, v,v,v,v }; + uint8_t *m = (uint8_t*) &(mm[0]); + __asm __volatile( + "movq (%0), %%mm7\n\t" + :: "r" (m) ); +} + +static void binarify( uint8_t *dst, uint8_t *src, uint8_t threshold, int reverse,int w, int h ) +{ + int len = (w * h)>>3; + int i; + uint8_t *s = src; + uint8_t *d = dst; + load_threshold_mm7( threshold ); + + + uint8_t *p = dst; + + for( i = 0; i < len ; i ++ ) + { + __asm __volatile( + "movq (%0),%%mm0\n\t" + "pcmpgtb %%mm7,%%mm0\n\t" + "movq %%mm0,(%1)\n\t" + :: "r" (s), "r" (d) + ); + s += 8; + d += 8; + } + + if( reverse ) + { + __asm __volatile( + "pxor %%mm4,%%mm4" :: + ); + for( i = 0; i < len ; i ++ ) + { + __asm __volatile( + "movq (%0), %%mm0\n\t" + "pcmpeqb %%mm4, %%mm0\n\t" + "movq %%mm0, (%1)\n\t" + :: "r" (p), "r" (p) + ); + p += 8; + } + } +} + + +#else +static void binarify( uint8_t *dst, uint8_t *src, int threshold,int reverse, int w, int h ) +{ + const int len = w*h; + int i; + if(!reverse) + for( i = 0; i < len; i ++ ) + { + dst[i] = ( src[i] <= threshold ? 0: 0xff ); + } + else + for( i = 0; i < len; i ++ ) + dst[i] = (src[i] > threshold ? 0: 0xff ); +} +#endif + +void threshold_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int threshold, int reverse ) +{ + unsigned int i,x,y; + int len = (width * height); + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2=frame2->data[1]; + uint8_t *Cr2=frame2->data[2]; + + const uint8_t kernel[9] = { 1,1,1, 1,1,1, 1,1,1 }; + uint8_t *bmap = binary_img; + +// morph_func p = _dilate_kernel3x3; + + softblur_apply( frame, width,height,0 ); + + binarify( binary_img,Y,threshold,reverse, width,height); + +#ifdef HAVE_ASM_MMX + int work = (width*height)>>3; + load_chroma( 128 ); + for( y = 0 ; y < work; y ++ ) + { + load_binary_map( bmap ); + map_luma(Y , Y2 ); + map_chroma( Cb, Cb2 ); + map_chroma( Cr, Cr2 ); + //@ we could mmx-ify dilation + Y += 8; + Y2 += 8; + Cb += 8; + Cb2 += 8; + Cr += 8; + Cr2 +=8; + bmap += 8; + } + + __asm__ __volatile__ ( _EMMS:::"memory"); +#else + +// veejay_memset( Y, 0, width ); +// veejay_memset( Cb, 128, width ); +// veejay_memset( Cr, 128, width ); + +// veejay_memset(Y+(len-width),0, width ); +// veejay_memset(Cb+(len-width),128,width); +// veejay_memset(Cr+(len-width),128,width); + +// len -= width; + + if(!reverse) + { + for(y = 0; y < len; y += width ) + { + for(x = 0; x < width; x ++) + { + if(binary_img[x+y]) //@ found white pixel + { + Y[x+y] = Y2[x+y]; + Cb[x+y] = Cb2[x+y]; + Cr[x+y] = Cr2[x+y]; + + } + else //@ black + { + Y[x + y] = 0; + Cb[x + y] = 128; + Cr[x + y] = 128; + } + } + } + } + else + { + for(y = 0; y < len; y += width ) + { + for(x = 0; x < width; x ++) + { + if(binary_img[x+y] == 0x0) //@ found black pixel + { + Y[x+y] = Y2[x+y]; + Cb[x+y]= Cb2[x+y]; + Cr[x+y]= Cr2[x+y]; + } + else + { + Y[x+y] = 0x0; + Cb[x+y] = 128; + Cr[x+y] = 128; + } + } + } + } +#endif +} diff --git a/veejay-server/libvje/effects/threshold.h b/veejay-server/libvje/effects/threshold.h new file mode 100644 index 00000000..c05203b3 --- /dev/null +++ b/veejay-server/libvje/effects/threshold.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef THRESHOLD_H +#define THRESHOLD_H +#include +#include +#include + +vj_effect *threshold_init(int w, int h); +void threshold_apply( VJFrame *frame,VJFrame *frame2, int width, int height, int t, int n); +int threshold_malloc(int w, int h); +void threshold_free(void); +#endif diff --git a/veejay-server/libvje/effects/timedistort.c b/veejay-server/libvje/effects/timedistort.c new file mode 100644 index 00000000..de16053a --- /dev/null +++ b/veejay-server/libvje/effects/timedistort.c @@ -0,0 +1,236 @@ +/* + * Linux VeeJay + * + * EffecTV - Realtime Digital Video Effector + * Copyright (C) 2001-2006 FUKUCHI Kentaro + * + * TimeDistortionTV - scratch the surface and playback old images. + * Copyright (C) 2005 Ryo-ta + * + * Ported and arranged by Kentaro Fukuchi + + * Ported and modified by Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "timedistort.h" +#include "common.h" +#include "softblur.h" +#ifdef STRICT_CHECKING +#include +#endif +#define PLANES 32 +#define RUP8(num)(((num)+8)&~8) + +vj_effect *timedistort_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 5; + ve->limits[1][0] = 100; + ve->defaults[0] = 40; + ve->description = "TimeDistortionTV (EffectTV)"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +static int n__ = 0; +static int N__ = 0; +static uint8_t *nonmap = NULL; +static uint8_t *planes[3] = { NULL, NULL, NULL }; +static uint8_t *planetableY[PLANES]; +static uint8_t *planetableU[PLANES]; +static uint8_t *planetableV[PLANES]; + +static uint8_t *warptime[2]; +static int state = 0; +static int plane = 0; +static int warptimeFrame = 0; + +static int have_bg =0; +int timedistort_malloc( int w, int h ) +{ + unsigned int i; + if(nonmap) timedistort_free(); + nonmap = vj_malloc( RUP8(w + 2 * w * h) * sizeof(uint8_t)); + if(!nonmap) + return 0; + + planes[0] = vj_malloc( RUP8(PLANES * 3 * w * h) * sizeof(uint8_t)); + planes[1] = planes[0] + RUP8(PLANES * w * h ); + planes[2] = planes[1] + RUP8(PLANES * w * h ); + + veejay_memset( planes[0],0, RUP8(PLANES * w * h )); + veejay_memset( planes[1],128,RUP8(PLANES * w * h )); + veejay_memset( planes[2],128,RUP8(PLANES * w * h )); + + have_bg = 0; + n__ = 0; + N__ = 0; + + for( i = 0; i < PLANES; i ++ ) + { + planetableY[i] = &planes[0][ (w*h) * i ]; + planetableU[i] = &planes[1][ (w*h) * i ]; + planetableV[i] = &planes[2][ (w*h) * i ]; + } + + warptime[0] = (uint8_t*) vj_calloc( sizeof(uint8_t) * RUP8((w * h)+w+1) ); + warptime[1] = (uint8_t*) vj_calloc( sizeof(uint8_t) * RUP8((w * h)+w+1) ); + if( warptime[0] == NULL || warptime[1] == NULL ) + return 0; + + plane = 0; + state = 1; + + + return 1; +} + +void timedistort_free() +{ + if(nonmap) + free(nonmap); + if( planes[0]) + free(planes[0]); + if( warptime[0] ) + free(warptime[0]); + if( warptime[1] ) + free(warptime[1] ); + veejay_memset( planetableY, 0, PLANES); + veejay_memset( planetableU, 0, PLANES); + veejay_memset( planetableV, 0, PLANES); + planes[0] = NULL; + warptime[0] = NULL; + warptime[1] = NULL; + state = 0; + plane = 0; + nonmap = NULL; +} + +void timedistort_apply( VJFrame *frame, int width, int height, int val) +{ + unsigned int i; + const int len = (width * height); + + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + uint8_t *diff = nonmap; + uint8_t *prev = nonmap + len; + int interpolate = 1; + int motion = 0; + int tmp1,tmp2; + int stor_local = 0; + if(motionmap_active()) //@ use motion mapping frame + { + motionmap_scale_to( 255,255,1,1,&tmp1,&tmp2, &n__,&N__ ); + motion = 1; + diff = motionmap_bgmap(); + } + else + { + n__ = 0; + N__ = 0; + + if(!have_bg) + { + veejay_memcpy( prev, Y, len ); + VJFrame smooth; + veejay_memcpy(&smooth,frame, sizeof(VJFrame)); + smooth.data[0] = prev; + softblur_apply(&smooth, width, height, 0 ); + veejay_memset( diff, 0, len ); + have_bg = 1; + return; + } + else + { + for( i = 0; i < len ; i ++ ) + { + diff[i] = (abs(prev[i] - Y[i])> val ? 0xff: 0 ); + } + veejay_memcpy( prev, Y, len ); + VJFrame smooth; + veejay_memcpy(&smooth,frame, sizeof(VJFrame)); + smooth.data[0] = prev; + softblur_apply(&smooth, width, height, 0 ); + } + } + + if( n__ == N__ || n__ == 0 ) + interpolate = 0; + +#ifdef STRICT_CHECKING + assert( plane >= 0 && plane < PLANES ); +#endif + + //@ process + veejay_memcpy( planetableY[plane], Y, len ); + veejay_memcpy( planetableU[plane], Cb, len ); + veejay_memcpy( planetableV[plane], Cr, len ); + + uint8_t *p = warptime[ warptimeFrame ] + width + 1; + uint8_t *q = warptime[ warptimeFrame ^ 1] + width + 1; + + unsigned int x,y; + for( y = height - 2; y > 0 ; y -- ) + { + for( x = width - 2; x > 0; x -- ) + { + i = *(p - width) + *(p-1) + *(p+1) + *(p + width); + if( i > 3 ) i-= 3; + p++; + *q++ = i >> 2; + + } + p += 2; + q += 2; + } + q = warptime[ warptimeFrame ^ 1 ] + width + 1; + int n_plane = 0; + for( i = 0; i < len; i ++ ) + { + if( diff[i] ) { + q[i] = PLANES - 1; + } + + n_plane = ( plane - q[i] + PLANES ) & (PLANES-1); + + Y[i] = planetableY[ n_plane ][i]; + Cb[i] = planetableU[ n_plane ][i]; + Cr[i] = planetableV[ n_plane ][i]; + } + + plane ++; + plane = plane & (PLANES-1); + warptimeFrame ^= 1; + + if(interpolate) + motionmap_interpolate_frame( frame, N__,n__ ); + if(motion) + motionmap_store_frame(frame); + +} diff --git a/veejay-server/libvje/effects/timedistort.h b/veejay-server/libvje/effects/timedistort.h new file mode 100644 index 00000000..73376524 --- /dev/null +++ b/veejay-server/libvje/effects/timedistort.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TIMEDISTORT_H +#define TIMEDISTORT_H +#include +#include +#include + +vj_effect *timedistort_init(int w, int h); +void timedistort_apply( VJFrame *frame, int width, int height, int val); +int timedistort_malloc(int w, int h); +void timedistort_free(); +#endif diff --git a/veejay-server/libvje/effects/tracer.c b/veejay-server/libvje/effects/tracer.c new file mode 100644 index 00000000..d6958e16 --- /dev/null +++ b/veejay-server/libvje/effects/tracer.c @@ -0,0 +1,125 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include "scratcher.h" +#include "common.h" + +static uint8_t *trace_buffer[3]; +static int trace_counter = 0; + +vj_effect *tracer_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 1; + ve->limits[1][1] = 25; + ve->defaults[0] = 150; + ve->defaults[1] = 8; + ve->description = "Tracer"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +int tracer_malloc(int w, int h) +{ + trace_buffer[0] = (uint8_t *) vj_yuvalloc(w , h ); + if(!trace_buffer[0]) return 0; + trace_buffer[1] = trace_buffer[0] + ( w * h ); + trace_buffer[2] = trace_buffer[1] + ( w * h ); + + return 1; +} + +void tracer_free() { + if(trace_buffer[0]) + free(trace_buffer[0]); + trace_buffer[0] = NULL; + trace_buffer[1] = NULL; + trace_buffer[2] = NULL; +} + +void tracer_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int opacity, int n) +{ + + unsigned int x, len = frame->len; + unsigned int op1 = (opacity > 255) ? 255 : opacity; + unsigned int op0 = 255 - op1; + unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + if (trace_counter == 0) + { + for (x = 0; x < len; x++) + { + Y[x] = + limit_luma(func_opacity(Y[x], Y2[x], op0, op1)); + } + for (x = 0; x < uv_len; x++) + { + Cb[x] = + limit_chroma(func_opacity + (Cb[x], Cb2[x], op0, op1)); + Cr[x] = + limit_chroma(func_opacity + (Cr[x], Cr2[x], op0, op1)); + } + veejay_memcpy(trace_buffer[0], Y, len); + veejay_memcpy(trace_buffer[1], Cb, uv_len); + veejay_memcpy(trace_buffer[2], Cr, uv_len); + } + else + { + for (x = 0; x < len; x++) + { + Y[x] = + ((op0 * Y[x]) + (op1 * trace_buffer[0][x])) >> 8; // / 255; + } + for (x = 0; x < uv_len; x++) + { + Cb[x] = + ((op0 * Cb[x]) + (op1 * trace_buffer[1][x])) >> 8 ; // 255; + Cr[x] = + ((op0 * Cr[x]) + (op1 * trace_buffer[2][x])) >> 8 ; // 255; + } + veejay_memcpy(trace_buffer[0], Y, len); + veejay_memcpy(trace_buffer[1], Cb, uv_len); + veejay_memcpy(trace_buffer[2], Cr, uv_len); + + } + + trace_counter++; + if (trace_counter >= n) + trace_counter = 0; + + +} diff --git a/veejay-server/libvje/effects/tracer.h b/veejay-server/libvje/effects/tracer.h new file mode 100644 index 00000000..549001d8 --- /dev/null +++ b/veejay-server/libvje/effects/tracer.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TRACER_H +#define TRACER_H +#include +#include +#include +#include + +vj_effect *tracer_init(int w, int h); +int tracer_malloc(int w, int h); +void tracer_free(); +void tracer_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int opacity, int nframes); +#endif diff --git a/veejay-server/libvje/effects/transform.c b/veejay-server/libvje/effects/transform.c new file mode 100644 index 00000000..454cd32f --- /dev/null +++ b/veejay-server/libvje/effects/transform.c @@ -0,0 +1,136 @@ + /* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include +#include "transform.h" +#include "common.h" + +vj_effect *transform_init(int width,int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 5; + //ve->defaults[1] = 1; + ve->limits[0][0] = 1; + ve->limits[1][0] = (height / 16); + + //ve->limits[0][1] = 1; + //ve->limits[1][1] = 4096; + + ve->description = "Transform Cubics"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void transform_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, const int size) +{ + unsigned int ty, tx, y, x; + const unsigned int uv_height = frame->uv_height; + const unsigned int uv_width = frame->uv_width; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + + /* Luminance */ + for (y = 1; y < height; y++) + { + ty = y % size - (size >> 1); + if ((y / size) % 2) + { + ty = y - ty; + } + else + { + ty = y + ty; + } + if (ty < 0) + ty = 0; + + if (ty >= height) + ty = height - 1; + + for (x = 1; x < width; x++) + { + tx = x % size - (size >> 1); + if ((x / size) % 2) + { + tx = x - tx; + } + else + { + tx = x + tx; + } + if (tx < 0) + tx = 0; + if (tx >= width) + tx = width - 1; + Y[x + (y * width)] = Y2[(ty * width) + tx]; + } + } + /* Chroma */ + for (y = 1; y < uv_height; y++) + { + ty = y % size - (size >> 1); + if ((y / size) % 2) { + ty = y - ty; + } + else + { + ty = y + ty; + } + if (ty < 0) + ty = 0; + + if (ty >= uv_height) + ty = uv_height - 1; + + for (x = 1; x < uv_width; x++) + { + tx = x % size - (size >> 1); + if ((x / size) % 2) + { + tx = x - tx; + } + else + { + tx = x + tx; + } + if (tx < 0) + tx = 0; + if (tx >= uv_width) + tx = uv_width - 1; + Cb[x + (y * uv_width)] = Cb2[(ty * uv_width) + tx]; + Cr[x + (y * uv_width)] = Cr2[(ty * uv_width) + tx]; + } + } +} +void transform_free(){} diff --git a/veejay-server/libvje/effects/transform.h b/veejay-server/libvje/effects/transform.h new file mode 100644 index 00000000..4daf5b44 --- /dev/null +++ b/veejay-server/libvje/effects/transform.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TRANSFORM_H +#define TRANSFORM_H +#include +#include +#include + +vj_effect *transform_init(int w, int height); +void transform_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int size); +void transform_free(); +#endif diff --git a/veejay-server/libvje/effects/tripplicity.c b/veejay-server/libvje/effects/tripplicity.c new file mode 100644 index 00000000..585c0325 --- /dev/null +++ b/veejay-server/libvje/effects/tripplicity.c @@ -0,0 +1,88 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +/* + This effects overlays 2 images , + It allows the user to set the transparency per channel. + Result will vary over different color spaces. + + */ +#include +#include +#include "tripplicity.h" +vj_effect *tripplicity_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; // opacity Y + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; // opacity Cb + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; // opacity Cr + ve->defaults[0] = 150; + ve->defaults[1] = 150; + ve->defaults[2] = 150; + + ve->description = "Normal Overlay (per Channel)"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + + return ve; +} + + + +void tripplicity_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int opacityL, int opacityCb, int opacityCr) +{ + unsigned int i; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + const uint8_t *Y2 = frame2->data[0]; + const uint8_t *Cb2= frame2->data[1]; + const uint8_t *Cr2= frame2->data[2]; + const uint8_t op1 = (opacityL > 255) ? 255 : opacityL; + const uint8_t op0 = 255 - op1; + const uint8_t opCb1= (opacityCb > 255) ? 255: opacityCb; + const uint8_t opCb0= 255 - opCb1; + const uint8_t opCr1= (opacityCr > 255) ? 255: opacityCr; + const uint8_t opCr0= 255 - opCr1; + + + for (i = 0; i < len; i++) + { + Y[i] = (op0 * Y[i] + op1 * Y2[i]) >> 8; + } + + for (i = 0; i < uv_len; i++) + { + Cb[i] = (opCb0 * Cb[i] + opCb1 * Cb2[i]) >> 8; + Cr[i] = (opCr0 * Cr[i] + opCr1 * Cr2[i]) >> 8; + } + +} + diff --git a/veejay-server/libvje/effects/tripplicity.h b/veejay-server/libvje/effects/tripplicity.h new file mode 100644 index 00000000..415c7e5a --- /dev/null +++ b/veejay-server/libvje/effects/tripplicity.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ + +#ifndef TRCITY_H +#define TRCITY_H +#include +#include +#include + +vj_effect *tripplicity_init(); +void tripplicity_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int opacityL, int opacityCb, int opacityCr); +#endif diff --git a/veejay-server/libvje/effects/uvcorrect.c b/veejay-server/libvje/effects/uvcorrect.c new file mode 100644 index 00000000..51c81083 --- /dev/null +++ b/veejay-server/libvje/effects/uvcorrect.c @@ -0,0 +1,201 @@ +/* + * Linux VeeJay + * + * Copyright(C)2004 Niels Elburg + * + * 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. + */ +/* + * yuvcorrect_functions.c + * Common functions between yuvcorrect and yuvcorrect_tune + * Copyright (C) 2002 Xavier Biquard + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include "uvcorrect.h" +#include "common.h" +#include + +static uint8_t *chrominance; + +vj_effect *uvcorrect_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 7; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + //angle,r,g,b,cbc,crc + + ve->limits[0][0] = 1; + ve->limits[1][0] = 360; + ve->limits[0][1] = 0; + ve->limits[1][1] = 255; + ve->limits[0][2] = 0; + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; + ve->limits[1][3] = 100; + ve->limits[0][4] = 0; + ve->limits[1][4] = 100; + ve->limits[0][5] = 0; + ve->limits[1][5] = 255; + ve->limits[0][6] = 0; + ve->limits[1][6] = 255; + + ve->defaults[0] = 1; + ve->defaults[1] = 128; + ve->defaults[2] = 128; + ve->defaults[3] = 10; + ve->defaults[4] = 10; + ve->defaults[5] = pixel_U_lo_; + ve->defaults[6] = pixel_U_hi_; + ve->description = "U/V Correction"; + + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_help = 1; + ve->has_user = 0; +// FIXME: private + //chrominance = (uint8_t*) vj_calloc (sizeof(uint8_t) * 512 * 256 ); + + return ve; +} + +int uvcorrect_malloc(int w, int h ) +{ + chrominance = (uint8_t*) vj_malloc (sizeof(uint8_t) * 2 * 256 * 256 ); + if(!chrominance) return 0; + return 1; +} + +void uvcorrect_free() +{ + if(chrominance) free(chrominance); + chrominance= NULL; +} + +void uvcorrect_help() +{ + /*veejay_msg(1, "UV Correct (portion of yuvcorrect by Xavier Biquard"); + veejay_msg(1, "Select a color and set a new chroma value for the entire selection"); + veejay_msg(1, "one or both of the parameters p4 and p5"); + veejay_msg(1, "p0 = UV rotation angle"); + veejay_msg(1, "p1 = U rotate center"); + veejay_msg(1, "p2 = V rotate center"); + veejay_msg(1, "p3 = U factor"); + veejay_msg(1, "p4 = V factor"); + veejay_msg(1, "p5 = UV min"); + veejay_msg(1, "p6 = UV max"); */ +} + +static inline void _chrominance_treatment(uint8_t *u,uint8_t *v, const int len) +{ + uint8_t *Uu_c_p, *Vu_c_p; + uint32_t i, base; + + Uu_c_p = u; + Vu_c_p = v; + + // Chroma + for (i = 0; i < len; i++) + { + base = ((((uint32_t) * Uu_c_p) << 8) + (*Vu_c_p)) << 1; // base = ((((uint32_t)*Uu_c_p) * 256) + (*Vu_c_p)) * 2 + *(Uu_c_p++) = chrominance[base++]; + *(Vu_c_p++) = chrominance[base]; + } + +} + +void uvcorrect_apply(VJFrame *frame, int width, int height, int angle, int urot_center, int vrot_center, int iuFactor, int ivFactor, int uv_min, int uv_max ) +{ + float fU,fV,si,co; + uint16_t iU,iV; + + const float f_angle = (float) angle / 180.0 * M_PI; + const uint8_t centerU = urot_center; + const uint8_t centerV = vrot_center; + const float Ufactor = (float)iuFactor * 0.1; + const float Vfactor = (float)ivFactor * 0.1; + const uint32_t uv_len = frame->uv_len; + const uint8_t uvmin = (uint8_t) uv_min; + const uint8_t uvmax = (uint8_t) uv_max; + uint8_t *Uplane = frame->data[1]; + uint8_t *Vplane = frame->data[2]; + // chrominance vector + uint8_t *table = chrominance; + + sin_cos ( si, co, f_angle ); + + + for ( iU = 0; iU <= 255 ; iU ++ ) + { + for( iV = 0; iV <= 255; iV ++ ) + { + //U component + fU = (((float) (iU - centerU ) * Ufactor ) * co - + ((float) (iV - centerV ) * Vfactor ) * si) + + 128.0; + + fU = (float) floor( 0.5 + fU ); + + //clamp U values + if( fU < uvmin ) + { + fU = uvmin; + } + if( fU > uvmax ) + { + fU = uvmax; + } + //V component + + fV = (((float) ( iV - centerV) * Vfactor ) * co + + ((float) ( iU - centerU) * Ufactor ) * si ) + + 128.0; + + fV = (float) floor( 0.5 + fV ); + + //clamp V values + if( fV < uvmin ) + fV = uvmin; + if( fV > uvmax ) + fV = uvmax; + + //store in vector + *(table)++ = (uint8_t) fU; + *(table)++ = (uint8_t) fV; + } + } + + _chrominance_treatment( Uplane,Vplane , uv_len ); + + +} diff --git a/veejay-server/libvje/effects/uvcorrect.h b/veejay-server/libvje/effects/uvcorrect.h new file mode 100644 index 00000000..4bd90682 --- /dev/null +++ b/veejay-server/libvje/effects/uvcorrect.h @@ -0,0 +1,33 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef UVCORRECT_H +#define UVCORRECT_H +#include +#include +#include + +vj_effect *uvcorrect_init(int w, int h); +int uvcorrect_malloc(int w, int h); +void uvcorrect_free(void); +void uvcorrect_apply(VJFrame *frame, int width, int height, + int alpha, int ualpha, int valpha, int uf, + int vf, int min, int max ); +#endif diff --git a/veejay-server/libvje/effects/videomask.c b/veejay-server/libvje/effects/videomask.c new file mode 100644 index 00000000..0134dcb1 --- /dev/null +++ b/veejay-server/libvje/effects/videomask.c @@ -0,0 +1,99 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#include "videomask.h" +#include "../../config.h" +#include +#include "../subsample.h" +#include "common.h" + +vj_effect *videomask_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->defaults[0] = 150; /* threshold */ + ve->description = "Luminance Map"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + + + +void videomask_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int videomask) +{ + unsigned int i, op0, op1; + const int len = frame->len; + const int uv_len = frame->uv_len; + const uint8_t pure_white_y = pixel_Y_hi_; + const uint8_t pure_white_c = pixel_U_hi_; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + + for (i = 0; i < len; i++) + { + op1 = Y[i]; + op0 = 255 - op1; + Y[i] = (op0 * Y[i] + op1 * pure_white_y)>>8; + } + + for (i = 0; i < uv_len; i++) + { + op1 = Cb[i]; + op0 = 255 - op1; + Cb[i] = (op0 * Cb[i] + op1 * pure_white_c)>>8; + op1 = Cb[i]; + op0 = 255 - op1; + Cr[i] = (op0 * Cr[i] + op1 * pure_white_c) >> 8; + } +} + + +/* + + 1. load 1st input reference to mm0 + 2. load 2nd input reference to mm1 + 3. Output reference to mm2 + 4. load op0 to mm7 + 5. load op1 to mm6 + 4. unpack byte 1st input to word on mm3 + 5. unpack byte 2nd input to word on mm4 + 6. multiply mm7 with mm3 + 7. multiply mm6 with mm4 + 8. add mm3 + mm4 + 9. shift rotate right with 8 ( / 256) + + + + +*/ +void videomask_free(){} diff --git a/veejay-server/libvje/effects/videoplay.c b/veejay-server/libvje/effects/videoplay.c new file mode 100644 index 00000000..4b619946 --- /dev/null +++ b/veejay-server/libvje/effects/videoplay.c @@ -0,0 +1,258 @@ + +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +#include +#include +#include "videoplay.h" +#include "common.h" + +vj_effect *videoplay_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 3; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 2; // divider + ve->limits[1][0] = max_power(w); + ve->limits[0][1] = 1; + ve->limits[1][1] = 250; // waterfall + ve->limits[0][2] = 0; + ve->limits[1][2] = 3; // mode + ve->defaults[0] = 2; + ve->defaults[1] = 1; + ve->defaults[2] = 1; + ve->description = "Videoplay (timestretched mosaic)"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +static picture_t **video_list = NULL; +static int num_videos = 0; +static int frame_counter = 0; +static int frame_delay = 0; + +static int prepare_filmstrip(int film_length, int w, int h) +{ + int i,j; + int picture_width = w / sqrt(film_length); + int picture_height = h / sqrt(film_length); + + video_list = (picture_t**) vj_calloc(sizeof(picture_t*) * (film_length + 1) ); + if(!video_list) + return 0; + + num_videos = film_length; + + uint8_t val = 0; +// int inc = num_videos % 255; + + for ( i = 0; i < num_videos; i ++ ) + { + video_list[i] = vj_calloc(sizeof(picture_t)); + if(!video_list[i]) + return 0; + video_list[i]->w = picture_width; + video_list[i]->h = picture_height; + for( j = 0; j < 3; j ++ ) + { + video_list[i]->data[j] = vj_malloc(sizeof(uint8_t) * picture_width * picture_height ); + if(!video_list[i]->data[j]) + return 0; + veejay_memset(video_list[i]->data[j], (j==0 ? pixel_Y_lo_ : 128), picture_width *picture_height ); + } + // val+= inc; + } + frame_counter = 0; + + return 1; +} + +static void destroy_filmstrip(void) +{ + if(video_list) + { + int i = 0; + while(i < num_videos) + { + if( video_list[i] ) + { + int j; + for( j = 0; j < 3; j ++ ) + if(video_list[i]->data[j]) + free(video_list[i]->data[j]); + free(video_list[i]); + } + i++; + } + free(video_list); + } + video_list = NULL; + num_videos = 0; + frame_counter = 0; +} + + + +int videoplay_malloc(int w, int h ) +{ + num_videos = 0; + return 1; +} + + +void videoplay_free(void) +{ + destroy_filmstrip(); +} + +static void take_video( uint8_t *plane, uint8_t *dst_plane, int w, int h, int index ) +{ + + int x,y,dx,dy; + int sum; + int dst_x, dst_y; + int step_y; + int step_x; + int box_width = video_list[index]->w; + int box_height = video_list[index]->h; + + step_x = w / box_width; + step_y = h / box_height; + + for( y = 0 ,dst_y = 0; y < h && dst_y < box_height; y += step_y ) + { + for( x = 0, dst_x = 0; x < w && dst_x < box_width; x+= step_x ) + { + sum = 0; + for( dy = 0; dy < step_y; dy ++ ) + { + for( dx = 0; dx < step_x; dx++) + { + sum += plane[ ((y+dy)*w+(dx+x)) ]; + } + } + // still problem here! + if(sum > 0) + dst_plane[(dst_y*box_width)+dst_x] = sum / (step_y*step_x); + else + dst_plane[(dst_y*box_width)+dst_x] = pixel_Y_lo_; + + dst_x++; + } + dst_y++; + } +} + +static void put_video( uint8_t *dst_plane, uint8_t *video, int dst_w, int dst_h, int index , matrix_t matrix) +{ + int box_w = video_list[index]->w; + int box_h = video_list[index]->h; + int x,y; + + uint8_t *P = dst_plane + (matrix.h*dst_w); + int offset = matrix.w; + + for( y = 0; y < box_h; y ++ ) + { + for( x = 0; x < box_w; x ++ ) + { + *(P+offset+x) = video[(y*box_w)+x]; + } + P += dst_w; + } +} + +void videoplay_apply( VJFrame *frame, VJFrame *B, int width, int height, int size, int delay, int mode ) +{ + unsigned int i; + uint8_t *dstY = frame->data[0]; + uint8_t *dstU = frame->data[1]; + uint8_t *dstV = frame->data[2]; + + matrix_f matrix_placement = get_matrix_func(mode); + + if( (size*size) != num_videos || num_videos == 0 ) + { + destroy_filmstrip(); + if(!prepare_filmstrip(size*size, width,height)) + { + return; + } + frame_delay = delay; + } + + if( frame_delay ) + frame_delay --; + + if( frame_delay == 0) + { + frame_delay = delay; + } + + + if(frame_delay == delay) + { + for( i = 0; i < 3; i ++ ) + { + take_video( B->data[i], video_list[(frame_counter%num_videos)]->data[i], + width, height , frame_counter % num_videos); + } + for( i = 0; i < 3; i ++ ) + { + take_video( frame->data[i], video_list[((frame_counter+1)%num_videos)]->data[i], + width, height , (frame_counter+1) % num_videos); + } + } + else + { + int n = frame_counter - 1; + if(n>=0) + { + for( i = 0; i < 3; i ++ ) + { + take_video( frame->data[i], video_list[(n%num_videos)]->data[i], + width, height , frame_counter % num_videos); + } + n++; + for( i = 0; i < 3; i ++ ) + { + take_video( B->data[i], video_list[(n%num_videos)]->data[i], + width, height , (frame_counter+1) % num_videos); + } + } + } + + for ( i = 0; i < num_videos; i ++ ) + { + matrix_t m = matrix_placement(i, size,width,height ); + put_video( dstY, video_list[i]->data[0],width,height,i, m); + put_video( dstU, video_list[i]->data[1],width,height,i, m); + put_video( dstV, video_list[i]->data[2],width,height,i, m); + } + + if( frame_delay == delay) + frame_counter+=2; + +} + diff --git a/veejay-server/libvje/effects/videoplay.h b/veejay-server/libvje/effects/videoplay.h new file mode 100644 index 00000000..773e793e --- /dev/null +++ b/veejay-server/libvje/effects/videoplay.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef VIDEOPLAY_H +#define VIDEOPLAY_H +#include +#include +#include + +vj_effect *videoplay_init(int w, int h); +int videoplay_malloc(int w, int h); +void videoplay_free(void); +void videoplay_apply( VJFrame *frame, VJFrame *b,int width, int height, int size, int behaviour, int mode); +#endif diff --git a/veejay-server/libvje/effects/videowall.c b/veejay-server/libvje/effects/videowall.c new file mode 100644 index 00000000..9b7555e6 --- /dev/null +++ b/veejay-server/libvje/effects/videowall.c @@ -0,0 +1,253 @@ +/* + * Linux VeeJay + * + * Copyright(C)2005 Niels Elburg + * + * 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. + */ +#include +#include +#include "videowall.h" +#include "common.h" +static inline int gcd(int p, int q ) { if(q==0) return p; else return(gcd(q,p%q)); } + +static inline int n_pics(int w, int h) +{ + return (( w / gcd(w,h)) * 2); +} + +vj_effect *videowall_init(int w, int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 0; // selector + ve->limits[1][0] = n_pics(w,h); + ve->limits[0][1] = 0; + ve->limits[1][1] = w; // displacement x + ve->limits[0][2] = 0; + ve->limits[1][2] = h; // displacement y + ve->limits[0][3] = 0; + ve->limits[1][3] = 1; // lock update of x,y in offset[selector] + ve->defaults[0] = 0; + ve->defaults[1] = 1; + ve->defaults[2] = 1; + ve->defaults[3] = 0; + ve->description = "VideoWall / Tile Placement"; + ve->sub_format = 1; // todo: optimize to work in 4:2:0/4:2:2, see also photo/video play.c + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +static picture_t **photo_list = NULL; +static int num_photos = 0; +static int frame_counter = 0; +static int frame_delay = 0; +static int *offset_table_x = NULL; +static int *offset_table_y = NULL; + + + + +static int prepare_filmstrip(int w, int h) +{ + int i,j; + int picture_width = gcd(w,h); + int picture_height = gcd(w,h); + int film_length = n_pics(w,h); + + photo_list = (picture_t**) vj_calloc(sizeof(picture_t*) * film_length ); + if(!photo_list) + return 0; + + num_photos = film_length; + + uint8_t val = 0; + int inc = num_photos % 255; + + for ( i = 0; i < num_photos; i ++ ) + { + photo_list[i] = vj_calloc(sizeof(picture_t)); + if(!photo_list[i]) + return 0; + photo_list[i]->w = picture_width; + photo_list[i]->h = picture_height; + for( j = 0; j < 3; j ++ ) + { + photo_list[i]->data[j] = vj_malloc(sizeof(uint8_t) * picture_width * picture_height ); + if(!photo_list[i]->data[j]) + return 0; + } + veejay_memset( photo_list[i]->data[0], 0, + picture_width * picture_height ); + veejay_memset( photo_list[i]->data[1],128, + picture_width * picture_height ); + veejay_memset( photo_list[i]->data[2],128, + picture_width * picture_height ); + val+= inc; + } + frame_counter = 0; + + offset_table_x = (int*) vj_calloc(sizeof(int) * film_length); + if(!offset_table_x) + return 0; + offset_table_y = (int*) vj_calloc(sizeof(int) * film_length); + if(!offset_table_y) + return 0; + + return 1; +} + +static void destroy_filmstrip(void) +{ + if(photo_list) + { + int i = 0; + while(i < num_photos) + { + if( photo_list[i] ) + { + int j; + for( j = 0; j < 3; j ++ ) + if(photo_list[i]->data[j]) + free(photo_list[i]->data[j]); + free(photo_list[i]); + } + i++; + } + free(photo_list); + } + photo_list = NULL; + num_photos = 0; + frame_counter = 0; + if(offset_table_x) free(offset_table_x); + if(offset_table_y) free(offset_table_y); +} + + + +int videowall_malloc(int w, int h ) +{ + prepare_filmstrip(w,h); + return 1; +} + + +void videowall_free(void) +{ + destroy_filmstrip(); +} + +static void take_photo( uint8_t *plane, uint8_t *dst_plane, int w, int h, int index ) +{ + int x,y,dx,dy; + int sum; + int dst_x, dst_y; + int step_y; + int step_x; + int box_width = photo_list[index]->w; + int box_height = photo_list[index]->h; + + step_x = w / box_width; + step_y = h / box_height; + + for( y = 0 ,dst_y = 0; y < h && dst_y < box_height; y += step_y ) + { + for( x = 0, dst_x = 0; x < w && dst_x < box_width; x+= step_x ) + { + sum = 0; + for( dy = 0; dy < step_y; dy ++ ) + { + for( dx = 0; dx < step_x; dx++) + { + sum += plane[ ((y+dy)*w+(dx+x)) ]; + } + } + // still problem here! + if(sum > 0) + dst_plane[(dst_y*box_width)+dst_x] = sum / (step_y*step_x); + else + dst_plane[(dst_y*box_width)+dst_x] = pixel_Y_lo_; + + dst_x++; + } + dst_y++; + } +} + +static void put_photo( uint8_t *dst_plane, uint8_t *photo, int dst_w, int dst_h, int index) +{ + int n = (num_photos/2); + int box_w = photo_list[index]->w; + int box_h = photo_list[index]->h; + int x,y; + // blits photos left -> right , < n ? :top : bottom + int dy = offset_table_y[index]; + int dx = offset_table_x[index]; + uint8_t *P = (index < n ? dst_plane + ( dy * dst_w ) : dst_plane + ((abs(dst_h-box_h-dy)%dst_h)*dst_w)); + int offset = (box_w * index + dx) % dst_w; + + for( y = 0 ; y < box_h ; y ++ ) + { + for( x = 0; x < box_w; x ++ ) + { + *(P + offset + x ) = photo[(y*box_h)+x]; + } + P += dst_w; + } +} + +static void scale_photo(uint8_t *dst_plane, uint8_t *src_plane, int dst_w, int dst_h) +{ +} + +void videowall_apply( VJFrame *frameA, VJFrame *frameB, int width, int height, int a,int b, int c, int d ) +{ + unsigned int i; + uint8_t *dstY = frameA->data[0]; + uint8_t *dstU = frameA->data[1]; + uint8_t *dstV = frameA->data[2]; + + if(d==0) + { + offset_table_x[a] = b; + offset_table_y[a] = c; + } + + for( i = 0; i < 3; i ++ ) + { + take_photo( frameA->data[i], photo_list[(frame_counter%num_photos)]->data[i], width, height , frame_counter % num_photos); + } + frame_counter++; + + for( i = 0; i < 3; i ++ ) + { + take_photo( frameB->data[i], photo_list[(frame_counter%num_photos)]->data[i], width, height , frame_counter % num_photos); + } + + for ( i = 0; i < num_photos; i ++ ) + { + put_photo( dstY, photo_list[i]->data[0],width,height,i); + put_photo( dstU, photo_list[i]->data[1],width,height,i); + put_photo( dstV, photo_list[i]->data[2],width,height,i); + } + frame_counter++; + +} + diff --git a/veejay-server/libvje/effects/videowall.h b/veejay-server/libvje/effects/videowall.h new file mode 100644 index 00000000..c973a209 --- /dev/null +++ b/veejay-server/libvje/effects/videowall.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef VIDEOWALL_H +#define VIDEOWALL_H +#include +#include +#include + +vj_effect *videowall_init(int w, int h); +int videowall_malloc(int w, int h); +void videowall_free(void); +void videowall_apply( VJFrame *frameA, VJFrame *frameB,int width, int height, + int a, int b , int c, int d); +#endif diff --git a/veejay-server/libvje/effects/water.c b/veejay-server/libvje/effects/water.c new file mode 100644 index 00000000..75f061d9 --- /dev/null +++ b/veejay-server/libvje/effects/water.c @@ -0,0 +1,603 @@ +/* EffecTV - Realtime Digital Video Effektor + * Copyright (C) 2001-2003 FUKUCHI Kentaro + * + * RippleTV - Water ripple effect + * Copyright (C) 2001 - 2002 FUKUCHI Kentaro + * + * ported to Linux VeeJay by: + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + + +#include +#include +#include "rippletv.h" +#include "softblur.h" +#include +#include +#include +#include +#include "common.h" + +typedef struct { + uint8_t *ripple_data[3]; + uint8_t *diff_img; + int stat; + signed char *vtable; + int *map; + int *map1; + int *map2; + int *map3; + int map_h; + int map_w; + int have_img; + int sqrtable[256]; + int point; + int impact; + int last_fresh_rate; + int loopnum; + unsigned int wfastrand_val; +} water_t; + +/*static uint8_t *ripple_data[3]; +static int stat; +static signed char *vtable; +static int *map; +static int *map1, *map2, *map3; +static int map_h, map_w; +static uint8_t *diff_img = NULL; +static int have_img = 0; +static int sqrtable[256]; +static const int point = 16; +static const int impact = 2; +//static const int loopnum = 2; +static int bgIsSet = 0; +*/ + +/* from EffecTV: + * fastrand - fast fake random number generator + * Warning: The low-order bits of numbers generated by fastrand() + * are bad as random numbers. For example, fastrand()%4 + * generates 1,2,3,0,1,2,3,0... + * You should use high-order bits. + */ + +unsigned int wfastrand(water_t *w) +{ + return (w->wfastrand_val=w->wfastrand_val*1103515245+12345); +} + +static void setTable(water_t *w) +{ + int i; + + for(i=0; i<128; i++) { + w->sqrtable[i] = i*i; + } + + for(i=1; i<=128; i++) { + w->sqrtable[256-i] = -i*i; + } +} +//easy/calm: 10,2,32 +//flimmerin: 10,2,3 +//flowing: 10,1,29 +//p2 = wave speed +// + +vj_effect *water_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->limits[0][0] = 1; + ve->limits[1][0] = 3600; + ve->limits[0][1] = 1; + ve->limits[1][1] = 16; + ve->limits[0][2] = 1; + ve->limits[1][2] = 31; //number of waves + ve->limits[0][3] = 0; + ve->limits[1][3] = 3; // mode + ve->limits[0][4] = 0; + ve->limits[1][4] = 255; // threshold + ve->defaults[0] = 10; + ve->defaults[1] = 1; + ve->defaults[2] = 10; + ve->defaults[3] = 0; + ve->defaults[4] = 45; + ve->description = "RippleTV (EffectTV)"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 1; + ve->user_data = NULL; + return ve; +} +#define HIS_LEN (8*25) +#define HIS_DEFAULT 2 + +static uint32_t histogram_[HIS_LEN]; +static int n__ = 0; +static uint32_t keyv_ = 0; +static uint32_t keyp_ = 0; +int water_malloc(void **d, int width, int height) +{ + *d = (void*) vj_calloc(sizeof(water_t)); + water_t *w = (water_t*) *d; + + w->ripple_data[0] = (uint8_t*)vj_malloc(sizeof(uint8_t) * width * height); + if(!w->ripple_data[0]) return 0; + + w->diff_img = (uint8_t*)vj_malloc(sizeof(uint8_t) * width * height * 2); + if(!w->diff_img) return 0; + + veejay_memset( w->ripple_data[0], pixel_Y_lo_, width*height); + veejay_memset( w->diff_img, pixel_Y_lo_, width * height ); + + w->map_h = height / 2 + 1; + w->map_w = width / 2 + 1; + + w->map = (int*) vj_calloc (sizeof(int) * w->map_h * w->map_w * 3); + if(!w->map) return 0; + + w->vtable = (signed char*) vj_calloc( sizeof(signed char) * w->map_w * w->map_h * 2); + if(!w->vtable) return 0; + + w->map3 = w->map + w->map_w * w->map_h * 2; + + setTable(w); + + + w->map1 = w->map; + w->map2 = w->map + w->map_h*w->map_w; + w->stat = 1; + w->point = 16; + w->impact = 2; + w->loopnum = 2; + + return 1; +} + +void water_free(void *ud) { + + water_t *w = (water_t*) ud; + if(w) { + if(w->ripple_data[0]) free(w->ripple_data[0]); + if(w->map) free(w->map); + if(w->diff_img) free(w->diff_img); + if(w->vtable) free(w->vtable); + free(w); + } + w = NULL; +} + + +static inline void drop(water_t *w,int power) +{ + int x, y; + int *p, *q; + + x = wfastrand(w)%(w->map_w-4)+2; + y = wfastrand(w)%(w->map_h-4)+2; + p = w->map1 + y*w->map_w + x; + q = w->map2 + y*w->map_w + x; + *p = power; + *q = power; + *(p-w->map_w) = *(p-1) = *(p+1) = *(p+w->map_w) = power/2; + *(p-w->map_w-1) = *(p-w->map_w+1) = *(p+w->map_w-1) = *(p+w->map_w+1) = power/4; + *(q-w->map_w) = *(q-1) = *(q+1) = *(q+w->map_w) = power/2; + *(q-w->map_w-1) = *(q-w->map_w+1) = *(q+w->map_w-1) = *(p+w->map_w+1) = power/4; +} + +static void drawmotionframe( VJFrame *f , water_t *w ) +{ + veejay_memset( f->data[1], 128, f->uv_len ); + veejay_memset( f->data[2], 128, f->uv_len ); + int i; + int len = f->width * f->height; + for( i = 0; i data[0][i] = w->diff_img[i]; +} + +static int globalactivity(VJFrame *f2, water_t *w, int in) +{ + int len = (f2->width * f2->height)/4; + uint32_t sum = 0,min=0xffff,max=0; + uint64_t activity_level1 = 0; + uint64_t activity_level2 = 0; + uint64_t activity_level3 = 0; + uint64_t activity_level4 = 0; + uint8_t *binary_img = w->diff_img; + int i = 0; + for( i = 0; i < len; i += 4 ) + { + + activity_level1 += binary_img[i]; + activity_level2 += binary_img[i+1]; + activity_level3 += binary_img[i+2]; + activity_level4 += binary_img[i+3]; + } + uint32_t activity_level = ( (activity_level1>>8) + (activity_level2>>8) + (activity_level3>>8) + (activity_level4>>8)); + + int current_his_len = 8; + + histogram_[ (n__%current_his_len) ] = activity_level; + + for( i = 0; i < current_his_len; i ++ ) + { + sum += histogram_[i]; + if(histogram_[i] > max ) max = histogram_[i]; + if(histogram_[i] < min ) min = histogram_[i]; + } + if( (n__ % current_his_len)==0 ) + { + keyp_ = keyv_; + keyv_ = (sum > 0 ? (sum/current_his_len):0 ); + } + + if( n__ <= 1 ) + return in; + + int tmp = (( n__ - 1) % current_his_len) + 1; + float q = 1.0f/(float) current_his_len * tmp; + float diff = (float) keyv_ - (float) keyp_; + float pu = keyp_ + ( q* diff); + float wu = 1.0f/31; + float pw = wu * pu; + + int res = (30 * pw); + if( res < 1 ) + return 1; + return res; +} + +static void motiondetect(VJFrame *f, VJFrame *f2, int threshold, water_t *w) +{ + uint8_t *bg = w->diff_img + (f->width * f->height); + uint8_t *in = f2->data[0]; + if(!w->have_img) + { + softblur_apply( f2,f->width,f->height,0); + veejay_memcpy(bg, f2->data[0], f->width * f->height ); + w->have_img = 1; + return; + } + + int i,len= f->width * f->height; + uint8_t pp1; + for(i = 0; i < len ; i ++ ) { + pp1 = abs(bg[i] - in[i]); + if(pp1 > threshold ) { + w->diff_img[i] = pp1; + } else { + w->diff_img[i] = 0; +// (w->diff_img[i] + 0)>>1; + } + } + + int *p = w->map1 + w->map_w + 1; + int *q = w->map2 + w->map_w + 1; + int width = f->width; + int x,y,h; + uint8_t *d = w->diff_img + width + 2; + for( y = w->map_h - 2; y > 0 ; y -- ) { + for( x = w->map_w - 2 ; x > 0 ; x -- ) { + h = (int) *d + (int) *(d+1) + (int) *(d+width) + (int) *(d+width+1); + if(h>0) { + *p = h << ( w->point + w->impact - 8 ); + *q = *p; + } + p ++; q ++; + d += 2; + } + d += width + 2; + p += 2; + q += 2; + } + +} +static void motiondetect2(VJFrame *f, VJFrame *f2, int threshold, water_t *w) +{ + uint8_t *bg = w->diff_img + (f->width * f->height); + uint8_t *in = f2->data[0]; + if(!w->have_img) + { + softblur_apply( f2,f->width,f->height,0); + veejay_memcpy(bg, f2->data[0], f->width * f->height ); + w->have_img = 1; + return; + } + + int i,len= f->width * f->height; + uint8_t pp1; + for(i = 0; i < len ; i ++ ) { + pp1 = abs(bg[i] - in[i]); + if(pp1 < threshold ) { + w->diff_img[i] = pp1; + } else { + w->diff_img[i] = 0; + // (w->diff_img[i] + 0)>>1; + } + } + + int *p = w->map1 + w->map_w + 1; + int *q = w->map2 + w->map_w + 1; + int width = f->width; + int x,y,h; + uint8_t *d = w->diff_img + width + 2; + for( y = w->map_h - 2; y > 0 ; y -- ) { + for( x = w->map_w - 2 ; x > 0 ; x -- ) { + h = (int) *d + (int) *(d+1) + (int) *(d+width) + (int) *(d+width+1); + if(h>0) { + *p = h << ( w->point + w->impact - 8 ); + *q = *p; + } + p ++; q ++; + d += 2; + } + d += width + 2; + p += 2; + q += 2; + } + +} + + +static void raindrop(water_t *w) +{ + static int period = 0; + static int rain_stat = 0; + static unsigned int drop_prob = 0; + static int drop_prob_increment = 0; + static int drops_per_frame_max = 0; + static int drops_per_frame = 0; + static int drop_power = 0; + + int i; + + if(period == 0) { + switch(rain_stat) { + case 0: + period = (wfastrand(w)>>23)+100; + drop_prob = 0; + drop_prob_increment = 0x00ffffff/period; + drop_power = (-(wfastrand(w)>>28)-2)<point; + drops_per_frame_max = 2<<(wfastrand(w)>>30); // 2,4,8 or 16 + rain_stat = 1; + break; + case 1: + drop_prob = 0x00ffffff; + drops_per_frame = 1; + drop_prob_increment = 1; + period = (drops_per_frame_max - 1) * 16; + rain_stat = 2; + break; + case 2: + period = (wfastrand(w)>>22)+1000; + drop_prob_increment = 0; + rain_stat = 3; + break; + case 3: + period = (drops_per_frame_max - 1) * 16; + drop_prob_increment = -1; + rain_stat = 4; + break; + case 4: + period = (wfastrand(w)>>24)+60; + drop_prob_increment = -(drop_prob/period); + rain_stat = 5; + break; + case 5: + default: + period = (wfastrand(w)>>23)+500; + drop_prob = 0; + rain_stat = 0; + break; + } + } + switch(rain_stat) { + default: + case 0: + break; + case 1: + case 5: + if((wfastrand(w)>>8)0; i--) { + drop(w,drop_power); + } + drops_per_frame += drop_prob_increment; + break; + } + period--; +} + +void water_apply(void *user_data, VJFrame *frame, VJFrame *frame2, int width, int height, int fresh_rate, int loopnum, int decay, int mode, int threshold ) +{ + int x, y, i; + int dx, dy; + int h, v; + int wi, hi; + int *p, *q, *r; + signed char *vp; + uint8_t *src,*dest; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + int dummy = 0; + water_t *w = (water_t*) user_data; + + if(w->last_fresh_rate != fresh_rate) + { + w->last_fresh_rate = fresh_rate; + veejay_memset( w->map, 0, (w->map_h*w->map_w*2*sizeof(int))); + } + + veejay_memcpy ( w->ripple_data[0], Y,len); + + dest = Y; + src = w->ripple_data[0]; + + + w->loopnum = loopnum; + + /* impact from the motion or rain drop */ + if(!mode) { + raindrop(w); + w->have_img = 0; + } else if(mode==2) { + motiondetect(frame,frame2,threshold,w); +// decay = globalactivity(frame2,w,decay); +//veejay_msg(0, "Decay = %d",decay); + } else if(mode==3) { + motiondetect2(frame,frame2,threshold,w); +// decay = globalactivity(frame2,w,decay); + } else if(mode == 1 ) { + motiondetect(frame,frame2,threshold,w); + drawmotionframe(frame,w); + return; + } + + /* simulate surface wave */ + wi = w->map_w; + hi = w->map_h; + + /* This function is called only 30 times per second. To increase a speed + * of wave, iterates this loop several times. */ + for(i=w->loopnum; i>0; i--) { + /* wave simulation */ + p = w->map1 + wi + 1; + q = w->map2 + wi + 1; + r = w->map3 + wi + 1; + for(y=hi-2; y>0; y--) { + for(x=wi-2; x>0; x--) { + h = *(p-wi-1) + *(p-wi+1) + *(p+wi-1) + *(p+wi+1) + + *(p-wi) + *(p-1) + *(p+1) + *(p+wi) - (*p)*9; + h = h >> 3; + v = *p - *q; + v += h - (v >> decay); + *r = v + *p; + p++; + q++; + r++; + } + p += 2; + q += 2; + r += 2; + } + + /* low pass filter */ + p = w->map3 + wi + 1; + q = w->map2 + wi + 1; + for(y=hi-2; y>0; y--) { + for(x=wi-2; x>0; x--) { + h = *(p-wi) + *(p-1) + *(p+1) + *(p+wi) + (*p)*60; + *q = h >> 6; + p++; + q++; + } + p+=2; + q+=2; + } + + p = w->map1; + w->map1 = w->map2; + w->map2 = p; + } + + vp = w->vtable; + p = w->map1; + for(y=hi-1; y>0; y--) { + for(x=wi-1; x>0; x--) { + /* difference of the height between two voxel. They are twiced to + * emphasise the wave. */ + vp[0] = w->sqrtable[((p[0] - p[1])>>(w->point-1))&0xff]; + vp[1] = w->sqrtable[((p[0] - p[wi])>>(w->point-1))&0xff]; + p++; + vp+=2; + } + p++; + vp+=2; + } + + hi = height; + wi = width; + vp = w->vtable; + +/* dest2 = dest; + p = map1; + for(y=0; y>(point-5))+128; + if(h < 0) h = 0; + if(h > 255) h = 255; + dest[0] = h; + dest[1] = h; + dest[wi] = h; + dest[wi+1] = h; + p++; + dest+=2; + vp+=2; + } + dest += width; + vp += 2; + p++; + } + +*/ + + + for(y=0; y=wi) dx=wi-1; + if(dy>=hi) dy=hi-1; + dest[0] = src[dy*wi+dx]; + + i = dx; + + dx = x + 1 + (h+(int)vp[2])/2; + if(dx<0) dx=0; + if(dx>=wi) dx=wi-1; + dest[1] = src[dy*wi+dx]; + + dy = y + 1 + (v+(int)vp[w->map_w*2+1])/2; + if(dy<0) dy=0; + if(dy>=hi) dy=h-1; + dest[wi] = src[dy*wi+i]; + + dest[wi+1] = src[dy*wi+dx]; + dest+=2; + vp+=2; + } + dest += wi; + vp += 2; + } + + +} diff --git a/veejay-server/libvje/effects/whiteframe.c b/veejay-server/libvje/effects/whiteframe.c new file mode 100644 index 00000000..59f66d00 --- /dev/null +++ b/veejay-server/libvje/effects/whiteframe.c @@ -0,0 +1,72 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "whiteframe.h" + +vj_effect *whiteframe_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 0; + ve->defaults = NULL; /* default values */ + ve->limits[0] = NULL; /* min */ + ve->limits[1] = NULL; /* max */ + ve->description = "Replace Pure White";; + ve->extra_frame = 1; + ve->sub_format = 0; + ve->has_user = 0; + return ve; +} + +/* this method was created for magic motion */ +void whiteframe_apply( VJFrame *frame, VJFrame *frame2, int width, + int height) +{ + unsigned int i; + const int len = frame->len; + const int uv_len = frame->uv_len; + uint8_t p; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + /* look for white pixels in luminance channel and swap with yuv2 */ + for (i = 0; i < len; i++) + { + p = Y[i]; + if (p >= 235) + { + Y[i] = Y2[i]; + } + } + + for (i = 0; i < uv_len; i++) + { + p = Cb[i]; + if (p == 128) + { + Cb[i] = Cb2[i]; + Cr[i] = Cr2[i]; + } + } +} +void whitereplace_free(){} diff --git a/veejay-server/libvje/effects/whiteframe.h b/veejay-server/libvje/effects/whiteframe.h new file mode 100644 index 00000000..ec399d8c --- /dev/null +++ b/veejay-server/libvje/effects/whiteframe.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef WHITEFRAME_H +#define WHITEFRAME_H +#include +#include +#include + +vj_effect *whiteframe_init(); + +void whiteframe_apply(VJFrame *frame, VJFrame *frame2, int width, + int height ); +void whiteframe_free(); +#endif diff --git a/veejay-server/libvje/effects/widthmirror.c b/veejay-server/libvje/effects/widthmirror.c new file mode 100644 index 00000000..c969e8f2 --- /dev/null +++ b/veejay-server/libvje/effects/widthmirror.c @@ -0,0 +1,96 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "widthmirror.h" +#include +#include +vj_effect *widthmirror_init(int max_width,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 1; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 2; + + ve->limits[0][0] = 2; + ve->limits[1][0] = max_width; + + ve->description = "Width Mirror"; + ve->sub_format = 0; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} + +void widthmirror_apply(VJFrame *frame, int width, int height, + int width_div) +{ + unsigned int r, c; + const int len = frame->len; + const int uv_len = frame->uv_len; + const int uv_width = frame->uv_width; + const int uv_width_div = width_div; + int p1; + uint8_t x1, x2, x3; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + if (width_div >= width || width_div < 2) + width_div = 2; + + for (r = width; r < len; r += width) { + unsigned int divisor = width / width_div; + for (c = 0; c < width; c++) { + if (divisor - c < 0) + p1 = c - divisor + r; + else + p1 = divisor - c + r; + x1 = Y[c + r]; + Y[p1] = x1; + Y[width - c + r] = x1; + } + } + for (r = uv_width; r < uv_len; r += uv_width) { + unsigned int divisor = uv_width / uv_width_div; + for (c = 0; c < uv_width; c++) { + if (divisor - c < 0) + p1 = c - divisor + r; + else + p1 = divisor - c + r; + + x2 = Cb[c + r]; + Cb[p1] = x2; + Cb[uv_width - c + r] = x2; + + x3 = Cr[c + r]; + Cr[p1] = x3; + Cr[uv_width - c + r] = x3; + + } + } + + + + + +} +void widthmirror_free(){} diff --git a/veejay-server/libvje/effects/widthmirror.h b/veejay-server/libvje/effects/widthmirror.h new file mode 100644 index 00000000..bd2e740d --- /dev/null +++ b/veejay-server/libvje/effects/widthmirror.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef WIDTHMIRROR_H +#define WIDTHMIRROR_H +#include +#include +#include + +vj_effect *widthmirror_init(int max_width, int h); +void widthmirror_apply(VJFrame *frame, int width, int height, int div); +void widthmirror_free(); +#endif diff --git a/veejay-server/libvje/effects/zoom.c b/veejay-server/libvje/effects/zoom.c new file mode 100644 index 00000000..674240e8 --- /dev/null +++ b/veejay-server/libvje/effects/zoom.c @@ -0,0 +1,98 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include +#include + +vj_effect *zoom_init(int width , int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = width/2; + ve->defaults[1] = height/2; + ve->defaults[2] = 50; + ve->defaults[3] = 1; + + ve->limits[0][0] = 0; + ve->limits[1][0] = width; + + ve->limits[0][1] = 0; + ve->limits[1][1] = height; + + ve->limits[0][2] = 10; + ve->limits[1][2] = 100; + + ve->limits[0][3] = 0; + ve->limits[1][3] = 1; + + ve->description = "Zoom"; + ve->sub_format = 1; + ve->extra_frame = 0; + ve->has_user = 0; + return ve; +} +static int zoom_[4] = { 0,0,0,0 }; +static void *zoom_vp_ = NULL; + +static uint8_t *zoom_private_[3]; + +int zoom_malloc(int width, int height) +{ + zoom_private_[0] = (uint8_t*) vj_yuvalloc( width,height ); + if(!zoom_private_[0] ) + return 0; + zoom_private_[1] = zoom_private_[0] + (width*height); + zoom_private_[2] = zoom_private_[1] + (width*height); + return 1; +} + +void zoom_free() { + if( zoom_private_[0] ) + free(zoom_private_[0] ); + if( zoom_vp_ ) + viewport_destroy( zoom_vp_ ); + zoom_vp_ = NULL; +} + +void zoom_apply( VJFrame *frame, int width, int height, int x, int y, int factor, int dir) +{ + if( zoom_[0] != x || zoom_[1] != y || zoom_[2] != factor || !zoom_vp_ || dir != zoom_[3]) + { + if( zoom_vp_ ) + viewport_destroy( zoom_vp_ ); + zoom_vp_ = viewport_fx_init( VP_QUADZOOM, width,height,x,y,factor, dir ); + if(!zoom_vp_ ) + return; + zoom_[0] = x; zoom_[1] = y; zoom_[2] = factor; zoom_[3] = dir; + } + + veejay_memcpy( zoom_private_[0], frame->data[0], (width*height)); + veejay_memcpy( zoom_private_[1], frame->data[1], (width*height)); + veejay_memcpy( zoom_private_[2], frame->data[2], (width*height)); + + viewport_process_dynamic( zoom_vp_, zoom_private_, frame->data ); + +} + diff --git a/veejay-server/libvje/effects/zoom.h b/veejay-server/libvje/effects/zoom.h new file mode 100644 index 00000000..fd55ed2d --- /dev/null +++ b/veejay-server/libvje/effects/zoom.h @@ -0,0 +1,33 @@ + +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef ZOOM_H +#define ZOOM_H +#include +#include +#include + +vj_effect *zoom_init(int width, int height); +int zoom_malloc(int w, int h); +void zoom_free(); +void zoom_apply(VJFrame *frame, int width, + int height, int x_offset, int y_offset, int factor, int dir); +#endif diff --git a/veejay-server/libvje/internal.h b/veejay-server/libvje/internal.h new file mode 100644 index 00000000..0958edb2 --- /dev/null +++ b/veejay-server/libvje/internal.h @@ -0,0 +1,596 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJE_INTERNAL_H +#define VJE_INTERNAL_H + +#define VJE_MAX_ARGS 10 +#define VJE_INVALID_ARGS -1 +#define VJE_NEED_INIT -2 +#define VJE_NO_FRAMES -3 +#define VJE_SUCCESS 0 +#include + +enum { + VJ_EFFECT_LUM_RED = 65, + VJ_EFFECT_LUM_BLUE = 35, + VJ_EFFECT_LUM_WHITE = 235, + VJ_EFFECT_LUM_BLACK = 16, + VJ_EFFECT_LUM_YELLOW = 162, + VJ_EFFECT_LUM_CYAN = 131, + VJ_EFFECT_LUM_GREEN = 112, + VJ_EFFECT_LUM_MAGNETA = 84, +}; + +enum { + VJ_EFFECT_CB_RED = 100, + VJ_EFFECT_CB_WHITE = 128, + VJ_EFFECT_CB_YELLOW = 44, + VJ_EFFECT_CB_CYAN = 156, + VJ_EFFECT_CB_MAGNETA = 184, + VJ_EFFECT_CB_BLUE = 212, + VJ_EFFECT_CB_GREEN = 72, + VJ_EFFECT_CB_BLACK = 128, +}; + +enum { + VJ_EFFECT_CR_RED = 212, + VJ_EFFECT_CR_WHITE = 128, + VJ_EFFECT_CR_YELLOW = 142, + VJ_EFFECT_CR_CYAN = 44, + VJ_EFFECT_CR_MAGNETA = 198, + VJ_EFFECT_CR_BLUE = 114, + VJ_EFFECT_CR_GREEN = 58, + VJ_EFFECT_CR_BLACK = 128, +}; + +enum { + VJ_EFFECT_COLOR_YELLOW = 7, + VJ_EFFECT_COLOR_RED = 6, + VJ_EFFECT_COLOR_BLUE = 5, + VJ_EFFECT_COLOR_MAGNETA = 4, + VJ_EFFECT_COLOR_CYAN = 3, + VJ_EFFECT_COLOR_GREEN = 2, + VJ_EFFECT_COLOR_BLACK = 1, + VJ_EFFECT_COLOR_WHITE = 0, +}; + +enum { + /* video effects */ + VJ_VIDEO_EFFECT_OVERLAYMAGIC = 201, + VJ_VIDEO_EFFECT_LUMAMAGICK = 202, + VJ_VIDEO_EFFECT_DIFF = 203, + VJ_VIDEO_EFFECT_OPACITY = 204, + VJ_VIDEO_EFFECT_LUMAKEY = 205, + VJ_VIDEO_EFFECT_RGBKEY = 206, + VJ_VIDEO_EFFECT_CHROMAMAGICK = 207, + VJ_VIDEO_EFFECT_LUMABLEND = 208, + VJ_VIDEO_EFFECT_SPLIT = 209, + VJ_VIDEO_EFFECT_BORDERS = 210, + VJ_VIDEO_EFFECT_FRAMEBORDER = 211, + VJ_VIDEO_EFFECT_SLIDINGDOOR = 212, + VJ_VIDEO_EFFECT_TRANSOP = 213, + VJ_VIDEO_EFFECT_CAROT = 214, + VJ_VIDEO_EFFECT_LINE = 215, + VJ_VIDEO_EFFECT_TRANSBLEND = 216, + VJ_VIDEO_EFFECT_FADECOLOR = 217, + VJ_VIDEO_EFFECT_FADECOLORRGB = 218, + VJ_VIDEO_EFFECT_WHITEFRAME = 219, + //VJ_VIDEO_EFFECT_DIFFIMG = 220, + VJ_VIDEO_EFFECT_MASK = 220, + VJ_VIDEO_EFFECT_THRESHOLDSMOOTH = 221, + VJ_VIDEO_EFFECT_THRESHOLD = 222, + VJ_VIDEO_EFFECT_RGBKEYSMOOTH = 223, + VJ_VIDEO_EFFECT_WIPE = 224, + VJ_VIDEO_EFFECT_TRACER = 225, + VJ_VIDEO_EFFECT_MTRACER = 226, + VJ_VIDEO_EFFECT_DUPMAGIC = 227, + VJ_VIDEO_EFFECT_KEYSELECT = 228, + VJ_VIDEO_EFFECT_COMPLEXTHRESHOLD = 229, + VJ_VIDEO_EFFECT_COMPLEXSYNC = 230, + VJ_VIDEO_EFFECT_3BAR = 231, + VJ_VIDEO_EFFECT_VBAR = 232, + VJ_VIDEO_EFFECT_LUMAMASK = 233, + VJ_VIDEO_EFFECT_BINARYOVERLAY = 234, + VJ_VIDEO_EFFECT_DISSOLVE = 235, + VJ_VIDEO_EFFECT_TRIPPLICITY = 236, + VJ_VIDEO_EFFECT_VIDEOPLAY = 237, + VJ_VIDEO_EFFECT_VIDEOWALL = 238, + VJ_VIDEO_EFFECT_EXTTHRESHOLD = 239, + VJ_VIDEO_EFFECT_EXTDIFF = 240, + VJ_VIDEO_EFFECT_PICINPIC = 241, + VJ_VIDEO_EFFECT_CHAMBLEND = 242, + VJ_VIDEO_EFFECT_RADIOACTIVE = 243, + VJ_VIDEO_EFFECT_TEXMAP = 244, + VJ_VIDEO_EFFECT_RIPPLETV = 245, +}; + +enum { + /* image effects */ + VJ_IMAGE_EFFECT_MIRROR = 101, + VJ_IMAGE_EFFECT_MIRRORS = 102, + VJ_IMAGE_EFFECT_WIDTHMIRROR = 103, + VJ_IMAGE_EFFECT_FLIP = 104, + VJ_IMAGE_EFFECT_POSTERIZE = 105, + VJ_IMAGE_EFFECT_NEGATION = 106, + VJ_IMAGE_EFFECT_SOLARIZE = 107, + VJ_IMAGE_EFFECT_COLORADJUST = 108, + VJ_IMAGE_EFFECT_GAMMA = 109, + VJ_IMAGE_EFFECT_SOFTBLUR = 110, + VJ_IMAGE_EFFECT_REVTV = 111, + VJ_IMAGE_EFFECT_DICES = 112, + VJ_IMAGE_EFFECT_SMUCK = 113, + VJ_IMAGE_EFFECT_KILLCHROMA = 114, + VJ_IMAGE_EFFECT_EMBOSS = 115, + VJ_IMAGE_EFFECT_DITHER = 116, + VJ_IMAGE_EFFECT_RAWMAN = 117, + VJ_IMAGE_EFFECT_RAWVAL = 118, + VJ_IMAGE_EFFECT_TRANSFORM = 119, + VJ_IMAGE_EFFECT_FIBDOWNSCALE = 120, + VJ_IMAGE_EFFECT_REFLECTION = 121, + VJ_IMAGE_EFFECT_ROTOZOOM = 122, + VJ_IMAGE_EFFECT_COLORSHIFT = 123, + VJ_IMAGE_EFFECT_SCRATCHER = 124, + VJ_IMAGE_EFFECT_MAGICSCRATCHER = 125, + VJ_IMAGE_EFFECT_CHROMASCRATCHER = 126, + VJ_IMAGE_EFFECT_DISTORTION = 127, + VJ_IMAGE_EFFECT_GREYSELECT = 128, + VJ_IMAGE_EFFECT_BWSELECT = 129, + VJ_IMAGE_EFFECT_COMPLEXINVERT = 130, + VJ_IMAGE_EFFECT_COMPLEXSATURATE = 131, + VJ_IMAGE_EFFECT_ISOLATE = 132, + VJ_IMAGE_EFFECT_ENHANCEMASK = 133, + VJ_IMAGE_EFFECT_NOISEADD = 134, + VJ_IMAGE_EFFECT_CONTRAST = 135, + VJ_IMAGE_EFFECT_MOTIONBLUR = 136, + VJ_IMAGE_EFFECT_SINOIDS = 137, + VJ_IMAGE_EFFECT_AVERAGE = 138, + VJ_IMAGE_EFFECT_RIPPLE = 139, + VJ_IMAGE_EFFECT_BATHROOM = 140, + VJ_IMAGE_EFFECT_SLICE = 141, + VJ_IMAGE_EFFECT_ZOOM = 142, + VJ_IMAGE_EFFECT_DEINTERLACE = 144, + VJ_IMAGE_EFFECT_CROSSPIXEL = 145, + VJ_IMAGE_EFFECT_COLORTEST = 146, + VJ_IMAGE_EFFECT_DIFF = 147, + VJ_IMAGE_EFFECT_NOISEPENCIL = 148, + // VJ_IMAGE_EFFECT_RIPPLETV = 149, + VJ_IMAGE_EFFECT_PENCILSKETCH = 143, + VJ_IMAGE_EFFECT_PIXELATE = 150, + VJ_IMAGE_EFFECT_MAGICMIRROR = 151, + VJ_IMAGE_EFFECT_PIXELSMEAR = 152, + VJ_IMAGE_EFFECT_RASTER = 153, + VJ_IMAGE_EFFECT_FISHEYE = 154, + VJ_IMAGE_EFFECT_SWIRL = 155, + VJ_IMAGE_EFFECT_RADIALBLUR = 156, + VJ_IMAGE_EFFECT_CHROMIUM = 157, + VJ_IMAGE_EFFECT_CHROMAPALETTE = 158, + VJ_IMAGE_EFFECT_UVCORRECT = 159, + VJ_IMAGE_EFFECT_OVERCLOCK = 160, + VJ_IMAGE_EFFECT_CARTONIZE = 161, + VJ_IMAGE_EFFECT_NERVOUS = 162, + VJ_IMAGE_EFFECT_MORPHOLOGY = 163, + VJ_IMAGE_EFFECT_VIDBLOB = 164, + VJ_IMAGE_EFFECT_VIDBOIDS = 165, + VJ_IMAGE_EFFECT_GHOST = 166, + VJ_IMAGE_EFFECT_NEIGHBOUR = 167, + VJ_IMAGE_EFFECT_NEIGHBOUR2= 168, + VJ_IMAGE_EFFECT_NEIGHBOUR3= 169, + VJ_IMAGE_EFFECT_NEIGHBOUR4= 170, + VJ_IMAGE_EFFECT_NEIGHBOUR5= 171, + VJ_IMAGE_EFFECT_CUTSTOP = 172, + VJ_IMAGE_EFFECT_MASKSTOP = 173, + VJ_IMAGE_EFFECT_PHOTOPLAY = 174, + VJ_IMAGE_EFFECT_FLARE = 175, + VJ_IMAGE_EFFECT_CONSTANTBLEND = 176, + VJ_IMAGE_EFFECT_COLORMAP = 177, + VJ_IMAGE_EFFECT_GOOM = 178, + VJ_IMAGE_EFFECT_COLMORPH = 179, + VJ_IMAGE_EFFECT_COLFLASH = 180, + VJ_IMAGE_EFFECT_RGBCHANNEL = 181, + VJ_IMAGE_EFFECT_AUTOEQ = 182, + VJ_IMAGE_EFFECT_COLORHIS = 183, + VJ_IMAGE_EFFECT_MOTIONMAP = 184, + VJ_IMAGE_EFFECT_TIMEDISTORT = 185, + VJ_IMAGE_EFFECT_CHAMELEON = 186, + VJ_IMAGE_EFFECT_BALTANTV = 187, + VJ_IMAGE_EFFECT_CONTOUR = 188, + VJ_IMAGE_EFFECT_LENSCORRECTION = 149, + VJ_IMAGE_EFFECT_DUMMY=100, +}; + +#define VJ_IMAGE_EFFECT_MIN 100 +#define VJ_IMAGE_EFFECT_MAX 189 + +#define VJ_VIDEO_EFFECT_MIN 200 +#define VJ_VIDEO_EFFECT_MAX 246 + +#define VJ_VIDEO_COUNT (VJ_VIDEO_EFFECT_MAX - VJ_VIDEO_EFFECT_MIN) + +#define VJ_EXT_EFFECT 500 + +/* luma blend types */ +enum { + VJ_EFFECT_BLEND_ADDITIVE = 1, + VJ_EFFECT_BLEND_SUBSTRACTIVE = 2, + VJ_EFFECT_BLEND_MULTIPLY = 3, + VJ_EFFECT_BLEND_DIVIDE = 4, + VJ_EFFECT_BLEND_LIGHTEN = 5, + VJ_EFFECT_BLEND_HARDLIGHT = 6, + VJ_EFFECT_BLEND_DIFFERENCE = 7, + VJ_EFFECT_BLEND_DIFFNEGATE = 8, + VJ_EFFECT_BLEND_EXCLUSIVE = 9, + VJ_EFFECT_BLEND_BASECOLOR = 10, + VJ_EFFECT_BLEND_FREEZE = 11, + VJ_EFFECT_BLEND_UNFREEZE = 12, + VJ_EFFECT_BLEND_RELADD = 13, + VJ_EFFECT_BLEND_RELSUB = 14, + VJ_EFFECT_BLEND_MAXSEL = 15, + VJ_EFFECT_BLEND_MINSEL = 16, + VJ_EFFECT_BLEND_RELADDLUM = 17, + VJ_EFFECT_BLEND_RELSUBLUM = 18, + VJ_EFFECT_BLEND_MINSUBSEL = 19, + VJ_EFFECT_BLEND_MAXSUBSEL = 20, + VJ_EFFECT_BLEND_ADDSUBSEL = 21, + VJ_EFFECT_BLEND_ADDAVG = 22, + VJ_EFFECT_BLEND_ADDTEST2 = 23, + VJ_EFFECT_BLEND_ADDTEST3 = 24, + VJ_EFFECT_BLEND_ADDTEST4 = 25, + VJ_EFFECT_BLEND_MULSUB = 26, + VJ_EFFECT_BLEND_SOFTBURN = 27, + VJ_EFFECT_BLEND_INVERSEBURN = 28, + VJ_EFFECT_BLEND_COLORDODGE = 29, + VJ_EFFECT_BLEND_ADDDISTORT = 30, + VJ_EFFECT_BLEND_SUBDISTORT = 31, + +}; +extern void tripplicity_apply(VJFrame *frame1,VJFrame *frame2, int w, int h, + int a, int b, int c ); + +extern void dices_apply(void * data, VJFrame *frame, int width, + int height, int cube_bits); +extern void dither_apply( VJFrame *frame, int width, int height, int size, + int n); +extern void emboss_apply( VJFrame *frame, int width, int height, int n); +extern void fibdownscale_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int n); +extern void _fibdownscale_apply(VJFrame *frame, VJFrame *frame2, + int width, int height); +extern void _fibrectangle_apply(VJFrame *frame, VJFrame *frame2, + int width, int height); +extern void flip_apply( VJFrame *frame, int width, int height, int n); +extern void killchroma_apply(VJFrame *frame, int width, int height, + int n); +extern void lumamagic_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int n, int op_a, int op_b + ); +extern void overlaymagic_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int n); +extern void mirrors_apply( VJFrame *frame, int width, int height, + int type, int factor); +extern void mirrors2_apply( VJFrame *frame, int width, int height, + int type); +extern void negation_apply( VJFrame *frame, int width, int height, + int val); +extern void colormap_apply( VJFrame *frame, int width, int height, + int r, int g, int b); +extern void opacity_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int opacity); +extern void opacityadv_apply(VJFrame *frame, VJFrame *frame2, int w, + int h, int o, int t1, int t2); +extern void opacitythreshold_apply(VJFrame *frame, VJFrame *frame2, + int w, int h, int o, int t1, int t2); + + +extern void posterize_apply( VJFrame *frame, int width, int height, + int factor, int t1, int t2); +extern void revtv_apply( VJFrame *frame, int width, int height, int space, + int vscale, int c, int cn); +extern void softblur_apply( VJFrame *frame, int width, int height, int n); +extern void split_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int n, int swap); +extern void widthmirror_apply( VJFrame *frame, int width, int height, + int div); +extern void transblend_apply(VJFrame *frame, VJFrame *frame2, int w, + int h, int mode, int twidth, int theight, + int x1, int y1, int x2, int y2); + +extern void borders_apply(VJFrame *frame, int width, int height, + int size, int color); +extern void frameborder_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int size); +extern void noisepencil_apply(VJFrame *frame, int width, int height, + int a, int b, int c , int d ); + +extern void rawman_apply(VJFrame *frame, unsigned int width, + unsigned int height, unsigned int mode, + unsigned int Y); +extern void rawval_apply(VJFrame *frame, int width, int height, + int color_cb, int color_cr, int new_cb, + int new_cr); +extern void smuck_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int level); +extern void colorfade_apply( VJFrame *frame, int width, int height, + int op, int color); +extern void slidingdoor_apply( VJFrame *frame, VJFrame *frame2, + int width, int height, int size); +extern void transop_apply(VJFrame *frame, VJFrame *frame2, int twidth, + int theight, int x1, int y1, int x2, int y2, + int width, int height, int opacity); + +extern void lumakey_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int a, int b, int c, int d, int e); +extern void pointfade_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int pointsize, + int opacity); + +extern void transcarot_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int point_size, int dy, + int dye, int row_start, int opacity, + int type); + +extern +void transline_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int distance, int line_width, int opacity, + int type); +extern void transform_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int size); + +extern void coloradjust_apply( VJFrame *frame, int width, int height, + int val, int degrees); + +extern void rgbkey_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int i_angle, int i_noise, + int r, int g, int b, int sup); + +extern void gamma_apply( VJFrame *frame, + int width, int height, int val); + +extern void solarize_apply(VJFrame *frame, int width, int height, + int threshold); +extern void dummy_apply(VJFrame *frame, int width, int height, + int color_num); +extern void rotozoom_apply(VJFrame *frame, int width, int height, int a, + int b, int c, int d); + +extern void whiteframe_apply(VJFrame *frame, VJFrame *frame2, + int width, int height); + +extern void texmap_apply(void *dd, VJFrame *frame, + VJFrame *frame2, int width, int height, + int mode, int threshold, int c , int take, int feather, int blob); +extern void contourextract_apply(void *dd, VJFrame *frame, + int width, int height, + int mode, int threshold, int c , int take, int feather, int blob); + +extern void diff_apply(void *dd, VJFrame *frame, + VJFrame *frame2, int width, int height, + int mode, int threshold, int c , int take, int feather); + +extern void chromamagick_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int type, int op0); +extern void colorfadergb_apply(VJFrame *frame, int width, int height, + int opacity, int r, int g, int b); + +void lumablend_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int type, int t1, int t2, int op); + +extern void diffimg_apply(VJFrame *frame, + int width, int height, int type, int delta, + int zeta); +extern void rgbkeysmooth_apply(VJFrame *frame, VJFrame *frame2, int w, + int h, int angle, int r, int g, int b, + int level, int noise); +extern void scratcher_apply(VJFrame *frame, int w, int h, int o, int n, + int r); +extern void colorshift_apply(VJFrame *frame, int width, int height, + int type, int param); +extern void reflection_apply(VJFrame *frame, int w, int h, int n1, + int n2, int n3); +extern void distortion_apply(VJFrame *frame, int w, int h, int p1, + int p2); +extern void magicscratcher_apply(VJFrame *frame, int w, int h, int mode, + int nframes, int r); +extern void wipe_apply(VJFrame *frame, VJFrame *frame2, int w, int h, + int inc, int opacity); +/* begin API */ +extern void chromascratcher_apply(VJFrame *frame, + int width, int height, int mode, + int opacity, int nframes, + int no_reverse); + +extern void tracer_apply(VJFrame *frame, VJFrame *frame2, + int w, int h, int opacity, int n); + +extern void mtracer_apply(VJFrame *frame, VJFrame *frame2, int w, + int h, int mode, int n); + +extern void keyselect_apply(VJFrame *frame, VJFrame *frame2,int w,int h, int angle,int r, + int g, int b, int mode, int noise); + +extern void greyselect_apply(VJFrame *frame, int w, int h, int angle, int r, int g, int b); +extern void isolate_apply(VJFrame *frame, int w, int h, int angle, int r, int g, int b, +int opacity); + +extern void bwselect_apply(VJFrame *frame, int w, int h, int a , int b); + +extern void complexinvert_apply(VJFrame *frame, int w, int h, int angle, int r, int g, int b, int i_noise); + +extern void complexsaturation_apply(VJFrame *frame, int w, int h, int angle, int r, int g, int b, int adj, int adjv, int inoise); + +extern void complexthreshold_apply(VJFrame *frame, VJFrame *frame2, int w, int h, int angle, int r, + int g, int b, int level, int threshold); + +extern void complexsync_apply(VJFrame *frame, VJFrame *frame2, int w, int h, int val ); + +extern void enhancemask_apply(VJFrame *frame,int w, int h, int *t); + +extern void contrast_apply(VJFrame *frame, int w, int h, int *t); + +extern void noiseadd_apply(VJFrame *frame, int w , int h , int t, int n); + +extern void motionblur_apply(VJFrame *frame, int w, int h, int n); + +extern void sinoids_apply(VJFrame *frame, int w, int h, int a,int b); + +extern void dupmagic_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int n); + +extern void simplemask_apply(VJFrame *frame, VJFrame *frame2, int width, + int height, int threshold, int invert); + +extern void bar_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int d, int x1, int x2, int t1, int b1); + +extern void vbar_apply(VJFrame *frame, VJFrame *frame2, + int w, int h, int d, int x1, int x2, int t1, int t2); + +extern void average_apply(VJFrame *frame, int w, int h, int val); + +extern void ripple_apply(VJFrame *frame, int width, int height, int waves, int ampli,int atten); + +extern void bathroom_apply(VJFrame *frame, int width, int height, int mode, int val); + +extern void slice_apply(VJFrame *frame, int width, int height, int val, int reinit); + +extern void zoom_apply(VJFrame *frame, int w, int h , int xo, int yo, int f, int dir); + +extern void deinterlace_apply(VJFrame *frame, int w, int h, int val); + +extern void simplematte_apply(VJFrame *frame, int w, int h, int threshold, int invert); + +extern void crosspixel_apply(VJFrame *frame, int w, int h,int type, int val); + +extern void color_apply(VJFrame *frame, int w, int h, int a,int b, int c); + +//extern void water_apply(VJFrame *frame, int w, int h, int val, int l, int d); +extern void water_apply(void *user_data, VJFrame *frame, VJFrame *frame2, int width, int height, int fresh_rate, int loopnum, int decay, int mode, int threshold); + +extern void pencilsketch_apply(VJFrame *frame, int w, int h, int type, int threshold, int opacity); + +extern void pixelate_apply(VJFrame *frame, int w, int h, int v ); + +extern void magicmirror_apply(VJFrame *frame, int w, int h, int x, int y, int d, int n ); + +extern void lumamask_apply(VJFrame *frame,VJFrame *frame2, int w, int h, int n, int m, int border); + +extern void smear_apply(VJFrame *frame, int w, int h, int n, int m); + +extern void raster_apply(VJFrame *frame, int w, int h, int v ); + +extern void fisheye_apply(VJFrame *frame, int w, int h, int v ); + +extern void swirl_apply(VJFrame *frame, int w, int h , int v ); + +extern void radialblur_apply(VJFrame *frame, int w, int h, int r, int p, int n); + +extern void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2,int w, int h, int n); + +extern void chromium_apply( VJFrame *frame, int w, int h, int n); + +extern void chromapalette_apply( VJFrame *frame, int w, int h, int a, int r, int g, int b, int c1, int c2); + + +extern void uvcorrect_apply(VJFrame *frame, int width, int height, int angle, int urot_center, int vrot_center, int iuFactor, int ivFactor, int uvmin, int uvmax ); + +extern void dissolve_apply(VJFrame *frame,VJFrame *frame2, int w, int h, int opacity); + +extern void overclock_apply(VJFrame *frame, int w, int h, int val, int r); + +extern void diff_prepare(void *data, uint8_t *map[3], int w, int h); + +extern void cartonize_apply( VJFrame *frame, int w, int h, int b1, int b2, int b3 ); + +extern void morphology_apply( VJFrame *frame, int w, int h, int t, int v, int p); + +extern void colmorphology_apply( VJFrame *frame, int w, int h, int t, int v, int p); + +extern void blob_apply( VJFrame *frame, int w, int h, int p0,int p1, int p2, int p3); + +extern void boids_apply( VJFrame *frame, int w, int h, int p0,int p1, int p2, int p3, int p4, int p5, int p6, int p7 +); + + +extern void ghost_apply(VJFrame *frame, int w, int h, int o ); +extern void neighbours_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); +extern void neighbours2_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); +extern void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); +extern void neighbours4_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level, int mode); +extern void neighbours5_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level); +extern void cutstop_apply( VJFrame *frame, + int width, int height, int treshold, + int freq, int cutmode, int holdmode); +extern void maskstop_apply( VJFrame *frame, + int width, int height, int treshold, + int freq, int cutmode, int holdmode); +extern void photoplay_apply(VJFrame *frame, int w, int h, int a, int b, int c); + +extern void videoplay_apply(VJFrame *frame,VJFrame *B, int w, int h, int a, int b, int c); + +extern void videowall_apply(VJFrame *frame,VJFrame *B, int w, int h, int a, int b, int c, int d); + +extern void goom_apply(VJFrame *frame, int w, int h, int val ); + + +extern void flare_apply(VJFrame *frame, int w, int h, int type, int threshold, int radius ); + +extern void constantblend_apply(VJFrame *frame , int w, int h, int type, int scale, int y ); + +extern void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, + int twidth, int theight, int x1, int y1, + int width, int height); + +extern void threshold_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int threshold, int reverse ); + +extern void motionmap_apply( VJFrame *frame, int w, int h, int threshold, int reverse, int draw, int his, int op ); + +extern void rgbchannel_apply( VJFrame *frame, int width, int height, int chr, int chg , int chb); + +extern void differencemap_apply( VJFrame *f, VJFrame *f2, int w, int h, int t1, int rev, int show ); + +extern void autoeq_apply( VJFrame *frame, int width, int height, int val, int i, int s); + +extern void colorhis_apply( VJFrame *frame, int w, int h, int v, int m, int i, int s ); + +extern void diff_destroy(); + +extern void texmap_destroy(); + +extern void contourextract_destroy(); + +extern void distortion_destroy(); + +extern void rotozoom_destroy(); + +extern void timedistort_apply( VJFrame *frame, int w, int h, int val ); + +extern void chameleon_apply( VJFrame *frame, int w, int h, int mode, int refresh ); + +extern void chameleonblend_apply( VJFrame *frame, VJFrame *source, int w, int h, int mode, int refresh ); + +extern void baltantv_apply (VJFrame *frame, int w, int h , int stride, int mode ); + +extern void radioactivetv_apply( VJFrame *a, VJFrame *b,int w, int h, int mode, int t, int sn, int threhold); + +extern void nervous_apply(VJFrame *Frame, int width, int height,int delay); + +extern void colflash_apply( VJFrame *frame, int width, int height, int f,int r, int g, int b, int d); + +extern void goomfx_apply( VJFrame *frame, int width, int height, int val, int val2); + +#endif diff --git a/veejay-server/libvje/plugload.c b/veejay-server/libvje/plugload.c new file mode 100644 index 00000000..97051a5f --- /dev/null +++ b/veejay-server/libvje/plugload.c @@ -0,0 +1,1007 @@ +/* + * Copyright (C) 2002-2006 Niels Elburg + * + * 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. + * + */ + +/* + Plugin Loader + * FreeFrame + * frei0r + * Livido (pending) + */ + +/* + inspired by http://onsight.id.gu.se/~gabor/ + http://www.gephex.org/ + + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include AVCODEC_INC +#include AVUTIL_INC +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +#define LINUX 1 +#include +#include + +#define V_BITS 24 +#include + +#define livido_port_t vevo_port_t +typedef f0r_instance_t (*f0r_construct_f)(unsigned int width, unsigned int height); +typedef void (*f0r_destruct_f)(f0r_instance_t instance); +typedef void (*f0r_deinit_f)(void); +typedef int (*f0r_init_f)(void); +typedef void (*f0r_get_plugin_info_f)(f0r_plugin_info_t *info); +typedef void (*f0r_get_param_info_f)(f0r_param_info_t *info, int param_index); +typedef void (*f0r_update_f)(f0r_instance_t instance, double time, const uint32_t *inframe, uint32_t *outframe); +typedef void (*f0r_update2_f)(f0r_instance_t instance, double time, const uint32_t *inframe1, const uint32_t *inframe2, const uint32_t *inframe3, uint32_t *outframe); +typedef void (*f0r_set_param_value_f)(f0r_instance_t *instance, f0r_param_t *param, int param_index); + +#define VEVO_FF_PORT 10 // free frame port +#define VEVO_FF_PARAM_PORT 11 // free frame parameter port + +#define VEVO_FR_PORT 20 // frei0r port +#define VEVO_FR_PARAM_PORT 21 // frei0r parameter port + + +//@@ missing specification on http://livido.dyne.org ! livido ignored for now +#define VEVO_LIVIDO_PORT 30 // livido port +#define VEVO_LIVIDO_PARAM_PORT 31 // livido parameter port + +#define VEVO_ILLEGAL 100 + +#if (V_BITS == 32) +#define FF_CAP_V_BITS_VIDEO FF_CAP_32BITVIDEO +#elif (V_BITS == 24) +#define FF_CAP_V_BITS_VIDEO FF_CAP_24BITVIDEO +#else // V_BITS = 16 +#define FF_CAP_V_BITS_VIDEO FF_CAP_16BITVIDEO +#endif + +static void *convert_yuv = NULL; +static void *convert_rgb = NULL; +static vevo_port_t **index_map_ = NULL; +static vevo_port_t *illegal_plugins_ =NULL; +static int index_ = 0; +static void *buffer_ = NULL; +static void *buffer2_ = NULL; +static void *buffer_b_ = NULL; +static int base_width_ =0; +static int base_height_ =0; +static int n_ff_ = 0; +static int n_fr_ = 0; +static int n_lvd_ = 0; + +static int select_f( const struct dirent *d ) +{ + return ( strstr( d->d_name, ".so" ) != NULL ); +} + +static int init_param_livido( void *port, int p, int hint ) +{ + return 0; +} + +static void free_parameters( void *port, int n ) +{ + int i; + + for ( i = 0; i < n ; i ++ ) + { + char key[10]; + void *param = NULL; + sprintf(key, "p%d", i ); + vevo_property_get(port, key,0, param ); + if( param ) + vevo_port_free( param ); + } +} + +static int init_param_fr( void *port, int p, int hint) +{ + void *parameter = vpn( VEVO_FR_PARAM_PORT ); + int min = 0; + int max = 100; + int dv = 50; + int n_values = 0; + + switch(hint) + { + case F0R_PARAM_DOUBLE: + n_values = 1; + break; + case F0R_PARAM_BOOL: + max = 1; + dv = 0; + n_values = 1; + break; + case F0R_PARAM_COLOR: + n_values = 3; + break; + case F0R_PARAM_POSITION: + n_values = 2; + break; + default: + break; + } + + if( n_values > 0 ) + { + int values[n_values]; + int k; + for( k = 0; k < n_values; k ++ ) values[k] = 0; + vevo_property_set( parameter, "value", VEVO_ATOM_TYPE_INT, n_values, &values ); + } + + vevo_property_set( parameter, "value", VEVO_ATOM_TYPE_INT, 0, NULL ); + + vevo_property_set( parameter, "min", VEVO_ATOM_TYPE_INT,1, &min ); + vevo_property_set( parameter, "max", VEVO_ATOM_TYPE_INT,1, &max ); + vevo_property_set( parameter, "default", VEVO_ATOM_TYPE_INT,1, &dv ); + vevo_property_set( parameter, "hint", VEVO_ATOM_TYPE_INT,1, &hint ); + + + char key[20]; + snprintf(key,20, "p%d", p ); + vevo_property_set( port, key, VEVO_ATOM_TYPE_VOIDPTR, 1, ¶meter ); + + return n_values; +} + + +static void* deal_with_livido( void *handle, char *name ) +{ +/* void *port = vevo_port_new( VEVO_LIVIDO_PORT ); + char *plugin_name = NULL; + + livido_setup_f livido_setup = dlsym( handle, "livido_setup" ); + + livido_setup_t setup[] = { + { (void(*)()) vj_malloc }, + { (void(*)()) free }, + { (void(*)())memset }, + { (void(*)())memcpy }, + { (void(*)())vevo_port_new }, + { (void(*)())vevo_port_free }, + { (void(*)())vevo_property_set }, + { (void(*)())vevo_property_get }, + { (void(*)())vevo_property_num_elements }, + { (void(*)())vevo_property_atom_type }, + { (void(*)())vevo_property_element_size }, + { (void(*)())vevo_list_properties } + }; + + void *livido_plugin = livido_setup( setup, 100 ); + if(!livido_plugin) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error setting up '%s'",name ); + vevo_port_free( port ); + return NULL; + } + + vevo_property_set( port, "lvd", LIVIDO_ATOM_TYPE_VOIDPTR, 1,&livido_plugin ); + vevo_property_set( port, "handle", LIVIDO_ATOM_TYPE_VOIDPTR,1,&handle ); + + return port; +*/ + return NULL; +} + +static void* deal_with_fr( void *handle, char *name) +{ + void *port = vpn( VEVO_FR_PORT ); + + f0r_init_f f0r_init = dlsym( handle, "f0r_init" ); + if( f0r_init == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': %s", name, dlerror()); + vevo_port_free( port ); + return NULL; + } + + f0r_deinit_f f0r_deinit = dlsym( handle, "f0r_deinit" ); + if( f0r_deinit == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': %s", name, dlerror()); + vevo_port_free( port ); + return NULL; + } + + f0r_get_plugin_info_f f0r_info = dlsym( handle, "f0r_get_plugin_info"); + if( f0r_info == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': %s", name, dlerror()); + vevo_port_free( port ); + return NULL; + } + + f0r_get_param_info_f f0r_param= dlsym( handle, "f0r_get_param_info" ); + if( f0r_param == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': %s", name, dlerror()); + vevo_port_free( port ); + return NULL; + } +//@ gamble + void *f0r_construct = dlsym( handle, "f0r_construct" ); + void *f0r_destruct = dlsym( handle, "f0r_destruct" ); + void *processf = dlsym( handle, "f0r_update" ); +// void *processm = dlsym( handle, "f0r_update2" ); + void *set_params = dlsym( handle, "f0r_set_param_value" ); + + + vevo_property_set( port, "handle", VEVO_ATOM_TYPE_VOIDPTR,1, &handle ); + vevo_property_set( port, "init", VEVO_ATOM_TYPE_VOIDPTR, 1, &f0r_init ); + vevo_property_set( port, "deinit", VEVO_ATOM_TYPE_VOIDPTR, 1, &f0r_deinit ); + vevo_property_set( port, "info", VEVO_ATOM_TYPE_VOIDPTR, 1, &f0r_info ); + vevo_property_set( port, "parameters", VEVO_ATOM_TYPE_VOIDPTR, 1, &f0r_param ); + vevo_property_set( port, "construct", VEVO_ATOM_TYPE_VOIDPTR, 1, &f0r_construct ); + vevo_property_set( port, "destruct", VEVO_ATOM_TYPE_VOIDPTR, 1, &f0r_destruct ); + vevo_property_set( port, "process", VEVO_ATOM_TYPE_VOIDPTR, 1, &processf); +// vevo_property_set( port, "process_mix", VEVO_ATOM_TYPE_VOIDPTR, 1, &processm); + vevo_property_set( port, "set_params", VEVO_ATOM_TYPE_VOIDPTR,1,&set_params); + + f0r_plugin_info_t finfo; + f0r_param_info_t pinfo; + + memset( &finfo,0,sizeof(f0r_plugin_info_t)); + memset( &pinfo,0,sizeof(f0r_param_info_t)); + + + if( (*f0r_init)() == 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': ", name); + vevo_port_free( port ); + return NULL; + } + + (*f0r_info)(&finfo); + + if( finfo.frei0r_version != FREI0R_MAJOR_VERSION ) + { + (*f0r_deinit)(); + vevo_port_free(port); + return NULL; + } + int extra = 0; +//@ fixme +// if( finfo.plugin_type == F0R_PLUGIN_TYPE_MIXER2 ) +// extra = 1; + + int n_params = finfo.num_params; + int r_params = 0; + int p = 0; + for ( p = 0; p < n_params; p ++ ) + { + (*f0r_param)(&pinfo,p); + r_params += init_param_fr( port, p, pinfo.type ); + } + + if( r_params > 8 ) + r_params = 8; + + char new_name[512]; + sprintf(new_name, "Frei0r %s", finfo.name ); + char *plug_name = strdup( new_name ); + vevo_property_set( port, "n_params", VEVO_ATOM_TYPE_INT, 1, &r_params ); + vevo_property_set( port, "f0r_p", VEVO_ATOM_TYPE_INT,1, &n_params ); + vevo_property_set( port, "name", VEVO_ATOM_TYPE_STRING,1, &plug_name ); + vevo_property_set( port, "mixer", VEVO_ATOM_TYPE_INT,1, &extra ); + free(plug_name); + return port; +} + +static void* deal_with_ff( void *handle, char *name ) +{ + void *port = vpn( VEVO_FF_PORT ); + char *plugin_name = NULL; + plugMainType *q = (plugMainType*) dlsym( handle, "plugMain" ); + + if( q == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR,"\tBorked FF plugin '%s': %s", name, dlerror()); + vevo_port_free( port ); + return NULL; + } + + PlugInfoStruct *pis = (q(FF_GETINFO, NULL, 0)).PISvalue; + + if ((q(FF_GETPLUGINCAPS, (LPVOID)FF_CAP_V_BITS_VIDEO, 0)).ivalue != FF_TRUE) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to get capabilities for plugin %s",name ); + vevo_port_free(port); + return NULL; + } + + + if (pis->APIMajorVersion < 1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cowardly refusing FF API version < 1.0" ); + vevo_port_free(port); + return NULL; + } + + char new_name[512]; + sprintf(new_name, "FreeFrame %s", pis->pluginName ); + plugin_name = strdup( new_name ); + if ( (q(FF_INITIALISE, NULL, 0 )).ivalue == FF_FAIL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot call init()"); + vevo_port_free(port); + if(plugin_name) free(plugin_name); + return NULL; + } + + int n_params = q( FF_GETNUMPARAMETERS, NULL, 0 ).ivalue; + if( n_params == FF_FAIL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot get number of parameters"); + vevo_port_free(port); + if(plugin_name) free(plugin_name); + return NULL; + } + + void *base = (void*) q; + vevo_property_set( port, "handle", VEVO_ATOM_TYPE_VOIDPTR,1, &handle ); + vevo_property_set( port, "name", VEVO_ATOM_TYPE_STRING,1, &plugin_name ); + vevo_property_set( port, "base", VEVO_ATOM_TYPE_VOIDPTR, 1, &base ); + vevo_property_set( port, "instance", VEVO_ATOM_TYPE_INT, 0, NULL ); + vevo_property_set( port, "n_params", VEVO_ATOM_TYPE_INT, 1,&n_params ); + + int p; + for( p= 0; p < n_params; p ++ ) + { + void *parameter = vpn( VEVO_FF_PARAM_PORT ); +#ifdef STRICT_CHECKING + assert( parameter != NULL ); +#endif + int type = q( FF_GETPARAMETERTYPE, (LPVOID) p, 0 ).ivalue; + // name, kind, flags, description, min,max,default,transition + vevo_property_set( parameter, "type", VEVO_ATOM_TYPE_INT, 1, &type); + + int min = 0; + int max = 100; + + if( type == FF_TYPE_BOOLEAN ) + { + min = 0; + max = 1; + } + else if( type == FF_TYPE_TEXT ) + { + min = 0; + max = 0; + } + + vevo_property_set( parameter, "min", VEVO_ATOM_TYPE_INT,1, &min ); + vevo_property_set( parameter, "max", VEVO_ATOM_TYPE_INT,1, &max ); + + float dvalue = 0.0; + dvalue = q( FF_GETPARAMETERDEFAULT, (LPVOID) p, 0).fvalue; + int ivalue = (int)(dvalue * 100.0); + vevo_property_set( parameter, "default", VEVO_ATOM_TYPE_INT,1 ,&ivalue ); + + char key[20]; + snprintf(key,20, "p%d", p ); + vevo_property_set( port, key, VEVO_ATOM_TYPE_VOIDPTR, 1, ¶meter ); + } + free(plugin_name); + return port; +} + +static int instantiate_plugin( void *plugin, int w , int h ) +{ + + int type = 0; + assert( plugin != NULL ); + vevo_property_get( plugin, "type", 0, &type); + if( type == VEVO_FF_PORT ) + { + VideoInfoStruct v; + v.frameWidth = w; + v.frameHeight = h; + v.orientation = 1; + v.bitDepth = FF_CAP_V_BITS_VIDEO; + + void *base = NULL; + vevo_property_get( plugin, "base", 0, &base); + plugMainType *q = (plugMainType*) base; + void *instance = q( FF_INSTANTIATE, &v, 0).ivalue; + if( instance == FF_FAIL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to initialize plugin"); + return 0; + } + vevo_property_set( plugin, "instance", VEVO_ATOM_TYPE_INT, 1, &instance ); + return 1; + } + else if( type == VEVO_FR_PORT ) + { + f0r_construct_f base; + vevo_property_get( plugin, "construct", 0, &base); + f0r_instance_t k = (*base)(w,h); + vevo_property_set(plugin, "instance", VEVO_ATOM_TYPE_VOIDPTR, 1, &k); + if( k == NULL ) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to initialize plugin"); + // store instance running status + int state = 1; + vevo_property_set( plugin, "running", VEVO_ATOM_TYPE_INT, 1, &state ); + return state; + } + else if ( type == VEVO_LIVIDO_PORT ) + { + return 0; + } + return 0; +} + +static void deinstantiate_plugin( void *plugin ) +{ + if(plugin == NULL) + return; + + int type = 0; + assert( plugin != NULL); + vevo_property_get( plugin, "type", 0, &type); + + if( type == VEVO_FF_PORT ) + { + void *base = NULL; + vevo_property_get( plugin, "base", 0, &base); + plugMainType *q = (plugMainType*) base; + + void *instance = NULL; + vevo_property_get( plugin, "instance", 0, &instance ); + if( instance ) + q( FF_DEINSTANTIATE, NULL, instance ); + } + else if ( type == VEVO_FR_PORT ) + { + int state = 0; + vevo_property_get( plugin, "state", 0, &state ); + if(!state) + return; + + f0r_destruct_f base; + vevo_property_get( plugin, "destruct", 0, &base); + f0r_instance_t instance; + vevo_property_get( plugin, "instance", 0, &instance ); + (*base)(instance); + } + else if ( type == VEVO_LIVIDO_PORT ) + { + + } +} + +static int is_so( const char *file ) +{ + if( strstr(file, ".so" ) || strstr( file, ".SO" ) ) + return 1; + return 0; +} + +static int is_valid_plugin( const char *file ) +{ + if(!file) + return 0; + struct stat l; + veejay_memset( &l, 0, sizeof( struct stat)); + if ( lstat( file, &l ) < 0 ) + return 0; + + if( S_ISDIR( l.st_mode )) + return 0; + + if( S_ISREG( l.st_mode )) + { + if( is_so(file) ) + return 1; + } + return 0; + +} + +static void add_to_plugin_list( const char *path ) +{ + if(!path) + return; + + int i; + char fullname[PATH_MAX]; + struct dirent **files = NULL; + struct stat sbuf; + int res = 0; + + memset( &sbuf,0 ,sizeof(struct stat)); + res = stat( path, &sbuf ); + + if( res != 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "File or directory '%s' does not exist (skip)", path); + return; + } + + if( S_ISREG( sbuf.st_mode ) ) + { + vevo_property_set( illegal_plugins_, path, VEVO_ATOM_TYPE_STRING, 0, NULL ); + return; + } + + if( !S_ISDIR( sbuf.st_mode ) ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Not a directory : '%s'", path ); + return; + } + int n_files = scandir( path, &files, select_f, alphasort ); + if( n_files <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "No FF plugins found in %s", path ); + return; + } + + for( i = 0 ; i < n_files; i ++ ) + { + char *name = files[i]->d_name; + + if(!name) + continue; + + if( vevo_property_get( illegal_plugins_, name, 0 , NULL ) == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "'%s' marked as bad", name); + continue; + } + + sprintf(fullname, "%s/%s", path,name ); + + //@ check if name is regular file + if( is_valid_plugin( fullname ) == 0 ) + { + continue; + } + + void *handle = dlopen(fullname, RTLD_NOW ); + + if(handle) + { + if(dlsym( handle, "plugMain" )) + { + void *plugin = deal_with_ff( handle, name ); + if( plugin ) + { + index_map_[ index_ ] = plugin; + index_ ++; + n_ff_ ++; + } + else + dlclose( handle ); + } + else if (dlsym( handle, "f0r_construct" )) + { + void *plugin = deal_with_fr( handle, name ); + if( plugin ) + { + index_map_[ index_ ] = plugin; + index_ ++; + n_fr_ ++; + } + else + dlclose( handle ); + } + else + dlclose(handle); + } + } + + for( i = 0; i < n_files; i ++ ) + free( files[i] ); + free(files); +} + +static void free_plugin(void *plugin) +{ + if(plugin == NULL) + return; + + int type = 0; + vevo_property_get( plugin, "type", 0, &type); + + int n = 0; + + if( type == VEVO_FF_PORT ) + { + void *base = NULL; + vevo_property_get( plugin, "base", 0, &base); + plugMainType *q = (plugMainType*) base; + q( FF_DEINITIALISE, NULL, 0 ); + vevo_property_get( plugin, "n_params", 0, &n ); + } + else if ( type == VEVO_FR_PORT ) + { + //@@ clear parameters + f0r_deinit_f base; + vevo_property_get( plugin, "deinit", 0, &base); + (*base)(); + vevo_property_get( plugin, "f0r_p", 0, &n ); + } + else if ( type == VEVO_LIVIDO_PORT ) + { + + } + + free_parameters(plugin,n); + + + void *handle = NULL; + vevo_property_get( plugin, "handle", 0 , &handle ); + if( handle ) dlclose( handle ); + vevo_port_free( plugin ); + +} + +static void free_plugins() +{ + int i; + for( i = 0; i < index_ ; i ++ ) + { + deinstantiate_plugin( index_map_[i] ); + free_plugin( index_map_[i]); + } + free( index_map_ ); + index_ = 0; +} + +#define CONFIG_FILE_LEN 65535 + +static void scan_plugins() +{ + char *home = getenv( "HOME" ); + char path[PATH_MAX]; + char data[CONFIG_FILE_LEN]; + if(!home) + { + veejay_msg(VEEJAY_MSG_ERROR, "Environment variable HOME not set!"); + return; + } + sprintf( path , "%s/.veejay/plugins.cfg" , home ); + + int fd = open( path, O_RDONLY ); + if( fd < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cant open %s", path); + return; + } + + veejay_memset( data, 0, CONFIG_FILE_LEN ); + + if( read( fd, data, CONFIG_FILE_LEN ) > 0 ) + { + int len = strlen(data); + int j; + int k = 0; + char value[PATH_MAX]; + + veejay_memset( value,0, PATH_MAX ); + for( j=0; j < len; j ++ ) + { + if(data[j] == '\0' ) + break; + if( data[j] == '\n' ) + { add_to_plugin_list( value ); veejay_memset(value,0,PATH_MAX); k =0;} + + if( isascii( data[j] ) && data[j] != '\n') + { value[k] = data[j]; if( k < PATH_MAX) k ++; } + + } + } +} + +static void process_plug_plugin( void *plugin, void *buffer , void *out_buffer) +{ + int type = 0; + vevo_property_get( plugin, "type", 0, &type); + if( type == VEVO_FF_PORT ) + { + void *base = NULL; + vevo_property_get( plugin, "base", 0, &base); + plugMainType *q = (plugMainType*) base; + void *instance = NULL; + vevo_property_get( plugin, "instance",0, &instance ); + q( FF_PROCESSFRAME, buffer, instance ); + } + else if (type == VEVO_FR_PORT ) + { + f0r_update_f base; + vevo_property_get( plugin, "process", 0, &base ); + f0r_instance_t instance; + vevo_property_get( plugin, "instance",0, &instance ); + (*base)( instance, rand(), buffer, out_buffer ); + } + else if (type == VEVO_LIVIDO_PORT ) + { + + } +} + +/* public IF */ + +void plug_free(void) +{ + free_plugins(); + + if( convert_rgb ) + yuv_fx_context_destroy( convert_rgb ); + if( convert_yuv ) + yuv_fx_context_destroy( convert_yuv ); + + if( buffer_ ) + free( buffer_ ); + if( buffer2_ ) + free( buffer2_ ); + if( buffer_b_) + free( buffer_b_ ); +} + +void plug_init( int w, int h ) +{ + buffer_ = (void*) vj_calloc( w * h * (V_BITS >> 3)); + buffer2_ = (void*) vj_calloc( w * h * (V_BITS >> 3)); + buffer_b_ = (void*) vj_calloc( w * h * (V_BITS >> 3)); + + base_width_ = w; + base_height_ = h; +} + +int plug_detect_plugins(void) +{ + index_map_ = (vevo_port_t**) vj_calloc(sizeof(vevo_port_t*) * 256 ); + + illegal_plugins_ = vpn( VEVO_ILLEGAL ); + + scan_plugins(); + //@ display copyright notice in binary form + if(n_ff_ > 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "FreeFrame Copyright (c) 2002, Marcus Clements www.freeframe.org. All Rights reserved."); + + veejay_msg(VEEJAY_MSG_INFO, "http://freeframe.sourceforge.net"); + veejay_msg(VEEJAY_MSG_INFO,"Loaded %d FreeFrame %s", + n_ff_ , n_ff_ == 1 ? "plugin" : "plugins" ); + } + if(n_fr_ > 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "frei0r - a minimalistic plugin API for video effects"); + veejay_msg(VEEJAY_MSG_INFO, "http://www.piksel.org/frei0r"); + veejay_msg(VEEJAY_MSG_INFO, "Loaded %d frei0r %s", + n_fr_ , n_fr_ == 1 ? "plugin" : "plugins" ); + } + if(n_lvd_ > 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "Livido - (Linux) Video Objects" ); + veejay_msg(VEEJAY_MSG_INFO, "Loaded %d Livido %s", + n_lvd_, n_lvd_ == 1 ? "plugin" :"plugins" ); + } + + vevo_port_free( illegal_plugins_ ); + + return index_; +} + +vj_effect *plug_get_plugin( int n ) +{ + vj_effect *vje = (vj_effect*) vj_calloc(sizeof(vj_effect)); + vevo_port_t *port = index_map_[n]; + size_t name_len = vevo_property_element_size( port, "name", 0 ); + vje->description = (char*) vj_calloc( name_len ); + vevo_property_get( port, "name", 0, &(vje->description)); + vevo_property_get( port, "n_params", 0, &(vje->num_params)); + vevo_property_get( port, "mixer", 0, &(vje->extra_frame)); + if( vje->num_params > 0 ) + { + if( vje->num_params > 8 ) + { + veejay_msg(VEEJAY_MSG_WARNING, "%s has %d parameters, clip to 8", + vje->description, vje->num_params ); + vje->num_params = 8; + } + + vje->defaults = (int*) vj_calloc(sizeof(int) * vje->num_params ); + vje->limits[0] = (int*) vj_calloc(sizeof(int) * vje->num_params ); + vje->limits[1] = (int*) vj_calloc(sizeof(int) * vje->num_params ); + + int k = 0; + int valid_p = 0; + for( k = 0; k < vje->num_params;k++ ) + { + char key[20]; + sprintf(key, "p%d", k ); + void *parameter = NULL; + vevo_property_get( port, key, 0, ¶meter ); + if(parameter) + { + vevo_property_get( parameter, "min", 0, &(vje->limits[0][k])); + vevo_property_get( parameter, "max", 0, &(vje->limits[1][k])); + vevo_property_get( parameter, "default", 0,&(vje->defaults[k])); + valid_p ++; + } + } + vevo_property_set( port, "n_params",VEVO_ATOM_TYPE_INT, 1,&valid_p); + vje->num_params = valid_p; + } + + return vje; +} + + +int plug_activate( int fx_id ) +{ + return instantiate_plugin( index_map_[fx_id], base_width_, base_height_ ); +} +void plug_deactivate( int fx_id ) +{ + deinstantiate_plugin( index_map_[fx_id] ); +} + +void plug_control( int fx_id, int *args ) +{ + vevo_port_t *port = index_map_[ fx_id ]; + + int type = 0; + vevo_property_get( port, "type", 0, &type); + if( type == VEVO_FF_PORT ) + { + SetParameterStruct v; + void *base = NULL; + vevo_property_get( port, "base", 0, &base); + plugMainType *q = (plugMainType*) base; + int p,num_params=0; + void *instance = NULL; + vevo_property_get( port, "n_params", 0, &num_params); + vevo_property_get( port, "instance", 0, &instance ); + for( p = 0; p < num_params; p ++ ) + { + v.value = ((float) args[p]) * 0.01; + v.index = p; + q( FF_SETPARAMETER, &v, instance ); + } + } + else if ( type == VEVO_FR_PORT ) + { + int p,num_params=0; + vevo_property_get( port, "n_params", 0, &num_params); + int v_params = 0; + + f0r_set_param_value_f q; + + vevo_property_get( port, "set_params", 0, &q); + for( p = 0; p < num_params; p ++ ) + { + char key[20]; + sprintf(key, "p%d", p ); + void *param = NULL; + vevo_property_get( port, key, 0, ¶m ); + if( param ) continue; + + int n = vevo_property_element_size( param, "value", p ); + + f0r_param_position_t pos; + f0r_param_color_t col; + + double value = 0.0; + //nt instance = 0; + void *instance = NULL; + vevo_property_get( port, "instance", 0, &instance ); + int max = 0; + vevo_property_get( param, "max",0,&max); + + void *fparam = NULL; + switch(n) + { + case 0: + case 1: + value = ( (double) args[v_params] * (max == 100 ? 0.01: 1)); + fparam = &value; + v_params ++; + break; + case 2: + pos.x = ( (double) args[v_params] * 0.01 ); + v_params ++; + pos.y = ( (double) args[v_params] * 0.01 ); + v_params ++; + fparam = &pos; + break; + case 3: + col.r = ( (double) args[v_params] * 0.01 ); + v_params ++; + col.g = ( (double) args[v_params] * 0.01 ); + v_params ++; + col.b = ( (double) args[v_params] * 0.01 ); + v_params ++; + fparam = &col; + break; + default: + break; + } + if( fparam ) + (*q)( instance, fparam, p ); + } + } + else if ( type == VEVO_LIVIDO_PORT ) + { + + } +} + +void plug_process( VJFrame *frame,VJFrame *b, int fx_id, int src_fmt ) +{ + AVPicture p1,p2; + AVPicture o1,o2; + void *plugin = index_map_[fx_id]; + + int is_mix = 0; + vevo_property_get( plugin, "mixer", 0, &is_mix ); + if( is_mix ) + { + veejay_msg(0, "Not supporting mixing plugins yet"); + return; + } + + VJFrame *dst1 = yuv_rgb_template( buffer_, frame->width,frame->height, + PIX_FMT_RGB24 ); + + if(!convert_yuv) + convert_yuv = yuv_fx_context_create( frame,dst1,src_fmt,dst1->format ); + if(!convert_rgb ) + convert_rgb = yuv_fx_context_create( dst1, frame, dst1->format, src_fmt ); + +// yuv_convert_any_ac( frame, dst1, src_fmt, dst1->format ); + + yuv_fx_context_process( convert_yuv, frame,dst1 ); + + process_plug_plugin( plugin, buffer_, buffer2_ ); + + yuv_fx_context_process( convert_rgb, dst1, frame ); + +// yuv_convert_any_ac( dst1, frame, dst1->format, src_fmt ); + + free(dst1); + +} + diff --git a/veejay-server/libvje/plugload.h b/veejay-server/libvje/plugload.h new file mode 100644 index 00000000..627d847a --- /dev/null +++ b/veejay-server/libvje/plugload.h @@ -0,0 +1,35 @@ +#ifndef PLUGINLOADER_ +#define PLUGINLOADER_ +/* + * Copyright (C) 2002-2006 Niels Elburg + * + * 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. + * + */ + +#include "vje.h" + +void plug_free(void); +void plug_init( int w, int h ); +int plug_activate( int fx_id ); +void plug_deactivate( int fx_id ); + +int plug_detect_plugins(void); +vj_effect *plug_get_plugin(int n); + +void plug_process( VJFrame *frame,VJFrame *b, int fx_id, int src_fmt ); +void plug_control( int fx_id, int *args ); + +#endif diff --git a/veejay-server/libvje/specs/FreeFrame.h b/veejay-server/libvje/specs/FreeFrame.h new file mode 100644 index 00000000..b59ec72f --- /dev/null +++ b/veejay-server/libvje/specs/FreeFrame.h @@ -0,0 +1,207 @@ +#ifndef __FREEFRAME_H__ +#define __FREEFRAME_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////// +// FreeFrame.h +// +// FreeFrame Open Video Plugin Prototype +// C Version + +// www.freeframe.org +// marcus@freeframe.org + +/* + +Copyright (c) 2002, Marcus Clements www.freeframe.org +All rights reserved. + +FreeFrame 1.0 upgrade by Pete Warden +www.petewarden.com + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of FreeFrame nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +#ifdef LINUX + +typedef unsigned int DWORD; +typedef void * LPVOID; +typedef unsigned char BYTE; + +#elif MACOS + +typedef unsigned int DWORD; +typedef unsigned char BYTE; + +#endif + + +///////////////////////////////////////////////////////////////////////////////////////// +// #defines + +#define FF_EFFECT 0 +#define FF_FAIL 0xFFFFFFFF +#define FF_SUCCESS 0 +#define FF_TRUE 1 +#define FF_FALSE 0 + +#define FF_GETINFO 0 +#define FF_INITIALISE 1 +#define FF_DEINITIALISE 2 +#define FF_PROCESSFRAME 3 +#define FF_GETNUMPARAMETERS 4 +#define FF_GETPARAMETERNAME 5 +#define FF_GETPARAMETERDEFAULT 6 +#define FF_GETPARAMETERDISPLAY 7 +#define FF_SETPARAMETER 8 +#define FF_GETPARAMETER 9 +#define FF_GETPLUGINCAPS 10 +#define FF_INSTANTIATE 11 +#define FF_DEINSTANTIATE 12 +#define FF_GETEXTENDEDINFO 13 +#define FF_PROCESSFRAMECOPY 14 +#define FF_GETPARAMETERTYPE 15 + +#define FF_CAP_16BITVIDEO 0 +#define FF_CAP_24BITVIDEO 1 +#define FF_CAP_32BITVIDEO 2 +#define FF_CAP_PROCESSFRAMECOPY 3 +#define FF_CAP_MINIMUMINPUTFRAMES 10 +#define FF_CAP_MAXIMUMINPUTFRAMES 11 +#define FF_CAP_COPYORINPLACE 15 + +#define FF_CAP_PREFER_NONE 0 +#define FF_CAP_PREFER_INPLACE 1 +#define FF_CAP_PREFER_COPY 2 +#define FF_CAP_PREFER_BOTH 3 + +#define FF_TYPE_BOOLEAN 0 +#define FF_TYPE_EVENT 1 +#define FF_TYPE_RED 2 +#define FF_TYPE_GREEN 3 +#define FF_TYPE_BLUE 4 +#define FF_TYPE_XPOS 5 +#define FF_TYPE_YPOS 6 +#define FF_TYPE_STANDARD 10 +#define FF_TYPE_TEXT 100 + +///////////////////////////////////////////////////////////////////////////////////////// +// +// FreeFrame types + +typedef struct PlugInfoStructTag { + DWORD APIMajorVersion; + DWORD APIMinorVersion; + BYTE uniqueID[4]; // 4 chars uniqueID - not null terminated + BYTE pluginName[16]; // 16 chars plugin friendly name - not null terminated + DWORD pluginType; // Effect or source +} PlugInfoStruct; + +typedef struct PlugExtendedInfoStructTag { + DWORD PluginMajorVersion; + DWORD PluginMinorVersion; + char* Description; + char* About; + DWORD FreeFrameExtendedDataSize; + void* FreeFrameExtendedDataBlock; +} PlugExtendedInfoStruct; + +typedef struct VideoInfoStructTag { + DWORD frameWidth; // width of frame in pixels + DWORD frameHeight; // height of frame in pixels + DWORD bitDepth; // enumerated indicator of bit depth of video + // 0 = 16 bit 5-6-5 1 = 24bit packed 2 = 32bit + DWORD orientation; // video frame orientation meaningful values: + // 1 = origin at top left 2 = origin at bottom left +} VideoInfoStruct; + +typedef struct ProcessFrameCopyStructTag { + DWORD numInputFrames; + void** InputFrames; + void* OutputFrame; +} ProcessFrameCopyStruct; + +typedef struct SetParameterStructTag { + DWORD index; + float value; +} SetParameterStruct; + +typedef union plugMainUnionTag { + DWORD ivalue; + float fvalue; + VideoInfoStruct *VISvalue; + PlugInfoStruct *PISvalue; + char *svalue; +} plugMainUnion; + +typedef plugMainUnion plugMainType(DWORD, LPVOID, DWORD); + +/////////////////////////////////////////////////////////////////////////////////////// +// Function prototypes +// + +/////////////////////////////////////////////////////////////////////////////////////// +// plugMain - The one and only exposed function +// parameters: +// functionCode - tells the plugin which function is being called +// pParam - 32-bit parameter or 32-bit pointer to parameter structure +// instanceID - 32-bit instance identifier. Only used for instance specific functions +// +// PLUGIN DEVELOPERS: you shouldn't need to change this function +// +// All parameters are cast as 32-bit untyped pointers and cast to appropriate +// types here +// +// All return values are cast to 32-bit untyped pointers here before return to +// the host +// + +#ifdef WIN32 + +BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, DWORD instanceID); + +__declspec(dllexport) void* __stdcall plugMain(DWORD functionCode, LPVOID pParam, DWORD instanceID); + +typedef __declspec(dllimport) void* (__stdcall *FF_Main_FuncPtr)(DWORD, LPVOID, DWORD); + +#elif LINUX + +plugMainUnion plugMain(DWORD functionCode, LPVOID pParam, DWORD instanceID); + +#elif MACOS + +typedef void* (*FF_Main_FuncPtr)(DWORD ,void *, DWORD); + +#endif + +#ifdef __cplusplus +}; +#endif + +#endif diff --git a/veejay-server/libvje/specs/frei0r.h b/veejay-server/libvje/specs/frei0r.h new file mode 100644 index 00000000..f6b81d2b --- /dev/null +++ b/veejay-server/libvje/specs/frei0r.h @@ -0,0 +1,567 @@ +/** @mainpage frei0r - a minimalistic plugin API for video effects + * + * @section sec_intro Introduction + * + * This is frei0r - a minimalistic plugin API for video effects. + * + * The main emphasis is on simplicity - there are many different applications + * that use video effects, and they all have different requirements regarding + * their internal plugin API. And that's why frei0r does not try to be a + * one-in-all general video plugin API, but instead an API for the most + * common video effects: simple filters, sources and mixers that can be + * controlled by parameters. + * + * It's our hope that this way these simple effects can be shared between + * many applications, avoiding their reimplementation by different + * projects. + * + * On the other hand, this is not meant as a competing standard to + * more ambitious efforts that try to satisfy the needs of many different + * applications and more complex effects. + * + * + * @section sec_overview Overview + * + * If you are new to frei0r, the best thing is probably to have + * a look at the frei0r header, + * which is quite simple. + * + * After that, you might want to look at the + * frei0r functions in more detail. + * + * When developing a new frei0r effect, you have to choose + * - which effect type to use (\ref PLUGIN_TYPE), + * - which color model to use (\ref COLOR_MODEL), and + * - which parameter types (\ref PARAM_TYPE) your effect will support. + * + * To round things up, you should decide whether your effect should have + * an associated icon (\ref icons), and where it will be installed + * (\ref pluglocations). + * + * @section sec_changes Changes + * + * @subsection sec_changes_1_0_1_1 From frei0r 1.0 to frei0r 1.1 + * + * - added specifications for plugin locations + * - added specifications for frei0r icons + * - added RGBA8888 color model + * - added packed32 color model + * - added better specification of color models + * - added string type + * - added bounds to resolution (8 <= width, height <= 2048) + * - width and height must be an integer multiple of 8 + * - frame data must be 16 byte aligned + * - improved update specification (must not change parameters, + * must restore fpu state) + * - added note for applications to ignore effects with unknown fields + * - added new plugin types mixer2 and mixer3 + * - added section about \ref concurrency + */ + + +/** + * \addtogroup pluglocations Plugin Locations + * @section sec_pluglocations Plugin Locations + * + * For Unix platforms there are rules for the location of frei0r plugins. + * + * frei0r 1.x plugin files should be located in + * + * - (1) /usr/lib/frei0r-1/\ + * - (2) /usr/local/lib/frei0r-1/\ + * - (3) $HOME/.frei0r-1/lib/\ + * + * Examples: + * + * - /usr/lib/frei0r-1/mob/flippo.so + * - /usr/lib/frei0r-1/drone/flippo.so + * - /usr/local/lib/frei0r-1/gephex/coma/invert0r.so + * - /home/martin/.frei0r-1/lib/martin/test.so + * + * Like in these examples plugins should be placed in "vendor" subdirs + * to reduce name clashes. + * + * @subsection sec_order Plugin Loading Order + * + * The application shall load plugins in the following order: 3, 2, 1. + * If a name clash occurs (two or more frei0r plugins with identical + * effect name), the plugins in directory 3 have precedence over plugins + * in directory 2, and those in directory 2 have precedence over plugins + * in directory 1. + * + * This makes it possible for users to "override" effects that are + * installed in system wide directories by placing plugins in their + * home directory. + * + * The order of loading plugins inside each of the directories + * 1, 2, and 3 is not defined. + */ + +/** + *\addtogroup icons Icons for frei0r effects + * @section sec_icons Icons for frei0r effects + * + * Each frei0r effect can have an associated icon. + * + * @subsection sec_icon_format Icon Format + * + * The format of frei0r icons must be png. + * Recommended resolution is 64x64. + * The icon filename of an effect with effect name "frei0r" + * must be "frei0r.png". + * + * @subsection sec_icon_location Icon location + * + * The exact location where the application should look for the + * plugin is platform dependant. + * + * For Windows platforms, the icon should be at the same place as + * the plugin containing the effect. + * + * For Unix platforms, the following mapping from plugin location + * to icon location must be used: + * + * Let \/\ be a frei0r plugin with name \. + * Then the corresponding icon (if any) shall be located in + * \/\.png. + * \ can be obtained in the following way: + * + * @verbatim + | + ---------------------------------------------------------------------------- + $HOME/.frei0r-1/lib/ | $HOME/.frei0r-1/icons/ + /usr/local/lib/frei0r-1/ | /usr/local/share/frei0r-1/icons/ + /usr/lib/frei0r-1/ | /usr/share/frei0r-1/icons/ + * | + @endverbatim + * + * (The wildcard '*' stands for any other plugin_path) + * + * For other platforms, no location is defined. We recommend to use the + * plugin path where possible. + */ + +/** + * \addtogroup concurrency Concurrency + * @section sec_concurrency Concurrency + * + * - \ref f0r_init + * - \ref f0r_deinit + * + * These methods must not be called more than once. It is obvious that no + * concurrent calls are allowed. + * + * + * - \ref f0r_get_plugin_info + * - \ref f0r_get_param_info + * - \ref f0r_construct + * - \ref f0r_destruct + * + * Concurrent calls of these functions are allowed. + * + * + * - \ref f0r_set_param_value + * - \ref f0r_get_param_value + * - \ref f0r_update + * - \ref f0r_update2 + * + * If a thread is in one of these methods its allowed for another thread to + * enter one of theses methods for a different effect instance. But for one + * effect instance only one thread is allowed to execute any of these methods. + */ + + + +/** \file + * \brief This file defines the frei0r api, version 1.1. + * + * A conforming plugin must implement and export all functions declared in + * this header. + * + * A conforming application must accept only those plugins which use + * allowed values for the described fields. + */ + +#ifndef INCLUDED_FREI0R_H +#define INCLUDED_FREI0R_H + +#include + +/** + * The frei0r API major version + */ +#define FREI0R_MAJOR_VERSION 1 + +/** + * The frei0r API minor version + */ +#define FREI0R_MINOR_VERSION 1 + +//--------------------------------------------------------------------------- + +/** + * f0r_init() is called once when the plugin is loaded by the application. + * \see f0r_deinit + */ +int f0r_init(); + +/** + * f0r_deinit is called once when the plugin is unloaded by the application. + * \see f0r_init + */ +void f0r_deinit(); + +//--------------------------------------------------------------------------- + +/** \addtogroup PLUGIN_TYPE Type of the Plugin + * These defines determine whether the plugin is a + * source, a filter or one of the two mixer types + * @{ + */ + +/** one input and one output */ +#define F0R_PLUGIN_TYPE_FILTER 0 +/** just one output */ +#define F0R_PLUGIN_TYPE_SOURCE 1 +/** two inputs and one output */ +#define F0R_PLUGIN_TYPE_MIXER2 2 +/** three inputs and one output */ +#define F0R_PLUGIN_TYPE_MIXER3 3 + +/** @} */ + +//--------------------------------------------------------------------------- + +/** \addtogroup COLOR_MODEL Color Models + * List of supported color models. + * + * Note: the color models are endian independent, because the + * color components are defined by their positon in memory, not + * by their significance in an uint32_t value. + * + * For effects that work on the color components, + * RGBA8888 is the recommended color model for frei0r-1.1 effects. + * For effects that only work on pixels, PACKED32 is the recommended + * color model since it helps the application to avoid unnecessary + * color conversions. + * + * Effects can choose an appropriate color model, applications must support + * all color models and do conversions if necessary. Source effects + * must not use the PACKED32 color model because the application must know + * in which color model the created framebuffers are represented. + * + * For each color model, a frame consists of width*height pixels which + * are stored row-wise and consecutively in memory. The size of a pixel is + * 4 bytes. There is no extra pitch parameter + * (i.e. the pitch is simply width*4). + * + * The following additional constraints must be honored: + * - The top-most line of a frame is stored first in memory. + * - A frame must be aligned to a 16 byte border in memory. + * - The width and height of a frame must be positive + * - The width and height of a frame must be integer multiples of 8 + * + * These constraints make sure that each line is stored at an address aligned + * to 16 byte. + */ +/*@{*/ +/** + * In BGRA8888, each pixel is represented by 4 consecutive + * unsigned bytes, where the first byte value represents + * the blue, the second the green, and the third the red color + * component of the pixel. The last value represents the + * alpha value. + */ +#define F0R_COLOR_MODEL_BGRA8888 0 + +/** + * In RGBA8888, each pixel is represented by 4 consecutive + * unsigned bytes, where the first byte value represents + * the red, the second the green, and the third the blue color + * component of the pixel. The last value represents the + * alpha value. + */ +#define F0R_COLOR_MODEL_RGBA8888 1 + +/** + * In PACKED32, each pixel is represented by 4 consecutive + * bytes, but it is not defined how the color componets are + * stored. The true color format could be RGBA8888, + * BGRA8888, a packed 32 bit YUV format, or any other + * color format that stores pixels in 32 bit. + * + * This is useful for effects that don't work on color but + * only on pixels (for example a mirror effect). + * + * Note that source effects must not use this color model. + */ +#define F0R_COLOR_MODEL_PACKED32 2 +/*@}*/ + +/** + * The f0r_plugin_info_t structure is filled in by the plugin + * to tell the application about its name, type, number of parameters, + * and version. + * + * An application should ignore (i.e. not use) frei0r effects that + * have unknown values in the plugin_type or color_model field. + * It should also ignore effects with a too high frei0r_version. + * + * This is necessary to be able to extend the frei0r spec (e.g. + * by adding new color models or plugin types) in a way that does not + * result in crashes when loading effects that make use of these + * extensions into an older application. + * + * All strings are unicode, 0-terminated, and the encoding is utf-8. + */ +typedef struct f0r_plugin_info +{ + const char* name; /**< The (short) name of the plugin */ + const char* author; /**< The plugin author */ + /** The plugin type + * \see PLUGIN_TYPE + */ + int plugin_type; + int color_model; /**< The color model used */ + int frei0r_version; /**< The frei0r major version this plugin is built for*/ + int major_version; /**< The major version of the plugin */ + int minor_version; /**< The minor version of the plugin */ + int num_params; /**< The number of parameters of the plugin */ + const char* explanation; /**< An optional explanation string */ +} f0r_plugin_info_t; + + +/** + * Is called once after init. The plugin has to fill in the values in info. + * + * \param info Pointer to an info struct allocated by the application. + */ +void f0r_get_plugin_info(f0r_plugin_info_t* info); + +//--------------------------------------------------------------------------- + +/** \addtogroup PARAM_TYPE Parameter Types + * + * @{ + */ + + +/** + * Parameter type for boolean values + * \see f0r_param_bool + */ +#define F0R_PARAM_BOOL 0 + +/** + * Parameter type for doubles + * \see f0r_param_double + */ +#define F0R_PARAM_DOUBLE 1 + +/** + * Parameter type for color + * \see f0r_param_color + */ +#define F0R_PARAM_COLOR 2 +/** + * Parameter type for position + * \see f0r_param_position + */ +#define F0R_PARAM_POSITION 3 + +/** + * Parameter type for string + * \see f0r_param_string + */ +#define F0R_PARAM_STRING 4 + +/** + * The boolean type. The allowed range of values is [0, 1]. + * [0, 0.5[ is mapped to false and [0.5, 1] is mapped to true. + */ +typedef double f0r_param_bool; + +/** + * The double type. The allowed range of values is [0, 1]. + */ +typedef double f0r_param_double; + +/** + * The color type. All three color components are in the range [0, 1]. + */ +typedef struct f0r_param_color +{ + float r; /**< red color component */ + float g; /**< green color component */ + float b; /**< blue color component */ +} f0r_param_color_t; + +/** + * The position type. Both position coordinates are in the range [0, 1]. + */ +typedef struct f0r_param_position +{ + double x; /**< x coordinate */ + double y; /**< y coordinate */ +} f0r_param_position_t; + + +/** + * The string type. + * Zero terminated array of 8-bit values in utf-8 encoding + */ +typedef char f0r_param_string; + +/** @} */ + + +/** + * Similar to f0r_plugin_info_t, this structure is filled by the plugin + * for every parameter. + * + * All strings are unicode, 0-terminated, and the encoding is utf-8. + */ +typedef struct f0r_param_info +{ + const char* name; /** + * + * 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. + */ +#include +#include +#include +#include "3bar.h" + +vj_effect *bar_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *)vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 4; + ve->defaults[1] = 1; + ve->defaults[2] = 3; + ve->defaults[3] = 0; + ve->defaults[4] = 0; + ve->limits[0][0] = 1; + ve->limits[1][0] = height; + + ve->sub_format = 1; + ve->limits[0][1] = 0; + ve->limits[1][1] = height; + + ve->limits[0][2] = 0; + ve->limits[1][2] = height; + + ve->limits[0][3] = 0; + ve->limits[1][3] = height; + ve->limits[0][4] = 0; + ve->limits[1][4] = height; + ve->description = "Horizontal Sliding Bars"; + + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +/* p0 351 , p1 92 : positioneert image 1 bovenaan + p4 beweegt image offset verticaal (frame in frame) + p5 beweegt image offset horizontaal (frame in frame) */ +static int bar_top_auto = 0; +static int bar_bot_auto = 0; +static int bar_top_vert = 0; + +static int bar_bot_vert = 0; +// FIXME private +void bar_apply(VJFrame *frame, VJFrame *frame2, int width, int height,int divider, int top_y, int bot_y, int top_x, int bot_x ) { + + int top_width = width; /* frame in frame destination area */ + int top_height = height/(divider); + + int bottom_width = width; /* frame in frame destionation area */ + int bottom_height = (height - top_height); + int y,x; + int yy=0; + int y2 = bar_top_auto + top_y; /* destination */ + int x2 = bar_top_vert + top_x; + uint8_t *Y = frame->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2= frame2->data[1]; + uint8_t *Cr2= frame2->data[2]; + + if(y2 > width) { y2 = 0; bar_top_auto = 0; } + if(x2 > (height-top_height)) {x2 = 0; bar_top_vert = 0; } + /* start with top frame in a frame */ + for( y = 0; y < top_height; y++ ) { + for ( x = 0; x < top_width; x++ ) { + Y[ (y*width + x)] = Y2[ ( (y+x2) *width + x +y2)]; + Cb[ (y*width + x)] = Cb2[ ( (y+x2) *width + x +y2)]; + Cr[ (y*width + x)] = Cr2[ ( (y+x2) *width + x +y2)]; + } + } + /* do bottom part */ + y2 = bar_bot_auto + bot_y; + x2 = bar_bot_vert + bot_x; + if(y2 > width) { y2 = 0; bar_bot_auto = 0; } + if(x2 > (height-top_height)) { x2 = 0; bar_bot_vert = 0; } + /* start with bottom frame in a frame */ + for ( y = bottom_height; y < height; y++) { + yy++; + for(x=0; x < bottom_width; x++ ) { + Y[ (y*width + x)] = Y2[((yy+x2)*width+x+y2)]; + Cb[ (y*width + x)] = Cb2[((yy+x2)*width+x+y2)]; + Cr[ (y*width + x)] = Cr2[((yy+x2)*width+x+y2)]; + } + } + + bar_top_auto += top_y; + bar_bot_auto += bot_y; + bar_top_vert += top_x; + bar_bot_vert += bot_x; +} +void bar_free(){} diff --git a/veejay-server/libvje/transitions/3bar.h b/veejay-server/libvje/transitions/3bar.h new file mode 100644 index 00000000..feb2594b --- /dev/null +++ b/veejay-server/libvje/transitions/3bar.h @@ -0,0 +1,61 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BAR_H +#define BAR_H +#include +#include +#include + +vj_effect *bar_init(int width, int height); +void bar_apply(VJFrame *frame, VJFrame *frame2, + int width, int height, int d, int x1, int x2, int t1, int b1); +#endif +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef BAR_H +#define BAR_H +#include "../vj-effect.h" +#include +#include + +vj_effect *bar_init(int width, int height); +void bar_apply(uint8_t * yuv1[3], uint8_t * yuv2[3], + int width, int height, int d, int x1, int x2, int t1, int b1); +void bar_free(); +#endif diff --git a/veejay-server/libvje/transitions/fadecolor.c b/veejay-server/libvje/transitions/fadecolor.c new file mode 100644 index 00000000..3f917ba1 --- /dev/null +++ b/veejay-server/libvje/transitions/fadecolor.c @@ -0,0 +1,123 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "fadecolor.h" +#include + +vj_effect *fadecolor_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 255; + ve->defaults[1] = VJ_EFFECT_COLOR_BLACK; + ve->defaults[2] = 15; + ve->defaults[3] = 1; + ve->sub_format = 0; + ve->limits[0][0] = 1; + ve->limits[1][0] = 255; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 7; + + ve->limits[0][2] = 1; + ve->limits[1][2] = (120 * 25); + ve->limits[0][3] = 0; + ve->limits[1][3] = 1; + ve->has_user = 0; + ve->description = "Transition Fade to Color"; + ve->extra_frame = 0; + return ve; +} + +void colorfade_apply(VJFrame *frame, int width, int height, int opacity, + int color) +{ + unsigned int i, op0, op1; + unsigned int len = width * height; + uint8_t colorCb = 128, colorCr = 128; + uint8_t colorY; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + switch (color) { + case VJ_EFFECT_COLOR_RED: + colorCb = VJ_EFFECT_CB_RED; + colorCr = VJ_EFFECT_CR_RED; + colorY = VJ_EFFECT_LUM_RED; + break; + case VJ_EFFECT_COLOR_BLUE: + colorCb = VJ_EFFECT_CB_BLUE; + colorCr = VJ_EFFECT_CR_BLUE; + colorY = VJ_EFFECT_LUM_BLUE; + + break; + case VJ_EFFECT_COLOR_GREEN: + colorCb = VJ_EFFECT_CB_GREEN; + colorCr = VJ_EFFECT_CR_GREEN; + colorY = VJ_EFFECT_LUM_GREEN; + + break; + case VJ_EFFECT_COLOR_CYAN: + colorCb = VJ_EFFECT_CB_CYAN; + colorCr = VJ_EFFECT_CR_CYAN; + colorY = VJ_EFFECT_LUM_CYAN; + + break; + case VJ_EFFECT_COLOR_MAGNETA: + colorCb = VJ_EFFECT_CB_MAGNETA; + colorCr = VJ_EFFECT_CR_MAGNETA; + colorY = VJ_EFFECT_LUM_MAGNETA; + + break; + case VJ_EFFECT_COLOR_YELLOW: + colorCb = VJ_EFFECT_CB_YELLOW; + colorCr = VJ_EFFECT_CR_YELLOW; + colorY = VJ_EFFECT_LUM_YELLOW; + + break; + case VJ_EFFECT_COLOR_BLACK: + colorCb = VJ_EFFECT_CB_BLACK; + colorCr = VJ_EFFECT_CR_BLACK; + colorY = VJ_EFFECT_LUM_BLACK; + + break; + case VJ_EFFECT_COLOR_WHITE: + colorCb = VJ_EFFECT_CB_WHITE; + colorCr = VJ_EFFECT_CR_WHITE; + break; + } + + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + for (i = 0; i < len; i++) + Y[i] = (op0 * Y[i] + op1 * colorY) >> 8; + for (i = 0; i < uv_len; i++) { + Cb[i] = (op0 * Cb[i] + op1 * colorCb) >> 8; + Cr[i] = (op0 * Cr[i] + op1 * colorCr) >> 8; + } +} +void fadecolor_free(){} diff --git a/veejay-server/libvje/transitions/fadecolor.h b/veejay-server/libvje/transitions/fadecolor.h new file mode 100644 index 00000000..460d09ec --- /dev/null +++ b/veejay-server/libvje/transitions/fadecolor.h @@ -0,0 +1,63 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef FADECOLOR_H +#define FADECOLOR_H +#include +#include +#include + +vj_effect *fadecolor_init(); +void colorfade_apply( VJFrame *frame, int width, int height, int opacity, + int n); + +#endif +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef FADECOLOR_H +#define FADECOLOR_H +#include "../vj-effect.h" +#include +#include + +vj_effect *fadecolor_init(int w, int h); +void colorfade_apply(uint8_t * yuv1[3], int width, int height, int opacity, + int n); + +void fadecolor_free(); +#endif diff --git a/veejay-server/libvje/transitions/fadecolorrgb.c b/veejay-server/libvje/transitions/fadecolorrgb.c new file mode 100644 index 00000000..127dc87d --- /dev/null +++ b/veejay-server/libvje/transitions/fadecolorrgb.c @@ -0,0 +1,88 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "fadecolorrgb.h" + +vj_effect *fadecolorrgb_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 150; + ve->defaults[1] = 0; + ve->defaults[2] = 0; + ve->defaults[3] = 0; + ve->defaults[4] = 0; + ve->defaults[5] = 75; + ve->sub_format = 0; + ve->limits[0][0] = 1; + ve->limits[1][0] = 255; + + ve->limits[0][1] = 1; + ve->limits[1][1] = 255; + + ve->limits[0][2] = 1; + ve->limits[1][2] = 255; + ve->limits[0][3] = 0; + ve->limits[1][3] = 255; + + ve->limits[0][4] = 0; + ve->limits[1][4] = 1; + + ve->limits[0][5] = 1; + ve->limits[1][5] = (25 * 120); + ve->description = "Transition Fade to Color by RGB"; + ve->has_user = 0; + ve->extra_frame = 0; + return ve; +} + +void colorfadergb_apply( VJFrame *frame, int width, int height, + int opacity, int r, int g, int b) +{ + unsigned int i, op0, op1; + unsigned int len = width * height; + unsigned int colorCb = 128, colorCr = 128; + unsigned int colorY; + const int uv_len = frame->uv_len; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + + + colorY = ((0.257 * r) + (0.504 * g) + (0.098 * b) + 16); + colorCb = ((0.439 * r) - (0.368 * g) - (0.071 * b) + 128); + colorCr = (-(0.148 * r) - (0.291 * g) + (0.439 * b) + 128); + + + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + for (i = 0; i < len; i++) + Y[i] = (op0 * Y[i] + op1 * colorY) / 255; + for (i = 0; i < uv_len; i++) { + Cb[i] = (op0 * Cb[i] + op1 * colorCb) / 255; + Cr[i] = (op0 * Cr[i] + op1 * colorCr) / 255; + } +} +void fadecolorrgb_free(){} diff --git a/veejay-server/libvje/transitions/fadecolorrgb.h b/veejay-server/libvje/transitions/fadecolorrgb.h new file mode 100644 index 00000000..4dcd475e --- /dev/null +++ b/veejay-server/libvje/transitions/fadecolorrgb.h @@ -0,0 +1,63 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef FADECOLORRGB_H +#define FADECOLORRGB_H +#include +#include +#include + +vj_effect *fadecolorrgb_init(); +void colorfadergb_apply(VJFrame *frame, int width, int height, + int opacity, int r, int g, int b); + +#endif +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef FADECOLORRGB_H +#define FADECOLORRGB_H +#include "../vj-effect.h" +#include +#include + +vj_effect *fadecolorrgb_init(int w, int h); +void colorfadergb_apply(uint8_t * yuv1[3], int width, int height, + int opacity, int r, int g, int b); + +void fadecolorrgb_free(); +#endif diff --git a/veejay-server/libvje/transitions/slidingdoor.c b/veejay-server/libvje/transitions/slidingdoor.c new file mode 100644 index 00000000..6cb09caf --- /dev/null +++ b/veejay-server/libvje/transitions/slidingdoor.c @@ -0,0 +1,92 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "transblend.h" +#include +#include + +vj_effect *slidingdoor_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 0; + ve->defaults = (int *) vj_calloc(sizeof(int) * 1); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * 1); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * 1); /* max */ + /* ve->defaults[0] = 1; + ve->defaults[1] = 1; + + ve->limits[0][0] = 1; + ve->limits[1][0] = height / 16; +*/ + ve->sub_format = 1; + + /* ve->limits[0][1] = 0; + ve->limits[1][1] = 1; +*/ + ve->description = "AlphaLuma Overlay"; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + + + +void slidingdoor_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int size) +{ + + //@ alpha luma + unsigned int i; + const int len = frame->len; + uint8_t *Y = frame->data[0]; + const uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb= frame->data[1]; + uint8_t *Cr= frame->data[2]; + const uint8_t *Cb2= frame2->data[1]; + const uint8_t *Cr2= frame2->data[2]; + + + for( i = 0; i < len ; i ++ ) + { + unsigned int op0 = Y2[i]; + unsigned int op1 = 255 - op0; + Y[i] = (op0 * Y[i] + op1 * Y2[i]) >> 8; + Cb[i] = (op0 * Cb[i] + op1 * Cb2[i]) >> 8; + Cr[i] = (op0 * Cr[i] + op1 * Cr2[i]) >> 8; + } +/* + frameborder_yuvdata( + frame->data[0], + frame->data[1], + frame->data[2], + frame2->data[0], + frame2->data[1], + frame2->data[2], + width,height, + size*16, + size*16, + 0, + 0, + frame->shift_h, + frame->shift_v );*/ + +} +void slidingdoor_free(){} diff --git a/veejay-server/libvje/transitions/slidingdoor.h b/veejay-server/libvje/transitions/slidingdoor.h new file mode 100644 index 00000000..cdc431a3 --- /dev/null +++ b/veejay-server/libvje/transitions/slidingdoor.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef SLIDINGDOOR_H +#define SLIDINGDOOR_H +#include +#include +#include + +vj_effect *slidingdoor_init(int width, int height); +void slidingdoor_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int size); + + +#endif diff --git a/veejay-server/libvje/transitions/transblend.c b/veejay-server/libvje/transitions/transblend.c new file mode 100644 index 00000000..8e5a66e3 --- /dev/null +++ b/veejay-server/libvje/transitions/transblend.c @@ -0,0 +1,110 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "transblend.h" +#include + +vj_effect *transblend_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 7; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 1; + ve->defaults[1] = 50; + ve->defaults[2] = 50; + ve->defaults[3] = 50; + ve->defaults[4] = 50; + ve->defaults[5] = 50; + ve->defaults[6] = 50; + ve->limits[0][0] = 0; + ve->limits[1][0] = 30; + ve->limits[0][1] = 1; + ve->limits[1][1] = width; + ve->limits[0][2] = 1; + ve->limits[1][2] = height; + ve->limits[0][3] = 1; + ve->limits[1][3] = width; + ve->limits[0][4] = 1; + ve->limits[1][4] = height; + ve->limits[0][5] = 1; + ve->limits[1][5] = width; + ve->limits[0][6] = 1; + ve->limits[1][6] = height; + ve->description = "Transition Translate Blend"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + + + +void transblend_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int type, int twidth, int theight, + int x1, int y1, int x2, int y2) +{ + + int x, y; + int p, q; + int uv_width = frame->uv_width; + + int uvy1, uvy2, uvx1, uvx2; + uint8_t *Y, *Cb, *Cr, *Y2, *Cb2, *Cr2; + pix_func_Y func_y = get_pix_func_Y((const int) type); + pix_func_C func_c = get_pix_func_C((const int) type); + + uvy1 = y1 >> frame->shift_v; + uvy2 = y2 >> frame->shift_v; + uvx1 = x1 >> frame->shift_h; + uvx2 = x2 >> frame->shift_h; + + Y = frame->data[0]; + Cb = frame->data[1]; + Cr = frame->data[2]; + Y2 = frame2->data[0]; + Cb2 = frame2->data[1]; + Cr2 = frame2->data[2]; + + + + if( (theight + y2) > height ) y2 = (height-theight); + if( (twidth + x2) > width) x2 = (width-twidth); + + for (y = 0; y < theight; y++) { + for (x = 0; x < twidth; x++) { + p = (y2 + y) * width + x2 + x; + q = (y1 + y) * width + x1 + x; + Y[p] = func_y(Y[p], Y2[q]); + } + } + for (y = 0; y < (theight >> frame->shift_v); y++) { + for (x = 0; x < (twidth / frame->shift_h); x++) { + p = (uvy2 + y) * uv_width + uvx2 + x; + q = (uvy1 + y) * uv_width + uvx1 + x; + Cb[p] = func_c( Cb[p], Cb2[q]); + Cr[p] = func_c( Cr[p], Cr2[q]); + } + } + +} +void transblend_free(){} diff --git a/veejay-server/libvje/transitions/transblend.h b/veejay-server/libvje/transitions/transblend.h new file mode 100644 index 00000000..d57d2f44 --- /dev/null +++ b/veejay-server/libvje/transitions/transblend.h @@ -0,0 +1,69 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TRANSBLEND_H +#define TRANSBLEND_H +#include +#include +#include + +vj_effect *transblend_init(int width, int height); + +void transblend_apply( VJFrame *frame, VJFrame *frame2, int w, int h, + int mode, int twidth, int theight, int x1, int y1, + int x2, int y2); + + +#endif +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TRANSBLEND_H +#define TRANSBLEND_H +#include "../vj-effect.h" +#include +#include + +vj_effect *transblend_init(int width, int height); + +void transblend_apply(uint8_t * yuv1[3], uint8_t * yuv2[3], int w, int h, + int mode, int twidth, int theight, int x1, int y1, + int x2, int y2); + + +void transblend_free(); +#endif diff --git a/veejay-server/libvje/transitions/transcarot.c b/veejay-server/libvje/transitions/transcarot.c new file mode 100644 index 00000000..4bd5312c --- /dev/null +++ b/veejay-server/libvje/transitions/transcarot.c @@ -0,0 +1,270 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "transcarot.h" + + +vj_effect *transcarot_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 6; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 180; /* opacity */ + ve->defaults[1] = 0; /* type */ + ve->defaults[2] = 100; /* point sizse */ + ve->defaults[3] = (height / 2); /* dy */ + ve->defaults[4] = 40; /* dye */ + ve->defaults[5] = (width / 2); /* row */ + + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + + ve->limits[0][1] = 0; + ve->limits[1][1] = 1; + ve->limits[0][2] = 1; + ve->limits[1][2] = width; + ve->limits[0][3] = 1; + ve->limits[1][3] = height; + ve->limits[0][4] = 1; + ve->limits[1][4] = height; + ve->limits[0][5] = 1; + ve->limits[1][5] = width; + ve->sub_format = 0; + ve->description = "Transition Translate Carot"; + ve->has_user = 0; + ve->extra_frame = 1; + return ve; +} +void transcarot1_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int point_size, int dy, int dye, + int row_start, int opacity) +{ + + int row_length = 1; + int reverse = 0; + int i; + unsigned int op0, op1; + unsigned int uv_width = frame->uv_width; + int uv_dy, uv_dye, uv_row_start, uv_row_length; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + + + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + uv_dy = dy >> frame->shift_v; + uv_dye = dye >> frame->shift_v; + uv_row_start = row_start; + uv_row_length = 1; + + while (dy >= dye && row_length > 0) + { + for (i = row_start; i < (row_start + row_length); i++) + { + Y[(dy * width + i)] = + (op0 * Y[(dy * width + i)] + + op1 * Y2[(dy * width + i)]) >> 8 ; + + } + if (reverse == 1) + { + row_length -= 2; + row_start++; + } + else + { + row_length += 2; + row_start--; + } + + if (row_length >= point_size) + reverse = 1; + dy--; + } + + reverse = 0; + i = 0; + + while (uv_dy >= uv_dye && uv_row_length > 0) + { + for (i = uv_row_start; i < ((uv_row_start + uv_row_length) >> frame->shift_v); i++) + { + Cb[(uv_dy * uv_width + i)] = + (op0 * Cb[(uv_dy * uv_width + i)] + + op1 * Cb2[(uv_dy * uv_width + i)]) >>8; + Cr[(uv_dy * uv_width + i)] = + (op0 * Cr[(uv_dy * uv_width + i)] + + op1 * Cr2[(uv_dy * uv_width + i)]) >> 8; + } + + if (reverse == 1) { + uv_row_length -= 2; + uv_row_start++; + } + else + { + uv_row_length += 2; + uv_row_start--; + } + if (uv_row_length >= point_size) + reverse = 1; + dy--; + } + +} + +/* carot transistion. like translate, but different form and with mirroring */ +void transcarot2_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int point_size, int dy, int dye, + int row_start, int opacity) +{ + + int row_length = 1; + int reverse = 0; + int i; + unsigned int op0, op1; + unsigned int len = (width * height); + unsigned int uv_width = frame->uv_width; + int uv_dy, uv_dye, uv_row_start, uv_row_length; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + + + + op1 = (opacity > 235) ? 235 : opacity; + op0 = 235 - op1; + + uv_dy = dy >> frame->shift_v; + uv_dye = dye >> frame->shift_v; + uv_row_start = row_start; + uv_row_length = 1; + + while (dy >= dye && row_length > 0) + { + if (reverse == 0) + { + for (i = row_start; i < (row_start + row_length); i++) + { + Y[(dy * width + i)] = + (op0 * Y[(dy * width + i)] + + op1 * Y2[(dy * width + i)]) >> 8; + } + } + else + { + for (i = row_start; i < (row_start + row_length); i++) + { + Y[(dy * width + i)] = + (op0 * Y[(dy * width + i)] + + op1 * Y2[len - (dy * width + i)]) >> 8; + } + } + + if (reverse == 1) + { + row_length -= 2; + row_start++; + } + else + { + row_length += 2; + row_start--; + } + + if (row_length >= point_size) + reverse = 1; + dy--; + } + + reverse = 0; + i = 0; + + while (uv_dy >= uv_dye && uv_row_length > 0) + { + if (reverse == 0) + { + for (i = uv_row_start; + i < ((uv_row_start + uv_row_length) >> frame->shift_v); i++) + { + Cb[(uv_dy * uv_width + i)] = + (op0 * Cb[(uv_dy * uv_width + i)] + + op1 * Cb2[(uv_dy * uv_width + i)]) >> 8; + Cr[(uv_dy * uv_width + i)] = + (op0 * Cr[(uv_dy * uv_width + i)] + + op1 * Cr2[(uv_dy * uv_width + i)]) >> 8; + + } + } + else + { + for (i = uv_row_start; + i < ((uv_row_start + uv_row_length) >> frame->shift_v); i++) + { + Cb[(uv_dy * uv_width + i)] = + (op0 * Cb[(uv_dy * uv_width + i)] + + op1 * Cb2[len - (uv_dy * uv_width + i)]) >> 8; + Cr[(uv_dy * uv_width + i)] = + (op0 * Cr[(uv_dy * uv_width + i)] + + op1 * Cr2[len - (uv_dy * uv_width + i)]) >> 8; + + } + } + if (reverse == 1) + { + uv_row_length -= 2; + uv_row_start++; + } + else + { + uv_row_length += 2; + uv_row_start--; + } + if (uv_row_length >= point_size) + reverse = 1; + dy--; + } + +} + +void transcarot_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int p, int dy, int dye, int row, + int opacity, int type) +{ + if (type == 1) + transcarot1_apply(frame, frame2, width, height, p, dy, dye, row, + opacity); + if (type == 0) + transcarot2_apply(frame, frame2, width, height, p, dy, dye, row, + opacity); +} +void transcarot_free(){} diff --git a/veejay-server/libvje/transitions/transcarot.h b/veejay-server/libvje/transitions/transcarot.h new file mode 100644 index 00000000..5e208ae0 --- /dev/null +++ b/veejay-server/libvje/transitions/transcarot.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TRANSCAROT_H +#define TRANSCAROT_H +#include +#include +#include + +vj_effect *transcarot_init(int width, int height); + +void transcarot_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int p, int dy, int dye, int row, + int opacity, int type); +#endif diff --git a/veejay-server/libvje/transitions/transline.c b/veejay-server/libvje/transitions/transline.c new file mode 100644 index 00000000..a8dd3655 --- /dev/null +++ b/veejay-server/libvje/transitions/transline.c @@ -0,0 +1,158 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include "transline.h" + +vj_effect *transline_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 4; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 150; /* opacity */ + ve->defaults[1] = 10; /* line width */ + ve->defaults[2] = 3; /* distance */ + ve->defaults[3] = 0; /* type */ + + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + + ve->limits[0][1] = 1; + ve->limits[1][1] = width; + ve->limits[0][2] = 2; + ve->limits[1][2] = width; + ve->limits[0][3] = 0; + ve->limits[1][3] = 1; + ve->sub_format = 1; + ve->description = "Transition Line"; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +void transline1_apply(uint8_t * yuv1[3], uint8_t * yuv2[3], int width, + int height, int distance, int line_width) +{ + unsigned int uv_width = width >> 1; + unsigned int uv_height = height >> 1; + unsigned int uv_distance = distance >> 1; + int x, y, z; + int step; + + + for (y = 0; y < height; y++) { + for (x = 0; x < width; x += distance) { + step = line_width; + if (distance < step) + step = distance - 1; + for (z = 0; z < step; z++) { + yuv1[0][(y * width + x + z)] = + yuv2[0][(y * width + x + z)]; + } + } + } + uv_width >>= 1; + uv_height >>= 1; + line_width >>= 1; + for (y = 0; y < uv_height; y++) { + for (x = 0; x < uv_width; x += uv_distance) { + step = line_width; + if (uv_distance > step) + step = uv_distance; + for (z = 0; z < step; z++) { + yuv1[1][y * uv_width + x + z] = yuv2[1][y * uv_width + x]; + yuv1[2][y * uv_width + x + z] = + yuv2[2][y * uv_width + x + z]; + } + + } + } + +} + + + +void transline2_apply(uint8_t * yuv1[3], uint8_t * yuv2[3], int width, + int height, int distance, int line_width, + int opacity) +{ + unsigned int op0, op1; + int x, y, z=0; + int step; + + + op1 = (opacity > 235) ? 235 : opacity; + op0 = 235 - op1; + for (y = 0; y < height; y++) { + for (x = 0; (x + z + distance) < width; x += distance) { + step = line_width; + if (distance < step) + step = distance - 1; + for (z = 0; z < step; z++) { + yuv1[0][(y * width + x + z)] = + (op0 * yuv1[0][(y * width + x + z)] + + op1 * yuv2[0][(y * width + x + z)]) / 235; + yuv1[1][(y * width + x + z)] = + (op0 * yuv1[1][(y * width + x + z)] + + op1 * yuv2[1][(y * width + x + z)]) / 235; + yuv1[2][(y * width + x + z)] = + (op0 * yuv1[2][(y * width + x + z)] + + op1 * yuv2[2][(y * width + x + z)]) / 235; + + } + } + } + + /* + uv_width >>= 1; + uv_height >>= 1; + line_width >>= 1; + for (y = 0; y < uv_height; y++) { + for (x = 0; x < uv_width; x += uv_distance) { + step = line_width; + if (uv_distance > step) + step = uv_distance; + for (z = 0; z < step; z++) { + yuv1[1][y * uv_width + x + z] = + (op0 * yuv1[1][y * uv_width + x + z] + + op1 * yuv2[1][y * uv_width + x]) / 235; + yuv1[2][y * uv_width + x + z] = + (op0 * yuv1[2][y * uv_width + x + z] + + op1 * yuv2[2][y * uv_width + x + z]) / 235; + } + + } + } + */ + +} +void transline_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int distance, int line_width, int opacity, + int type) +{ + if (type == 1) + transline1_apply(frame->data, frame2->data, width, height, distance, line_width); + if (type == 0) + transline2_apply(frame->data, frame2->data, width, height, distance, line_width, + opacity); +} +void transline_free(){} diff --git a/veejay-server/libvje/transitions/transline.h b/veejay-server/libvje/transitions/transline.h new file mode 100644 index 00000000..1b0774dd --- /dev/null +++ b/veejay-server/libvje/transitions/transline.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TRANSLINE_H +#define TRANSLINE_H +#include +#include +#include + +vj_effect *transline_init(int width, int height); + +void transline_apply( VJFrame *frame, VJFrame *frame2, int width, + int height, int distance, int line_width, int opacity, + int type); +#endif diff --git a/veejay-server/libvje/transitions/transop.c b/veejay-server/libvje/transitions/transop.c new file mode 100644 index 00000000..6c496061 --- /dev/null +++ b/veejay-server/libvje/transitions/transop.c @@ -0,0 +1,119 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2005 Niels Elburg + * + * 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. + */ +#include +#include +#include "transop.h" + +vj_effect *transop_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 7; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 150; /* opacity */ + ve->defaults[1] = 265; /* width of view port */ + ve->defaults[2] = 194; /* height of viewport */ + ve->defaults[3] = 59; /* y1 */ + ve->defaults[4] = 58; /* x1 */ + ve->defaults[5] = 45; /* y2 */ + ve->defaults[6] = 58; /* x2 */ + + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + + ve->limits[0][1] = 0; + ve->limits[1][1] = width; + ve->limits[0][2] = 0; + ve->limits[1][2] = height; + ve->limits[0][3] = 0; + ve->limits[1][3] = height; + ve->limits[0][4] = 0; + ve->limits[1][4] = width; + ve->limits[0][5] = 0; + ve->limits[1][5] = height; + ve->limits[0][6] = 0; + ve->limits[1][6] = width; + ve->description = "Transition Translate Opacity"; + ve->sub_format = 1; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +/* translate, twidth,theight: size of block to transform */ +/* moves block(x2,y2) to (x1,y1), size of block to move is twidth * theight */ +void transop_apply( VJFrame *frame, VJFrame *frame2, + int twidth, int theight, int x1, int y1, int x2, int y2, + int width, int height, int opacity) +{ + int x, y; + unsigned int op0, op1; + + uint8_t *dY = frame->data[0]; + uint8_t *dCb = frame->data[1]; + uint8_t *dCr = frame->data[2]; + uint8_t *sY = frame2->data[0]; + uint8_t *sCb = frame2->data[1]; + uint8_t *sCr = frame2->data[2]; + + op1 = (opacity > 255) ? 255 : opacity; + op0 = 255 - op1; + + int view_width = twidth; + int view_height = theight; + int sy = y1; + int sx = x1; + + int dy = y2; + int dx = x2; + + if ( (dx + view_width ) > width ) + view_width = width - dx; + if ( (dy + view_height ) > height ) + view_height = height - dy; + + + if ( (sy + view_height) > height ) + view_height = height - sy; + if ( (sx + view_width ) > width ) + view_width = width - sx; + + + for( y = 0 ; y < view_height; y ++ ) + { + for( x = 0 ; x < view_width; x ++ ) + { + dY[ (dy + y ) * width + dx + x ] = + sY[ (sy + y) * width + sx + x ]; + + dCb[ (dy + y ) * width + dx + x ] = + sCb[ (sy + y) * width + sx + x ]; + + dCr[ (dy + y ) * width + dx + x ] = + sCr[ (sy + y) * width + sx + x ]; + + } + } + + +} + +void transop_free(){} diff --git a/veejay-server/libvje/transitions/transop.h b/veejay-server/libvje/transitions/transop.h new file mode 100644 index 00000000..9bca815b --- /dev/null +++ b/veejay-server/libvje/transitions/transop.h @@ -0,0 +1,31 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef TRANSOP_H +#define TRANSOP_H +#include +#include +#include + +vj_effect *transop_init(int width, int height); +void transop_apply( VJFrame *frame, VJFrame *frame2, + int twidth, int theight, int x1, int y1, int x2, int y2, + int width, int height, int opacity); +#endif diff --git a/veejay-server/libvje/transitions/vbar.c b/veejay-server/libvje/transitions/vbar.c new file mode 100644 index 00000000..7069879b --- /dev/null +++ b/veejay-server/libvje/transitions/vbar.c @@ -0,0 +1,130 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ +#include +#include +#include +#include "vbar.h" + +vj_effect *vbar_init(int width, int height) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 5; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); /* default values */ + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ + ve->defaults[0] = 4; + ve->defaults[1] = 1; + ve->defaults[2] = 3; + ve->defaults[3] = 0; + ve->defaults[4] = 0; + ve->limits[0][0] = 1; + ve->limits[1][0] = height; + + ve->limits[0][1] = 0; + ve->limits[1][1] = height; + + ve->limits[0][2] = 0; + ve->limits[1][2] = height; + + ve->limits[0][3] = 0; + ve->limits[1][3] = height; + ve->limits[0][4] = 0; + ve->limits[1][4] = height; + + ve->description = "Vertical Sliding Bars"; + ve->sub_format = 1; + + ve->extra_frame = 1; + ve->has_user = 0; + return ve; +} + +/* p0 351 , p1 92 : positioneert image 1 bovenaan + p4 beweegt image offset verticaal (frame in frame) + p5 beweegt image offset horizontaal (frame in frame) */ +static int bar_top_auto = 0; +static int bar_bot_auto = 0; +static int bar_top_vert = 0; +static int bar_bot_vert = 0; +void vbar_apply(VJFrame *frame, VJFrame *frame2, int width, int height,int divider, int top_y, int bot_y, int top_x, int bot_x ) { + + //int top_width = width; /* frame in frame destination area */ + int top_height = height/(divider); + + int top_width = width/divider; + int bottom_width = width - top_width; + + //int bottom_width = width; /* frame in frame destionation area */ + + int x,y; + int yy=0; + + int y2 = bar_top_auto + top_y; /* destination */ + int x2 = bar_top_vert + top_x; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; + uint8_t *Y2 = frame2->data[0]; + uint8_t *Cb2 = frame2->data[1]; + uint8_t *Cr2 = frame2->data[2]; + int len = frame->len; + + + + if(y2 > height) { y2 = 0; bar_top_auto = 0; } + if(x2 > width) { x2 = 0; bar_top_vert = 0; } + + /* start with top frame in a frame */ + for( y = 0; y < height-y2; y++ ) { + for ( x = 0; x < top_width; x++ ) { + Y[ (y*width + x)] = Y2[ ( (y+y2) *width + x +x2)]; + Cb[ (y*width + x)] = Cb2[ ( (y+y2) *width + x +x2)]; + Cr[ (y*width + x)] = Cr2[ ( (y+y2) *width + x +x2)]; + } + } + + /* do bottom part */ + y2 = bar_bot_auto + bot_y; + x2 = bar_bot_vert + bot_x; + + if(y2 > height) { y2 = 0; bar_bot_auto = 0; } + if(x2 > width) { x2 = 0; bar_bot_vert = 0; } + + /* start with bottom frame in a frame */ + for ( y = 0; (yy+y2) < height; y++) { + yy++; + for(x=bottom_width; (x+x2) < width; x++ ) { + int pos = (yy+y2) * width +x + x2 ; + if(pos + * + * 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. + */ + +#ifndef VBAR_H +#define VBAR_H +#include +#include +#include + +vj_effect *vbar_init(int width, int height); +void vbar_apply( VJFrame *frame, VJFrame *frame2, + int width, int height, int d, int x1, int x2, int t1, int b1); +#endif diff --git a/veejay-server/libvje/transitions/wipe.c b/veejay-server/libvje/transitions/wipe.c new file mode 100644 index 00000000..299ef4e2 --- /dev/null +++ b/veejay-server/libvje/transitions/wipe.c @@ -0,0 +1,64 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include "wipe.h" +#include "transop.h" + +vj_effect *wipe_init(int w,int h) +{ + vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); + ve->num_params = 2; + ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); + ve->defaults[0] = 150; + ve->defaults[1] = 0; + + ve->limits[0][0] = 0; + ve->limits[1][0] = 255; + ve->limits[0][1] = 0; + ve->limits[1][1] = 25; + ve->description = "Transition Wipe"; + ve->sub_format = 0; + ve->extra_frame = 1; + ve->has_user = 0; + return ve; + +} +// FIXME private + +static int g_wipe_width = 0; +static int g_wipe_height = 0; +void wipe_apply( VJFrame *frame, VJFrame *frame2, + int w, int h, int opacity, int inc) +{ + /* w, h increasen */ + transop_apply(frame, frame2, g_wipe_width, g_wipe_height, 0, 0, 0, 0, w, + h, opacity); + g_wipe_width += inc; + g_wipe_height += ((w / h) - 0.5 + inc); + + if (g_wipe_width > w || g_wipe_height > h) { + g_wipe_width = 0; + g_wipe_height = 0; + } +} +void wipe_free(){} diff --git a/veejay-server/libvje/transitions/wipe.h b/veejay-server/libvje/transitions/wipe.h new file mode 100644 index 00000000..e8e0b6af --- /dev/null +++ b/veejay-server/libvje/transitions/wipe.h @@ -0,0 +1,30 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * 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. + */ + +#ifndef WIPE_H +#define WIPE_H +#include +#include +#include + +vj_effect *wipe_init(); +void wipe_apply( VJFrame *frame, VJFrame *frame2, + int width, int height, int opacity, int mode); +#endif diff --git a/veejay-server/libvje/vj-effect.c b/veejay-server/libvje/vj-effect.c new file mode 100644 index 00000000..b78d2c86 --- /dev/null +++ b/veejay-server/libvje/vj-effect.c @@ -0,0 +1,972 @@ +/* + * Copyright (C) 2002-2004 Niels Elburg + * + * 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. + * + */ +// todo: clean up initialization (use function pointers!) + +#include +#include +#include +#include +#include +#include +#include +#include "effects/fibdownscale.h" +#include "effects/magicoverlays.h" +#include "effects/negation.h" +#include "effects/radcor.h" +#include "effects/opacity.h" +#include "effects/posterize.h" +#include "effects/killchroma.h" +#include "effects/mirrors.h" +#include "effects/mirrors2.h" +#include "effects/colormap.h" +#include "effects/dices.h" +#include "effects/emboss.h" +#include "effects/flip.h" +#include "effects/revtv.h" +#include "effects/softblur.h" +#include "effects/split.h" +#include "effects/widthmirror.h" +#include "effects/dither.h" +#include "effects/borders.h" +#include "effects/dummy.h" +#include "effects/frameborder.h" +#include "effects/rawman.h" +#include "effects/rawval.h" +#include "effects/solarize.h" +#include "effects/smuck.h" +#include "effects/transform.h" +#include "effects/coloradjust.h" +#include "effects/gamma.h" +#include "effects/rgbkey.h" +#include "transitions/transblend.h" +#include "transitions/slidingdoor.h" +#include "transitions/fadecolor.h" +#include "transitions/transop.h" +#include "transitions/transline.h" +#include "transitions/transcarot.h" +#include "transitions/wipe.h" +#include "transitions/vbar.h" +#include "effects/diff.h" +#include "effects/texmap.h" +#include "effects/contourextract.h" +#include "effects/autoeq.h" +#include "effects/colorhis.h" +#include "effects/diffimg.h" +#include "effects/whiteframe.h" +#include "effects/lumakey.h" +#include "effects/chromamagick.h" +#include "effects/lumablend.h" +#include "effects/magicoverlays.h" +#include "effects/lumamagick.h" +#include "transitions/fadecolorrgb.h" +#include "effects/reflection.h" +#include "effects/rotozoom.h" +#include "effects/scratcher.h" +#include "effects/colorshift.h" +#include "effects/opacitythreshold.h" +#include "effects/opacityadv.h" +#include "effects/rgbkeysmooth.h" +#include "effects/magicscratcher.h" +#include "effects/chromascratcher.h" +#include "effects/distort.h" +#include "effects/tracer.h" +#include "effects/mtracer.h" +#include "effects/dupmagic.h" +#include "effects/keyselect.h" +#include "effects/greyselect.h" +#include "effects/bwselect.h" +#include "effects/complexinvert.h" +#include "effects/complexthreshold.h" +#include "effects/complexsaturate.h" +#include "effects/complexsync.h" +#include "effects/isolate.h" +#include "transitions/3bar.h" +#include "effects/enhancemask.h" +#include "effects/noiseadd.h" +#include "effects/contrast.h" +#include "effects/motionblur.h" +#include "effects/sinoids.h" +#include "effects/average.h" +#include "effects/ripple.h" +#include "effects/rippletv.h" +#include "effects/bathroom.h" +#include "effects/timedistort.h" +#include "effects/chameleon.h" +#include "effects/baltantv.h" +#include "effects/radioactive.h" +#include "effects/chameleonblend.h" +#include "effects/goom.h" +#include "effects/slice.h" +#include "effects/zoom.h" +#include "effects/deinterlace.h" +#include "effects/mask.h" +#include "effects/crosspixel.h" +#include "effects/color.h" +#include "effects/noisepencil.h" +#include "effects/pencilsketch.h" +#include "effects/pixelate.h" +#include "effects/magicmirror.h" +#include "effects/lumamask.h" +#include "effects/smear.h" +#include "effects/raster.h" +#include "effects/fisheye.h" +#include "effects/swirl.h" +#include "effects/radialblur.h" +#include "effects/binaryoverlays.h" +#include "effects/chromium.h" +#include "effects/chromapalette.h" +#include "effects/uvcorrect.h" +#include "effects/dissolve.h" +#include "effects/overclock.h" +#include "effects/cartonize.h" +#include "effects/nervous.h" +#include "effects/morphology.h" +#include "effects/threshold.h" +#include "effects/motionmap.h" +#include "effects/colmorphology.h" +#include "effects/blob.h" +#include "effects/ghost.h" +#include "effects/boids.h" +#include "effects/tripplicity.h" +#include "effects/neighbours.h" +#include "effects/neighbours2.h" +#include "effects/neighbours3.h" +#include "effects/neighbours4.h" +#include "effects/neighbours5.h" +#include "effects/cutstop.h" +#include "effects/maskstop.h" +#include "effects/photoplay.h" +#include "effects/videoplay.h" +#include "effects/videowall.h" +#include "effects/flare.h" +#include "effects/constantblend.h" +#include "effects/colflash.h" +#include "effects/rgbchannel.h" +#include "effects/diffmap.h" +#include "plugload.h" +#include "effects/picinpic.h" + +int pixel_Y_hi_ = 235; +int pixel_U_hi_ = 240; +int pixel_Y_lo_ = 16; +int pixel_U_lo_ = 16; + +void set_pixel_range(uint8_t Yhi,uint8_t Uhi, uint8_t lo) +{ + pixel_Y_hi_ = Yhi; + pixel_U_hi_ = Uhi; + pixel_U_lo_ = lo; + pixel_Y_lo_ = lo; +} + +static struct +{ + int (*mem_init)(int width, int height); + void (*free)(void); + int effect_id; +} simple_effect_index[] = { +{ bathroom_malloc , bathroom_free ,VJ_IMAGE_EFFECT_BATHROOM }, +{ chromascratcher_malloc , chromascratcher_free ,VJ_IMAGE_EFFECT_CHROMASCRATCHER}, +{ complexsync_malloc , complexsync_free ,VJ_VIDEO_EFFECT_COMPLEXSYNC }, +{ dices_malloc , dices_free ,VJ_IMAGE_EFFECT_DICES }, +{ colorhis_malloc, colorhis_free, VJ_IMAGE_EFFECT_COLORHIS }, +{ autoeq_malloc, autoeq_free ,VJ_IMAGE_EFFECT_AUTOEQ }, +//{ diff_malloc , diff_free ,VJ_VIDEO_EFFECT_DIFF }, +{ magicscratcher_malloc , magicscratcher_free ,VJ_IMAGE_EFFECT_MAGICSCRATCHER }, +{ lumamask_malloc , lumamask_free ,VJ_VIDEO_EFFECT_LUMAMASK }, +{ motionblur_malloc , motionblur_free ,VJ_IMAGE_EFFECT_MOTIONBLUR }, +{ magicmirror_malloc , magicmirror_free ,VJ_IMAGE_EFFECT_MAGICMIRROR }, +{ mtracer_malloc , mtracer_free ,VJ_VIDEO_EFFECT_MTRACER }, +{ noiseadd_malloc , noiseadd_free ,VJ_IMAGE_EFFECT_NOISEADD }, +{ noisepencil_malloc , noisepencil_free ,VJ_IMAGE_EFFECT_NOISEPENCIL }, +{ reflection_malloc , reflection_free ,VJ_IMAGE_EFFECT_REFLECTION }, +{ ripple_malloc , ripple_free ,VJ_IMAGE_EFFECT_RIPPLE }, +{ rotozoom_malloc , rotozoom_free ,VJ_IMAGE_EFFECT_ROTOZOOM }, +{ scratcher_malloc , scratcher_free ,VJ_IMAGE_EFFECT_SCRATCHER }, +{ sinoids_malloc , sinoids_free ,VJ_IMAGE_EFFECT_SINOIDS }, +{ slice_malloc , slice_free ,VJ_IMAGE_EFFECT_SLICE }, +{ split_malloc , split_free ,VJ_VIDEO_EFFECT_SPLIT }, +{ tracer_malloc , tracer_free ,VJ_VIDEO_EFFECT_TRACER }, +{ zoom_malloc , zoom_free ,VJ_IMAGE_EFFECT_ZOOM }, +{ crosspixel_malloc , crosspixel_free ,VJ_IMAGE_EFFECT_CROSSPIXEL }, +{ fisheye_malloc, fisheye_free ,VJ_IMAGE_EFFECT_FISHEYE }, +{ swirl_malloc , swirl_free ,VJ_IMAGE_EFFECT_SWIRL }, +{ radialblur_malloc, radialblur_free, VJ_IMAGE_EFFECT_RADIALBLUR }, +{ uvcorrect_malloc, uvcorrect_free, VJ_IMAGE_EFFECT_UVCORRECT }, +{ overclock_malloc, overclock_free, VJ_IMAGE_EFFECT_OVERCLOCK }, +{ nervous_malloc, nervous_free, VJ_IMAGE_EFFECT_NERVOUS }, +{ morphology_malloc, morphology_free, VJ_IMAGE_EFFECT_MORPHOLOGY }, +{ differencemap_malloc, differencemap_free, VJ_VIDEO_EFFECT_EXTDIFF }, +{ threshold_malloc, threshold_free, VJ_VIDEO_EFFECT_EXTTHRESHOLD }, +{ motionmap_malloc, motionmap_free, VJ_IMAGE_EFFECT_MOTIONMAP }, +{ colmorphology_malloc, colmorphology_free, VJ_IMAGE_EFFECT_COLMORPH }, +{ blob_malloc, blob_free, VJ_IMAGE_EFFECT_VIDBLOB }, +{ boids_malloc, boids_free, VJ_IMAGE_EFFECT_VIDBOIDS }, +{ ghost_malloc, ghost_free, VJ_IMAGE_EFFECT_GHOST }, +{ neighbours_malloc, neighbours_free, VJ_IMAGE_EFFECT_NEIGHBOUR }, +{ neighbours2_malloc, neighbours2_free, VJ_IMAGE_EFFECT_NEIGHBOUR2 }, +{ neighbours3_malloc, neighbours3_free, VJ_IMAGE_EFFECT_NEIGHBOUR3 }, +{ neighbours4_malloc, neighbours4_free, VJ_IMAGE_EFFECT_NEIGHBOUR4 }, +{ neighbours5_malloc, neighbours5_free, VJ_IMAGE_EFFECT_NEIGHBOUR5 }, +{ cutstop_malloc, cutstop_free, VJ_IMAGE_EFFECT_CUTSTOP }, +{ maskstop_malloc, maskstop_free, VJ_IMAGE_EFFECT_MASKSTOP }, +{ photoplay_malloc, photoplay_free, VJ_IMAGE_EFFECT_PHOTOPLAY }, +{ videoplay_malloc, videoplay_free, VJ_VIDEO_EFFECT_VIDEOPLAY }, +{ videowall_malloc, videowall_free, VJ_VIDEO_EFFECT_VIDEOWALL }, +{ flare_malloc, flare_free, VJ_IMAGE_EFFECT_FLARE }, +{ goomfx_malloc, goomfx_free, VJ_IMAGE_EFFECT_GOOM }, +{ rgbchannel_malloc, rgbchannel_free, VJ_IMAGE_EFFECT_RGBCHANNEL }, +{ timedistort_malloc, timedistort_free, VJ_IMAGE_EFFECT_TIMEDISTORT }, +{ chameleon_malloc, chameleon_free, VJ_IMAGE_EFFECT_CHAMELEON }, +{ chameleonblend_malloc, chameleonblend_free, VJ_VIDEO_EFFECT_CHAMBLEND }, +{ baltantv_malloc, baltantv_free, VJ_IMAGE_EFFECT_BALTANTV }, +{ radcor_malloc, radcor_free, VJ_IMAGE_EFFECT_LENSCORRECTION }, +{ radioactivetv_malloc, radioactivetv_free, VJ_VIDEO_EFFECT_RADIOACTIVE }, +{ NULL , NULL ,0 }, +}; + +// complex effects have a buffer per instance +static struct +{ + int (*mem_init)(void **d,int w, int h ); + void (*free)(void *d); + int effect_id; +} complex_effect_index[] = +{ + { diff_malloc, diff_free, VJ_VIDEO_EFFECT_DIFF }, + { texmap_malloc, texmap_free, VJ_VIDEO_EFFECT_TEXMAP }, + { contourextract_malloc, contourextract_free, VJ_IMAGE_EFFECT_CONTOUR }, + { picinpic_malloc, picinpic_free, VJ_VIDEO_EFFECT_PICINPIC }, + { water_malloc, water_free, VJ_VIDEO_EFFECT_RIPPLETV }, + { NULL, NULL, 0 }, +}; + +vj_effect *vj_effects[FX_LIMIT]; +int vj_effect_ready[FX_LIMIT]; + +static int max_width = 0; +static int max_height =0; + +static int n_ext_plugs_ = 0; + +int rgb_parameter_conversion_type_ = 0; + +static int _get_simple_effect( int effect_id) +{ + int i; + for(i = 0; simple_effect_index[i].effect_id != 0 ; i++) + { + if( simple_effect_index[i].effect_id == effect_id ) return i; + } + return -1; +} + +static int _get_complex_effect( int effect_id) +{ + int i; + for(i = 0; complex_effect_index[i].effect_id != 0 ; i++) + { + if( complex_effect_index[i].effect_id == effect_id ) return i; + } + return -1; +} + +static int _no_mem_required(int effect_id) +{ + if( effect_id >= VJ_EXT_EFFECT ) + return 0; + if( _get_simple_effect(effect_id) == -1 && _get_complex_effect(effect_id) == -1 ) + return 1; + return 0; +} + +int vj_effect_initialized(int effect_id) +{ + + int seq = vj_effect_real_to_sequence(effect_id); + if( seq < 0 ) + return 0; + if( _no_mem_required(effect_id) || vj_effect_ready[seq] == 1 ) + return 1; + + return 0; +} + +int vj_effect_activate_ext( int fx_id ) +{ + if( fx_id > (MAX_EFFECTS + n_ext_plugs_) ) + return 0; + int res = plug_activate( fx_id - MAX_EFFECTS ); + if(res) + { + vj_effect_ready[fx_id] = 1; + return 1; + } + return 0; +} + + +int vj_effect_activate(int effect_id) +{ + int seq = vj_effect_real_to_sequence(effect_id); + + if( seq < 0 || seq > (MAX_EFFECTS + n_ext_plugs_ )) + return 0; + + if(seq >= MAX_EFFECTS && seq < (MAX_EFFECTS + n_ext_plugs_)) + return vj_effect_activate_ext(seq); + + if( _no_mem_required(effect_id) ) + return 1; + + if( vj_effect_ready[seq] == 1 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Effect %s already initialized", + vj_effects[seq]->description); + return 1; + } + + if( vj_effect_ready[seq] == 0 ) + { + int index = _get_simple_effect(effect_id); + if(index==-1) + { + index = _get_complex_effect(effect_id); + if(index == -1) + { + return 0; + } + if(!complex_effect_index[index].mem_init( &(vj_effects[seq]->user_data), max_width, max_height )) + { + return 0; + } + else + { + veejay_msg(VEEJAY_MSG_DEBUG, "Initialized complex effects %s", + vj_effects[seq]->description); + vj_effect_ready[seq] = 1; + return 1; + } + //perhaps it is a complex effect + } + if(!simple_effect_index[index].mem_init( max_width, max_height )) + { + return 0; + } + else + { + veejay_msg(VEEJAY_MSG_DEBUG, "Initialized simple effect %s", + vj_effects[seq]->description); + vj_effect_ready[seq]= 1; + return 1; + } + } + return 1; +} + +int vj_effect_deactivate(int effect_id) +{ + int seq = vj_effect_real_to_sequence(effect_id); + + if(seq < 0 || seq >= MAX_EFFECTS) + if( seq > n_ext_plugs_ + MAX_EFFECTS) return 0; + + if( vj_effect_ready[seq] == 0 ) + { + return 1; + } + if( vj_effect_ready[seq] == 1 ) + { + if( seq >= MAX_EFFECTS && seq < (n_ext_plugs_ + MAX_EFFECTS)) + { + plug_deactivate( seq - MAX_EFFECTS ); + vj_effect_ready[seq] = 0; + return 1; + } + else + { + int index = _get_simple_effect(effect_id); + if(index==-1) + { + index = _get_complex_effect(effect_id); + if(index == -1) + { + return 0; + } + complex_effect_index[index].free( vj_effects[seq]->user_data ); + vj_effect_ready[seq] = 0; + veejay_msg(VEEJAY_MSG_DEBUG, "Deactivated complex effect %s", + vj_effects[seq]->description); + return 1; + } + simple_effect_index[index].free( ); + vj_effect_ready[seq] = 0; + veejay_msg(VEEJAY_MSG_DEBUG, "Deactivated simple effect %s", + vj_effects[seq]->description); + return 1; + } + } + return 0; +} + +void vj_effect_deactivate_all() +{ + int i; + for(i = 0 ; i < MAX_EFFECTS + n_ext_plugs_; i++) + { + int effect_id = vj_effect_get_real_id( i ); + if( effect_id > 100) + { + vj_effect_deactivate( effect_id ); + } + } +} + +void vj_effect_initialize(int width, int height, int full_range) +{ + int i = VJ_VIDEO_COUNT; + int k; + + if( full_range ) + { + set_pixel_range( 255, 255,0 ); + } + + n_ext_plugs_ = plug_detect_plugins(); + + if( n_ext_plugs_ > 0 ) + plug_init( width,height ); + + for(k=0; k < MAX_EFFECTS; k++) + vj_effects[k] = NULL; + + vj_effects[0] = dummy_init(width,height); + vj_effects[1] = overlaymagic_init( width,height ); + vj_effects[2] = lumamagick_init( width,height ); + vj_effects[3] = diff_init(width, height); + vj_effects[4] = opacity_init( width,height ); + vj_effects[5] = lumakey_init(width, height); + vj_effects[6] = rgbkey_init( width,height ); + vj_effects[7] = chromamagick_init( width,height ); + vj_effects[8] = lumablend_init( width,height ); + vj_effects[9] = split_init(width,height); + vj_effects[10] = borders_init(width,height); + vj_effects[11] = frameborder_init(width,height); + vj_effects[12] = slidingdoor_init(width, height); + vj_effects[13] = transop_init(width, height); + vj_effects[14] = transcarot_init(width, height); + vj_effects[15] = transline_init(width, height); + vj_effects[16] = transblend_init(width, height); + vj_effects[17] = fadecolor_init(width,height); + vj_effects[18] = fadecolorrgb_init(width,height); + vj_effects[19] = whiteframe_init(width,height); + vj_effects[20] = simplemask_init(width,height); + vj_effects[21] = opacitythreshold_init(width,height); + vj_effects[22] = opacityadv_init(width,height); + vj_effects[23] = rgbkeysmooth_init(width,height); + vj_effects[24] = wipe_init(width,height); + vj_effects[25] = tracer_init(width, height); + vj_effects[26] = mtracer_init(width, height); + vj_effects[27] = dupmagic_init(width,height); + vj_effects[28] = keyselect_init(width,height); + vj_effects[29] = complexthreshold_init(width,height); + vj_effects[30] = complexsync_init(width,height); + vj_effects[31] = bar_init(width,height); + vj_effects[32] = vbar_init(width,height); + vj_effects[33] = lumamask_init(width,height); + vj_effects[34] = binaryoverlay_init(width,height); + vj_effects[35] = dissolve_init(width,height); + vj_effects[36] = tripplicity_init(width,height); + vj_effects[37] = videoplay_init(width,height); + vj_effects[38] = videowall_init(width,height); + vj_effects[39] = threshold_init(width,height); + vj_effects[40] = differencemap_init(width,height); + vj_effects[41] = picinpic_init(width,height); + vj_effects[42] = chameleonblend_init(width,height); + vj_effects[43] = radioactivetv_init(width,height); + vj_effects[44] = texmap_init( width,height); + vj_effects[45] = water_init(width,height); + vj_effects[46] = dummy_init(width,height); + vj_effects[i + 1] = mirrors2_init(width,height); + vj_effects[i + 2] = mirrors_init(width,height); + vj_effects[i + 3] = widthmirror_init(width,height); + vj_effects[i + 4] = flip_init(width,height); + vj_effects[i + 5] = posterize_init(width,height); + vj_effects[i + 6] = negation_init(width,height); + vj_effects[i + 7] = solarize_init(width,height); + vj_effects[i + 8] = coloradjust_init(width,height); + vj_effects[i + 9] = gamma_init(width,height); + vj_effects[i + 10] = softblur_init(width,height); + vj_effects[i + 11] = revtv_init(width, height); + vj_effects[i + 12] = dices_init(width, height); + vj_effects[i + 13] = smuck_init(width,height); + vj_effects[i + 14] = killchroma_init(width,height); + vj_effects[i + 15] = emboss_init(width,height); + vj_effects[i + 16] = dither_init(width,height); + vj_effects[i + 17] = rawman_init(width,height); + vj_effects[i + 18] = rawval_init(width,height); + vj_effects[i + 19] = transform_init(width,height); + vj_effects[i + 20] = fibdownscale_init(width,height); + vj_effects[i + 21] = reflection_init( width,height ); + vj_effects[i + 22] = rotozoom_init(width, height); + vj_effects[i + 23] = colorshift_init(width,height); + vj_effects[i + 24] = scratcher_init(width, height); + vj_effects[i + 25] = magicscratcher_init(width, height); + vj_effects[i + 26] = chromascratcher_init(width, height); + vj_effects[i + 27] = distortion_init(width, height); + vj_effects[i + 28] = greyselect_init(width,height); + vj_effects[i + 29] = bwselect_init(width,height); + vj_effects[i + 30] = complexinvert_init(width,height); + vj_effects[i + 31] = complexsaturation_init(width,height); + vj_effects[i + 32] = isolate_init(width,height); + vj_effects[i + 33] = enhancemask_init(width,height); + vj_effects[i + 34] = noiseadd_init(width,height); + vj_effects[i + 35] = contrast_init(width,height); + vj_effects[i + 36] = motionblur_init(width,height); + vj_effects[i + 37] = sinoids_init(width,height); + vj_effects[i + 38] = average_init(width,height); + vj_effects[i + 39] = ripple_init(width,height); + vj_effects[i + 40] = bathroom_init(width,height); + vj_effects[i + 41] = slice_init(width,height); + vj_effects[i + 42] = zoom_init(width, height); + vj_effects[i + 44] = deinterlace_init(width,height); + vj_effects[i + 45] = crosspixel_init(width,height); + vj_effects[i + 46] = color_init(width,height); + vj_effects[i + 47] = diffimg_init(width,height); + vj_effects[i + 48] = noisepencil_init(width,height); + vj_effects[i + 43] = pencilsketch_init(width,height); + vj_effects[i + 50] = pixelate_init(width,height); + vj_effects[i + 51] = magicmirror_init(width,height); + vj_effects[i + 52] = smear_init(width,height); + vj_effects[i + 53] = raster_init(width,height); + vj_effects[i + 54] = fisheye_init(width,height); + vj_effects[i + 55] = swirl_init(width,height); + vj_effects[i + 56] = radialblur_init(width,height); + vj_effects[i + 57] = chromium_init(width,height); + vj_effects[i + 58] = chromapalette_init(width,height); + vj_effects[i + 59] = uvcorrect_init(width,height); + vj_effects[i + 60] = overclock_init(width,height); + vj_effects[i + 61] = cartonize_init(width,height); + vj_effects[i + 62] = nervous_init(width,height); + vj_effects[i + 63] = morphology_init(width,height); + vj_effects[i + 64] = blob_init(width,height); + vj_effects[i + 65] = boids_init(width,height); + vj_effects[i + 66] = ghost_init(width,height); + vj_effects[i + 67] = neighbours_init(width,height); + vj_effects[i + 68] = neighbours2_init(width,height); + vj_effects[i + 69] = neighbours3_init(width,height); + vj_effects[i + 70] = neighbours4_init(width,height); + vj_effects[i + 71] = neighbours5_init(width,height); + vj_effects[i + 72] = cutstop_init(width,height); + vj_effects[i + 73] = maskstop_init(width,height); + vj_effects[i + 74] = photoplay_init(width,height); + vj_effects[i + 75] = flare_init(width,height ); + vj_effects[i + 76] = constantblend_init(width,height); + vj_effects[i + 77] = colormap_init(width,height); + vj_effects[i + 78] = goomfx_init(width,height); + vj_effects[i + 79] = colmorphology_init(width,height); + vj_effects[i + 80] = colflash_init(width,height); + vj_effects[i + 81] = rgbchannel_init(width,height); + vj_effects[i + 82] = autoeq_init(width,height); + vj_effects[i + 83] = colorhis_init(width,height); + vj_effects[i + 84] = motionmap_init(width,height); + vj_effects[i + 85] = timedistort_init(width,height); + vj_effects[i + 86] = chameleon_init(width,height); + vj_effects[i + 87] = baltantv_init(width,height); + vj_effects[i + 88] = contourextract_init(width,height); + vj_effects[i + 49] = radcor_init(width,height); + max_width = width; + max_height = height; + + for(i=0; i < MAX_EFFECTS; i++) + { + if(vj_effects[i]) + { + if(i!=3) vj_effects[i]->static_bg = 0; + vj_effects[i]->has_help = 0; + if(vj_effects[i]->rgb_conv != 1) + vj_effects[i]->rgb_conv = 0; + } + } + +//@ initialize external plugins + int p = 0; + int p_stop = MAX_EFFECTS + n_ext_plugs_; + + for( p = MAX_EFFECTS; p < p_stop; p ++ ) + vj_effects[p] = plug_get_plugin( (p-MAX_EFFECTS) ); + veejay_msg(VEEJAY_MSG_INFO, "Found %d effects", p_stop ); +} + +void vj_effect_free(vj_effect *ve) { + if(ve->limits[0]) free(ve->limits[0]); + if(ve->limits[1]) free(ve->limits[1]); + if(ve->defaults) free(ve->defaults); + // if(ve->vjed) free(ve->vjed); + free(ve); +} + +void vj_effect_shutdown() { + int i; + vj_effect_deactivate_all(); + plug_free(); + for(i=0; i < vj_effect_max_effects(); i++) { + if(vj_effects[i]) { + if( i >= MAX_EFFECTS ) + if(vj_effects[i]->description) free(vj_effects[i]->description); + vj_effect_free(vj_effects[i]); + + } + } + + diff_destroy(); + texmap_destroy(); + contourextract_destroy(); + rotozoom_destroy(); + distortion_destroy(); + +} + +void vj_effect_dump() { + int i; + veejay_msg(VEEJAY_MSG_INFO, "Below follow all effects in Veejay,"); + veejay_msg(VEEJAY_MSG_INFO, "Effect numbers starting with 2xx are effects that use"); + veejay_msg(VEEJAY_MSG_INFO, "*two* sources (by default a copy of itself)"); + veejay_msg(VEEJAY_MSG_INFO, "Use the channel/source commands to select another sample/stream"); + veejay_msg(VEEJAY_MSG_INFO, "to mix with."); + veejay_msg(VEEJAY_MSG_INFO, "\n [effect num] [effect name] [arg 0 , min/max ] [ arg 1, min/max ] ..."); + for(i=0; i < vj_effect_max_effects(); i++) + { + if(vj_effects[i]) + { + printf("\t%d\t\t\t%s\t\t", vj_effect_get_real_id(i), vj_effects[i]->description); + if(vj_effects[i]->num_params > 0) + { + int j=0; + for(j=0; j < vj_effects[i]->num_params; j++) + printf("\n\t\t\t\t\t\t\t%d\t%d - %d\n", j, vj_effects[i]->limits[0][j],vj_effects[i]->limits[1][j]); + } + else + printf("\n"); + } + + } +} + +/* figure out the position in the array, returns index of vj_effects array given an effect ID */ +int vj_effect_real_to_sequence(int effect_id) +{ + if( effect_id >= VJ_EXT_EFFECT ) + { + int n = effect_id; + effect_id -= VJ_EXT_EFFECT; + effect_id += MAX_EFFECTS; + return effect_id; + } + else + { + if (effect_id > VJ_IMAGE_EFFECT_MIN && effect_id < VJ_IMAGE_EFFECT_MAX) { + effect_id -= VJ_IMAGE_EFFECT_MIN; + effect_id += VJ_VIDEO_COUNT; + return effect_id; + } else if (effect_id > VJ_VIDEO_EFFECT_MIN && + effect_id < VJ_VIDEO_EFFECT_MAX) { + effect_id -= VJ_VIDEO_EFFECT_MIN; + return effect_id; + } + } + return -1; +} + + +int vj_effect_get_real_id(int effect_id) +{ + if (effect_id > 0 && effect_id < VJ_VIDEO_COUNT) + { /* video effect */ + effect_id += VJ_VIDEO_EFFECT_MIN; + return effect_id; + } + else + { + if (effect_id >= VJ_VIDEO_COUNT && effect_id < MAX_EFFECTS) + { /* image effect */ + effect_id -= VJ_VIDEO_COUNT; /* substract video count */ + effect_id += VJ_IMAGE_EFFECT_MIN; + return effect_id; + } + else + { + if( effect_id >= MAX_EFFECTS && effect_id <= vj_effect_max_effects()) + { + effect_id -= MAX_EFFECTS; + effect_id += VJ_EXT_EFFECT; + return effect_id; + } + } + } + return 0; +} + +int vj_effect_get_by_name(char *name) +{ + int i; + if(!name) return 0; + + for ( i = 0; i < vj_effect_max_effects(); i ++ ) + { + if( vj_effects[i]->description ) + { + if(strcasecmp(name, vj_effects[i]->description ) == 0 ) + return (int) vj_effect_get_real_id( i ); + } + } + + return 0; +} + +/* returns the description of an effect */ +char *vj_effect_get_description(int effect_id) +{ /* 115 */ + int entry = vj_effect_real_to_sequence(effect_id); + if (entry > 0) + return vj_effects[entry]->description; + + return ""; +} + +char *vj_effect_get_param_description(int effect_id, int param_nr) +{ + int entry; + entry = vj_effect_real_to_sequence(effect_id); + if (entry > 0 && param_nr < vj_effects[entry]->num_params) + return vj_effects[entry]->param_description[param_nr]; + return "Invalid paramater"; +} + +/* returns number of parameters */ +int vj_effect_get_num_params(int effect_id) +{ + int entry; + if(effect_id<0) return 0; + entry = vj_effect_real_to_sequence(effect_id); + if (entry > 0) + return vj_effects[entry]->num_params; + return 0; +} + +int vj_effect_get_static_bg(int effect_id) +{ + int entry; + if(effect_id < 0) return 0; + entry = vj_effect_real_to_sequence(effect_id); + if(entry>0) + return vj_effects[entry]->static_bg; + return 0; +} + +/* returns default value of a parameter */ +int vj_effect_get_default(int effect_id, int param_nr) +{ + int entry; + entry = vj_effect_real_to_sequence(effect_id); + if (entry > 0 && param_nr >= 0 + && param_nr < vj_effects[entry]->num_params) + return vj_effects[entry]->defaults[param_nr]; + return 0; +} + +/* returns minimum value of a parameter */ +int vj_effect_get_min_limit(int effect_id, int param_nr) +{ + int entry; + entry = vj_effect_real_to_sequence(effect_id); + if (entry > 0 && param_nr >= 0 + && param_nr < vj_effects[entry]->num_params) + return vj_effects[entry]->limits[0][param_nr]; + return 0; +} + +/* returns the maximum value of a parameter */ +int vj_effect_get_max_limit(int effect_id, int param_nr) +{ + int entry; + entry = vj_effect_real_to_sequence(effect_id); + if (entry > 0 && param_nr >= 0 + && param_nr < vj_effects[entry]->num_params) + return vj_effects[entry]->limits[1][param_nr]; + return 0; +} + +int vj_effect_get_extra_frame(int effect_id) +{ + int entry; + entry = vj_effect_real_to_sequence(effect_id); + if (entry > 0) + return vj_effects[entry]->extra_frame; + return 0; +} + +int vj_effect_get_help(int entry) +{ + if(!vj_effects[entry]) + return 0; + + return 0; +} + +int vj_effect_get_summary_len(int entry) +{ + if( !vj_effects[entry] ) + return 0; + + int p = vj_effects[entry]->num_params; + int len = strlen( vj_effects[entry]->description ); + len += 3; + len += 3; + len += 1; + len += 1; + len += 2; + len += 3; + len += ( p * 18 ); + return len; +} + +int vj_effect_get_summary(int entry, char *dst) +{ + int p = vj_effects[entry]->num_params; + int i; + char tmp[20]; + + if(!vj_effects[entry]) + return 0; + + sprintf(dst,"%03d%s%03d%1d%1d%02d", + strlen( vj_effects[entry]->description), + vj_effects[entry]->description, + vj_effect_get_real_id(entry), + vj_effects[entry]->extra_frame, + vj_effects[entry]->rgb_conv, + p + ); + for(i=0; i < p; i++) + { + bzero(tmp,20); + sprintf(tmp, + "%06d%06d%06d", + vj_effects[entry]->limits[0][i], + vj_effects[entry]->limits[1][i], + vj_effects[entry]->defaults[i] + ); + strncat( dst, tmp,strlen(tmp) ); + } + return 1; +} + +int vj_effect_max_effects() +{ + return MAX_EFFECTS + n_ext_plugs_; +} + +int vj_effect_get_subformat(int effect_id) +{ + int entry; + entry = vj_effect_real_to_sequence(effect_id); + if (entry >= 0) + return vj_effects[entry]->sub_format; + return 0; +} + +/* return 1 if suggested value is acceptable, 0 if not */ +int vj_effect_valid_value(int effect_id, int param_nr, int value) +{ + int entry; + entry = vj_effect_real_to_sequence(effect_id); + if (entry >= 0) { + if (param_nr >= 0 && param_nr < vj_effects[entry]->num_params) { + if ((value >= vj_effects[entry]->limits[0][param_nr]) && + (value <= vj_effects[entry]->limits[1][param_nr])) + return 1; + } + } + return 0; +} + +static int vj_is_complex_effect(int effect_id) +{ + int i; + for(i = 0; complex_effect_index[i].effect_id != 0; i ++ ) + { + if(effect_id == complex_effect_index[i].effect_id ) + return 1; + } + return 0; +} + +int vj_effect_has_cb(int effect_id) +{ + int entry = vj_effect_real_to_sequence( effect_id ); + if(entry < 0) return 0; + if( (vj_effects[entry]->has_user == 1 ) && + (vj_is_complex_effect(effect_id) == 1 ) ) + return 1; + return 0; +} + +int vj_effect_get_min_i() +{ + return VJ_IMAGE_EFFECT_MIN; +} + +int vj_effect_get_max_i() +{ + return VJ_IMAGE_EFFECT_MAX; +} + +int vj_effect_get_min_v() +{ + return VJ_VIDEO_EFFECT_MIN; +} + +int vj_effect_get_max_v() +{ + return VJ_VIDEO_EFFECT_MAX; +} + +int vj_effect_has_rgbkey(int effect_id) +{ + int entry; + entry = vj_effect_real_to_sequence(effect_id); + if (entry >= 0) + { + return ( vj_effects[entry]->rgb_conv); + + } + return 0; +} + +int vj_effect_is_valid(int effect_id) +{ + if( effect_id >= VJ_EXT_EFFECT && effect_id < VJ_EXT_EFFECT + n_ext_plugs_) + return 1; + if( effect_id > VJ_IMAGE_EFFECT_MIN && effect_id < VJ_IMAGE_EFFECT_MAX ) + return 1; + if( effect_id > VJ_VIDEO_EFFECT_MIN && effect_id < VJ_VIDEO_EFFECT_MAX ) + return 1; + return 0; +} diff --git a/veejay-server/libvje/vj-effman.c b/veejay-server/libvje/vj-effman.c new file mode 100644 index 00000000..7815cce5 --- /dev/null +++ b/veejay-server/libvje/vj-effman.c @@ -0,0 +1,648 @@ +/* + * Copyright (C) 2002-2004 Niels Elburg + * + * 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. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +extern vj_effect *vj_effects[]; + +void vj_effman_apply_ff_effect( + VJFrame **frames, + VJFrameInfo *frameinfo, + vjp_kf *todo_info, + int *arg, + int entry, + int fx_id) + +{ + plug_control( entry - MAX_EFFECTS, arg ); + + plug_process( frames[0],frames[1],entry - MAX_EFFECTS, get_ffmpeg_pixfmt(frames[0]->format) ); +} + +void vj_effman_apply_image_effect( + VJFrame **frames, + VJFrameInfo *frameinfo, + vjp_kf *todo_info, + int *arg, + int entry, + int e) + + { + + int j; + + switch (e) { + case VJ_IMAGE_EFFECT_CONSTANTBLEND: + constantblend_apply( frames[0], frameinfo->width, + frameinfo->height, arg[0], arg[1], arg[2]); + break; + case VJ_IMAGE_EFFECT_FLARE: + flare_apply( frames[0], frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2] ); + break; + case VJ_IMAGE_EFFECT_PHOTOPLAY: + photoplay_apply(frames[0],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_MASKSTOP: + maskstop_apply(frames[0],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2],arg[3]); + break; + case VJ_IMAGE_EFFECT_CUTSTOP: + cutstop_apply(frames[0],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2],arg[3]); + break; + case VJ_IMAGE_EFFECT_NEIGHBOUR4: + neighbours4_apply(frames[0],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2],arg[3]); + break; + case VJ_IMAGE_EFFECT_NEIGHBOUR5: + neighbours5_apply(frames[0],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_NEIGHBOUR2: + neighbours2_apply(frames[0],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_NEIGHBOUR: + neighbours_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_NEIGHBOUR3: + neighbours3_apply(frames[0],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2]); + break; + + //case VJ_IMAGE_EFFECT_RIPPLETV: + //water_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_PENCILSKETCH: + pencilsketch_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_NOISEPENCIL: + noisepencil_apply(frames[0],frameinfo->width,frameinfo->height, + arg[0],arg[1],arg[2],arg[3]); + break; + case VJ_IMAGE_EFFECT_DIFF: + diffimg_apply(frames[0], + frameinfo->width, frameinfo->height, arg[0], arg[1], + arg[2]); + break; + + case VJ_IMAGE_EFFECT_COMPLEXINVERT: + complexinvert_apply(frames[0], frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4]); + break; + case VJ_IMAGE_EFFECT_COMPLEXSATURATE: + complexsaturation_apply(frames[0], frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]); + break; + case VJ_IMAGE_EFFECT_REFLECTION: + reflection_apply(frames[0], frameinfo->width, frameinfo->height, + arg[0], arg[1], arg[2]); + break; + case VJ_IMAGE_EFFECT_FIBDOWNSCALE: + for (j = 0; j < arg[1]; j++) { + fibdownscale_apply(frames[0], frames[0], frameinfo->width, + frameinfo->height, arg[0]); + } + break; + case VJ_IMAGE_EFFECT_NOISEADD: + noiseadd_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_CONTRAST: + contrast_apply(frames[0], frameinfo->width, frameinfo->height,arg); + break; + case VJ_IMAGE_EFFECT_ENHANCEMASK: + enhancemask_apply(frames[0],frameinfo->width,frameinfo->height,arg); + break; + case VJ_IMAGE_EFFECT_SOLARIZE: + solarize_apply(frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_DISTORTION: + distortion_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1]); + break; + case VJ_IMAGE_EFFECT_GAMMA: + gamma_apply( + frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_COLORADJUST: + coloradjust_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1]); + break; + case VJ_IMAGE_EFFECT_MOTIONBLUR: + motionblur_apply(frames[0],frameinfo->width,frameinfo->height,arg[0]); + break; + + case VJ_IMAGE_EFFECT_MAGICSCRATCHER: + magicscratcher_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1], arg[2]); + break; + case VJ_IMAGE_EFFECT_CHROMASCRATCHER: + chromascratcher_apply(frames[0], frameinfo->width, frameinfo->height, + arg[0], arg[1], arg[2], arg[3]); + break; + case VJ_IMAGE_EFFECT_SCRATCHER: + scratcher_apply(frames[0], frameinfo->width, frameinfo->height, + arg[0], arg[1], arg[2]); + break; + case VJ_IMAGE_EFFECT_KILLCHROMA: + killchroma_apply(frames[0], frameinfo->width, frameinfo->height, arg[0] + ); + break; + case VJ_IMAGE_EFFECT_MIRROR: + mirrors2_apply(frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_MIRRORS: + mirrors_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1]); + break; + case VJ_IMAGE_EFFECT_MAGICMIRROR: + magicmirror_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3]); + break; + case VJ_IMAGE_EFFECT_RASTER: + raster_apply(frames[0],frameinfo->width,frameinfo->height,arg[0]); + break; + case VJ_IMAGE_EFFECT_SWIRL: + swirl_apply(frames[0],frameinfo->width,frameinfo->height,arg[0]); + break; + case VJ_IMAGE_EFFECT_RADIALBLUR: + radialblur_apply(frames[0], frameinfo->width, frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_FISHEYE: + fisheye_apply(frames[0],frameinfo->width,frameinfo->height,arg[0]); + break; + case VJ_IMAGE_EFFECT_PIXELSMEAR: + smear_apply(frames[0], frameinfo->width, frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_PIXELATE: + pixelate_apply(frames[0],frameinfo->width,frameinfo->height,arg[0]); + break; + case VJ_IMAGE_EFFECT_UVCORRECT: + uvcorrect_apply(frames[0], frameinfo->width, frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]); + break; + case VJ_IMAGE_EFFECT_CHROMAPALETTE: + chromapalette_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]); + break; + case VJ_IMAGE_EFFECT_CHROMIUM: + chromium_apply( frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_CARTONIZE: + cartonize_apply( frames[0], frameinfo->width,frameinfo->height, + arg[0],arg[1],arg[2] ); + break; + case VJ_IMAGE_EFFECT_VIDBLOB: + blob_apply( frames[0],frameinfo->width,frameinfo->height, + arg[0],arg[1],arg[2],arg[3] ); + break; + case VJ_IMAGE_EFFECT_VIDBOIDS: + boids_apply( frames[0],frameinfo->width,frameinfo->height, + arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],arg[7] ); + break; + case VJ_IMAGE_EFFECT_GHOST: + ghost_apply( frames[0], frameinfo->width,frameinfo->height,arg[0]); + break; + case VJ_IMAGE_EFFECT_MORPHOLOGY: + morphology_apply( frames[0], frameinfo->width,frameinfo->height, + arg[0],arg[1],arg[2] ); + break; + case VJ_IMAGE_EFFECT_COLMORPH: + colmorphology_apply( frames[0], frameinfo->width, frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_NERVOUS: + nervous_apply( frames[0], frameinfo->width, frameinfo->height, + arg[0]); break; + case VJ_IMAGE_EFFECT_OVERCLOCK: + overclock_apply(frames[0], frameinfo->width, frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_COLORHIS: + colorhis_apply( frames[0], frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3] ); + break; + case VJ_IMAGE_EFFECT_AUTOEQ: + autoeq_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_BALTANTV: + baltantv_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_CHAMELEON: + chameleon_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_TIMEDISTORT: + timedistort_apply(frames[0],frameinfo->width,frameinfo->height,arg[0]); + break; + case VJ_IMAGE_EFFECT_LENSCORRECTION: + radcor_apply( frames[0], frameinfo->width,frameinfo->height, arg[0],arg[1] ,arg[2]); + break; + case VJ_IMAGE_EFFECT_NEGATION: + negation_apply(frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_COLFLASH: + colflash_apply(frames[0], frameinfo->width,frameinfo->height,arg[0], + arg[1],arg[2],arg[3],arg[4] ); + break; + case VJ_IMAGE_EFFECT_COLORMAP: + colormap_apply(frames[0], frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_POSTERIZE: + posterize_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_DITHER: + dither_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1]); + break; + case VJ_IMAGE_EFFECT_EMBOSS: + emboss_apply(frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_FLIP: + flip_apply(frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_REVTV: + revtv_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1], arg[2], arg[3]); + break; + case VJ_IMAGE_EFFECT_COLORSHIFT: + colorshift_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1]); + break; + case VJ_IMAGE_EFFECT_SOFTBLUR: + softblur_apply(frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_WIDTHMIRROR: + widthmirror_apply(frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_DICES: + dices_apply(vj_effects[entry], frames[0], frameinfo->width, + frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_COLORTEST: + color_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_RAWMAN: + rawman_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1]); + break; + case VJ_IMAGE_EFFECT_RAWVAL: + rawval_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], arg[1], + arg[2], arg[3]); + break; + case VJ_IMAGE_EFFECT_SMUCK: + smuck_apply(frames[0], frames[0], frameinfo->width, frameinfo->height, + arg[0]); + break; + case VJ_IMAGE_EFFECT_TRANSFORM: + transform_apply(frames[0], frames[0], frameinfo->width, frameinfo->height, + arg[0]); + break; + case VJ_IMAGE_EFFECT_BWSELECT: + bwselect_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], arg[1]); + break; + case VJ_IMAGE_EFFECT_GREYSELECT: + greyselect_apply(frames[0], frameinfo->width, frameinfo->height,arg[0],arg[1],arg[2],arg[3]); + break; + case VJ_IMAGE_EFFECT_ISOLATE: + isolate_apply(frames[0],frameinfo->width,frameinfo->height, + arg[0],arg[1],arg[2],arg[3],arg[4]); + break; + case VJ_IMAGE_EFFECT_ROTOZOOM: + rotozoom_apply(frames[0], + frameinfo->width, + frameinfo->height, arg[0], arg[1], arg[2], arg[3]); + break; + case VJ_IMAGE_EFFECT_SINOIDS: + sinoids_apply(frames[0], frameinfo->width, frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_AVERAGE: + average_apply(frames[0],frameinfo->width,frameinfo->height,arg[0]); + break; + case VJ_IMAGE_EFFECT_RIPPLE: + ripple_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_BATHROOM: + bathroom_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_RGBCHANNEL: + rgbchannel_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_IMAGE_EFFECT_GOOM: + goomfx_apply( frames[0], frameinfo->width,frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_ZOOM: + zoom_apply(frames[0], frameinfo->width, frameinfo->height,arg[0],arg[1],arg[2],arg[3]); + break; + case VJ_IMAGE_EFFECT_CROSSPIXEL: + crosspixel_apply(frames[0],frameinfo->width,frameinfo->height,arg[0],arg[1]); + break; + case VJ_IMAGE_EFFECT_DEINTERLACE: + deinterlace_apply( frames[0], frameinfo->width, frameinfo->height, arg[0]); + break; + case VJ_IMAGE_EFFECT_MOTIONMAP: + motionmap_apply( frames[0], frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4]); + break; + case VJ_IMAGE_EFFECT_CONTOUR: + contourextract_apply( vj_effects[entry]->user_data, frames[0], + frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5] ); + break; + case VJ_IMAGE_EFFECT_SLICE: + if(arg[2] > 0) { + todo_info->tmp[0] ++; + if(todo_info->tmp[0] > arg[2]) { todo_info->tmp[0] = 0; todo_info->tmp[1] = 1; } + } else { + todo_info->tmp[1] = arg[1]; + } + + slice_apply(frames[0],frameinfo->width,frameinfo->height,arg[0], todo_info->tmp[1]); + todo_info->tmp[1] = 0; + break; + } +} + +void vj_effman_apply_video_effect( VJFrame **frames, VJFrameInfo *frameinfo ,vjp_kf *todo_info,int *arg, int entry, int e) { + + switch(e) { + case VJ_VIDEO_EFFECT_CHAMBLEND: + chameleonblend_apply(frames[0],frames[1], frameinfo->width,frameinfo->height,arg[0],arg[1]); + break; + case VJ_VIDEO_EFFECT_EXTDIFF: + differencemap_apply( frames[0],frames[1],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_VIDEO_EFFECT_EXTTHRESHOLD: + threshold_apply( frames[0],frames[1],frameinfo->width,frameinfo->height,arg[0],arg[1]); + break; + case VJ_VIDEO_EFFECT_VIDEOWALL: + videowall_apply(frames[0],frames[1],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2],arg[3]); + break; + case VJ_VIDEO_EFFECT_VIDEOPLAY: + videoplay_apply(frames[0],frames[1],frameinfo->width, + frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_VIDEO_EFFECT_TRIPPLICITY: + tripplicity_apply(frames[0],frames[1], + frameinfo->width,frameinfo->height, arg[0],arg[1],arg[2]); + break; + case VJ_VIDEO_EFFECT_COMPLEXTHRESHOLD: + complexthreshold_apply(frames[0],frames[1],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3], + arg[4], arg[5]); + break; + case VJ_VIDEO_EFFECT_DUPMAGIC: + dupmagic_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0]); + break; + case VJ_VIDEO_EFFECT_LUMAMAGICK: + lumamagic_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0], arg[1],arg[2]); + break; + case VJ_VIDEO_EFFECT_BINARYOVERLAY: + binaryoverlay_apply(frames[0], frames[1],frameinfo->width,frameinfo->height,arg[0] ); break; + case VJ_VIDEO_EFFECT_OVERLAYMAGIC: + overlaymagic_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, arg[0]); + break; + case VJ_VIDEO_EFFECT_MASK: + simplemask_apply(frames[0],frames[1], frameinfo->width,frameinfo->height,arg[0], arg[1]); + break; + case VJ_VIDEO_EFFECT_LUMAMASK: + lumamask_apply(frames[0], frames[1], frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2]); + break; + case VJ_VIDEO_EFFECT_DISSOLVE: + dissolve_apply(frames[0],frames[1],frameinfo->width,frameinfo->height,arg[0]);break; + case VJ_VIDEO_EFFECT_OPACITY: + opacity_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, arg[0]); + break; + case VJ_VIDEO_EFFECT_THRESHOLDSMOOTH: + opacitythreshold_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, arg[0], arg[1],arg[2]); + break; + case VJ_VIDEO_EFFECT_THRESHOLD: + opacityadv_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, arg[0], arg[1], arg[2]); + break; + case VJ_VIDEO_EFFECT_RGBKEY: + rgbkey_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]); + break; + case VJ_VIDEO_EFFECT_KEYSELECT: + keyselect_apply(frames[0],frames[1],frameinfo->width,frameinfo->height, + arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]); + break; + case VJ_VIDEO_EFFECT_CHROMAMAGICK: + chromamagick_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, arg[0], arg[1]); + break; + case VJ_VIDEO_EFFECT_LUMABLEND: + lumablend_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0], arg[1], arg[2], arg[3]); + break; + case VJ_VIDEO_EFFECT_LUMAKEY: + lumakey_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[4], arg[1], arg[2], arg[0], arg[3]); + break; + case VJ_VIDEO_EFFECT_DIFF: + diff_apply( vj_effects[entry]->user_data, frames[0], frames[1], + frameinfo->width, frameinfo->height, arg[0], arg[1],arg[2],arg[3], arg[4]); + break; + case VJ_VIDEO_EFFECT_TEXMAP: + texmap_apply( vj_effects[entry]->user_data, frames[0],frames[1], + frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5] ); + break; + case VJ_VIDEO_EFFECT_WHITEFRAME: + whiteframe_apply(frames[0], frames[1], frameinfo->width, frameinfo->height); + break; + case VJ_VIDEO_EFFECT_MTRACER: + mtracer_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0], arg[1]); + break; + case VJ_VIDEO_EFFECT_TRACER: + tracer_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, arg[0], arg[1]); + break; + case VJ_VIDEO_EFFECT_CAROT: + transcarot_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[2], arg[3], arg[4], arg[5], arg[0], arg[1]); + break; + case VJ_VIDEO_EFFECT_LINE: + transline_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[2], arg[1], arg[0], arg[3]); + break; + case VJ_VIDEO_EFFECT_TRANSOP: + transop_apply(frames[0], frames[1], arg[1], arg[2], arg[3], + arg[4], arg[5], arg[6], frameinfo->width, frameinfo->height, + arg[0]); + break; + case VJ_VIDEO_EFFECT_COMPLEXSYNC: + if(arg[1] == 1) { /* auto increment as option in effect*/ + if(arg[2]==0) arg[2]=1; + todo_info->tmp[0] += (arg[0]/arg[2] )+1; /* val / max frames */ + if(todo_info->tmp[0] > frameinfo->height-2) todo_info->tmp[0] = 1; + } else { /* arg1 = off , copy arg*/ + todo_info->tmp[0] = arg[0]; + } + complexsync_apply(frames[0], frames[1],frameinfo->width, frameinfo->height, + todo_info->tmp[0]); + break; + case VJ_VIDEO_EFFECT_FADECOLORRGB: + if (arg[4] == 0) { + if (todo_info->tmp[0] >= 255) + todo_info->tmp[0] = arg[0]; + todo_info->tmp[0] += (arg[0] / arg[5]); + } else { + if (todo_info->tmp[0] <= 0) + todo_info->tmp[0] = arg[0]; + + todo_info->tmp[0] -= (arg[0] / arg[5]); + } + + colorfadergb_apply(frames[0], frameinfo->width, frameinfo->height, + todo_info->tmp[0], arg[1], arg[2], arg[3]); + break; + case VJ_VIDEO_EFFECT_FADECOLOR: + if (arg[3] == 0) { + if (todo_info->tmp[0] >= 255) + todo_info->tmp[0] = arg[0]; + todo_info->tmp[0] += (arg[0] / arg[2]); + } else { + if (todo_info->tmp[0] <= 0) + todo_info->tmp[0] = arg[0]; + todo_info->tmp[0] -= (arg[0] / arg[2]); + } + + + colorfade_apply(frames[0], frameinfo->width, frameinfo->height, + todo_info->tmp[0], arg[1]); + break; + case VJ_VIDEO_EFFECT_VBAR: + vbar_apply(frames[0],frames[1],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4]); + break; + case VJ_VIDEO_EFFECT_3BAR: + bar_apply(frames[0],frames[1],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4]); + break; + case VJ_VIDEO_EFFECT_SLIDINGDOOR: + if(arg[1] == 1) { /* auto increment as option in effect*/ + todo_info->tmp[0] ++; /* val / max frames */ + if(todo_info->tmp[0] >= (frameinfo->height/16)) + todo_info->tmp[0] = 1; + } else { /* arg1 = off , copy arg*/ + todo_info->tmp[0] = arg[0]; + } + + slidingdoor_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, todo_info->tmp[0] ); + break; + case VJ_VIDEO_EFFECT_WIPE: + wipe_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0], arg[1]); + break; + case VJ_VIDEO_EFFECT_RGBKEYSMOOTH: + rgbkeysmooth_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, arg[0], arg[1], arg[2], arg[3], + arg[4],arg[5]); + break; + case VJ_VIDEO_EFFECT_SPLIT: + split_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0], arg[1]); + break; + case VJ_VIDEO_EFFECT_BORDERS: + borders_apply(frames[0], frameinfo->width, frameinfo->height, arg[0], + arg[1]); + break; + case VJ_VIDEO_EFFECT_FRAMEBORDER: + frameborder_apply(frames[0], frames[1], frameinfo->width, + frameinfo->height, arg[0]); + break; + case VJ_VIDEO_EFFECT_TRANSBLEND: + transblend_apply(frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0], arg[1], arg[2], arg[3], arg[4], arg[5], + arg[6]); + break; + case VJ_VIDEO_EFFECT_PICINPIC: + picinpic_apply( vj_effects[entry]->user_data,frames[0], frames[1], frameinfo->width, frameinfo->height, + arg[0], arg[1], arg[2], arg[3] ); + break; + case VJ_VIDEO_EFFECT_RIPPLETV: + water_apply( vj_effects[entry]->user_data,frames[0],frames[1],frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3],arg[4] ); + + break; + case VJ_VIDEO_EFFECT_RADIOACTIVE: + radioactivetv_apply( frames[0],frames[1], frameinfo->width,frameinfo->height,arg[0],arg[1],arg[2],arg[3]); + break; + + default: + break; + } + +} + +int vj_effect_prepare( VJFrame *frame, int selector) +{ + veejay_msg(VEEJAY_MSG_DEBUG, "Found FX %d", selector); + if(selector == VJ_VIDEO_EFFECT_DIFF && vj_effect_has_cb(selector)) + { + int i = vj_effect_real_to_sequence( selector ); + veejay_msg(VEEJAY_MSG_DEBUG,"internal id = %d", i ); + if( vj_effects[i]->user_data != NULL) + { + diff_prepare( + (void*) vj_effects[i]->user_data, + frame->data, + frame->width, + frame->height ); + + return 1; + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR,"There is currently no FX that needs a background image"); + } + return 0; +} + + +int vj_effect_apply( VJFrame **frames, VJFrameInfo *frameinfo, vjp_kf *kf, int selector, int *arguments ) +{ + int entry = vj_effect_real_to_sequence( selector ); + int n_a = vj_effect_get_num_params( selector ); + + if( !frames || !frames[0] ) return VJE_NO_FRAMES; + + if(!vj_effect_initialized(selector)) + { + return VJE_NEED_INIT; + } + + if( selector >= 500 ) + vj_effman_apply_ff_effect( frames, frameinfo, kf, arguments, entry, selector ); + else + { + if( selector > 200 ) + vj_effman_apply_video_effect(frames,frameinfo,kf,arguments, entry,selector); + else + vj_effman_apply_image_effect( frames, frameinfo, kf, arguments,entry, selector); + } + return VJE_SUCCESS; +} + + diff --git a/veejay-server/libvje/vje.h b/veejay-server/libvje/vje.h new file mode 100644 index 00000000..a8588271 --- /dev/null +++ b/veejay-server/libvje/vje.h @@ -0,0 +1,124 @@ +/* + * Copyright (C) 2002-2004 Niels Elburg + * + * 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. + * + */ + +#ifndef VJE_H +#define VJE_H + +#define FX_LIMIT 1024 + +#define MAX_EFFECTS 135 +#define PARAM_WIDTH (1<<0x2) +#define PARAM_HEIGHT (1<<0x3) +#define PARAM_FADER (1<<0x1) + +typedef struct +{ + int type; + int tmp[10]; + int ref; +} vjp_kf; + + +typedef struct VJFrame_t +{ + uint8_t *data[4]; + int uv_len; + int len; + int uv_width; + int uv_height; + int shift_v; + int shift_h; + int format; + int width; + int height; + int ssm; + int alpha; + int stride[4]; +} VJFrame; + +typedef struct VJRectangle_t +{ + int top; + int bottom; + int left; + int right; +} VJRectangle; + +typedef struct VJFrameInfo_t +{ + int width; + int height; + float fps; + int64_t timecode; + uint8_t inverse; +} VJFrameInfo; + +typedef struct vj_effect_t { + + char *description; + int num_params; + char **param_description; + int *defaults; + int *flags; + int *limits[2]; + int extra_frame; + int sub_format; + int has_user; + int static_bg; + int has_help; + int rgb_conv; + int n_out; + int instance;//crap + void *user_data; + char padding[4]; +} vj_effect; + +extern void vj_effect_initialize(int width, int height, int range); +extern void vj_effect_shutdown(); +extern int vj_effect_max_effects(); +extern int vj_effect_real_to_sequence(int effect_id); +extern int vj_effect_get_real_id( int entry_num ); +extern char *vj_effect_get_description(int effect_id); +extern char *vj_effect_get_param_description(int effect_id, int param_nr); +extern int vj_effect_get_extra_frame(int effect_id); +extern int vj_effect_get_num_params(int effect_id); +extern int vj_effect_get_default(int effect_id, int param_nr); +extern int vj_effect_get_min_limit(int effect_id, int param_nr); +extern int vj_effect_get_max_limit(int effect_id, int param_nr); +extern int vj_effect_valid_value(int effect_id, int param_nr, int value); +extern int vj_effect_get_subformat(int effect_id); +extern int vj_effect_has_cb(int effect_id); +extern int vj_effect_has_rgbkey(int effect_id); +extern int vj_effect_is_valid(int effect_id); +extern int vj_effect_get_summary(int entry, char *dst); +extern int vj_effect_get_summary_len(int entry); +extern int vj_effect_activate(int e); +extern int vj_effect_deactivate(int e); +extern int vj_effect_initialized(int e); +extern int vj_effect_get_min_i(); +extern int vj_effect_get_max_i(); +extern int vj_effect_get_min_v(); +extern int vj_effect_get_max_v(); +extern int vj_effect_get_by_name(char *name); +extern int vj_effect_apply( VJFrame **frames, VJFrameInfo *frameinfo, vjp_kf *kf, int selector, int *arguments ); +extern int vj_effect_prepare( VJFrame *frame, int selector); +extern void vj_effect_dump(void); +extern int rgb_parameter_conversion_type_; + +#endif diff --git a/veejay-server/libvjmem/Makefile.am b/veejay-server/libvjmem/Makefile.am new file mode 100644 index 00000000..7d372d0a --- /dev/null +++ b/veejay-server/libvjmem/Makefile.am @@ -0,0 +1,8 @@ +# Makefile for memory managment / platform specific optimizations +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_builddir)/libvjmsg +AM_CFLAGS=$(OP_CFLAGS) +VJMEM_LIB_FILE = libvjmem.la +pkginclude_HEADERS = vjmem.h +noinst_LTLIBRARIES = $(VJMEM_LIB_FILE) +libvjmem_la_SOURCES = memcpy.c vj-x86.c + diff --git a/veejay-server/libvjmem/Makefile.in b/veejay-server/libvjmem/Makefile.in new file mode 100644 index 00000000..01a0dd5a --- /dev/null +++ b/veejay-server/libvjmem/Makefile.in @@ -0,0 +1,539 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libvjmem +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libvjmem_la_LIBADD = +am_libvjmem_la_OBJECTS = memcpy.lo vj-x86.lo +libvjmem_la_OBJECTS = $(am_libvjmem_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libvjmem_la_SOURCES) +DIST_SOURCES = $(libvjmem_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Makefile for memory managment / platform specific optimizations +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_builddir)/libvjmsg +AM_CFLAGS = $(OP_CFLAGS) +VJMEM_LIB_FILE = libvjmem.la +pkginclude_HEADERS = vjmem.h +noinst_LTLIBRARIES = $(VJMEM_LIB_FILE) +libvjmem_la_SOURCES = memcpy.c vj-x86.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libvjmem/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libvjmem/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libvjmem.la: $(libvjmem_la_OBJECTS) $(libvjmem_la_DEPENDENCIES) + $(LINK) $(libvjmem_la_OBJECTS) $(libvjmem_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-x86.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + 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-pkgincludeHEADERS + +# 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/veejay-server/libvjmem/memcpy.c b/veejay-server/libvjmem/memcpy.c new file mode 100644 index 00000000..623373be --- /dev/null +++ b/veejay-server/libvjmem/memcpy.c @@ -0,0 +1,1021 @@ +/* + (c) Copyright 2000-2002 convergence integrated media GmbH. + (c) Copyright 2002 convergence GmbH. + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt and + Sven Neumann . + + Fast memcpy code was taken from xine (see below). + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +/* + * Copyright (C) 2001 the xine project + * + * This file is part of xine, a unix video player. + * + * xine 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. + * + * xine 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 + * + * These are the MMX/MMX2/SSE optimized versions of memcpy + * + * This code was adapted from Linux Kernel sources by Nick Kurshev to + * the mplayer program. (http://mplayer.sourceforge.net) + * + * Miguel Freitas split the #ifdefs into several specialized functions that + * are benchmarked at runtime by xine. Some original comments from Nick + * have been preserved documenting some MMX/SSE oddities. + * Also added kernel memcpy function that seems faster than glibc one. + * + */ + +/* Original comments from mplayer (file: aclib.c) This part of code + was taken by me from Linux-2.4.3 and slightly modified for MMX, MMX2, + SSE instruction set. I have done it since linux uses page aligned + blocks but mplayer uses weakly ordered data and original sources can + not speedup them. Only using PREFETCHNTA and MOVNTQ together have + effect! + + From IA-32 Intel Architecture Software Developer's Manual Volume 1, + + Order Number 245470: + "10.4.6. Cacheability Control, Prefetch, and Memory Ordering Instructions" + + Data referenced by a program can be temporal (data will be used + again) or non-temporal (data will be referenced once and not reused + in the immediate future). To make efficient use of the processor's + caches, it is generally desirable to cache temporal data and not + cache non-temporal data. Overloading the processor's caches with + non-temporal data is sometimes referred to as "polluting the + caches". The non-temporal data is written to memory with + Write-Combining semantics. + + The PREFETCHh instructions permits a program to load data into the + processor at a suggested cache level, so that it is closer to the + processors load and store unit when it is needed. If the data is + already present in a level of the cache hierarchy that is closer to + the processor, the PREFETCHh instruction will not result in any data + movement. But we should you PREFETCHNTA: Non-temporal data fetch + data into location close to the processor, minimizing cache + pollution. + + The MOVNTQ (store quadword using non-temporal hint) instruction + stores packed integer data from an MMX register to memory, using a + non-temporal hint. The MOVNTPS (store packed single-precision + floating-point values using non-temporal hint) instruction stores + packed floating-point data from an XMM register to memory, using a + non-temporal hint. + + The SFENCE (Store Fence) instruction controls write ordering by + creating a fence for memory store operations. This instruction + guarantees that the results of every store instruction that precedes + the store fence in program order is globally visible before any + store instruction that follows the fence. The SFENCE instruction + provides an efficient way of ensuring ordering between procedures + that produce weakly-ordered data and procedures that consume that + data. + + If you have questions please contact with me: Nick Kurshev: + nickols_k@mail.ru. +*/ + +/* mmx v.1 Note: Since we added alignment of destinition it speedups + of memory copying on PentMMX, Celeron-1 and P2 upto 12% versus + standard (non MMX-optimized) version. + Note: on K6-2+ it speedups memory copying upto 25% and + on K7 and P3 about 500% (5 times). +*/ + +/* Additional notes on gcc assembly and processors: [MF] + prefetch is specific for AMD processors, the intel ones should be + prefetch0, prefetch1, prefetch2 which are not recognized by my gcc. + prefetchnta is supported both on athlon and pentium 3. + + therefore i will take off prefetchnta instructions from the mmx1 + version to avoid problems on pentium mmx and k6-2. + + quote of the day: + "Using prefetches efficiently is more of an art than a science" +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif +#define BUFSIZE 1024 + +#if defined ( HAVE_ASM_MMX2 ) || defined ( HAVE_ASM_3DNOW ) || defined( HAVE_ASM_MMX ) +#undef HAVE_MMX1 +#if defined ( HAVE_ASM_MMX ) && !defined(HAVE_ASM_MMX2) && !defined( HAVE_ASM_3DNOW ) && !defined( HAVE_ASM_SSE) +/* means: mmx v.1. Note: Since we added alignment of destinition it speedups + of memory copying on PentMMX, Celeron-1 and P2 upto 12% versus + standard (non MMX-optimized) version. + Note: on K6-2+ it speedups memory copying upto 25% and + on K7 and P3 about 500% (5 times). */ +#define HAVE_MMX1 +#endif +#undef HAVE_K6_2PLUS +#if !defined( HAVE_ASM_MMX2) && defined( HAVE_ASM_3DNOW ) +#define HAVE_K6_2PLUS +#endif +#endif + + +/* definitions */ +#define BLOCK_SIZE 4096 +#define CONFUSION_FACTOR 0 +//Feel free to fine-tune the above 2, it might be possible to get some speedup with them :) + +#if defined(ARCH_X86) || defined (ARCH_X86_64) +/* for small memory blocks (<256 bytes) this version is faster */ +#define small_memcpy(to,from,n)\ +{\ +register unsigned long int dummy;\ +__asm__ __volatile__(\ + "rep; movsb"\ + :"=&D"(to), "=&S"(from), "=&c"(dummy)\ + :"0" (to), "1" (from),"2" (n)\ + : "memory");\ +} + +/* for small memory blocks (<256 bytes) this version is faster */ +#define small_memset(to,val,n)\ +{\ +register unsigned long int dummy;\ +__asm__ __volatile__(\ + "rep; stosb"\ + :"=&D"(to), "=&c"(dummy)\ + :"0" (to), "1" (n), "a"((char)val)\ + :"memory");\ +} +static inline unsigned long long int rdtsc() +{ + unsigned long long int x; + __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); + return x; +} +#else +#define small_memcpy(to,from,n) memcpy( to,from,n ) +#define small_memset(to,val,n) memset(to,val,n) +char *veejay_strncpy( char *dest, const char *src, size_t n ) +{ +// dest[n-1] = '\0'; + return strncpy( dest,src, n-1 ); +} +char *veejay_strncat( char *s1, char *s2, size_t n ) { +// s2[n] = '\0'; + return strncat( s1,s2, n); +} + +void yuyv_plane_clear( size_t len, void *to ) +{ + uint8_t *t = (uint8_t*) to; + unsigned int i; + i = len; + for( ; i > 0 ; i -- ) + { + t[0] = 0; + t[1] = 128; + t[2] = 0; + t[3] = 128; + t += 4; + } +} +static inline unsigned long long int rdtsc() +{ + struct timeval tv; + + gettimeofday (&tv, NULL); + return (tv.tv_sec * 1000000 + tv.tv_usec); +} +#endif + +#if defined(ARCH_X86) || defined (ARCH_X86_64) +static inline void * __memcpy(void * to, const void * from, size_t n) +{ + int d0, d1, d2; + if ( n < 4 ) { + small_memcpy(to,from,n); + } + else + __asm__ __volatile__( + "rep ; movsl\n\t" + "testb $2,%b4\n\t" + "je 1f\n\t" + "movsw\n" + "1:\ttestb $1,%b4\n\t" + "je 2f\n\t" + "movsb\n" + "2:" + : "=&c" (d0), "=&D" (d1), "=&S" (d2) + :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) + : "memory"); + + return(to); +} + +#undef _MMREG_SIZE +#ifdef HAVE_ASM_SSE +#define _MMREG_SIZE 16 +#else +#define _MMREG_SIZE 64 +#endif + +#undef _MIN_LEN +#ifdef HAVE_ASM_MMX2 //@ was ifndef HAVE_MMX1 +#define _MIN_LEN 0x40 +#else +#define _MIN_LEN 0x800 /* 2K blocks */ +#endif + + +#undef _EMMS +#undef _PREFETCH + +#ifdef HAVE_K6_2PLUS +#define _PREFETCH "prefetch" +/* On K6 femms is faster of emms. On K7 femms is directly mapped on emms. */ +#define _EMMS "femms" +#else +#define _PREFETCH "prefetchnta" +#define _EMMS "emms" +#endif + +#ifdef HAVE_ASM_MMX2 +#define MOVNTQ "movntq" +#else +#define MOVNTQ "movq" +#endif + +char *veejay_strncpy( char *dest, const char *src, size_t n ) +{ + dest[n] = '\0'; + if( n < 0xff ) { + small_memcpy( dest,src, n ); + } else if ( n < 512 ) { + small_memcpy( dest,src, n ); + } else { + return veejay_memcpy( dest,src, n ); + } + return dest; +} + + +char *veejay_strncat( char *s1, char *s2, size_t n ) +{ +#ifdef STRICT_CHECKING + assert( strlen(s2) == n ); +#endif + //@ run forward + char *s = s1; + while(*s != '\0' ) + *s ++; + //@ small + if( n < 0xff ) + { + s2[n] = '\0'; + small_memcpy( s, s2, n+1); + } + else if ( n < 512 ) // bit smaller + { + s2[n] = '\0'; + small_memcpy( s, s2, n+1); + } else + { + s2[n] = '\0'; + return veejay_memcpy(s,s2, n+1 ); + } + return s1; +} + +void prefetch_memory( void *from ) +{ +#ifndef HAVE_MMX1 + __asm__ __volatile__ ( + _PREFETCH" (%0)\n" + _PREFETCH" 64(%0)\n" + _PREFETCH" 128(%0)\n" + _PREFETCH" 192(%0)\n" + _PREFETCH" 256(%0)\n" + :: "r" (from)); +#else +#ifdef HAVE_ASM_SSE + __asm__ __volatile__ ( + _PREFETCH" 320(%0)\n" + :: "r" (from)); + +#endif +#endif +} + + +static uint8_t ppmask[16] = { 0,128,128,0, 128,128,0,128, 128,0,128,128,0,128,128, 0 }; +static uint8_t yuyv_mmreg_[_MMREG_SIZE]; + +void yuyv_plane_init() +{ + unsigned int i; + for( i = 0; i < _MMREG_SIZE ;i ++ ) + yuyv_mmreg_[i] = ( (i%2) ? 128: 0 ); +} + + +void yuyv_plane_clear( size_t len, void *to ) +{ + uint8_t *t = (uint8_t*) to; + unsigned int i; + +#ifdef HAVE_ASM_MMX2 + __asm __volatile( + "movq (%0), %%mm0\n" + :: "r" (yuyv_mmreg_) : "memory" ); + + i = len >> 7; + len = len % 128; + + for(; i > 0 ; i -- ) + { + __asm __volatile( + _PREFETCH" 320(%0)\n" + MOVNTQ" %%mm0, (%0)\n" + MOVNTQ" %%mm0, 8(%0)\n" + MOVNTQ" %%mm0, 16(%0)\n" + MOVNTQ" %%mm0, 24(%0)\n" + MOVNTQ" %%mm0, 32(%0)\n" + MOVNTQ" %%mm0, 40(%0)\n" + MOVNTQ" %%mm0, 48(%0)\n" + MOVNTQ" %%mm0, 56(%0)\n" + MOVNTQ" %%mm0, 64(%0)\n" + MOVNTQ" %%mm0, 72(%0)\n" + MOVNTQ" %%mm0, 80(%0)\n" + MOVNTQ" %%mm0, 88(%0)\n" + MOVNTQ" %%mm0, 96(%0)\n" + MOVNTQ" %%mm0, 104(%0)\n" + MOVNTQ" %%mm0, 112(%0)\n" + MOVNTQ" %%mm0, 120(%0)\n" + :: "r" (t) : "memory" ); + t += 128; + } +#else +#ifdef HAVE_ASM_MMX + __asm __volatile( + "movq (%0), %%mm0\n\t" + :: "r" (yuyv_mmreg_): "memory"); + i = len >> 6; + len = len % 64; + + for(; i > 0 ; i -- ) + { + __asm__ __volatile__ ( + "movq %%mm0, (%0)\n" + "movq %%mm0, 8(%0)\n" + "movq %%mm0, 16(%0)\n" + "movq %%mm0, 24(%0)\n" + "movq %%mm0, 32(%0)\n" + "movq %%mm0, 40(%0)\n" + "movq %%mm0, 48(%0)\n" + "movq %%mm0, 56(%0)\n" + :: "r" (t) : "memory"); + t += 64; + } +#endif +#endif +#ifdef HAVE_ASM_MMX + i = len >> 3; + len = i % 8; + for( ; i > 0; i -- ) + { + __asm__ __volatile__ ( + "movq %%mm0, (%0)\n" + :: "r" (t) : "memory" ); + t += 8; + } +#endif + i = len; + for( ; i > 0 ; i -- ) + { + t[0] = 0; + t[1] = 128; + t[2] = 0; + t[3] = 128; + t += 4; + } +} + +void packed_plane_clear( size_t len, void *to ) +{ + uint8_t *t = (uint8_t*) to; + unsigned int i; + uint8_t *m = (uint8_t*) &ppmask; +#ifdef HAVE_ASM_MMX + __asm __volatile( + "movq (%0), %%mm0\n\t" + :: "r" (m)); + i = len / 64; + len = len % 64; + + for(; i > 0 ; i -- ) + { + __asm__ __volatile__ ( + "movq %%mm0, (%0)\n" + "movq %%mm0, 8(%0)\n" + "movq %%mm0, 16(%0)\n" + "movq %%mm0, 24(%0)\n" + "movq %%mm0, 32(%0)\n" + "movq %%mm0, 40(%0)\n" + "movq %%mm0, 48(%0)\n" + "movq %%mm0, 56(%0)\n" + :: "r" (t) : "memory"); + t += 64; + } +#endif + i = len; + for( ; i > 0 ; i -- ) + { + t[0] = 0; + t[1] = 128; + t[2] = 0; + t[3] = 128; + t += 4; + } +} + + +#if defined (HAVE_ASM_SSE) || defined (HAVE_ASM_MMX) +static void *fast_memcpy(void * to, const void * from, size_t len) +{ + void *retval; + size_t i; + retval = to; + unsigned char *t = to; + unsigned char *f = (unsigned char *)from; +#ifndef HAVE_MMX1 + /* PREFETCH has effect even for MOVSB instruction ;) */ + __asm__ __volatile__ ( + _PREFETCH" (%0)\n" + _PREFETCH" 64(%0)\n" + _PREFETCH" 128(%0)\n" + _PREFETCH" 192(%0)\n" + _PREFETCH" 256(%0)\n" + : : "r" (f) ); +#endif + if(len >= _MIN_LEN) + { + register unsigned long int delta; + /* Align destinition to MMREG_SIZE -boundary */ + delta = ((unsigned long int)to)&(_MMREG_SIZE-1); + if(delta) + { + delta=_MMREG_SIZE-delta; + len -= delta; + small_memcpy(t, f, delta); + } + i = len >> 6; /* len/64 */ + len&=63; + /* + This algorithm is top effective when the code consequently + reads and writes blocks which have size of cache line. + Size of cache line is processor-dependent. + It will, however, be a minimum of 32 bytes on any processors. + It would be better to have a number of instructions which + perform reading and writing to be multiple to a number of + processor's decoders, but it's not always possible. + */ +#ifdef HAVE_ASM_SSE /* Only P3 (may be Cyrix3) */ + if(((unsigned long)f) & 15) + /* if SRC is misaligned */ + for(; i>0; i--) + { + __asm__ __volatile__ ( + _PREFETCH" 320(%0)\n" + "movups (%0), %%xmm0\n" + "movups 16(%0), %%xmm1\n" + "movups 32(%0), %%xmm2\n" + "movups 48(%0), %%xmm3\n" + "movntps %%xmm0, (%1)\n" + "movntps %%xmm1, 16(%1)\n" + "movntps %%xmm2, 32(%1)\n" + "movntps %%xmm3, 48(%1)\n" + :: "r" (f), "r" (t) : "memory"); + f+=64; + t+=64; + } + else + /* + Only if SRC is aligned on 16-byte boundary. + It allows to use movaps instead of movups, which required data + to be aligned or a general-protection exception (#GP) is generated. + */ + for(; i>0; i--) + { + __asm__ __volatile__ ( + _PREFETCH" 320(%0)\n" + "movaps (%0), %%xmm0\n" + "movaps 16(%0), %%xmm1\n" + "movaps 32(%0), %%xmm2\n" + "movaps 48(%0), %%xmm3\n" + "movntps %%xmm0, (%1)\n" + "movntps %%xmm1, 16(%1)\n" + "movntps %%xmm2, 32(%1)\n" + "movntps %%xmm3, 48(%1)\n" + :: "r" (f), "r" (t) : "memory"); + f+=64; + t+=64; + } +#else + // Align destination at BLOCK_SIZE boundary + for(; ((int)to & (BLOCK_SIZE-1)) && i>0; i--) + { + __asm__ __volatile__ ( +#ifndef HAVE_MMX1 + _PREFETCH" 320(%0)\n" +#endif + "movq (%0), %%mm0\n" + "movq 8(%0), %%mm1\n" + "movq 16(%0), %%mm2\n" + "movq 24(%0), %%mm3\n" + "movq 32(%0), %%mm4\n" + "movq 40(%0), %%mm5\n" + "movq 48(%0), %%mm6\n" + "movq 56(%0), %%mm7\n" + MOVNTQ" %%mm0, (%1)\n" + MOVNTQ" %%mm1, 8(%1)\n" + MOVNTQ" %%mm2, 16(%1)\n" + MOVNTQ" %%mm3, 24(%1)\n" + MOVNTQ" %%mm4, 32(%1)\n" + MOVNTQ" %%mm5, 40(%1)\n" + MOVNTQ" %%mm6, 48(%1)\n" + MOVNTQ" %%mm7, 56(%1)\n" + :: "r" (f), "r" (t) : "memory"); + f+=64; + t+=64; + } + + // Pure Assembly cuz gcc is a bit unpredictable ;) + if(i>=BLOCK_SIZE/64) + asm volatile( + "xorl %%eax, %%eax \n\t" + ".balign 16 \n\t" + "1: \n\t" + "movl (%0, %%eax), %%ebx \n\t" + "movl 32(%0, %%eax), %%ebx \n\t" + "movl 64(%0, %%eax), %%ebx \n\t" + "movl 96(%0, %%eax), %%ebx \n\t" + "addl $128, %%eax \n\t" + "cmpl %3, %%eax \n\t" + " jb 1b \n\t" + + "xorl %%eax, %%eax \n\t" + + ".balign 16 \n\t" + "2: \n\t" + "movq (%0, %%eax), %%mm0\n" + "movq 8(%0, %%eax), %%mm1\n" + "movq 16(%0, %%eax), %%mm2\n" + "movq 24(%0, %%eax), %%mm3\n" + "movq 32(%0, %%eax), %%mm4\n" + "movq 40(%0, %%eax), %%mm5\n" + "movq 48(%0, %%eax), %%mm6\n" + "movq 56(%0, %%eax), %%mm7\n" + MOVNTQ" %%mm0, (%1, %%eax)\n" + MOVNTQ" %%mm1, 8(%1, %%eax)\n" + MOVNTQ" %%mm2, 16(%1, %%eax)\n" + MOVNTQ" %%mm3, 24(%1, %%eax)\n" + MOVNTQ" %%mm4, 32(%1, %%eax)\n" + MOVNTQ" %%mm5, 40(%1, %%eax)\n" + MOVNTQ" %%mm6, 48(%1, %%eax)\n" + MOVNTQ" %%mm7, 56(%1, %%eax)\n" + "addl $64, %%eax \n\t" + "cmpl %3, %%eax \n\t" + "jb 2b \n\t" + +#if CONFUSION_FACTOR > 0 + // a few percent speedup on out of order executing CPUs + "movl %5, %%eax \n\t" + "2: \n\t" + "movl (%0), %%ebx \n\t" + "movl (%0), %%ebx \n\t" + "movl (%0), %%ebx \n\t" + "movl (%0), %%ebx \n\t" + "decl %%eax \n\t" + " jnz 2b \n\t" +#endif + + "xorl %%eax, %%eax \n\t" + "addl %3, %0 \n\t" + "addl %3, %1 \n\t" + "subl %4, %2 \n\t" + "cmpl %4, %2 \n\t" + " jae 1b \n\t" + : "+r" (f), "+r" (t), "+r" (i) + : "r" (BLOCK_SIZE), "i" (BLOCK_SIZE/64), "i" (CONFUSION_FACTOR) + : "%eax", "%ebx" + ); + + for(; i>0; i--) + { + __asm__ __volatile__ ( +#ifndef HAVE_MMX1 + _PREFETCH" 320(%0)\n" +#endif + "movq (%0), %%mm0\n" + "movq 8(%0), %%mm1\n" + "movq 16(%0), %%mm2\n" + "movq 24(%0), %%mm3\n" + "movq 32(%0), %%mm4\n" + "movq 40(%0), %%mm5\n" + "movq 48(%0), %%mm6\n" + "movq 56(%0), %%mm7\n" + MOVNTQ" %%mm0, (%1)\n" + MOVNTQ" %%mm1, 8(%1)\n" + MOVNTQ" %%mm2, 16(%1)\n" + MOVNTQ" %%mm3, 24(%1)\n" + MOVNTQ" %%mm4, 32(%1)\n" + MOVNTQ" %%mm5, 40(%1)\n" + MOVNTQ" %%mm6, 48(%1)\n" + MOVNTQ" %%mm7, 56(%1)\n" + :: "r" (f), "r" (t) : "memory"); + f+=64; + t+=64; + } + +#endif /* Have SSE */ +#ifdef HAVE_ASM_MMX2 + /* since movntq is weakly-ordered, a "sfence" + * is needed to become ordered again. */ + __asm__ __volatile__ ("sfence":::"memory"); +#endif +#ifdef HAVE_ASM_MMX + /* enables to use FPU */ + + __asm__ __volatile__ (_EMMS:::"memory"); +#endif + } + /* + * Now do the tail of the block + */ + if(len) small_memcpy(t, f, len); + return retval; +} +#endif + +void fast_memset_finish() +{ +#ifdef HAVE_ASM_MMX2 + /* since movntq is weakly-ordered, a "sfence" + * * is needed to become ordered again. */ + __asm__ __volatile__ ("sfence":::"memory"); +#endif +#ifdef HAVE_ASM_MMX + /* enables to use FPU */ + __asm__ __volatile__ (_EMMS:::"memory"); +#endif + +} + +void fast_memset_dirty(void * to, int val, size_t len) +{ + size_t i; + unsigned char mm_reg[_MMREG_SIZE], *pmm_reg; + unsigned char *t = to; + if(len >= _MIN_LEN) + { + register unsigned long int delta; + delta = ((unsigned long int)to)&(_MMREG_SIZE-1); + if(delta) + { + delta=_MMREG_SIZE-delta; + len -= delta; + small_memset(t, val, delta); + } + i = len >> 7; /* len/128 */ + len&=127; + pmm_reg = mm_reg; + small_memset(pmm_reg,val,sizeof(mm_reg)); +#ifdef HAVE_ASM_SSE /* Only P3 (may be Cyrix3) */ + __asm__ __volatile__( + "movups (%0), %%xmm0\n" + :: "r"(mm_reg):"memory"); + for(; i>0; i--) + { + __asm__ __volatile__ ( + "movntps %%xmm0, (%0)\n" + "movntps %%xmm0, 16(%0)\n" + "movntps %%xmm0, 32(%0)\n" + "movntps %%xmm0, 48(%0)\n" + "movntps %%xmm0, 64(%0)\n" + "movntps %%xmm0, 80(%0)\n" + "movntps %%xmm0, 96(%0)\n" + "movntps %%xmm0, 112(%0)\n" + :: "r" (t) : "memory"); + t+=128; + } +#else + __asm__ __volatile__( + "movq (%0), %%mm0\n" + :: "r"(mm_reg):"memory"); + for(; i>0; i--) + { + __asm__ __volatile__ ( + MOVNTQ" %%mm0, (%0)\n" + MOVNTQ" %%mm0, 8(%0)\n" + MOVNTQ" %%mm0, 16(%0)\n" + MOVNTQ" %%mm0, 24(%0)\n" + MOVNTQ" %%mm0, 32(%0)\n" + MOVNTQ" %%mm0, 40(%0)\n" + MOVNTQ" %%mm0, 48(%0)\n" + MOVNTQ" %%mm0, 56(%0)\n" + MOVNTQ" %%mm0, 64(%0)\n" + MOVNTQ" %%mm0, 72(%0)\n" + MOVNTQ" %%mm0, 80(%0)\n" + MOVNTQ" %%mm0, 88(%0)\n" + MOVNTQ" %%mm0, 96(%0)\n" + MOVNTQ" %%mm0, 104(%0)\n" + MOVNTQ" %%mm0, 112(%0)\n" + MOVNTQ" %%mm0, 120(%0)\n" + :: "r" (t) : "memory"); + t+=128; + } +#endif /* Have SSE */ +//#ifdef HAVE_ASM_MMX2 +// /* since movntq is weakly-ordered, a "sfence" +// * is needed to become ordered again. */ +// __asm__ __volatile__ ("sfence":::"memory"); +//#endif +//#ifndef HAVE_ASM_SSE +// /* enables to use FPU */ +// __asm__ __volatile__ (EMMS:::"memory"); +//#endif + } + /* + * Now do the tail of the block + */ + if(len) small_memset(t, val, len); +} + + + +#if defined (HAVE_ASM_MMX) || defined( HAVE_ASM_SSE ) +/* Fast memory set. See comments for fast_memcpy */ +void * fast_memset(void * to, int val, size_t len) +{ + void *retval; + size_t i; + unsigned char mm_reg[_MMREG_SIZE], *pmm_reg; + unsigned char *t = to; + retval = to; + if(len >= _MIN_LEN) + { + register unsigned long int delta; + delta = ((unsigned long int)to)&(_MMREG_SIZE-1); + if(delta) + { + delta=_MMREG_SIZE-delta; + len -= delta; + small_memset(t, val, delta); + } + i = len >> 7; /* len/128 */ + len&=127; + pmm_reg = mm_reg; + small_memset(pmm_reg,val,sizeof(mm_reg)); +#ifdef HAVE_ASM_SSE /* Only P3 (may be Cyrix3) */ + __asm__ __volatile__( + "movups (%0), %%xmm0\n" + :: "r"(mm_reg):"memory"); + for(; i>0; i--) + { + __asm__ __volatile__ ( + "movntps %%xmm0, (%0)\n" + "movntps %%xmm0, 16(%0)\n" + "movntps %%xmm0, 32(%0)\n" + "movntps %%xmm0, 48(%0)\n" + "movntps %%xmm0, 64(%0)\n" + "movntps %%xmm0, 80(%0)\n" + "movntps %%xmm0, 96(%0)\n" + "movntps %%xmm0, 112(%0)\n" + :: "r" (t) : "memory"); + t+=128; + } +#else + __asm__ __volatile__( + "movq (%0), %%mm0\n" + :: "r"(mm_reg):"memory"); + for(; i>0; i--) + { + __asm__ __volatile__ ( + MOVNTQ" %%mm0, (%0)\n" + MOVNTQ" %%mm0, 8(%0)\n" + MOVNTQ" %%mm0, 16(%0)\n" + MOVNTQ" %%mm0, 24(%0)\n" + MOVNTQ" %%mm0, 32(%0)\n" + MOVNTQ" %%mm0, 40(%0)\n" + MOVNTQ" %%mm0, 48(%0)\n" + MOVNTQ" %%mm0, 56(%0)\n" + MOVNTQ" %%mm0, 64(%0)\n" + MOVNTQ" %%mm0, 72(%0)\n" + MOVNTQ" %%mm0, 80(%0)\n" + MOVNTQ" %%mm0, 88(%0)\n" + MOVNTQ" %%mm0, 96(%0)\n" + MOVNTQ" %%mm0, 104(%0)\n" + MOVNTQ" %%mm0, 112(%0)\n" + MOVNTQ" %%mm0, 120(%0)\n" + :: "r" (t) : "memory"); + t+=128; + } +#endif /* Have SSE */ +#ifdef HAVE_ASM_MMX2 + /* since movntq is weakly-ordered, a "sfence" + * is needed to become ordered again. */ + __asm__ __volatile__ ("sfence":::"memory"); +#endif +#ifndef HAVE_ASM_SSE + /* enables to use FPU */ + __asm__ __volatile__ (EMMS:::"memory"); +#endif + } + /* + * Now do the tail of the block + */ + if(len) small_memset(t, val, len); + return retval; +} +#endif + +static void *linux_kernel_memcpy(void *to, const void *from, size_t len) { + return __memcpy(to,from,len); +} + +#endif + +static struct { + char *name; + void *(*function)(void *to, const void *from, size_t len); + unsigned long long time; +} memcpy_method[] = +{ + { NULL, NULL, 0}, + { "glibc memcpy()", memcpy, 0}, +#if defined(ARCH_X86) || defined(ARCH_X86_64) + { "linux kernel memcpy()", linux_kernel_memcpy, 0}, +#endif +#if defined (HAVE_ASM_MMX) || defined( HAVE_ASM_SSE ) + { "MMX/MMX2/SSE optimized memcpy()", fast_memcpy, 0}, +#endif + { NULL, NULL, 0}, +}; + +static struct { + char *name; + void *(*function)(void *to, uint8_t c, size_t len); + unsigned long long time; +} memset_method[] = +{ + { NULL, NULL, 0}, + { "glibc memset()", (void*)memset, 0}, +#if defined(HAVE_ASM_MMX) || defined(HAVE_ASM_SSE) + { "MMX/MMX2/SSE optimized memset()", (void*) fast_memset, 0}, +#endif + { NULL, NULL, 0}, +}; + + + + +void *(* veejay_memcpy)(void *to, const void *from, size_t len) = 0; + +void *(* veejay_memset)(void *what, uint8_t val, size_t len ) = 0; + +char *get_memcpy_descr( void ) +{ + int i = 1; + int best = 1; + for (i=1; memcpy_method[i].name; i++) + { + if( memcpy_method[i].time <= memcpy_method[best].time ) + best = i; + } + char *res = strdup( memcpy_method[best].name ); + return res; +} + +void find_best_memcpy() +{ + /* save library size on platforms without special memcpy impl. */ + unsigned long long t; + char *buf1, *buf2; + int i, best = 0; + + if (!(buf1 = (char*) malloc( BUFSIZE * 2000 * sizeof(char) ))) + return; + + if (!(buf2 = (char*) malloc( BUFSIZE * 2000 * sizeof(char) ))) { + free( buf1 ); + return; + } + + memset(buf1,0, BUFSIZE*2000); + memset(buf2,0, BUFSIZE*2000); + + /* make sure buffers are present on physical memory */ + memcpy( buf1, buf2, BUFSIZE * 2000 ); + memcpy( buf2, buf1, BUFSIZE * 2000 ); + for (i=1; memcpy_method[i].name; i++) { + t = rdtsc(); + + memcpy_method[i].function( buf1 , buf2 , 2000 * BUFSIZE ); + + t = rdtsc() - t; + memcpy_method[i].time = t; + + if (best == 0 || t < memcpy_method[best].time) + best = i; + } + if (best) { + veejay_memcpy = memcpy_method[best].function; + } + + free( buf1 ); + free( buf2 ); +} + + + + +void find_best_memset() +{ + /* save library size on platforms without special memcpy impl. */ + unsigned long long t; + char *buf1, *buf2; + int i, best = 0; + + if (!(buf1 = (char*) malloc( BUFSIZE * 2000 * sizeof(char) ))) + return; + + if (!(buf2 = (char*) malloc( BUFSIZE * 2000 * sizeof(char) ))) { + free( buf1 ); + return; + } + + for( i = 0; i < (BUFSIZE*2000); i ++ ) + { + buf1[i] = 0; + buf2[i] = 0; + } + + for (i=1; memset_method[i].name; i++) + { + t = rdtsc(); + + memset_method[i].function( buf1 , 0 , 2000 * BUFSIZE ); + + t = rdtsc() - t; + + memset_method[i].time = t; + + if (best == 0 || t < memset_method[best].time) + best = i; + } + + if (best) { + veejay_memset = memset_method[best].function; + } + + free( buf1 ); + free( buf2 ); +} + diff --git a/veejay-server/libvjmem/vj-x86.c b/veejay-server/libvjmem/vj-x86.c new file mode 100644 index 00000000..ae4fad4a --- /dev/null +++ b/veejay-server/libvjmem/vj-x86.c @@ -0,0 +1,208 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#include +#include +#include +#include + +extern void find_best_memcpy(void); +extern void find_best_memset(void); +extern void yuyv_plane_init(); + +static int MEM_ALIGNMENT_SIZE = 0; +static int CACHE_LINE_SIZE = 16; + + +#ifdef ARCH_X86 +int has_cpuid(void) +{ + int a, c; + +// code from libavcodec: + __asm__ __volatile__ ( + /* See if CPUID instruction is supported ... */ + /* ... Get copies of EFLAGS into eax and ecx */ + "pushf\n\t" + "popl %0\n\t" + "movl %0, %1\n\t" + + /* ... Toggle the ID bit in one copy and store */ + /* to the EFLAGS reg */ + "xorl $0x200000, %0\n\t" + "push %0\n\t" + "popf\n\t" + + /* ... Get the (hopefully modified) EFLAGS */ + "pushf\n\t" + "popl %0\n\t" + : "=a" (a), "=c" (c) + : + : "cc" + ); + + return (a!=c); +} + +// copied from Mplayer (want to have cache line size detection ;) ) +void +do_cpuid(unsigned int ax, unsigned int *p) +{ +// code from libavcodec: + __asm __volatile + ("movl %%ebx, %%esi\n\t" + "cpuid\n\t" + "xchgl %%ebx, %%esi" + : "=a" (p[0]), "=S" (p[1]), + "=c" (p[2]), "=d" (p[3]) + : "0" (ax)); +} + +int get_cache_line_size() +{ + unsigned int regs[4]; + unsigned int regs2[4]; + unsigned int ret = 32; // default cache line size + + if(!has_cpuid()) + { + return ret; + } + + do_cpuid( 0x00000000, regs); // get _max_ cpuid level and vendor name + if( regs[0] >= 0x00000001) + { + do_cpuid( 0x00000001, regs2 ); + ret = (( regs2[1] >> 8) & 0xff) * 8; + return ret; + } + do_cpuid(0x80000000, regs ); + if( regs[0] >= 0x80000006) { + do_cpuid( 0x80000001, regs2 ); + ret = (regs[2] & 0xff); + return ret; + } + return ret; +} + + +void mymemset_generic(void * s, char c,size_t count) +{ +int d0, d1; +__asm__ __volatile__( + "rep\n\t" + "stosb" + : "=&c" (d0), "=&D" (d1) + :"a" (c),"1" (s),"0" (count) + :"memory"); +} + +#else +void mymemset_generic(void *s, char c, size_t cc ) +{ + memset(s,c,cc); +} +#endif + +unsigned int vj_get_timer() +{ + struct timeval tv; + gettimeofday(&tv, 0); + return ((tv.tv_sec & 1000000) + tv.tv_usec); +} + +int cpu_cache_size() +{ + return CACHE_LINE_SIZE; +} + +void vj_mem_init(void) +{ +#ifdef ARCH_X86 + CACHE_LINE_SIZE = get_cache_line_size(); +#endif + if(MEM_ALIGNMENT_SIZE == 0) + MEM_ALIGNMENT_SIZE = getpagesize(); +#if defined (HAVE_ASM_MMX) || defined (HAVE_ASM_SSE) + yuyv_plane_init(); +#endif + find_best_memcpy(); + find_best_memset(); + +} + +void *vj_malloc_(unsigned int size) +{ + if( size == 0 ) + return NULL; + void *ptr = NULL; +#ifdef HAVE_POSIX_MEMALIGN + posix_memalign( &ptr, MEM_ALIGNMENT_SIZE, size ); +#else +#ifdef HAVE_MEMALIGN + ptr = memalign( MEM_ALIGNMENT_SIZE, size ); +#else + ptr = malloc ( size ) ; +#endif +#endif + if(!ptr) + return NULL; + + return ptr; +} +#ifdef STRICT_CHECKING +void *vj_strict_malloc( unsigned int size, const char *f, int line ) +{ + veejay_msg(0, "%d\t\tbytes\t\tin %s:%d",size,f,line); + return vj_malloc_( size ); +} +#endif +void *vj_calloc_( unsigned int size ) +{ + void *ptr = vj_malloc_( size ); + if(ptr) + veejay_memset( ptr, 0, size ); + return ptr; +} +#ifdef STRICT_CHECKING +void *vj_strict_calloc( unsigned int size, const char *f, int line ) +{ + veejay_msg(0, "%d\t\tbytes\t\tin %s:%d", size,f, line ); + return vj_calloc_(size); +} +#endif +#define RUP8(num)(((num)+8)&~8) + +void *vj_yuvalloc( unsigned int w, unsigned int h ) +{ + size_t len = RUP8(w * h * 3); + unsigned char *ptr = vj_malloc( len ); + + veejay_memset( ptr, 0, (w*h)); + veejay_memset( ptr + (w*h), 128, (w*h)*2); + return ptr; +} + + + + + diff --git a/veejay-server/libvjmem/vjmem.h b/veejay-server/libvjmem/vjmem.h new file mode 100644 index 00000000..3b1fcb6b --- /dev/null +++ b/veejay-server/libvjmem/vjmem.h @@ -0,0 +1,47 @@ +/* veejay - Linux VeeJay + * (C) 2002-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef VJ_X86_H +#define VJ_X86_H + +#include +#include +#include + +extern void *(* veejay_memcpy)(void *to, const void *from, size_t len); +extern void *(* veejay_memset)(void *to, uint8_t val, size_t len); +extern void vj_mem_init(void); +extern char *get_memcpy_descr( void ); +extern void *vj_malloc_(unsigned int size); +#define vj_malloc(i) vj_malloc_(i) +extern void *vj_calloc_(unsigned int size ); +#define vj_calloc(i) vj_calloc_(i) +extern void *vj_yuvalloc( unsigned int w, unsigned int h ); +extern void fast_memset_dirty(void * to, int val, size_t len); +extern void fast_memset_finish(); +extern void packed_plane_clear( size_t len, void *to ); +extern void yuyv_plane_clear( size_t len, void *to ); +extern int cpu_cache_size(); +extern int get_cache_line_size(); +extern char *veejay_strncat( char *s1, char *s2, size_t n ); +extern char *veejay_strncpy( char *s1, const char *s2, size_t n ); +extern void yuyv_plane_init(); +extern void yuyv_plane_clear( size_t len, void *to ); + +#endif diff --git a/veejay-server/libvjmsg/Makefile.am b/veejay-server/libvjmsg/Makefile.am new file mode 100644 index 00000000..6d3f6e1b --- /dev/null +++ b/veejay-server/libvjmsg/Makefile.am @@ -0,0 +1,8 @@ +# Makefile for logging/messages +INCLUDES = -I$(top_srcdir) -I$(includedir) +AM_CLFAGS=$(OP_CFLAGS) +VJMSG_LIB_FILE = libvjmsg.la +noinst_LTLIBRARIES = $(VJMSG_LIB_FILE) +pkginclude_HEADERS = vj-msg.h +libvjmsg_la_SOURCES = vj-common.c + diff --git a/veejay-server/libvjmsg/Makefile.in b/veejay-server/libvjmsg/Makefile.in new file mode 100644 index 00000000..23b13629 --- /dev/null +++ b/veejay-server/libvjmsg/Makefile.in @@ -0,0 +1,538 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libvjmsg +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libvjmsg_la_LIBADD = +am_libvjmsg_la_OBJECTS = vj-common.lo +libvjmsg_la_OBJECTS = $(am_libvjmsg_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libvjmsg_la_SOURCES) +DIST_SOURCES = $(libvjmsg_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Makefile for logging/messages +INCLUDES = -I$(top_srcdir) -I$(includedir) +AM_CLFAGS = $(OP_CFLAGS) +VJMSG_LIB_FILE = libvjmsg.la +noinst_LTLIBRARIES = $(VJMSG_LIB_FILE) +pkginclude_HEADERS = vj-msg.h +libvjmsg_la_SOURCES = vj-common.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libvjmsg/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libvjmsg/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libvjmsg.la: $(libvjmsg_la_OBJECTS) $(libvjmsg_la_DEPENDENCIES) + $(LINK) $(libvjmsg_la_OBJECTS) $(libvjmsg_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-common.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + 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-pkgincludeHEADERS + +# 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/veejay-server/libvjmsg/vj-common.c b/veejay-server/libvjmsg/vj-common.c new file mode 100644 index 00000000..2d4f92e6 --- /dev/null +++ b/veejay-server/libvjmsg/vj-common.c @@ -0,0 +1,297 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#include +#include + +#define TXT_RED "\033[0;31m" +#define TXT_RED_B "\033[1;31m" +#define TXT_GRE "\033[0;32m" +#define TXT_GRE_B "\033[1;32m" +#define TXT_YEL "\033[0;33m" +#define TXT_YEL_B "\033[1;33m" +#define TXT_BLU "\033[0;34m" +#define TXT_BLU_B "\033[1;34m" +#define TXT_WHI "\033[0;37m" +#define TXT_WHI_B "\033[1;37m" +#define TXT_END "\033[0m" + + +static int _debug_level = 0; +static int _color_level = 1; +static int _no_msg = 0; + +#define MAX_LINES 100 +typedef struct +{ + char *msg[MAX_LINES]; + int r_index; + int w_index; +} vj_msg_hist; +/* +static vj_msg_hist _message_history; +static int _message_his_status = 0; +*/ +void veejay_set_debug_level(int level) +{ + if(level) + { + _debug_level = 1; + } + else + { + _debug_level = 0; + } +} +void veejay_set_colors(int l) +{ + if(l) _color_level = 1; + else _color_level = 0; +} + +int veejay_is_colored() +{ + return _color_level; +} + +void veejay_silent() +{ + _no_msg = 1; +} + +int veejay_is_silent() +{ + if(_no_msg) return 1; + return 0; +} + +void veejay_msg(int type, const char format[], ...) +{ + char prefix[10]; + char buf[256]; + va_list args; + int line = 0; + + FILE *out = (_no_msg ? stderr: stdout ); + + if( type != VEEJAY_MSG_ERROR && _no_msg ) + return; + + if( !_debug_level && type == VEEJAY_MSG_DEBUG ) + return ; // bye + + // parse arguments + va_start(args, format); + vsnprintf(buf, sizeof(buf) - 1, format, args); + /* + if(!_message_his_status) + { + veejay_memset( &_message_history , 0 , sizeof(vj_msg_hist)); + _message_his_status = 1; + } +*/ + if(_color_level) + { + switch (type) { + case 2: //info + sprintf(prefix, "%sI: ", TXT_GRE); + break; + case 1: //warning + sprintf(prefix, "%sW: ", TXT_YEL); + break; + case 0: // error + sprintf(prefix, "%sE: ", TXT_RED); + break; + case 3: + line = 1; + break; + case 4: // debug + sprintf(prefix, "%sD: ", TXT_BLU); + break; + } + if(!line) + fprintf(out,"%s %s %s\n", prefix, buf, TXT_END); + else + fprintf(out,"%s%s%s", TXT_GRE, buf, TXT_END ); +/* + if( _message_history.w_index < MAX_LINES ) + { + if(type == 3) + sprintf(sline, "%s", buf ); + else + sprintf( sline, "%s\n", buf ); + _message_history.msg[_message_history.w_index ++ ] = strndup(sline,200); + }*/ + } + else + { + switch (type) { + case 2: //info + sprintf(prefix, "I: "); + break; + case 1: //warning + sprintf(prefix, "W: "); + break; + case 0: // error + sprintf(prefix, "E: "); + break; + case 3: + line = 1; + break; + case 4: // debug + sprintf(prefix, "D: "); + break; + } + if(!line) + fprintf(out,"%s %s\n", prefix, buf); + else + fprintf(out,"%s", buf ); + + /* if( _message_history.w_index < MAX_LINES ) + { + if(type == 3 ) + sprintf(sline, "%s", buf ); + else + sprintf(sline, "%s\n", buf ); + _message_history.msg[_message_history.w_index ++ ] = strdup(sline); + }*/ + } + va_end(args); +} + +char *veejay_pop_messages(int *num_lines, int *total_len) +{ + char *res = NULL; +/* if( _message_his_status == 0 ) + return res; + if( _message_history.w_index == 0 ) + return res; + int i; + int len = 0; + for( i = 0; i < _message_history.w_index ; i ++ ) + len += strlen( _message_history.msg[i] ); + if(len <= 0) + return res; + + res = (char*) vj_malloc(sizeof(char) * (len+1) ); + if(!res) + return NULL; + bzero(res, len ); + *num_lines = i; + + for( i = 0; i < _message_history.w_index ; i ++ ) + { + if( strlen(_message_history.msg[i]) > 0 ) + strcat( res, _message_history.msg[i] ); + } + *total_len = len; + _message_history.r_index ++; +*/ + return res; + +} + +int veejay_keep_messages(void) +{ +/* if( _message_history.r_index ) + return 0; +*/ + return 1; +} + +void veejay_reap_messages(void) +{ +/* for( i = 0; i < _message_history.w_index ; i ++ ) + { + if( _message_history.msg[i] ) + { + free(_message_history.msg[i] ); + _message_history.msg[i] = NULL; + } + } + + _message_his_status = 0; + _message_history.w_index = 0; +*/ +} + +int veejay_get_file_ext( char *file, char *dst, int dlen) +{ + int len = strlen(file)-1; + int i = 0; + char tmp[dlen]; + bzero(tmp,dlen); + while(len) + { + if(file[len] == '.') + { + if(i==0) return 0; + int j; + int k = 0; + for(j = i-1; j >= 0;j--) + { + dst[k] = tmp[j]; + k ++; + } + return 1; + } + tmp[i] = file[len]; + i++; + if( i >= dlen) + return 0; + len --; + } + return 0; +} + +void veejay_strrep(char *s, char delim, char tok) +{ + unsigned int i; + unsigned int len = strlen(s); + if(!s) return; + for(i=0; i < len; i++) + { + if( s[i] == delim ) s[i] = tok; + } +} + +void veejay_chomp_str( char *msg, int *nlen ) +{ + int len = strlen( msg ) - 1; + if(len > 0 ) + { + if( msg[len] == '\n' ) + { + msg[len] = '\0'; + *nlen = len; + } + } +} + +void report_bug(void) +{ + veejay_msg(VEEJAY_MSG_WARNING, "Please report this error to http://groups.google.com/group/veejay-discussion?hl=en"); + veejay_msg(VEEJAY_MSG_WARNING, "You can also use our mailinglist: veejay-users@lists.sourceforge.net"); + veejay_msg(VEEJAY_MSG_WARNING, "Send at least veejay's output and include the command(s) you have used to start it."); + veejay_msg(VEEJAY_MSG_WARNING, "If you compiled it yourself, please include information about your system."); +} + diff --git a/veejay-server/libvjmsg/vj-msg.h b/veejay-server/libvjmsg/vj-msg.h new file mode 100644 index 00000000..9cff6cef --- /dev/null +++ b/veejay-server/libvjmsg/vj-msg.h @@ -0,0 +1,45 @@ +/* veejay - Linux VeeJay + * (C) 2002-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_COMMON_H +#define VJ_COMMON_H +#include +#include + +enum { + VEEJAY_MSG_INFO = 2, + VEEJAY_MSG_WARNING = 1, + VEEJAY_MSG_ERROR = 0, + VEEJAY_MSG_PRINT = 3, + VEEJAY_MSG_DEBUG = 4, +}; + +extern void veejay_strrep(char *s, char delim, char tok); +extern void report_bug(); +extern void veejay_msg(int type, const char format[], ...); +extern int veejay_is_colored(); +extern void veejay_set_debug_level(int level); +extern void veejay_set_colors(int level); +extern void veejay_silent(); +extern int veejay_is_silent(); +extern int veejay_keep_messages(void); +extern void veejay_reap_messages(void); +extern char *veejay_pop_messages(int *num_lines, int *total_len); +extern int veejay_get_file_ext( char *file, char *dst, int dlen); +extern void veejay_chomp_str( char *str, int *dlen ); +#endif diff --git a/veejay-server/libvjnet/Makefile.am b/veejay-server/libvjnet/Makefile.am new file mode 100644 index 00000000..2e0137e1 --- /dev/null +++ b/veejay-server/libvjnet/Makefile.am @@ -0,0 +1,9 @@ +# Makefile for veejay + +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/libyuv -I$(top_srcdir)/liblzo -I$(top_srcdir)/vjmem -I$(top_srcdir)/vjmsg +VJNET_LIB_FILE = libvjnet.la +pkginclude_HEADERS = vj-client.h +noinst_LTLIBRARIES = $(VJNET_LIB_FILE) +libvjnet_la_SOURCES = packet.c mcastsender.c mcastreceiver.c cmd.c vj-server.c vj-client.c diff --git a/veejay-server/libvjnet/Makefile.in b/veejay-server/libvjnet/Makefile.in new file mode 100644 index 00000000..6084b5c5 --- /dev/null +++ b/veejay-server/libvjnet/Makefile.in @@ -0,0 +1,546 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Makefile for veejay + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libvjnet +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libvjnet_la_LIBADD = +am_libvjnet_la_OBJECTS = packet.lo mcastsender.lo mcastreceiver.lo \ + cmd.lo vj-server.lo vj-client.lo +libvjnet_la_OBJECTS = $(am_libvjnet_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libvjnet_la_SOURCES) +DIST_SOURCES = $(libvjnet_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/libyuv -I$(top_srcdir)/liblzo -I$(top_srcdir)/vjmem -I$(top_srcdir)/vjmsg +VJNET_LIB_FILE = libvjnet.la +pkginclude_HEADERS = vj-client.h +noinst_LTLIBRARIES = $(VJNET_LIB_FILE) +libvjnet_la_SOURCES = packet.c mcastsender.c mcastreceiver.c cmd.c vj-server.c vj-client.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libvjnet/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libvjnet/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libvjnet.la: $(libvjnet_la_OBJECTS) $(libvjnet_la_DEPENDENCIES) + $(LINK) $(libvjnet_la_OBJECTS) $(libvjnet_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcastreceiver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcastsender.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-client.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-server.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + 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-pkgincludeHEADERS + +# 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/veejay-server/libvjnet/bswap.h b/veejay-server/libvjnet/bswap.h new file mode 100644 index 00000000..864bedfd --- /dev/null +++ b/veejay-server/libvjnet/bswap.h @@ -0,0 +1,126 @@ +#ifndef __BSWAP_H__ +#define __BSWAP_H__ + +#ifdef HAVE_BYTESWAP_H +#include +#else + +#include + +#ifdef ARCH_X86 +static inline unsigned short ByteSwap16(unsigned short x) +{ + __asm("xchgb %b0,%h0" : + "=q" (x) : + "0" (x)); + return x; +} +#define bswap_16(x) ByteSwap16(x) + +static inline unsigned int ByteSwap32(unsigned int x) +{ +#if __CPU__ > 386 + __asm("bswap %0": + "=r" (x) : +#else + __asm("xchgb %b0,%h0\n" + " rorl $16,%0\n" + " xchgb %b0,%h0": + "=q" (x) : +#endif + "0" (x)); + return x; +} +#define bswap_32(x) ByteSwap32(x) + +static inline unsigned long long int ByteSwap64(unsigned long long int x) +{ + register union { __extension__ uint64_t __ll; + uint32_t __l[2]; } __x; + asm("xchgl %0,%1": + "=r"(__x.__l[0]),"=r"(__x.__l[1]): + "0"(bswap_32((unsigned long)x)),"1"(bswap_32((unsigned long)(x>>32)))); + return __x.__ll; +} +#define bswap_64(x) ByteSwap64(x) + +#elif defined(ARCH_SH4) + +static inline uint16_t ByteSwap16(uint16_t x) { + __asm__("swap.b %0,%0":"=r"(x):"0"(x)); + return x; +} + +static inline uint32_t ByteSwap32(uint32_t x) { + __asm__( + "swap.b %0,%0\n" + "swap.w %0,%0\n" + "swap.b %0,%0\n" + :"=r"(x):"0"(x)); + return x; +} + +#define bswap_16(x) ByteSwap16(x) +#define bswap_32(x) ByteSwap32(x) + +static inline uint64_t ByteSwap64(uint64_t x) +{ + union { + uint64_t ll; + struct { + uint32_t l,h; + } l; + } r; + r.l.l = bswap_32 (x); + r.l.h = bswap_32 (x>>32); + return r.ll; +} +#define bswap_64(x) ByteSwap64(x) + +#else + +#define bswap_16(x) (((x) & 0x00ff) << 8 | ((x) & 0xff00) >> 8) + + +// code from bits/byteswap.h (C) 1997, 1998 Free Software Foundation, Inc. +#define bswap_32(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) + +static inline uint64_t ByteSwap64(uint64_t x) +{ + union { + uint64_t ll; + uint32_t l[2]; + } w, r; + w.ll = x; + r.l[0] = bswap_32 (w.l[1]); + r.l[1] = bswap_32 (w.l[0]); + return r.ll; +} +#define bswap_64(x) ByteSwap64(x) + +#endif /* !ARCH_X86 */ + +#endif /* !HAVE_BYTESWAP_H */ + +// be2me ... BigEndian to MachineEndian +// le2me ... LittleEndian to MachineEndian + +#ifdef WORDS_BIGENDIAN +#define be2me_16(x) (x) +#define be2me_32(x) (x) +#define be2me_64(x) (x) +#define le2me_16(x) bswap_16(x) +#define le2me_32(x) bswap_32(x) +#define le2me_64(x) bswap_64(x) +#else +#define be2me_16(x) bswap_16(x) +#define be2me_32(x) bswap_32(x) +#define be2me_64(x) bswap_64(x) +#define le2me_16(x) (x) +#define le2me_32(x) (x) +#define le2me_64(x) (x) +#endif + +#endif /* __BSWAP_H__ */ diff --git a/veejay-server/libvjnet/cmd.c b/veejay-server/libvjnet/cmd.c new file mode 100644 index 00000000..75d2bf5c --- /dev/null +++ b/veejay-server/libvjnet/cmd.c @@ -0,0 +1,266 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include "cmd.h" +#include +#ifdef STRICT_CHECKING +#include +#endif +vj_sock_t *alloc_sock_t(void) +{ + vj_sock_t *s = (vj_sock_t*) malloc(sizeof(vj_sock_t)); + if(!s) return NULL; + return s; +} + +void sock_t_free(vj_sock_t *s ) +{ + if(s) free(s); +} + +int sock_t_connect( vj_sock_t *s, char *host, int port ) +{ + s->he = gethostbyname( host ); + if(s->he==NULL) + return 0; + s->sock_fd = socket( AF_INET, SOCK_STREAM , 0); + if(s->sock_fd < 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Socket error with Veejay host %s:%d %s ", host,port,strerror(errno)); + return 0; + } + s->port_num = port; + s->addr.sin_family = AF_INET; + s->addr.sin_port = htons( port ); + s->addr.sin_addr = *( (struct in_addr*) s->he->h_addr ); + + if( connect( s->sock_fd, (struct sockaddr*) &s->addr, + sizeof( struct sockaddr )) == -1 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Connection error with Veejay host %s:%d %s", + host, port, strerror(errno)); + return 0; + } + unsigned int tmp = sizeof(int); + if( getsockopt( s->sock_fd , SOL_SOCKET, SO_SNDBUF, (unsigned char*) &(s->send_size), &tmp) < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to get buffer size for output: %s", strerror(errno)); + return 0; + } + if( getsockopt( s->sock_fd, SOL_SOCKET, SO_RCVBUF, (unsigned char*) &(s->recv_size), &tmp) < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to get buffer size for input: %s", strerror(errno)); + return 0; + } + + return 1; +} + +int sock_t_poll_w(vj_sock_t *s ) +{ + int status; + fd_set fds; + struct timeval no_wait; + memset( &no_wait, 0, sizeof(no_wait) ); + + FD_ZERO( &fds ); + FD_SET( s->sock_fd, &fds ); + + status = select( s->sock_fd + 1,NULL, &fds, NULL, &no_wait ); + if( status < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to poll socket for immediate write: %s", strerror(errno)); + return 0; + } + if( status == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Timeout occured"); + return 0; + } + + if( FD_ISSET( s->sock_fd, &fds )) + { + return 1; + } + + return 0; +} + + +int sock_t_poll( vj_sock_t *s ) +{ + int status; + fd_set fds; + struct timeval no_wait; + memset( &no_wait, 0, sizeof(no_wait) ); + + FD_ZERO( &fds ); + FD_SET( s->sock_fd, &fds ); + + status = select( s->sock_fd + 1, &fds, 0, 0, &no_wait ); + if( status < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to poll socket for immediate read: %s", strerror(errno)); + return 0; + } + if( FD_ISSET( s->sock_fd, &fds ) ) + { + return 1; + } + return 0; +} + +int sock_t_recv_w( vj_sock_t *s, void *dst, int len ) +{ + int n = 0; + if( len < s->recv_size ) + { + n = recv( s->sock_fd, dst, len, MSG_WAITALL ); + if(n==-1) + { + veejay_msg(VEEJAY_MSG_ERROR, "%s", strerror(errno)); + return -1; + } + return n; + } + else + { + int done = 0; + int bytes_left = s->recv_size; + + while( done < len ) + { + n = recv( s->sock_fd, dst + done,bytes_left,MSG_WAITALL ); + if( n == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "%s",strerror(errno)); + return -1; + } + done += n; + + if( (len-done) < s->recv_size) + bytes_left = len - done; + } + return done; + } + return 0; +} + +int sock_t_recv( vj_sock_t *s, void *dst, int len ) +{ + int n = recv( s->sock_fd, dst, len , 0 ); + if(n==-1) + { + veejay_msg(VEEJAY_MSG_ERROR, "%s", strerror(errno)); + return -1; + } + return n; +} + +int sock_t_send( vj_sock_t *s, unsigned char *buf, int len ) +{ + int n; +#ifdef STRICT_CHECKING + assert( buf != NULL ); +#endif + //@ send in reasonable chunks + if( len < s->send_size ) + { + n = send(s->sock_fd,buf,len, 0 ); + if( n == -1 ) + { + veejay_msg(0, "Send error: %s",strerror(errno)); + veejay_msg(0, "\t[%s], %d bytes", buf,len ); + return 0; + } + return n; + } + else + { + int done = 0; + int bs = s->send_size; + while( done < len ) + { + n = send( s->sock_fd, buf + done, bs , 0 ); + if(n == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "TCP send error: %s", strerror(errno)); + return 0; + } + done += n; + } + return done; + } + return 0; +} + +int sock_t_send_fd( int fd, int send_size, unsigned char *buf, int len ) +{ + int n; +#ifdef STRICT_CHECKING + assert( buf != NULL ); +#endif + + //@ send in reasonable chunks + if( len < send_size ) + { + n = send(fd,buf,len, 0 ); + if( n == -1 ) + { + veejay_msg(0, "Send error: %s",strerror(errno)); + return 0; + } + return n; + } + else + { + int done = 0; + int bytes_left = len; + while( done < len ) + { + n = send( fd, buf + done, bytes_left , 0 ); + if(n == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "TCP send error: %s", strerror(errno)); + return 0; + } + bytes_left -= n; + done += n; + } +#ifdef STRICT_CHECKING + assert( done == len ); +#endif + return done; + } + return 0; +} + +void sock_t_close( vj_sock_t *s ) +{ + if(s) + { + close(s->sock_fd); + } +} diff --git a/veejay-server/libvjnet/cmd.h b/veejay-server/libvjnet/cmd.h new file mode 100644 index 00000000..bc3b96e1 --- /dev/null +++ b/veejay-server/libvjnet/cmd.h @@ -0,0 +1,50 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef CMD_H_INCLUDED +#define CMD_H_INCLUDED +#include +#include +#include +#include +#include +typedef struct +{ + struct hostent *he; + struct sockaddr_in addr; + int sock_fd; + int port_num; + unsigned char *sbuf; + int send_size; + int recv_size; +} vj_sock_t; + +vj_sock_t *alloc_sock_t(void); +void sock_t_free(vj_sock_t *s); +int sock_t_connect( vj_sock_t *s, char *host, int port ); +int sock_t_poll_w(vj_sock_t *s); +int sock_t_poll( vj_sock_t *s ); +int sock_t_recvw(vj_sock_t *s, void *dst, int len ); +int sock_t_recv( vj_sock_t *s, void *dst, int len ); +int sock_t_recv_w( vj_sock_t *s, void *dst, int len ); +int sock_t_recv_w1( vj_sock_t *s, void *dst, int len ); +int sock_t_send( vj_sock_t *s, unsigned char *buf, int len ); +int sock_t_send_fd( int fd, int sndsize, unsigned char *buf, int len ); +void sock_t_close( vj_sock_t *s ); +#endif diff --git a/veejay-server/libvjnet/dummy.c b/veejay-server/libvjnet/dummy.c new file mode 100644 index 00000000..28425bcc --- /dev/null +++ b/veejay-server/libvjnet/dummy.c @@ -0,0 +1,92 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* + + very dumb server test code + +*/ +#include +#include "vj-server.h" + +int main( int argc, char *argv[] ) +{ + + vj_server *s = vj_server_alloc( 5000, NULL, V_CMD); + vj_server *k = vj_server_alloc( 5001, NULL, V_STATUS ); + int frame = 0; + + veejay_set_debug_level(4); + + while(1) + { + char status[30]; + int status_len; + sprintf(status, "%d %d %d", frame,frame,frame); + frame++; + status_len = strlen(status); + if( vj_server_poll(s) ) + { + int i; + if(!vj_server_new_connection( s )) + { + int res; + for(i = 0; i < s->nr_of_links; i ++ ) + { + res = vj_server_update(s, i ); + if( res == -1 ) + { + _vj_server_del_client( k, i ); + } + + if( res > 0 ) + { + char tmp[4096]; + bzero(tmp,4096); + while( vj_server_retrieve_msg(s,i, tmp ) ) + { + printf("recv [%s]\n", tmp ); + } + } + } + } + } + + + if( vj_server_poll(k) ) + { + + if(!vj_server_new_connection( k )) + { + int j ; + if( k->nr_of_links > 0 ) + for( j = 0; j < k->nr_of_links ; j ++ ) + vj_server_send( k, j, status, status_len ); + + } + + } + + usleep(40000); + } + vj_server_shutdown( s ); + + + return 0; +} diff --git a/veejay-server/libvjnet/mcastreceiver.c b/veejay-server/libvjnet/mcastreceiver.c new file mode 100644 index 00000000..0786e07f --- /dev/null +++ b/veejay-server/libvjnet/mcastreceiver.c @@ -0,0 +1,450 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mcastreceiver.h" +#include +#include +#include +#include +#include "packet.h" +#include +#ifdef STRICT_CHECKING +#include +#endif + +static void print_error(char *msg) +{ + veejay_msg(VEEJAY_MSG_ERROR,"%s: %s\n", msg,strerror(errno)); +} + +typedef struct +{ + packet_header_t hdr; + frame_info_t inf; + uint8_t *buf; + uint16_t *packets; +} packet_buffer_t; + +static void *mcast_packet_buffer_new( packet_header_t *header, frame_info_t *info, uint8_t *data ) +{ +#ifdef STRICT_CHECKING + assert( header->length > 0 ); +#endif + packet_buffer_t *pb = (packet_buffer_t*) vj_malloc(sizeof(packet_buffer_t)); + veejay_memcpy( &(pb->hdr), header, sizeof(packet_header_t)); + veejay_memcpy( &(pb->inf), info, sizeof(frame_info_t)); + pb->buf = vj_malloc( sizeof(uint8_t) * CHUNK_SIZE * header->length ); + pb->packets = vj_malloc( sizeof(uint16_t) * header->length ); + veejay_memcpy( pb->buf + ( header->seq_num * CHUNK_SIZE), data + ( + sizeof(packet_header_t) + sizeof(frame_info_t)), CHUNK_SIZE ); +#ifdef STRICT_CHECKING + assert( (sizeof(packet_header_t) + sizeof(frame_info_t) + CHUNK_SIZE ) == PACKET_PAYLOAD_SIZE); +#endif + pb->packets[ header->seq_num ] = 1; + return (void*) pb; +} + +static void mcast_packet_buffer_release( void *dat ) +{ + packet_buffer_t *pb = (packet_buffer_t*) dat; + if(pb) + { + if(pb->buf) free(pb->buf); + if(pb->packets) free(pb->packets); + free(pb); + } + pb = NULL; +} + +static int mcast_packet_buffer_next( void *dat, packet_header_t *hdr ) +{ + packet_buffer_t *pb = (packet_buffer_t*) dat; + if( pb->hdr.usec == hdr->usec ) + return 1; + return 0; +} + +static int mcast_packet_buffer_full(void *dst) +{ + packet_buffer_t *pb = (packet_buffer_t*) dst; + unsigned int i; + int res = 0; + for(i = 0; i < pb->hdr.length; i ++ ) + if( pb->packets[i]) res ++; + return ( res >= pb->hdr.length ? 1 : 0 ); +} + +static void mcast_packet_buffer_store( void *dat,packet_header_t *hdr, uint8_t *chunk ) +{ + packet_buffer_t *pb = (packet_buffer_t*) dat; + veejay_memcpy( pb->buf + (CHUNK_SIZE * hdr->seq_num ), chunk + + ( sizeof(packet_header_t) + sizeof(frame_info_t) ), + CHUNK_SIZE ); + pb->packets[ hdr->seq_num ] = 1; +} +static int mcast_packet_buffer_fill( void *dat, int *packet_len, uint8_t *buf ) +{ + packet_buffer_t *pb = (packet_buffer_t*) dat; + unsigned int i; + unsigned int packet = 0; + for( i = 0; i < pb->hdr.length ; i ++ ) + { + if( pb->packets[i] ) + { + veejay_memcpy( buf + (CHUNK_SIZE * i ), pb->buf + (CHUNK_SIZE *i), CHUNK_SIZE ); + packet++; + } + } + *packet_len = pb->inf.len; + + return packet; +} + +mcast_receiver *mcast_new_receiver( const char *group_name, int port ) +{ + mcast_receiver *v = (mcast_receiver*) vj_calloc(sizeof(mcast_receiver)); + if(!v) return NULL; + int on = 1; + struct ip_mreq mcast_req; + + veejay_memset( &mcast_req, 0, sizeof(mcast_req )); + veejay_memset( &(v->addr), 0, sizeof(struct sockaddr_in) ); + v->group = (char*) strdup( group_name ); + v->port = port; + + v->sock_fd = socket( AF_INET, SOCK_DGRAM, 0 ); + if(v->sock_fd < 0) + { + veejay_msg(0, "Unable to get a datagram socket: %s", strerror(errno)); + if(v->group) free(v->group); + if(v) free(v); + return NULL; + } + +#ifdef SO_REUSEADDR + if ( setsockopt( v->sock_fd, SOL_SOCKET, SO_REUSEADDR, &on,sizeof(on))<0) + { + veejay_msg(0, "Unable to set SO_REUSEADDR: %s", strerror(errno)); + if(v->group) free(v->group); + if(v) free(v); + return NULL; + } +#endif +#ifdef SO_REUSEPORT + if ( setsockopt( v->sock_fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on))<0) + { + veejay_msg(0, "Unable to set SO_REUSEPORT: %s", strerror(errno)); + if(v->group) free(v->group); + if(v) free(v); + return NULL; + } +#endif + + v->addr.sin_addr.s_addr = htonl( INADDR_ANY ); + v->addr.sin_port = htons( v->port ); + + if( bind( v->sock_fd, (struct sockaddr*) &(v->addr), sizeof(struct sockaddr_in))<0) + { + veejay_msg(0, "Unable to bind to port %d : %s", v->port, strerror(errno)); + if(v->group) free(v->group); + if(v) free(v); + return NULL; + } + mcast_req.imr_multiaddr.s_addr = inet_addr( v->group ); + mcast_req.imr_interface.s_addr = htonl( INADDR_ANY ); + if( setsockopt( v->sock_fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mcast_req, + sizeof(mcast_req) ) < 0 ) + { + veejay_msg(0, "Unable to join multicast group %s (port=%d)",group_name,port, strerror(errno)); + if(v->group) free(v->group); + if(v) free(v); + return NULL; + } + + return v; +} +int mcast_receiver_set_peer( mcast_receiver *v, const char *hostname ) +{ + struct hostent *host; + host = gethostbyname( hostname ); + if(host) + { + v->addr.sin_family = host->h_addrtype; + if( host->h_length > (int) sizeof(v->addr.sin_addr)) + host->h_length = sizeof( v->addr.sin_addr ); + memcpy( &(v->addr.sin_addr), host->h_addr, host->h_length ); + } + else + { + v->addr.sin_family = AF_INET; + if( !inet_aton( hostname, &(v->addr.sin_addr) ) ) + { + veejay_msg(0, "Invalid host '%s'", hostname ); + return 0; + } + } + return 1; +} + +int mcast_poll( mcast_receiver *v ) +{ +#ifdef STRICT_CHECKING + assert( v != NULL ); +#endif + fd_set fds; + struct timeval tv; + memset( &tv, 0, sizeof(tv) ); + FD_ZERO( &fds ); + FD_SET( v->sock_fd, &fds ); + + if( select( v->sock_fd + 1, &fds, 0,0, &tv ) <= 0 ) + return 0; + return 1; +} + +static int mcast_poll_timeout( mcast_receiver *v, long timeout ) +{ + fd_set fds; + struct timeval tv; + int n = 0; + tv.tv_sec = 0; + tv.tv_usec = timeout; // 0.05 seconds + FD_ZERO( &fds ); + FD_SET( v->sock_fd, &fds ); + + if( timeout == 0 ) + n = select( v->sock_fd + 1, &fds, NULL,NULL, NULL ); + else + n = select( v->sock_fd + 1, &fds, 0,0, &tv ); + if(n == -1) + veejay_msg(0, "Multicast receiver select error: %s", strerror(errno)); + + if( n <= 0) + return 0; + + return 1; +} + + + +int mcast_recv( mcast_receiver *v, void *buf, int len ) +{ + int n = recv( v->sock_fd, buf, len, 0 ); + if ( n == -1 ) + veejay_msg(0, "Multicast receive error: %s", strerror(errno)); + + return n; +} + +#define dequeue_packet()\ +{\ +res = recv(v->sock_fd, chunk, PACKET_PAYLOAD_SIZE, 0 );\ +if( res == -1)\ +{\ + veejay_msg(0, "mcast receiver: %s", strerror(errno));\ + return 0;\ +}\ +} + +int mcast_recv_frame( mcast_receiver *v, uint8_t *linear_buf, int total_len, int cw, int ch, int cfmt, + int *dw, int *dh, int *dfmt ) +{ + uint32_t sec,usec; + int i=0; + int tb=0; + uint8_t chunk[PACKET_PAYLOAD_SIZE]; + packet_header_t header; + frame_info_t info; + + veejay_memset(&header,0,sizeof(packet_header_t)); + + int res = 0; + int n_packet = 0; + int total_recv = 0; + int packet_len = CHUNK_SIZE; + int nos =0; + + if( mcast_poll_timeout( v, header.timeout ) == 0 ) + { + return 0; + } + + packet_buffer_t *queued_packets = (packet_buffer_t*) v->next; + + while( total_recv < packet_len ) + { + int put_data = 1; + res = recv(v->sock_fd, chunk, PACKET_PAYLOAD_SIZE, MSG_PEEK ); + if( res <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error receiving multicast packet:%s", strerror(errno)); + return 0; + } +#ifdef STRICT_CHECKING + assert( res == PACKET_PAYLOAD_SIZE ); +#endif + packet_header_t hdr = packet_get_header( chunk ); + frame_info_t inf; + packet_get_info(&inf,chunk ); + + if( n_packet == 0 ) // is this the first packet we get? + { + if( queued_packets ) // if there are queued (future) packets, + { + // empty next packet buffer + if( queued_packets->hdr.usec == hdr.usec ) + { + n_packet = mcast_packet_buffer_fill(v->next, &packet_len, linear_buf); + total_recv = n_packet * CHUNK_SIZE; + veejay_memcpy(&header, &(queued_packets->hdr), sizeof(packet_header_t)); + veejay_memcpy(&info, &(queued_packets->inf), sizeof(frame_info_t)); + // veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d dequeuing packet with timestamp %x in next buffer (ts=%x,length=%d,len=%d, packets=%d)", + // __FUNCTION__,__LINE__, hdr.usec, queued_packets->hdr.usec, queued_packets->hdr.length, queued_packets->inf.len, n_packet ); + } + else + { + //@ there are queued packets, but not the expected ones. + //@ destroy packet buffer + // veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d packet with timestamp %x arrived (queued=%x, reset. grab new)", + // __FUNCTION__,__LINE__, hdr.usec, queued_packets->hdr.usec ); + mcast_packet_buffer_release(v->next); + queued_packets = NULL; + v->next = NULL; + packet_len = info.len; + veejay_memcpy( &header,&hdr, sizeof(packet_header_t)); + veejay_memcpy( &info, &inf, sizeof(frame_info_t)); + total_recv = 0; + } + } + else + { + // veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d Queuing first packet %d/%d, data_len=%d", + // __FUNCTION__,__LINE__, n_packet, hdr.length, info.len ); + packet_len = inf.len; + veejay_memcpy(&header,&hdr,sizeof(packet_header_t)); + veejay_memcpy(&info, &inf, sizeof(frame_info_t)); + total_recv = 0; + } + } + + + if( header.usec != hdr.usec ) + { + if( hdr.usec < header.usec ) + { + put_data = 0; + // veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d dropped packet (too old timestamp %x)", __FUNCTION__,__LINE__,header.usec); + } + else + { + //@ its newer! + // + if(!v->next) // nothing stored yet + { + v->next = mcast_packet_buffer_new( &hdr, &inf, chunk ); + + // veejay_msg(VEEJAY_MSG_DEBUG,"%s:%d Stored packet with timestamp %x (processing %x)", + // __FUNCTION__,__LINE__, hdr.usec, header.usec ); + + } + else + { + // store packet if next buffer has identical timestamp + if( mcast_packet_buffer_next( v->next, &hdr ) ) + { + // veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d packet buffer STORE future frame (ts=%x)", __FUNCTION__,__LINE__, hdr.usec ); + mcast_packet_buffer_store( v->next, &hdr,chunk ); + put_data = 0; + } + else + { + // release packet buffer and start queueing new frames only + // veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d packet buffer release, storing newest packets",__FUNCTION__,__LINE__ ); + + if( mcast_packet_buffer_full( v->next )) + { + n_packet = mcast_packet_buffer_fill(v->next, &packet_len, linear_buf); + total_recv = n_packet * CHUNK_SIZE; + return packet_len; + } + + mcast_packet_buffer_release(v->next); + v->next = NULL; + total_recv = 0; n_packet = 0; packet_len = inf.len; + veejay_memcpy(&header,&hdr,sizeof(packet_header_t)); + put_data = 1; + } + + } + } + } + + dequeue_packet(); + + + if( put_data ) + { + uint8_t *dst; + dst = linear_buf + (CHUNK_SIZE * hdr.seq_num ); + packet_get_data( &hdr, chunk, dst ); + total_recv += CHUNK_SIZE; + n_packet ++; + } + + if( n_packet >= header.length ) + { +// veejay_msg(VEEJAY_MSG_DEBUG, "%s:%d Have full frame",__FUNCTION__,__LINE__); + break; + } + + } + +#ifdef STRICT_CHECKING + assert( total_recv >= packet_len ); +#endif + *dw = info.width; + *dh = info.height; + *dfmt = info.fmt; + + return packet_len; +} + + +void mcast_close_receiver( mcast_receiver *v ) +{ + if(v) + { + close(v->sock_fd); + if(v->group) free(v->group); + v->group = NULL; + } +} diff --git a/veejay-server/libvjnet/mcastreceiver.h b/veejay-server/libvjnet/mcastreceiver.h new file mode 100644 index 00000000..eda68b42 --- /dev/null +++ b/veejay-server/libvjnet/mcastreceiver.h @@ -0,0 +1,59 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef MCASTRECEIVER_H +#define MCASTRECEIVER_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +typedef struct +{ + char *group; + int addr_len; + struct sockaddr_in addr; + int port; + int sock_fd; + int recv_buf_size; + uint8_t *space; + int space_len; + void *next; +} mcast_receiver; + +mcast_receiver *mcast_new_receiver( const char *group_name, int port ); + +int mcast_poll( mcast_receiver *v ); + +int mcast_recv( mcast_receiver *v, void *dst, int len ); + +int mcast_recv_frame( mcast_receiver *v, uint8_t *linear_buf , int total_len, int cw, int ch, int fmt, + int *dw, int *dh, int *df); + +void mcast_close_receiver( mcast_receiver *v ); + +int mcast_receiver_set_peer( mcast_receiver *v, const char *hostname ); + +#endif diff --git a/veejay-server/libvjnet/mcastsender.c b/veejay-server/libvjnet/mcastsender.c new file mode 100644 index 00000000..efa41a2d --- /dev/null +++ b/veejay-server/libvjnet/mcastsender.c @@ -0,0 +1,240 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include "mcastsender.h" +#include +#include +#include +#include +#include +#include +#include +#include "packet.h" +#ifdef STRICT_CHECKING +#include +#endif + +static void print_error(char *msg) +{ + veejay_msg(VEEJAY_MSG_ERROR, "%s: %s", msg,strerror(errno)); +} + +mcast_sender *mcast_new_sender( const char *group_name ) +{ + int on = 1; + uint8_t ttl = 1; + mcast_sender *v = (mcast_sender*) malloc(sizeof(mcast_sender)); + if(!v) return NULL; + v->group = (char*)strdup( group_name ); + v->addr.sin_addr.s_addr = inet_addr( v->group ); + v->addr.sin_port = htons( 0 ); + v->addr_len = sizeof( struct sockaddr_in ); + v->sock_fd = socket( AF_INET, SOCK_DGRAM, 0 ); + v->send_buf_size = 240 * 1024; + v->stamp = 0; + if( v->sock_fd == -1 ) + { + print_error( "socket"); + if(v) free(v); + return NULL; + } + +#ifdef SO_REUSEADDR + if( setsockopt( v->sock_fd, SOL_SOCKET, SO_REUSEADDR, &on,sizeof(on))<0 ) + { + print_error("SO_REUSEADDR"); + if(v) free(v); + return NULL; + } +#endif +#ifdef SO_REUSEPORT + if( setsockopt( v->sock_fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)) < 0 ) + { + print_error("SO_REUSEPORT"); + if(v) free(v); + return NULL; + } +#endif + if( setsockopt( v->sock_fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0 ) + { + print_error("IP_MULTICAST_TTL"); + if(v) free(v); + return NULL; + } + +// if( setsockopt( v->sock_fd, SOL_SOCKET, SO_SNDBUF, &(v->send_buf_size), sizeof(int)) < 0 ) +// { +// print_error("so_sndbuf"); +// } + +// if( getsockopt( v->sock_fd, SOL_SOCKET, SO_SNDBUF, &(v->send_buf_size), +// sizeof(int)) < 0 ) +// print_error(); + + return v; +} + +int mcast_sender_set_peer( mcast_sender *v, const char *hostname ) +{ + struct hostent *host; + host = gethostbyname( hostname ); + if(host) + { + v->addr.sin_family = host->h_addrtype; + if( host->h_length > (int) sizeof(v->addr.sin_addr)) + host->h_length = sizeof( v->addr.sin_addr ); + memcpy( &(v->addr.sin_addr), host->h_addr, host->h_length ); + } + else + { + v->addr.sin_family = AF_INET; + if( !inet_aton( hostname, &(v->addr.sin_addr) ) ) + { + print_error(" unknown host"); + return 0; + } + } + return 1; +} + +void mcast_set_interface( mcast_sender *v, const char *interface ) +{ + struct sockaddr_in if_addr; + memset( &if_addr, 0, sizeof(if_addr) ); + + v->addr.sin_addr.s_addr = inet_addr( interface ); + v->addr.sin_family = AF_INET; + + if( setsockopt( v->sock_fd, IPPROTO_IP, IP_MULTICAST_IF, &if_addr, sizeof(if_addr) ) < 0 ) + print_error("IP_MULTICAST_IF"); +} + +int mcast_send( mcast_sender *v, const void *buf, int len, int port_num ) +{ + int n ; + v->addr.sin_port = htons( port_num ); + + n = sendto( v->sock_fd, buf, len, 0, (struct sockaddr*) &(v->addr), v->addr_len ); + + if( n == -1 ) + { + char msg[100]; + sprintf(msg, "mcast send -> %d", + port_num ); + print_error(msg); + } + + return n; +} + +static void stamp_reset( mcast_sender *v ) +{ + v->stamp = 0; +} + +static uint32_t stamp_make( mcast_sender *v ) +{ + v->stamp ++; + return v->stamp; +} + +int mcast_send_frame( mcast_sender *v, const VJFrame *frame, + uint8_t *buf, int total_len, long ms,int port_num) +{ + int n_chunks = total_len / CHUNK_SIZE; + int i; + int tb = 0; + packet_header_t header = packet_construct_header( 1 ); + frame_info_t info; + info.fmt = frame->format; + info.width = frame->width; + info.height = frame->height; + info.len = total_len; + + uint32_t frame_num = stamp_make(v); + + header.timeout = ms * 1000; + header.usec = frame_num; + + uint8_t chunk[PACKET_PAYLOAD_SIZE]; + int res = 0; + + //@ If we can send in a single packet: + if( total_len <= CHUNK_SIZE ) + { + header.seq_num = 0; header.flag = 1; header.length = 1; + packet_put_padded_data( &header,&info, chunk, buf, total_len); + res = mcast_send( v, chunk, PACKET_PAYLOAD_SIZE, port_num ); + if(res <= 0 ) + return -1; + return 1; + } + + + int pred_chunks = (total_len / CHUNK_SIZE); + int bytes_left = (total_len % CHUNK_SIZE); + + header.length = pred_chunks + ( bytes_left > 0 ? 1 : 0 ); + + for( i = 0; i < pred_chunks; i ++ ) + { + const uint8_t *data = buf + (i * CHUNK_SIZE); + header.seq_num = i; + header.flag = 1; + packet_put_data( &header, &info, chunk, data ); + res = mcast_send( v, chunk, PACKET_PAYLOAD_SIZE, port_num ); + if(res <= 0 ) + { + return -1; + } + } + + if( bytes_left ) + { + i = header.length-1; + header.seq_num = i; + header.flag = 1; + int bytes_done = packet_put_padded_data( &header, &info, chunk, buf + (i * CHUNK_SIZE), bytes_left ); + veejay_memset( chunk + bytes_done, 0, (PACKET_PAYLOAD_SIZE-bytes_done)); + res = mcast_send( v, chunk, PACKET_PAYLOAD_SIZE, port_num ); + if( res <= 0 ) + { + veejay_msg(0, "Unable to send last packet"); + return -1; + } + } + + if( frame_num == 0xffff ) + stamp_reset(v); + + return 1; +} + +void mcast_close_sender( mcast_sender *v ) +{ + if(v) + { + close(v->sock_fd); + if(v->group) free(v->group); + v->group = NULL; + } +} diff --git a/veejay-server/libvjnet/mcastsender.h b/veejay-server/libvjnet/mcastsender.h new file mode 100644 index 00000000..9d3bc4b1 --- /dev/null +++ b/veejay-server/libvjnet/mcastsender.h @@ -0,0 +1,54 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef MCASTSENDER_HH +#define MCASTSENDER_HH +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +typedef struct +{ + char *group; + int sock_fd; + int addr_len; + struct sockaddr_in addr; + int send_buf_size; + uint32_t stamp; +} mcast_sender; + +mcast_sender *mcast_new_sender( const char *group_name ); +void mcast_set_interface( mcast_sender *s, const char *interface ); + +int mcast_send( mcast_sender *s, const void *buf, int len, int port_num ); + +int mcast_send_frame( mcast_sender *s, const VJFrame *frame , uint8_t *buf, int total_len,long ms, int port_num ); + +void mcast_close_sender(mcast_sender *s ); + +int mcast_sender_set_peer( mcast_sender *v, const char *hostname ); + +#endif diff --git a/veejay-server/libvjnet/packet.c b/veejay-server/libvjnet/packet.c new file mode 100644 index 00000000..7f11a6c5 --- /dev/null +++ b/veejay-server/libvjnet/packet.c @@ -0,0 +1,102 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include "packet.h" + +#ifdef STRICT_CHECKING +#include +#endif + +void packet_dump_header( packet_header_t *h) +{ +#ifdef STRICT_CHECKING + assert( h != NULL ); +#endif + veejay_msg(VEEJAY_MSG_DEBUG, "Flag: %x, Sequence Num %d/%d, Timestamp %x Timeout : %ld", + h->flag, h->seq_num,h->length, h->usec,h->timeout ); +} + +void packet_dump_info( frame_info_t *i ) +{ + veejay_msg(VEEJAY_MSG_DEBUG, "Frame: %dx%d, fmt %d, data_len=%d", + i->width,i->height,i->fmt, i->len ); +} + +packet_header_t packet_construct_header(uint8_t flag) +{ + struct timeval tv; + gettimeofday(&tv, NULL); + packet_header_t header; + header.flag = flag; + header.seq_num = 0; // not set + header.usec = tv.tv_usec; + header.timeout = 0; + header.length = 0; + return header; +} + +packet_header_t packet_get_header(const void *data) +{ + packet_header_t h,tmp; + veejay_memcpy( &tmp, data, sizeof(packet_header_t) ); + h.flag = tmp.flag; + h.seq_num = tmp.seq_num; + h.length = tmp.length; + h.usec = tmp.usec; + h.timeout = tmp.timeout; + return h; +} + +int packet_get_data(packet_header_t *h, const void *data, uint8_t *plane ) +{ + size_t len = sizeof(packet_header_t); + len += sizeof( frame_info_t ); + veejay_memcpy( plane , data + len, CHUNK_SIZE ); + return 1; +} + +int packet_get_info(frame_info_t *i, const void *data ) +{ + size_t len = sizeof(packet_header_t); + veejay_memcpy(i, data + sizeof(packet_header_t), sizeof(frame_info_t)); + return 1; +} + +int packet_put_padded_data(packet_header_t *h, frame_info_t *i , void *payload, const uint8_t *plane, int bytes ) +{ + size_t len = sizeof( packet_header_t ); + veejay_memcpy( payload, h , len ); + veejay_memcpy( payload + len, i , sizeof( frame_info_t )); + len += sizeof(frame_info_t ); + veejay_memcpy( payload + len, plane, bytes ); + return (len + bytes); +} +int packet_put_data(packet_header_t *h, frame_info_t *i , void *payload, const uint8_t *plane ) +{ + size_t len = sizeof( packet_header_t ); + veejay_memcpy( payload, h , len ); + veejay_memcpy( payload + len, i , sizeof( frame_info_t )); + len += sizeof(frame_info_t ); + veejay_memcpy( payload + len, plane, CHUNK_SIZE ); + return 1; +} + diff --git a/veejay-server/libvjnet/packet.h b/veejay-server/libvjnet/packet.h new file mode 100644 index 00000000..75d910ef --- /dev/null +++ b/veejay-server/libvjnet/packet.h @@ -0,0 +1,75 @@ +/* vjnet - low level network I/O for VeeJay + * + * (C) 2005-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef PACKET_H +#define PACKET_H +/* + +Veejay - Video streaming over UDP (Multicast) + +Veejay doesnt care about dropped packet. Dropped packet means drop frame. + +Ignoring machine byte order. Fix it yourself + + +*/ +#include +#include +#include + +typedef struct +{ + uint8_t flag; + uint8_t seq_num; + uint32_t usec; + uint32_t timeout; + uint8_t length; +} packet_header_t; + +typedef struct +{ + uint16_t width; + uint16_t height; + uint8_t fmt; + uint32_t len; +} frame_info_t; + + +#define PACKET_HEADER_LENGTH ( sizeof(packet_header_t) ) +#define PACKET_APP_HEADER_LENGTH ( sizeof(frame_info_t) ) +#define CHUNK_SIZE 2048 +#define PACKET_PAYLOAD_SIZE (CHUNK_SIZE + PACKET_HEADER_LENGTH + PACKET_APP_HEADER_LENGTH ) + +void packet_dump_header( packet_header_t *h); + +void packet_dump_info( frame_info_t * i ); + +packet_header_t packet_construct_header(uint8_t flag); + +packet_header_t packet_get_header(const void *data); + +int packet_get_data( packet_header_t *h, const void *data, uint8_t *plane); + +int packet_put_data( packet_header_t *h, frame_info_t *i, void *payload, const uint8_t *plane ); + +int packet_put_padded_data( packet_header_t *h, frame_info_t *i, void *payload, const uint8_t *plane, int bytes ); + +int packet_get_info(frame_info_t *i, const void *data ); +#endif diff --git a/veejay-server/libvjnet/vj-client.c b/veejay-server/libvjnet/vj-client.c new file mode 100644 index 00000000..d01dcbfb --- /dev/null +++ b/veejay-server/libvjnet/vj-client.c @@ -0,0 +1,515 @@ +/* libvjnet - Linux VeeJay + * (C) 2002-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif +#define VJC_OK 0 +#define VJC_NO_MEM 1 +#define VJC_SOCKET 2 +#define VJC_BAD_HOST 3 + +#define PACKET_LEN (65535*32) + +vj_client *vj_client_alloc( int w, int h, int f ) +{ + vj_client *v = (vj_client*) malloc(sizeof(vj_client)); + memset(v, 0, sizeof(vj_client)); + if(!v) + { + return NULL; + } + v->cur_width = w; + v->cur_height = h; + v->cur_fmt = f; + v->space = NULL; +// v->lzo = lzo_new(); + v->c = (conn_type_t**) malloc(sizeof(conn_type_t*) * 3); + v->c[0] = (conn_type_t*) malloc(sizeof(conn_type_t)); + v->c[1] = (conn_type_t*) malloc(sizeof(conn_type_t)); + v->blob = (unsigned char*) malloc(sizeof(unsigned char) * PACKET_LEN ); + v->mcast = 0; + if( w > 0 && h > 0 ) + v->space = (uint8_t*) malloc( sizeof(uint8_t) * SOCKETFRAMELEN ); + return v; +} + +void vj_client_free(vj_client *v) +{ + if(v) + { + if(v->c[0]) + free(v->c[0]); + if(v->c[1]) + free(v->c[1]); + if(v->c) + free(v->c); + if(v->blob) + free(v->blob); + if(v->lzo) + free(v->lzo); + if(v->space) + free(v->space); + free(v); + } +} + +int vj_client_window_sizes( int socket_fd, int *r, int *s ) +{ + int tmp = sizeof(int); + if( getsockopt( socket_fd, SOL_SOCKET, SO_SNDBUF,(unsigned char*) s, &tmp) == -1 ) + { + veejay_msg(0, "Cannot read socket buffer size: %s", strerror(errno)); + return 0; + } + if( getsockopt( socket_fd, SOL_SOCKET, SO_RCVBUF, (unsigned char*) r, &tmp) == -1 ) + { + veejay_msg(0, "Cannot read socket buffer receive size %s" , strerror(errno)); + return 0; + } + return 1; +} + +void vj_client_flush(vj_client *v, int num_frames) +{ + if(vj_client_poll(v, V_STATUS )) + { + char status[100]; + int bytes = 100; + int n = vj_client_read( v, V_STATUS,status,bytes); + if( n > 0 ) + { num_frames --; + } + + } +} + +int vj_client_connect_dat(vj_client *v, char *host, int port_id ) +{ + int error = 0; + if(host == NULL) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid host name (cannot be empty)"); + return 0; + } + if(port_id < 1 || port_id > 65535) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid port number. Use [1-65535]"); + return 0; + } + + + v->c[0]->type = VSOCK_C; + v->c[0]->fd = alloc_sock_t(); + free(v->c[1]); + v->c[1] = NULL; + if( sock_t_connect( v->c[0]->fd, host, port_id + 5 ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Connect to DAT port %d", port_id + 5); + return 1; + } + return error; +} + +int vj_client_connect(vj_client *v, char *host, char *group_name, int port_id ) +{ + int error = 0; + + if( group_name == NULL ) + { + + if(host == NULL) + return 0; + if(port_id <= 0 || port_id > 65535) + return 0; + + v->c[0]->type = VSOCK_C; + v->c[0]->fd = alloc_sock_t(); + v->c[1]->type = VSOCK_S; + v->c[1]->fd = alloc_sock_t(); + if(!v->c[0]->fd || !v->c[1]->fd ) + { + return 0; + } + if( sock_t_connect( v->c[0]->fd, host, port_id + VJ_CMD_PORT ) ) + { + if( sock_t_connect( v->c[1]->fd, host, port_id + VJ_STA_PORT ) ) + { + return 1; + } + } + } + else + { + if(port_id <= 0 || port_id > 65535 ) + return 0; + + v->c[0]->type = VMCAST_C; + v->c[0]->r = mcast_new_receiver( group_name, port_id + VJ_CMD_MCAST ); + v->c[0]->s = mcast_new_sender( group_name ); + v->ports[0] = port_id + VJ_CMD_MCAST; + v->ports[1] = port_id + VJ_CMD_MCAST_IN; +fprintf(stderr, "%s: receiver at port %d (v->ports[0] = %d, v->ports[1] = %d)", + __FUNCTION__, port_id + VJ_CMD_MCAST, v->ports[0], v->ports[1] ); + + mcast_sender_set_peer( v->c[0]->s , group_name ); + v->mcast = 1; +// mcast_receiver_set_peer( v->c[0]->r, group_name); + veejay_msg(VEEJAY_MSG_DEBUG, "Client is interested in packets from group %s : %d, send to %d", + group_name, port_id + VJ_CMD_MCAST , port_id + VJ_CMD_MCAST_IN); + + return 1; + } + return error; +} + +int vj_client_poll_w( vj_client *v, int sock_type ) +{ + if(sock_type == V_STATUS ) + { + if(v->c[1]->type == VSOCK_S) + return ( sock_t_poll_w(v->c[1]->fd ) ); + } + if(sock_type == V_CMD ) + { + if(v->c[0]->type == VSOCK_C) + return ( sock_t_poll_w( v->c[0]->fd )); + } + return 0; +} + +int vj_client_poll( vj_client *v, int sock_type ) +{ + if(sock_type == V_STATUS ) + { + if(v->c[1]->type == VSOCK_S) + return ( sock_t_poll(v->c[1]->fd ) ); + } + if(sock_type == V_CMD ) + { + if(v->c[0]->type == VSOCK_C) + return ( sock_t_poll( v->c[0]->fd )); + if(v->c[0]->type == VMCAST_C ) + return ( mcast_poll( v->c[0]->r )); + } + return 0; +} + +static void vj_client_decompress( vj_client *t, uint8_t *out, int data_len, int Y, int UV , int header_len) +{ + uint8_t *d[3] = { + out, + out + Y, + out + Y + UV }; +#ifdef STRICT_CHECKING + assert( data_len > 0 ); + assert( Y > 0 ); + assert( UV > 0 ); +#endif + lzo_decompress( t->lzo, t->space, data_len, d ); +} + +static void hexstr(uint8_t *bytes, int len){ + unsigned int i; + printf("\tHex:"); + for( i = 0 ; i < len ; i ++ ) { + printf("%x.", bytes[i]); + } + printf("\n"); + +} +static int getint(uint8_t *in, int len ) { + + char *ptr, *word = strndup( in, len+1 ); + word[len] = '\0'; + long v = strtol( word, &ptr, 10 ); + free(word); + return (int) v; +} +int vj_client_read_i( vj_client *v, uint8_t *dst, int len ) +{ + uint8_t line[32]; + int p[4] = {0, 0,0,0 }; + int n = 0; + int plen = 0; + int conv = 1; + int y_len = 0; + int uv_len = 0; + + if( v->c[0]->type == VMCAST_C ) + { + plen = mcast_recv_frame( v->c[0]->r, v->space, 0, v->cur_width,v->cur_height,v->cur_fmt, + &p[0],&p[1],&p[2] ); + if(plen <= 0) + return 0; + + v->in_width = p[0]; + v->in_height = p[1]; + v->in_fmt = p[2]; + + uv_len = 0; + y_len = p[0] * p[1]; + switch(v->in_fmt ) + { + case FMT_420F: + case FMT_420: + uv_len = y_len/4; break; + default: + uv_len = y_len/2;break; + } + + vj_client_decompress( v, dst,p[3],y_len,uv_len ,0); + + if( p[0] != v->cur_width || p[1] != v->cur_height || p[2] != v->cur_fmt ) + return 2; + return 1; + } else if ( v->c[0]->type == VSOCK_C ) + { + veejay_memset( line,0, sizeof(line)); + plen = sock_t_recv_w( v->c[0]->fd, line, 21 ); + if( plen <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Network I/O Error while reading header: %s", strerror(errno)); + return -1; + } +#ifdef STRICT_CHECKING + assert( plen == 21 ); +#endif + p[0] = getint( line , 4 ); + p[1] = getint( line + 5, 4 ); + p[2] = getint( line + 4 + 5, 4 ); + p[3] = getint( line + 4 + 5 + 5, 8 ); + + if( v->cur_width != p[0] || v->cur_height != p[1] || v->cur_fmt != p[2]) { + veejay_msg(VEEJAY_MSG_ERROR, "Unexpected video frame format, %dx%d (%d) , received %dx%d(%d)", + v->cur_width,v->cur_height,v->cur_fmt,p[0],p[1],p[2]); + return 0; + } + + v->in_width = p[0]; + v->in_height = p[1]; + v->in_fmt = p[2]; + uv_len = 0; + y_len = p[0] * p[1]; + switch(v->in_fmt ) + { + case FMT_420F: + case FMT_420: + uv_len = y_len/4; break; + default: + uv_len = y_len/2;break; + } + + int n = sock_t_recv_w( v->c[0]->fd, v->space, p[3] ); + if( n != p[3] ) + { + if( n < 0 ) { + veejay_msg(VEEJAY_MSG_ERROR, "Network I/O Error: %s", strerror(errno)); + } else { + veejay_msg(VEEJAY_MSG_ERROR, "Broken video packet , got %d out of %d bytes", + n, p[3] ); + } + return -1; + } + + vj_client_decompress( v, dst, p[3], y_len, uv_len , plen); + + return 2; + } + return 0; +} + +int vj_client_get_status_fd(vj_client *v, int sock_type ) +{ + if(sock_type == V_STATUS) + { + vj_sock_t *c = v->c[1]->fd; + return c->sock_fd; + } + if(sock_type == V_CMD ) + { + if(!v->mcast) + { + vj_sock_t *c = v->c[0]->fd; + return c->sock_fd; + } + else + { + mcast_receiver *c = v->c[0]->r; + return c->sock_fd; + } + } + return 0; +} +int vj_client_read_no_wait(vj_client *v, int sock_type, uint8_t *dst, int bytes ) +{ + if( sock_type == V_STATUS ) + { + if(v->c[1]->type == VSOCK_S) + return( sock_t_recv( v->c[1]->fd, dst, bytes ) ); + } + if( sock_type == V_CMD ) + { + if(v->c[0]->type == VSOCK_C) + return ( sock_t_recv( v->c[0]->fd, dst, bytes ) ); + } + return 0; +} + +int vj_client_read(vj_client *v, int sock_type, uint8_t *dst, int bytes ) +{ + if( sock_type == V_STATUS ) + { + if(v->c[1]->type == VSOCK_S) { + return( sock_t_recv_w( v->c[1]->fd, dst, bytes ) ); + } + } + if( sock_type == V_CMD ) + { + if(v->c[0]->type == VSOCK_C) { + return ( sock_t_recv_w( v->c[0]->fd, dst, bytes ) ); + } + } + return 0; +} + +int vj_client_send(vj_client *v, int sock_type,char *buf ) +{ + if( sock_type == V_CMD ) + { + + // format msg + int len = strlen( buf ); + sprintf(v->blob, "V%03dD%s", len, buf); + if(v->c[0]->type == VSOCK_C) + return ( sock_t_send( v->c[0]->fd, v->blob, len + 5 )); + if(v->c[0]->type == VMCAST_C) + return ( mcast_send( v->c[0]->s, (void*) v->blob, len + 5, + v->ports[1] )); + } + return 1; +} + +int vj_client_send_buf(vj_client *v, int sock_type,unsigned char *buf, int len ) +{ + if( sock_type == V_CMD ) + { + // format msg + sprintf(v->blob, "V%03dD", len); + veejay_memcpy( v->blob+5, buf, len ); + if(v->c[0]->type == VSOCK_C) + return ( sock_t_send( v->c[0]->fd, v->blob, len + 5 )); + if(v->c[0]->type == VMCAST_C) + return ( mcast_send( v->c[0]->s, (void*) v->blob, len + 5, + v->ports[1] )); + } + return 1; +} + +int vj_client_send_bufX(vj_client *v, int sock_type,unsigned char *buf, int len ) +{ + if( sock_type == V_CMD ) + { + + // format msg + sprintf(v->blob, "K%08d", len); + veejay_memcpy( v->blob+9, buf, len ); + if(v->c[0]->type == VSOCK_C) + return ( sock_t_send( v->c[0]->fd, v->blob, len + 9 )); + if(v->c[0]->type == VMCAST_C) + return ( mcast_send( v->c[0]->s, (void*) v->blob, len + 9, + v->ports[1] )); + } + return 1; +} + +int vj_client_close( vj_client *v ) +{ + if(v) + { + if(v->c[0]) + { + if(v->c[0]->type == VSOCK_C) + sock_t_close(v->c[0]->fd ); + else if ( v->c[0]->type == VMCAST_C ) + { + mcast_close_receiver( v->c[0]->r ); + mcast_close_sender( v->c[0]->s ); + } + } + if(v->c[1]) + { + if(v->c[1]->type == VSOCK_S) + sock_t_close(v->c[1]->fd ); + } + + return 1; + } + return 0; +} + +int vj_client_test(char *host, int port) +{ + if( h_errno == HOST_NOT_FOUND ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Specified host '%s':'%d' is unknown", host,port ); + return 0; + } + + if( h_errno == NO_ADDRESS || h_errno == NO_DATA ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Specified host '%s' is valid but does not have IP address", + host ); + return 0; + } + if( h_errno == NO_RECOVERY ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Non recoverable name server error occured"); + return 0; + } + if( h_errno == TRY_AGAIN ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Temporary error occurred on an authoritative name. Try again later"); + return 0; + } + return 1; +} diff --git a/veejay-server/libvjnet/vj-client.h b/veejay-server/libvjnet/vj-client.h new file mode 100644 index 00000000..1380eacd --- /dev/null +++ b/veejay-server/libvjnet/vj-client.h @@ -0,0 +1,83 @@ +/* veejay - Linux VeeJay + * (C) 2002-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#ifndef VJ_CLIENT_H +#define VJ_CLIENT_H + +typedef struct +{ + void *r; + void *s; + void *fd; + int type; +} conn_type_t; + +typedef struct +{ + int planes[3]; + int cur_width; + int cur_height; + int cur_fmt; + int in_width; + int in_height; + int in_fmt; + uint8_t *space; + conn_type_t **c; + int ports[3]; + int mcast; + void *lzo; + unsigned char *blob; +} vj_client; + + +int vj_client_connect( vj_client *v, char *host, char *group_name, int port_id ); + +int vj_client_get_status_fd(vj_client *v, int sock_type ); + +void vj_client_flush( vj_client *v, int delay ); + +int vj_client_poll( vj_client *v, int sock_type ); + +int vj_client_poll_w( vj_client *v, int sock_type ); + +int vj_client_read_i(vj_client *v, uint8_t *dst, int len ); + +int vj_client_read( vj_client *v, int sock_type, uint8_t *dst, int bytes ); + +int vj_client_read_no_wait( vj_client *v, int sock_type, uint8_t *dst, int bytes ); + +int vj_client_close( vj_client *v ); + +int vj_client_send( vj_client *v, int sock_type, char *buf); + +vj_client *vj_client_alloc(int w , int h, int f); + +void vj_client_free(vj_client *v); + +int vj_client_test(char *addr, int port ); + +int vj_client_send_bufX(vj_client *v, int sock_type,unsigned char *buf, int len ); + +int vj_client_window_sizes( int socket_fd, int *r, int *s ); + +int vj_client_connect_dat(vj_client *v, char *host, int port_id ); + + +#endif + diff --git a/veejay-server/libvjnet/vj-server.c b/veejay-server/libvjnet/vj-server.c new file mode 100644 index 00000000..aed1c54b --- /dev/null +++ b/veejay-server/libvjnet/vj-server.c @@ -0,0 +1,1034 @@ +/* libvjnet - Linux VeeJay + * (C) 2002-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif +#define __INVALID 0 +#define __SENDER 1 +#define __RECEIVER 2 + +typedef struct +{ + char *msg; + int len; +} vj_message; + +typedef struct { + int handle; + int in_use; + int promote; + vj_message **m_queue; + vj_message *lin_queue; + int n_queued; + int n_retrieved; +} vj_link; + +typedef struct +{ + mcast_sender *s; // for sending frames only + mcast_receiver *r; // for taking commands + int type; +} vj_proto; + +#define VJ_MAX_PENDING_MSG 64 +#define RECV_SIZE (16384) + +int _vj_server_free_slot(vj_server *vje); +int _vj_server_new_client(vj_server *vje, int socket_fd); +int _vj_server_parse_msg(vj_server *vje,int link_id, char *buf, int buf_len, int priority ); +int _vj_server_empty_queue(vj_server *vje, int link_id); + + + +static int _vj_server_multicast( vj_server *v, char *group_name, int port ) +{ + vj_link **link; + int i; + + vj_proto **proto = (vj_proto**) malloc(sizeof( vj_proto* ) * 2); + + proto[0] = (vj_proto*) vj_malloc(sizeof( vj_proto ) ); + if( v->server_type == V_CMD ) + { + proto[0]->s = mcast_new_sender( group_name ); + if(!proto[0]->s) + return 0; + + proto[0]->r = mcast_new_receiver( group_name , port + VJ_CMD_MCAST_IN ); + if(!proto[0]->r ) + return 0; + + v->ports[0] = port + VJ_CMD_MCAST; + v->ports[1] = port + VJ_CMD_MCAST_IN; + } + + v->protocol = (void**) proto; + link = (vj_link **) vj_malloc(sizeof(vj_link *) * VJ_MAX_CONNECTIONS); + + if(!link) + { + veejay_msg(VEEJAY_MSG_ERROR, "Out of memory"); + return 0; + } + + for( i = 0; i < 1; i ++ ) /* only 1 link needed for multicast: + the link hold all messages received */ + { + int j; + link[i] = (vj_link*) vj_malloc(sizeof(vj_link)); + if(!link[i]) + { + return 0; + } + link[i]->in_use = 1; + link[i]->promote = 0; + link[i]->m_queue = (vj_message**) vj_malloc(sizeof( vj_message * ) * VJ_MAX_PENDING_MSG ); + if(!link[i]->m_queue) + return 0; + link[i]->lin_queue = (vj_message*) vj_calloc(sizeof(vj_message) * VJ_MAX_PENDING_MSG ); + if(!link[i]->lin_queue) + return 0; + + for( j = 0; j < VJ_MAX_PENDING_MSG; j ++ ) + { + /* link[i]->m_queue[j] = (vj_message*) vj_malloc(sizeof(vj_message)); + link[i]->m_queue[j]->len = 0; + link[i]->m_queue[j]->msg = NULL;*/ + link[i]->m_queue[j] = &(link[i]->lin_queue[j]); + } + link[i]->n_queued = 0; + link[i]->n_retrieved = 0; + } + v->link = (void**) link; + veejay_msg(VEEJAY_MSG_INFO, "UDP multicast frame sender ready at port %d (group '%s')", + v->ports[0], group_name ); + + return 1; +} + +static int _vj_server_classic(vj_server *vjs, int port_offset) +{ + int on = 1; + int port_num = 0; + vj_link **link; + int i = 0; + if ((vjs->handle = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create a socket: %s", strerror(errno)); + return 0; + } + if (setsockopt( vjs->handle, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(on) )== -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "%s", strerror(errno)); + return 0; + } + vjs->myself.sin_family = AF_INET; + vjs->myself.sin_addr.s_addr = INADDR_ANY; + + if( vjs->server_type == V_CMD ) + port_num = port_offset + VJ_CMD_PORT; + if( vjs->server_type == V_STATUS ) + port_num = port_offset + VJ_STA_PORT; + + vjs->myself.sin_port = htons(port_num); + veejay_memset(&(vjs->myself.sin_zero), 0, 8); + if (bind(vjs->handle, (struct sockaddr *) &(vjs->myself), sizeof(vjs->myself) ) == -1 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "%s", strerror(errno)); + return 0; + } + if (listen(vjs->handle, VJ_MAX_CONNECTIONS) == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "%s", strerror(errno)); + return 0; + } + + + int send_size = 512 * 1024; + if( setsockopt( vjs->handle, SOL_SOCKET, SO_SNDBUF, (const char*) &send_size, sizeof(send_size) ) == - 1) + { + veejay_msg(0, "Cannot set send buffer size: %s", strerror(errno)); + } + int tmp = sizeof(int); + if( getsockopt( vjs->handle, SOL_SOCKET, SO_SNDBUF,(unsigned char*) &(vjs->send_size), &tmp) == -1 ) + { + veejay_msg(0, "Cannot read socket buffer size: %s", strerror(errno)); + return 0; + } + if( setsockopt( vjs->handle, SOL_SOCKET, SO_RCVBUF, (const char*) &send_size, sizeof(send_size)) == 1 ) + { + veejay_msg(0, "Cannot set recv buffer sze:%s", strerror(errno)); + return 0; + } + if( getsockopt( vjs->handle, SOL_SOCKET, SO_RCVBUF, (unsigned char*) &(vjs->recv_size), &tmp) == -1 ) + { + veejay_msg(0, "Cannot read socket buffer receive size %s" , strerror(errno)); + return 0; + } + + int flag = 1; + if( setsockopt( vjs->handle, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof(int)) == -1 ) + { + veejay_msg(0, "Cannot disable Nagle buffering algorithm: %s", strerror(errno)); + return 0; + } + + link = (vj_link **) vj_malloc(sizeof(vj_link *) * VJ_MAX_CONNECTIONS); + if(!link) + { + veejay_msg(VEEJAY_MSG_ERROR, "Out of memory"); + return 0; + } + + for( i = 0; i < VJ_MAX_CONNECTIONS; i ++ ) + { + int j; + link[i] = (vj_link*) vj_calloc(sizeof(vj_link)); + if(!link[i]) + return 0; + link[i]->in_use = 0; + link[i]->promote = 0; + link[i]->m_queue = (vj_message**) vj_calloc(sizeof( vj_message * ) * VJ_MAX_PENDING_MSG ); + if(!link[i]->m_queue) return 0; + link[i]->lin_queue = (vj_message*) vj_calloc(sizeof(vj_message) * VJ_MAX_PENDING_MSG ); + if(!link[i]->lin_queue) + return 0; + for( j = 0; j < VJ_MAX_PENDING_MSG; j ++ ) + link[i]->m_queue[j] = &(link[i]->lin_queue[j]); + link[i]->n_queued = 0; + link[i]->n_retrieved = 0; + } + vjs->link = (void**) link; + vjs->nr_of_connections = vjs->handle; + + switch(vjs->server_type ) + { + case V_STATUS: + veejay_msg(VEEJAY_MSG_INFO,"TCP/IP unicast VIMS status socket ready at port %d, (R:%d, S:%d)", + port_num, vjs->recv_size, vjs->send_size ); + break; + case V_CMD: + veejay_msg(VEEJAY_MSG_INFO,"TCP/IP unicast VIMS control socket ready at port %d (R:%d, S:%d)", + port_num, vjs->recv_size, vjs->send_size ); + break; + default: +#ifdef STRICT_CHECKING + assert(0); +#endif + break; + } + + return 1; +} +vj_server *vj_server_alloc(int port_offset, char *mcast_group_name, int type) +{ + vj_server *vjs = (vj_server *) vj_calloc(sizeof(struct vj_server_t)); + + if (!vjs) + return NULL; + + vjs->recv_buf = (char*) vj_calloc(sizeof(char) * RECV_SIZE ); + if(!vjs->recv_buf) + { + if(vjs) free(vjs); + return NULL; + } + + vjs->server_type = type; + + /* setup peer to peer socket */ + if( mcast_group_name == NULL ) + { + vjs->use_mcast = 0; + if ( _vj_server_classic( vjs,port_offset ) ) + return vjs; + } + else + { /* setup multicast socket */ + vjs->use_mcast = 1; + if ( _vj_server_multicast(vjs, mcast_group_name, port_offset) ) + return vjs; + } + + return NULL; +} + + +int vj_server_send( vj_server *vje, int link_id, uint8_t *buf, int len ) +{ + unsigned int total = 0; + unsigned int bytes_left = len; + int n; +#ifdef STRICT_CHECKING + assert( vje->send_size > 0 ); + assert( len > 0 ); + assert( buf != NULL ); + assert( link_id >= 0 ); +#endif + vj_link **Link = (vj_link**) vje->link; + + if( !Link[link_id]->in_use ) + return -1; + + if( !vje->use_mcast) + { + total = sock_t_send_fd( Link[link_id]->handle, vje->send_size, buf, len); + if( total <= 0 ) + { + veejay_msg(0,"Unable to send buffer to %s:%s ", + (char*)(inet_ntoa(vje->remote.sin_addr)),strerror(errno)); + return -1; + } + if( total < len ) + return -1; + } + else + { + vj_proto **proto = (vj_proto**) vje->protocol; + if( vje->server_type == V_CMD ) + return mcast_send( proto[0]->s, buf, bytes_left, vje->ports[0] ); + } + return total; +} + +int vj_server_link_can_write( vj_server *vje, int link_id ) +{ + fd_set wds; + fd_set eds; + + vj_link **link = (vj_link**) vje->link; + if( !link[link_id]->in_use ) + return 0; + +#ifdef STRICT_CHECKING + assert( link[link_id]->in_use == 1 ); +#endif + + FD_ZERO(&wds ); + FD_ZERO(&eds ); + FD_SET( link[link_id]->handle, &wds ); + FD_SET( link[link_id]->handle, &eds ); + + struct timeval tv; + memset( &tv, 0,sizeof(struct timeval)); + + int err = select( link[link_id]->handle+1, NULL, &wds, &eds,&tv ); + + if( err < 0 ) + { + veejay_msg(0, "Unable to poll for immediate write: %s", link_id,strerror(errno)); + return 0; + } + if( err == 0 ) + { + veejay_msg(0, "Timeout expired"); + return 1; + } + + if( FD_ISSET( link[link_id]->handle, &eds )) + { + veejay_msg(0, "An exception occured to link %d", link_id ); + return 0; + } + + if( FD_ISSET( link[link_id]->handle, &wds )) + return 1; + return 0; +} + +static int vj_server_send_frame_now( vj_server *vje, int link_id, uint8_t *buf, int len ) +{ + unsigned int total = 0; + unsigned int bytes_left = len; + int n; +#ifdef STRICT_CHECKING + assert( vje->send_size > 0 ); + assert( len > 0 ); + assert( buf != NULL ); + assert( link_id >= 0 ); +#endif + + vj_link **Link = (vj_link**) vje->link; +#ifdef STRICT_CHECKING + assert( Link[link_id]->in_use == 1 ); +#endif + total = sock_t_send_fd( Link[link_id]->handle, vje->send_size, buf, len); +#ifdef STRICT_CHECKING + assert( total == len ); +#endif + if( total <= 0 ) + { + veejay_msg(0,"Unable to send buffer to %s: %s", + (char*)(inet_ntoa(vje->remote.sin_addr)),strerror(errno)); + return 0; + } + + return total; +} + +int vj_server_send_frame( vj_server *vje, int link_id, uint8_t *buf, int len, + VJFrame *frame, long ms ) +{ + if(!vje->use_mcast ) + { + if( vj_server_link_can_write( vje, link_id )) + { + return vj_server_send_frame_now( vje, link_id, buf, len ); + } + return 0; + } + else + { + vj_proto **proto = (vj_proto**) vje->protocol; + if( vje->server_type == V_CMD ) + return mcast_send_frame( proto[0]->s, frame, buf,len,ms, vje->ports[0] ); + } + return 0; +} + +int _vj_server_free_slot(vj_server *vje) +{ + vj_link **Link = (vj_link**) vje->link; + unsigned int i; + for (i = 0; i < VJ_MAX_CONNECTIONS; i++) + { + if (!Link[i]->in_use) + return i; + } + return VJ_MAX_CONNECTIONS; +} + +int _vj_server_new_client(vj_server *vje, int socket_fd) +{ + int entry = _vj_server_free_slot(vje); + vj_link **Link = (vj_link**) vje->link; + if (entry == VJ_MAX_CONNECTIONS) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot take more connections (max %d allowed)", VJ_MAX_CONNECTIONS); + return VJ_MAX_CONNECTIONS; + } + + Link[entry]->handle = socket_fd; + Link[entry]->in_use = 1; + + FD_SET( socket_fd, &(vje->fds) ); + FD_SET( socket_fd, &(vje->wds) ); + + return entry; +} + +int _vj_server_del_client(vj_server * vje, int link_id) +{ + vj_link **Link = (vj_link**) vje->link; + if(!Link[link_id]->in_use) + return 0; + + Link[link_id]->in_use = 0; + if(Link[link_id]->handle) + { + FD_CLR( Link[link_id]->handle, &(vje->fds) ); + FD_CLR( Link[link_id]->handle, &(vje->wds) ); + close(Link[link_id]->handle); + } + _vj_server_empty_queue(vje, link_id); + Link[link_id]->handle = 0; + return 1; +} + +void vj_server_close_connection(vj_server *vje, int link_id ) +{ + + _vj_server_del_client( vje, link_id ); + +} +int vj_server_client_promoted( vj_server *vje, int link_id) +{ + vj_link **Link= (vj_link**) vje->link; + return Link[link_id]->promote; +} +void vj_server_client_promote( vj_server *vje, int link_id) +{ + + vj_link **Link= (vj_link**) vje->link; +#ifdef STRICT_CHECKING + assert( Link[link_id]->in_use == 1 ); +#endif + Link[link_id]->promote = 1; +} + + +int vj_server_poll(vj_server * vje) +{ + int status = 0; + struct timeval t; + int i; + + if( vje->use_mcast ) + { + vj_proto **proto = (vj_proto**) vje->protocol; + return mcast_poll( proto[0]->r ); + } + + veejay_memset( &t, 0, sizeof(t)); + + FD_ZERO( &(vje->fds) ); + FD_ZERO( &(vje->wds) ); + + FD_SET( vje->handle, &(vje->fds) ); + if(vje->server_type == V_STATUS) + FD_SET( vje->handle, &(vje->wds) ); + + for( i = 0; i < VJ_MAX_CONNECTIONS; i ++ ) + { + vj_link **Link= (vj_link**) vje->link; + if( Link[i]->in_use ) + { + if(vje->server_type == V_CMD ) + { + FD_SET( Link[i]->handle, &(vje->fds) ); + FD_SET( Link[i]->handle, &(vje->wds) ); + } + if(vje->server_type == V_STATUS ) + FD_SET( Link[i]->handle, &(vje->wds)); + } + } + + status = select(vje->nr_of_connections + 1, &(vje->fds), &(vje->wds), 0, &t); + + if( status > 0 ) + { + return 1; + } + + return 0; +} + +int _vj_server_empty_queue(vj_server *vje, int link_id) +{ + vj_link **Link = (vj_link**) vje->link; + vj_message **v = Link[link_id]->m_queue; + int i; + for( i = 0; i < VJ_MAX_PENDING_MSG; i ++ ) + { + if( v[i]->msg ) + free(v[i]->msg); + v[i]->msg = NULL; + v[i]->len = 0; + } + Link[link_id]->n_queued = 0; + Link[link_id]->n_retrieved = 0; + return 1; +} + +#define _vj_malfunction(msg,content,buflen, index)\ +{ \ +if(msg != NULL)\ +veejay_msg(VEEJAY_MSG_DEBUG,"%s",msg);\ +veejay_msg(VEEJAY_MSG_DEBUG,"Message content");\ +veejay_msg(VEEJAY_MSG_DEBUG,"msg [%s] (%d bytes) at position %d",\ + content, buflen, index);\ +int _foobar;\ +for ( _foobar = 0; _foobar < (index+4); _foobar++);\ +veejay_msg(VEEJAY_MSG_PRINT, " ");\ +veejay_msg(VEEJAY_MSG_PRINT, "^");\ +veejay_msg(VEEJAY_MSG_DEBUG, "VIMS (v) - dropped message");\ +} +static int _vj_verify_msg(vj_server *vje,int link_id, char *buf, int buf_len ) +{ + int i = 0; + char *s = buf; + int num_msg = 0; + //vj_link **Link = (vj_link**) vje->link; + + if( (i+4) > buf_len ) + _vj_malfunction("VIMS (v) Message too small", buf, buf_len, i ); + + while( (i+4) < buf_len ) + { + if( !(s[i]=='V' && s[i+4] == 'D') ) + { + if(s[i] != 'K') + { + _vj_malfunction( "VIMS (v) Cannot identify message as VIMS message", buf, buf_len, i); + return 0; + } + } + + if( s[i] != 'K' ) + { + char tmp_len[4]; + char net_id[4]; + int slen = 0; + int netid = 0; + + bzero(tmp_len,4); + bzero(net_id,4 ); + + char *str_ptr = &s[i]; + str_ptr ++; // skip 'V' + + veejay_strncpy( tmp_len,str_ptr, 3 ); // header length + + if( sscanf(tmp_len, "%03d", &slen) <= 0 ) + { + _vj_malfunction( "VIMS (v) Cannot read header length", buf, buf_len, i + 1); + return 0; + } + if( slen > buf_len ) + { + char msg[256]; + veejay_memset(msg,0,256); + snprintf(msg, 256,"VIMS (v) Remote %s is sending corrupted packets", (char*) (inet_ntoa( vje->remote.sin_addr ) ) ); + _vj_malfunction( NULL, buf, buf_len, i + 1 ); + vj_server_close_connection( vje, link_id ); + return 0; + } + if ( slen > 999 ) + { + char msg[256]; + veejay_memset(msg,0,256); + snprintf(msg, 256, "VIMS (v) Remote %s is acting very suspiciously", (char* )( inet_ntoa( vje->remote.sin_addr ) )); + _vj_malfunction( msg, buf, buf_len, i + 1); + vj_server_close_connection( vje, link_id ); + return 0; + } + + i += 4; // advance to message content + str_ptr += 4; + veejay_strncpy( net_id, str_ptr, 3 ); + + if( sscanf( net_id, "%03d", &netid ) <= 0 ) + { + _vj_malfunction( "VIMS (v) Corrupt VIMS selector", buf, buf_len, i ); + return 0; + } + if( netid < 0 && netid > 600 ) + { + _vj_malfunction( "VIMS (v) selector out of range", buf,buf_len, i ); + return 0; + } + if( vje->use_mcast ) + if( netid >= 400 && netid < 500 ) + { + _vj_malfunction( "VIMS (v) multicast doesnt allow querying of data",buf,buf_len,i); + return 0; + } + + + //FIXME: malformed endings + int last_char = slen - 1; + int failed = 1; + if( last_char > 1 ) + { + if(str_ptr[last_char] == '\n' && + str_ptr[last_char-1] == ';' ) + failed = 0; + else if(str_ptr[last_char] == ';' ) + failed = 0; + if(!failed) + { + num_msg ++; + i += slen + 1; + } + } + if(failed) + { + _vj_malfunction("VIMS (v) message does not end with ';'", buf, buf_len , i); + return 0; + } + } + else + { + int len = 0; + char *str_ptr = &s[i]; + + if(sscanf(str_ptr+1, "%8d",&len )) + { + i += len; + num_msg ++; + return num_msg; + } + else + { + _vj_malfunction("VIMS (v) keyframe packet length not set", str_ptr, buf_len, i ); + } + + } + } + if(num_msg > 0 ) + return num_msg; + return 0; +} + + +static int _vj_parse_msg(vj_server *vje,int link_id, char *buf, int buf_len, int priority ) +{ + int i = 0; + char *s = buf; + int num_msg = 0; + vj_link **Link = (vj_link**) vje->link; + vj_message **v = Link[link_id]->m_queue; + + while( (i+4) < buf_len ) + { + char tmp_len[8]; + char net_id[4]; + int slen = 0; + int netid = 0; + bzero(tmp_len,8); + bzero(net_id,4 ); + + char *str_ptr = &s[i]; + + if(s[i] == 'V') + { + str_ptr ++; + + veejay_strncpy( tmp_len,str_ptr, 3 ); // header length + if( sscanf(tmp_len, "%03d", &slen) <= 0 ) + { + veejay_msg(0, "Error parsing header in '%s' (%d bytes)", buf, buf_len ); + return 0; + } + i += 4; // advance to message content + str_ptr += 4; + veejay_strncpy( net_id, str_ptr, 3 ); + + if( sscanf( net_id, "%03d", &netid ) <= 0 ) + { + if( strncasecmp(net_id, "key",3) != 0 ) + { + veejay_msg(0, "Error parsing VIMS ID in '%s' (%d bytes)",buf,buf_len); + return 0; + } + else + { + v[num_msg]->msg = (char*) vj_malloc( slen ); + veejay_memcpy( v[num_msg]->msg, str_ptr, slen ); + v[num_msg]->len = slen; + num_msg++; + } + } + else + { + if(! priority ) + { + // store message anyway + int n_len = slen; + v[num_msg]->msg = (char*)strndup( str_ptr , slen ); + veejay_chomp_str( v[num_msg]->msg , &n_len ); + v[num_msg]->len = n_len; + num_msg++; + } + if(priority && netid > 255 ) + { + // store high priority only (reduce load) - + int n_len = slen; + v[num_msg]->msg = (char*)strndup( str_ptr , slen ); + veejay_chomp_str( v[num_msg]->msg, &n_len ); + v[num_msg]->len = n_len; + num_msg++; + } + } + + if(num_msg == VJ_MAX_PENDING_MSG ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "VIMS server queue full - max messages per interval is %d", + VJ_MAX_PENDING_MSG ); + return num_msg; // cant take more + } + // i += slen; + i += (slen+1); // try next message + + } + else if (s[i] == 'K' ) + { + str_ptr ++; + veejay_memcpy( tmp_len,str_ptr, 8 ); + if( sscanf(tmp_len, "%08d", &slen) <= 0 ) + { + veejay_msg(0, "Error parsing KF header in '%s' (%d bytes)", buf, buf_len ); + return 0; + } + + i += 8; // advance to message content + str_ptr += 8; + + v[num_msg]->msg = (char*) vj_calloc( slen ); + veejay_memcpy( v[num_msg]->msg, str_ptr, slen ); + v[num_msg]->len = slen; + num_msg++; + + i += slen; + } + } + + if( ! priority ) + { + Link[link_id]->n_queued = num_msg; + Link[link_id]->n_retrieved = 0; + } + return num_msg; +} + + +int vj_server_new_connection(vj_server *vje) +{ + if( FD_ISSET( vje->handle, &(vje->fds) ) ) + { + int addr_len = sizeof(vje->remote); + int n = 0; + int fd = accept( vje->handle, (struct sockaddr*) &(vje->remote), &addr_len ); + if(fd == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error accepting connection"); + return -1; + } + + char *host = inet_ntoa( vje->remote.sin_addr ); + veejay_msg(VEEJAY_MSG_INFO, "Connection with %s on port %d", host, + vje->remote.sin_port); + if( vje->nr_of_connections < fd ) + vje->nr_of_connections = fd; + + n = _vj_server_new_client(vje, fd); + if( n >= VJ_MAX_CONNECTIONS ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "No more connections allowed"); + close(fd); + return -1; + } + return n; + } + return -1; +} + +int vj_server_update( vj_server *vje, int id ) +{ + int sock_fd = vje->handle; + int n = 0; + _vj_server_empty_queue(vje, id); + + if(!vj_server_poll(vje)) + return 0; + + if(!vje->use_mcast) + { + vj_link **Link = (vj_link**) vje->link; + sock_fd = Link[id]->handle; + + if(!FD_ISSET( sock_fd, &(vje->fds)) ) + return 0; + } + + veejay_memset( vje->recv_buf, 0, RECV_SIZE ); + + if(!vje->use_mcast) + { + n = recv( sock_fd, vje->recv_buf, RECV_SIZE, 0 ); + if( n < 0) + { + // veejay_msg(VEEJAY_MSG_ERROR, "Receive error: %s", strerror(errno)); + return -1; + } + if( n == 0 ) + { + veejay_msg(VEEJAY_MSG_INFO ,"Connection closed by remote"); + return -1; + } + } + else + { + vj_proto **proto = (vj_proto**) vje->protocol; + n = mcast_recv( proto[0]->r, (void*) vje->recv_buf, RECV_SIZE ); + if( n <= 0 ) + { + return -1; + } + } + + + char *msg_buf = vje->recv_buf; + int bytes_left = n; + + int n_msg = _vj_verify_msg( vje, id, msg_buf, bytes_left ); + + if(n_msg == 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Invalid instruction '%s'", + msg_buf ); + return 0; + } + + + if( n_msg < VJ_MAX_PENDING_MSG ) + { + int nn = _vj_parse_msg( vje, id, msg_buf, bytes_left,0 ); + if(nn != n_msg) + { + veejay_msg(VEEJAY_MSG_ERROR, "Veejay's message queue corrupted (end session!)"); + return 0; + } + return nn; + } + return 0; +} + +void vj_server_shutdown(vj_server *vje) +{ + int j,i; + vj_link **Link = (vj_link**) vje->link; + int k = VJ_MAX_CONNECTIONS; + + if(vje->use_mcast) k = 1; + + for(i=0; i < k; i++) + { + if(Link[i]->in_use) + close(Link[i]->handle); + for( j = 0; j < VJ_MAX_PENDING_MSG; j ++ ) + { + if(Link[i]->m_queue[j]->msg ) + free( Link[i]->m_queue[j]->msg ); + //if(Link[i]->m_queue[j] ) free( Link[i]->m_queue[j] ); + } + if( Link[i]->lin_queue) + free( Link[i]->lin_queue ); + + if( Link[i]->m_queue ) free( Link[i]->m_queue ); + if( Link[i] ) free( Link[i] ); + } + + if(!vje->use_mcast) + { + close(vje->handle); + } + else + { + vj_proto **proto = (vj_proto**) vje->protocol; + mcast_close_sender( proto[0]->s ); + mcast_close_receiver( proto[0]->r ); + if(proto[0]) + free(proto[0]); + if(proto) free(proto); + } + + if( vje->recv_buf ) + free(vje->recv_buf); + + free(Link); + if(vje) free(vje); +} + +int vj_server_link_used( vj_server *vje, int link_id) +{ + vj_link **Link = (vj_link**) vje->link; +#ifdef STRICT_CHECKING + assert( link_id >= 0 && link_id < VJ_MAX_CONNECTIONS ); +#endif + return Link[link_id]->in_use; +/* + if( link_id < 0 || link_id >= VJ_MAX_CONNECTIONS ) + return 0; + if (Link[link_id]->in_use) + return 1; + return 0;*/ +} + + +int vj_server_min_bufsize( vj_server *vje, int id ) +{ + vj_link **Link = (vj_link**) vje->link; + if (!Link[id]->in_use) + return 0; + + int index = Link[id]->n_retrieved; + if( index >= Link[id]->n_queued ) + return 0; // done + + return Link[id]->m_queue[index]->len; +} + + +char *vj_server_retrieve_msg(vj_server *vje, int id, char *dst, int *str_len ) +{ + vj_link **Link = (vj_link**) vje->link; + if (!Link[id]->in_use) + return NULL; + + int index = Link[id]->n_retrieved; + if( index >= Link[id]->n_queued ) + return NULL; // done + + char *msg = Link[id]->m_queue[index]->msg; +#ifdef STRICT_CHECKING + assert( msg != NULL ); +#endif + int len = Link[id]->m_queue[index]->len; + + index ++; + Link[id]->n_retrieved = index; + + *str_len = len; + return msg; +} + +/* +int vj_server_retrieve_msg(vj_server *vje, int id, char *dst, int *str_len ) +{ + vj_link **Link = (vj_link**) vje->link; + if (!Link[id]->in_use) + return 0; + + int index = Link[id]->n_retrieved; + char *msg; + int len; + if( index >= Link[id]->n_queued ) + return 0; // done + + msg = Link[id]->m_queue[index]->msg; + len = Link[id]->m_queue[index]->len; +// strncpy( dst, msg, len ); + + veejay_memcpy(dst,msg, len ); + *str_len = len; + + index ++; + Link[id]->n_retrieved = index; + return 1; +} +*/ diff --git a/veejay-server/libvjnet/vj-server.h b/veejay-server/libvjnet/vj-server.h new file mode 100644 index 00000000..ee32b71c --- /dev/null +++ b/veejay-server/libvjnet/vj-server.h @@ -0,0 +1,75 @@ +/* libvjnet - Linux VeeJay + * (C) 2002-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_SERVER_H +#define VJ_SERVER_H +#include +#include +#include + +#define VJ_PORT 3490 +#define VJ_MAX_CONNECTIONS 16 + +typedef struct vj_server_t { + struct sockaddr_in myself; + struct sockaddr_in remote; + int handle; + int nr_of_connections; + void **link; + fd_set fds; + fd_set wds; + int use_mcast; + int server_type; + int ports[2]; + void **protocol; + char *recv_buf; + int send_size; + int recv_size; +} vj_server; + +vj_server *vj_server_alloc(int port, char *mcast_group_name, int type); + +int vj_server_update(vj_server * vje, int link_id); + +void vj_server_shutdown(vj_server *vje); + +char *vj_server_retrieve_msg(vj_server *vje, int link_id, char *dst, int *res); + +int vj_server_poll(vj_server * vje); + +int vj_server_send(vj_server *vje, int link_id, uint8_t *buf, int len); + +int vj_server_send_frame(vj_server *vje, int link_id, uint8_t *buf, int total_len, VJFrame *frame, long ms + ); + +int vj_server_init(void); + +int _vj_server_del_client(vj_server * vje, int link_id); + + +void vj_server_close_connection( vj_server *vje, int link_id ); + +int vj_server_new_connection(vj_server *vje); + +int vj_server_client_promoted( vj_server *vje, int link_id); + +void vj_server_client_promote( vj_server *vje, int link_id); + +int vj_server_link_used(vj_server *vje , int link_id); + +#endif diff --git a/veejay-server/libyuv/Makefile.am b/veejay-server/libyuv/Makefile.am new file mode 100644 index 00000000..1ae35846 --- /dev/null +++ b/veejay-server/libyuv/Makefile.am @@ -0,0 +1,9 @@ +# Makefile for veejay + +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(YUVCFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/aclib -I$(top_srcdir)/vjmem -I$(top_srcdir)/vjmsg -I$(top_srcdir)/libpostproc +YUV_LIB_FILE = libyuv.la +pkginclude_HEADERS = yuvconv.h +noinst_LTLIBRARIES = $(YUV_LIB_FILE) +libyuv_la_SOURCES = subsample.c yuvconv.c diff --git a/veejay-server/libyuv/Makefile.in b/veejay-server/libyuv/Makefile.in new file mode 100644 index 00000000..b580946e --- /dev/null +++ b/veejay-server/libyuv/Makefile.in @@ -0,0 +1,541 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Makefile for veejay + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = libyuv +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libyuv_la_LIBADD = +am_libyuv_la_OBJECTS = subsample.lo yuvconv.lo +libyuv_la_OBJECTS = $(am_libyuv_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libyuv_la_SOURCES) +DIST_SOURCES = $(libyuv_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(YUVCFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/aclib -I$(top_srcdir)/vjmem -I$(top_srcdir)/vjmsg -I$(top_srcdir)/libpostproc +YUV_LIB_FILE = libyuv.la +pkginclude_HEADERS = yuvconv.h +noinst_LTLIBRARIES = $(YUV_LIB_FILE) +libyuv_la_SOURCES = subsample.c yuvconv.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libyuv/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libyuv/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libyuv.la: $(libyuv_la_OBJECTS) $(libyuv_la_DEPENDENCIES) + $(LINK) $(libyuv_la_OBJECTS) $(libyuv_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subsample.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yuvconv.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + 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-pkgincludeHEADERS + +# 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/veejay-server/libyuv/mmx.h b/veejay-server/libyuv/mmx.h new file mode 100644 index 00000000..952d27b4 --- /dev/null +++ b/veejay-server/libyuv/mmx.h @@ -0,0 +1,265 @@ +/* + * mmx.h + * Copyright (C) 2000-2001 Michel Lespinasse + * Copyright (C) 1999-2000 Aaron Holtzman + * + * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. + * See http://libmpeg2.sourceforge.net/ for updates. + * + * mpeg2dec 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. + * + * mpeg2dec 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 + */ + +/* + * The type of an value that fits in an MMX register (note that long + * long constant values MUST be suffixed by LL and unsigned long long + * values by ULL, lest they be truncated by the compiler) + */ + +#define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align))) + +typedef union { + long long q; /* Quadword (64-bit) value */ + unsigned long long uq; /* Unsigned Quadword */ + int d[2]; /* 2 Doubleword (32-bit) values */ + unsigned int ud[2]; /* 2 Unsigned Doubleword */ + short w[4]; /* 4 Word (16-bit) values */ + unsigned short uw[4]; /* 4 Unsigned Word */ + char b[8]; /* 8 Byte (8-bit) values */ + unsigned char ub[8]; /* 8 Unsigned Byte */ + float s[2]; /* Single-precision (32-bit) value */ +} ATTR_ALIGN(8) mmx_t; /* On an 8-byte (64-bit) boundary */ + + +#define mmx_i2r(op,imm,reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "i" (imm) ) + +#define mmx_m2r(op,mem,reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "m" (mem)) + +#define mmx_r2m(op,reg,mem) \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=m" (mem) \ + : /* nothing */ ) + +#define mmx_r2r(op,regs,regd) \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd) + + +#define emms() __asm__ __volatile__ ("emms") + +#define movd_m2r(var,reg) mmx_m2r (movd, var, reg) +#define movd_r2m(reg,var) mmx_r2m (movd, reg, var) +#define movd_v2r(var,reg) __asm__ __volatile__ ("movd %0, %%" #reg \ + : /* nothing */ \ + : "rm" (var)) +#define movd_r2v(reg,var) __asm__ __volatile__ ("movd %%" #reg ", %0" \ + : "=rm" (var) \ + : /* nothing */ ) + +#define movq_m2r(var,reg) mmx_m2r (movq, var, reg) +#define movq_r2m(reg,var) mmx_r2m (movq, reg, var) +#define movq_r2r(regs,regd) mmx_r2r (movq, regs, regd) + +#define packssdw_m2r(var,reg) mmx_m2r (packssdw, var, reg) +#define packssdw_r2r(regs,regd) mmx_r2r (packssdw, regs, regd) +#define packsswb_m2r(var,reg) mmx_m2r (packsswb, var, reg) +#define packsswb_r2r(regs,regd) mmx_r2r (packsswb, regs, regd) + +#define packuswb_m2r(var,reg) mmx_m2r (packuswb, var, reg) +#define packuswb_r2r(regs,regd) mmx_r2r (packuswb, regs, regd) + +#define paddb_m2r(var,reg) mmx_m2r (paddb, var, reg) +#define paddb_r2r(regs,regd) mmx_r2r (paddb, regs, regd) +#define paddd_m2r(var,reg) mmx_m2r (paddd, var, reg) +#define paddd_r2r(regs,regd) mmx_r2r (paddd, regs, regd) +#define paddw_m2r(var,reg) mmx_m2r (paddw, var, reg) +#define paddw_r2r(regs,regd) mmx_r2r (paddw, regs, regd) + +#define paddsb_m2r(var,reg) mmx_m2r (paddsb, var, reg) +#define paddsb_r2r(regs,regd) mmx_r2r (paddsb, regs, regd) +#define paddsw_m2r(var,reg) mmx_m2r (paddsw, var, reg) +#define paddsw_r2r(regs,regd) mmx_r2r (paddsw, regs, regd) + +#define paddusb_m2r(var,reg) mmx_m2r (paddusb, var, reg) +#define paddusb_r2r(regs,regd) mmx_r2r (paddusb, regs, regd) +#define paddusw_m2r(var,reg) mmx_m2r (paddusw, var, reg) +#define paddusw_r2r(regs,regd) mmx_r2r (paddusw, regs, regd) + +#define pand_m2r(var,reg) mmx_m2r (pand, var, reg) +#define pand_r2r(regs,regd) mmx_r2r (pand, regs, regd) + +#define pandn_m2r(var,reg) mmx_m2r (pandn, var, reg) +#define pandn_r2r(regs,regd) mmx_r2r (pandn, regs, regd) + +#define pcmpeqb_m2r(var,reg) mmx_m2r (pcmpeqb, var, reg) +#define pcmpeqb_r2r(regs,regd) mmx_r2r (pcmpeqb, regs, regd) +#define pcmpeqd_m2r(var,reg) mmx_m2r (pcmpeqd, var, reg) +#define pcmpeqd_r2r(regs,regd) mmx_r2r (pcmpeqd, regs, regd) +#define pcmpeqw_m2r(var,reg) mmx_m2r (pcmpeqw, var, reg) +#define pcmpeqw_r2r(regs,regd) mmx_r2r (pcmpeqw, regs, regd) + +#define pcmpgtb_m2r(var,reg) mmx_m2r (pcmpgtb, var, reg) +#define pcmpgtb_r2r(regs,regd) mmx_r2r (pcmpgtb, regs, regd) +#define pcmpgtd_m2r(var,reg) mmx_m2r (pcmpgtd, var, reg) +#define pcmpgtd_r2r(regs,regd) mmx_r2r (pcmpgtd, regs, regd) +#define pcmpgtw_m2r(var,reg) mmx_m2r (pcmpgtw, var, reg) +#define pcmpgtw_r2r(regs,regd) mmx_r2r (pcmpgtw, regs, regd) + +#define pmaddwd_m2r(var,reg) mmx_m2r (pmaddwd, var, reg) +#define pmaddwd_r2r(regs,regd) mmx_r2r (pmaddwd, regs, regd) + +#define pmulhw_m2r(var,reg) mmx_m2r (pmulhw, var, reg) +#define pmulhw_r2r(regs,regd) mmx_r2r (pmulhw, regs, regd) + +#define pmullw_m2r(var,reg) mmx_m2r (pmullw, var, reg) +#define pmullw_r2r(regs,regd) mmx_r2r (pmullw, regs, regd) + +#define por_m2r(var,reg) mmx_m2r (por, var, reg) +#define por_r2r(regs,regd) mmx_r2r (por, regs, regd) + +#define pslld_i2r(imm,reg) mmx_i2r (pslld, imm, reg) +#define pslld_m2r(var,reg) mmx_m2r (pslld, var, reg) +#define pslld_r2r(regs,regd) mmx_r2r (pslld, regs, regd) +#define psllq_i2r(imm,reg) mmx_i2r (psllq, imm, reg) +#define psllq_m2r(var,reg) mmx_m2r (psllq, var, reg) +#define psllq_r2r(regs,regd) mmx_r2r (psllq, regs, regd) +#define psllw_i2r(imm,reg) mmx_i2r (psllw, imm, reg) +#define psllw_m2r(var,reg) mmx_m2r (psllw, var, reg) +#define psllw_r2r(regs,regd) mmx_r2r (psllw, regs, regd) + +#define psrad_i2r(imm,reg) mmx_i2r (psrad, imm, reg) +#define psrad_m2r(var,reg) mmx_m2r (psrad, var, reg) +#define psrad_r2r(regs,regd) mmx_r2r (psrad, regs, regd) +#define psraw_i2r(imm,reg) mmx_i2r (psraw, imm, reg) +#define psraw_m2r(var,reg) mmx_m2r (psraw, var, reg) +#define psraw_r2r(regs,regd) mmx_r2r (psraw, regs, regd) + +#define psrld_i2r(imm,reg) mmx_i2r (psrld, imm, reg) +#define psrld_m2r(var,reg) mmx_m2r (psrld, var, reg) +#define psrld_r2r(regs,regd) mmx_r2r (psrld, regs, regd) +#define psrlq_i2r(imm,reg) mmx_i2r (psrlq, imm, reg) +#define psrlq_m2r(var,reg) mmx_m2r (psrlq, var, reg) +#define psrlq_r2r(regs,regd) mmx_r2r (psrlq, regs, regd) +#define psrlw_i2r(imm,reg) mmx_i2r (psrlw, imm, reg) +#define psrlw_m2r(var,reg) mmx_m2r (psrlw, var, reg) +#define psrlw_r2r(regs,regd) mmx_r2r (psrlw, regs, regd) + +#define psubb_m2r(var,reg) mmx_m2r (psubb, var, reg) +#define psubb_r2r(regs,regd) mmx_r2r (psubb, regs, regd) +#define psubd_m2r(var,reg) mmx_m2r (psubd, var, reg) +#define psubd_r2r(regs,regd) mmx_r2r (psubd, regs, regd) +#define psubw_m2r(var,reg) mmx_m2r (psubw, var, reg) +#define psubw_r2r(regs,regd) mmx_r2r (psubw, regs, regd) + +#define psubsb_m2r(var,reg) mmx_m2r (psubsb, var, reg) +#define psubsb_r2r(regs,regd) mmx_r2r (psubsb, regs, regd) +#define psubsw_m2r(var,reg) mmx_m2r (psubsw, var, reg) +#define psubsw_r2r(regs,regd) mmx_r2r (psubsw, regs, regd) + +#define psubusb_m2r(var,reg) mmx_m2r (psubusb, var, reg) +#define psubusb_r2r(regs,regd) mmx_r2r (psubusb, regs, regd) +#define psubusw_m2r(var,reg) mmx_m2r (psubusw, var, reg) +#define psubusw_r2r(regs,regd) mmx_r2r (psubusw, regs, regd) + +#define punpckhbw_m2r(var,reg) mmx_m2r (punpckhbw, var, reg) +#define punpckhbw_r2r(regs,regd) mmx_r2r (punpckhbw, regs, regd) +#define punpckhdq_m2r(var,reg) mmx_m2r (punpckhdq, var, reg) +#define punpckhdq_r2r(regs,regd) mmx_r2r (punpckhdq, regs, regd) +#define punpckhwd_m2r(var,reg) mmx_m2r (punpckhwd, var, reg) +#define punpckhwd_r2r(regs,regd) mmx_r2r (punpckhwd, regs, regd) + +#define punpcklbw_m2r(var,reg) mmx_m2r (punpcklbw, var, reg) +#define punpcklbw_r2r(regs,regd) mmx_r2r (punpcklbw, regs, regd) +#define punpckldq_m2r(var,reg) mmx_m2r (punpckldq, var, reg) +#define punpckldq_r2r(regs,regd) mmx_r2r (punpckldq, regs, regd) +#define punpcklwd_m2r(var,reg) mmx_m2r (punpcklwd, var, reg) +#define punpcklwd_r2r(regs,regd) mmx_r2r (punpcklwd, regs, regd) + +#define pxor_m2r(var,reg) mmx_m2r (pxor, var, reg) +#define pxor_r2r(regs,regd) mmx_r2r (pxor, regs, regd) + + +/* 3DNOW extensions */ + +#define pavgusb_m2r(var,reg) mmx_m2r (pavgusb, var, reg) +#define pavgusb_r2r(regs,regd) mmx_r2r (pavgusb, regs, regd) + + +/* AMD MMX extensions - also available in intel SSE */ + + +#define mmx_m2ri(op,mem,reg,imm) \ + __asm__ __volatile__ (#op " %1, %0, %%" #reg \ + : /* nothing */ \ + : "m" (mem), "i" (imm)) + +#define mmx_r2ri(op,regs,regd,imm) \ + __asm__ __volatile__ (#op " %0, %%" #regs ", %%" #regd \ + : /* nothing */ \ + : "i" (imm) ) + +#define mmx_fetch(mem,hint) \ + __asm__ __volatile__ ("prefetch" #hint " %0" \ + : /* nothing */ \ + : "m" (mem)) + + +#define maskmovq(regs,maskreg) mmx_r2ri (maskmovq, regs, maskreg) + +#define movntq_r2m(mmreg,var) mmx_r2m (movntq, mmreg, var) + +#define pavgb_m2r(var,reg) mmx_m2r (pavgb, var, reg) +#define pavgb_r2r(regs,regd) mmx_r2r (pavgb, regs, regd) +#define pavgw_m2r(var,reg) mmx_m2r (pavgw, var, reg) +#define pavgw_r2r(regs,regd) mmx_r2r (pavgw, regs, regd) + +#define pextrw_r2r(mmreg,reg,imm) mmx_r2ri (pextrw, mmreg, reg, imm) + +#define pinsrw_r2r(reg,mmreg,imm) mmx_r2ri (pinsrw, reg, mmreg, imm) + +#define pmaxsw_m2r(var,reg) mmx_m2r (pmaxsw, var, reg) +#define pmaxsw_r2r(regs,regd) mmx_r2r (pmaxsw, regs, regd) + +#define pmaxub_m2r(var,reg) mmx_m2r (pmaxub, var, reg) +#define pmaxub_r2r(regs,regd) mmx_r2r (pmaxub, regs, regd) + +#define pminsw_m2r(var,reg) mmx_m2r (pminsw, var, reg) +#define pminsw_r2r(regs,regd) mmx_r2r (pminsw, regs, regd) + +#define pminub_m2r(var,reg) mmx_m2r (pminub, var, reg) +#define pminub_r2r(regs,regd) mmx_r2r (pminub, regs, regd) + +#define pmovmskb(mmreg,reg) \ + __asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg) + +#define pmulhuw_m2r(var,reg) mmx_m2r (pmulhuw, var, reg) +#define pmulhuw_r2r(regs,regd) mmx_r2r (pmulhuw, regs, regd) + +#define prefetcht0(mem) mmx_fetch (mem, t0) +#define prefetcht1(mem) mmx_fetch (mem, t1) +#define prefetcht2(mem) mmx_fetch (mem, t2) +#define prefetchnta(mem) mmx_fetch (mem, nta) + +#define psadbw_m2r(var,reg) mmx_m2r (psadbw, var, reg) +#define psadbw_r2r(regs,regd) mmx_r2r (psadbw, regs, regd) + +#define pshufw_m2r(var,reg,imm) mmx_m2ri(pshufw, var, reg, imm) +#define pshufw_r2r(regs,regd,imm) mmx_r2ri(pshufw, regs, regd, imm) + +#define sfence() __asm__ __volatile__ ("sfence\n\t") diff --git a/veejay-server/libyuv/mmx_macros.h b/veejay-server/libyuv/mmx_macros.h new file mode 100644 index 00000000..bd22b2ce --- /dev/null +++ b/veejay-server/libyuv/mmx_macros.h @@ -0,0 +1,46 @@ +#include /* size_t */ +#include + +/* MMX memcpy stuff taken from MPlayer (http://www.mplayerhq.hu) */ + +#define BLOCK_SIZE 4096 +#define CONFUSION_FACTOR 0 +//Feel free to fine-tune the above 2, it might be possible to get some speedup with them :) + +#undef HAVE_MMX1 +#ifndef MMXEXT +/* means: mmx v.1. Note: Since we added alignment of destinition it speedups + of memory copying on PentMMX, Celeron-1 and P2 upto 12% versus + standard (non MMX-optimized) version. + Note: on K6-2+ it speedups memory copying upto 25% and + on K7 and P3 about 500% (5 times). */ +#define HAVE_MMX1 +#endif + +#undef MMREG_SIZE +#define MMREG_SIZE 64 //8 + +#undef PREFETCH +#undef EMMS + +#ifdef MMXEXT +#define PREFETCH "prefetchnta" +#else +#define PREFETCH "/nop" +#endif + +#define EMMS "emms" + +#undef MOVNTQ +#ifdef MMXEXT +#define MOVNTQ "movntq" +#else +#define MOVNTQ "movq" +#endif + +#undef MIN_LEN +#ifdef HAVE_MMX1 +#define MIN_LEN 0x800 /* 2K blocks */ +#else +#define MIN_LEN 0x40 /* 64-byte blocks */ +#endif diff --git a/veejay-server/libyuv/subsample.c b/veejay-server/libyuv/subsample.c new file mode 100644 index 00000000..7188cf2e --- /dev/null +++ b/veejay-server/libyuv/subsample.c @@ -0,0 +1,856 @@ +/* + * subsample.c: Routines to do chroma subsampling. ("Work In Progress") + * + * + * Copyright (C) 2001 Matthew J. Marjanovic + * 2004 Niels Elburg + * + * 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. + * + */ + + + +#include + +#ifdef HAVE_ASM_MMX +#include "mmx.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + + +const char *ssm_id[SSM_COUNT] = { + "unknown", + "420_jpeg", + "420_mpeg2", +#if 0 + "420_dv_pal", + "411_dv_ntsc" +#endif +}; + + +const char *ssm_description[SSM_COUNT] = { + "unknown/illegal", + "4:2:0, JPEG/MPEG-1, interstitial siting", + "4:2:0, MPEG-2, horizontal cositing", +#if 0 + "4:2:0, DV-PAL, cosited, Cb/Cr line alternating", + "4:1:1, DV-NTSC" + "4:2:2", +#endif +}; + + +#define RUP8(num)(((num)+8)&~8) + +// forward decl +void ss_420_to_422(uint8_t *buffer, int width, int height); +void ss_422_to_420(uint8_t *buffer, int width, int height); + +typedef struct +{ + uint8_t *buf; +} yuv_sampler_t; + +void *subsample_init(int len) +{ + yuv_sampler_t *s = (yuv_sampler_t*) vj_malloc(sizeof(yuv_sampler_t) ); + if(!s) + return NULL; + s->buf = (uint8_t*) vj_malloc(sizeof(uint8_t) * RUP8(len*2) ); + if(!s->buf) + return NULL; + + return (void*) s; +} + +void subsample_free(void *data) +{ + yuv_sampler_t *sampler = (yuv_sampler_t*) data; + if(sampler) + { + if(sampler->buf) + free(sampler->buf); + free(sampler); + } + sampler = NULL; +} + +/************************************************************************* + * Chroma Subsampling + *************************************************************************/ + + +/* vertical/horizontal interstitial siting + * + * Y Y Y Y + * C C + * Y Y Y Y + * + * Y Y Y Y + * C C + * Y Y Y Y + * + */ + +/* +static void ss_444_to_420jpeg(uint8_t *buffer, int width, int height) +{ + uint8_t *in0, *in1, *out; + int x, y; + + in0 = buffer; + in1 = buffer + width; + out = buffer; + for (y = 0; y < height; y += 2) { + for (x = 0; x < width; x += 2) { + *out = (in0[0] + in0[1] + in1[0] + in1[1]) >> 2; + in0 += 2; + in1 += 2; + out++; + } + in0 += width; + in1 += width; + } +} +*/ +/* + + using weighted averaging for subsampling 2x2 -> 1x1 + here, 4 pixels are filled in each inner loop, (weighting + 16 source pixels) +*/ + +static void ss_444_to_420jpeg(uint8_t *buffer, int width, int height) +{ + const uint8_t *in0, *in1; + uint8_t *out; + int x, y = height; + in0 = buffer; + in1 = buffer + width; + out = buffer; + for (y = 0; y < height; y += 4) { + for (x = 0; x < width; x += 4) { + out[0] = (in0[0] + 3 * (in0[1] + in1[0]) + (9 * in1[1]) + 8) >> 4; + out[1] = (in0[2] + 3 * (in0[3] + in1[2]) + (9 * in1[3]) + 8) >> 4; + out[2] = (in0[4] + 3 * (in0[5] + in1[4]) + (9 * in1[5]) + 8) >> 4; + out[3] = (in0[6] + 3 * (in0[7] + in1[6]) + (9 * in1[7]) + 8) >> 4; + + in0 += 8; + in1 += 8; + out += 4; + } + for ( ; x < width; x +=2 ) + { + out[0] = (in0[0] + 3 * (in0[1] + in1[0]) + (9 * in1[1]) + 8) >> 4; + in0 += 2; + in1 += 2; + out++; + } + in0 += width*2; + in1 += width*2; + } +} +static void ss_444_to_420jpeg_cp(uint8_t *buffer,uint8_t *dest, int width, int height) +{ + const uint8_t *in0, *in1; + uint8_t *out; + int x, y = height; + in0 = buffer; + in1 = buffer + width; + out = dest; + for (y = 0; y < height; y += 4) { + for (x = 0; x < width; x += 4) { + out[0] = (in0[0] + 3 * (in0[1] + in1[0]) + (9 * in1[1]) + 8) >> 4; + out[1] = (in0[2] + 3 * (in0[3] + in1[2]) + (9 * in1[3]) + 8) >> 4; + out[2] = (in0[4] + 3 * (in0[5] + in1[4]) + (9 * in1[5]) + 8) >> 4; + out[3] = (in0[6] + 3 * (in0[7] + in1[6]) + (9 * in1[7]) + 8) >> 4; + + in0 += 8; + in1 += 8; + out += 4; + } + for ( ; x < width; x +=2 ) + { + out[0] = (in0[0] + 3 * (in0[1] + in1[0]) + (9 * in1[1]) + 8) >> 4; + in0 += 2; + in1 += 2; + out++; + } + in0 += width*2; + in1 += width*2; + } +} +/* horizontal interstitial siting + * + * Y Y Y Y + * C C C C in0 + * Y Y Y Y + * C C C C + * + * Y Y Y Y + * C C out0 + * Y Y Y Y + * C C + * + * + */ + + + + +/* vertical/horizontal interstitial siting + * + * Y Y Y Y + * C C C inm + * Y Y Y Y + * + * Y Y Y - Y out0 + * C | C | C in0 + * Y Y Y - Y out1 + * + * + * C C C inp + * + * + * Each iteration through the loop reconstitutes one 2x2 block of + * pixels from the "surrounding" 3x3 block of samples... + * Boundary conditions are handled by cheap reflection; i.e. the + * center sample is simply reused. + * + */ + + +#define BLANK_CRB in0[1] +#define BLANK_CRB_2 (in0[1] << 1) + +static void tr_420jpeg_to_444(void *data, uint8_t *buffer, int width, int height) +{ + uint8_t *inm, *in0, *inp, *out0, *out1; + uint8_t cmm, cm0, cmp, c0m, c00, c0p, cpm, cp0, cpp; + int x, y; + + yuv_sampler_t *sampler = (yuv_sampler_t*) data; + + uint8_t *saveme = sampler->buf; + + veejay_memcpy(saveme, buffer, width); + + in0 = buffer + ( width * height /4) - 2; + inm = in0 - width/2; + inp = in0 + width/2; + out1 = buffer + (width * height) - 1; + out0 = out1 - width; + + for (y = height; y > 0; y -= 2) { + if (y == 2) { + in0 = saveme + width/2 - 2; + inp = in0 + width/2; + } + for (x = width; x > 0; x -= 2) { +#if 0 + if ((x == 2) && (y == 2)) { + cmm = in0[1]; + cm0 = in0[1]; + cmp = in0[2]; + c0m = in0[1]; + c0p = in0[2]; + cpm = inp[1]; + cp0 = inp[1]; + cpp = inp[2]; + } else if ((x == 2) && (y == height)) { + cmm = inm[1]; + cm0 = inm[1]; + cmp = inm[2]; + c0m = in0[1]; + c0p = in0[2]; + cpm = in0[1]; + cp0 = in0[1]; + cpp = in0[2]; + } else if ((x == width) && (y == height)) { + cmm = inm[0]; + cm0 = inm[1]; + cmp = inm[1]; + c0m = in0[0]; + c0p = in0[1]; + cpm = in0[0]; + cp0 = in0[1]; + cpp = in0[1]; + } else if ((x == width) && (y == 2)) { + cmm = in0[0]; + cm0 = (y == 2) ? BLANK_CRB : inm[1]; + cmp = ((x == width) || (y == 2)) ? BLANK_CRB : inm[2]; + c0m = (x == 2) ? BLANK_CRB : in0[0]; + c0p = (x == width) ? BLANK_CRB : in0[2]; + cpm = ((x == 2) || (y == height)) ? BLANK_CRB : inp[0]; + cp0 = (y == height) ? BLANK_CRB : inp[1]; + cpp = ((x == width) || (y == height)) ? BLANK_CRB : inp[2]; + } else if (x == 2) { + cmm = ((x == 2) || (y == 2)) ? BLANK_CRB : inm[0]; + cm0 = (y == 2) ? BLANK_CRB : inm[1]; + cmp = ((x == width) || (y == 2)) ? BLANK_CRB : inm[2]; + c0m = (x == 2) ? BLANK_CRB : in0[0]; + c0p = (x == width) ? BLANK_CRB : in0[2]; + cpm = ((x == 2) || (y == height)) ? BLANK_CRB : inp[0]; + cp0 = (y == height) ? BLANK_CRB : inp[1]; + cpp = ((x == width) || (y == height)) ? BLANK_CRB : inp[2]; + } else if (y == 2) { + cmm = ((x == 2) || (y == 2)) ? BLANK_CRB : inm[0]; + cm0 = (y == 2) ? BLANK_CRB : inm[1]; + cmp = ((x == width) || (y == 2)) ? BLANK_CRB : inm[2]; + c0m = (x == 2) ? BLANK_CRB : in0[0]; + c0p = (x == width) ? BLANK_CRB : in0[2]; + cpm = ((x == 2) || (y == height)) ? BLANK_CRB : inp[0]; + cp0 = (y == height) ? BLANK_CRB : inp[1]; + cpp = ((x == width) || (y == height)) ? BLANK_CRB : inp[2]; + } else if (x == width) { + cmm = ((x == 2) || (y == 2)) ? BLANK_CRB : inm[0]; + cm0 = (y == 2) ? BLANK_CRB : inm[1]; + cmp = ((x == width) || (y == 2)) ? BLANK_CRB : inm[2]; + c0m = (x == 2) ? BLANK_CRB : in0[0]; + c0p = (x == width) ? BLANK_CRB : in0[2]; + cpm = ((x == 2) || (y == height)) ? BLANK_CRB : inp[0]; + cp0 = (y == height) ? BLANK_CRB : inp[1]; + cpp = ((x == width) || (y == height)) ? BLANK_CRB : inp[2]; + } else if (y == height) { + cmm = ((x == 2) || (y == 2)) ? BLANK_CRB : inm[0]; + cm0 = (y == 2) ? BLANK_CRB : inm[1]; + cmp = ((x == width) || (y == 2)) ? BLANK_CRB : inm[2]; + c0m = (x == 2) ? BLANK_CRB : in0[0]; + c0p = (x == width) ? BLANK_CRB : in0[2]; + cpm = ((x == 2) || (y == height)) ? BLANK_CRB : inp[0]; + cp0 = (y == height) ? BLANK_CRB : inp[1]; + cpp = ((x == width) || (y == height)) ? BLANK_CRB : inp[2]; + } else { + cmm = ((x == 2) || (y == 2)) ? BLANK_CRB : inm[0]; + cm0 = (y == 2) ? BLANK_CRB : inm[1]; + cmp = ((x == width) || (y == 2)) ? BLANK_CRB : inm[2]; + c0m = (x == 2) ? BLANK_CRB : in0[0]; + c0p = (x == width) ? BLANK_CRB : in0[2]; + cpm = ((x == 2) || (y == height)) ? BLANK_CRB : inp[0]; + cp0 = (y == height) ? BLANK_CRB : inp[1]; + cpp = ((x == width) || (y == height)) ? BLANK_CRB : inp[2]; + } + c00 = in0[1]; + + cmm = ((x == 2) || (y == 2)) ? BLANK_CRB : inm[0]; + cm0 = (y == 2) ? BLANK_CRB : inm[1]; + cmp = ((x == width) || (y == 2)) ? BLANK_CRB : inm[2]; + c0m = (x == 2) ? BLANK_CRB : in0[0]; + c0p = (x == width) ? BLANK_CRB : in0[2]; + cpm = ((x == 2) || (y == height)) ? BLANK_CRB : inp[0]; + cp0 = (y == height) ? BLANK_CRB : inp[1]; + cpp = ((x == width) || (y == height)) ? BLANK_CRB : inp[2]; +#else + cmm = ((x == 2) || (y == 2)) ? BLANK_CRB : inm[0]; + cm0 = (y == 2) ? BLANK_CRB : inm[1]; + cmp = ((x == width) || (y == 2)) ? BLANK_CRB : inm[2]; + c0m = (x == 2) ? BLANK_CRB : in0[0]; + c00 = in0[1]; + c0p = (x == width) ? BLANK_CRB : in0[2]; + cpm = ((x == 2) || (y == height)) ? BLANK_CRB : inp[0]; + cp0 = (y == height) ? BLANK_CRB : inp[1]; + cpp = ((x == width) || (y == height)) ? BLANK_CRB : inp[2]; +#endif + inm--; + in0--; + inp--; + + *(out1--) = (1*cpp + 3*(cp0+c0p) + 9*c00 + 8) >> 4; + *(out1--) = (1*cpm + 3*(cp0+c0m) + 9*c00 + 8) >> 4; + *(out0--) = (1*cmp + 3*(cm0+c0p) + 9*c00 + 8) >> 4; + *(out0--) = (1*cmm + 3*(cm0+c0m) + 9*c00 + 8) >> 4; + } + out1 -= width; + out0 -= width; + } +} + +// lame box filter +// the dampening of high frequencies depend +// on the directions these frequencies occur in the +// image, resulting in clear edges between certain +// group of pixels. + +static void ss_420jpeg_to_444(uint8_t *buffer, int width, int height) +{ +#ifndef HAVE_ASM_MMX + uint8_t *in, *out0, *out1; + int x, y; + in = buffer + (width * height / 4) - 1; + out1 = buffer + (width * height) - 1; + out0 = out1 - width; + for (y = height - 1; y >= 0; y -= 2) { + for (x = width - 1; x >= 0; x -=2) { + uint8_t val = *(in--); + *(out1--) = val; + *(out1--) = val; + *(out0--) = val; + *(out0--) = val; + } + out0 -= width; + out1 -= width; + } +#else + int x,y; + const int mmx_stride = width >> 3; + uint8_t *src = buffer + ((width * height) >> 2)-1; + uint8_t *dst = buffer + (width * height) -1; + uint8_t *dst2 = dst - width; + + for( y = height-1; y >= 0; y -= 2) + { + for( x = 0; x < mmx_stride; x ++ ) + { + movq_m2r( *src,mm0 ); + movq_m2r( *src,mm1 ); + movq_r2m(mm0, *dst ); + movq_r2m(mm1, *(dst+8) ); + movq_r2m(mm0, *dst2 ); + movq_r2m(mm1, *(dst2+8) ); + dst += 16; + dst2 += 16; + src += 8; + } + dst -= width; + dst2 -= width; + } +#endif +} + + +void ss_420_to_422(uint8_t *buffer, int width, int height) +{ + + //todo, 1x2 super sampling (box) +} + +void ss_422_to_420(uint8_t *buffer, int width, int height ) +{ + + //todo 2x1 down sampling (box) +} + +#ifdef HAVE_ASM_MMX +#undef HAVE_K6_2PLUS +#if !defined( HAVE_ASM_MMX2) && defined( HAVE_ASM_3DNOW ) +#define HAVE_K6_2PLUS +#endif + +#undef _EMMS + +#ifdef HAVE_K6_2PLUS +/* On K6 femms is faster of emms. On K7 femms is directly mapped on emms. */ +#define _EMMS "femms" +#else +#define _EMMS "emms" +#endif + +#endif + +#ifdef HAVE_ASM_MMX +/* for small memory blocks (<256 bytes) this version is faster */ +#define small_memcpy(to,from,n)\ +{\ +register unsigned long int dummy;\ +__asm__ __volatile__(\ + "rep; movsb"\ + :"=&D"(to), "=&S"(from), "=&c"(dummy)\ + :"0" (to), "1" (from),"2" (n)\ + : "memory");\ +} + +static inline void copy8( uint8_t *dst, uint8_t *in ) +{ + __asm__ __volatile__ ( + "movq (%0), %%mm0\n" + "movq %%mm0, (%1)\n" + :: "r" (in), "r" (dst) : "memory" ); +} + +static inline void copy16( uint8_t *dst, uint8_t *in) +{ + __asm__ __volatile__ ( + "movq (%0), %%mm0\n" + "movq 8(%0), %%mm1\n" + "movq %%mm0, (%1)\n" + "movq %%mm1, 8(%1)\n" + :: "r" (in), "r" (dst) : "memory" ); +} + +static inline void copy_width( uint8_t *dst, uint8_t *in, int width ) +{ + int w = width >> 4; + int x; + uint8_t *d = dst; + uint8_t *i = in; + + for( x = 0; x < w; x ++ ) + { + copy16( d, i ); + d += 16; + i += 16; + } + + x = (width % 16); + if( x ) + small_memcpy( d, i, x); +} + +static inline void load_mask16to8() +{ + const uint64_t mask = 0x00ff00ff00ff00ffLL; + const uint8_t *m = (uint8_t*)&mask; + + __asm __volatile( + "movq (%0), %%mm4\n\t" + :: "r" (m) + ); + +} + +static inline void down_sample16to8( uint8_t *out, uint8_t *in ) +{ + //@ down sample by dropping right pixels + __asm __volatile( + "movq (%0), %%mm1\n\t" + "movq 8(%0),%%mm3\n\t" + "pxor %%mm5,%%mm5\n\t" + "pand %%mm4,%%mm1\n\t" + "pand %%mm4,%%mm3\n\t" + "packuswb %%mm1,%%mm2\n\t" + "packuswb %%mm3,%%mm5\n\t" + "psrlq $32, %%mm2\n\t" + "por %%mm5,%%mm2\n\t" + "movq %%mm2, (%1)\n\t" + :: "r" (in), "r" (out) + ); +} +#endif +static void ss_444_to_422_cp(void *data, uint8_t *buffer, uint8_t *dest, int width, int height) +{ + const int dst_stride = width >> 1; + int x,y; +#ifdef HAVE_ASM_MMX + int mmxdst_stride=dst_stride >> 3; + int left = dst_stride % 8; +#endif + yuv_sampler_t *sampler = (yuv_sampler_t*) data; + uint8_t *src = sampler->buf; + uint8_t *dst; + +#ifdef HAVE_ASM_MMX + load_mask16to8(); +#endif + for(y = 0; y < height; y ++) + { + src = buffer + (y*width); + dst = dest + (y*dst_stride); + +#if defined (HAVE_ASM_MMX) || defined (HAVE_ASM_MMX2) + + for( x= 0; x < mmxdst_stride; x++ ) + { + down_sample16to8( dst, src ); + src += 16; + dst += 8; + } + for(x=0; x < left; x++) + { + *(dst++) = ( src[0] + src[1] + 1 ) >> 1; + src += 2; + } +#else + for(x=0; x < dst_stride; x++) + { + *(dst++) = ( src[0] + src[1] + 1 ) >> 1; + src += 2; + } + +#endif + } +} + + +static void ss_444_to_422(void *data, uint8_t *buffer, int width, int height) +{ + const int dst_stride = width >> 1; + int x,y; +#ifdef HAVE_ASM_MMX + int mmxdst_stride=dst_stride >> 3; + int left = dst_stride % 8; +#endif + yuv_sampler_t *sampler = (yuv_sampler_t*) data; + uint8_t *src = sampler->buf; + uint8_t *dst; + +#ifdef HAVE_ASM_MMX + load_mask16to8(); +#endif + for(y = 0; y < height; y ++) + { + src = sampler->buf; + dst = buffer + (y*dst_stride); + +#if defined (HAVE_ASM_MMX) || defined (HAVE_ASM_MMX2) + copy_width( src, buffer + (y*width), width ); + + for( x= 0; x < mmxdst_stride; x++ ) + { + down_sample16to8( dst, src ); + src += 16; + dst += 8; + } + for(x=0; x < left; x++) + { + *(dst++) = ( src[0] + src[1] + 1 ) >> 1; + src += 2; + } +#else + for( x = 0; x < dst_stride; x ++ ) + { + *(dst++) = (src[0] + src[1] + 1 ) >> 1; + src += 2; + } +#endif + } +} +#ifdef HAVE_ASM_MMX + +static inline void super_sample8to16( uint8_t *in, uint8_t *out ) +{ + //@ super sample by duplicating pixels + __asm__ __volatile__ ( + "\n\tpxor %%mm2,%%mm2" + "\n\tpxor %%mm4,%%mm4" + "\n\tmovq (%0), %%mm1" + "\n\tpunpcklbw %%mm1,%%mm2" + "\n\tpunpckhbw %%mm1,%%mm4" + "\n\tmovq %%mm2,%%mm5" + "\n\tmovq %%mm4,%%mm6" + "\n\tpsrlq $8, %%mm5" + "\n\tpsrlq $8, %%mm6" + "\n\tpor %%mm5,%%mm2" + "\n\tpor %%mm6,%%mm4" + "\n\tmovq %%mm2, (%1)" + "\n\tmovq %%mm4, 8(%1)" + :: "r" (in), "r" (out) + + ); +} +#endif + +static void tr_422_to_444(void *data, uint8_t *buffer, int width, int height) +{ + int x,y; + const int stride = width >> 1; + +#ifndef HAVE_ASM_MMX + for( y = height-1; y > 0 ; y -- ) + { + uint8_t *dst = buffer + (y * width); + uint8_t *src = buffer + (y * stride); + for(x=0; x < stride; x++) // for 1 row + { + dst[0] = src[x]; //put to dst + dst[1] = src[x]; + dst+=2; // increment dst + } + } +#else + + const int mmx_stride = stride >> 3; + int left = (mmx_stride % 8)-1; + if( left < 0 ) left = 0; + for( y = height-1; y > 0 ; y -- ) + { + uint8_t *src = buffer + (y * stride); + uint8_t *dst = buffer + (y * width); + for(x=0; x < mmx_stride; x++) // for 1 row + { + super_sample8to16(src,dst ); + src += 8; + dst += 16; + } + /* for(x=0; x < left; x++) // for 1 row + { + dst[0] = src[x]; //put to dst + dst[1] = src[x]; + dst+=2; // increment dst + }*/ + } +#endif +} + + + + +/* vertical intersitial siting; horizontal cositing + * + * Y Y Y Y + * C C + * Y Y Y Y + * + * Y Y Y Y + * C C + * Y Y Y Y + * + * [1,2,1] kernel for horizontal subsampling: + * + * inX[0] [1] [2] + * | | | + * C C C C + * \ | / + * \ | / + * C + */ + +static void ss_444_to_420mpeg2(uint8_t *buffer, int width, int height) +{ + uint8_t *in0, *in1, *out; + int x, y; + + in0 = buffer; /* points to */ + in1 = buffer + width; /* second of pair of lines */ + out = buffer; + for (y = 0; y < height; y += 2) { + /* first column boundary condition -- just repeat it to right */ + *out = (in0[0] + (2 * in0[0]) + in0[1] + + in1[0] + (2 * in1[0]) + in1[1]) >> 3; + out++; + in0++; + in1++; + /* rest of columns just loop */ + for (x = 2; x < width; x += 2) { + *out = (in0[0] + (2 * in0[1]) + in0[2] + + in1[0] + (2 * in1[1]) + in1[2]) >> 3; + in0 += 2; + in1 += 2; + out++; + } + in0 += width + 1; + in1 += width + 1; + } +} + + +void chroma_subsample_cp(subsample_mode_t mode, void *data, uint8_t *ycbcr[], uint8_t *dcbcr[], + int width, int height) +{ + switch (mode) { + case SSM_420_JPEG_BOX: + case SSM_420_JPEG_TR: + ss_444_to_420jpeg_cp(ycbcr[1],dcbcr[1], width, height); + ss_444_to_420jpeg_cp(ycbcr[2],dcbcr[2], width, height); + + break; + case SSM_420_MPEG2: + break; + case SSM_422_444: + ss_444_to_422_cp(data,ycbcr[1],dcbcr[1],width,height); + ss_444_to_422_cp(data,ycbcr[2],dcbcr[2],width,height); +#ifdef HAVE_ASM_MMX + __asm__ __volatile__ ( _EMMS:::"memory"); +#endif + break; + case SSM_420_422: + break; + default: + break; + } +} + + + + + +void chroma_subsample(subsample_mode_t mode, void *data, uint8_t *ycbcr[], + int width, int height) +{ + switch (mode) { + case SSM_420_JPEG_BOX: + case SSM_420_JPEG_TR: + ss_444_to_420jpeg(ycbcr[1], width, height); + ss_444_to_420jpeg(ycbcr[2], width, height); +#ifdef HAVE_ASM_MMX + __asm__ __volatile__ ( _EMMS:::"memory"); +#endif + break; + case SSM_420_MPEG2: + ss_444_to_420mpeg2(ycbcr[1], width, height); + ss_444_to_420mpeg2(ycbcr[2], width, height); + break; + case SSM_422_444: + ss_444_to_422(data,ycbcr[1],width,height); + ss_444_to_422(data,ycbcr[2],width,height); +#ifdef HAVE_ASM_MMX + __asm__ __volatile__ ( _EMMS:::"memory"); +#endif + break; + case SSM_420_422: + ss_422_to_420(ycbcr[1],width,height); + ss_422_to_420(ycbcr[2],width,height); + break; + default: + break; + } +} + + +void chroma_supersample(subsample_mode_t mode,void *data, uint8_t *ycbcr[], + int width, int height) +{ + switch (mode) { + case SSM_420_JPEG_BOX: + ss_420jpeg_to_444(ycbcr[1], width, height); + ss_420jpeg_to_444(ycbcr[2], width, height); +#ifdef HAVE_ASM_MMX + __asm__ __volatile__ ( _EMMS:::"memory"); +#endif + break; + case SSM_420_JPEG_TR: + tr_420jpeg_to_444(data,ycbcr[1], width, height); + tr_420jpeg_to_444(data,ycbcr[2], width, height); + break; + case SSM_422_444: + tr_422_to_444(data,ycbcr[1],width,height); + tr_422_to_444(data,ycbcr[2],width,height); +#ifdef HAVE_ASM_MMX + __asm__ __volatile__ ( _EMMS:::"memory"); +#endif + break; + case SSM_420_422: + ss_420_to_422( ycbcr[1], width, height ); + ss_420_to_422( ycbcr[2], width, height ); + break; + case SSM_420_MPEG2: + // ss_420mpeg2_to_444(ycbcr[1], width, height); + // ss_420mpeg2_to_444(ycbcr[2], width, height); + break; + default: + break; + } +} + + diff --git a/veejay-server/libyuv/yuvconv.c b/veejay-server/libyuv/yuvconv.c new file mode 100644 index 00000000..ce9aa680 --- /dev/null +++ b/veejay-server/libyuv/yuvconv.c @@ -0,0 +1,1027 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include SWSCALE_INC +#include +#include +#include +#include +#include AVUTIL_INC +#include AVCODEC_INC +/* this routine is the same as frame_YUV422_to_YUV420P , unpack + * libdv's 4:2:2-packed into 4:2:0 planar + * See http://mjpeg.sourceforge.net/ (MJPEG Tools) (lav-common.c) + */ + +#ifdef STRICT_CHECKING +#include +#endif + + +#ifdef HAVE_ASM_MMX +#undef HAVE_K6_2PLUS +#if !defined( HAVE_ASM_MMX2) && defined( HAVE_ASM_3DNOW ) +#define HAVE_K6_2PLUS +#endif + +#undef _EMMS + +#ifdef HAVE_K6_2PLUS +/* On K6 femms is faster of emms. On K7 femms is directly mapped on emms. */ +#define _EMMS "femms" +#else +#define _EMMS "emms" +#endif + +#endif + + +static int sws_context_flags_ = 0; +static int ffmpeg_aclib[64]; + +#define put(a,b) ffmpeg_aclib[a] = b + +static struct { + int i; + char *s; +} pixstr[] = { + {PIX_FMT_YUV420P, "PIX_FMT_YUV420P"}, +{ PIX_FMT_YUV422P, "PIX_FMT_YUV422P"}, +{ PIX_FMT_YUVJ420P, "PIX_FMT_YUVJ420P"}, +{ PIX_FMT_YUVJ422P, "PIX_FMT_YUVJ422P"}, +{ PIX_FMT_RGB24, "PIX_FMT_RGB24"}, +{ PIX_FMT_BGR24, "PIX_FMT_BGR24"}, +{ PIX_FMT_YUV444P, "PIX_FMT_YUV444P"}, +{ PIX_FMT_YUVJ444P, "PIX_FMT_YUVJ444P"}, +{ PIX_FMT_RGB32, "PIX_FMT_RGB32"}, +{ PIX_FMT_BGR32, "PIX_FMT_BGR32"}, +{ PIX_FMT_GRAY8, "PIX_FMT_GRAY8"}, +{ PIX_FMT_RGB32_1, "PIX_FMT_RGB32_1"}, +{ 0 , NULL} + +}; + +void yuv_pixstr( const char *s, char *s2, int fmt ) { + char *str = NULL; + int i; + for( i = 0; pixstr[i].s != NULL ; i ++ ) + if( fmt == pixstr[i].i ) str = pixstr[i].s; + if( str ) + veejay_msg(0, "%s: %s format %d : %s", s,s2,fmt, str ); + else + veejay_msg(0, "%s: format %d invalid", s, fmt ); +} + +void yuv_init_lib() +{ + sws_context_flags_ = yuv_sws_get_cpu_flags(); + + int my_ac_flags = ac_cpuinfo(); + + veejay_msg(VEEJAY_MSG_DEBUG, "CPU Flags available:", ac_flagstotext( my_ac_flags )); + + ac_init( AC_ALL ); + + ac_imgconvert_init(AC_ALL); + + veejay_memset( ffmpeg_aclib, 0, sizeof(ffmpeg_aclib )); + + put( PIX_FMT_YUV420P, IMG_YUV420P ); + put( PIX_FMT_YUV422P, IMG_YUV422P ); + put( PIX_FMT_YUV444P, IMG_YUV444P ); + put( PIX_FMT_YUVJ420P, IMG_YUV420P ); //@ pfff dont care + put( PIX_FMT_YUVJ422P, IMG_YUV422P ); + put( PIX_FMT_YUVJ422P, IMG_YUV444P ); +// put( PIX_FMT_RGB24, IMG_RGB24 ); +// put( PIX_FMT_BGR24, IMG_BGR24 ); + put( PIX_FMT_RGB24, IMG_BGR24 ); + put( PIX_FMT_BGR24, IMG_RGB24 ); +// put( PIX_FMT_RGB32, IMG_ARGB32 ); + put( PIX_FMT_RGB32, IMG_RGBA32 ); + put( PIX_FMT_RGBA, IMG_RGBA32 ); + put( PIX_FMT_RGB32_1, IMG_RGBA32 ); + put( PIX_FMT_GRAY8, IMG_Y8 ); +} + +VJFrame *yuv_yuv_template( uint8_t *Y, uint8_t *U, uint8_t *V, int w, int h, int fmt ) +{ + VJFrame *f = (VJFrame*) vj_calloc(sizeof(VJFrame)); + f->format = fmt; + f->data[0] = Y; + f->data[1] = U; + f->data[2] = V; + f->data[3] = NULL; + f->width = w; + f->height = h; + + switch(fmt) + { + case PIX_FMT_YUV422P: + case PIX_FMT_YUVJ422P: + f->uv_width = w>>1; + f->uv_height= f->height; + f->stride[0] = w; + f->stride[1] = f->stride[2] = f->stride[0]>>1; + break; + case PIX_FMT_YUV420P: + case PIX_FMT_YUVJ420P: + f->uv_width = w>>1; + f->uv_height=f->height>>1; + f->stride[0] = w; + f->stride[1] = f->stride[2] = f->stride[0]>>1; + break; + case PIX_FMT_YUV444P: + case PIX_FMT_YUVJ444P: + f->uv_width = w; + f->uv_height=f->height; + f->stride[0] = w; + f->stride[1] = f->stride[2] = f->stride[0]; + break; + case PIX_FMT_GRAY8: + f->uv_width = 0; + f->uv_height = 0; + f->stride[0] = w; + f->stride[1] = f->stride[2] = 0; + break; + default: +#ifdef STRICT_CHECKING + assert(0); +#endif + break; + } + + return f; +} + +VJFrame *yuv_rgb_template( uint8_t *rgb_buffer, int w, int h, int fmt ) +{ +#ifdef STRICT_CHECKING + assert( fmt == PIX_FMT_RGB24 || fmt == PIX_FMT_BGR24 || + fmt == PIX_FMT_RGBA || fmt == PIX_FMT_RGB32_1 || fmt == PIX_FMT_RGB32); + assert( w > 0 ); + assert( h > 0 ); +#endif + VJFrame *f = (VJFrame*) vj_calloc(sizeof(VJFrame)); + f->format = fmt; + f->data[0] = rgb_buffer; + f->data[1] = NULL; + f->data[2] = NULL; + f->data[3] = NULL; + f->width = w; + f->height = h; + + switch( fmt ) + { + case PIX_FMT_RGB24: + case PIX_FMT_BGR24: + f->stride[0] = w * 3; + break; + default: + f->stride[0] = w * 4; + break; + } + f->stride[1] = 0; + f->stride[2] = 0; + + return f; +} + +#define ru4(num) (((num)+3)&~3) + + +static struct +{ + int ffmpeg; + int aclib; +} ffmpegaclib[] = +{ + { PIX_FMT_YUV420P, IMG_YUV420P }, + { PIX_FMT_YUV422P, IMG_YUV422P }, + { PIX_FMT_YUV444P, IMG_YUV444P }, + { PIX_FMT_RGB24, IMG_RGB24 }, + { PIX_FMT_BGR24, IMG_BGR24 }, + { PIX_FMT_RGB32, IMG_ARGB32 }, + { PIX_FMT_RGBA, IMG_RGBA32 }, + { PIX_FMT_RGB32_1, IMG_RGBA32 }, + { PIX_FMT_GRAY8, IMG_GRAY8 }, + { -1, -1}, +}; + +void yuv_convert_any_ac( VJFrame *src, VJFrame *dst, int src_fmt, int dst_fmt ) +{ +#ifdef STRICT_CHECKING + assert( dst_fmt >= 0 && dst_fmt < 32 ); + assert( src_fmt == PIX_FMT_YUV420P || src_fmt == PIX_FMT_YUVJ420P || + src_fmt == PIX_FMT_YUV422P || src_fmt == PIX_FMT_YUVJ422P || + src_fmt == PIX_FMT_YUV444P || src_fmt == PIX_FMT_YUVJ444P || + src_fmt == PIX_FMT_RGB24 || src_fmt == PIX_FMT_RGBA || + src_fmt == PIX_FMT_BGR24 || src_fmt == PIX_FMT_RGB32 || + src_fmt == PIX_FMT_RGB32_1 || src_fmt == PIX_FMT_GRAY8 ); + assert( src->width > 0 ); + assert( dst->width > 0 ); +#endif + if(!ac_imgconvert( src->data, ffmpeg_aclib[ src_fmt ], + dst->data, ffmpeg_aclib[ dst_fmt] , dst->width,dst->height )) + { + veejay_msg(VEEJAY_MSG_WARNING, + "Unable to convert image %dx%d in %x to %dx%d in %x!", + src->width,src->height,src_fmt, + dst->width,dst->height,dst_fmt ); + yuv_pixstr( __FUNCTION__, "src_fmt", src_fmt ); + yuv_pixstr( __FUNCTION__, "dst_fmt", dst_fmt ); + + } +} +/* +void yuv_convert_any( VJFrame *src, VJFrame *dst, int src_fmt, int dst_fmt ) +{ + yuv_pixstr( __FUNCTION__, "src_fmt", src_fmt ); + yuv_pixstr( __FUNCTION__, "dst_fmt", dst_fmt ); + +#ifdef STRICT_CHECKING + assert( dst_fmt >= 0 && dst_fmt < 32 ); + assert( src_fmt == PIX_FMT_YUV420P || src_fmt == PIX_FMT_YUVJ420P || + src_fmt == PIX_FMT_YUV422P || src_fmt == PIX_FMT_YUVJ422P || + src_fmt == PIX_FMT_YUV444P || src_fmt == PIX_FMT_YUVJ444P || + src_fmt == PIX_FMT_RGB24 || src_fmt == PIX_FMT_RGBA || + src_fmt == PIX_FMT_BGR24 || src_fmt == PIX_FMT_RGB32 || + src_fmt == PIX_FMT_RGB32_1 || src_fmt == PIX_FMT_GRAY8 ); + assert( src->width > 0 ); + assert( dst->width > 0 ); +#endif + + struct SwsContext *ctx = sws_getContext( + src->width, + src->height, + src_fmt, + dst->width, + dst->height, + dst_fmt, + sws_context_flags_, + NULL,NULL,NULL ); + + sws_scale( ctx, src->data, src->stride,0, src->height,dst->data, dst->stride ); + + sws_freeContext( ctx ); +}*/ + +void *yuv_fx_context_create( VJFrame *src, VJFrame *dst, int src_fmt, int dst_fmt ) +{ + struct SwsContext *ctx = sws_getContext( src->width,src->height,src_fmt, dst->width,dst->height,dst_fmt, + sws_context_flags_, NULL,NULL,NULL ); + return (void*) ctx; +} + +void yuv_fx_context_process( void *ctx, VJFrame *src, VJFrame *dst ) +{ + sws_scale( ctx, src->data, src->stride,0,src->height,dst->data,dst->stride ); +} + +void yuv_fx_context_destroy( void *ctx ) +{ + struct SwsContext *stx = (struct SwsContext*) ctx; + sws_freeContext( stx ); +} + + +void yuv_convert_any3( VJFrame *src, int src_stride[3], VJFrame *dst, int src_fmt, int dst_fmt ) +{ +#ifdef STRICT_CHECKING + assert( dst_fmt >= 0 && dst_fmt < 32 ); + assert( src_fmt == PIX_FMT_YUV420P || src_fmt == PIX_FMT_YUVJ420P || + src_fmt == PIX_FMT_YUV422P || src_fmt == PIX_FMT_YUVJ422P || + src_fmt == PIX_FMT_YUV444P || src_fmt == PIX_FMT_YUVJ444P || + src_fmt == PIX_FMT_RGB24 || src_fmt == PIX_FMT_RGBA ); + assert( src_stride[0] > 0 ); + assert( dst->width > 0 ); + assert( dst->height > 0 ); + assert( dst->data[0] != NULL ); + assert( dst->data[1] != NULL ); + assert( dst->data[2] != NULL ); +#endif + struct SwsContext *ctx = sws_getContext( + src->width, + src->height, + src_fmt, + dst->width, + dst->height, + dst_fmt, + sws_context_flags_, + NULL,NULL,NULL ); + int dst_stride[3] = { ru4(dst->width),ru4(dst->uv_width),ru4(dst->uv_width) }; + + sws_scale( ctx, src->data, src_stride, 0, src->height, dst->data, dst_stride); + + sws_freeContext( ctx ); +} + + +/* convert 4:2:0 to yuv 4:2:2 packed */ +void yuv422p_to_yuv422(uint8_t * yuv420[3], uint8_t * dest, int width, + int height) +{ + unsigned int x, y; + + + for (y = 0; y < height; ++y) { + uint8_t *Y = yuv420[0] + y * width; + uint8_t *Cb = yuv420[1] + (y / 2) * (width); + uint8_t *Cr = yuv420[2] + (y / 2) * (width); + for (x = 0; x < width; x +=2) { + *(dest + 0) = Y[0]; + *(dest + 1) = Cb[0]; + *(dest + 2) = Y[1]; + *(dest + 3) = Cr[0]; + dest += 4; + Y += 2; + ++Cb; + ++Cr; + } + } +} + + + +/* convert 4:2:0 to yuv 4:2:2 */ +void yuv420p_to_yuv422(uint8_t * yuv420[3], uint8_t * dest, int width, + int height) +{ + unsigned int x, y; + + + for (y = 0; y < height; ++y) { + uint8_t *Y = yuv420[0] + y * width; + uint8_t *Cb = yuv420[1] + (y >> 1) * (width >> 1); + uint8_t *Cr = yuv420[2] + (y >> 1) * (width >> 1); + for (x = 0; x < width; x += 2) { + *(dest + 0) = Y[0]; + *(dest + 1) = Cb[0]; + *(dest + 2) = Y[1]; + *(dest + 3) = Cr[0]; + dest += 4; + Y += 2; + ++Cb; + ++Cr; + } + } +} + +#ifdef HAVE_ASM_MMX +#include "mmx_macros.h" +#include "mmx.h" + +/***************************************************************** + + _yuv_yuv_mmx.c + + Copyright (c) 2001-2002 by Burkhard Plaum - plaum@ipf.uni-stuttgart.de + + http://gmerlin.sourceforge.net + + 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, USA. + + + - took yuy2 -> planar 422 and 422 planar -> yuy2 mmx conversion + routines. + (Niels, 02/2005) + +*****************************************************************/ + +static mmx_t mmx_00ffw = { 0x00ff00ff00ff00ffLL }; + +#ifdef HAVE_ASM_MMX2 +//#ifdef MMXEXT +#define MOVQ_R2M(reg,mem) movntq_r2m(reg, mem) +#else +#define MOVQ_R2M(reg,mem) movq_r2m(reg, mem) +#endif + +#define PLANAR_TO_YUY2 movq_m2r(*src_y, mm0);/* mm0: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */\ + movd_m2r(*src_u, mm1);/* mm1: 00 00 00 00 U6 U4 U2 U0 */\ + movd_m2r(*src_v, mm2);/* mm2: 00 00 00 00 V6 V4 V2 V0 */\ + pxor_r2r(mm3, mm3);/* Zero mm3 */\ + movq_r2r(mm0, mm7);/* mm7: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */\ + punpcklbw_r2r(mm3, mm0);/* mm0: 00 Y3 00 Y2 00 Y1 00 Y0 */\ + punpckhbw_r2r(mm3, mm7);/* mm7: 00 Y7 00 Y6 00 Y5 00 Y4 */\ + pxor_r2r(mm4, mm4); /* Zero mm4 */\ + punpcklbw_r2r(mm1, mm4);/* mm4: U6 00 U4 00 U2 00 U0 00 */\ + pxor_r2r(mm5, mm5); /* Zero mm5 */\ + punpcklbw_r2r(mm2, mm5);/* mm5: V6 00 V4 00 V2 00 V0 00 */\ + movq_r2r(mm4, mm6);/* mm6: U6 00 U4 00 U2 00 U0 00 */\ + punpcklwd_r2r(mm3, mm6);/* mm6: 00 00 U2 00 00 00 U0 00 */\ + por_r2r(mm6, mm0); /* mm0: 00 Y3 U2 Y2 00 Y1 U0 Y0 */\ + punpcklwd_r2r(mm3, mm4);/* mm4: 00 00 U6 00 00 00 U4 00 */\ + por_r2r(mm4, mm7); /* mm7: 00 Y7 U6 Y6 00 Y5 U4 Y4 */\ + pxor_r2r(mm6, mm6); /* Zero mm6 */\ + punpcklwd_r2r(mm5, mm6);/* mm6: V2 00 00 00 V0 00 00 00 */\ + por_r2r(mm6, mm0); /* mm0: V2 Y3 U2 Y2 V0 Y1 U0 Y0 */\ + punpckhwd_r2r(mm5, mm3);/* mm3: V6 00 00 00 V4 00 00 00 */\ + por_r2r(mm3, mm7); /* mm7: V6 Y7 U6 Y6 V4 Y5 U4 Y4 */\ + MOVQ_R2M(mm0, *dst);\ + MOVQ_R2M(mm7, *(dst+8)); + + +#define YUY2_TO_YUV_PLANAR movq_m2r(*src,mm0);\ + movq_m2r(*(src+8),mm1);\ + movq_r2r(mm0,mm2);/* mm2: V2 Y3 U2 Y2 V0 Y1 U0 Y0 */\ + pand_m2r(mmx_00ffw,mm2);/* mm2: 00 Y3 00 Y2 00 Y1 00 Y0 */\ + pxor_r2r(mm4, mm4);/* Zero mm4 */\ + packuswb_r2r(mm4,mm2);/* mm2: 00 00 00 00 Y3 Y2 Y1 Y0 */\ + movq_r2r(mm1,mm3);/* mm3: V6 Y7 U6 Y6 V4 Y5 U4 Y4 */\ + pand_m2r(mmx_00ffw,mm3);/* mm3: 00 Y7 00 Y6 00 Y5 00 Y4 */\ + pxor_r2r(mm6, mm6);/* Zero mm6 */\ + packuswb_r2r(mm3,mm6);/* mm6: Y7 Y6 Y5 Y4 00 00 00 00 */\ + por_r2r(mm2,mm6);/* mm6: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */\ + psrlw_i2r(8,mm0);/* mm0: 00 V2 00 U2 00 V0 00 U0 */\ + psrlw_i2r(8,mm1);/* mm1: 00 V6 00 U6 00 V4 00 U4 */\ + packuswb_r2r(mm1,mm0);/* mm0: V6 U6 V4 U4 V2 U2 V0 U0 */\ + movq_r2r(mm0,mm1);/* mm1: V6 U6 V4 U4 V2 U2 V0 U0 */\ + pand_m2r(mmx_00ffw,mm0);/* mm0: 00 U6 00 U4 00 U2 00 U0 */\ + psrlw_i2r(8,mm1);/* mm1: 00 V6 00 V4 00 V2 00 V0 */\ + packuswb_r2r(mm4,mm0);/* mm0: 00 00 00 00 U6 U4 U2 U0 */\ + packuswb_r2r(mm4,mm1);/* mm1: 00 00 00 00 V6 V4 V2 V0 */\ + MOVQ_R2M(mm6, *dst_y);\ + movd_r2m(mm0, *dst_u);\ + movd_r2m(mm1, *dst_v); + +#define MMX_YUV422_YUYV " \n\ +movq (%1), %%mm0 # Load 8 Y y7 y6 y5 y4 y3 y2 y1 y0 \n\ +movd (%2), %%mm1 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\ +movd (%3), %%mm2 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\ +punpcklbw %%mm2, %%mm1 # v3 u3 v2 u2 v1 u1 v0 u0 \n\ +movq %%mm0, %%mm2 # y7 y6 y5 y4 y3 y2 y1 y0 \n\ +punpcklbw %%mm1, %%mm2 # v1 y3 u1 y2 v0 y1 u0 y0 \n\ +movq %%mm2, (%0) # Store low YUYV \n\ +punpckhbw %%mm1, %%mm0 # v3 y7 u3 y6 v2 y5 u2 y4 \n\ +movq %%mm0, 8(%0) # Store high YUYV \n\ +" + + +void yuv422_to_yuyv(uint8_t *src[3], uint8_t *dstI, int w, int h) +{ + int j,jmax,imax,i; + uint8_t *dst = dstI; + uint8_t *src_y = src[0]; + uint8_t *src_u = src[1]; + uint8_t *src_v = src[2]; + + jmax = w >> 3; + imax = h; + + for( i = imax; i-- ; ) + { + for( j = jmax ; j -- ; ) + { + __asm__( ".align 8" MMX_YUV422_YUYV + : : "r" (dst), "r" (src_y), "r" (src_u), + "r" (src_v) ); + + dst += 16; + src_y += 8; + src_u += 4; + src_v += 4; + } + } +#ifdef HAVE_ASM_MMX + __asm__ __volatile__ ( _EMMS:::"memory"); +#endif +} + + +void yuy2toyv16(uint8_t *dst_y, uint8_t *dst_u, uint8_t *dst_v, uint8_t *srcI, int w, int h ) +{ + int j,jmax,imax,i; + uint8_t *src = srcI; + + jmax = w / 8; + imax = h; + + for( i = 0; i < imax ;i ++ ) + { + for( j = 0; j < jmax ; j ++ ) + { + YUY2_TO_YUV_PLANAR; + src += 16; + dst_y += 8; + dst_u += 4; + dst_v += 4; + } + } +#ifdef HAVE_ASM_MMX + __asm__ __volatile__ ( _EMMS:::"memory"); +#endif +} + +void vj_yuy2toyv12(uint8_t * _y, uint8_t * _u, uint8_t * _v, uint8_t * input, + int width, int height) +{ + int j,jmax,imax,i; + uint8_t *src = input; + uint8_t *dst_y = _y; + uint8_t *dst_u = _u; + uint8_t *dst_v = _v; + jmax = width / 8; + imax = height; + + for( i = 0; i < imax ;i ++ ) + { + for( j = 0; j < jmax ; j ++ ) + { + YUY2_TO_YUV_PLANAR; + src += 16; + dst_y += 8; + dst_u += 4; + dst_v += 4; + } + dst_u += width; + dst_v += width; + } +#ifdef HAVE_ASM_MMX + __asm__ __volatile__ ( _EMMS:::"memory"); +#endif +} +#else +// non mmx functions + +void vj_yuy2toyv12(uint8_t * _y, uint8_t * _u, uint8_t * _v, uint8_t * input, + int width, int height) +{ + int i, j, w2; + uint8_t *y, *u, *v; + + w2 = width / 2; + + //I420 + y = _y; + v = _v; + u = _u; + + for (i = 0; i < height; i += 4) { + /* top field scanline */ + for (j = 0; j < w2; j++) { + /* packed YUV 422 is: Y[i] U[i] Y[i+1] V[i] */ + *(y++) = *(input++); + *(u++) = *(input++); + *(y++) = *(input++); + *(v++) = *(input++); + } + for (j = 0; j < w2; j++) + { + *(y++) = *(input++); + *(u++) = *(input++); + *(y++) = *(input++); + *(v++) = *(input++); + + } + + /* next two scanlines, one frome each field , interleaved */ + for (j = 0; j < w2; j++) { + /* skip every second line for U and V */ + *(y++) = *(input++); + input++; + *(y++) = *(input++); + input++; + } + /* bottom field scanline*/ + for (j = 0; j < w2; j++) { + /* skip every second line for U and V */ + *(y++) = *(input++); + input++; + *(y++) = *(input++); + input++; + } + + } +} + +void yuy2toyv16(uint8_t * _y, uint8_t * _u, uint8_t * _v, uint8_t * input, + int width, int height) +{ + + int i, j, w2; + uint8_t *y, *u, *v; + + w2 = width / 2; + + //YV16 + y = _y; + v = _v; + u = _u; + + for (i = 0; i < height; i ++ ) + { + for (j = 0; j < w2; j++) { + /* packed YUV 422 is: Y[i] U[i] Y[i+1] V[i] */ + *(y++) = *(input++); + *(u++) = *(input++); + *(y++) = *(input++); + *(v++) = *(input++); + } + } +} + +void yuv422_to_yuyv(uint8_t *yuv422[3], uint8_t *pixels, int w, int h) +{ + int x,y; + uint8_t *Y = yuv422[0]; + uint8_t *U = yuv422[1]; + uint8_t *V = yuv422[2]; // U Y V Y + for(y = 0; y < h; y ++ ) + { + Y = yuv422[0] + y * w; + U = yuv422[1] + (y>>1) * w; + V = yuv422[2] + (y>>1) * w; + for( x = 0 ; x < w ; x += 4 ) + { + *(pixels + 0) = Y[0]; + *(pixels + 1) = U[0]; + *(pixels + 2) = Y[1]; + *(pixels + 3) = V[0]; + *(pixels + 4) = Y[2]; + *(pixels + 5) = U[1]; + *(pixels + 6) = Y[3]; + *(pixels + 7) = V[1]; + pixels += 8; + Y+=4; + U+=2; + V+=2; + } + } +} + +#endif + + +/* lav_common - some general utility functionality used by multiple + lavtool utilities. */ + +/* Copyright (C) 2000, Rainer Johanni, Andrew Stevens */ +/* - added scene change detection code 2001, pHilipp Zabel */ +/* - broke some code out to lav_common.h and lav_common.c + * July 2001, Shawn Sulma . In doing this, + * I replaced the large number of globals with a handful of structs + * that are passed into the appropriate methods. Check lav_common.h + * for the structs. I'm sure some of what I've done is inefficient, + * subtly incorrect or just plain Wrong. Feedback is welcome. + */ + + +int luminance_mean(uint8_t * frame[], int w, int h) +{ + uint8_t *p; + uint8_t *lim; + int sum = 0; + int count = 0; + p = frame[0]; + lim = frame[0] + w * (h - 1); + while (p < lim) { + sum += (p[0] + p[1]) + (p[w - 3] + p[w - 2]); + p += 31; + count += 4; + } + + w = w / 2; + h = h / 2; + + p = frame[1]; + lim = frame[1] + w * (h - 1); + while (p < lim) { + sum += (p[0] + p[1]) + (p[w - 3] + p[w - 2]); + p += 31; + count += 4; + } + p = frame[2]; + lim = frame[2] + w * (h - 1); + while (p < lim) { + sum += (p[0] + p[1]) + (p[w - 3] + p[w - 2]); + p += 31; + count += 4; + } + return sum / count; +} + +typedef struct +{ + struct SwsContext *sws; + SwsFilter *src_filter; + SwsFilter *dst_filter; +} vj_sws; + +void* yuv_init_swscaler(VJFrame *src, VJFrame *dst, sws_template *tmpl, int cpu_flagss) +{ + vj_sws *s = (vj_sws*) vj_malloc(sizeof(vj_sws)); + if(!s) + return NULL; + + int sws_type = 0; + + veejay_memset( s, 0, sizeof(vj_sws) ); + + int cpu_flags = 0; + +#ifdef HAVE_ASM_MMX + cpu_flags = cpu_flags | SWS_CPU_CAPS_MMX; +#endif +#ifdef HAVE_ASM_3DNOW + cpu_flags = cpu_flags | SWS_CPU_CAPS_3DNOW; +#endif +#ifdef HAVE_ASM_MMX2 + cpu_flags = cpu_flags | SWS_CPU_CAPS_MMX2; +#endif +#ifdef HAVE_ALTIVEC + cpu_flags = cpu_flags | SWS_CPU_CAPS_ALTIVEC; +#endif + switch(tmpl->flags) + { + case 1: + cpu_flags = cpu_flags|SWS_FAST_BILINEAR; + break; + case 2: + cpu_flags = cpu_flags|SWS_BILINEAR; + break; + case 3: + cpu_flags = cpu_flags|SWS_BICUBIC; + break; + case 4: + cpu_flags = cpu_flags |SWS_POINT; + break; + case 5: + cpu_flags = cpu_flags|SWS_X; + break; + case 6: + cpu_flags = cpu_flags | SWS_AREA; + break; + case 7: + cpu_flags = cpu_flags | SWS_BICUBLIN; + break; + case 8: + cpu_flags = cpu_flags | SWS_GAUSS; + break; + case 9: + cpu_flags = cpu_flags | SWS_SINC; + break; + case 10: + cpu_flags = cpu_flags |SWS_LANCZOS; + break; + case 11: + cpu_flags = cpu_flags | SWS_SPLINE; + break; + } + + s->sws = sws_getContext( + src->width, + src->height, + src->format, + dst->width, + dst->height, + dst->format, + cpu_flags, + s->src_filter, + s->dst_filter, + NULL + ); + + if(!s->sws) + { + if(s)free(s); + return NULL; + } + + return ((void*)s); + +} + +void yuv_crop(VJFrame *src, VJFrame *dst, VJRectangle *rect ) +{ + int x; + int y; + uint8_t *sy = src->data[0]; + uint8_t *su = src->data[1]; + uint8_t *sv = src->data[2]; + + uint8_t *dstY = dst->data[0]; + uint8_t *dstU = dst->data[1]; + uint8_t *dstV = dst->data[2]; + int i = 0; + + for( i = 0 ; i < 3 ; i ++ ) + { + int j = 0; + uint8_t *srcPlane = src->data[i]; + uint8_t *dstPlane = dst->data[i]; + for( y = rect->top ; y < ( src->height - rect->bottom ); y ++ ) + { + for ( x = rect->left ; x < ( src->width - rect->right ); x ++ ) + { + dstPlane[j] = srcPlane[ y * src->width + x ]; + j++; + } + } + } + +} + +VJFrame *yuv_allocate_crop_image( VJFrame *src, VJRectangle *rect ) +{ + int w = src->width - rect->left - rect->right; + int h = src->height - rect->top - rect->bottom; + + if( w <= 0 ) + return NULL; + if( h <= 0 ) + return NULL; + + VJFrame *new = (VJFrame*) vj_malloc(sizeof(VJFrame)); + if(!new) + return NULL; + + new->width = w; + new->height = h; + new->uv_len = (w >> src->shift_h) * (h >> src->shift_v ); + new->len = w * h; + new->uv_width = (w >> src->shift_h ); + new->uv_height = (h >> src->shift_v ); + new->shift_v = src->shift_v; + new->shift_h = src->shift_h; + + return new; +} + + +void yuv_free_swscaler(void *sws) +{ + if(sws) + { + vj_sws *s = (vj_sws*) sws; + if(s->sws) + sws_freeContext( s->sws ); + if(s) free(s); + } +} + +void yuv_convert_and_scale_gray_rgb(void *sws,VJFrame *src, VJFrame *dst) +{ + vj_sws *s = (vj_sws*) sws; + int src_stride[3] = { src->width,0,0 }; + int dst_stride[3] = { src->width * 3, 0,0 }; + + sws_scale( s->sws, src->data,src_stride, 0,src->height, + dst->data, dst_stride ); +} + + +void yuv_convert_and_scale_rgb(void *sws , VJFrame *src, VJFrame *dst) +{ + vj_sws *s = (vj_sws*) sws; + int src_stride[3] = { src->width,src->uv_width,src->uv_width }; + int dst_stride[3] = { dst->width*3,0,0 }; + + sws_scale( s->sws, src->data, src_stride, 0, src->height, + dst->data, dst_stride ); +} +void yuv_convert_and_scale(void *sws , VJFrame *src, VJFrame *dst) +{ + vj_sws *s = (vj_sws*) sws; + int src_stride[3] = { src->width,src->uv_width,src->uv_width }; + int dst_stride[3] = { dst->width,dst->uv_width,dst->uv_width }; + + sws_scale( s->sws, src->data, src_stride, 0, src->height, + dst->data, dst_stride ); +} +void yuv_convert_and_scale_grey(void *sws , VJFrame *src, VJFrame *dst) +{ + vj_sws *s = (vj_sws*) sws; + int src_stride[3] = { src->width,0,0 }; + int dst_stride[3] = { dst->width,0,0 }; + + sws_scale( s->sws, src->data, src_stride, 0, src->height, + dst->data, dst_stride ); +} + +int yuv_sws_get_cpu_flags(void) +{ + int cpu_flags = 0; +#ifdef HAVE_ASM_MMX + cpu_flags = cpu_flags | SWS_CPU_CAPS_MMX; +#endif +#ifdef HAVE_ASM_3DNOW + cpu_flags = cpu_flags | SWS_CPU_CAPS_3DNOW; +#endif +#ifdef HAVE_ASM_MMX2 + cpu_flags = cpu_flags | SWS_CPU_CAPS_MMX2; +#endif +#ifdef HAVE_ALTIVEC + cpu_flags = cpu_flags | SWS_CPU_CAPS_ALTIVEC; +#endif + + cpu_flags = cpu_flags | SWS_FAST_BILINEAR; + + return cpu_flags; +} + +void yuv_deinterlace( + uint8_t *data[3], + const int width, + const int height, + int out_pix_fmt, + int shift, + uint8_t *Y,uint8_t *U, uint8_t *V ) +{ + AVPicture p,q; + p.data[0] = data[0]; + p.data[1] = data[1]; + p.data[2] = data[2]; + p.linesize[0] = width; + p.linesize[1] = width >> shift; + p.linesize[2] = width >> shift; + q.data[0] = Y; + q.data[1] = U; + q.data[2] = V; + q.linesize[0] = width; + q.linesize[1] = width >> shift; + q.linesize[2] = width >> shift; + avpicture_deinterlace( &p,&q, out_pix_fmt, width, height ); +} + + +void rgb_deinterlace( + uint8_t *data[3], + const int width, + const int height, + int out_pix_fmt, + int shift, + uint8_t *R,uint8_t *G, uint8_t *B ) +{ + AVPicture p,q; + p.data[0] = data[0]; + p.data[1] = data[1]; + p.data[2] = data[2]; + p.linesize[0] = width * 3; + p.linesize[1] = 0; + p.linesize[2] = 0; + q.data[0] = R; + q.data[1] = G; + q.data[2] = B; + q.linesize[0] = width; + q.linesize[1] = 0; + q.linesize[2] = 0; + avpicture_deinterlace( &p,&q, out_pix_fmt, width, height ); +} + + +static struct +{ + int i; + const char *name; +} sws_scaler_types[] = +{ + { 1, "Fast bilinear (default)" }, + { 2, "Bilinear" }, + { 3, "Bicubic" }, + { 4, "Nearest neighbour"}, + { 5, "Experimental"}, + { 6, "Area"}, + { 7, "Linear bicubic"}, + { 8, "Gaussian"}, + { 9, "Sinc"}, + { 10, "Lanzcos"}, + { 11, "Natural bicubic spline"}, + { 0, NULL } +}; + +char *yuv_get_scaler_name(int id) +{ + int i; + for( i = 0; sws_scaler_types[i].i != 0 ; i ++ ) + if( id == sws_scaler_types[i].i ) + return sws_scaler_types[i].name; + return NULL; +} diff --git a/veejay-server/libyuv/yuvconv.h b/veejay-server/libyuv/yuvconv.h new file mode 100644 index 00000000..7d164500 --- /dev/null +++ b/veejay-server/libyuv/yuvconv.h @@ -0,0 +1,136 @@ +#ifndef YUVCONF_H +#define YUVCONF_H +/* Veejay - A visual instrument and realtime video sampler + * Copyright (C) 2004 Niels Elburg + * + * YUV library for veejay. + * + * Mjpegtools, (C) The Mjpegtools Development Team (http://mjpeg.sourceforge.net) + * Copyright (C) 2001 Matthew J. Marjanovic + * + * 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. + * + */ +typedef enum subsample_mode { + SSM_UNKNOWN = 0, + SSM_420_JPEG_TR = 1, + SSM_420_JPEG_BOX = 2, + SSM_420_MPEG2 = 3, + SSM_422_444 = 4, + SSM_420_422 = 5, + SSM_COUNT = 6, +} subsample_mode_t; + +extern const char *ssm_id[SSM_COUNT]; +extern const char *ssm_description[SSM_COUNT]; + +void *subsample_init(int buf_len); +void subsample_free(void *sampler); + +void chroma_subsample(subsample_mode_t mode, void *sampler, uint8_t * ycbcr[], + int width, int height); +void chroma_subsample_cp(subsample_mode_t mode, void *data, uint8_t *ycbcr[], uint8_t *dcbcr[], + int width, int height); + +void chroma_supersample(subsample_mode_t mode, void *sampler, uint8_t * ycbcr[], + int width, int height); + +// yuv 4:2:2 packed to yuv 4:2:0 planar +void vj_yuy2toyv12( uint8_t *y, uint8_t *u, uint8_t *v, uint8_t *in, int w, int h); +// yuv 4:2:2 packet to yuv 4:2:2 planar +void yuy2toyv16( uint8_t *y, uint8_t *u, uint8_t *v, uint8_t *in, int w, int h); +// yuv 4:2:2 planar to yuv 4:2:2 packed +void yuv422p_to_yuv422( uint8_t *yuv422[3], uint8_t *dst, int w, int h ); + +// yuv 4:2:2 planar to yuv 4:2:0 planar +void yuv420p_to_yuv422( uint8_t *yuv420[3], uint8_t *dst, int w, int h ); + +// yuv 4:2:2 planar to YUYV +void yuv422_to_yuyv( uint8_t *yuv422[3], uint8_t *dst, int w, int h ); + +// scene detection +int luminance_mean(uint8_t * frame[], int w, int h); + +/* software scaler from ffmpeg project: */ + +typedef struct +{ + float lumaGBlur; + float chromaGBlur; + float lumaSarpen; + float chromaSharpen; + float chromaHShift; + float chromaVShift; + int verbose; + int flags; + int use_filter; +} sws_template; + +void yuv_init_lib(); + +void* yuv_init_swscaler(VJFrame *src, VJFrame *dst, sws_template *templ, int cpu_flags); + +void yuv_convert_and_scale( void *sws, VJFrame *src, VJFrame *dst ); + +void yuv_convert_and_scale_rgb( void *sws, VJFrame *src, VJFrame *dst ); + +void yuv_convert_and_scale_gray_rgb(void *sws,VJFrame *src, VJFrame *dst); + +void yuv_convert_and_scale_grey(void *sws , VJFrame *src, VJFrame *dst); + +int yuv_sws_get_cpu_flags(void); + +void yuv_free_swscaler(void *sws); + +void yuv_crop(VJFrame *src, VJFrame *dst, VJRectangle *rect ); + +VJFrame *yuv_allocate_crop_image( VJFrame *src, VJRectangle *rect ); + +void yuv_deinterlace( + uint8_t *data[3], + const int width, + const int height, + int out_pix_fmt, + int shift, + uint8_t *Y,uint8_t *U, uint8_t *V ); + + +void yuv_init_lib(); + +void yuv_free_lib(); + +void yuv_convert_ac( VJFrame *src, VJFrame *dst, int a, int b ); + +//void yuv_convert_any( VJFrame *src, VJFrame *dst, int a, int b ); + +void yuv_convert_any3( VJFrame *src,int strides[], VJFrame *dst, int a, int b ); + + +VJFrame *yuv_rgb_template( uint8_t *rgb_buffer, int w, int h, int fmt ); + +VJFrame *yuv_yuv_template( uint8_t *Y, uint8_t *U, uint8_t *V, int w, int h, int fmt ); + +char *yuv_get_scaler_name(int id); + +void yuv_convert_any_ac( VJFrame *src, VJFrame *dst, int src_fmt, int dst_fmt ); + +void *yuv_fx_context_create( VJFrame *src, VJFrame *dst, int src_fmt, int dst_fmt ); + +void yuv_fx_context_process( void *ctx, VJFrame *src, VJFrame *dst ); + +void yuv_fx_context_destroy( void *ctx ); + + +#endif diff --git a/veejay-server/ltmain.sh b/veejay-server/ltmain.sh new file mode 100644 index 00000000..2160ef7b --- /dev/null +++ b/veejay-server/ltmain.sh @@ -0,0 +1,6938 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="1.5.24 Debian 1.5.24-1ubuntu1" +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.[fF][09]?) xform=[fF][09]. ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/veejay-server/man/Makefile.am b/veejay-server/man/Makefile.am new file mode 100644 index 00000000..015e8d31 --- /dev/null +++ b/veejay-server/man/Makefile.am @@ -0,0 +1,3 @@ +man_MANS = veejay.1 +EXTRA_DIST = $(man_MANS) +MAINTAINERCLEANFILES = Makefile.in diff --git a/veejay-server/man/Makefile.in b/veejay-server/man/Makefile.in new file mode 100644 index 00000000..093a76a5 --- /dev/null +++ b/veejay-server/man/Makefile.in @@ -0,0 +1,448 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = man +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" +NROFF = nroff +MANS = $(man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +man_MANS = veejay.1 +EXTRA_DIST = $(man_MANS) +MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu man/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(MANS) +installdirs: + for dir in "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man + +uninstall-man: uninstall-man1 + +.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-man1 \ + 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 uninstall-man uninstall-man1 + +# 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/veejay-server/man/veejay.1 b/veejay-server/man/veejay.1 new file mode 100644 index 00000000..0591a3bb --- /dev/null +++ b/veejay-server/man/veejay.1 @@ -0,0 +1,449 @@ +.TH "veejay" 1 +.SH NAME +veejay - a visual (video) instrument and video sampler for GNU/Linux +.SH SYNOPSIS +.B veejay [options] Videofile1 [Videofile2 ... VideofileN] +.SH DESCRIPTION +.B veejay +Veejay is a visual instrument and realtime video sampler. It allos you +to "play" the video like you would play a Piano and it allows you to +record the resulting video directly to disk for immediate playback (video sampling). + +Veejay can be operated live by using the keyboard (which is 100% user definable) +and remotely over network (both unicast and multicast) using an inhouse message +system that allows mapping of various protocols on top of it, including OSC. + +Veejay is beeing developed in the hope it will be usefull for VJ's , media artists +theathers and other interested users that want to use Free Software for their +performances and/or video installations. + +.TP +.SH Supported video codecs +.TP +MJPEG (either jpeg 4:2:0 or jpeg 4:2:2), YUV 4:2:0 i420/yv12 AVI, Quasar DV codec (only I-frames), MPEG4 (only I-frames) +.TP +.SH Supported video containers +AVI , QuickTime +.TP +.SH Audio +.TP +Veejay uses Jack , a low latency audio server, to transport (playback) audio in sync with video. This allows you to process veejay's audio output in another sound processing application. +.TP +.SH General Usage (How to work with veejay) +.TP +Veejay has a console- and a video window ; the console is used for displaying messages only. If the mouse is moved over to the video window, you can use the keyboard like a piano to play/manipulate the video. +.TP +You can start veejay with multiple files , video files and/or Mjpegtools' EditList files. Upon startup, veejay creates a new EditList in memory containing all the files you have loaded. As a result, all files will appear as a single large video file.Next you can start making selections (samples) of your EditList. These samples will be placed in so called 'sample banks' and they can be triggered for playback by pressing the F-keys (1 to 12). You can select a bank by pressing a number 1 to 9. +.TP +Note that if you change the EditList (for example , when deleting portions of your editlist) you should save your editlist as well as your samplelist. +.TP +You can select effects to put on your samples by pressing the cursor keys up and down, once you have found an effect you would like to use, press ENTER and it will be added to the current chain entry. The current chain entry can be changed with the PLUG and MINUS key on your numeric keyboard. Look at the KEYBINDS in this manual page to see what other possibilities you could have. +.TP +.SH Interoperability +.TP +Veejay can be used with PD (PureData) by using sendVIMS, a small commandline utility that translates PD's symbols to veejay and vice versa.Look at the REFERENCES to find out where to download this utility. Also, by using the OpenSoundControl veejay can be used with a great number of sound and video processing applications.Also veejay can stream video data to STDOUT (-o stdout -O3) in yuv4mpeg format, or stream uncompressed video over the network (uni - and multicast) +.SH OPTIONS +.TP +.B \-p/--portoffset +TCP port offset for communication with clients like 'reloaded' , 'sayVIMS' or sendVIMS for PD (default 3490) +.TP +.B \-h/--host +Start as client of another veejay session (default is server) +.TP +.B \-o/--outstream +write video in YCbCr (YUV 4:2:0) format to specified file. Use this with -O3. +If you use 'stdout' here, veejay will be silent and write yuv4mpeg streams to STDOUT +.TP +.B \-O/--output [012345] +specify video output 0 = SDL (default) 1 = DirectFB 2 = SDL and DirectFB 3 = YUV4MPEG stream , 4 = Open GL (required ARB fragment shader), 5 = Silent (no visual output) +.TP +.B \-s/--size NxN +Scaled video dimensions for SDL video output +.TP +.B \-a/--audio [01] +Play audio 0 = off , 1 = on (default) +.TP +.B \-c/--synchronization [01] +Sync correction off/on (default on) +.TP +.B \-P/--preverse-pathnames +Do not 'canonicalise' pathnames in editlists +.TP +.B \-v/--verbose +verbosity on/off +.TP +.B \-t/--timer [012] +timer to use ( none, normal, rtc ) +.TP +.B \-f/--fps +Override framerate of video +.TP +.B \-x/--geometryx +Geometry x offset for SDL video window +.TP +.B \-y/--geometryy +Geometry y offset for SDL video window +.TP +.B \-l/--action-file +Configuration File to load at initialization. +The configuration file stores custom keybindings, custom bundles, available VIMS events, editlist,samplelist,streamlist +and commandline options. +.TP +.B \-b/--bezerk +Bezerk mode, if enabled it allows you to change input channels on the fly (without restarting the samples) +.TP +.B \-g/--clip-as-sample +Load every file on the commandline as a new sample +.TP +.B \-q/--quit +Quit at end of video +.TP +.B \-n/--no-color +Dont use colored text. +.TP +.B \-m/--memory [0-100] +Frame cache size in percentage of total system RAM +.TP +.B \-j/--max_cache [0-100] +Maximum number of samples to cache +.TP +.B \-F/--features +Show compiled in options +.TP +.B \-Y/--yuv [0123] +Force pixel format if you get a corrupted image. Its recommanded to load +only one videofile and re-record it. +.TP +.B \-d/--dummy +Start veejay with no video files (dummy mode). By default it will play black video (Stream 1 [F1]) +.TP +.B \-W/--width +Specify width of dummy video. +.TP +.B \-H/--height +Specify height of dummy video +.TP +.B \-R/--framerate +Specify framerate of dummy video +.TP +.B \-N [01] +Specify norm of dummy video (0=PAL, 1=NTSC). defaults to PAL +.TP +.B \-M/--multicast-osc
+Starts OSC receiver in multicast mode +.TP +.B \-T/--multicast-vims
+Setup additional multicast frame sender / command receiver. +The frame sender transmits on port offset + 3, send commands to port offset + 4, +.TP +.B \ /--map-from-file +To reduce transfers between memory and disk, you can set a number +of frames to be cached in memory from file (only valid for rawDV and AVI) +Use smaller values for better performance (mapping several hundreds of +megabytes can become a problem) +.TP +.B \-V/--viewport +Start with source viewport enabled. Use this if you have previously setup +a viewport. Use CTRL+v to enable the viewport setup. +.TP +.B \-A/--all +Start with all capture devices active as streams +.TP +.B \-D/--composite +Start with projection enabled. Use this if you need to calibrate your +projection (beamer). Use CTRL+p to enable the viewport setup. +.TP +.TP +.SH Environment variables +.TP +.B VEEJAY_SET_CPU +Tell veejay which CPU to use (and lock) for rendering. By default +veejay will lock CPU #1 if running on a SMP machine. +Use "0" to disable this behaviour. Use 1 for CPU#1, etc. +.TP +.SH Home directory +.TP +Veejay creates a new directory in your HOME , ".veejay". +.TP +.B .veejay/recovery +If veejay stops unexpectedly, it will try to save your samplelist and editlist before aborting. +.TP +.B .veejay/theme +Theme directory for GVeejayReloaded. +.TP +.B .veejay/plugins.cfg +If you want to load frei0r or freeframe plugins , set the paths +to the .so files in the plugins.cfg file. Only support for single +channel plugins. +.TP +.SH EXAMPLES +.TP +.B veejay -u |less +Startup veejay and list all events (VIMS/OSC) and effect descriptions +.TP +.B veejay -p 4000 ~/my_video1.avi +Startup veejay listening on port 4000 (use this to use multiple veejays) +.TP +.B veejay -d -W 352 -H 288 -R 25 -N 0 +Startup veejay using dummy video at 25 frames per second, dimensions 352x288 +and using PAL. +.TP +.B veejay movie1.avi -V 224.0.0.50 -p 5000 -n -v -L +Startup veejay, using multicast protocol on port 5000 , with autolooping +and no colored verbose output +.TP +.B veejay -O4 ~/my_video1.avi +Startup veejay with openGL video window +.TP +.SH INTERFACE COMMANDS (STDIN) +When you are running veejay with a SDL window you can use keybindings for +realtime interaction. See +.B KEYBINDINGS +for details. +.TP + +.SH KEYBINDINGS +.TP +.B [Keypad *] +Set sample looptype +.TP +.B [Keypad -] +Decrease chain index pointer +.TP +.B [Keypad +] +Increase chain index pointer +.TP +.B [Keypad 1] +Goto start of sample +.TP +.B [Keypad 2] +Go back 25 frames +.TP +.B [Keypad 3] +Goto end of sample +.TP +.B [Keypad 4] +Play backward +.TP +.B [Keypad 5] +Pause +.TP +.B [Keypad 6] +Play forward +.TP +.B [Keypad 7] +Goto previous frame +.TP +.B [Keypad 8] +Go forward 25 frames +.TP +.B [Keypad 9] +Goto next frame +.TP +.B [Keypad /] +Switch to Plain video playback mode (from Sample or Tag mode) +.TP +.B [LEFT BRACKET] +Set sample start +.TP +.B [RIGHT BRACKET] +Set sample end and create new sample +.TP +.B [ALT] + [LEFT BRACKET] +Set marker start +.TP +.B [ALT] + [LEFT BRACKET] +Set marker end and activate marker +.TP +.B [Backspace] +Delete current marker +.TP +.B [a,s,d,f,g,h,j,k,l] +Set playback speed to 1,2,3,4,5,6,7,8, or 9 +.TP +.B [ALT] + [a|s|d|f|g|h|j|k|l] +Set frame duplicator to 1,2,3,4,5,6,7,8 or 9 +.TP +.B [1..9] +Set sample range 0-12, 12-24, 24-36 etc. +.TP +.B ALT + [1..9] +Set channel ID 1-9, depending on sample range +.TP +.B [F1..F12] +Select and play sample 1 .. 12 +.TP +.B [DELETE] +Delete selected effect +.TP +.B [Home] +Print sample/tag information +.TP +.B [ESC] +Switch between Plain -> Tag or Sample playback mode +.TP +.B [CURSOR RIGHT] +Go up 5 positions in the effect list +.TP +.B [CURSOR LEFT] +Go back 5 positions in the effect list +.TP +.B [UP] +Go up 1 position in the effect list +.TP +.B [DOWN] +Go down 1 position in the effect list +.TP +.B [RETURN | ENTER] +Add selected effect from list to sample +.TP +.B [v] +Toggle sample's playlist +.TP +.B [-] +Decrease mixing channel ID +.TP +.B [=] +Increase mixing channel ID +.TP +.B SLASH +Toggle mixing source between Clips and Streams +.TP +.B [z] +Audio Fade in decrease (*) +.TP +.B [x] +Audio Fade in increase (*) +.TP +.B [b] +Toggle a selected effect on/off +.TP +.B [END] +Enable/Disable Effect Chain +.TP +.B [Left ALT] + [END] +Enable/Disable Video on selected Entry +.TP +.B [Right ALT] + [END] +Enable/Disable Audio on selected Entry +.TP +.B [LCTRL] + [END] +Enable/Disable Video on selected Entry +.TP +.B [RCTRL] + [END] +Enable/Disable Audio on selected Entry +.TP +.B [NUMLOCK] +Auto increment/decrement of a parameter-key +.TP +.B [n] +Decrease trimmer value of selected effect +.TP +.B [m] +Increase trimmer value of selected effect +.TP +.B [x] +Decrease audio volume (not functional) +.TP +.B [c] +Increase audio volume (not functional) +.TP +.B [0] +Capture frame to jpeg file +.TP +.B [PgUp] +Increase parameter 0 of selected effect +.TP +.B [PgDn] +Decrease parameter 0 of selected effect +.TP +.B [Keypad 0] +Decrease parameter 1 of selected effect +.TP +.B [Keypad .] +Increase parameter 1 of selected effect +.TP +.B [.] +Increase parameter 2 of selected effect +.TP +.B [,] +Decrease parameter 2 of selected effect +.TP +.B [QUOTE] +Increase parameter 3 of selected effect +.TP +.B [SEMICOLON] +Decrease parameter 3 of selected effect +.TP +.B [q] +Decrease parameter 4 of selected effect +.TP +.B [w] +Increase parameter 4 of selected effect +.TP +.B [e] +Decrease parameter 5 of selected effect +.TP +.B [r] +Increase parameter 5 of selected effect +.TP +.B [t] +Decrease parameter 6 of selected effect +.TP +.B [y] +Increase parameter 6 of selected effect +.TP +.B [u] +Decrease parameter 7 of selected effect +.TP +.B [i] +Increase parameter 7 of selected effect +.TP +.TP +.B CTRL + O +OSD status (timecode , current sample, cost and cache) +.TP +.B SHIFT + spacebar +Start keystroke recorder. The keystroke recorder +records most of the received VIMS messages and plays them +back in order and on the position you have pressed them. +Instead of using the keyboard, you can also use 'Reloaded', +and record the buttons pressed. However, some VIMS messages +are excluded from the keystroke recorder for safety reasons. +.TP +.B spacebar +(re)play recorded VIMS messages. The keystroke recorder +will jump to the starting position and replay all +recorded VIMS messages. +.TP +.B CTRL + spacebar +Clear recorded keystrokes. This clears all VIMS messages +in the current selected macro slot. +.TP +.B CTRL + [ F1 - F12 ] +Select a slot to record keystrokes to (default=0) +Use this if you want to record multiple keystrokes. You +can switch slots while in keystroke playback. +.TP +.B ALT + B +Take a snapshot of a video frame and put it in a seperate +buffer (used by some effects like Difference Overlay) +.TP +.SH REFERENCES +.TP +http://veejay.sourceforge.net +http://veejayhq.net +.SH BUGS +see BUGS in the source package +.SH AUTHOR +This man page was written by Niels Elburg. +If you have questions, remarks or you just want to +contact the developers, the main mailing list for this +project is: +.I veejay-users@lists.sourceforge.net +For more info see the website at +.I http://veejayhq.net +.I http://veejay.dyne.org +.I http://veejay.sourceforge.net +.SH "SEE ALSO" +.B veejay sayVIMS diff --git a/veejay-server/missing b/veejay-server/missing new file mode 100755 index 00000000..1c8ff704 --- /dev/null +++ b/veejay-server/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/veejay-server/test/OSC/README b/veejay-server/test/OSC/README new file mode 100644 index 00000000..2349f972 --- /dev/null +++ b/veejay-server/test/OSC/README @@ -0,0 +1,4 @@ +1. run make in libOSC +2. run make in send+dump + +now you have a sendOSC utility in send+dump diff --git a/veejay-server/test/OSC/libOSC/Makefile b/veejay-server/test/OSC/libOSC/Makefile new file mode 100644 index 00000000..6261b37b --- /dev/null +++ b/veejay-server/test/OSC/libOSC/Makefile @@ -0,0 +1,21 @@ +CFLAGS= -O2 +LIB=libOSC.a + +LIBOBJS= ${LIB}(OSC-client.o) ${LIB}(OSC-timetag.o) + +all: ${LIBOBJS} + +.c.a: + ${CC} -c ${CFLAGS} $< + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + +test_OSC: test_OSC.o ${LIB} + cc -o test_OSC test_OSC.o ${LIB} + +test_OSC_timeTag: test_OSC_timeTag.o OSC-timetag.o + cc -o test_OSC_timeTag test_OSC_timeTag.o OSC-timetag.o + + +clean: + rm -f ${LIB} *.o diff --git a/veejay-server/test/OSC/libOSC/OSC-client.c b/veejay-server/test/OSC/libOSC/OSC-client.c new file mode 100644 index 00000000..0a77ecf8 --- /dev/null +++ b/veejay-server/test/OSC/libOSC/OSC-client.c @@ -0,0 +1,470 @@ +/* +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. Copyright (c) 1996,97,98,99,2000,01,02,03 +The Regents of the University of California (Regents). + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +*/ + + +/* + Author: Matt Wright + Version 2.2: Calls htonl in the right places 20000620 + Version 2.3: Gets typed messages right. + Version 2.4: 031215: (re)added ChangeOutermostTimestamp(), htonl() OSX kludge + + */ + + +/* Here are the possible values of the state field: */ + +#define EMPTY 0 /* Nothing written to packet yet */ +#define ONE_MSG_ARGS 1 /* Packet has a single message; gathering arguments */ +#define NEED_COUNT 2 /* Just opened a bundle; must write message name or + open another bundle */ +#define GET_ARGS 3 /* Getting arguments to a message. If we see a message + name or a bundle open/close then the current message + will end. */ +#define DONE 4 /* All open bundles have been closed, so can't write + anything else */ + +#include "OSC-client.h" + +#ifdef TARGET_API_MAC_CARBON +/* KLUDGE for OSX: */ +#define htonl(x) (x) +#endif + +char *OSC_errorMessage; + + +static int strlen(char *s); +static int OSC_padString(char *dest, char *str); +static int OSC_padStringWithAnExtraStupidComma(char *dest, char *str); +static int OSC_WritePadding(char *dest, int i); +static int CheckTypeTag(OSCbuf *buf, char expectedType); + +void OSC_initBuffer(OSCbuf *buf, int size, char *byteArray) { + buf->buffer = byteArray; + buf->size = size; + OSC_resetBuffer(buf); +} + +void OSC_resetBuffer(OSCbuf *buf) { + buf->bufptr = buf->buffer; + buf->state = EMPTY; + buf->bundleDepth = 0; + buf->prevCounts[0] = 0; + buf->outerMostTimeStamp = 0; + buf->gettingFirstUntypedArg = 0; + buf->typeStringPtr = 0; +} + +int OSC_isBufferEmpty(OSCbuf *buf) { + return buf->bufptr == buf->buffer; +} + +int OSC_freeSpaceInBuffer(OSCbuf *buf) { + return buf->size - (buf->bufptr - buf->buffer); +} + +int OSC_isBufferDone(OSCbuf *buf) { + return (buf->state == DONE || buf->state == ONE_MSG_ARGS); +} + +char *OSC_getPacket(OSCbuf *buf) { +#ifdef ERROR_CHECK_GETPACKET + if (buf->state == DONE || buf->state == ONE_MSG_ARGS) { + return buf->buffer; + } else { + OSC_errorMessage = "Packet has unterminated bundles"; + return 0; + } +#else + return buf->buffer; +#endif +} + +int OSC_packetSize(OSCbuf *buf) { +#ifdef ERROR_CHECK_PACKETSIZE + if (buf->state == DONE || buf->state == ONE_MSG_ARGS) { + return (buf->bufptr - buf->buffer); + } else { + OSC_errorMessage = "Packet has unterminated bundles"; + return 0; + } +#else + return (buf->bufptr - buf->buffer); +#endif +} + +#define CheckOverflow(buf, bytesNeeded) { \ + if ((bytesNeeded) > OSC_freeSpaceInBuffer(buf)) { \ + OSC_errorMessage = "buffer overflow"; \ + return 1; \ + } \ +} + +static void PatchMessageSize(OSCbuf *buf) { + int4byte size; + size = buf->bufptr - ((char *) buf->thisMsgSize) - 4; + *(buf->thisMsgSize) = htonl(size); +} + +int OSC_openBundle(OSCbuf *buf, OSCTimeTag tt) { + if (buf->state == ONE_MSG_ARGS) { + OSC_errorMessage = "Can't open a bundle in a one-message packet"; + return 3; + } + + if (buf->state == DONE) { + OSC_errorMessage = "This packet is finished; can't open a new bundle"; + return 4; + } + + if (++(buf->bundleDepth) >= MAX_BUNDLE_NESTING) { + OSC_errorMessage = "Bundles nested too deeply; change MAX_BUNDLE_NESTING in OpenSoundControl.h"; + return 2; + } + + if (CheckTypeTag(buf, '\0')) return 9; + + if (buf->state == GET_ARGS) { + PatchMessageSize(buf); + } + + if (buf->state == EMPTY) { + /* Need 16 bytes for "#bundle" and time tag */ + CheckOverflow(buf, 16); + } else { + /* This bundle is inside another bundle, so we need to leave + a blank size count for the size of this current bundle. */ + CheckOverflow(buf, 20); + *((int4byte *)buf->bufptr) = 0xaaaaaaaa; + buf->prevCounts[buf->bundleDepth] = (int4byte *)buf->bufptr; + + buf->bufptr += 4; + } + + buf->bufptr += OSC_padString(buf->bufptr, "#bundle"); + + + *((OSCTimeTag *) buf->bufptr) = tt; + if (buf->state == EMPTY) { + buf->outerMostTimeStamp = (OSCTimeTag *) buf->bufptr; + } + + + if (htonl(1) != 1) { + /* Byte swap the 8-byte integer time tag */ + int4byte *intp = (int4byte *)buf->bufptr; + intp[0] = htonl(intp[0]); + intp[1] = htonl(intp[1]); + +#ifdef HAS8BYTEINT + { /* tt is a 64-bit int so we have to swap the two 32-bit words. + (Otherwise tt is a struct of two 32-bit words, and even though + each word was wrong-endian, they were in the right order + in the struct.) */ + int4byte temp = intp[0]; + intp[0] = intp[1]; + intp[1] = temp; + } +#endif + } + + buf->bufptr += sizeof(OSCTimeTag); + + buf->state = NEED_COUNT; + + buf->gettingFirstUntypedArg = 0; + buf->typeStringPtr = 0; + return 0; +} + + + +int ChangeOutermostTimestamp(OSCbuf *buf, OSCTimeTag tt) { + if (buf->outerMostTimeStamp == 0) { + OSC_errorMessage = "No outermost timestamp to change."; + return 1; + } else { + *(buf->outerMostTimeStamp) = tt; + return 0; + } +} + + +int OSC_closeBundle(OSCbuf *buf) { + if (buf->bundleDepth == 0) { + /* This handles EMPTY, ONE_MSG, ARGS, and DONE */ + OSC_errorMessage = "Can't close bundle; no bundle is open!"; + return 5; + } + + if (CheckTypeTag(buf, '\0')) return 9; + + if (buf->state == GET_ARGS) { + PatchMessageSize(buf); + } + + if (buf->bundleDepth == 1) { + /* Closing the last bundle: No bundle size to patch */ + buf->state = DONE; + } else { + /* Closing a sub-bundle: patch bundle size */ + int size = buf->bufptr - ((char *) buf->prevCounts[buf->bundleDepth]) - 4; + *(buf->prevCounts[buf->bundleDepth]) = htonl(size); + buf->state = NEED_COUNT; + } + + --buf->bundleDepth; + buf->gettingFirstUntypedArg = 0; + buf->typeStringPtr = 0; + return 0; +} + + +int OSC_closeAllBundles(OSCbuf *buf) { + if (buf->bundleDepth == 0) { + /* This handles EMPTY, ONE_MSG, ARGS, and DONE */ + OSC_errorMessage = "Can't close all bundles; no bundle is open!"; + return 6; + } + + if (CheckTypeTag(buf, '\0')) return 9; + + while (buf->bundleDepth > 0) { + OSC_closeBundle(buf); + } + buf->typeStringPtr = 0; + return 0; +} + +int OSC_writeAddress(OSCbuf *buf, char *name) { + int4byte paddedLength; + + if (buf->state == ONE_MSG_ARGS) { + OSC_errorMessage = "This packet is not a bundle, so you can't write another address"; + return 7; + } + + if (buf->state == DONE) { + OSC_errorMessage = "This packet is finished; can't write another address"; + return 8; + } + + if (CheckTypeTag(buf, '\0')) return 9; + + paddedLength = OSC_effectiveStringLength(name); + + if (buf->state == EMPTY) { + /* This will be a one-message packet, so no sizes to worry about */ + CheckOverflow(buf, paddedLength); + buf->state = ONE_MSG_ARGS; + } else { + /* GET_ARGS or NEED_COUNT */ + CheckOverflow(buf, 4+paddedLength); + if (buf->state == GET_ARGS) { + /* Close the old message */ + PatchMessageSize(buf); + } + buf->thisMsgSize = (int4byte *)buf->bufptr; + *(buf->thisMsgSize) = 0xbbbbbbbb; + buf->bufptr += 4; + buf->state = GET_ARGS; + } + + /* Now write the name */ + buf->bufptr += OSC_padString(buf->bufptr, name); + buf->typeStringPtr = 0; + buf->gettingFirstUntypedArg = 1; + + return 0; +} + +int OSC_writeAddressAndTypes(OSCbuf *buf, char *name, char *types) { + int result; + int4byte paddedLength; + + if (CheckTypeTag(buf, '\0')) return 9; + + result = OSC_writeAddress(buf, name); + + if (result) return result; + + paddedLength = OSC_effectiveStringLength(types); + + CheckOverflow(buf, paddedLength); + + buf->typeStringPtr = buf->bufptr + 1; /* skip comma */ + buf->bufptr += OSC_padString(buf->bufptr, types); + + buf->gettingFirstUntypedArg = 0; + return 0; +} + +static int CheckTypeTag(OSCbuf *buf, char expectedType) { + if (buf->typeStringPtr) { + if (*(buf->typeStringPtr) != expectedType) { + if (expectedType == '\0') { + OSC_errorMessage = + "According to the type tag I expected more arguments."; + } else if (*(buf->typeStringPtr) == '\0') { + OSC_errorMessage = + "According to the type tag I didn't expect any more arguments."; + } else { + OSC_errorMessage = + "According to the type tag I expected an argument of a different type."; + /* printf("* Expected %c, string now %s\n", expectedType, buf->typeStringPtr); */ + } + return 9; + } + ++(buf->typeStringPtr); + } + return 0; +} + + +int OSC_writeFloatArg(OSCbuf *buf, float arg) { + int4byte *intp; + int result; + + CheckOverflow(buf, 4); + + if (CheckTypeTag(buf, 'f')) return 9; + + /* Pretend arg is a long int so we can use htonl() */ + intp = ((int4byte *) &arg); + *((int4byte *) buf->bufptr) = htonl(*intp); + + buf->bufptr += 4; + + buf->gettingFirstUntypedArg = 0; + return 0; +} + + + +int OSC_writeFloatArgs(OSCbuf *buf, int numFloats, float *args) { + int i; + int4byte *intp; + + CheckOverflow(buf, 4 * numFloats); + + /* Pretend args are long ints so we can use htonl() */ + intp = ((int4byte *) args); + + for (i = 0; i < numFloats; i++) { + if (CheckTypeTag(buf, 'f')) return 9; + *((int4byte *) buf->bufptr) = htonl(intp[i]); + buf->bufptr += 4; + } + + buf->gettingFirstUntypedArg = 0; + return 0; +} + +int OSC_writeIntArg(OSCbuf *buf, int4byte arg) { + CheckOverflow(buf, 4); + if (CheckTypeTag(buf, 'i')) return 9; + + *((int4byte *) buf->bufptr) = htonl(arg); + buf->bufptr += 4; + + buf->gettingFirstUntypedArg = 0; + return 0; +} + +int OSC_writeStringArg(OSCbuf *buf, char *arg) { + int len; + + if (CheckTypeTag(buf, 's')) return 9; + + len = OSC_effectiveStringLength(arg); + + if (buf->gettingFirstUntypedArg && arg[0] == ',') { + /* This un-type-tagged message starts with a string + that starts with a comma, so we have to escape it + (with a double comma) so it won't look like a type + tag string. */ + + CheckOverflow(buf, len+4); /* Too conservative */ + buf->bufptr += + OSC_padStringWithAnExtraStupidComma(buf->bufptr, arg); + + } else { + CheckOverflow(buf, len); + buf->bufptr += OSC_padString(buf->bufptr, arg); + } + + buf->gettingFirstUntypedArg = 0; + return 0; + +} + +/* String utilities */ + +static int strlen(char *s) { + int i; + for (i=0; s[i] != '\0'; i++) /* Do nothing */ ; + return i; +} + +#define STRING_ALIGN_PAD 4 +int OSC_effectiveStringLength(char *string) { + int len = strlen(string) + 1; /* We need space for the null char. */ + + /* Round up len to next multiple of STRING_ALIGN_PAD to account for alignment padding */ + if ((len % STRING_ALIGN_PAD) != 0) { + len += STRING_ALIGN_PAD - (len % STRING_ALIGN_PAD); + } + return len; +} + +static int OSC_padString(char *dest, char *str) { + int i; + + for (i = 0; str[i] != '\0'; i++) { + dest[i] = str[i]; + } + + return OSC_WritePadding(dest, i); +} + +static int OSC_padStringWithAnExtraStupidComma(char *dest, char *str) { + int i; + + dest[0] = ','; + for (i = 0; str[i] != '\0'; i++) { + dest[i+1] = str[i]; + } + + return OSC_WritePadding(dest, i+1); +} + +static int OSC_WritePadding(char *dest, int i) { + dest[i] = '\0'; + i++; + + for (; (i % STRING_ALIGN_PAD) != 0; i++) { + dest[i] = '\0'; + } + + return i; +} diff --git a/veejay-server/test/OSC/libOSC/OSC-client.h b/veejay-server/test/OSC/libOSC/OSC-client.h new file mode 100644 index 00000000..f9cf0bd8 --- /dev/null +++ b/veejay-server/test/OSC/libOSC/OSC-client.h @@ -0,0 +1,180 @@ +/* +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. Copyright (c) 1996,97,98,99,2000,01,02,03 +The Regents of the University of California (Regents). + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +*/ + +/* + + OSC-client.h: library for constructing OpenSoundControl messages. + Derived from SynthControl.h + Author: Matt Wright + Version 0.1: 6/13/97 + Version 0.2: 7/21/2000: Support for type-tagged messages + Version 0.3: 031215: (re)added ChangeOutermostTimestamp() + + + General notes: + + This library abstracts away the data format for the OpenSoundControl + protocol. Users of this library can construct OpenSoundControl packets + with a function call interface instead of knowing how to lay out the bits. + + All issues of memory allocation are deferred to the user of this library. + There are two data structures that the user must allocate. The first + is the actual buffer that the message will be written into. This buffer + can be any size, but if it's too small there's a possibility that it + will become overfull. The other data structure is called an OSCbuf, + and it holds all the state used by the library as it's constructing + a buffer. + + All procedures that have the possibility of an error condition return int, + with 0 indicating no error and nonzero indicating an error. The variable + OSC_errorMessage will be set to point to a string containing an error + message explaining what the problem is. + +*/ + + +#include "OSC-timetag.h" + +/* The int4byte type has to be a 4-byte integer. You may have to + change this to long or something else on your system. */ +#ifdef __MWERKS__ + /* In Metrowerks you can set ints to be 2 or 4 bytes on 68K, but long is + always 4 bytes */ + typedef long int4byte; +#else + typedef int int4byte; +#endif + +/* The maximum depth of bundles within bundles within bundles within... + This is the size of a static array. If you exceed this limit you'll + get an error message. */ +#define MAX_BUNDLE_NESTING 32 + + +/* Don't ever manipulate the data in the OSCbuf struct directly. (It's + declared here in the header file only so your program will be able to + declare variables of type OSCbuf and have the right amount of memory + be allocated.) */ + +typedef struct OSCbuf_struct { + char *buffer; /* The buffer to hold the OSC packet */ + int size; /* Size of the buffer */ + char *bufptr; /* Current position as we fill the buffer */ + int state; /* State of partially-constructed message */ + int4byte *thisMsgSize; /* Pointer to count field before + currently-being-written message */ + int4byte *prevCounts[MAX_BUNDLE_NESTING]; + /* Pointers to count field before each currently + open bundle */ + int bundleDepth; /* How many sub-sub-bundles are we in now? */ + OSCTimeTag *outerMostTimeStamp; /* Pointer to highest-level enclosing timestamp */ + char *typeStringPtr; /* This pointer advances through the type + tag string as you add arguments. */ + int gettingFirstUntypedArg; /* nonzero if this message doesn't have + a type tag and we're waiting for the 1st arg */ +} OSCbuf; + + + +/* Initialize the given OSCbuf. The user of this module must pass in the + block of memory that this OSCbuf will use for a buffer, and the number of + bytes in that block. (It's the user's job to allocate the memory because + you do it differently in different systems.) */ +void OSC_initBuffer(OSCbuf *buf, int size, char *byteArray); + + +/* Reset the given OSCbuf. Do this after you send out the contents of + the buffer and want to start writing new data into it. */ +void OSC_resetBuffer(OSCbuf *buf); + + +/* Is the buffer empty? (I.e., would it be stupid to send the buffer + contents to the synth?) */ +int OSC_isBufferEmpty(OSCbuf *buf); + + +/* How much space is left in the buffer? */ +int OSC_freeSpaceInBuffer(OSCbuf *buf); + +/* Does the buffer contain a valid OSC packet? (Returns nonzero if yes.) */ +int OSC_isBufferDone(OSCbuf *buf); + +/* When you're ready to send out the buffer (i.e., when OSC_isBufferDone() + returns true), call these two procedures to get the OSC packet that's been + assembled and its size in bytes. (And then call OSC_resetBuffer() if you + want to re-use this OSCbuf for the next packet.) */ +char *OSC_getPacket(OSCbuf *buf); +int OSC_packetSize(OSCbuf *buf); + +/* If a packet already has a timestamp, change it to the given new one. */ +int ChangeOutermostTimestamp(OSCbuf *buf, OSCTimeTag tt); + + +/* Here's the basic model for building up OSC messages in an OSCbuf: + + - Make sure the OSCbuf has been initialized with OSC_initBuffer(). + + - To open a bundle, call OSC_openBundle(). You can then write + messages or open new bundles within the bundle you opened. + Call OSC_closeBundle() to close the bundle. Note that a packet + does not have to have a bundle; it can instead consist of just a + single message. + + + - For each message you want to send: + + - Call OSC_writeAddress() with the name of your message. (In + addition to writing your message name into the buffer, this + procedure will also leave space for the size count of this message.) + + - Alternately, call OSC_writeAddressAndTypes() with the name of + your message and with a type string listing the types of all the + arguments you will be putting in this message. + + - Now write each of the arguments into the buffer, by calling one of: + OSC_writeFloatArg() + OSC_writeFloatArgs() + OSC_writeIntArg() + OSC_writeStringArg() + + - Now your message is complete; you can send out the buffer or you can + add another message to it. +*/ + +int OSC_openBundle(OSCbuf *buf, OSCTimeTag tt); +int OSC_closeBundle(OSCbuf *buf); +int OSC_closeAllBundles(OSCbuf *buf); + +int OSC_writeAddress(OSCbuf *buf, char *name); +int OSC_writeAddressAndTypes(OSCbuf *buf, char *name, char *types); +int OSC_writeFloatArg(OSCbuf *buf, float arg); +int OSC_writeFloatArgs(OSCbuf *buf, int numFloats, float *args); +int OSC_writeIntArg(OSCbuf *buf, int4byte arg); +int OSC_writeStringArg(OSCbuf *buf, char *arg); + +extern char *OSC_errorMessage; + +/* How many bytes will be needed in the OSC format to hold the given + string? The length of the string, plus the null char, plus any padding + needed for 4-byte alignment. */ +int OSC_effectiveStringLength(char *string); diff --git a/veejay-server/test/OSC/libOSC/OSC-timetag.c b/veejay-server/test/OSC/libOSC/OSC-timetag.c new file mode 100644 index 00000000..1ea2f6d4 --- /dev/null +++ b/veejay-server/test/OSC/libOSC/OSC-timetag.c @@ -0,0 +1,170 @@ +/* +Copyright (c) 1998,99,2000,01,02,03. The Regents of the University of California (Regents). +All Rights Reserved. Written by Matt Wright, Center for New Music and Audio Technologies, +University of California, Berkeley. + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + +/* + + OSC_timeTag.c: library for manipulating OSC time tags + Matt Wright, 5/29/97 + + Version 0.2 (9/11/98): cleaned up so no explicit type names in the .c file. + +*/ + +#include "OSC-timetag.h" + + +#ifdef HAS8BYTEINT +#define TWO_TO_THE_32_FLOAT 4294967296.0f + +OSCTimeTag OSCTT_Immediately(void) { + return (OSCTimeTag) 1; +} + +OSCTimeTag OSCTT_BiggestPossibleTimeTag(void) { + return (OSCTimeTag) 0xffffffffffffffff; +} + +OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) { + int64 offset = (int64) (secondsOffset * TWO_TO_THE_32_FLOAT); + +/* printf("* OSCTT_PlusSeconds %llx plus %f seconds (i.e., %lld offset) is %llx\n", original, + secondsOffset, offset, original + offset); */ + + return original + offset; +} + +int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right) { +#if 0 + printf("***** OSCTT_Compare(%llx, %llx): %d\n", left, right, + (left + +#define SECONDS_FROM_1900_to_1970 2208988800 /* 17 leap years */ +#define TWO_TO_THE_32_OVER_ONE_MILLION 4295 + + +OSCTimeTag OSCTT_CurrentTime(void) { + uint64 result; + uint32 usecOffset; + struct timeval tv; + struct timezone tz; + + BSDgettimeofday(&tv, &tz); + + /* First get the seconds right */ + result = (unsigned) SECONDS_FROM_1900_to_1970 + + (unsigned) tv.tv_sec - + (unsigned) 60 * tz.tz_minuteswest + + (unsigned) (tz.tz_dsttime ? 3600 : 0); + +#if 0 + /* No timezone, no DST version ... */ + result = (unsigned) SECONDS_FROM_1900_to_1970 + + (unsigned) tv.tv_sec; +#endif + + + /* make seconds the high-order 32 bits */ + result = result << 32; + + /* Now get the fractional part. */ + usecOffset = (unsigned) tv.tv_usec * (unsigned) TWO_TO_THE_32_OVER_ONE_MILLION; + /* printf("** %ld microsec is offset %x\n", tv.tv_usec, usecOffset); */ + + result += usecOffset; + +/* printf("* OSCTT_CurrentTime is %llx\n", result); */ + return result; +} + +#else /* __sgi */ + +/* Instead of asking your operating system what time it is, it might be + clever to find out the current time at the instant your application + starts audio processing, and then keep track of the number of samples + output to know how much time has passed. */ + +/* Loser version for systems that have no ability to tell the current time: */ +OSCTimeTag OSCTT_CurrentTime(void) { + return (OSCTimeTag) 1; +} + +#endif /* __sgi */ + + +#else /* Not HAS8BYTEINT */ + +OSCTimeTag OSCTT_CurrentTime(void) { + OSCTimeTag result; + result.seconds = 0; + result.fraction = 1; + return result; +} + +OSCTimeTag OSCTT_BiggestPossibleTimeTag(void) { + OSCTimeTag result; + result.seconds = 0xffffffff; + result.fraction = 0xffffffff; + return result; +} + +OSCTimeTag OSCTT_Immediately(void) { + OSCTimeTag result; + result.seconds = 0; + result.fraction = 1; + return result; +} + +OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) { + OSCTimeTag result; + result.seconds = 0; + result.fraction = 1; + return result; +} + +int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right) { + /* Untested! */ + int highResult = left.seconds - right.seconds; + + if (highResult != 0) return highResult; + + return left.fraction - right.fraction; +} + + +#endif /* HAS8BYTEINT */ + diff --git a/veejay-server/test/OSC/libOSC/OSC-timetag.h b/veejay-server/test/OSC/libOSC/OSC-timetag.h new file mode 100644 index 00000000..8d5af5e7 --- /dev/null +++ b/veejay-server/test/OSC/libOSC/OSC-timetag.h @@ -0,0 +1,88 @@ +/* +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. Copyright (c) 1998,99,2000,01,02,03,04 +The Regents of the University of California (Regents). + +Permission to use, copy, modify, distribute, and distribute modified versions +of this software and its documentation without fee and without a signed +licensing agreement, is hereby granted, provided that the above copyright +notice, this paragraph and the following two paragraphs appear in all copies, +modifications, and distributions. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +The OpenSound Control WWW page is + http://www.cnmat.berkeley.edu/OpenSoundControl +*/ + +/* + OSC_timeTag.h: library for manipulating OSC time tags + Matt Wright, 5/29/97 + + Time tags in OSC have the same format as in NTP: 64 bit fixed point, with the + top 32 bits giving number of seconds sinve midnight 1/1/1900 and the bottom + 32 bits giving fractional parts of a second. We represent this by a 64-bit + unsigned long if possible, or else a struct. + + NB: On many architectures with 64-bit ints, it's illegal (like maybe a bus error) + to dereference a pointer to a 64-bit int that's not 64-bit aligned. +*/ + +#ifndef OSC_TIMETAG +#define OSC_TIMETAG + +#ifdef __sgi + #define HAS8BYTEINT + /* You may have to change this typedef if there's some other + way to specify 64 bit ints on your system */ + typedef long long int64; + typedef unsigned long long uint64; + typedef unsigned long uint32; +#else + /* You may have to redefine this typedef if ints on your system + aren't 32 bits. */ + typedef unsigned int uint32; +#endif + + +#ifdef HAS8BYTEINT + typedef uint64 OSCTimeTag; +#else + typedef struct { + uint32 seconds; + uint32 fraction; + } OSCTimeTag; +#endif + + + +/* Return a time tag representing the current time (as of when this + procedure is called). */ +OSCTimeTag OSCTT_CurrentTime(void); + +/* Return the time tag 0x0000000000000001, indicating to the receiving device + that it should process the message immediately. */ +OSCTimeTag OSCTT_Immediately(void); + +/* Return the time tag 0xffffffffffffffff, a time so far in the future that + it's effectively infinity. */ +OSCTimeTag OSCTT_BiggestPossibleTimeTag(void); + +/* Given a time tag and a number of seconds to add to the time tag, return + the new time tag */ +OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset); + +/* Compare two time tags. Return negative if first is < second, 0 if + they're equal, and positive if first > second. */ +int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right); + +#endif /* OSC_TIMETAG */ diff --git a/veejay-server/test/OSC/libOSC/index.html b/veejay-server/test/OSC/libOSC/index.html new file mode 100644 index 00000000..b759addd --- /dev/null +++ b/veejay-server/test/OSC/libOSC/index.html @@ -0,0 +1,20 @@ + + + + Index of /OpenSoundControl/src/libOSC + + +

Index of /OpenSoundControl/src/libOSC

+
      Name                    Last modified       Size  Description
+
+[DIR] Parent Directory 02-Feb-2004 11:51 - +[TXT] Makefile 24-Sep-2003 13:10 1k +[TXT] OSC-client.c 06-Jan-2004 08:21 12k +[TXT] OSC-client.h 06-Jan-2004 08:20 7k +[TXT] OSC-timetag.c 12-Apr-2004 11:05 5k +[TXT] OSC-timetag.h 12-Apr-2004 11:05 3k +[TXT] test_OSC.c 24-Sep-2003 13:10 3k +[TXT] test_OSC_timeTag.c 24-Sep-2003 13:10 1k +

+
Apache/1.3.27 Server at cnmat.cnmat.berkeley.edu Port 80
+ diff --git a/veejay-server/test/OSC/presveejay.sh b/veejay-server/test/OSC/presveejay.sh new file mode 100644 index 00000000..be511e55 --- /dev/null +++ b/veejay-server/test/OSC/presveejay.sh @@ -0,0 +1,23 @@ +#!/bin/perl + +my $CMD="./sendOSC -h localhost 3492"; + +system( "$CMD /clip/new,1,1000" ); +system( "$CMD /clip/select,1"); + + +for (my $l = 0; $l < 4; $l ++ ) +{ + for (my $i = 0; $i < 20; $i ++ ) + { + system( "$CMD /entry/preset,0,0,151,$i,0,$i,0" ); + } + + for ( my $i = 60; $i > 0 ; $i -- ) + { + system( "$CMD /entry/preset,0,0,151,$i,0,$i,0" ); + } +} + + + diff --git a/veejay-server/test/OSC/send+dump/Makefile b/veejay-server/test/OSC/send+dump/Makefile new file mode 100644 index 00000000..9961ad96 --- /dev/null +++ b/veejay-server/test/OSC/send+dump/Makefile @@ -0,0 +1,29 @@ +LIBOSCDIR = ../libOSC +LIBOSC = ${LIBOSCDIR}/libOSC.a +CFLAGS= -O2 -I$(LIBOSCDIR) -Wall -g +DEFS= -Dunix + +DUMPOBJS=dumpOSC.o + + +both: sendOSC dumpOSC mcastOSC + +mcastOSC: mcastOSC.o mcastsocket.o ${LIBOSC} + ${CC} ${CFLAGS} ${DEFS} -o mcastOSC mcastOSC.o mcastsocket.o ${LIBOSC} + +sendOSC: sendOSC.o htmsocket.o ${LIBOSC} + ${CC} ${CFLAGS} ${DEFS} -o sendOSC sendOSC.o htmsocket.o ${LIBOSC} + +dumpOSC: ${DUMPOBJS} + ${CC} ${CFLAGS} ${DEFS} -o $@ ${DUMPOBJS} + +dumpUDP: dumpUDP.o + ${CC} ${CFLAGS} ${DEFS} -o dumpUDP dumpUDP.o + +${LIBOSC}: + echo "You need to go to " ${LIBOSCDIR} " and do a make." + +clean: + rm -f sendOSC dumpOSC *.o + + diff --git a/veejay-server/test/OSC/send+dump/dumpOSC.c b/veejay-server/test/OSC/send+dump/dumpOSC.c new file mode 100644 index 00000000..fc53fd5d --- /dev/null +++ b/veejay-server/test/OSC/send+dump/dumpOSC.c @@ -0,0 +1,717 @@ +/* +Copyright (c) 1992,1993,1994,1995,1996,1997,2000. +The Regents of the University of California (Regents). +All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and not-for-profit purposes, without +fee and without a signed licensing agreement, is hereby granted, provided that +the above copyright notice, this paragraph and the following two paragraphs +appear in all copies, modifications, and distributions. Contact The Office of +Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, +CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. + +Written by Matt Wright and Adrian Freed, The Center for New Music and Audio +Technologies, University of California, Berkeley. + + IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, + SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING + DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". + REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. +*/ + + /* + + dumpOSC.c + server that displays OpenSoundControl messages sent to it + for debugging client udp and UNIX protocol + + by Matt Wright, 6/3/97 + modified from dumpSC.c, by Matt Wright and Adrian Freed + + version 0.2: Added "-silent" option a.k.a. "-quiet" + + version 0.3: Incorporated patches from Nicola Bernardini to make + things Linux-friendly. Also added ntohl() in the right places + to support little-endian architectures. + + + + compile: + cc -o dumpOSC dumpOSC.c + + to-do: + + More robustness in saying exactly what's wrong with ill-formed + messages. (If they don't make sense, show exactly what was + received.) + + Time-based features: print time-received for each packet + + Clean up to separate OSC parsing code from socket/select stuff + +*/ + + +#ifdef unix +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef NEED_SCHEDCTL_AND_LOCK +#include +#include +#endif + + +char *htm_error_string; +typedef int Boolean; +typedef void *OBJ; + +typedef struct ClientAddressStruct { + struct sockaddr_in cl_addr; + int clilen; + int sockfd; +} *ClientAddr; + +Boolean ShowBytes = FALSE; +Boolean Silent = FALSE; + +/* Declarations */ +static int unixinitudp(int chan); +static int initudp(int chan); +static void closeudp(int sockfd); +Boolean ClientReply(int packetsize, void *packet, int socketfd, + void *clientaddresspointer, int clientaddressbufferlength); +void sgi_CleanExit(void); +Boolean sgi_HaveToQuit(void); +int RegisterPollingDevice(int fd, void (*callbackfunction)(int , void *), void *dummy); +static void catch_sigint(); +static int Synthmessage(char *m, int n, void *clientdesc, int clientdesclength, int fd) ; +void ParseOSCPacket(char *buf, int n, ClientAddr returnAddr); +static void Smessage(char *address, void *v, int n, ClientAddr returnAddr); +static void PrintTypeTaggedArgs(void *v, int n); +static void PrintHeuristicallyTypeGuessedArgs(void *v, int n, int skipComma); +char *DataAfterAlignedString(char *string, char *boundary) ; +Boolean IsNiceString(char *string, char *boundary) ; +void complain(char *s, ...); + + +#define UNIXDG_PATH "/tmp/htm" +#define UNIXDG_TMP "/tmp/htm.XXXXXX" +static int unixinitudp(int chan) +{ + struct sockaddr_un serv_addr; + int sockfd; + + if((sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) + return sockfd; + + bzero((char *)&serv_addr, sizeof(serv_addr)); + serv_addr.sun_family = AF_UNIX; + strcpy(serv_addr.sun_path, UNIXDG_PATH); + sprintf(serv_addr.sun_path+strlen(serv_addr.sun_path), "%d", chan); + unlink(serv_addr.sun_path); + if(bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr.sun_family)+strlen(serv_addr.sun_path)) < 0) + { + perror("unable to bind\n"); + return -1; + } + + fcntl(sockfd, F_SETFL, FNDELAY); + return sockfd; +} + +static int initudp(int chan) +{ + struct sockaddr_in serv_addr; + int sockfd; + + if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + return sockfd; + bzero((char *)&serv_addr, sizeof(serv_addr)); + serv_addr.sin_family = AF_INET; + serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); + serv_addr.sin_port = htons(chan); + + if(bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) + { + perror("unable to bind\n"); + return -1; + } + + fcntl(sockfd, F_SETFL, FNDELAY); + return sockfd; +} + +static void closeudp(int sockfd) { + close(sockfd); +} + +static Boolean catchupflag=FALSE; +Boolean ClientReply(int packetsize, void *packet, int socketfd, + void *clientaddresspointer, int clientaddressbufferlength) +{ + if(!clientaddresspointer) return FALSE; + catchupflag= TRUE; + return packetsize==sendto(socketfd, packet, packetsize, 0, clientaddresspointer, clientaddressbufferlength); +} + +static Boolean exitflag= FALSE; +void sgi_CleanExit(void) { + exitflag = TRUE; +} + +Boolean sgi_HaveToQuit(void) { + return exitflag; +} + + +/* file descriptor poll table */ +static int npolldevs =0; +typedef struct polldev +{ + int fd; + void (*callbackfunction)(int , void *); + void *dummy; +} polldev; +#define TABMAX 8 +static polldev polldevs[TABMAX]; + + +/* Register a device (referred to by a file descriptor that the caller + should have already successfully obtained from a system call) to be + polled as real-time constraints allowed. + + When a select(2) call indicates activity on the file descriptor, the + callback function is called with the file descripter as first + argument and the given dummy argument (presumably a pointer to the + instance variables associated with the device). +*/ +int RegisterPollingDevice(int fd, void (*callbackfunction)(int , void *), void *dummy) +{ + if(npolldevscl_addr.sin_addr.s_addr; + printf("Client address %p:\n", CA); + printf(" clilen %d, sockfd %d\n", CA->clilen, CA->sockfd); + printf(" sin_family %d, sin_port %d\n", CA->cl_addr.sin_family, + CA->cl_addr.sin_port); + printf(" address: (%x) %s\n", addr, inet_ntoa(CA->cl_addr.sin_addr)); + + printf(" sin_zero = \"%c%c%c%c%c%c%c%c\"\n", + CA->cl_addr.sin_zero[0], + CA->cl_addr.sin_zero[1], + CA->cl_addr.sin_zero[2], + CA->cl_addr.sin_zero[3], + CA->cl_addr.sin_zero[4], + CA->cl_addr.sin_zero[5], + CA->cl_addr.sin_zero[6], + CA->cl_addr.sin_zero[7]); + + printf("\n"); +} + + +void ParseOSCPacket(char *buf, int n, ClientAddr returnAddr) { + int size, messageLen, i; + char *messageName; + char *args; + +#ifdef PRINTADDRS + PrintClientAddr(returnAddr); +#endif + + + if ((n%4) != 0) { + complain("SynthControl packet size (%d) not a multiple of 4 bytes: dropping", + n); + return; + } + + if ((n >= 8) && (strncmp(buf, "#bundle", 8) == 0)) { + /* This is a bundle message. */ + + if (n < 16) { + complain("Bundle message too small (%d bytes) for time tag", n); + return; + } + + /* Print the time tag */ + printf("[ %lx%08lx\n", ntohl(*((unsigned long *)(buf+8))), + ntohl(*((unsigned long *)(buf+12)))); + /* Note: if we wanted to actually use the time tag as a little-endian + 64-bit int, we'd have to word-swap the two 32-bit halves of it */ + + i = 16; /* Skip "#group\0" and time tag */ + while(i n) { + complain("Bad size count %d in bundle (only %d bytes left in entire bundle)", + size, n-i-4); + return; + } + + /* Recursively handle element of bundle */ + ParseOSCPacket(buf+i+4, size, returnAddr); + i += 4 + size; + } + if (i != n) { + complain("This can't happen"); + } + printf("]\n"); + } else { + /* This is not a bundle message */ + + messageName = buf; + args = DataAfterAlignedString(messageName, buf+n); + if (args == 0) { + complain("Bad message name string: %s\nDropping entire message.\n", + htm_error_string); + return; + } + messageLen = args-messageName; + Smessage(messageName, (void *)args, n-messageLen, returnAddr); + } +} + +#define SMALLEST_POSITIVE_FLOAT 0.000001f + +static void Smessage(char *address, void *v, int n, ClientAddr returnAddr) { + char *chars = v; + + printf("%s ", address); + + if (n != 0) { + if (chars[0] == ',') { + if (chars[1] != ',') { + /* This message begins with a type-tag string */ + PrintTypeTaggedArgs(v, n); + } else { + /* Double comma means an escaped real comma, not a type string */ + PrintHeuristicallyTypeGuessedArgs(v, n, 1); + } + } else { + PrintHeuristicallyTypeGuessedArgs(v, n, 0); + } + } + + printf("\n"); + fflush(stdout); /* Added for Sami 5/21/98 */ +} + +static void PrintTypeTaggedArgs(void *v, int n) { + char *typeTags, *thisType; + char *p; + + typeTags = v; + + if (!IsNiceString(typeTags, typeTags+n)) { + /* No null-termination, so maybe it wasn't a type tag + string after all */ + PrintHeuristicallyTypeGuessedArgs(v, n, 0); + return; + } + + p = DataAfterAlignedString(typeTags, typeTags+n); + + + for (thisType = typeTags + 1; *thisType != 0; ++thisType) { + switch (*thisType) { + case 'i': case 'r': case 'm': case 'c': + printf("%d ", ntohl(*((int *) p))); + p += 4; + break; + + case 'f': { + int i = ntohl(*((int *) p)); + float *floatp = ((float *) (&i)); + printf("%f ", *floatp); + p += 4; + } + break; + + case 'h': case 't': + printf("[A 64-bit int] "); + p += 8; + break; + + case 'd': + printf("[A 64-bit float] "); + p += 8; + break; + + case 's': case 'S': + if (!IsNiceString(p, typeTags+n)) { + printf("Type tag said this arg is a string but it's not!\n"); + return; + } else { + printf("\"%s\" ", p); + p = DataAfterAlignedString(p, typeTags+n); + } + break; + + case 'T': printf("[True] "); break; + case 'F': printf("[False] "); break; + case 'N': printf("[Nil]"); break; + case 'I': printf("[Infinitum]"); break; + + default: + printf("[Unrecognized type tag %c]", *thisType); + return; + } + } +} + +static void PrintHeuristicallyTypeGuessedArgs(void *v, int n, int skipComma) { + int i, thisi; + float thisf; + int *ints; + char *chars; + char *string, *nextString; + + + /* Go through the arguments 32 bits at a time */ + ints = v; + chars = v; + + for (i = 0; i= -1000 && thisi <= 1000000) { + printf("%d ", thisi); + i++; + } else if (thisf >= -1000.f && thisf <= 1000000.f && + (thisf <=0.0f || thisf >= SMALLEST_POSITIVE_FLOAT)) { + printf("%f ", thisf); + i++; + } else if (IsNiceString(string, chars+n)) { + nextString = DataAfterAlignedString(string, chars+n); + printf("\"%s\" ", (i == 0 && skipComma) ? string +1 : string); + i += (nextString-string) / 4; + } else { + printf("0x%x ", ints[i]); + i++; + } + } +} + + +#define STRING_ALIGN_PAD 4 + +char *DataAfterAlignedString(char *string, char *boundary) +{ + /* The argument is a block of data beginning with a string. The + string has (presumably) been padded with extra null characters + so that the overall length is a multiple of STRING_ALIGN_PAD + bytes. Return a pointer to the next byte after the null + byte(s). The boundary argument points to the character after + the last valid character in the buffer---if the string hasn't + ended by there, something's wrong. + + If the data looks wrong, return 0, and set htm_error_string */ + + int i; + + if ((boundary - string) %4 != 0) { + fprintf(stderr, "Internal error: DataAfterAlignedString: bad boundary\n"); + return 0; + } + + for (i = 0; string[i] != '\0'; i++) { + if (string + i >= boundary) { + htm_error_string = "DataAfterAlignedString: Unreasonably long string"; + return 0; + } + } + + /* Now string[i] is the first null character */ + i++; + + for (; (i % STRING_ALIGN_PAD) != 0; i++) { + if (string + i >= boundary) { + htm_error_string = "DataAfterAlignedString: Unreasonably long string"; + return 0; + } + if (string[i] != '\0') { + htm_error_string = "DataAfterAlignedString: Incorrectly padded string."; + return 0; + } + } + + return string+i; +} + +Boolean IsNiceString(char *string, char *boundary) +{ + /* Arguments same as DataAfterAlignedString(). Is the given "string" + really a string? I.e., is it a sequence of isprint() characters + terminated with 1-4 null characters to align on a 4-byte boundary? */ + + int i; + + if ((boundary - string) %4 != 0) { + fprintf(stderr, "Internal error: IsNiceString: bad boundary\n"); + return 0; + } + + for (i = 0; string[i] != '\0'; i++) { + if (!isprint(string[i])) return FALSE; + if (string + i >= boundary) return FALSE; + } + + /* If we made it this far, it's a null-terminated sequence of printing characters + in the given boundary. Now we just make sure it's null padded... */ + + /* Now string[i] is the first null character */ + i++; + for (; (i % STRING_ALIGN_PAD) != 0; i++) { + if (string[i] != '\0') return FALSE; + } + + return TRUE; +} + + + + + + + +#define MAXMESG 32768 +static char mbuf[MAXMESG]; + +int main(int argc, char **argv) { + int udp_port; /* port to receive parameter updates from */ + + struct sockaddr_in cl_addr; + int clilen,maxclilen=sizeof(cl_addr); + struct sockaddr_un ucl_addr; + int uclilen,umaxclilen=sizeof(ucl_addr); + int i,n; + + + clilen = maxclilen; + uclilen = umaxclilen; + + udp_port = -1; + for (i=1; i < argc; ++i) { + if (strcmp(argv[i], "-showbytes") == 0) { + ShowBytes = TRUE; + } else if (strcmp(argv[i], "-silent") == 0 || + strcmp(argv[i], "-quiet") == 0) { + Silent = TRUE; + } else if (udp_port != -1) { + goto usageError; + } else { + udp_port = atoi(argv[i]); + if (udp_port == 0) { + goto usageError; + } + } + } + + if (udp_port == -1) { + usageError: + fprintf(stderr, "Usage\n\tdumpOSC portno [-showbytes] [-quiet]\n\t(responds to udp and UNIX packets on that port no)\n"); + exit(1); + } + + + n = recvfrom(0, mbuf, MAXMESG, 0, &cl_addr, &clilen); + if(n>0) + { + sockfd = 0; + udp_port = -1; + Synthmessage(mbuf, n, &cl_addr, clilen,sockfd) ; + } + else + { sockfd=initudp(udp_port); + usockfd=unixinitudp(udp_port); + } + + if (!Silent) { + printf("dumpOSC version 0.2 (6/18/97 Matt Wright). Unix/UDP Port %d \n", udp_port); + printf("Copyright (c) 1992,1996,1997 Regents of the University of California.\n"); + } + if(sockfd>=0 && usockfd>=0) + { + fd_set read_fds, write_fds; + int nfds; +#define max(a,b) (((a) > (b)) ? (a) : (b)) + nfds = max(sockfd, usockfd)+ 1; + { + int j; + for(j=0;j=nfds) + { + nfds = polldevs[j].fd+1; +/* +printf("polldev %d\n", polldevs[j].fd); +*/ + } + } +/* + printf("nfds %d\n", nfds); +*/ + caught_sigint = 0; + sigset(SIGINT, catch_sigint); /* set sig handler */ + + while(!caught_sigint) + { + + int r; + + back: + + FD_ZERO(&read_fds); /* clear read_fds */ + FD_ZERO(&write_fds); /* clear write_fds */ + FD_SET(sockfd, &read_fds); + FD_SET(usockfd, &read_fds); + { + int j; + + for(j=0;j0) + { + int r; + /* printf("received UDP packet of length %d\n", n); */ + r = Synthmessage(mbuf, n, &cl_addr, clilen, sockfd) ; + + if( sgi_HaveToQuit()) goto out; + if(r>0) goto back; + clilen = maxclilen; + } + } + if(FD_ISSET(usockfd, &read_fds)) + { + uclilen = umaxclilen; + while( (n = recvfrom(usockfd, mbuf, MAXMESG, 0, &ucl_addr, &uclilen)) >0) + { + int r; + /* printf("received UNIX packet of length %d\n", n); */ + + r=Synthmessage(mbuf, n, &ucl_addr, uclilen,usockfd) ; + + if( sgi_HaveToQuit()) goto out; + if(r>0) goto back; + uclilen = umaxclilen; + } + } + } /* End of while(!caught_sigint) */ + closeudp(sockfd); + +out: ; + } + else + perror("initudp"); + + return 0; +} + + +#include +void complain(char *s, ...) { + va_list ap; + va_start(ap, s); + fprintf(stderr, "*** ERROR: "); + vfprintf(stderr, s, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +#endif /* __sgi or LINUX */ diff --git a/veejay-server/test/OSC/send+dump/dumpUDP.c b/veejay-server/test/OSC/send+dump/dumpUDP.c new file mode 100644 index 00000000..38768124 --- /dev/null +++ b/veejay-server/test/OSC/send+dump/dumpUDP.c @@ -0,0 +1,191 @@ +/* +Copyright (c) 1998. The Regents of the University of California (Regents). +All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and not-for-profit purposes, without +fee and without a signed licensing agreement, is hereby granted, provided that +the above copyright notice, this paragraph and the following two paragraphs +appear in all copies, modifications, and distributions. Contact The Office of +Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, +CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + + IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, + SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING + DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". + REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. + +dumpUDP.c: smallest UDP receiving application +by Matt Wright, 9/9/98 + +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +typedef struct ClientAddressStruct { + struct sockaddr_in cl_addr; + int clilen; + int sockfd; +} *ClientAddr; + +void PrintClientAddr(ClientAddr CA) { + unsigned long addr = CA->cl_addr.sin_addr.s_addr; + printf("Client address %p:\n", CA); + printf(" clilen %d, sockfd %d\n", CA->clilen, CA->sockfd); + printf(" sin_family %d, sin_port %d\n", CA->cl_addr.sin_family, + CA->cl_addr.sin_port); + printf(" address: (%x) %s\n", addr, inet_ntoa(CA->cl_addr.sin_addr)); + + printf(" sin_zero = \"%c%c%c%c%c%c%c%c\"\n", + CA->cl_addr.sin_zero[0], + CA->cl_addr.sin_zero[1], + CA->cl_addr.sin_zero[2], + CA->cl_addr.sin_zero[3], + CA->cl_addr.sin_zero[4], + CA->cl_addr.sin_zero[5], + CA->cl_addr.sin_zero[6], + CA->cl_addr.sin_zero[7]); + + printf("\n"); +} + + +static int initudp(int port) { + struct sockaddr_in serv_addr; + int n, sockfd; + + if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + return sockfd; + bzero((char *)&serv_addr, sizeof(serv_addr)); + serv_addr.sin_family = AF_INET; + serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); + serv_addr.sin_port = htons(port); + + if(bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) + { + perror("unable to bind\n"); + return -1; + } + + fcntl(sockfd, F_SETFL, FNDELAY); + return sockfd; +} + + +static void closeudp(int sockfd) { + close(sockfd); +} + + +static int time_to_quit; + +static void catch_sigint() { + time_to_quit = 1; +} + +void GotAPacket(char *buf, int n, ClientAddr returnAddr) { + printf("received UDP packet of length %d\n", n); + PrintClientAddr(returnAddr); +} + +#define MAXMESG 32768 +static char mbuf[MAXMESG]; + +void ReceivePacket(int sockfd) { + struct ClientAddressStruct returnAddress; + int maxclilen=sizeof(returnAddress.cl_addr); + int n; + + returnAddress.clilen = maxclilen; + while( (n = recvfrom(sockfd, mbuf, MAXMESG, 0, &(returnAddress.cl_addr), + &(returnAddress.clilen))) >0) { + GotAPacket(mbuf, n, &returnAddress); + + if (time_to_quit) return; + returnAddress.clilen = maxclilen; + } +} + +void main(int argc, char **argv) { + int udp_port; /* port to receive parameter updates from */ + int sockfd; + int i; + + fd_set read_fds, write_fds; + int nfds; + + udp_port = 7000; + + sockfd=initudp(udp_port); + + if(sockfd<0) { + perror("initudp"); + return; + } + + nfds = sockfd + 1; + + time_to_quit = 0; + sigset(SIGINT, catch_sigint); /* set sig handler */ + + while(!time_to_quit) + { + + int c,r; + + back: + + FD_ZERO(&read_fds); /* clear read_fds */ + FD_ZERO(&write_fds); /* clear write_fds */ + FD_SET(sockfd, &read_fds); + + + r = select(nfds, &read_fds, &write_fds, (fd_set *)0, + (struct timeval *)0); + if (r < 0) /* select reported an error */ + goto out; + + if(FD_ISSET(sockfd, &read_fds)) { + ReceivePacket(sockfd); + } + + } /* End of while(!time_to_quit) */ +out: ; +} diff --git a/veejay-server/test/OSC/send+dump/htmsocket.c b/veejay-server/test/OSC/send+dump/htmsocket.c new file mode 100644 index 00000000..34e3f2cd --- /dev/null +++ b/veejay-server/test/OSC/send+dump/htmsocket.c @@ -0,0 +1,235 @@ +/* +Copyright (c) 1992,1996,1998. +The Regents of the University of California (Regents). +All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and not-for-profit purposes, without +fee and without a signed licensing agreement, is hereby granted, provided that +the above copyright notice, this paragraph and the following two paragraphs +appear in all copies, modifications, and distributions. Contact The Office of +Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, +CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. + +Written by Adrian Freed, The Center for New Music and Audio Technologies, +University of California, Berkeley. + + IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, + SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING + DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". + REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. +*/ + + /* htmsocket.c + + Adrian Freed + send parameters to htm servers by udp or UNIX protocol + + Modified 6/6/96 by Matt Wright to understand symbolic host names + in addition to X.X.X.X addresses. + */ + + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define UNIXDG_PATH "/tmp/htm" +#define UNIXDG_TMP "/tmp/htm.XXXXXX" +#include "htmsocket.h" +typedef struct +{ + float srate; + + struct sockaddr_in serv_addr; /* udp socket */ + struct sockaddr_un userv_addr; /* UNIX socket */ + int sockfd; /* socket file descriptor */ + int index, len,uservlen; + void *addr; + int id; +} desc; + +/* open a socket for HTM communication to given host on given portnumber */ +/* if host is 0 then UNIX protocol is used (i.e. local communication */ +void *OpenHTMSocket(char *host, int portnumber) +{ + int sockfd; + int oval = 1; + struct sockaddr_in cl_addr; + struct sockaddr_un ucl_addr; + desc *o; + o = malloc(sizeof(*o)); + if(!o) + return 0; + if(!host) + { + // char *mkstemp(char *); + int clilen; + o->len = sizeof(ucl_addr); + /* + * Fill in the structure "userv_addr" with the address of the + * server that we want to send to. + */ + + bzero((char *) &o->userv_addr, sizeof(o->userv_addr)); + o->userv_addr.sun_family = AF_UNIX; + strcpy(o->userv_addr.sun_path, UNIXDG_PATH); + sprintf(o->userv_addr.sun_path+strlen(o->userv_addr.sun_path), "%d", portnumber); + o->uservlen = sizeof(o->userv_addr.sun_family) + strlen(o->userv_addr.sun_path); + o->addr = &(o->userv_addr); + /* + * Open a socket (a UNIX domain datagram socket). + */ + + if ( (sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) >= 0) + { + /* + * Bind a local address for us. + * In the UNIX domain we have to choose our own name (that + * should be unique). We'll use mktemp() to create a unique + * pathname, based on our process id. + */ + + bzero((char *) &ucl_addr, sizeof(ucl_addr)); /* zero out */ + ucl_addr.sun_family = AF_UNIX; + strcpy(ucl_addr.sun_path, UNIXDG_TMP); + + mkstemp(ucl_addr.sun_path); + clilen = sizeof(ucl_addr.sun_family) + strlen(ucl_addr.sun_path); + + if (bind(sockfd, (struct sockaddr *) &ucl_addr, clilen) < 0) + { + perror("client: can't bind local address"); + close(sockfd); + sockfd = -1; + } + } + else + perror("unable to make socket\n"); + + }else + { + /* + * Fill in the structure "serv_addr" with the address of the + * server that we want to send to. + */ + o->len = sizeof(cl_addr); + bzero((char *)&o->serv_addr, sizeof(o->serv_addr)); + o->serv_addr.sin_family = AF_INET; + + /* MW 6/6/96: Call gethostbyname() instead of inet_addr(), + so that host can be either an Internet host name (e.g., + "les") or an Internet address in standard dot notation + (e.g., "128.32.122.13") */ + { + struct hostent *hostsEntry; + unsigned long address; + + hostsEntry = gethostbyname(host); + if (hostsEntry == NULL) { + fprintf(stderr, "Couldn't decipher host name \"%s\"\n", + host); + herror(NULL); + return 0; + } + + address = *((unsigned long *) hostsEntry->h_addr_list[0]); + o->serv_addr.sin_addr.s_addr = address; + } + + /* was: o->serv_addr.sin_addr.s_addr = inet_addr(host); */ + + /* End MW changes */ + + o->serv_addr.sin_port = htons(portnumber); + o->addr = &(o->serv_addr); + /* + * Open a socket (a UDP domain datagram socket). + */ + if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) >= 0) + { + bzero((char *)&cl_addr, sizeof(cl_addr)); + cl_addr.sin_family = AF_INET; + cl_addr.sin_addr.s_addr = htonl(INADDR_ANY); + cl_addr.sin_port = htons(0); + + if(setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, &oval, sizeof(int)) == -1) { + perror("setsockopt"); + } + + if(bind(sockfd, (struct sockaddr *) &cl_addr, sizeof(cl_addr)) < 0) + { + perror("could not bind\n"); + close(sockfd); + sockfd = -1; + } + } + else + { + perror("unable to make socket\n"); + } + + } + if(sockfd<0) + { + free(o); o = 0; + } + else + o->sockfd = sockfd; + return o; +} +#include + +static bool sendudp(const struct sockaddr *sp, int sockfd,int length, int count, void *b) +{ + int rcount; + if((rcount=sendto(sockfd, b, count, 0, sp, length)) != count) + { +/* printf("sockfd %d count %d rcount %dlength %d errno %d\n", sockfd,count,rcount,length, + errno); */ + return FALSE; + } + return TRUE; +} +bool SendHTMSocket(void *htmsendhandle, int length_in_bytes, void *buffer) +{ + desc *o = (desc *)htmsendhandle; + return sendudp(o->addr, o->sockfd, o->len, length_in_bytes, buffer); +} +void CloseHTMSocket(void *htmsendhandle) +{ + desc *o = (desc *)htmsendhandle; + close(o->sockfd); + free(o); +} diff --git a/veejay-server/test/OSC/send+dump/htmsocket.h b/veejay-server/test/OSC/send+dump/htmsocket.h new file mode 100644 index 00000000..b035b57f --- /dev/null +++ b/veejay-server/test/OSC/send+dump/htmsocket.h @@ -0,0 +1,49 @@ +/* +Copyright (c) 1992,1996. The Regents of the University of California (Regents). +All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and not-for-profit purposes, without +fee and without a signed licensing agreement, is hereby granted, provided that +the above copyright notice, this paragraph and the following two paragraphs +appear in all copies, modifications, and distributions. Contact The Office of +Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, +CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. + +Written by Adrian Freed, The Center for New Music and Audio Technologies, +University of California, Berkeley. + + IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, + SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING + DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". + REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. +*/ + + /* htmparam.h + + Adrian Freed + send parameters to htm servers by udp or UNIX protocol + */ +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif +typedef int bool; + +/* open a socket for HTM communication to given host on given portnumber */ +/* if host is 0 then UNIX protocol is used (i.e. local communication) */ +void *OpenHTMSocket(char *host, int portnumber); + +/* send a buffer of data over htm socket, returns TRUE on success. + Note that udp sends rarely fail. UNIX sends fail if a kernal buffer overflows */ +bool SendHTMSocket(void *htmsendhandle, int length_in_bytes, void *buffer); + +/* close the socket(2) and release memory associated with it */ +void CloseHTMSocket(void *htmsendhandle); diff --git a/veejay-server/test/OSC/send+dump/mcastOSC.c b/veejay-server/test/OSC/send+dump/mcastOSC.c new file mode 100644 index 00000000..e87419dc --- /dev/null +++ b/veejay-server/test/OSC/send+dump/mcastOSC.c @@ -0,0 +1,610 @@ +/* +Copyright (c) 1996,1997. The Regents of the University of California (Regents). +All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and not-for-profit purposes, without +fee and without a signed licensing agreement, is hereby granted, provided that +the above copyright notice, this paragraph and the following two paragraphs +appear in all copies, modifications, and distributions. Contact The Office of +Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, +CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + + IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, + SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING + DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". + REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. +*/ + +/* sendOSC.c + + Matt Wright, 6/3/97 + based on sendSC.c, which was based on a version by Adrian Freed + + Text-based OpenSoundControl client. User can enter messages via command + line arguments or standard input. + + Version 0.1: "play" feature + Version 0.2: Message type tags. + +*/ + +#define VERSION "http://cnmat.berkeley.edu/OpenSoundControl/sendOSC-0.1.html" + +/* +compiling: + cc -o sendOSC sendOSC.c htmsocket.c OpenSoundControl.c OSC_timeTag.c +*/ + +/* mcastOSC.c + Niels Elburg 10/01/05 + based on sendOSC.c , modified to send using multicast protocol +*/ +#include "OSC-client.h" +#include "mcastsocket.h" + +#include +#include +/* #include */ +#include + +#ifdef unix + #include + #include +#endif + +static int portnumber = 0; + +typedef struct { + enum {INT, FLOAT, STRING} type; + union { + int i; + float f; + char *s; + } datum; +} typedArg; + +void CommandLineMode(int argc, char *argv[], void *handle); +void InteractiveMode(void *handle); +OSCTimeTag ParseTimeTag(char *s); +void ParseInteractiveLine(OSCbuf *buf, char *mesg); +typedArg ParseToken(char *token); +int WriteMessage(OSCbuf *buf, char *messageName, int numArgs, typedArg *args); +void SendBuffer(void *handle, OSCbuf *buf, int port); +void SendData(void *handle,int size, char *data, int port); +void fatal_error(char *s); +void complain(char *s, ...); + +/* Exit status codes: + 0: successful + 2: Message(s) dropped because of buffer overflow + 3: Socket error + 4: Usage error + 5: Internal error +*/ +static int exitStatus = 0; + + +static int useTypeTags = 1; + +int main(int argc, char *argv[]) { + char *hostname = 0; + void *handle; + + argc--; + argv++; + + if (argc == 0) { + goto usageerror; + } + + if (argc >= 1 && (strncmp(*argv, "-notypetags", 2) == 0)) { + useTypeTags = 0; + argv++; + argc--; + } + + if (argc >= 2 && (strncmp(*argv, "-r", 2) == 0)) { + hostname = getenv("MCAST_ADDR"); + if (hostname == NULL) { + complain("sendSC -r: MCAST_ADDR not in environment\n"); + exit(4); + } + argv++; + argc--; + } + + if (argc >= 3 && (strncmp(*argv, "-g", 2) == 0)) { + hostname = argv[1]; + argv += 2; + argc -= 2; + } + portnumber = atoi(*argv); + argv++; + argc--; + + printf("Multicast sender on %s\n", hostname ); + + handle = OpenMCASTSocket(hostname); + if (!handle) { + perror("Couldn't open socket: "); + exit(3); + } + + if (argc > 0) { + printf("host %s, port %d, %s\n", hostname, portnumber, + useTypeTags ? "use type tags" : "don't use type tags"); + CommandLineMode(argc, argv, handle); + } else { + printf("sendOSC version " VERSION "\n"); + printf("by Matt Wright. Copyright (c) 1996, 1997 Regents of the University of California.\n"); + printf("host %s, port %d, %s\n", hostname, portnumber, + useTypeTags ? "use type tags" : "don't use type tags"); + InteractiveMode(handle); + } + CloseMCASTSocket(handle); + exit(exitStatus); + + + usageerror: + complain("usage: %s [-notypetags] [-r] [-g group_name] port_number [message...]\n", + argv[-1]); + exit(4); + +} + + +#define MAX_ARGS 2000 +#define SC_BUFFER_SIZE 32000 +static char bufferForOSCbuf[SC_BUFFER_SIZE]; + +void CommandLineMode(int argc, char *argv[], void *handle) { + char *messageName; + char *token; + typedArg args[MAX_ARGS]; + int i,j, numArgs; + OSCbuf buf[1]; + + OSC_initBuffer(buf, SC_BUFFER_SIZE, bufferForOSCbuf); + + if (argc > 1) { + if (OSC_openBundle(buf, OSCTT_Immediately())) { + complain("Problem opening bundle: %s\n", OSC_errorMessage); + return; + } + } + + for (i = 0; i < argc; i++) { + messageName = strtok(argv[i], ","); + if (messageName == NULL) { + break; + } + + j = 0; + while ((token = strtok(NULL, ",")) != NULL) { + args[j] = ParseToken(token); + j++; + if (j >= MAX_ARGS) { + complain("Sorry; your message has more than MAX_ARGS (%d) arguments; ignoring the rest.\n", + MAX_ARGS); + break; + } + } + numArgs = j; + + WriteMessage(buf, messageName, numArgs, args); + } + + if (argc > 1) { + if (OSC_closeBundle(buf)) { + complain("Problem closing bundle: %s\n", OSC_errorMessage); + return; + } + } + + SendBuffer(handle, buf, portnumber); +} + +#define MAXMESG 2048 + +void InteractiveMode(void *handle) { + char mesg[MAXMESG]; + OSCbuf buf[1]; + int bundleDepth = 0; /* At first, we haven't seen "[". */ + + OSC_initBuffer(buf, SC_BUFFER_SIZE, bufferForOSCbuf); + + while (fgets(mesg, MAXMESG, stdin) != NULL) { + if (mesg[0] == '\n') { + if (bundleDepth > 0) { + /* Ignore blank lines inside a group. */ + } else { + /* blank line => repeat previous send */ + SendBuffer(handle, buf, portnumber); + } + continue; + } + + if (bundleDepth == 0) { + OSC_resetBuffer(buf); + } + + if (mesg[0] == '[') { + OSCTimeTag tt = ParseTimeTag(mesg+1); + if (OSC_openBundle(buf, tt)) { + complain("Problem opening bundle: %s\n", OSC_errorMessage); + OSC_resetBuffer(buf); + bundleDepth = 0; + continue; + } + bundleDepth++; + } else if (mesg[0] == ']' && mesg[1] == '\n' && mesg[2] == '\0') { + if (bundleDepth == 0) { + complain("Unexpected ']': not currently in a bundle.\n"); + } else { + if (OSC_closeBundle(buf)) { + complain("Problem closing bundle: %s\n", OSC_errorMessage); + OSC_resetBuffer(buf); + bundleDepth = 0; + continue; + } + + bundleDepth--; + if (bundleDepth == 0) { + SendBuffer(handle, buf, portnumber); + } + } + } else { + ParseInteractiveLine(buf, mesg); + if (bundleDepth != 0) { + /* Don't send anything until we close all bundles */ + } else { + SendBuffer(handle, buf, portnumber); + } + } + } +} + +OSCTimeTag ParseTimeTag(char *s) { + char *p, *newline; + typedArg arg; + + p = s; + while (isspace(*p)) p++; + if (*p == '\0') return OSCTT_Immediately(); + + if (*p == '+') { + /* Time tag is for some time in the future. It should be a + number of seconds as an int or float */ + + newline = strchr(s, '\n'); + if (newline != NULL) *newline = '\0'; + + p++; /* Skip '+' */ + while (isspace(*p)) p++; + + arg = ParseToken(p); + if (arg.type == STRING) { + complain("warning: inscrutable time tag request: %s\n", s); + return OSCTT_Immediately(); + } else if (arg.type == INT) { + return OSCTT_PlusSeconds(OSCTT_CurrentTime(), + (float) arg.datum.i); + } else if (arg.type == FLOAT) { + return OSCTT_PlusSeconds(OSCTT_CurrentTime(), arg.datum.f); + } else { + fatal_error("This can't happen!"); + } + } + + if (isdigit(*p) || (*p >= 'a' && *p <='f') || (*p >= 'A' && *p <='F')) { + /* They specified the 8-byte tag in hex */ + OSCTimeTag tt; + if (sscanf(p, "%llx", &tt) != 1) { + complain("warning: couldn't parse time tag %s\n", s); + return OSCTT_Immediately(); + } +#ifndef HAS8BYTEINT + if (ntohl(1) != 1) { + /* tt is a struct of seconds and fractional part, + and this machine is little-endian, so sscanf + wrote each half of the time tag in the wrong half + of the struct. */ + uint32 temp; + temp = tt.seconds; + tt.seconds = tt.fraction ; + tt.fraction = temp; + } +#endif + return tt; + } + + complain("warning: invalid time tag: %s\n", s); + return OSCTT_Immediately(); +} + + +void ParseInteractiveLine(OSCbuf *buf, char *mesg) { + char *messageName, *token, *p; + typedArg args[MAX_ARGS]; + int thisArg; + + p = mesg; + while (isspace(*p)) p++; + if (*p == '\0') return; + + messageName = p; + + if (strcmp(messageName, "play\n") == 0) { + /* Special kludge feature to save typing */ + typedArg arg; + + if (OSC_openBundle(buf, OSCTT_Immediately())) { + complain("Problem opening bundle: %s\n", OSC_errorMessage); + return; + } + + arg.type = INT; + arg.datum.i = 0; + WriteMessage(buf, "/voices/0/tp/timbre_index", 1, &arg); + + arg.type = FLOAT; + arg.datum.i = 0.0f; + WriteMessage(buf, "/voices/0/tm/goto", 1, &arg); + + if (OSC_closeBundle(buf)) { + complain("Problem closing bundle: %s\n", OSC_errorMessage); + } + + return; + } + + while (!isspace(*p) && *p != '\0') p++; + if (isspace(*p)) { + *p = '\0'; + p++; + } + + thisArg = 0; + while (*p != '\0') { + /* flush leading whitespace */ + while (isspace(*p)) p++; + if (*p == '\0') break; + + if (*p == '"') { + /* A string argument: scan for close quotes */ + p++; + args[thisArg].type = STRING; + args[thisArg].datum.s = p; + + while (*p != '"') { + if (*p == '\0') { + complain("Unterminated quote mark: ignoring line\n"); + return; + } + p++; + } + *p = '\0'; + p++; + } else { + token = p; + while (!isspace(*p) && (*p != '\0')) p++; + if (isspace(*p)) { + *p = '\0'; + p++; + } + args[thisArg] = ParseToken(token); + } + thisArg++; + if (thisArg >= MAX_ARGS) { + complain("Sorry, your message has more than MAX_ARGS (%d) arguments; ignoring the rest.\n", + MAX_ARGS); + break; + } + } + + if (WriteMessage(buf, messageName, thisArg, args) != 0) { + complain("Problem sending message: %s\n", OSC_errorMessage); + } +} + +typedArg ParseToken(char *token) { + char *p = token; + typedArg returnVal; + + /* It might be an int, a float, or a string */ + + if (*p == '-') p++; + + if (isdigit(*p) || *p == '.') { + while (isdigit(*p)) p++; + if (*p == '\0') { + returnVal.type = INT; + returnVal.datum.i = atoi(token); + return returnVal; + } + if (*p == '.') { + p++; + while (isdigit(*p)) p++; + if (*p == '\0') { + returnVal.type = FLOAT; + returnVal.datum.f = atof(token); + return returnVal; + } + } + } + + returnVal.type = STRING; + returnVal.datum.s = token; + return returnVal; +} + +int WriteMessage(OSCbuf *buf, char *messageName, int numArgs, typedArg *args) { + int j, returnVal; + + returnVal = 0; + +#ifdef DEBUG + printf("WriteMessage: %s ", messageName); + + for (j = 0; j < numArgs; j++) { + switch (args[j].type) { + case INT: + printf("%d ", args[j].datum.i); + break; + + case FLOAT: + printf("%f ", args[j].datum.f); + break; + + case STRING: + printf("%s ", args[j].datum.s); + break; + + default: + fatal_error("Unrecognized arg type"); + exit(5); + } + } + printf("\n"); +#endif + + if (!useTypeTags) { + returnVal = OSC_writeAddress(buf, messageName); + if (returnVal) { + complain("Problem writing address: %s\n", OSC_errorMessage); + } + } else { + /* First figure out the type tags */ + char typeTags[MAX_ARGS+2]; + int i; + + typeTags[0] = ','; + + for (i = 0; i < numArgs; ++i) { + switch (args[i].type) { + case INT: + typeTags[i+1] = 'i'; + break; + + case FLOAT: + typeTags[i+1] = 'f'; + break; + + case STRING: + typeTags[i+1] = 's'; + break; + + default: + fatal_error("Unrecognized arg type"); + exit(5); + } + } + typeTags[i+1] = '\0'; + + returnVal = OSC_writeAddressAndTypes(buf, messageName, typeTags); + if (returnVal) { + complain("Problem writing address: %s\n", OSC_errorMessage); + } + } + + for (j = 0; j < numArgs; j++) { + switch (args[j].type) { + case INT: + if ((returnVal = OSC_writeIntArg(buf, args[j].datum.i)) != 0) { + return returnVal; + } + break; + + case FLOAT: + if ((returnVal = OSC_writeFloatArg(buf, args[j].datum.f)) != 0) { + return returnVal; + } + break; + + case STRING: + if ((returnVal = OSC_writeStringArg(buf, args[j].datum.s)) != 0) { + return returnVal; + } + break; + + default: + fatal_error("Unrecognized arg type"); + exit(5); + } + } + + return returnVal; +} + +void SendBuffer(void *handle, OSCbuf *buf, int portnum) { +#ifdef DEBUG + printf("Sending buffer...\n"); +#endif + if (OSC_isBufferEmpty(buf)) return; + if (!OSC_isBufferDone(buf)) { + fatal_error("SendBuffer() called but buffer not ready!"); + exit(5); + } + SendData(handle, OSC_packetSize(buf), OSC_getPacket(buf), portnum); +} + +void SendData(void *handle, int size, char *data, int port) { + if (!SendMCASTSocket(handle,port, data, size)) { + perror("Couldn't send out socket: "); + CloseMCASTSocket(handle); + exit(3); + } +} + +void fatal_error(char *s) { + fprintf(stderr, "%s\n", s); + exit(4); +} + +#include +void complain(char *s, ...) { + va_list ap; + va_start(ap, s); + vfprintf(stderr, s, ap); + va_end(ap); +} + + +#ifdef COMPUTE_MESSAGE_SIZE + /* Unused code to find the size of a message */ + + /* Compute size */ + size = SynthControl_effectiveStringLength(messageName); + + for (j = 0; j < numArgs; j++) { + switch (args[j].type) { + case INT: case FLOAT: + size += 4; + break; + + case STRING: + size += SynthControl_effectiveStringLength(args[j].datum.s); + break; + + default: + fatal_error("Unrecognized token type"); + exit(4); + } + } + + if (!SynthControl_willMessageFit(buf, size)) { + complain("Message \"%s\" won't fit in buffer: dropping.", messageName); + return; + } +#endif diff --git a/veejay-server/test/OSC/send+dump/mcastsocket.c b/veejay-server/test/OSC/send+dump/mcastsocket.c new file mode 100644 index 00000000..f1d9b541 --- /dev/null +++ b/veejay-server/test/OSC/send+dump/mcastsocket.c @@ -0,0 +1,125 @@ +/* +Copyright (c) 1992,1996,1998. +The Regents of the University of California (Regents). +All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and not-for-profit purposes, without +fee and without a signed licensing agreement, is hereby granted, provided that +the above copyright notice, this paragraph and the following two paragraphs +appear in all copies, modifications, and distributions. Contact The Office of +Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, +CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. + +Written by Adrian Freed, The Center for New Music and Audio Technologies, +University of California, Berkeley. + + IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, + SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING + DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". + REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. +*/ + + /* htmsocket.c + + Adrian Freed + send parameters to htm servers by udp or UNIX protocol + + Modified 6/6/96 by Matt Wright to understand symbolic host names + in addition to X.X.X.X addresses. + */ + +/* + mcastsocket.c + + Niels Elburg + send using multicast protocol + +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "mcastsocket.h" + +typedef struct +{ + char *group_name; + struct sockaddr_in mcast_addr_; + socklen_t mcast_addr_len_; + int sock_; +} mcast_; + +void *OpenMCASTSocket(const char *mcast_groupname) +{ + mcast_ *mc = (mcast_*) malloc(sizeof( mcast_ )); + int on = 1; + unsigned char ttl = 1; + if(!mc) return NULL; + + memset( &mc->mcast_addr_, 0, sizeof( mc->mcast_addr_ )); + mc->mcast_addr_len_ = sizeof( struct sockaddr_in ); + + mc->group_name = (char*) strdup( mcast_groupname ); + mc->mcast_addr_.sin_addr.s_addr = inet_addr( mcast_groupname ); + mc->mcast_addr_.sin_family = AF_INET; + mc->mcast_addr_.sin_port = htons( 0 ); // filled on demand + mc->sock_ = socket( AF_INET, SOCK_DGRAM, 0 ); +#ifdef SO_REUSEADDR + setsockopt( mc->sock_, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); +#endif +#ifdef SO_REUSEPORT + setsockopt( mc->sock_ , SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)); +#endif + setsockopt( mc->sock_ , IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)); + return (void*) mc; +} + +void SetInterface( void *handle, const char *ip_address ) +{ + struct sockaddr_in if_addr; + mcast_ *mc = (mcast_*) handle; + memset( &if_addr, 0, sizeof(if_addr)); + mc->mcast_addr_.sin_addr.s_addr = inet_addr( ip_address ); + mc->mcast_addr_.sin_family = AF_INET; + setsockopt( mc->sock_, IPPROTO_IP, IP_MULTICAST_IF, &if_addr, + sizeof( if_addr ) ); +} + +int SendMCASTSocket(void *handle, int port, const void *buffer, int len) +{ + mcast_ *mc = (mcast_*) handle; + mc->mcast_addr_.sin_port = htons( port ); + int n = sendto( mc->sock_, buffer, len, 0, + (struct sockaddr *) &mc->mcast_addr_, mc->mcast_addr_len_ ); + printf("Send %d bytes \n"); + return n; +} +void CloseMCASTSocket(void *handle) +{ + mcast_ *mc = (mcast_*) handle; + close(mc->sock_); +} diff --git a/veejay-server/test/OSC/send+dump/mcastsocket.h b/veejay-server/test/OSC/send+dump/mcastsocket.h new file mode 100644 index 00000000..c0cba199 --- /dev/null +++ b/veejay-server/test/OSC/send+dump/mcastsocket.h @@ -0,0 +1,51 @@ +/* +Copyright (c) 1992,1996. The Regents of the University of California (Regents). +All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and not-for-profit purposes, without +fee and without a signed licensing agreement, is hereby granted, provided that +the above copyright notice, this paragraph and the following two paragraphs +appear in all copies, modifications, and distributions. Contact The Office of +Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, +CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. + +Written by Adrian Freed, The Center for New Music and Audio Technologies, +University of California, Berkeley. + + IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, + SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING + DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". + REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. +*/ + + /* htmparam.h + + Adrian Freed + send parameters to htm servers by udp or UNIX protocol + */ + +/* + mcastsocket.h + Niels Elburg + header file for multicast sender +*/ +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +void *OpenMCASTSocket(const char *groupname ); + +int SendMCASTSocket(void *handle, int port,const void *buf, int length_in_bytes); + +void CloseMCASTSocket(void *handle); + +void SetInterface( void *handle, const char *group_name ); diff --git a/veejay-server/test/OSC/send+dump/sendOSC.c b/veejay-server/test/OSC/send+dump/sendOSC.c new file mode 100644 index 00000000..d37a539c --- /dev/null +++ b/veejay-server/test/OSC/send+dump/sendOSC.c @@ -0,0 +1,604 @@ +/* +Copyright (c) 1996,1997. The Regents of the University of California (Regents). +All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and not-for-profit purposes, without +fee and without a signed licensing agreement, is hereby granted, provided that +the above copyright notice, this paragraph and the following two paragraphs +appear in all copies, modifications, and distributions. Contact The Office of +Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, +CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. + +Written by Matt Wright, The Center for New Music and Audio Technologies, +University of California, Berkeley. + + IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, + SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING + DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". + REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. +*/ + +/* sendOSC.c + + Matt Wright, 6/3/97 + based on sendSC.c, which was based on a version by Adrian Freed + + Text-based OpenSoundControl client. User can enter messages via command + line arguments or standard input. + + Version 0.1: "play" feature + Version 0.2: Message type tags. + +*/ + +#define VERSION "http://cnmat.berkeley.edu/OpenSoundControl/sendOSC-0.1.html" + +/* +compiling: + cc -o sendOSC sendOSC.c htmsocket.c OpenSoundControl.c OSC_timeTag.c +*/ + + +#include "OSC-client.h" +#include "htmsocket.h" + +#include +#include +/* #include */ +#include + +#ifdef unix + #include + #include +#endif + +typedef struct { + enum {INT, FLOAT, STRING} type; + union { + int i; + float f; + char *s; + } datum; +} typedArg; + +void CommandLineMode(int argc, char *argv[], void *htmsocket); +void InteractiveMode(void *htmsocket); +OSCTimeTag ParseTimeTag(char *s); +void ParseInteractiveLine(OSCbuf *buf, char *mesg); +typedArg ParseToken(char *token); +int WriteMessage(OSCbuf *buf, char *messageName, int numArgs, typedArg *args); +void SendBuffer(void *htmsocket, OSCbuf *buf); +void SendData(void *htmsocket, int size, char *data); +void fatal_error(char *s); +void complain(char *s, ...); + +/* Exit status codes: + 0: successful + 2: Message(s) dropped because of buffer overflow + 3: Socket error + 4: Usage error + 5: Internal error +*/ +static int exitStatus = 0; + + +static int useTypeTags = 1; + +int main(int argc, char *argv[]) { + int portnumber; + char *hostname = 0; + void *htmsocket; + + argc--; + argv++; + + if (argc == 0) { + goto usageerror; + } + + if (argc >= 1 && (strncmp(*argv, "-notypetags", 2) == 0)) { + useTypeTags = 0; + argv++; + argc--; + } + + if (argc >= 2 && (strncmp(*argv, "-r", 2) == 0)) { + hostname = getenv("REMOTE_ADDR"); + if (hostname == NULL) { + complain("sendSC -r: REMOTE_ADDR not in environment\n"); + exit(4); + } + argv++; + argc--; + } + + if (argc >= 3 && (strncmp(*argv, "-h", 2) == 0)) { + hostname = argv[1]; + argv += 2; + argc -= 2; + } + portnumber = atoi(*argv); + argv++; + argc--; + + htmsocket = OpenHTMSocket(hostname, portnumber); + if (!htmsocket) { + perror("Couldn't open socket: "); + exit(3); + } + + if (argc > 0) { + printf("host %s, port %d, %s\n", hostname, portnumber, + useTypeTags ? "use type tags" : "don't use type tags"); + CommandLineMode(argc, argv, htmsocket); + } else { + printf("sendOSC version " VERSION "\n"); + printf("by Matt Wright. Copyright (c) 1996, 1997 Regents of the University of California.\n"); + printf("host %s, port %d, %s\n", hostname, portnumber, + useTypeTags ? "use type tags" : "don't use type tags"); + InteractiveMode(htmsocket); + } + CloseHTMSocket(htmsocket); + exit(exitStatus); + + + usageerror: + complain("usage: %s [-notypetags] [-r] [-h target_host_name] port_number [message...]\n", + argv[-1]); + exit(4); + +} + + +#define MAX_ARGS 2000 +#define SC_BUFFER_SIZE 32000 +static char bufferForOSCbuf[SC_BUFFER_SIZE]; + +void CommandLineMode(int argc, char *argv[], void *htmsocket) { + char *messageName; + char *token; + typedArg args[MAX_ARGS]; + int i,j, numArgs; + OSCbuf buf[1]; + + OSC_initBuffer(buf, SC_BUFFER_SIZE, bufferForOSCbuf); + + if (argc > 1) { + if (OSC_openBundle(buf, OSCTT_Immediately())) { + complain("Problem opening bundle: %s\n", OSC_errorMessage); + return; + } + } + + for (i = 0; i < argc; i++) { + messageName = strtok(argv[i], ","); + if (messageName == NULL) { + break; + } + + j = 0; + while ((token = strtok(NULL, ",")) != NULL) { + args[j] = ParseToken(token); + j++; + if (j >= MAX_ARGS) { + complain("Sorry; your message has more than MAX_ARGS (%d) arguments; ignoring the rest.\n", + MAX_ARGS); + break; + } + } + numArgs = j; + + WriteMessage(buf, messageName, numArgs, args); + } + + if (argc > 1) { + if (OSC_closeBundle(buf)) { + complain("Problem closing bundle: %s\n", OSC_errorMessage); + return; + } + } + + SendBuffer(htmsocket, buf); +} + +#define MAXMESG 2048 + +void InteractiveMode(void *htmsocket) { + char mesg[MAXMESG]; + OSCbuf buf[1]; + int bundleDepth = 0; /* At first, we haven't seen "[". */ + + OSC_initBuffer(buf, SC_BUFFER_SIZE, bufferForOSCbuf); + + while (fgets(mesg, MAXMESG, stdin) != NULL) { + if (mesg[0] == '\n') { + if (bundleDepth > 0) { + /* Ignore blank lines inside a group. */ + } else { + /* blank line => repeat previous send */ + SendBuffer(htmsocket, buf); + } + continue; + } + + if (bundleDepth == 0) { + OSC_resetBuffer(buf); + } + + if (mesg[0] == '[') { + OSCTimeTag tt = ParseTimeTag(mesg+1); + if (OSC_openBundle(buf, tt)) { + complain("Problem opening bundle: %s\n", OSC_errorMessage); + OSC_resetBuffer(buf); + bundleDepth = 0; + continue; + } + bundleDepth++; + } else if (mesg[0] == ']' && mesg[1] == '\n' && mesg[2] == '\0') { + if (bundleDepth == 0) { + complain("Unexpected ']': not currently in a bundle.\n"); + } else { + if (OSC_closeBundle(buf)) { + complain("Problem closing bundle: %s\n", OSC_errorMessage); + OSC_resetBuffer(buf); + bundleDepth = 0; + continue; + } + + bundleDepth--; + if (bundleDepth == 0) { + SendBuffer(htmsocket, buf); + } + } + } else { + ParseInteractiveLine(buf, mesg); + if (bundleDepth != 0) { + /* Don't send anything until we close all bundles */ + } else { + SendBuffer(htmsocket, buf); + } + } + } +} + +OSCTimeTag ParseTimeTag(char *s) { + char *p, *newline; + typedArg arg; + + p = s; + while (isspace(*p)) p++; + if (*p == '\0') return OSCTT_Immediately(); + + if (*p == '+') { + /* Time tag is for some time in the future. It should be a + number of seconds as an int or float */ + + newline = strchr(s, '\n'); + if (newline != NULL) *newline = '\0'; + + p++; /* Skip '+' */ + while (isspace(*p)) p++; + + arg = ParseToken(p); + if (arg.type == STRING) { + complain("warning: inscrutable time tag request: %s\n", s); + return OSCTT_Immediately(); + } else if (arg.type == INT) { + return OSCTT_PlusSeconds(OSCTT_CurrentTime(), + (float) arg.datum.i); + } else if (arg.type == FLOAT) { + return OSCTT_PlusSeconds(OSCTT_CurrentTime(), arg.datum.f); + } else { + fatal_error("This can't happen!"); + } + } + + if (isdigit(*p) || (*p >= 'a' && *p <='f') || (*p >= 'A' && *p <='F')) { + /* They specified the 8-byte tag in hex */ + OSCTimeTag tt; + if (sscanf(p, "%llx", &tt) != 1) { + complain("warning: couldn't parse time tag %s\n", s); + return OSCTT_Immediately(); + } +#ifndef HAS8BYTEINT + if (ntohl(1) != 1) { + /* tt is a struct of seconds and fractional part, + and this machine is little-endian, so sscanf + wrote each half of the time tag in the wrong half + of the struct. */ + uint32 temp; + temp = tt.seconds; + tt.seconds = tt.fraction ; + tt.fraction = temp; + } +#endif + return tt; + } + + complain("warning: invalid time tag: %s\n", s); + return OSCTT_Immediately(); +} + + +void ParseInteractiveLine(OSCbuf *buf, char *mesg) { + char *messageName, *token, *p; + typedArg args[MAX_ARGS]; + int thisArg; + + p = mesg; + while (isspace(*p)) p++; + if (*p == '\0') return; + + messageName = p; + + if (strcmp(messageName, "play\n") == 0) { + /* Special kludge feature to save typing */ + typedArg arg; + + if (OSC_openBundle(buf, OSCTT_Immediately())) { + complain("Problem opening bundle: %s\n", OSC_errorMessage); + return; + } + + arg.type = INT; + arg.datum.i = 0; + WriteMessage(buf, "/voices/0/tp/timbre_index", 1, &arg); + + arg.type = FLOAT; + arg.datum.i = 0.0f; + WriteMessage(buf, "/voices/0/tm/goto", 1, &arg); + + if (OSC_closeBundle(buf)) { + complain("Problem closing bundle: %s\n", OSC_errorMessage); + } + + return; + } + + while (!isspace(*p) && *p != '\0') p++; + if (isspace(*p)) { + *p = '\0'; + p++; + } + + thisArg = 0; + while (*p != '\0') { + /* flush leading whitespace */ + while (isspace(*p)) p++; + if (*p == '\0') break; + + if (*p == '"') { + /* A string argument: scan for close quotes */ + p++; + args[thisArg].type = STRING; + args[thisArg].datum.s = p; + + while (*p != '"') { + if (*p == '\0') { + complain("Unterminated quote mark: ignoring line\n"); + return; + } + p++; + } + *p = '\0'; + p++; + } else { + token = p; + while (!isspace(*p) && (*p != '\0')) p++; + if (isspace(*p)) { + *p = '\0'; + p++; + } + args[thisArg] = ParseToken(token); + } + thisArg++; + if (thisArg >= MAX_ARGS) { + complain("Sorry, your message has more than MAX_ARGS (%d) arguments; ignoring the rest.\n", + MAX_ARGS); + break; + } + } + + if (WriteMessage(buf, messageName, thisArg, args) != 0) { + complain("Problem sending message: %s\n", OSC_errorMessage); + } +} + +typedArg ParseToken(char *token) { + char *p = token; + typedArg returnVal; + + /* It might be an int, a float, or a string */ + + if (*p == '-') p++; + + if (isdigit(*p) || *p == '.') { + while (isdigit(*p)) p++; + if (*p == '\0') { + returnVal.type = INT; + returnVal.datum.i = atoi(token); + return returnVal; + } + if (*p == '.') { + p++; + while (isdigit(*p)) p++; + if (*p == '\0') { + returnVal.type = FLOAT; + returnVal.datum.f = atof(token); + return returnVal; + } + } + } + + returnVal.type = STRING; + returnVal.datum.s = token; + return returnVal; +} + +int WriteMessage(OSCbuf *buf, char *messageName, int numArgs, typedArg *args) { + int j, returnVal; + + returnVal = 0; + +#ifdef DEBUG + printf("WriteMessage: %s ", messageName); + + for (j = 0; j < numArgs; j++) { + switch (args[j].type) { + case INT: + printf("%d ", args[j].datum.i); + break; + + case FLOAT: + printf("%f ", args[j].datum.f); + break; + + case STRING: + printf("%s ", args[j].datum.s); + break; + + default: + fatal_error("Unrecognized arg type"); + exit(5); + } + } + printf("\n"); +#endif + + if (!useTypeTags) { + returnVal = OSC_writeAddress(buf, messageName); + if (returnVal) { + complain("Problem writing address: %s\n", OSC_errorMessage); + } + } else { + /* First figure out the type tags */ + char typeTags[MAX_ARGS+2]; + int i; + + typeTags[0] = ','; + + for (i = 0; i < numArgs; ++i) { + switch (args[i].type) { + case INT: + typeTags[i+1] = 'i'; + break; + + case FLOAT: + typeTags[i+1] = 'f'; + break; + + case STRING: + typeTags[i+1] = 's'; + break; + + default: + fatal_error("Unrecognized arg type"); + exit(5); + } + } + typeTags[i+1] = '\0'; + + returnVal = OSC_writeAddressAndTypes(buf, messageName, typeTags); + if (returnVal) { + complain("Problem writing address: %s\n", OSC_errorMessage); + } + } + + for (j = 0; j < numArgs; j++) { + switch (args[j].type) { + case INT: + if ((returnVal = OSC_writeIntArg(buf, args[j].datum.i)) != 0) { + return returnVal; + } + break; + + case FLOAT: + if ((returnVal = OSC_writeFloatArg(buf, args[j].datum.f)) != 0) { + return returnVal; + } + break; + + case STRING: + if ((returnVal = OSC_writeStringArg(buf, args[j].datum.s)) != 0) { + return returnVal; + } + break; + + default: + fatal_error("Unrecognized arg type"); + exit(5); + } + } + + return returnVal; +} + +void SendBuffer(void *htmsocket, OSCbuf *buf) { +#ifdef DEBUG + printf("Sending buffer...\n"); +#endif + if (OSC_isBufferEmpty(buf)) return; + if (!OSC_isBufferDone(buf)) { + fatal_error("SendBuffer() called but buffer not ready!"); + exit(5); + } + SendData(htmsocket, OSC_packetSize(buf), OSC_getPacket(buf)); +} + +void SendData(void *htmsocket, int size, char *data) { + if (!SendHTMSocket(htmsocket, size, data)) { + perror("Couldn't send out socket: "); + CloseHTMSocket(htmsocket); + exit(3); + } +} + +void fatal_error(char *s) { + fprintf(stderr, "%s\n", s); + exit(4); +} + +#include +void complain(char *s, ...) { + va_list ap; + va_start(ap, s); + vfprintf(stderr, s, ap); + va_end(ap); +} + + +#ifdef COMPUTE_MESSAGE_SIZE + /* Unused code to find the size of a message */ + + /* Compute size */ + size = SynthControl_effectiveStringLength(messageName); + + for (j = 0; j < numArgs; j++) { + switch (args[j].type) { + case INT: case FLOAT: + size += 4; + break; + + case STRING: + size += SynthControl_effectiveStringLength(args[j].datum.s); + break; + + default: + fatal_error("Unrecognized token type"); + exit(4); + } + } + + if (!SynthControl_willMessageFit(buf, size)) { + complain("Message \"%s\" won't fit in buffer: dropping.", messageName); + return; + } +#endif diff --git a/veejay-server/test/README b/veejay-server/test/README new file mode 100644 index 00000000..d634cfdf --- /dev/null +++ b/veejay-server/test/README @@ -0,0 +1,26 @@ + + +In this directory: + + OSC/ + Open Sound Control 'sendOSC' utility + Use 'veejay -u |less' to find out what to send. + + examples/ + perl scripts that generate the files in vims/ are found here + + livecinema/ + action-file.xml ;example action file for veejay , run with -l or --action-file + + vims/ + the files in this directory can be send to veejay, it demonstrates series of effect chains. + + sendVIMS -f montevideo-auto.txt + + + Example to produce a vims file and to send it to veejay: + + $ perl examples/swirl.nl > vims/swirl.vims + + $ sendVIMS -f vims/swirl.vims + diff --git a/veejay-server/test/examples/auto-vj.nl b/veejay-server/test/examples/auto-vj.nl new file mode 100644 index 00000000..ce6b9929 --- /dev/null +++ b/veejay-server/test/examples/auto-vj.nl @@ -0,0 +1,30 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +for(my $k =0; $k < 3; $k++) +{ + for(my $j = 0; $j < 25; $j ++) + { + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 -1 102 $k $j;\n"; + + } +} + +for(my $i = 0 ; $i < 100; $i ++) +{ + $max = int(rand(75)); + $delay = int(rand(25 + max)); + print "+$delay\n"; + + + $type = int(rand( 3 )); + $count =int(rand( 10 )); + print "361:0 -1 102 $type $count;\n" +} diff --git a/veejay-server/test/examples/colorenhancedemo1.pl b/veejay-server/test/examples/colorenhancedemo1.pl new file mode 100644 index 00000000..c7886142 --- /dev/null +++ b/veejay-server/test/examples/colorenhancedemo1.pl @@ -0,0 +1,27 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + + +print "177:;\n"; + +for ($k=60; $k < 255; $k+=4) +{ +print "361:0 4 146 $k 60 60;\n"; +print "+1\n"; +} + +for ($k=60; $k < 255; $k+=4) +{ +print "361:0 4 146 60 $k 60;\n"; +print "+1\n"; +} + + +for ($k=60; $k < 255; $k+=4) +{ +print "361:0 4 146 60 60 $k;\n"; +print "+1\n"; +} + diff --git a/veejay-server/test/examples/demo1.pl b/veejay-server/test/examples/demo1.pl new file mode 100644 index 00000000..bb4ad64f --- /dev/null +++ b/veejay-server/test/examples/demo1.pl @@ -0,0 +1,112 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +my $p1_end = 90; +my $p1_start = 0; +my $p2_start = 0; +my $p2_end = 20; +my $p3_start = 0; +my $p3_end = 200; +my $p4_start = 0; +my $p4_end = 40; + +my $j=0; +my $k=0; +my $l=0; + +print "355:;\n"; + + +for (my $i = 2; $i < 25; $i+=2) +{ +print "361:0 3 154 $i;\n"; +print "+10;\n"; +} + +for (my $i = 2; $i < 25; $i+=2) +{ +print "361:0 3 154 -$i;\n"; +print "+10;\n"; +} + + +print "+200;\n"; + + +print "361:0 3 154 -100;\n"; + +print "+200;\n"; + +print "361:0 3 154 40;\n"; + +print "+200;\n"; + +for(my $r=0; $r < 5; $r++) +{ +for(my $i=$p1_start; $i < $p1_end; $i+=2) +{ + $l++; + $k++; + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 1 151 $i $j $k $l;\n"; +} +for(my $i=$p1_end; $i != $p1_start; $i-=2) +{ + $l--; + $k--; + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 1 151 $i $j $k $l;\n"; +} + + + +} + + + + +# smear: +print "361:0 5 152 0 31;\n"; + + +print "+100;\n"; + +for(my $r=0; $r < 5; $r++) +{ +for(my $i=$p1_start; $i < $p1_end; $i+=2) +{ + $l++; + $k++; + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 1 151 $i $j $k $l;\n"; +} +for(my $i=$p1_end; $i != $p1_start; $i-=2) +{ + $l--; + $k--; + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 1 151 $i $j $k $l;\n"; +} + + + +} + diff --git a/veejay-server/test/examples/demo2.pl b/veejay-server/test/examples/demo2.pl new file mode 100644 index 00000000..41187e63 --- /dev/null +++ b/veejay-server/test/examples/demo2.pl @@ -0,0 +1,34 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +for(my $k =0; $k < 2; $k++) +{ + for(my $j = 0; $j < 20; $j ++) + { + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 -1 102 $k $j;\n"; + + } +} +for(my $k =1; $k != 0; $k--) +{ + for(my $j = 20; $j != 0; $j --) + { + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 -1 102 $k $j;\n"; + + } +} + +print "177:;\n"; + diff --git a/veejay-server/test/examples/displace.pl b/veejay-server/test/examples/displace.pl new file mode 100644 index 00000000..5e588094 --- /dev/null +++ b/veejay-server/test/examples/displace.pl @@ -0,0 +1,17 @@ +my $i; + +for(my $j = 0; $j < 40; $j++) +{ + +for($i = 0; $i < 100; $i ++ ) +{ + print("361:0 9 233 $i $i;\n"); + print("+25\n"); +} +for($i = 100; $i > 1 ; $i -- ) +{ + print("361:0 9 233 $i $i;\n"); + print("+25\n"); + +} +} diff --git a/veejay-server/test/examples/fortune.pl b/veejay-server/test/examples/fortune.pl new file mode 100644 index 00000000..066e7f18 --- /dev/null +++ b/veejay-server/test/examples/fortune.pl @@ -0,0 +1,22 @@ + +print "310:/usr/local/lib/libvj_drawtext_plugin.so;\n"; +print "+10\n"; +for ( my $m = 0; $m < 200 ; $m ++ ) +{ + + my @text = `/usr/games/fortune|tr -d [:cntrl:]`; + my $lines = join "\n", @text; + my $size = 12 + int(rand(15)); + my $y = 10 + int(rand(400)); + $lines =~ s/\n/\" \"/g; + $lines =~ s/":"//; + $lines =~ s/"="//; + $lines =~ s/";"//; + + print "312:DrawText::text=$lines:size=$size:x=2:y=$y:rand=41;\n"; + + + + print "+200\n"; + +} diff --git a/veejay-server/test/examples/keydemo2.pl b/veejay-server/test/examples/keydemo2.pl new file mode 100644 index 00000000..b6aebd83 --- /dev/null +++ b/veejay-server/test/examples/keydemo2.pl @@ -0,0 +1,22 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +my $len = 100; + +print "355:;\n"; + + +#clip a = blue, clip b = green + +print "361:0 1 242 44 255;\n"; + +print "+$len\n"; + +print "361:0 1 223 2990 255 0 0;\n"; +print "+$len\n"; + + + + diff --git a/veejay-server/test/examples/magicmirror.nl b/veejay-server/test/examples/magicmirror.nl new file mode 100644 index 00000000..4101ef64 --- /dev/null +++ b/veejay-server/test/examples/magicmirror.nl @@ -0,0 +1,46 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +my $p1_end = 80; +my $p1_start = 0; +my $p2_start = 0; +my $p2_end = 40; +my $p3_start = 0; +my $p3_end = 200; +my $p4_start = 0; +my $p4_end = 40; + +my $j=0; +my $k=0; +my $l=0; +for(my $bla = 0; $bla < 50; $bla ++ ) +{ + +for(my $i=$p1_start; $i < $p1_end; $i++) +{ + #$$l++; +# $j++; +# $k++; + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 -1 151 $i $j $i $l;\n"; +} +for(my $i=$p1_end; $i != $p1_start; $i--) +{ +# $l--; +# $j--; +# $k--; + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 -1 151 $i $j $i $l;\n"; +} + +} diff --git a/veejay-server/test/examples/noisedemo2.pl b/veejay-server/test/examples/noisedemo2.pl new file mode 100644 index 00000000..c372f518 --- /dev/null +++ b/veejay-server/test/examples/noisedemo2.pl @@ -0,0 +1,33 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +my $len = 50; + +print "355:;\n"; + +print "361:0 1 207 9 60;\n"; + +print "+$len\n"; + +print "361:0 2 106 255;\n"; + +print "+$len\n"; + +print "361:0 3 205 255 0 100 352 0;\n"; + +print "+$len\n"; + +print "361:0 4 134 0 1568;\n"; + +print "+$len\n"; + +for(my $i=1; $i < 50; $i++) +{ + print "+2\n"; + print "361:0 3 141 $len 1 0;\n"; +} + +print "+1\n"; + diff --git a/veejay-server/test/examples/overlaydemo2.pl b/veejay-server/test/examples/overlaydemo2.pl new file mode 100644 index 00000000..dae5452a --- /dev/null +++ b/veejay-server/test/examples/overlaydemo2.pl @@ -0,0 +1,43 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +my $len = 50; + +print "355:;\n"; + + +for(my $mode =0; $mode < 31; $mode++) +{ + print "361:0 1 201 $mode;\n"; + print "+$len\n"; +} + + +for(my $mode=0; $mode < 23; $mode++) +{ +for(my $val = 0; $val < 255; $val+=8) +{ +print "361:0 1 207 $mode $val;\n"; +} +for(my $val = 255; $val > 1; $val-=8) +{ +print "361:0 1 207 $mode $val;\n"; +} +} + + +for(my $mode=0; $mode < 31; $mode++) +{ +for(my $val = 0; $val < 100; $val+=4) +{ +print "361:0 1 202 $mode $val;\n"; +} +for(my $val = 100; $val > 1; $val-=4) +{ +print "361:0 1 202 $mode $val;\n"; +} +} + + diff --git a/veejay-server/test/examples/pixelate.pl b/veejay-server/test/examples/pixelate.pl new file mode 100644 index 00000000..0900c005 --- /dev/null +++ b/veejay-server/test/examples/pixelate.pl @@ -0,0 +1,25 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +for(my $j = 0; $j < 25; $j ++) +{ + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 -1 150 $j;\n"; +} + + +for(my $j = 25; $j != 0 ; $j --) +{ + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # somewhere on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 -1 150 $j;\n"; +} diff --git a/veejay-server/test/examples/split.pl b/veejay-server/test/examples/split.pl new file mode 100644 index 00000000..eaa50ce8 --- /dev/null +++ b/veejay-server/test/examples/split.pl @@ -0,0 +1,12 @@ + +printf("361:0 0 209 10 1;\n"); + + +for (my $j = 1; $j < 100; $j ++ ) +{ +for ( my $r = 1; $r < 10; $r ++ ) +{ + printf("366:0 0 $r;\n"); + printf("+100\n"); +} +} diff --git a/veejay-server/test/examples/swirl.nl b/veejay-server/test/examples/swirl.nl new file mode 100644 index 00000000..656b1fc1 --- /dev/null +++ b/veejay-server/test/examples/swirl.nl @@ -0,0 +1,25 @@ + +my $w = 0; +my $h = 0; +for(my $j = 0; $j != 360 ; $j ++) +{ + # 1 frame delay before sending message + print "+1\n"; + # preset effect 102 (multi mirrors) + # 0 on the current playing clip/stream + # with sequenced parameters 0..3 0..25 + print "361:0 2 155 $j;\n"; + print "+1\n"; + print "361:0 4 142 $w $h 1;\n"; + print "+1\n"; + for(my $k = 2; $k < 8; $k++) { + print "361:0 6 141 $k 1;\n"; + print "+1\n"; + } + for(my $k = 8; $k > 2 ; $k--) { + print "361:0 6 141 $k 1;\n"; + print "+1\n"; + } + + +} diff --git a/veejay-server/test/examples/zoomdemo.pl b/veejay-server/test/examples/zoomdemo.pl new file mode 100644 index 00000000..c7481a7e --- /dev/null +++ b/veejay-server/test/examples/zoomdemo.pl @@ -0,0 +1,24 @@ + +# show multi mirrors, +# type 0,1 = vertical, 1,2 = horizontal +# count is meaningfull below ~30 + +my $len = 100; + +print "177:0;\n"; +print "176:0;\n"; +print "182:0 1 142 0 62 1;\n"; +print "178:0 100;\n"; +print "175:0;\n"; +print "179:0 100;\n"; +print "+200\n"; + +print "177:0;\n"; +print "175:0;\n"; + +for(my $i=0; $i < 255; $i++) +{ +print "182:0 1 204 $i;\n"; +print "+1\n"; +} + diff --git a/veejay-server/test/livecinema/action-file.xml b/veejay-server/test/livecinema/action-file.xml new file mode 100644 index 00000000..3f118880 --- /dev/null +++ b/veejay-server/test/livecinema/action-file.xml @@ -0,0 +1,301 @@ + + + + 501 + BUN:007{112:;096:4 7;361:0 3 129 68 152;361:0 4 134 1 112;361:0 5 126 3 255 24 1;369:0 6;369:0 5;} + 110 + 3 + + + + 502 + BUN:006{112:;361:0 3 129 68 152;361:0 4 134 1 112;361:0 5 126 3 255 24 1;361:0 6 124 165 5 0;369:0 5;} + 122 + 3 + + + + 503 + BUN:006{112:;361:0 3 129 68 152;361:0 4 134 1 112;361:0 5 126 3 255 24 1;361:0 6 205 255 0 0 1 0;369:0 5;} + 109 + 3 + + + + 504 + BUN:006{112:;361:0 3 101 5;361:0 4 101 4;361:0 5 102 1 1 0;361:0 5 212 1 18 1;361:0 6 106 45;} + 120 + 3 + + + + 505 + BUN:004{112:;369:0 3;361:0 4 106 255;361:0 5 129 68 152;361:0 6 136 15;} + 112 + 3 + + + + 506 + BUN:004{112:;369:0 3;361:0 4 106 255;361:0 5 134 2 958 ;361:0 6 126 23 92 20 0;} + 103 + 3 + + + + 507 + BUN:004{112:;369:0 3;361:0 4 106 255;361:0 5 129 16 62 205;361:0 6 124 170 20 0;} + 104 + 3 + + + + 508 + BUN:005{113:;369:0 3;361:0 4 146 196 150 150;361:0 5 142 50 20;369:0 6;356:0 200;112:;} + 106 + 3 + + + + 509 + BUN:006{113:;369:0 3;361:0 4 106 255;361:0 5 134 2 958 ;361:0 6 207 23 40 190;356:0 200;112:;} + 102 + 3 + + + + 510 + BUN:003{113:;369:0 3;361:0 4 113 2;369:0 5;369:0 6;F1356:0 200;112:;} + 108 + 3 + + + + 511 + BUN:003{113:;369:0 3;361:0 4 141 34 0 4;361:0 5 227 5;112:;369:0 6;356:0 200;} + 121 + 3 + + + + 512 + BUN:001{357:0 200; + 105 + 3 + + + + + 513 + BUN:006{113:;369:0 3;361:0 4 134 1 1000;361:0 5 207 17 150;361:0 6 227 5;356:0 100;112:;} + 60 + 3 + + + + 514 + BUN:001{357:0 100;} + 50 + 3 + + + + 515 + BUN:001{357:0 50;} + 51 + 3 + + + + 516 + BUN:002{112:;356:0 100;} + 57 + 3 + + + + 517 + BUN:002{112:;356:0 50;} + 59 + 3 + + + + + 518 + BUN:002{112:;356:0 200;} + 55 + 3 + + + + 519 + BUN:005{112:;361:0 3 106 54 1;361:0 4 205 255 0 80 2;361:0 5 201 2;361:0 6 134 2 1568;} + 99 + 3 + + + + 520 + BUN:006{112:;361:0 3 105 54 1;361:0 4 205 255 0 80 2;361:0 5 201 2;361:0 6 134 2 1568;} + 118 + 3 + + + + 522 + BUN:005{112:;361:0 3 207 9 0;361:0 4 106 255;361:0 5 205 255 0 30 352 0;361:0 6 134 2 1568;} + 98 + 3 + + + + 523 + BUN:005{112:;361:0 5 105 54 1;361:0 6 205 255 0 80 30 2;078:0 6 1 2;361:0 8 134 2 1568;} + 115 + 3 + + + + + 524 + BUN:006{112:;361:0 5 125 3 3 1;361:0 6 123 5 237;361:0 7 134 0 1089;361:0 8 227 9;361:0 9 114 3 1;} + 100 + 3 + + + + 525 + BUN:006{112:;361:0 5 105 54 1;361:0 6 205 255 0 80 30 2;361:0 8 134 2 1568;361:0 9 126 1 150 15 1;} + 99 + 3 + + + + 526 + BUN:001{355:0;} + 113 + 3 + + + + 527 + BUN:002{112:0;361:0 3 126 1 150 24 1;} + 114 + 3 + + + + 528 + BUN:008{112:;361:0 3 112 5;361:0 4 227 5;361:0 5 112 4;361:0 6 207 22 245;361:0 7 112 4;361:0 8 126 0 150 19 1;361:0 9 148 1 1961 0 0;} + 119 + 3 + + + + + 529 + BUN:005{112:;361:0 3 230 10 1 1;361:0 4 134 1 197;361:0 5 231 4 1 3 1 1;361:0 6 148 0 1000 25 100;} + 101 + 3 + + + + 530 + BUN:003{112:;361:0 3 124 230 93 0;361:0 4 201 7;} + 117 + 3 + + + + 531 + BUN:004{112:;361:0 3 124 230 93 0;361:0 4 201 7;361:0 5 201 7;} + 111 + 3 + + + + 532 + BUN:004{112:;361:0 3 124 230 93 0;361:0 4 201 7;361:0 5 201 8;} + 52 + 3 + + + + + 533 + BUN:004{112:;361:0 3 124 230 93 0;361:0 4 201 7;361:0 5 201 25;} + 53 + 3 + + + + 534 + BUN:005{112:;361:0 3 124 230 93 0;361:0 4 201 7;361:0 5 201 25;361:0 6 201 8;} + 54 + 3 + + + + 535 + BUN:004{112:;361:0 2 145 0 2;361:0 3 124 230 93 0;361:0 4 201 7;} + 55 + 3 + + + + 536 + BUN:004{112:;361:0 2 142 0 0 1;361:0 3 124 230 93 0;361:0 4 201 7;} + 56 + 3 + + + + + 537 + BUN:005{112:;361:0 3 124 209 93 0;361:0 4 201 7;361:0 5 142 0 0 1;361:0 6 201 25;} + 123 + 3 + + + + 538 + BUN:005{112:;361:0 3 124 209 93 0;361:0 4 201 7;361:0 5 142 0 0 1;361:0 6 201 25;} + 124 + 3 + + + + 539 + BUN:004{112:;361:0 3 149 90;361:0 4 201 8;361:0 5 148 2 1000 68 110;} + 44 + 3 + + + + 540 + BUN:004{112:;361:0 3 201 8;361:0 4 148 2 1000 68 110;361:0 5 143 0 16 235;} + 91 + 3 + + + + + 541 + BUN:004{112:;361:0 3 201 8;361:0 4 148 2 1000 68 110;361:0 5 143 6 16 235;} + 93 + 3 + + + + 542 + BUN:004{112:;361:0 3 120 0 1;361:0 4 207 12 152;361:0 5 201 6;} + 39 + 3 + + + + + + + diff --git a/veejay-server/veejay.pc.in b/veejay-server/veejay.pc.in new file mode 100644 index 00000000..4acebc8f --- /dev/null +++ b/veejay-server/veejay.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/@PACKAGE@ + +Name: veejay +Description: visual instrument and realtime video sampler +Version: @VERSION@ +Libs: -L${libdir} -lveejay +Cflags: -I${includedir} diff --git a/veejay-server/veejay.spec.in b/veejay-server/veejay.spec.in new file mode 100644 index 00000000..1a307a11 --- /dev/null +++ b/veejay-server/veejay.spec.in @@ -0,0 +1,131 @@ +# norootforbuild +# neededforbuild update-desktop-files gtk2-devel-packages glib2 gtk2 libglade3 libdv libxml2 jack DirectFB SDL libjpeg freetype2 gtk2-devel glib2-devel libglade-devel libxml2-devel jack-devel pkgconfig SDL-devel libjpeg-devel freetype2-devel valgrind alsa-devel alsa slang-devel slang libstdc++-devel libstdc++ zlib-devel zlib + +%define name veejay +%define version 1.0 +%define release stable +%define prefix /usr + +%define builddir $RPM_BUILD_DIR/%{name}-%{version} + +Summary: Video Mixing/Editing Instrument +Name: %{name} +Version: %{version} +Release: %{release} +Prefix: %{prefix} +Copyright: GNU GPL +URL: http://veejayhq.net +Packager: oc2pus +Group: Productivity/Multimedia/Video/Editors and Convertors +Source: %{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Prereq: /sbin/ldconfig +#Requires: libdv >= 0.102 +#Requires: libxml2 >= 2.5.4 +#Requires: jack >= 0.98 +#Requires: SDL >= 1.2.3 +#Requires: libjpeg +#Requires: freetype2 +#Requires: alsa +#Requires: slang +#Requires: libstdc++ +#Requires: zlib +#Requires: gtk2 +#Requires: glib2 +#Requires: libglade2 +#Requires: libxml2 >= 2.5.4 +#Requires: cairo +#Requires: gtkcairo +#Requires: unicap +#BuildRequires: libdv >= 0.102 +#BuildRequires: libxml2-devel >= 2.5.4 +#BuildRequires: jack-devel >= 0.98 +#BuildRequires: pkgconfig +#BuildRequires: SDL-devel >= 1.2.3 +#BuildRequires: libjpeg-devel +#BuildRequires: freetype2-devel +#BuildRequires: alsa-devel +#BuildRequires: slang-devel +#BuildRequires: libstdc++-devel +#BuildRequires: zlib-devel +#BuildRequires: gtk2-devel +#BuildRequires: glib2-devel +#BuildRequires: libglade2-devel +#BuildRequires: valgrind +#BuildRequires: gtkcairo-devel +#BuildRequires: cairo-devel +#BuildRequires: unicap + +%description +Veejay is a visual instrument and realtime video sampler. +It allows you to 'play' the video like you would play a Piano and it allows +you to record the resulting video directly to disk for immediate playback (video sampling). + +Veejay is beeing developed in the hope it will be usefull for VJ's, +media artists and other interested users that want to use Free Software for +their performances and/or video installations. + +Author: Niels Elburg + +Requires: libxml2 >= 2.5.4 + +%prep +%setup -q -n %{name}-%{version} + +./autogen.sh +%{?suse_update_config:%{suse_update_config -f}} + +CFLAGS="$RPM_OPT_FLAGS" \ +CXXFLAGS="$RPM_OPT_FLAGS" \ +./configure \ + --prefix=%{prefix} \ + --mandir=%{_mandir} \ + --with-gveejayreloaded \ + --with-swscaler + +%build +# Setup for parallel builds +numprocs=`egrep -c ^cpu[0-9]+ /proc/stat || :` +if [ "$numprocs" = "0" ]; then + numprocs=1 +fi +make -j$numprocs + +%install +[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} + +make install-strip \ + DESTDIR=%{buildroot} + +# remove static libs +rm -f %{buildroot}%{_libdir}/lib*.a +rm -f %{buildroot}%{_libdir}/lib*.la + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%clean +[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} + +%files +%defattr(-, root, root) +%doc AUTHORS BUGS COPYING ChangeLog INSTALL README* +%doc doc +%{_bindir}/%{name} +%{_libdir}/*.so* +%{_libdir}/pkgconfig/%{name}.pc +%{_mandir}/man1/* + +%changelog -n veejay +* Wed Mar 21 2007 - cleanup +* Sat Nov 20 2005 - bla +* Sat Apr 23 2005 - oc2pus@arcor.de 0.8-0.oc2pus.1 +- update to 0.8 +- patched configure for using glib2-2.4.*, gtk2-2.4.*, libglade2-2.2.* +- patched gveejay sources for using gtk2-2.4 +* Fri Apr 15 2005 - oc2pus@arcor.de 0.7.3-0.oc2pus.2 +- directfb re-enabled +* Mon Mar 21 2005 - oc2pus@arcor.de 0.7.3-0.oc2pus.1 +- initial rpm +- directfb disabled, doesn't compile diff --git a/veejay-server/veejay/Makefile.am b/veejay-server/veejay/Makefile.am new file mode 100644 index 00000000..f61f1ce5 --- /dev/null +++ b/veejay-server/veejay/Makefile.am @@ -0,0 +1,77 @@ +# Makefile for veejay + +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS=$(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) \ + -DG_LOG_DOMAIN=\"veejay\" -DVEEJAY_VERSION=\"$(VERSION)\" \ + -I /usr/X11R6/include -I$(top_srcdir)/libOSC \ + -I$(top_srcdir)/libhash \ + -I$(top_srcdir)/libvje \ + -I$(top_srcdir)/libvjmem \ + -I$(top_srcdir)/libvjmsg \ + -I$(top_srcdir)/libvjnet \ + -I$(top_srcdir)/libel \ + -I$(top_srcdir)/libstream \ + -I$(top_scrdir)/libyuv \ + -I$(top_srcdir)/liblavjpeg \ + -I$(top_srcdir)/libsamplerec \ + -I$(top_srcdir)/libvevo \ + -I$(top_srcdir)/liblzo \ + -I$(top_srcdir)/bio2jack \ + $(FFMPEG_AVCODEC_CFLAGS) $(FFMPEG_AVFORMAT_CFLAGS) $(LIBQUICKTIME_CFLAGS) $(FT_CFLAGS) \ + $(AVIPLAY_CFLAGS) $(XML2_CFLAGS) $(GTK_CFLAGS) $(DV_FLAGS) $(X_CFLAGS) $(GL_CFLAGS) \ + $(DIRECTFB_CFLAGS) $(SDL_CFLAGS) $(JPEG_CFLAGS) $(PTHREAD_CFLAGS) $(SAMPLERATE_CFLAGS) $(MJPEGTOOLS_CFLAGS) + +pkginclude_HEADERS = vims.h +VEEJAY_LIB_FILE = libveejay.la + +lib_LTLIBRARIES = $(VEEJAY_LIB_FILE) + +VEEJAY_ALL_LIB_OPTS = \ + -version-info $(LT_AGE):$(LT_REVISION):$(LT_AGE) \ + -release $(LT_RELEASE) \ + -export-dynamic + +libveejay_la_SOURCES = vj-misc.c \ + vj-osc.c vjkf.c vj-event.c vj-eventman.c vj-pjack.c vj-perform.c \ + x11misc.c vj-sdl.c vj-dfb.c gl.c vj-viewport.c vj-composite.c \ + vj-font.c liblavplayvj.c + +libveejay_la_LDFLAGS = $(VEEJAY_ALL_LIB_OPTS ) $(DEBUGLIBS) + + +libveejay_la_LIBADD = -L$(top_builddir)/libOSC / -lOSC \ + -L$(top_builddir)/libhash / -lhash \ + -L$(top_builddir)/liblzo / -lminilzo \ + -L$(top_builddir)/bio2jack/ -lbio2jack4vj \ + -L$(top_builddir)/libvjmsg -lvjmsg \ + -L$(top_builddir)/libvjmem/ -lvjmem \ + -L$(top_builddir)/libvje -lvje \ + -L$(top_builddir)/libsample -lsample \ + -L$(top_builddir)/libvjnet -lvjnet \ + -L$(top_builddir)/libel -lel \ + -L$(top_builddir)/libstream -lstream \ + -L$(top_builddir)/aclib -lac \ + -L$(top_builddir)/libyuv -lyuv \ + -L$(top_builddir)/liblavjpeg -llavjpeg \ + -L$(top_builddir)/libsamplerec -lsamplerec \ + -L$(top_builddir)/libvevo -lvevo \ + -L$(top_builddir)/libgoom -lgoom + +libveejay_la_LDFLAGS += $(SDL_LIBS) $(DIRECTFB_LIBS) $(PTHREAD_LIBS) $(FT_LDFLAGS) $(FT_LIBS) \ + $(XML2_LIBS) $(JPEG_LIBS) $(JACK_LIBS) $(UNICAP_LIBS) \ + $(FFMPEG_AVFORMAT_LIBS) $(FFMPEG_AVCODEC_LIBS) $(FFMPEG_SWSCALER_LIBS) $(XINERAMA_LIBS) \ + $(LIBDV_LIBS) $(LIBM_LIBS) $(PIXBUF_LIBS) $(GL_LIBS) $(MJPEGTOOLS_LIBS) $(LIBQUICKTIME_LIBS) \ + -DDYNAMIC -O3 -Wall -rdynamic + +# ********************************************************************* +# The tools themselves +VEEJAY_BIN = veejay + +bin_PROGRAMS = $(VEEJAY_BIN) + +veejay_headers = vims.h + +veejay_SOURCES = veejay.c ${veejay_headers} +veejay_LDADD = libveejay.la @LIBGETOPT_LIB@ + diff --git a/veejay-server/veejay/Makefile.in b/veejay-server/veejay/Makefile.in new file mode 100644 index 00000000..00f12585 --- /dev/null +++ b/veejay-server/veejay/Makefile.in @@ -0,0 +1,687 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 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@ + +# Makefile for veejay + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = $(am__EXEEXT_1) +subdir = veejay +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(pkgincludedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libveejay_la_DEPENDENCIES = / / / +am_libveejay_la_OBJECTS = vj-misc.lo vj-osc.lo vjkf.lo vj-event.lo \ + vj-eventman.lo vj-pjack.lo vj-perform.lo x11misc.lo vj-sdl.lo \ + vj-dfb.lo gl.lo vj-viewport.lo vj-composite.lo vj-font.lo \ + liblavplayvj.lo +libveejay_la_OBJECTS = $(am_libveejay_la_OBJECTS) +libveejay_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libveejay_la_LDFLAGS) $(LDFLAGS) -o $@ +am__EXEEXT_1 = veejay$(EXEEXT) +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am__objects_1 = +am_veejay_OBJECTS = veejay.$(OBJEXT) $(am__objects_1) +veejay_OBJECTS = $(am_veejay_OBJECTS) +veejay_DEPENDENCIES = libveejay.la +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libveejay_la_SOURCES) $(veejay_SOURCES) +DIST_SOURCES = $(libveejay_la_SOURCES) $(veejay_SOURCES) +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUGLIBS = @DEBUGLIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFMPEG_AVCODEC_CFLAGS = @FFMPEG_AVCODEC_CFLAGS@ +FFMPEG_AVCODEC_LIBS = @FFMPEG_AVCODEC_LIBS@ +FFMPEG_AVFORMAT_CFLAGS = @FFMPEG_AVFORMAT_CFLAGS@ +FFMPEG_AVFORMAT_LIBS = @FFMPEG_AVFORMAT_LIBS@ +FFMPEG_SWSCALER_CFLAGS = @FFMPEG_SWSCALER_CFLAGS@ +FFMPEG_SWSCALER_LIBS = @FFMPEG_SWSCALER_LIBS@ +FREETYPE_CONFIG = @FREETYPE_CONFIG@ +FT_CFLAGS = @FT_CFLAGS@ +FT_LDFLAGS = @FT_LDFLAGS@ +FT_LIBS = @FT_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAVE_GL = @HAVE_GL@ +HAVE_UNICAP = @HAVE_UNICAP@ +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_LIBS = @JACK_LIBS@ +JPEG_CFLAGS = @JPEG_CFLAGS@ +JPEG_LIBS = @JPEG_LIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBGETOPT_LIB = @LIBGETOPT_LIB@ +LIBM_LIBS = @LIBM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBQUICKTIME_CFLAGS = @LIBQUICKTIME_CFLAGS@ +LIBQUICKTIME_LIBS = @LIBQUICKTIME_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OP_CFLAGS = @OP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXBUF_CFLAGS = @PIXBUF_CFLAGS@ +PIXBUF_LIBS = @PIXBUF_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PROGRAM_NOPIC = @PROGRAM_NOPIC@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNICAP_CFLAGS = @UNICAP_CFLAGS@ +UNICAP_LIBS = @UNICAP_LIBS@ +V4LCONF_LIBS = @V4LCONF_LIBS@ +VERSION = @VERSION@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XMKMF = @XMKMF@ +XML2_CFLAGS = @XML2_CFLAGS@ +XML2_LIBS = @XML2_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YUVCFLAGS = @YUVCFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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 = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CFLAGS = $(OP_CFLAGS) +INCLUDES = -I$(top_srcdir) -I$(includedir) \ + -DG_LOG_DOMAIN=\"veejay\" -DVEEJAY_VERSION=\"$(VERSION)\" \ + -I /usr/X11R6/include -I$(top_srcdir)/libOSC \ + -I$(top_srcdir)/libhash \ + -I$(top_srcdir)/libvje \ + -I$(top_srcdir)/libvjmem \ + -I$(top_srcdir)/libvjmsg \ + -I$(top_srcdir)/libvjnet \ + -I$(top_srcdir)/libel \ + -I$(top_srcdir)/libstream \ + -I$(top_scrdir)/libyuv \ + -I$(top_srcdir)/liblavjpeg \ + -I$(top_srcdir)/libsamplerec \ + -I$(top_srcdir)/libvevo \ + -I$(top_srcdir)/liblzo \ + -I$(top_srcdir)/bio2jack \ + $(FFMPEG_AVCODEC_CFLAGS) $(FFMPEG_AVFORMAT_CFLAGS) $(LIBQUICKTIME_CFLAGS) $(FT_CFLAGS) \ + $(AVIPLAY_CFLAGS) $(XML2_CFLAGS) $(GTK_CFLAGS) $(DV_FLAGS) $(X_CFLAGS) $(GL_CFLAGS) \ + $(DIRECTFB_CFLAGS) $(SDL_CFLAGS) $(JPEG_CFLAGS) $(PTHREAD_CFLAGS) $(SAMPLERATE_CFLAGS) $(MJPEGTOOLS_CFLAGS) + +pkginclude_HEADERS = vims.h +VEEJAY_LIB_FILE = libveejay.la +lib_LTLIBRARIES = $(VEEJAY_LIB_FILE) +VEEJAY_ALL_LIB_OPTS = \ + -version-info $(LT_AGE):$(LT_REVISION):$(LT_AGE) \ + -release $(LT_RELEASE) \ + -export-dynamic + +libveejay_la_SOURCES = vj-misc.c \ + vj-osc.c vjkf.c vj-event.c vj-eventman.c vj-pjack.c vj-perform.c \ + x11misc.c vj-sdl.c vj-dfb.c gl.c vj-viewport.c vj-composite.c \ + vj-font.c liblavplayvj.c + +libveejay_la_LDFLAGS = $(VEEJAY_ALL_LIB_OPTS ) $(DEBUGLIBS) \ + $(SDL_LIBS) $(DIRECTFB_LIBS) $(PTHREAD_LIBS) $(FT_LDFLAGS) \ + $(FT_LIBS) $(XML2_LIBS) $(JPEG_LIBS) $(JACK_LIBS) \ + $(UNICAP_LIBS) $(FFMPEG_AVFORMAT_LIBS) $(FFMPEG_AVCODEC_LIBS) \ + $(FFMPEG_SWSCALER_LIBS) $(XINERAMA_LIBS) $(LIBDV_LIBS) \ + $(LIBM_LIBS) $(PIXBUF_LIBS) $(GL_LIBS) $(MJPEGTOOLS_LIBS) \ + $(LIBQUICKTIME_LIBS) -DDYNAMIC -O3 -Wall -rdynamic +libveejay_la_LIBADD = -L$(top_builddir)/libOSC / -lOSC \ + -L$(top_builddir)/libhash / -lhash \ + -L$(top_builddir)/liblzo / -lminilzo \ + -L$(top_builddir)/bio2jack/ -lbio2jack4vj \ + -L$(top_builddir)/libvjmsg -lvjmsg \ + -L$(top_builddir)/libvjmem/ -lvjmem \ + -L$(top_builddir)/libvje -lvje \ + -L$(top_builddir)/libsample -lsample \ + -L$(top_builddir)/libvjnet -lvjnet \ + -L$(top_builddir)/libel -lel \ + -L$(top_builddir)/libstream -lstream \ + -L$(top_builddir)/aclib -lac \ + -L$(top_builddir)/libyuv -lyuv \ + -L$(top_builddir)/liblavjpeg -llavjpeg \ + -L$(top_builddir)/libsamplerec -lsamplerec \ + -L$(top_builddir)/libvevo -lvevo \ + -L$(top_builddir)/libgoom -lgoom + + +# ********************************************************************* +# The tools themselves +VEEJAY_BIN = veejay +veejay_headers = vims.h +veejay_SOURCES = veejay.c ${veejay_headers} +veejay_LDADD = libveejay.la @LIBGETOPT_LIB@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu veejay/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu veejay/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libveejay.la: $(libveejay_la_OBJECTS) $(libveejay_la_DEPENDENCIES) + $(libveejay_la_LINK) -rpath $(libdir) $(libveejay_la_OBJECTS) $(libveejay_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +veejay$(EXEEXT): $(veejay_OBJECTS) $(veejay_DEPENDENCIES) + @rm -f veejay$(EXEEXT) + $(LINK) $(veejay_OBJECTS) $(veejay_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblavplayvj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/veejay.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-composite.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-dfb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-event.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-eventman.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-font.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-misc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-osc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-perform.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-pjack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-sdl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vj-viewport.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vjkf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11misc.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ + uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-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-libLTLIBRARIES \ + install-man install-pdf install-pdf-am \ + install-pkgincludeHEADERS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ + uninstall-pkgincludeHEADERS + +# 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/veejay-server/veejay/gl.c b/veejay-server/veejay/gl.c new file mode 100644 index 00000000..92908c70 --- /dev/null +++ b/veejay-server/veejay/gl.c @@ -0,0 +1,1236 @@ +/* veejay - Linux VeeJay OpenGL display driver + * (C) MPlayer www.mplayerhq.hu/ + * (C) 2002-2004 Niels Elburg + * + * Copy-pasted Mplayer source code. + * + * MPlayer's x11_common.c , vo_gl.c , vo_gl2.c + * video_out_gl.c, X11/OpenGL interface + * based on video_out_x11 by Aaron Holtzman, + * and WS opengl window manager by Pontscho/Fresh! + * + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +#include +#ifdef HAVE_GL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include AVCODEC_INC +#include +#include +#ifdef STRICT_CHECKING +#include +#endif +#define ERROR_MSG_LEN 100 +#define XA_INIT(m,x) XA##x = XInternAtom(m, #x, False) + +#undef USE_ARB + +#if defined (GL_ARB_fragment_program) || defined( GL_ATI_fragment_shader) +#define USE_ARB 1 +#endif + +/** \defgroup X11 OpenGL Video Display + * + * Veejay blits video frames to a OpenGL video window + * The OpenGL video window comes from MPlayer -vo gl2 + * This is the only video output display used. + */ + +//! \struct TexSquare +struct TexSquare +{ + GLubyte *texture; /*!< Texture */ + GLuint texobj; /*!< Texture ID*/ + int isTexture; /*!< Is Texture or not */ + GLfloat fx1, fy1, fx2, fy2, fx3, fy3, fx4, fy4; /*!< Vertex */ + GLfloat xcov, ycov; /*!< Translate */ + int isDirty; /*!< Dirty */ + int dirtyXoff, dirtyYoff, dirtyWidth, dirtyHeight; /*!< Dirty vertex */ +}; + +//! \typedef display_ctx +typedef struct +{ + XImage *img; + XWindowAttributes attr; + char *name; + long window; + int depth; + int bpp; + unsigned int mask; + Display *display; + int screen; + int disp_w; + int disp_h; + int display_ready; + int texture[2]; + Window root_win; + Window win; + GLXContext *glx_ctx; + uint8_t *data; + struct TexSquare *texgrid; + GLint gl_internal_format; + GLint gl_bitmap_format; + GLint gl_bitmap_type; + int texnumx; + int texnumy; + int fs_state; + GLfloat texpercx; + GLfloat texpercy; + XVisualInfo *info; + GLuint prog; + int raw_line_len; + uint8_t *ref_data; + void *userdata; + int mouse[4]; +} display_ctx; +static Atom XA_NET_WM_PID; +static Atom XA_NET_WM_STATE; +static Atom XA_NET_WM_STATE_FULLSCREEN; +#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */ +#define _NET_WM_STATE_ADD 1 /* add/set property */ +#define _NET_WM_STATE_TOGGLE 2 /* toggle property */ + +static int wsGLXAttrib[] = { GLX_RGBA, + GLX_RED_SIZE,1, + GLX_GREEN_SIZE,1, + GLX_BLUE_SIZE,1, + GLX_DOUBLEBUFFER, + None }; + +static void resetTexturePointers(display_ctx *ctx); +static int init_shader(); +static void flip_page(display_ctx *ctx); + +static void glAdjustAlignment(int stride) { + GLint gl_alignment; + if (stride % 8 == 0) + gl_alignment=8; + else if (stride % 4 == 0) + gl_alignment=4; + else if (stride % 2 == 0) + gl_alignment=2; + else + gl_alignment=1; + glPixelStorei (GL_UNPACK_ALIGNMENT, gl_alignment); +} + +static void *sample_420_ = NULL; +static void yuv420_444_1plane( + uint8_t *data[3], + const int width, + const int height, + uint8_t *dst_buffer) +{ + if(!sample_420_ ) + sample_420_ = subsample_init( width ); + chroma_supersample( SSM_420_JPEG_TR, sample_420_, data, width,height); +} + +static void *sample_422_ = NULL; +static void yuv422_444_1plane( + uint8_t *data[3], + const int width, + const int height, + uint8_t *dst_buffer) +{ + if(!sample_422_ ) + sample_422_ = subsample_init( width ); + chroma_supersample( SSM_422_444, sample_422_, data, width,height); + +} + +#define packv0__( y0,u0,v0,y1 ) (( (int) y0 ) & 0xff ) +\ + ( (((int) u0 ) & 0xff) << 8) +\ + ( ((((int) v0) & 0xff) << 16 )) +\ + ( ((((int) y1) & 0xff) << 24 ) ) + +#define packv1__( u1,v1,y2,u2 )(( (int) u1 ) & 0xff ) +\ + ( (((int) v1 ) & 0xff) << 8) +\ + ( ((((int) y2) & 0xff) << 16 )) +\ + ( ((((int) u2) & 0xff) << 24 ) ) + + +#define packv2__( v2,y3,u3,v3 )(( (int) v2 ) & 0xff ) +\ + ( (((int) y3 ) & 0xff) << 8) +\ + ( ((((int) u3) & 0xff) << 16 )) +\ + ( ((((int) v3) & 0xff) << 24 ) ) + +//! YUV 4:2:4 Planar to 4:4:4 Packed: Y, V, U, Y,V, U , .... */ +static void yuv444_444_1plane( + uint8_t *data[3], + const int width, + const int height, + uint8_t *dst_buffer) +{ + unsigned int x; + uint8_t *yp = data[0]; + uint8_t *up = data[2]; + uint8_t *vp = data[1]; + int len = (width * height) / 4; + int *dst = dst_buffer; + + __builtin_prefetch( yp, 0 ,3); + __builtin_prefetch( up, 0 ,3); + __builtin_prefetch( vp, 0 ,3); + __builtin_prefetch( dst, 1,3); + + for( x=0; x < len; x ++ ) + { + dst[0] = packv0__( yp[0],up[0],vp[0],yp[1]); + dst[1] = packv1__( up[1],vp[1],yp[2],up[2]); + dst[2] = packv2__( vp[2],yp[3],up[3],vp[3]); + + yp += 4; + up += 4; + vp += 4; + dst += 3; + } + +} + + +static void yuv_planar_to_packed_444yvu( uint8_t *data[3], const int w, const int h, uint8_t *dst_buffer, int format ) +{ + switch(format) + { + case 0: + case 2: + yuv420_444_1plane(data,w,h,dst_buffer); + break; + case 1: + case 3: + yuv422_444_1plane(data,w,h,dst_buffer); + break; + default: + break; + } + yuv444_444_1plane(data,w,h,dst_buffer); +} + + +static int x11_err_( Display *display, XErrorEvent *event ) +{ + char msg[ERROR_MSG_LEN]; + XGetErrorText( display, event->error_code, (char*) &msg, ERROR_MSG_LEN );\ + veejay_msg(0, "X11 Error: '%s'", msg ); + veejay_msg(0, "Type: %x, display: %x, resource ID: %x serial: %x", + event->type,event->display,event->resourceid,event->serial); + veejay_msg(0, "Error code: %x, request code: %x, minor code: %x", + event->error_code, event->request_code, event->minor_code ); + exit(0); +} + +static void x11_screen_saver_disable( Display *display ) +{ + x11_disable_screensaver( display ); +} +static void resize(int x, int y, int w, int h ) +{ + glViewport(0,0,x,y); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho( 0,w,h,0,-1,1); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + +void x_display_resize( int x, int y, int w, int h ) +{ + resize(x,y,w,h ); +} + +static inline int x_pwr_two(int n) +{ + int p = 1; + while( p < n ) + p <<= 1; + return p; +} + +static GLint getInternalFormat(display_ctx *ctx) +{ + int r_sz, g_sz, b_sz, a_sz; + int rgb_sz; + if (glXGetConfig(ctx->display, ctx->info, GLX_RED_SIZE, &r_sz) != 0) r_sz = 0; + if (glXGetConfig(ctx->display, ctx->info, GLX_GREEN_SIZE, &g_sz) != 0) g_sz = 0; + if (glXGetConfig(ctx->display, ctx->info, GLX_BLUE_SIZE, &b_sz) != 0) b_sz = 0; + if (glXGetConfig(ctx->display, ctx->info, GLX_ALPHA_SIZE, &a_sz) != 0) a_sz = 0; + + rgb_sz=r_sz+g_sz+b_sz; + if(rgb_sz<=0) rgb_sz=24; + + if(r_sz==3 && g_sz==3 && b_sz==2 && a_sz==0) + return GL_R3_G3_B2; + if(r_sz==4 && g_sz==4 && b_sz==4 && a_sz==0) + return GL_RGB4; + if(r_sz==5 && g_sz==5 && b_sz==5 && a_sz==0) + return GL_RGB5; + if(r_sz==8 && g_sz==8 && b_sz==8 && a_sz==0) + return GL_RGB8; + if(r_sz==10 && g_sz==10 && b_sz==10 && a_sz==0) + return GL_RGB10; + if(r_sz==2 && g_sz==2 && b_sz==2 && a_sz==2) + return GL_RGBA2; + if(r_sz==4 && g_sz==4 && b_sz==4 && a_sz==4) + return GL_RGBA4; + if(r_sz==5 && g_sz==5 && b_sz==5 && a_sz==1) + return GL_RGB5_A1; + if(r_sz==8 && g_sz==8 && b_sz==8 && a_sz==8) + return GL_RGBA8; + if(r_sz==10 && g_sz==10 && b_sz==10 && a_sz==2) + return GL_RGB10_A2; + return GL_RGB; +} + +static inline void CalcFlatPoint(display_ctx *ctx,int x,int y,GLfloat *px,GLfloat *py) +{ + *px=(float)x*ctx->texpercx; + if(*px>1.0) *px=1.0; + *py=(float)y*ctx->texpercy; + if(*py>1.0) *py=1.0; +} +struct gl_name_map_struct { + GLint value; + char *name; +}; + +#undef MAP +#define MAP(a) {a, #a} +static const struct gl_name_map_struct gl_name_map[] = { + // internal format + MAP(GL_R3_G3_B2), MAP(GL_RGB4), MAP(GL_RGB5), MAP(GL_RGB8), + MAP(GL_RGB10), MAP(GL_RGB12), MAP(GL_RGB16), MAP(GL_RGBA2), + MAP(GL_RGBA4), MAP(GL_RGB5_A1), MAP(GL_RGBA8), MAP(GL_RGB10_A2), + MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8), + + // format + MAP(GL_RGB), MAP(GL_RGBA), MAP(GL_RED), MAP(GL_GREEN), MAP(GL_BLUE), + MAP(GL_ALPHA), MAP(GL_LUMINANCE), MAP(GL_LUMINANCE_ALPHA), + MAP(GL_COLOR_INDEX), + // rest 1.2 only +#ifdef GL_VERSION_1_2 + MAP(GL_BGR), MAP(GL_BGRA), +#endif + + //type + MAP(GL_BYTE), MAP(GL_UNSIGNED_BYTE), MAP(GL_SHORT), MAP(GL_UNSIGNED_SHORT), + MAP(GL_INT), MAP(GL_UNSIGNED_INT), MAP(GL_FLOAT), MAP(GL_DOUBLE), + MAP(GL_2_BYTES), MAP(GL_3_BYTES), MAP(GL_4_BYTES), + // rest 1.2 only +#ifdef GL_VERSION_1_2 + MAP(GL_UNSIGNED_BYTE_3_3_2), MAP(GL_UNSIGNED_BYTE_2_3_3_REV), + MAP(GL_UNSIGNED_SHORT_5_6_5), MAP(GL_UNSIGNED_SHORT_5_6_5_REV), + MAP(GL_UNSIGNED_SHORT_4_4_4_4), MAP(GL_UNSIGNED_SHORT_4_4_4_4_REV), + MAP(GL_UNSIGNED_SHORT_5_5_5_1), MAP(GL_UNSIGNED_SHORT_1_5_5_5_REV), + MAP(GL_UNSIGNED_INT_8_8_8_8), MAP(GL_UNSIGNED_INT_8_8_8_8_REV), + MAP(GL_UNSIGNED_INT_10_10_10_2), MAP(GL_UNSIGNED_INT_2_10_10_10_REV), +#endif + {0, 0} +}; +#undef MAP + +const char *glValName(GLint value) +{ + int i = 0; + + while (gl_name_map[i].name) { + if (gl_name_map[i].value == value) + return gl_name_map[i].name; + i++; + } + return "Unknown format!"; +} +static int initTextures(display_ctx *ctx, int img_w, int img_h) +{ + int e_x, e_y, s, i=0; + int x=0, y=0; + GLint format=0; + GLenum err; + struct TexSquare *tsq=0; + + ctx->gl_bitmap_format = GL_RGB; + ctx->gl_bitmap_type = GL_UNSIGNED_BYTE; + + ctx->gl_internal_format = getInternalFormat(ctx); + + int texture_width = img_w; + int texture_height = img_h; + e_x=0; s=1; + while (sgl_internal_format, + texture_width, texture_height, + 0, ctx->gl_bitmap_format, ctx->gl_bitmap_type, NULL); + + glGetTexLevelParameteriv + (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format); + + if (format != ctx->gl_internal_format) + { + veejay_msg(0, "[gl2] Needed texture [%dx%d] too big, trying ", + texture_height, texture_width); + + if (texture_width > texture_height) + { + e_x--; + texture_width = 1; + for (i = e_x; i > 0; i--) + texture_width *= 2; + } + else + { + e_y--; + texture_height = 1; + for (i = e_y; i > 0; i--) + texture_height *= 2; + } + + veejay_msg(0, "[%dx%d] !\n", texture_height, texture_width); + + if(texture_width < 64 || texture_height < 64) + { + veejay_msg(0, "[gl2] Give up .. usable texture size not avaiable, or texture config error !"); + return -1; + } + } + } + while (format != ctx->gl_internal_format && texture_width > 1 && texture_height > 1); + + ctx->texnumx = img_w / texture_width; + if ((img_w % texture_width) > 0) + ctx->texnumx++; + + ctx->texnumy = img_h / texture_height; + if ((img_h % texture_height) > 0) + ctx->texnumy++; + + /* Allocate the texture memory */ + + ctx->texpercx = (GLfloat) texture_width / (GLfloat) img_w; + if (ctx->texpercx > 1.0) + ctx->texpercx = 1.0; + + ctx->texpercy = (GLfloat) texture_height / (GLfloat) img_h; + if (ctx->texpercy > 1.0) + ctx->texpercy = 1.0; + + if (ctx->texgrid) + free(ctx->texgrid); + ctx->texgrid = (struct TexSquare *) + calloc (ctx->texnumx * ctx->texnumy, sizeof (struct TexSquare)); + + ctx->raw_line_len = img_w * 3; + + for (y = 0; y < ctx->texnumy; y++) + { + for (x = 0; x < ctx->texnumx; x++) + { + tsq = ctx->texgrid + y * ctx->texnumx + x; + + if (x == ctx->texnumx - 1 && img_w % texture_width) + tsq->xcov = + (GLfloat) (img_w % texture_width) / (GLfloat) texture_width; + else + tsq->xcov = 1.0; + + if (y == ctx->texnumy - 1 && img_h % texture_height) + tsq->ycov = + (GLfloat) (img_h % texture_height) / (GLfloat) texture_height; + else + tsq->ycov = 1.0; + + CalcFlatPoint (ctx,x, y, &(tsq->fx1), &(tsq->fy1)); + CalcFlatPoint (ctx,x + 1, y, &(tsq->fx2), &(tsq->fy2)); + CalcFlatPoint (ctx,x + 1, y + 1, &(tsq->fx3), &(tsq->fy3)); + CalcFlatPoint (ctx,x, y + 1, &(tsq->fx4), &(tsq->fy4)); + + tsq->isDirty=GL_TRUE; + tsq->isTexture=GL_FALSE; + tsq->texobj=0; + tsq->dirtyXoff=0; tsq->dirtyYoff=0; tsq->dirtyWidth=-1; tsq->dirtyHeight=-1; + + glGenTextures (1, &(tsq->texobj)); + + glBindTexture (GL_TEXTURE_2D, tsq->texobj); + err = glGetError (); + if(err==GL_INVALID_ENUM) + { + veejay_msg(0, "GLERROR glBindTexture (glGenText) := GL_INVALID_ENUM, texnum x=%d, y=%d, texture=%d\n", x, y, tsq->texobj); + } + + if(glIsTexture(tsq->texobj) == GL_FALSE) + { + veejay_msg(0, "GLERROR ain't a texture (glGenText): texnum x=%d, y=%d, texture=%d\n", + x, y, tsq->texobj); + } else { + tsq->isTexture=GL_TRUE; + } + + glTexImage2D (GL_TEXTURE_2D, 0, + ctx->gl_internal_format, + texture_width, texture_height, + 0, ctx->gl_bitmap_format, ctx->gl_bitmap_type, NULL); + + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 1.0); + + glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + + glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + + glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + + } /* for all texnumx */ + } /* for all texnumy */ + + ctx->texture[0] = texture_width; + ctx->texture[1] = texture_height; + resetTexturePointers (ctx); + + return 0; +} + +static void resetTexturePointers(display_ctx *ctx) +{ + unsigned char *imageSource = ctx->data; + unsigned char *texdata_start, *line_start; + struct TexSquare *tsq = ctx->texgrid; + int x=0, y=0; + + line_start = (unsigned char *) imageSource; + + for (y = 0; y < ctx->texnumy; y++) + { + texdata_start = line_start; + for (x = 0; x < ctx->texnumx; x++) + { + tsq->texture = texdata_start; + texdata_start += ctx->texture[0] * 3; + tsq++; + } /* for all texnumx */ + line_start += ctx->texture[1] * ctx->raw_line_len; + } /* for all texnumy */ +} + +static void setupTextureDirtyArea(display_ctx *ctx,int x, int y, int w,int h, int img_w, int img_h) +{ + struct TexSquare *square; + int xi, yi, wd, ht, wh, hh; + int wdecr, hdecr, xh, yh; + + wdecr=w; hdecr=h; xh=x; yh=y; + + for (yi = 0; hdecr>0 && yi < ctx->texnumy; yi++) + { + if (yi < ctx->texnumy - 1) + ht = ctx->texture[1]; + else + ht = img_h - ctx->texture[1] * yi; + + xh =x; + wdecr =w; + + for (xi = 0; wdecr>0 && xi < ctx->texnumx; xi++) + { + square = ctx->texgrid + yi * ctx->texnumx + xi; + + if (xi < ctx->texnumx - 1) + wd = ctx->texture[0]; + else + wd = img_w - ctx->texture[0] * xi; + + if( 0 <= xh && xh < wd && + 0 <= yh && yh < ht + ) + { + square->isDirty=GL_TRUE; + + wh=(wdecrdirtyXoff) + square->dirtyXoff=xh; + + if(yhdirtyYoff) + square->dirtyYoff=yh; + + square->dirtyWidth = wd-square->dirtyXoff; + square->dirtyHeight = ht-square->dirtyYoff; + + wdecr-=wh; + + if ( xi == ctx->texnumx - 1 ) + hdecr-=hh; + } + + xh-=wd; + if(xh<0) xh=0; + } + yh-=ht; + if(yh<0) yh=0; + } +} + + +static void drawTextureDisplay (display_ctx *ctx) +{ + struct TexSquare *square; + int x, y/*, xoff=0, yoff=0, wd, ht*/; + GLenum err; + + glColor3f(1.0,1.0,1.0); + + for (y = 0; y < ctx->texnumy; y++) + { + for (x = 0; x < ctx->texnumx; x++) + { + square = ctx->texgrid + y * ctx->texnumx + x; + + if(square->isTexture==GL_FALSE) + { + veejay_msg(0, "[gl2] ain't a texture(update): texnum x=%d, y=%d, texture=%d", + x, y, square->texobj); + continue; + } + + glBindTexture (GL_TEXTURE_2D, square->texobj); + err = glGetError (); + if(err==GL_INVALID_ENUM) + { + veejay_msg(0, "GLERROR glBindTexture := GL_INVALID_ENUM, texnum x=%d, y=%d, texture=%d\n", x, y, square->texobj); + } + else if(err==GL_INVALID_OPERATION) { + veejay_msg(0, "GLERROR glBindTexture := GL_INVALID_OPERATION, texnum x=%d, y=%d, texture=%d\n", x, y, square->texobj); + } + + if(glIsTexture(square->texobj) == GL_FALSE) + { + square->isTexture=GL_FALSE; + veejay_msg(0, "GLERROR ain't a texture(update): texnum x=%d, y=%d, texture=%d\n", + x, y, square->texobj); + } + + if(square->isDirty) + { + glTexSubImage2D (GL_TEXTURE_2D, 0, + square->dirtyXoff, square->dirtyYoff, + square->dirtyWidth, square->dirtyHeight, + ctx->gl_bitmap_format, ctx->gl_bitmap_type, square->texture); + square->isDirty=GL_FALSE; + square->dirtyXoff=0; square->dirtyYoff=0; square->dirtyWidth=-1; square->dirtyHeight=-1; + } + + glBegin(GL_QUADS); + + glTexCoord2f (0, 0); + glVertex2f (square->fx1, square->fy1); + + glTexCoord2f (0, square->ycov); + glVertex2f (square->fx4, square->fy4); + + glTexCoord2f (square->xcov, square->ycov); + glVertex2f (square->fx3, square->fy3); + + glTexCoord2f (square->xcov, 0); + glVertex2f (square->fx2, square->fy2); + + glEnd(); + } /* for all texnumx */ + } /* for all texnumy */ + + /* YES - let's catch this error ... + */ + (void) glGetError (); +} + + +void x_fullscreen(display_ctx *ctx, int action) +{ + + XEvent xev; + + /* init X event structure for _NET_WM_FULLSCREEN client msg */ + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; + xev.xclient.message_type = XInternAtom(ctx->display, + "_NET_WM_STATE", False); + xev.xclient.window = ctx->win; + xev.xclient.format = 32; + xev.xclient.data.l[0] = action; + xev.xclient.data.l[1] = XInternAtom(ctx->display, + "_NET_WM_STATE_FULLSCREEN", + False); + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + + /* finally send that damn thing */ + if (!XSendEvent(ctx->display, DefaultRootWindow(ctx->display), False, + SubstructureRedirectMask | SubstructureNotifyMask, + &xev)) + { + veejay_msg(0, "error in fs"); + } +} + +int x_display_get_fs( void *dctx ) +{ + display_ctx *ctx = (display_ctx*) dctx; + return ctx->fs_state; +} + +int x_display_set_fullscreen( void *dctx, int status ) +{ + display_ctx *ctx = (display_ctx*) dctx; + if( ctx->fs_state && status == 0 ) + { + x_fullscreen(ctx,_NET_WM_STATE_REMOVE ); + ctx->fs_state = 0; + return 1; + } + else + if ( !ctx->fs_state && status == 1 ) + { + x_fullscreen(ctx,_NET_WM_STATE_ADD); + ctx->fs_state = 1; + return 1; + } + return 0; +} + +#define MOUSELEFT 1 +#define MOUSEMIDDLE 2 +#define MOUSERIGHT 3 +#define MOUSEWHEELUP 4 +#define MOUSEWHEELDOWN 5 + +void x_display_mouse_grab( void *dctx, int a, int b, int c, int d ) +{ + display_ctx *ctx = (display_ctx*) dctx; + + + ctx->mouse[0] = a; + ctx->mouse[1] = b; + ctx->mouse[2] = c; + ctx->mouse[3] = d; +} + + +void x_display_mouse_update( void *dctx, int *a, int *b, int *c, int *d ) +{ + display_ctx *ctx = (display_ctx*) dctx; + + *a = ctx->mouse[0]; + *b = ctx->mouse[1]; + *c = ctx->mouse[2]; + *d = ctx->mouse[3]; + +} + + +static int x_display_event_update( display_ctx *ctx , int *dw, int *dh ) +{ + XEvent Event; + KeySym keySym; + static XComposeStatus stat; + int mouse_x=0, mouse_y=0, mouse_button=0; + int mouse_f = 0; + int mouse_s = ctx->mouse[3]; + uint16_t mod=0; + int shift_pressed=0; + int ctrl_pressed=0; + while( XPending( ctx->display ) ) + { + XNextEvent( ctx->display, &Event ); + + mod = Event.xkey.state; + + if( mod == 4 || mod == 20 ) + ctrl_pressed = 1; + else if ( mod == 1 || mod == 17 ) + shift_pressed = 1; + + switch(Event.type) + { + case MotionNotify: + mouse_x = Event.xbutton.x; + mouse_y = Event.xbutton.y; + mouse_button = 0; + break; + case ButtonPress: + mouse_x = Event.xbutton.x; + mouse_y = Event.xbutton.y; + mouse_button = Event.xbutton.button; + if( mouse_button == MOUSELEFT && shift_pressed ) + { + mouse_f = 6; + mouse_s = 1; + } else if (mouse_button == MOUSEMIDDLE && shift_pressed ) + { + mouse_f = 7; + mouse_s = 2; + } + break; + case ButtonRelease: + mouse_x = Event.xbutton.x; + mouse_y = Event.xbutton.y; + mouse_button = Event.xbutton.button; + if( mouse_button == MOUSELEFT ) + { + if( mouse_s == 1 ) + { + mouse_f = 6; + mouse_s = 0; + } + else + { + if ( mouse_s == 0 ) + mouse_f = 1; + } + } else if( mouse_button == MOUSERIGHT ) + { + mouse_f = 2; + } else if ( mouse_button == MOUSEMIDDLE ) + { + if( mouse_s == 2 ) + { + mouse_f = 0; + mouse_s = 0; + } + else if ( mouse_s == 0 ) + { + mouse_f = 3; + } + } else if ( mouse_button == MOUSEWHEELUP ) + { + mouse_f = 4; + } else if ( mouse_button == MOUSEWHEELDOWN ) + { + mouse_f = 5; + } + break; + case ConfigureNotify: + *dw = Event.xconfigure.width; + *dh = Event.xconfigure.height; + return 1; + break; + case KeyPress: + { + KeySym key_sym = XKeycodeToKeysym( ctx->display, + Event.xkey.keycode,0); + + vj_event_single_gl_fire( ctx->userdata, mod, key_sym ); + } + break; + default: + break; + } + } + + ctx->mouse[0] = mouse_x; + ctx->mouse[1] = mouse_y; + ctx->mouse[2] = mouse_f; + ctx->mouse[3] = mouse_s; + + return 0; +} + +static int x_display_init_gl( display_ctx *ctx, int w, int h ) +{ + int i; + + ctx->texture[0] = x_pwr_two ( w ); + ctx->texture[1] = x_pwr_two ( h ); + + if(initTextures(ctx,w,h)<0) + return 0; + + glDisable( GL_BLEND ); + glDisable(GL_DEPTH_TEST); + glDepthMask(GL_FALSE); + glDisable(GL_CULL_FACE); + + glPixelStorei( GL_UNPACK_ROW_LENGTH, w ); + glAdjustAlignment( w * 3 ); + + glEnable(GL_TEXTURE_2D); + + glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR); + + ctx->data = (uint8_t*)vj_malloc( ctx->texture[0] * ctx->texture[1] * 3 ); + for( i = 0; i < (ctx->texture[0] * ctx->texture[1] * 3); i += 3 ) + { + ctx->data[i+0] = 16; + ctx->data[i+1] = 128; + ctx->data[i+2] = 128; + } + + ctx->prog = init_shader(); + if(!ctx->prog) + return 0; + + resize(w,h,w,h); + glClearColor( 0.0f, 0.0f, 0.0f, 1.0f ); + glClear( GL_COLOR_BUFFER_BIT ); + + //drawTextureDisplay(ctx); + glFlush(); + flip_page(ctx); + char *glVersion = glGetString( GL_VERSION ); + + veejay_msg(2,"\tYUV -> RGB : %s", (ctx->prog ? "Hardware" : "Software" )); + veejay_msg(2,"\tVendor : %s", glGetString( GL_VENDOR ) ); + veejay_msg(2,"\tRenderer : %s", glGetString( GL_RENDERER )); + veejay_msg(2,"\tOpenGL version: %s", glVersion ); + + return 1; +} + +int x_display_width( void *ptr ) +{ + display_ctx *ctx = (display_ctx*) ptr; + return ctx->disp_w; +} + +int x_display_height( void *ptr ) +{ + display_ctx *ctx = (display_ctx*) ptr; + return ctx->disp_h; +} + +void *x_display_init(void *ptr) +{ + display_ctx *ctx = (display_ctx*) vj_calloc(sizeof(display_ctx)); + + XSetErrorHandler( x11_err_ ); + + ctx->name = XDisplayName(":0.0"); + ctx->display = XOpenDisplay( ctx->name ); + ctx->userdata = ptr; + if(!ctx->display) + { + veejay_msg(0, "Error opening the X11 display %s", ctx->name ); + return NULL; + } + XA_INIT(ctx->display,_NET_WM_PID); + + x11_info( ctx->display ); + + ctx->screen = DefaultScreen( ctx->display ); + ctx->root_win = RootWindow( ctx->display, ctx->screen ); + ctx->disp_w = DisplayWidth( ctx->display, ctx->screen ); + ctx->disp_h = DisplayHeight( ctx->display, ctx->screen ); + + XGetWindowAttributes( ctx->display, ctx->root_win, &(ctx->attr) ); + ctx->depth = ctx->attr.depth; + if(ctx->depth == 15 || ctx->depth == 16 || ctx->depth == 24 || ctx->depth == 32 ) + { + ctx->img = XGetImage( ctx->display, ctx->root_win,0,0,1,1,AllPlanes, ZPixmap ); + + } + veejay_msg(2, "OpenGL Video Window"); + if( ctx->img ) + { + ctx->bpp = ctx->img->bits_per_pixel; + //ctx->mask = + // ctx->img->red_mask | ctx->img->green_mask | ctx->img->blue_mask; + veejay_msg(2, "\tX11 Color mask: %X (R:%lx G:%lx B:%lx) bpp=%d, depth=%d", + ctx->mask, + ctx->img->red_mask, + ctx->img->green_mask, + ctx->img->blue_mask, + ctx->bpp, + ctx->depth ); + XDestroyImage( ctx->img ); + } + + x11_screen_saver_disable(ctx->display); + veejay_msg(2,"\tX11 Display: %s", ctx->name); + veejay_msg(2,"\tX11 Window : %dx%d", ctx->disp_w, ctx->disp_h ); + veejay_msg(2,"\tColor depth: %d", ctx->depth); + veejay_msg(2,"\tBits per pixel:%d", ctx->bpp); + + + return ctx; +} + +void *x_get_display(void *ptr) +{ + display_ctx *ctx = (display_ctx*) ptr; + return (void*)ctx->display; +} + +void x_display_close(void *dctx) +{ + display_ctx *ctx = (display_ctx*) dctx; + + + glXMakeCurrent( ctx->display,None,NULL); + glXDestroyContext( ctx->display,ctx->glx_ctx ); + + XSetErrorHandler( NULL ); + XUnmapWindow( ctx->display, ctx->win ); + XFree(ctx->info); + XDestroyWindow( ctx->display,ctx->win ); + XCloseDisplay( ctx->display ); + + + if(ctx->data) + free(ctx->data); + if(ctx->texgrid) + free(ctx->texgrid); + free(ctx); +} + +void x_display_open(void *dctx, int w, int h) +{ + display_ctx *ctx = (display_ctx*) dctx; + XSizeHints hint; + XEvent event; + XClassHint wmclass; + pid_t pid = getpid(); + memset(&event,0,sizeof(XEvent)); + memset(&hint,0,sizeof(XSizeHints)); + wmclass.res_name = "gl"; + wmclass.res_class = "Veejay"; + + hint.x = 0; + hint.y = 0; + hint.width = w; + hint.height = h; + hint.flags = PPosition | PSize; + + ctx->info = glXChooseVisual( ctx->display, ctx->screen, + wsGLXAttrib ); + + unsigned long xswamask = CWBackingStore | CWBorderPixel; + XSetWindowAttributes xswa; + + Colormap cmap = XCreateColormap( ctx->display,ctx->root_win, + ctx->info->visual, AllocNone ); + if( cmap != CopyFromParent ) + { + xswa.colormap = cmap; + xswamask |= CWColormap; + } + xswa.background_pixel = 0; + xswa.border_pixel = 0; + xswa.backing_store = Always; + xswa.bit_gravity = StaticGravity; + + ctx->win = XCreateWindow( ctx->display, ctx->root_win, + 0,0,w,h,0, ctx->depth, CopyFromParent, ctx->info->visual, xswamask, &xswa ); + XSetForeground( ctx->display, + XCreateGC( ctx->display, ctx->win,0,0 ), + WhitePixel( ctx->display, ctx->screen ) + + ); + + XSetClassHint( ctx->display, ctx->win, &wmclass ); + XChangeProperty( ctx->display, ctx->win,XA_NET_WM_PID, + XA_CARDINAL,32, PropModeReplace,(unsigned char*) &pid,1); + + long event_mask = StructureNotifyMask | KeyPressMask | ButtonPressMask | PointerMotionMask | ButtonReleaseMask; + + XSelectInput( ctx->display, ctx->win, event_mask ); + + char *title = veejay_title(); + XSetStandardProperties( ctx->display, ctx->win, + title, title, None, NULL,0, &hint ); + free(title); + + XMapWindow( ctx->display , ctx->win ); + + x11_move( ctx->display, ctx->win ); + + do + { + XNextEvent( ctx->display, &event ); + } while( event.type != MapNotify || event.xmap.event != ctx->win ); + +// XSelectInput( ctx->display, ctx->win, NoEventMask ); + + XSync( ctx->display, False ); + + ctx->glx_ctx = glXCreateContext( + ctx->display, ctx->info, NULL, True ); + if(!ctx->glx_ctx) + { + veejay_msg(0, "Cannot create GL context"); + exit(0); + } + if(!glXMakeCurrent( ctx->display, ctx->win, ctx->glx_ctx )) + { + veejay_msg(0, "Failed to set GLX context"); + glXDestroyContext( ctx->display, ctx->glx_ctx ); + XFree(ctx->info); + exit(0); + } + + if(!x_display_init_gl( ctx, w, h ) ) + { + veejay_msg(0, "Cannot initialize GL context"); + exit(0); + } + ctx->display_ready = 1; +} + +static void flip_page(display_ctx *ctx) +{ + drawTextureDisplay(ctx); + + glFinish(); + glXSwapBuffers( ctx->display, ctx->win ); +} + +//http://www.evl.uic.edu/rlk/howto/yuv/ +static int init_shader() +{ +#ifdef USE_ARB + const char *ext = glGetString( GL_EXTENSIONS ); + const int has_arb = ( strstr(ext, "GL_ARB_fragment_program" ) != NULL ); + if( !has_arb ) + { + veejay_msg(0, "Your video card does not support the ARB fragment program extension"); + return 0; + } + + GLuint modulateProg = 0; + + const char *modulateYUV = + "!!ARBfp1.0\n" + "TEMP R0;\n" + "TEX R0, fragment.texcoord[0], texture[0], 2D; \n" + + "ADD R0, R0, {-0.0625, -0.5, -0.5, 0.0}; \n" + "DP3 result.color.x, R0, {1.164, 1.596, 0.0}; \n" + "DP3 result.color.y, R0, {1.164, -0.813, -0.391}; \n" + "DP3 result.color.z, R0, {1.164, 0.0, 2.018}; \n" + "MOV result.color.w, R0.w; \n" + + "END" + ; + + glGenProgramsARB(1, &modulateProg); + glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg); + glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, + strlen(modulateYUV), (const GLubyte *)modulateYUV); + + int error = glGetError(); + + if( error != GL_NO_ERROR ) + { + veejay_msg(0,"GL Error: 0x%x, GL_PROGRAM_ERROR_STRING_ARB: %s", + error, (char*) glGetString(GL_PROGRAM_ERROR_STRING_ARB)); + return 0; + } + if(glIsProgramARB(modulateProg)) + return modulateProg; +#endif + return 0; +} +int x_display_hw_accel( void *dctx ) +{ + display_ctx *ctx = (display_ctx*) dctx; + if(ctx->prog) + return 1; + return 0; +} + +void x_display_event( void *dctx, int w, int h ) +{ + int dw = w; + int dh = h; + display_ctx *ctx = (display_ctx*) dctx; + + if(x_display_event_update( ctx,&dw,&dh )) + resize( dw,dh, w,h); +} + +int x_display_push(void *dctx, uint8_t **data, int width, int height, int out ) +{ + display_ctx *ctx = (display_ctx*) dctx; + + if(!ctx->prog) + { + veejay_msg(0, + "No YUV -> RGB conversion in hardware. Use another output driver"); + return 0; + } + else + { + yuv_planar_to_packed_444yvu( data,width,height, ctx->data ,out); + glEnable(GL_FRAGMENT_PROGRAM_ARB ); + } + + resetTexturePointers( ctx ); + setupTextureDirtyArea(ctx, + 0,0, + width, + height, + width, + height + ); + + int tw = ctx->texture[0]; + int th = ctx->texture[1]; + + glBegin( GL_QUADS ); + glTexCoord2f(0,0);glVertex2i(0,0); + glTexCoord2f(0,1);glVertex2i(0,th); + glTexCoord2f(1,1);glVertex2i(tw ,th ); + glTexCoord2f(1,0);glVertex2i( tw,0); + glEnd(); + + flip_page(ctx); + + return 1; +} +#endif diff --git a/veejay-server/veejay/gl.h b/veejay-server/veejay/gl.h new file mode 100644 index 00000000..02e28aa3 --- /dev/null +++ b/veejay-server/veejay/gl.h @@ -0,0 +1,37 @@ + +#ifndef VJGL +#define VJGL +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +//extern void veejay_gl_init( int fs, int w, int h, int x, int y); +void *x_display_init(void *ptr); +void x_display_close(void *dctx); +int x_display_set_fullscreen( void *dctx, int status ); +int x_display_width(void *ptr ); +int x_display_height(void *ptr); +int x_display_push(void *dctx, uint8_t **data, int width, int height, int out ); +void x_display_resize( int x, int y, int w, int h ); +void x_display_event( void *dctx, int w, int h ); +int x_display_get_fs( void *dctx ); +void x_display_open(void *dctx, int w, int h); +void x_display_mouse_update( void *dctx, int *a, int *b, int *c, int *d ); +void x_display_mouse_grab( void *dctx, int a, int b, int c, int d ); +void *x_get_display(void *ptr); +#endif diff --git a/veejay-server/veejay/lav_common.c b/veejay-server/veejay/lav_common.c new file mode 100644 index 00000000..242ae23e --- /dev/null +++ b/veejay-server/veejay/lav_common.c @@ -0,0 +1,204 @@ +/* lav_common - some general utility functionality used by multiple + lavtool utilities. */ + +/* Copyright (C) 2000, Rainer Johanni, Andrew Stevens */ +/* - added scene change detection code 2001, pHilipp Zabel */ +/* - broke some code out to lav_common.h and lav_common.c + * July 2001, Shawn Sulma . In doing this, + * I replaced the large number of globals with a handful of structs + * that are passed into the appropriate methods. Check lav_common.h + * for the structs. I'm sure some of what I've done is inefficient, + * subtly incorrect or just plain Wrong. Feedback is welcome. + */ +/* - removed a lot of subsumed functionality and unnecessary cruft + * March 2002, Matthew Marjanovic . + */ + + +/* + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include +#include +#include + +#include +#include +#include + +static uint8_t jpeg_data[MAX_JPEG_LEN]; + + +#ifdef SUPPORT_READ_DV2 + +dv_decoder_t *decoder; +#ifdef LIBDV_PRE_0_9_5 +gint pitches[3]; +#else +int pitches[3]; +#endif +uint8_t *dv_frame[3] = { NULL, NULL, NULL }; + +/* + * As far as I (maddog) can tell, this is what is going on with libdv-0.9 + * and the unpacking routine... + * o Ft/Fb refer to top/bottom scanlines (interleaved) --- each sample + * is implicitly tagged by 't' or 'b' (samples are not mixed between + * fields) + * o Indices on Cb and Cr samples indicate the Y sample with which + * they are co-sited. + * o '^' indicates which samples are preserved by the unpacking + * + * libdv packs both NTSC 4:1:1 and PAL 4:2:0 into a common frame format of + * packed 4:2:2 pixels as follows: + * + * + ***** NTSC 4:1:1 ***** + * + * libdv's 4:2:2-packed representation (chroma repeated horizontally) + * + *Ft Y00.Cb00.Y01.Cr00.Y02.Cb00.Y03.Cr00 Y04.Cb04.Y05.Cr04.Y06.Cb04.Y07.Cr04 + * ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ + *Fb Y00.Cb00.Y01.Cr00.Y02.Cb00.Y03.Cr00 Y04.Cb04.Y05.Cr04.Y06.Cb04.Y07.Cr04 + * ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ + *Ft Y10.Cb10.Y11.Cr10.Y12.Cb10.Y13.Cr10 Y14.Cb14.Y15.Cr14.Y16.Cb14.Y17.Cr14 + * ^ ^ ^ ^ ^ ^ ^ ^ + *Fb Y10.Cb10.Y11.Cr10.Y12.Cb10.Y13.Cr10 Y14.Cb14.Y15.Cr14.Y16.Cb14.Y17.Cr14 + * ^ ^ ^ ^ ^ ^ ^ ^ + * + * lavtools unpacking into 4:2:0-planar (note lossiness) + * + *Ft Y00.Y01.Y02.Y03.Y04.Y05.Y06.Y07... + *Fb Y00.Y01.Y02.Y03.Y04.Y05.Y06.Y07... + *Ft Y10.Y11.Y12.Y13.Y14.Y15.Y16.Y17... + *Fb Y10.Y11.Y12.Y13.Y14.Y15.Y16.Y17... + * + *Ft Cb00.Cb00.Cb04.Cb04... Cb00,Cb04... are doubled + *Fb Cb00.Cb00.Cb04.Cb04... Cb10,Cb14... are ignored + * + *Ft Cr00.Cr00.Cr04.Cr04... + *Fb Cr00.Cr00.Cr04.Cr04... + * + * + ***** PAL 4:2:0 ***** + * + * libdv's 4:2:2-packed representation (chroma repeated vertically) + * + *Ft Y00.Cb00.Y01.Cr10.Y02.Cb02.Y03.Cr12 Y04.Cb04.Y05.Cr14.Y06.Cb06.Y07.Cr16 + * ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ + *Fb Y00.Cb00.Y01.Cr10.Y02.Cb02.Y03.Cr12 Y04.Cb04.Y05.Cr14.Y06.Cb06.Y07.Cr16 + * ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ + *Ft Y10.Cb00.Y11.Cr10.Y12.Cb02.Y13.Cr12 Y14.Cb04.Y15.Cr14.Y16.Cb06.Y17.Cr16 + * ^ ^ ^ ^ ^ ^ ^ ^ + *Fb Y10.Cb00.Y11.Cr10.Y12.Cb02.Y13.Cr12 Y14.Cb04.Y15.Cr14.Y16.Cb06.Y17.Cr16 + * ^ ^ ^ ^ ^ ^ ^ ^ + * + * lavtools unpacking into 4:2:0-planar + * + *Ft Y00.Y01.Y02.Y03.Y04.Y05.Y06.Y07... + *Fb Y00.Y01.Y02.Y03.Y04.Y05.Y06.Y07... + *Ft Y10.Y11.Y12.Y13.Y14.Y15.Y16.Y17... + *Fb Y10.Y11.Y12.Y13.Y14.Y15.Y16.Y17... + * + *Ft Cb00.Cb02.Cb04.Cb06... + *Fb Cb00.Cb02.Cb04.Cb06... + * + *Ft Cr10.Cr12.Cr14.Cr16... + *Fb Cr10.Cr12.Cr14.Cr16... + * + */ + +/* + * Unpack libdv's 4:2:2-packed into our 4:2:0-planar + * + */ +void frame_YUV422_to_YUV420P(uint8_t ** output, uint8_t * input, + int width, int height) +{ + int i, j, w2; + uint8_t *y, *cb, *cr; + + w2 = width / 2; + y = output[0]; + cb = output[1]; + cr = output[2]; + + for (i = 0; i < height; i += 2) { + /* process two scanlines (one from each field, interleaved) */ + for (j = 0; j < w2; j++) { + /* packed YUV 422 is: Y[i] U[i] Y[i+1] V[i] */ + *(y++) = *(input++); + *(cb++) = *(input++); + *(y++) = *(input++); + *(cr++) = *(input++); + } + /* process next two scanlines (one from each field, interleaved) */ + for (j = 0; j < w2; j++) { + /* skip every second line for U and V */ + *(y++) = *(input++); + input++; + *(y++) = *(input++); + input++; + } + } +} + +#endif /* SUPPORT_READ_DV2 */ + + + +/*********************** + * + * Take a random(ish) sampled mean of a frame luma and chroma + * Its intended as a rough and ready hash of frame content. + * The idea is that changes above a certain threshold are treated as + * scene changes. + * + **********************/ + +int luminance_mean(uint8_t * frame[], int w, int h) +{ + uint8_t *p; + uint8_t *lim; + int sum = 0; + int count = 0; + p = frame[0]; + lim = frame[0] + w * (h - 1); + while (p < lim) { + sum += (p[0] + p[1]) + (p[w - 3] + p[w - 2]); + p += 31; + count += 4; + } + + w = w / 2; + h = h / 2; + + p = frame[1]; + lim = frame[1] + w * (h - 1); + while (p < lim) { + sum += (p[0] + p[1]) + (p[w - 3] + p[w - 2]); + p += 31; + count += 4; + } + p = frame[2]; + lim = frame[2] + w * (h - 1); + while (p < lim) { + sum += (p[0] + p[1]) + (p[w - 3] + p[w - 2]); + p += 31; + count += 4; + } + return sum / count; +} diff --git a/veejay-server/veejay/lav_common.h b/veejay-server/veejay/lav_common.h new file mode 100644 index 00000000..e4164fa2 --- /dev/null +++ b/veejay-server/veejay/lav_common.h @@ -0,0 +1,100 @@ +/* lav_common - some general utility functionality used by multiple + lavtool utilities. */ + +/* Copyright (C) 2000, Rainer Johanni, Andrew Stevens */ +/* - added scene change detection code 2001, pHilipp Zabel */ +/* - broke some code out to lav_common.h and lav_common.c + * July 2001, Shawn Sulma . Part of these changes were + * to replace the large number of globals with a handful of structs that + * get passed in to the relevant functions. Some of this may be + * inefficient, subtly broken, or Wrong. Helpful feedback is certainly + * welcome. + */ +/* - removed a lot of subsumed functionality and unnecessary cruft + * March 2002, Matthew Marjanovic . + */ + +/* + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include + +#include "editlist.h" +#include "yuv4mpeg.h" + + + +#include "mjpeg_logging.h" + + +#define MAX_EDIT_LIST_FILES 4096 +#define MAX_JPEG_LEN (3*576*768/2) + +#define BUFFER_ALIGN 16 + +/** + * (SS 2001-July-13) + * The split of the globals into three structs is somewhat arbitrary, but + * I've tried to do them based on role as used in lav2yuv and (my own) + * lav2divx. + * - LavParam handles data that is generally per-run dependent + * (e.g. from the command line). + * - LavBounds contains data about bounds used in processing. It is generally + * not dependent on command line alteration. + * - LavBuffer contains buffers used to perform various tasks. + * + **/ + +typedef struct { + int offset; + int frames; + int mono; + char *scenefile; + int delta_lum_threshold; /* = 4; */ + unsigned int scene_detection_decimation; /* = 2; */ + int output_width; + int output_height; + int interlace; + y4m_ratio_t sar; /* sample aspect ratio (default 0:0 == unspecified) */ + y4m_ratio_t dar; /* 'suggested' display aspect ratio */ + + int chroma_width; + int chroma_height; + int luma_size; + int chroma_size; +} LavParam; + + +int luminance_mean(uint8_t * frame[], int w, int h); + +int readframe(int numframe, uint8_t * frame[], + LavParam * param, EditList el); + +void writeoutYUV4MPEGheader(int out_fd, LavParam * param, EditList el, + y4m_stream_info_t * streaminfo); + +void init(LavParam * param, uint8_t * frame[]); + + +#ifdef SUPPORT_READ_DV2 + +#include + +void frame_YUV422_to_YUV420P(uint8_t ** output, uint8_t * input, + int width, int height); +void lav_init_dv_decoder(void); + +#endif /* SUPPORT_READ_DV2 */ diff --git a/veejay-server/veejay/liblavplayvj.c b/veejay-server/veejay/liblavplayvj.c new file mode 100644 index 00000000..5e6c40bb --- /dev/null +++ b/veejay-server/veejay/liblavplayvj.c @@ -0,0 +1,3788 @@ +/* libveejayvj - a extended librarified Linux Audio Video playback/Editing + *supports: + * sample based editing + * pattern based editing + * throughput of v4l / fifo + * + * Niels Elburg + * + * + * libveejay - a librarified Linux Audio Video PLAYback + * + * Copyright (C) 2000 Rainer Johanni + * Extended by: Gernot Ziegler + * Ronald Bultje + * & many others + * + * A library for playing back MJPEG video via softwastre MJPEG + * decompression (using SDL) + * + * 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. + * + */ + +/* this is a junkyard, need more modular structure + input / output modules for pulling/pushing of video frames + codecs for encoding/decoding video frames + fancy dlopen and family here +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define _POSIX_C_SOURCE 199309 +#include +#include +#include +#include +#include +#include +#include +#include "jpegutils.h" +#include "vj-event.h" +#ifndef X_DISPLAY_MISSING +#include +#include +#endif +#ifdef HAVE_FREETYPE +#include +#endif +#ifndef X_DISPLAY_MISSING +#include +#endif +#include +#include +#include +#ifdef HAVE_SYS_SOUNDCARD_H +#include +#endif +#define VIDEO_MODE_PAL 0 +#define VIDEO_MODE_NTSC 1 +#define VIDEO_MODE_SECAM 2 +#define VIDEO_MODE_AUTO 3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#ifdef STRICT_CHECKING +#include +#endif +#ifdef HAVE_GL +#include +#endif + +#include + +static veejay_t *veejay_instance_ = NULL; + +void veejay_set_instance( veejay_t *info ) +{ + veejay_instance_ = info; +} + +int vj_composite_active() +{ + return veejay_composite_active( veejay_instance_ ); +} + +void vj_composite_transform( void *coords, int points, int blob_id, int cx, int cy, int w, int h, int num_objects, uint8_t *plane) +{ + veejay_composite_transform_points( veejay_instance_, coords, points, blob_id, cx, cy,w,h,num_objects,plane ); +} + +void vj_dummy_send( ) +{ + composite_dummy( veejay_instance_->composite ); +} + + + + +static int veejay_pin_cpu( veejay_t *info, int cpu_num ); +static void veejay_schedule_fifo( veejay_t *info, int pid ); + +// following struct copied from ../utils/videodev.h + +/* This is identical with the mgavideo internal params struct, + please tell me if you change this struct here ! top-field-first */ + + int APPn; /* Number of APP segment to be written, must be 0..15 */ + int APP_len; /* Length of data in JPEG APPn segment */ + char APP_data[60]; /* Data in the JPEG APPn segment. */ + + int COM_len; /* Length of data in JPEG COM segment */ + char COM_data[60]; /* Data in JPEG COM segment */ + + unsigned long jpeg_markers; /* Which markers should go into the JPEG output. + Unless you exactly know what you do, leave them untouched. + Inluding less markers will make the resulting code + smaller, but there will be fewer aplications + which can read it. + The presence of the APP and COM marker is + influenced by APP0_len and COM_len ONLY! */ +#define JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ +#define JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ +#define JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ +#define JPEG_MARKER_COM (1<<6) /* Comment segment */ +#define JPEG_MARKER_APP (1<<7) /* App segment, driver will allways use APP0 */ + + int VFIFO_FB; /* Flag for enabling Video Fifo Feedback. + If this flag is turned on and JPEG decompressing + is going to the screen, the decompress process + is stopped every time the Video Fifo is full. + This enables a smooth decompress to the screen + but the video output signal will get scrambled */ + + /* Misc */ + + char reserved[312]; /* Makes 512 bytes for this structure */ +}; + +//#include +#include +#include +#ifdef HAVE_SDL +#include +#define MAX_SDL_OUT 2 +#endif +#include +#include +#include +#include "libveejay.h" +#include +#include "vj-perform.h" +#include +#include "mjpeg_types.h" +#ifdef HAVE_DIRECTFB +#include +#endif + +#ifdef HAVE_V4L +#include +#endif + +/* On some systems MAP_FAILED seems to be missing */ +#ifndef MAP_FAILED +#define MAP_FAILED ( (caddr_t) -1 ) +#endif +#define HZ 100 +#include +#define VALUE_NOT_FILLED -10000 + +extern void vj_osc_set_veejay_t(veejay_t *t); + +#ifdef HAVE_SDL +extern int vj_event_single_fire(void *ptr, SDL_Event event, int pressed); +#endif +static int total_mem_mb_ = 0; +static int chunk_size_ = 0; +static int n_cache_slots_ = 0; +int get_num_slots(void) +{ + return n_cache_slots_; +} +int get_total_mem(void) +{ + return total_mem_mb_; +} +int get_chunk_size(void) +{ + return chunk_size_; +} + +int veejay_get_state(veejay_t *info) { + video_playback_setup *settings = (video_playback_setup*)info->settings; + return settings->state; +} +/****************************************************** + * veejay_change_state() + * change the state + ******************************************************/ +static void veejay_reset_el_buffer( veejay_t *info ); + +void veejay_change_state(veejay_t * info, int new_state) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + settings->state = new_state; +} +void veejay_change_state_save(veejay_t * info, int new_state) +{ + if(new_state == LAVPLAY_STATE_STOP ) + { + char recover_samples[1024]; + char recover_edl[1024]; + pid_t my_pid = getpid(); + snprintf(recover_samples,1024, "%s/recovery/recovery_samplelist_p%d.sl", info->homedir, (int) my_pid); + snprintf(recover_edl, 1024, "%s/recovery/recovery_editlist_p%d.edl", info->homedir, (int) my_pid); + + int rs = sample_writeToFile( recover_samples,info->seq,info->font, + info->uc->sample_id, info->uc->playback_mode ); + int re = veejay_save_all( info, recover_edl, 0, 0 ); + if(rs) + veejay_msg(VEEJAY_MSG_WARNING, "Saved samplelist to %s", recover_samples ); + if(re) + veejay_msg(VEEJAY_MSG_WARNING, "Saved Editlist to %s", recover_edl ); + } + + report_bug(); + + veejay_change_state( info, new_state ); +} + +int veejay_set_framedup(veejay_t *info, int n) { + video_playback_setup *settings = (video_playback_setup*) settings; + + switch(info->uc->playback_mode) { + case VJ_PLAYBACK_MODE_PLAIN: + info->sfd = n; + break; + case VJ_PLAYBACK_MODE_SAMPLE: + sample_set_framedup(info->uc->sample_id,n); + sample_set_framedups(info->uc->sample_id,0); + break; + default: + return -1; + } + return 1; +} + +/****************************************************** + * veejay_set_speed() + * set the playback speed (<0 is play backwards) + * + * return value: 1 on success, 0 on error + ******************************************************/ +int veejay_set_speed(veejay_t * info, int speed) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + int len=0; + + + if( speed > MAX_SPEED ) + speed = MAX_SPEED; + if( speed < -(MAX_SPEED)) + speed = -(MAX_SPEED); + + switch (info->uc->playback_mode) + { + + case VJ_PLAYBACK_MODE_PLAIN: +// len = info->current_edit_list->video_frames - 1; + len = info->current_edit_list->total_frames; + if( abs(speed) <= len ) + settings->current_playback_speed = speed; + else + veejay_msg(VEEJAY_MSG_DEBUG, "Speed %d too high to set!", speed); + + break; + case VJ_PLAYBACK_MODE_SAMPLE: + len = sample_get_endFrame(info->uc->sample_id) - sample_get_startFrame(info->uc->sample_id); + if( speed < 0) + { + if ( (-1*len) > speed ) + { + veejay_msg(VEEJAY_MSG_ERROR,"Speed %d too high to set!",speed); + return 1; + } + } + else + { + if(speed >= 0) + { + if( len < speed ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Speed %d too high to set",speed); + return 1; + } + } + } + if(sample_set_speed(info->uc->sample_id, speed) != -1) + settings->current_playback_speed = speed; + break; + + case VJ_PLAYBACK_MODE_TAG: + + settings->current_playback_speed = 1; + break; + default: + veejay_msg(VEEJAY_MSG_ERROR, "Unknown playback mode"); + break; + } +#ifdef HAVE_JACK + + if(info->audio == AUDIO_PLAY ) + vj_jack_continue( settings->current_playback_speed ); +#endif + + return 1; +} + + +/****************************************************** + * veejay_increase_frame() + * increase (or decrease) a num of frames + * + * return value: 1 on succes, 0 if we had to change state + ******************************************************/ +int veejay_increase_frame(veejay_t * info, long num) +{ + + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + if( info->uc->playback_mode == VJ_PLAYBACK_MODE_PLAIN) + { + if(settings->current_frame_num < settings->min_frame_num) return 0; + if(settings->current_frame_num > settings->max_frame_num) return 0; + } + else if (info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE) + { + if ((settings->current_frame_num + num) <= + sample_get_startFrame(info->uc->sample_id)) return 0; + if((settings->current_frame_num + num) >= + sample_get_endFrame(info->uc->sample_id)) return 0; + + } + + settings->current_frame_num += num; + + return 1; +} + +/****************************************************** + * veejay_busy() + * Wait until playback is finished + ******************************************************/ + +void veejay_busy(veejay_t * info) +{ + pthread_join( ((video_playback_setup*)(info->settings))->playback_thread, NULL ); +} + + +/****************************************************** + * veejay_free() + * free() the struct + * + * return value: 1 on succes, 0 on error + ******************************************************/ +int veejay_free(veejay_t * info) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + veejay_reap_messages(); + + vj_event_stop(); + + vj_effect_shutdown(); + + vj_tag_free(); + vj_el_free(info->current_edit_list); + vj_avcodec_free(); + + vj_el_deinit(); + + sample_free(); + +// vj_tag_free(); + + if( info->settings->zoom ) + yuv_free_swscaler( info->video_out_scaler ); + if( info->settings->composite ) + composite_destroy( info->composite ); + if( info->settings->action_scheduler.state ) + { + if(info->settings->action_scheduler.sl ) + free(info->settings->action_scheduler.sl ); + info->settings->action_scheduler.state = 0; + } + +// if( info->plugin_frame) vj_perform_free_plugin_frame(info->plugin_frame); +// if( info->plugin_frame_info) free(info->plugin_frame_info); + if( info->effect_frame1) free(info->effect_frame1); + if( info->effect_frame_info) free(info->effect_frame_info); + if( info->effect_frame2) free(info->effect_frame2); + if( info->effect_info) free( info->effect_info ); + if( info->dummy ) free(info->dummy ); +#ifdef HAVE_SDL + free(info->sdl); +#endif + free( info->seq->samples ); + free( info->seq ); + + free(info->status_msg); + free(info->status_what); + free(info->homedir); + free(info->uc); + if(info->cpumask) + free(info->cpumask); + if(info->mask) + free(info->mask); + free(settings); + free(info); + return 1; +} + +void veejay_quit(veejay_t * info) +{ + veejay_change_state(info, LAVPLAY_STATE_STOP); +} + + + +/****************************************************** + * veejay_set_frame() + * set the current framenum + * + * return value: 1 on success, 0 if we had to change state + ******************************************************/ +int veejay_set_frame(veejay_t * info, long framenum) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + if(framenum < settings->min_frame_num) + framenum = settings->min_frame_num; + + if( framenum > settings->max_frame_num ) + framenum = settings->max_frame_num; + + if(info->uc->playback_mode==VJ_PLAYBACK_MODE_SAMPLE) + { + int start,end,loop,speed; + sample_get_short_info(info->uc->sample_id,&start,&end,&loop,&speed); + if(framenum < start) + framenum = start; + if(framenum > end) + framenum = end; + } + else if( info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG ) + { + if( framenum > settings->max_frame_num ) + framenum = settings->max_frame_num; + } + + settings->current_frame_num = framenum; + + return 1; +} + +int veejay_composite_active( veejay_t *info ) +{ + return info->settings->composite; +} + +void veejay_composite_transform_points( veejay_t *info, void *coords, int points, int blob_id, int cx, int cy,int w, int h,int num, uint8_t *plane ) +{ + composite_transform_points( info->composite, coords, points, blob_id,cx,cy,w,h, num,plane); +} + +void veejay_auto_loop(veejay_t *info) +{ + if(info->uc->playback_mode == VJ_PLAYBACK_MODE_PLAIN) + { + char sam[32]; + sprintf(sam, "%03d:0 -1;", VIMS_SAMPLE_NEW); + vj_event_parse_msg(info, sam,strlen(sam)); + sprintf(sam, "%03d:-1;", VIMS_SAMPLE_SELECT); + vj_event_parse_msg(info,sam,strlen(sam)); + } +} +/****************************************************** + * veejay_init() + * check the given settings and initialize almost + * everything + * return value: 0 on success, -1 on error + ******************************************************/ + +void veejay_set_framerate( veejay_t *info , float fps ) +{ + video_playback_setup *settings = (video_playback_setup*) info->settings; + settings->spvf = 1.0 / fps; + settings->msec_per_frame = 1000 / settings->spvf; + if (info->current_edit_list->has_audio && (info->audio==AUDIO_PLAY || info->audio==AUDIO_RENDER)) + settings->spas = 1.0 / (double) info->current_edit_list->audio_rate; + else + settings->spas = 0; + + settings->usec_per_frame = (int)(1000000.0 / fps); +} + + +int veejay_init_editlist(veejay_t * info) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + editlist *el = info->current_edit_list; + + /* Set min/max options so that it runs like it should */ + settings->min_frame_num = 0; +// settings->max_frame_num = el->video_frames - 1; + settings->max_frame_num = el->total_frames; + settings->current_frame_num = settings->min_frame_num; + settings->previous_frame_num = 1; + settings->spvf = 1.0 / el->video_fps; + settings->msec_per_frame = 1000 / settings->spvf; + veejay_msg(VEEJAY_MSG_DEBUG, + "1.0/Seconds per video Frame = %4.4f", + 1.0 / settings->spvf); + + /* Seconds per audio sample: */ + + if( !el->has_audio ) + veejay_msg(VEEJAY_MSG_DEBUG, "EditList has no audio"); + + if (el->has_audio && (info->audio==AUDIO_PLAY || info->audio==AUDIO_RENDER)) + { + settings->spas = 1.0 / (double) el->audio_rate; + } + else + { + settings->spas = 0; + } + + vj_el_set_image_output_size( el, info->dummy->width, info->dummy->height, + info->dummy->fps, info->pixel_format ); + + return 0; +} + +static int veejay_stop_playing_sample( veejay_t *info, int new_sample_id ) +{ + if(!sample_stop_playing( info->uc->sample_id, new_sample_id ) ) + { + veejay_msg(0, "There is no sample %d", new_sample_id ); + return 0; + } + sample_chain_free( info->uc->sample_id ); + veejay_reset_el_buffer(info); + return 1; +} +static void veejay_stop_playing_stream( veejay_t *info, int new_stream_id ) +{ + vj_tag_disable( info->uc->sample_id ); + vj_tag_chain_free( info->uc->sample_id ); +} +static int veejay_start_playing_sample( veejay_t *info, int sample_id ) +{ + int looptype,speed,start,end; + video_playback_setup *settings = info->settings; + if(!sample_exists(sample_id) ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample %d does not exist", sample_id); + return 0; + } + + info->edit_list = sample_get_editlist( sample_id ); + veejay_reset_el_buffer(info); + + sample_start_playing( sample_id, info->no_caching ); + int tmp = sample_chain_malloc( sample_id ); + + sample_get_short_info( sample_id , &start,&end,&looptype,&speed); + + settings->min_frame_num = 0; + settings->max_frame_num = sample_video_length( sample_id ); + +#ifdef HAVE_FREETYPE + if(info->font && info->uc->sample_id != sample_id) + { + void *dict = sample_get_dict( sample_id ); + vj_font_set_constraints_and_dict( + info->font, + settings->min_frame_num, + settings->max_frame_num, + info->edit_list->video_fps, + dict + ); + + veejay_msg(VEEJAY_MSG_DEBUG, "Subtitling sample %d: %ld - %ld", sample_id, + settings->min_frame_num, settings->max_frame_num ); + + } +#endif + + info->uc->sample_id = sample_id; + info->last_sample_id = sample_id; + + info->sfd = sample_get_framedup(sample_id); + + info->uc->render_changed = 1; /* different render list */ + + sample_reset_offset( sample_id ); /* reset mixing offsets */ + veejay_set_frame(info, start); + veejay_set_speed(info, speed); + veejay_msg(VEEJAY_MSG_INFO, "Playing sample %d (FX=%x, Sl=%d, Speed=%d, Start=%d, Loop=%d)", + sample_id, tmp,info->sfd, speed, start, looptype ); + + + return 1; +} + +static int veejay_start_playing_stream(veejay_t *info, int stream_id ) +{ + video_playback_setup *settings = info->settings; + if(!vj_tag_exists(stream_id)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Stream %d does not exist", stream_id); + return 0; + } + + if(vj_tag_enable( stream_id ) <= 0 ) + { + veejay_msg(0, "Unable to activate stream ?"); + return 0; + } + + vj_tag_set_active( stream_id, 1 ); + + int tmp = vj_tag_chain_malloc( stream_id); + + info->uc->render_changed = 1; + settings->min_frame_num = 0; + settings->max_frame_num = vj_tag_get_n_frames( stream_id ); + +#ifdef HAVE_FREETYPE + if(info->font ) + { + void *dict = vj_tag_get_dict( stream_id ); + vj_font_set_constraints_and_dict( info->font, settings->min_frame_num, + settings->max_frame_num, info->edit_list->video_fps, dict ); + veejay_msg(VEEJAY_MSG_DEBUG, "Subtitling stream %d: %ld - %ld", stream_id, + settings->min_frame_num, settings->max_frame_num ); + } +#endif + info->last_tag_id = stream_id; + info->uc->sample_id = stream_id; + + veejay_msg(VEEJAY_MSG_INFO,"Playing stream %d (FX=%x) (Ff=%d)", stream_id, tmp, + settings->max_frame_num ); + + //@ use edl of plain/dummy + info->edit_list = info->current_edit_list; + veejay_reset_el_buffer(info); + + return 1; +} + +void veejay_change_playback_mode( veejay_t *info, int new_pm, int sample_id ) +{ + if( info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE ) + { + int cur_id = info->uc->sample_id; + if( cur_id == sample_id && new_pm == VJ_PLAYBACK_MODE_SAMPLE ) + { + int start = sample_get_startFrame( cur_id ); + veejay_set_frame(info,start); + veejay_msg(VEEJAY_MSG_INFO, "Sample %d starts playing from frame %d",sample_id,start); + return; + } + else + { + if(!veejay_stop_playing_sample(info, sample_id )) + return; + } + } + if( info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG ) + { + int cur_id = info->uc->sample_id; + if( cur_id == sample_id && new_pm == VJ_PLAYBACK_MODE_TAG ) + { + veejay_msg(0, "Already playing stream %d", cur_id ); + return; + } + else + { + veejay_stop_playing_stream(info, sample_id ); + } + } + + if(new_pm == VJ_PLAYBACK_MODE_PLAIN ) + { + if(info->uc->playback_mode==VJ_PLAYBACK_MODE_TAG) + veejay_stop_playing_stream( info , 0); + if(info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE ) + veejay_stop_playing_sample( info, 0 ); + info->uc->playback_mode = new_pm; + info->edit_list = info->current_edit_list; + video_playback_setup *settings = info->settings; + settings->min_frame_num = 0; +// settings->max_frame_num = info->edit_list->video_frames-1; + settings->max_frame_num = info->edit_list->total_frames; + veejay_msg(VEEJAY_MSG_INFO, "Playing plain video, frames %d - %d", + (int)settings->min_frame_num, (int)settings->max_frame_num ); + } + if(new_pm == VJ_PLAYBACK_MODE_TAG) + { + info->uc->playback_mode = new_pm; + veejay_start_playing_stream(info,sample_id); + } + if(new_pm == VJ_PLAYBACK_MODE_SAMPLE) + { + info->uc->playback_mode = new_pm; + veejay_start_playing_sample(info,sample_id ); + } +} + +void veejay_set_sample_f(veejay_t *info, int sample_id, int offset ) +{ + if ( info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG) + { + veejay_start_playing_stream(info,sample_id ); + } + else if( info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE) + { + if( info->uc->sample_id == sample_id ) + { + int start = sample_get_startFrame( info->uc->sample_id ); + veejay_set_frame(info,start+offset); + veejay_msg(VEEJAY_MSG_INFO, "Sample %d starts playing from frame %d",sample_id,start); + } + else + { + veejay_start_playing_sample(info,sample_id ); + veejay_set_frame( info, sample_get_startFrame(sample_id)+offset ); + } + } +} + +void veejay_set_sample(veejay_t * info, int sampleid) +{ + if ( info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG) + { + veejay_start_playing_stream(info,sampleid ); + } + else if( info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE) + { + if( info->uc->sample_id == sampleid ) + { + int start = sample_get_startFrame( info->uc->sample_id ); + veejay_set_frame(info,start); + veejay_msg(VEEJAY_MSG_INFO, "Sample %d starts playing from frame %d",sampleid,start); + } + else + veejay_start_playing_sample(info,sampleid ); + } +} + +/****************************************************** + * veejay_create_sample + * create a new sample + * return value: 1 on success, -1 on error + ******************************************************/ +int veejay_create_tag(veejay_t * info, int type, char *filename, + int index, int palette, int channel) +{ + if( type == VJ_TAG_TYPE_NET || type == VJ_TAG_TYPE_MCAST ) + { + if( (filename != NULL) && ((strcasecmp( filename, "localhost" ) == 0) || (strcmp( filename, "127.0.0.1" ) == 0)) ) + { + if( channel == info->uc->port ) + { + veejay_msg(VEEJAY_MSG_ERROR, "It makes no sense to connect to myself (%s - %d)", + filename,channel); + return 0; + } + } + } +//@ palette is used for other things + int id = vj_tag_new(type, filename, index, info->current_edit_list, info->pixel_format, palette, channel ); + + char descr[200]; + veejay_memset(descr,0,200); + vj_tag_get_by_type(type,descr); + if(id > 0 ) + { + info->nstreams++; + veejay_msg(VEEJAY_MSG_INFO, "New Input Stream '%s' with ID %d created",descr, id ); + return id; + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to create new Input Stream '%s'", descr ); + } + return 0; +} + +/****************************************************** + * veejay_stop() + * stop playing + * + * return value: 1 on succes, 0 on error + ******************************************************/ + +int veejay_stop(veejay_t * info) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + if (settings->state == LAVPLAY_STATE_STOP) { + if(info->uc->playback_mode==VJ_PLAYBACK_MODE_TAG) { + vj_tag_set_active(info->uc->sample_id,0); + } + if(info->stream_enabled) { + info->stream_enabled = 0; + vj_yuv_stream_stop_write(info->output_stream); + } + } + + veejay_change_state(info, LAVPLAY_STATE_STOP); + + /*pthread_cancel( settings->playback_thread ); */ + pthread_join(settings->playback_thread, NULL); + + return 1; +} + +/* stop playing a sample, continue with video */ +void veejay_stop_sampling(veejay_t * info) +{ + info->uc->playback_mode = VJ_PLAYBACK_MODE_PLAIN; + info->uc->sample_id = 0; + info->uc->sample_start = 0; + info->uc->sample_end = 0; +} + +/****************************************************** + * veejay_SDL_update() + * when using software playback - there's a new frame + * new frame can enter by body, or be put in info->vb->yuv. + * this will probably change. + * return value: 1 on success, 0 on error + ******************************************************/ +static int veejay_screen_update(veejay_t * info ) +{ + uint8_t *frame[3]; + uint8_t *c_frame[3]; + int i = 0; + int skip_update = 0; + vj_perform_unlock_primary_frame(); + + video_playback_setup *settings = info->settings; + + if(settings->composite==1 && info->sdl[0]) + { + if(!vj_sdl_lock( info->sdl[0] ) ) + return 0; + + uint8_t *yuyv = vj_sdl_get_yuv_overlay(info->sdl[0]); + + composite_blit( info->composite, yuyv ); + + if(!vj_sdl_unlock( info->sdl[0]) ) + return 0; + + skip_update = 1; + } + else if(settings->zoom ) + { + VJFrame src,dst; + memset(&src,0,sizeof(VJFrame)); + memset(&dst,0,sizeof(VJFrame)); + + if(info->settings->crop) + { + int w = 0; + int h = 0; + vj_perform_get_crop_dimensions( info, &w, &h ); + vj_get_yuv_template( &src, w,h, info->pixel_format ); + } + else + { + vj_get_yuv_template( &src, info->current_edit_list->video_width, + info->current_edit_list->video_height, + info->pixel_format ); + } + + vj_get_yuv_template( &dst, info->video_output_width, + info->video_output_height, + info->pixel_format ); + + if(info->settings->crop) + vj_perform_get_cropped_frame(info, src.data, 1); + else + vj_perform_get_primary_frame(info, src.data ); + + vj_perform_get_output_frame( dst.data ); + + yuv_convert_and_scale( info->video_out_scaler, src.data, dst.data ); + + vj_perform_get_output_frame( frame ); + } + else + vj_perform_get_primary_frame(info,frame); + + +#ifdef HAVE_JPEG +#ifdef USE_GDK_PIXBUF + /* dirty hack to save a frame to image */ + if (info->uc->hackme == 1) + { + info->uc->hackme = 0; + +#ifdef USE_GDK_PIXBUF + if(!vj_picture_save( info->settings->export_image, frame, + info->video_output_width, info->video_output_height, + get_ffmpeg_pixfmt( info->current_edit_list->pixel_format )) ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Unable to write frame %ld to image as '%s'", + info->settings->current_frame_num, info->settings->export_image ); + } +#else +#ifdef HAVE_JPEG + vj_perform_screenshot2(info, frame); + if(info->uc->filename) free(info->uc->filename); +#endif +#endif + } +#endif +#endif + + + /* hack to write YCbCr data to stream*/ + if (info->stream_enabled == 1) + { + vj_perform_get_primary_frame_420p(info,c_frame ); + if (vj_yuv_put_frame(info->output_stream, c_frame) == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Error writing Y4M frame. Aborting Y4M output stream!"); + vj_yuv_stream_stop_write(info->output_stream); + info->stream_enabled = 0; + } + } + +#ifdef HAVE_V4L + if( info->vloopback ) + { + vj_vloopback_fill_buffer( info->vloopback , frame ); + if( vj_vloopback_get_mode( info->vloopback )) + vj_vloopback_write_pipe( info->vloopback ); + } +#endif + + if( info->settings->unicast_frame_sender ) + { + vj_perform_send_primary_frame_s2(info, 0, info->settings->unicast_link_id); + info->settings->unicast_frame_sender = 0; + } + if( info->settings->mcast_frame_sender && info->settings->use_vims_mcast ) + { + vj_perform_send_primary_frame_s2(info, 1, info->uc->current_link); + } + + + if( skip_update ) + { + vj_sdl_flip(info->sdl[0]); + return 1; + } + + switch (info->video_out) + { +#ifdef HAVE_SDL + case 0: + for(i = 0 ; i < MAX_SDL_OUT; i ++ ) + if( info->sdl[i] ) + if(!vj_sdl_update_yuv_overlay( info->sdl[i], frame ) ) return 0; + break; +#endif +#ifdef HAVE_DIRECTFB + case 1: + vj_perform_get_primary_frame_420p(info,c_frame); + if (vj_dfb_update_yuv_overlay(info->dfb, c_frame) != 0) + { + return 0; + } + break; + case 2: +#ifdef HAVE_SDL + for( i = 0; i < MAX_SDL_OUT; i ++ ) + if( info->sdl[i] ) + if(!vj_sdl_update_yuv_overlay( info->sdl[i], frame ) ) + return 0; +#endif + vj_perform_get_primary_frame_420p(info,c_frame); + if (vj_dfb_update_yuv_overlay(info->dfb, c_frame) != 0) + { + return 0; + } + break; +#endif + case 3: + if(settings->zoom) + vj_perform_get_output_frame_420p(info, c_frame, info->video_output_width, info->video_output_height ); + else + vj_perform_get_primary_frame_420p(info,c_frame); + + if (vj_yuv_put_frame(info->render_stream, c_frame) == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Error writing Y4M frame to output stream. Ending veejay session..."); + vj_yuv_stream_stop_write(info->render_stream); + veejay_change_state_save(info, LAVPLAY_STATE_STOP); + return 0; + } + break; + case 4: +#ifdef HAVE_GL + x_display_push( info->gl, frame , info->current_edit_list->video_width, + info->current_edit_list->video_height, + info->current_edit_list->pixel_format ); +#endif + break; + case 5: + break; + default: + veejay_change_state(info,LAVPLAY_STATE_STOP); + return 0; + break; + } + + return 1; +} + + + + +/****************************************************** + * veejay_mjpeg_software_frame_sync() + * Try to keep in sync with nominal frame rate, + * timestamp frame with actual completion time + * (after any deliberate sleeps etc) + * + * return value: 1 on success, 0 on error + ******************************************************/ + +static void veejay_mjpeg_software_frame_sync(veejay_t * info, + int frame_periods) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + if (info->uc->use_timer ) { + + /* I really *wish* the timer was higher res on x86 Linux... 10mSec + * is a *pain*. Sooo wasteful here... + */ + + struct timeval now; + struct timespec nsecsleep; + int usec_since_lastframe=0; + + for (;;) { + //fixme? + gettimeofday(&now, 0); + + usec_since_lastframe = + now.tv_usec - settings->lastframe_completion.tv_usec; + //usec_since_lastframe = vj_get_relative_time(); + if (usec_since_lastframe < 0) + usec_since_lastframe += 1000000; + if (now.tv_sec > settings->lastframe_completion.tv_sec + 1) + usec_since_lastframe = 1000000; + + if (settings->first_frame || + (frame_periods * settings->usec_per_frame - + usec_since_lastframe) < (1000000 / HZ)) + break; + + /* Assume some other process will get a time-slice before + * we do... and hence the worst-case delay of 1/HZ after + * sleep timer expiry will apply. Reasonable since X will + * probably do something... + */ + nsecsleep.tv_nsec = (frame_periods * settings->usec_per_frame - usec_since_lastframe - 1000000 / HZ) * 1000; + nsecsleep.tv_sec = 0; + nanosleep(&nsecsleep, NULL); + } + } + + settings->first_frame = 0; + + /* We are done with writing the picture - Now update all surrounding info */ + gettimeofday(&(settings->lastframe_completion), 0); + settings->syncinfo[settings->currently_processed_frame].timestamp = + settings->lastframe_completion; + + +} + + +void veejay_pipe_write_status(veejay_t * info, int link_id) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + int d_len = 0; + int res = 0; + int pm = info->uc->playback_mode; + int total_slots = sample_size()-1; + int tags = vj_tag_true_size() -1; + int cache_used = 0; + if(tags>0) + total_slots+=tags; + if(total_slots < 0) + total_slots = 0; + + int mstatus = vj_event_macro_status(); + + switch (info->uc->playback_mode) { + case VJ_PLAYBACK_MODE_SAMPLE: + cache_used = sample_cache_used(0); + + if( info->settings->randplayer.mode == + RANDMODE_SAMPLE) + pm = VJ_PLAYBACK_MODE_PATTERN; + if( sample_chain_sprint_status + (info->uc->sample_id,cache_used,info->seq->active,info->seq->current,info->real_fps,settings->current_frame_num, pm, total_slots,info->seq->rec_id,mstatus,info->status_what ) != 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Fatal error, tried to collect properties of invalid sample"); +#ifdef STRICT_CHECKING + assert(0); +#else + veejay_change_state( info, LAVPLAY_STATE_STOP ); +#endif + } + break; + case VJ_PLAYBACK_MODE_PLAIN: + veejay_sprintf(info->status_what,1024, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + info->real_fps, + settings->current_frame_num, + info->uc->playback_mode, + 0, + 0, + settings->min_frame_num, + settings->max_frame_num, + settings->current_playback_speed, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + total_slots, + cache_used, + 0, + 0, + 0, + 0, + mstatus ); + break; + case VJ_PLAYBACK_MODE_TAG: + if( vj_tag_sprint_status( info->uc->sample_id,cache_used,info->seq->active,info->seq->current, info->real_fps, + settings->current_frame_num, info->uc->playback_mode,total_slots,mstatus, info->status_what ) != 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid status!"); + } + break; + } + + d_len = strlen(info->status_what); + snprintf(info->status_msg,MESSAGE_SIZE, "V%03dS", d_len ); + + res = vj_server_send(info->vjs[VEEJAY_PORT_STA],link_id, info->status_msg, 5); + if( res <= 0) + { /* close command socket */ + veejay_msg(VEEJAY_MSG_DEBUG ,"Error sending status message , closing connection(s)"); + _vj_server_del_client(info->vjs[VEEJAY_PORT_CMD], link_id ); + _vj_server_del_client(info->vjs[VEEJAY_PORT_STA], link_id ); + } + res = vj_server_send(info->vjs[VEEJAY_PORT_STA], link_id, info->status_what, d_len ); + if( res <= 0) + { /* close command socket */ + veejay_msg(VEEJAY_MSG_DEBUG ,"Error sending status message , closing connection(s)"); + _vj_server_del_client(info->vjs[VEEJAY_PORT_CMD], link_id ); + _vj_server_del_client(info->vjs[VEEJAY_PORT_STA], link_id ); + } + + if (info->uc->chain_changed == 1) + info->uc->chain_changed = 0; + if (info->uc->render_changed == 1) + info->uc->render_changed = 0; +} +static char *veejay_concat_paths(char *path, char *suffix) +{ + int n = strlen(path) + strlen(suffix) + 2; + char *str = vj_calloc( n * sizeof(char)); + sprintf(str, "%s/%s", path,suffix); + return str; +} + +static int veejay_is_dir(char *path) +{ + struct stat s; + if( stat( path, &s ) == -1 ) + { + veejay_msg(0, "%s (%s)", strerror(errno),path); + return 0; + } + if( !S_ISDIR( s.st_mode )) { + veejay_msg(0, "%s is not a valid path."); + return 0; + } + return 1; +} +static int veejay_valid_homedir(char *path) +{ + char *recovery_dir = veejay_concat_paths( path, "recovery" ); + char *theme_dir = veejay_concat_paths( path, "theme" ); + int sum = veejay_is_dir( recovery_dir ); + sum += veejay_is_dir( theme_dir ); + sum += veejay_is_dir( path ); + free(theme_dir); + free(recovery_dir); + if( sum == 3 ) + return 1; + return 0; +} +static int veejay_create_homedir(char *path) +{ + if( mkdir(path,0700 ) == -1 ) + { + if( errno != EEXIST ) + { + veejay_msg(0, "Unable to create %s - No veejay home setup (error=%s)", strerror(errno)); + return 0; + } + } + + char *recovery_dir = veejay_concat_paths( path, "recovery" ); + if( mkdir(recovery_dir,0700) == -1 ) { + if( errno != EEXIST ) + { + veejay_msg(0, "%s", strerror(errno)); + free(recovery_dir); + return 0; + } + } + free(recovery_dir); + + char *theme_dir = veejay_concat_paths( path, "theme" ); + if( mkdir(theme_dir,0700) == -1 ) { + if( errno != EEXIST ) + { + veejay_msg(0, "%s", strerror(errno)); + free(theme_dir); + return 0; + } + } + free(theme_dir); + veejay_msg(VEEJAY_MSG_INFO, "veejay home is setup"); + return 1; +} +void veejay_check_homedir(void *arg) +{ + veejay_t *info = (veejay_t *) arg; + char path[1024]; + char tmp[1024]; + struct stat s; + char *home = getenv("HOME"); + if(!home) + { + veejay_msg(VEEJAY_MSG_ERROR, + "HOME environment variable not set."); + return; + } + sprintf(path, "%s/.veejay", home ); + info->homedir = strndup( path, 1024 ); + + + if( veejay_valid_homedir(path) == 0) + { + if( veejay_create_homedir(path) == 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING, + "Invalid veejay home %s",info->homedir); + return; + } + } + + sprintf(tmp, "%s/plugins.cfg", path ); + struct statfs ts; + if( statfs( tmp, &ts ) != 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING,"\tNo plugins.cfg found (see DOC/HowtoPlugins)"); + } + sprintf(tmp, "%s/viewport.cfg", path); + memset( &ts,0,sizeof(struct statfs)); + if( statfs( tmp, &ts ) != 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING,"\tNo viewport.cfg found (start veejay with -D -w -h and press CTRL-V to setup viewport)"); + } + +} + +/****************************************************** + * veejay_mjpeg_playback_thread() + * the main (software) video playback thread + * + * return value: 1 on success, 0 on error + ******************************************************/ + +void veejay_handle_signal(void *arg, int sig) +{ + veejay_t *info = (veejay_t *) arg; + if (sig == SIGINT || sig == SIGQUIT ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Veejay interrupted by user. Bye!"); + veejay_change_state(info, LAVPLAY_STATE_STOP); + } + else + { + if( sig == SIGPIPE || sig == SIGSEGV || sig == SIGBUS || sig == SIGPWR || sig == SIGABRT || sig == SIGFPE ) + { + if(info->homedir) + veejay_change_state_save(info,LAVPLAY_STATE_STOP); + else + veejay_change_state( info, LAVPLAY_STATE_STOP ); + + signal( sig, SIG_DFL ); + } + } +} + + +static void veejay_handle_callbacks(veejay_t *info) { + + /* check for OSC events */ + vj_osc_get_packet(info->osc); + + /* update network */ + vj_event_update_remote( (void*)info ); +} + + +void vj_lock(veejay_t *info) +{ + video_playback_setup *settings = info->settings; + pthread_mutex_lock(&(settings->valid_mutex)); +} +void vj_unlock(veejay_t *info) +{ + video_playback_setup *settings = info->settings; + pthread_mutex_unlock(&(settings->valid_mutex)); +} + +static void donothing2(int sig) +{ + veejay_msg(VEEJAY_MSG_WARNING,"Catched signal %x (ignored)",sig ); +} + +static void veejay_event_handle(veejay_t *info) +{ + veejay_handle_callbacks(info); +#ifdef HAVE_SDL + if( info->video_out == 0 ) + { + SDL_Event event; + int ctrl_pressed = 0; + int shift_pressed = 0; + int alt_pressed = 0; + int mouse_x=0,mouse_y=0,but=0; + int res = 0; + while(SDL_PollEvent(&event) == 1) + { + SDL_KeyboardEvent *k = &event.key; + int mod = SDL_GetModState(); + if( event.type == SDL_KEYDOWN) + { + res = vj_event_single_fire( (void*) info, event, 0); + } + if( event.type == SDL_MOUSEMOTION ) + { + mouse_x = event.button.x; + mouse_y = event.button.y; + } + + if( event.type == SDL_MOUSEBUTTONDOWN ) + { + mouse_x = event.button.x; + mouse_y = event.button.y; + shift_pressed = (mod & KMOD_LSHIFT ); + alt_pressed = (mod & KMOD_RSHIFT ); + if( mod == 0x1080 || mod == 0x1040 || (mod & KMOD_LCTRL) || (mod & KMOD_RCTRL) ) + ctrl_pressed = 1; + else + ctrl_pressed = 0; + + SDL_MouseButtonEvent *mev = &(event.button); + + if( mev->button == SDL_BUTTON_LEFT && shift_pressed) + { + but = 6; + info->uc->mouse[3] = 1; + } else if( mev->button == SDL_BUTTON_LEFT && ctrl_pressed ) + { + but = 10; + info->uc->mouse[3] = 4; + } + if (mev->button == SDL_BUTTON_MIDDLE && shift_pressed ) + { + but = 7; + info->uc->mouse[3] = 2; + } + if( mev->button == SDL_BUTTON_LEFT && alt_pressed ) + { + but = 11; + info->uc->mouse[3] = 11; + } + } + + if( event.type == SDL_MOUSEBUTTONUP ) + { + SDL_MouseButtonEvent *mev = &(event.button); + alt_pressed = (mod & KMOD_RSHIFT ); + shift_pressed = (mod & KMOD_LSHIFT ); + if( mod == 0x1080 || mod == 0x1040 || (mod & KMOD_LCTRL) || (mod & KMOD_RCTRL) ) + ctrl_pressed = 1; + else + ctrl_pressed = 0; + + if( mev->button == SDL_BUTTON_LEFT ) + { + if( info->uc->mouse[3] == 1 ) + { + but = 6; + info->uc->mouse[3] = 0; + } + else if (info->uc->mouse[3] == 4 ) + { + but = 10; + info->uc->mouse[3] = 0; + } else if (info->uc->mouse[3] == 0 ) + { + but = 1; + } else if ( info->uc->mouse[3] == 11 ) + { + but = 12; + info->uc->mouse[3] = 0; + } + } + else if (mev->button == SDL_BUTTON_RIGHT ) { + but = 2; + } + else if (mev->button == SDL_BUTTON_MIDDLE ) { + if( info->uc->mouse[3] == 2 ) + { but = 0; + info->uc->mouse[3] = 0; + } + else {if( info->uc->mouse[3] == 0 ) + but = 3;} + } + else if ((mev->button == SDL_BUTTON_WHEELUP ) && !alt_pressed && !ctrl_pressed) + { + but = 4; + } + else if ((mev->button == SDL_BUTTON_WHEELDOWN ) && !alt_pressed && !ctrl_pressed) + { + but = 5; + } + else if ((mev->button == SDL_BUTTON_WHEELUP) && alt_pressed && !ctrl_pressed ) + { + but = 13; + } + else if ((mev->button == SDL_BUTTON_WHEELDOWN) && alt_pressed && !ctrl_pressed ) + { + but = 14; + } + else if (mev->button == SDL_BUTTON_WHEELUP && ctrl_pressed ) + { + but = 15; + } + else if (mev->button == SDL_BUTTON_WHEELDOWN && ctrl_pressed ) + { + but = 16; + } + mouse_x = event.button.x; + mouse_y = event.button.y; + } + + } + info->uc->mouse[0] = mouse_x; + info->uc->mouse[1] = mouse_y; + info->uc->mouse[2] = but; + } +#endif +#ifdef HAVE_GL + if(info->video_out == 4 ) + { + x_display_mouse_grab( info->gl, info->uc->mouse[0],info->uc->mouse[1],info->uc->mouse[2], + info->uc->mouse[3] ); + + x_display_event( info->gl, info->current_edit_list->video_width, info->current_edit_list->video_height ); + + x_display_mouse_update( info->gl, &(info->uc->mouse[0]), &(info->uc->mouse[1]), &(info->uc->mouse[2]), + &(info->uc->mouse[3])); + } +#endif + +} + + +static void *veejay_mjpeg_playback_thread(void *arg) +{ + veejay_t *info = (veejay_t *) arg; + video_playback_setup *settings = + (video_playback_setup *) info->settings; + /* Allow easy shutting down by other processes... */ + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + + + /* schedule FIFO */ + + veejay_schedule_fifo( info, getpid()); + + vj_get_relative_time(); + + vj_osc_set_veejay_t(info); + vj_tag_set_veejay_t(info); + +//#ifdef HAVE_SDL +// SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); +//#endif + while (settings->state != LAVPLAY_STATE_STOP) { + pthread_mutex_lock(&(settings->valid_mutex)); + while (settings->valid[settings->currently_processed_frame] == 0) { + pthread_cond_wait(& + (settings-> + buffer_filled[settings-> + currently_processed_frame]), + &(settings->valid_mutex)); + if (settings->state == LAVPLAY_STATE_STOP) { + // Ok, we shall exit, that's the reason for the wakeup + veejay_msg(VEEJAY_MSG_DEBUG, + "Veejay was told to exit"); + pthread_exit(NULL); + return NULL; + } + } + pthread_mutex_unlock(&(settings->valid_mutex)); + + + if( settings->currently_processed_entry != settings->buffer_entry[settings->currently_processed_frame] && + !veejay_screen_update(info) ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Error playing frame %d", settings->current_frame_num); + } + + //@ here callbacks fixme was + + settings->currently_processed_entry = + settings->buffer_entry[settings->currently_processed_frame]; + /* sync timestamp */ + + veejay_mjpeg_software_frame_sync(info, + settings->valid[settings-> + currently_processed_frame]); + settings->syncinfo[settings->currently_processed_frame].frame = + settings->currently_processed_frame; + + + + + pthread_mutex_lock(&(settings->valid_mutex)); + settings->valid[settings->currently_processed_frame] = 0; + pthread_mutex_unlock(&(settings->valid_mutex)); + + /* Broadcast & wake up the waiting processes */ + pthread_cond_broadcast(& + (settings-> + buffer_done[settings-> + currently_processed_frame])); + + /* Now update the internal variables */ + // settings->previous_frame_num = settings->current_frame_num; + + settings->currently_processed_frame = + (settings->currently_processed_frame + 1) % 1; + } + + veejay_msg(VEEJAY_MSG_DEBUG, + "Veejay was told to exit"); + return NULL; +} + + +char *veejay_title( ) +{ + char tmp[64]; + sprintf(tmp, "Veejay %s", VERSION ); + return strdup(tmp); +} + + +/****************************************************** + * veejay_mjpeg_open() + * hardware: opens the device and allocates buffers + * software: inits threads and allocates buffers + * + * return value: 1 on success, 0 on error + ******************************************************/ + +int veejay_open(veejay_t * info) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + veejay_msg(VEEJAY_MSG_DEBUG, + "Initializing the threading system"); + + memset( &(settings->lastframe_completion), 0, sizeof(struct timeval)); + + pthread_mutex_init(&(settings->valid_mutex), NULL); + pthread_mutex_init(&(settings->syncinfo_mutex), NULL); + /* Invalidate all buffers, and initialize the conditions */ + + settings->valid[0] = 0; + settings->buffer_entry[0] = 0; + pthread_cond_init(&(settings->buffer_filled[0]), NULL); + pthread_cond_init(&(settings->buffer_done[0]), NULL); + + veejay_memset( &(settings->syncinfo[0]), 0, sizeof(struct mjpeg_sync)); + + /* Now do the thread magic */ + settings->currently_processed_frame = 0; + settings->currently_processed_entry = -1; + + veejay_msg(VEEJAY_MSG_DEBUG,"Starting software playback thread"); + + + if( pthread_create(&(settings->software_playback_thread), NULL, + veejay_mjpeg_playback_thread, (void *) info)) { + veejay_msg(VEEJAY_MSG_ERROR, + "Could not create software playback thread"); + return 0; + + + } + + //settings->usec_per_frame = 0; + + return 1; +} + + +static int veejay_mjpeg_get_params(veejay_t * info, + struct mjpeg_params *bp) +{ + int i; + /* Set some necessary params */ + bp->decimation = 1; + bp->quality = 50; /* default compression factor 8 */ + bp->odd_even = 1; + bp->APPn = 0; + bp->APP_len = 0; /* No APPn marker */ + for (i = 0; i < 60; i++) + bp->APP_data[i] = 0; + bp->COM_len = 0; /* No COM marker */ + for (i = 0; i < 60; i++) + bp->COM_data[i] = 0; + bp->VFIFO_FB = 1; + veejay_memset( bp->reserved, 0, sizeof(bp->reserved)); + + return 1; +} + + +/****************************************************** + * veejay_mjpeg_set_params() + * set the parameters + * + * return value: 1 on success, 0 on error + ******************************************************/ + +/****************************************************** + * veejay_mjpeg_set_frame_rate() + * set the frame rate + * + * return value: 1 on success, 0 on error + ******************************************************/ + + +static int veejay_mjpeg_set_playback_rate(veejay_t * info, + double video_fps, int norm) +{ + int norm_usec_per_frame = 0; + int target_usec_per_frame; + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + switch (norm) { + case VIDEO_MODE_PAL: + case VIDEO_MODE_SECAM: + norm_usec_per_frame = 1000000 / 25; /* 25Hz */ + break; + case VIDEO_MODE_NTSC: + norm_usec_per_frame = 1001000 / 30; /* 30ish Hz */ + break; + default: + veejay_msg(VEEJAY_MSG_ERROR, + "Unknown video norm! Use PAL , SECAM or NTSC"); + return 0; + } + + if (video_fps != 0.0) + target_usec_per_frame = (int) (1000000.0 / video_fps); + else + target_usec_per_frame = norm_usec_per_frame; + + + settings->usec_per_frame = target_usec_per_frame; + return 1; +} + + +/****************************************************** + * veejay_mjpeg_queue_buf() + * queue a buffer + * + * return value: 1 on success, 0 on error + ******************************************************/ + +static int veejay_mjpeg_queue_buf(veejay_t * info, int frame_periods) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + /* mark this buffer as playable and tell the software playback thread to wake up if it sleeps */ + pthread_mutex_lock(&(settings->valid_mutex)); + settings->valid[0] = frame_periods; + pthread_cond_broadcast(&(settings->buffer_filled[0])); + pthread_mutex_unlock(&(settings->valid_mutex)); + return 1; +} + + +/****************************************************** + * veejay_mjpeg_sync_buf() + * sync on a buffer + * + * return value: 1 on success, 0 on error + ******************************************************/ + +static int veejay_mjpeg_sync_buf(veejay_t * info, struct mjpeg_sync *bs) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + /* Wait until this buffer has been played */ + + pthread_mutex_lock(&(settings->valid_mutex)); + while (settings->valid[settings->currently_synced_frame] != 0) { + pthread_cond_wait(& + (settings-> + buffer_done[settings->currently_synced_frame]), + &(settings->valid_mutex)); + } + pthread_mutex_unlock(&(settings->valid_mutex)); + + memcpy(bs, &(settings->syncinfo[settings->currently_synced_frame]), + sizeof(struct mjpeg_sync)); + settings->currently_synced_frame = + (settings->currently_synced_frame + 1) % 1; + + return 1; +} + + +/****************************************************** + * veejay_mjpeg_close() + * close down + * + * return value: 1 on success, 0 on error + ******************************************************/ + + int veejay_close(veejay_t * info) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + veejay_msg(VEEJAY_MSG_DEBUG, + "Closing down the threading system "); + + //pthread_cancel(settings->software_playback_thread); + if (pthread_join(settings->software_playback_thread, NULL)) { + veejay_msg(VEEJAY_MSG_ERROR, + "Failure deleting software playback thread"); + return 0; + } + + return 1; +} + + + +/****************************************************** + * veejay_init() + * check the given settings and initialize everything + * + * return value: 0 on success, -1 on error + ******************************************************/ + + +int veejay_init(veejay_t * info, int x, int y,char *arg, int def_tags, int full_range) +{ + editlist *el = info->current_edit_list; + video_playback_setup *settings = info->settings; + + available_diskspace(); + + if(info->video_out<0) + { + veejay_msg(VEEJAY_MSG_ERROR, "No video output driver selected (see man veejay)"); + return -1; + } + // override geometry set in config file + if( info->uc->geox != 0 && info->uc->geoy != 0 ) + { + x = info->uc->geox; + y = info->uc->geoy; + } + + vj_event_init(); + + int id = 0, mode = 0; + + switch (info->uc->use_timer) + { + case 0: + veejay_msg(VEEJAY_MSG_WARNING, "Not timing audio/video"); + break; + default: + veejay_msg(VEEJAY_MSG_DEBUG, "Using nanosleep timer"); + break; + } + + if (veejay_init_editlist(info) != 0) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Cannot initialize the EditList"); + return -1; + } + vj_tag_set_veejay_t(info); + + if (vj_tag_init(info->current_edit_list->video_width, info->current_edit_list->video_height, info->pixel_format) != 0) { + veejay_msg(VEEJAY_MSG_ERROR, "Error while initializing Stream Manager"); + return -1; + } + +#ifdef HAVE_FREETYPE + info->font = vj_font_init( info->current_edit_list->video_width, + info->current_edit_list->video_height, + info->current_edit_list->video_fps,0 ); + + + if(info->settings->composite) + { + info->osd = vj_font_init( info->video_output_width,info->video_output_height, + info->current_edit_list->video_fps ,1 ); + } + else + { + info->osd = vj_font_init( info->current_edit_list->video_width, + info->current_edit_list->video_height, + info->current_edit_list->video_fps,1 ); + } + +#endif + + + sample_init( (info->current_edit_list->video_width * info->current_edit_list->video_height) , + info->font ); + + sample_set_project( info->pixel_format, + info->auto_deinterlace, + info->preserve_pathnames, + 0, + info->edit_list->video_norm ); + + if(info->pixel_format == FMT_422 || info->pixel_format == FMT_422F) + { + if(!vj_el_init_422_frame( info->current_edit_list, info->effect_frame1)) return 0; + if(!vj_el_init_422_frame( info->current_edit_list, info->effect_frame2)) return 0; + info->settings->sample_mode = SSM_422_444; + veejay_msg(VEEJAY_MSG_DEBUG, "Internal YUV format is 4:2:2 Planar, %d x %d", + info->current_edit_list->video_width, + info->current_edit_list->video_height); + } + else + { + if(!vj_el_init_420_frame( info->current_edit_list, info->effect_frame1)) return 0; + if(!vj_el_init_420_frame( info->current_edit_list, info->effect_frame2)) return 0; + info->settings->sample_mode = SSM_420_JPEG_TR; + veejay_msg(VEEJAY_MSG_DEBUG, "Internal YUV format is 4:2:0 Planar, %d x %d", + info->current_edit_list->video_width, + info->current_edit_list->video_height); + } + + if(!vj_perform_init(info)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to initialize Veejay Performer"); + return -1; + } + + if( info->settings->crop && info->settings->zoom) + { + VJFrame src; + memset( &src,0,sizeof(VJFrame)); + int w = 0; int h = 0; + vj_get_yuv_template( &src, + info->current_edit_list->video_width, + info->current_edit_list->video_height, + info->pixel_format ); + + int res = vj_perform_init_cropped_output_frame( + info, + &src, + &w, + &h + ); + if( res == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR ,"Invalid crop parameters: %d:%d:%d:%d (%dx%d)", + info->settings->viewport.top, + info->settings->viewport.bottom, + info->settings->viewport.left, + info->settings->viewport.right,w,h); + return -1; + } + veejay_msg(VEEJAY_MSG_INFO, "Crop video %dx%d to %dx%d (top %d, bottom %d, left %d, right %d", + info->current_edit_list->video_width, info->current_edit_list->video_height, + w,h, + info->settings->viewport.top, + info->settings->viewport.bottom, + info->settings->viewport.left, + info->settings->viewport.right ); + + } + if( info->settings->zoom ) + { + VJFrame src; + VJFrame dst; + memset( &src, 0, sizeof(VJFrame)); + memset( &dst, 0, sizeof(VJFrame)); + + if(info->settings->crop) + { + int w = 0; + int h = 0; + vj_perform_get_crop_dimensions( info, &w, &h ); + vj_get_yuv_template( &src, w,h, info->pixel_format ); + } + else + { + vj_get_yuv_template( &src, + info->current_edit_list->video_width, + info->current_edit_list->video_height, + info->pixel_format ); + } + + vj_get_yuv_template( &dst, + info->video_output_width, + info->video_output_height, + info->pixel_format ); + + if(info->settings->crop) + vj_perform_get_cropped_frame(info, &src.data, 0); + else + vj_perform_get_primary_frame(info, &src.data ); + + vj_perform_init_output_frame(info, &(dst.data), + info->video_output_width, info->video_output_height ); + + info->settings->sws_templ.flags = info->settings->zoom; + info->video_out_scaler = (void*) + yuv_init_swscaler( + &src, + &dst, + &(info->settings->sws_templ), + yuv_sws_get_cpu_flags() + ); + + if(!info->video_out_scaler) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot initialize SwScaler"); + return -1; + } + + + if(info->settings->sws_templ.use_filter) + { + sws_template *t = &(info->settings->sws_templ); + veejay_msg(VEEJAY_MSG_DEBUG, "Using software scaler options:"); + veejay_msg(VEEJAY_MSG_DEBUG, "lgb=%f, cgb=%f, ls=%f, cs=%f, chs=%d, cvs=%d", + t->lumaGBlur,t->chromaGBlur,t->lumaSarpen, + t->chromaSharpen,t->chromaHShift,t->chromaVShift); + } + } + + if( info->settings->composite ) + { + if(info->settings->zoom <= 0 || info->settings->zoom > 11 ) + info->settings->zoom = 1; + info->composite = composite_init( info->video_output_width, info->video_output_height, + el->video_width, el->video_height, info->homedir, info->settings->sample_mode, + info->settings->zoom, info->pixel_format ); + info->settings->zoom = 0; + info->which_vp = 1; + // info->bes_width = info->video_output_width; + // info->bes_height = info->video_output_height; + } + else if(!info->settings->zoom) + { + info->video_output_width = el->video_width; + info->video_output_height = el->video_height; + info->settings->sws_templ.flags = 1; // fast bicubic + } + + if(!info->bes_width) + info->bes_width = info->video_output_width; + if(!info->bes_height) + info->bes_height = info->video_output_height; + + if(info->current_edit_list->has_audio) + { + if (vj_perform_init_audio(info)) + veejay_msg(VEEJAY_MSG_INFO, "Initialized Audio Task"); + else + { + veejay_msg(VEEJAY_MSG_ERROR, + "Unable to initialize Audio Task"); + info->audio = NO_AUDIO; + } + } + + veejay_msg(VEEJAY_MSG_INFO, + "Initialized %d Image- and Video Effects", vj_effect_max_effects()); + vj_effect_initialize(info->current_edit_list->video_width, info->current_edit_list->video_height, + full_range); + veejay_msg(VEEJAY_MSG_DEBUG, + "BES %d x %d, Video %d x %d , Screen %d x %d", + info->bes_width, + info->bes_height, + el->video_width, + el->video_height, + info->video_output_width, + info->video_output_height); + + if(info->dump) vj_effect_dump(); + info->output_stream = vj_yuv4mpeg_alloc(info->current_edit_list, info->video_output_width, + info->video_output_height ); + if(!info->output_stream) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot setup output stream?"); + return -1; + } + + if( info->settings->action_scheduler.sl && info->settings->action_scheduler.state ) + { + + if(sample_readFromFile( info->settings->action_scheduler.sl, + info->seq, info->font, info->edit_list, &(info->uc->sample_id), &(info->uc->playback_mode) ) ) + veejay_msg(VEEJAY_MSG_INFO, "Loaded sample list %s from actionfile", + info->settings->action_scheduler.sl ); + } + + + if( settings->action_scheduler.state ) + { + settings->action_scheduler.state = 0; + } + + if( !vj_server_setup(info) ) + { + veejay_msg(VEEJAY_MSG_ERROR,"Unable to start network server. Most likely, there is already a veejay running"); + veejay_msg(VEEJAY_MSG_ERROR,"If you want to run multiple veejay's on the same machine, use the '-p/--port'"); + veejay_msg(VEEJAY_MSG_ERROR,"commandline option. For example: $ veejay -p 4490 -d"); + return -1; + } + + /* now setup the output driver */ + switch (info->video_out) + { + case 4: +#ifdef HAVE_GL + veejay_msg(VEEJAY_MSG_INFO, "Using output driver OpenGL"); + info->gl = (void*) x_display_init(info); + x_display_open(info->gl, info->current_edit_list->video_width, info->current_edit_list->video_height ); +#endif + break; + case 0: + veejay_msg(VEEJAY_MSG_INFO, "Using output driver SDL"); +#ifdef HAVE_SDL + info->sdl[0] = + (vj_sdl *) vj_sdl_allocate( info->video_output_width,info->video_output_height,info->pixel_format); + if( !info->sdl[0] ) + return -1; + + if( x != -1 && y != -1 ) + vj_sdl_set_geometry(info->sdl[0],x,y); + + if (!vj_sdl_init(info->settings->ncpu, info->sdl[0], info->bes_width, info->bes_height, "Veejay",1,info->settings->full_screen)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error initializing SDL"); + return -1; + } +#endif + break; + case 1: + + veejay_msg(VEEJAY_MSG_INFO, "Using output driver DirectFB"); +#ifdef HAVE_DIRECTFB + info->dfb =(vj_dfb *) vj_dfb_allocate(info->video_output_width,info->video_output_height, + el->video_norm); + if( !info->dfb ) + return -1; + if (vj_dfb_init(info->dfb) != 0) + return -1; +#endif + break; + + + case 2: + veejay_msg(VEEJAY_MSG_INFO, + "Using output driver SDL & DirectFB"); +#ifdef HAVE_SDL + info->sdl[0] = (vj_sdl *) vj_sdl_allocate(info->video_output_width,info->video_output_height, info->pixel_format); + if(!info->sdl[0]) + return -1; + + if (!vj_sdl_init(info->settings->ncpu, info->sdl[0], info->bes_width, info->bes_height,"Veejay",1,info->settings->full_screen)) + return -1; +#endif +#ifdef HAVE_DIRECTFB + info->dfb = (vj_dfb *) vj_dfb_allocate( info->video_output_width, info->video_output_height, el->video_norm); + if(!info->dfb) + return -1; + + if (vj_dfb_init(info->dfb) != 0) + return -1; +#endif + break; + case 3: + veejay_msg(VEEJAY_MSG_INFO, "Entering render mode (no visual output)"); + + info->render_stream = vj_yuv4mpeg_alloc(info->current_edit_list, info->video_output_width,info->video_output_height); + + if (vj_yuv_stream_start_write (info->render_stream, info->stream_outname, info->current_edit_list) == 0) { + veejay_msg(VEEJAY_MSG_INFO, "Rendering to [%s]",info->stream_outname); + } + else { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot create render stream. Aborting"); + return -1; + } + break; + + case 5: + veejay_msg(VEEJAY_MSG_INFO, "Entering headless mode (no visual output)"); + break; + + default: + veejay_msg(VEEJAY_MSG_ERROR, "Invalid playback mode. Use -O [012345]"); + return -1; + break; + } + + +#ifdef HAVE_XML2 + if(info->load_action_file) + { + if(veejay_load_action_file(info, info->action_file )==0) + { + if(sample_readFromFile( info->action_file, + info->seq, + info->font, + info->edit_list, + &id, + &mode )) + { + veejay_msg(VEEJAY_MSG_INFO, "Loaded samplelist %s", info->action_file); + if( id > 0 ) + { + veejay_change_playback_mode(info, mode, id ); + } + } + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Loaded configuration file %s", info->action_file ); + } + } +#endif + + + + if(def_tags && id <= 0) + { + int n = vj_tag_num_devices(); + int nid = veejay_create_tag( info, VJ_TAG_TYPE_V4L, "bogus", info->nstreams, el->pixel_format, (def_tags-1) ); + if( nid> 0) + { + veejay_msg(VEEJAY_MSG_INFO, "Requested capture device available as stream %d", nid ); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to open capture device, Use -A[%d-%d]", + 1, n ); + return -1; + } + info->settings->late[0] = VJ_PLAYBACK_MODE_TAG; + info->settings->late[1] = nid; + // veejay_change_playback_mode(info,VJ_PLAYBACK_MODE_TAG,nid); + } + else if(info->dummy->active && id <= 0) + { + int dummy_id; + /* Use dummy mode, action file could have specified something */ + if( vj_tag_size()-1 <= 0 ) + dummy_id = vj_tag_new( VJ_TAG_TYPE_COLOR, "Solid", -1, info->current_edit_list,info->pixel_format,-1,0); + else + dummy_id = vj_tag_size()-1; + + if(dummy_id > 0) + { + veejay_msg(VEEJAY_MSG_INFO, "Activating dummy mode (Stream %d)", dummy_id); + veejay_change_playback_mode(info,VJ_PLAYBACK_MODE_TAG,dummy_id); + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Failed to create dummy stream"); + return -1; + } + } + else if( info->uc->file_as_sample && id <= 0) + { + long i,n=info->current_edit_list->num_video_files; + for(i = 0; i < n; i ++ ) + { + long start,end; + if(vj_el_get_file_entry( info->current_edit_list, &start,&end, i )) + { + editlist *el = veejay_edit_copy_to_new( + info,info->current_edit_list, + start,end ); + if(!el) + { + veejay_msg(0, "Unable to start from file, Abort"); + return -1; + } + sample_info *skel = sample_skeleton_new( 0, el->total_frames ); + if(skel) + { + skel->edit_list = el; + sample_store(skel); + } + } + } + } + + /* After we have fired up the audio and video threads system (which + * are assisted if we're installed setuid root, we want to set the + * effective user id to the real user id + */ + + if (seteuid(getuid()) < 0) + { + /* fixme: get rid of sys_errlist and use sys_strerror */ + veejay_msg(VEEJAY_MSG_ERROR, "Can't set effective user-id: %s", sys_errlist[errno]); + return -1; + } + + + veejay_change_state( info, LAVPLAY_STATE_PLAYING ); + + if (!veejay_mjpeg_set_playback_rate(info, el->video_fps, el->video_norm == 'p' ? VIDEO_MODE_PAL : VIDEO_MODE_NTSC)) { + return -1; + } + + if(veejay_open(info) != 1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to initialize the threading system"); + return -1; + } + return 0; +} + +static int sched_ncpus() { + return sysconf( _SC_NPROCESSORS_ONLN ); +} + +static void veejay_schedule_fifo(veejay_t *info, int pid ) +{ + struct sched_param schp; + veejay_memset( &schp, 0, sizeof(schp)); + schp.sched_priority = sched_get_priority_max( SCHED_FIFO ); + + if( sched_setscheduler( pid, SCHED_FIFO, &schp ) != 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Cannot set First-In-First-Out scheduling for process %d",pid); + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Using First-In-First-Out II scheduling for process %d", pid); + veejay_msg(VEEJAY_MSG_INFO, "\tPriority is set to %d (RT)", schp.sched_priority ); + } +} + +/* + * pin_cpu: snapped from lm-sensors project + * + * + */ + +static int veejay_pin_cpu( veejay_t *info, int cpu_num ) +{ + uint32_t st = sizeof(cpu_set_t); + + int i,j,retval; + if( info->cpumask == NULL ) + { + info->sz = 1 + (2 * sched_ncpus()) / (8 * sizeof(unsigned long)); + info->mask = (unsigned long*) vj_calloc( st ); + info->cpumask = (unsigned long*) vj_calloc( st); + retval = sched_getaffinity(0, st, info->cpumask ); + if( retval < 0 ) + { + veejay_msg(0,"sched_getaffinity()"); + return retval; + } + + for( i = 0; i < st; ++ i ) + { + int word = i / (8 * sizeof(unsigned long)); + int bit = i % (8 * sizeof(unsigned long)); + if( info->cpumask[word] & (1 << bit)) + info->ncpus++; + } + } + + + cpu_num %= info->ncpus; + + veejay_memset( info->mask, 0, st ); + + for ( i = 0, j = 0; i < st; ++ i ) + { + int word = i / (8 * sizeof(unsigned long)); + int bit = i % (8 * sizeof(unsigned long)); + if( info->cpumask[word] & (1 << bit )) + { + if( j >= cpu_num ) { + info->mask[word] |= ( 1 << bit ); + break; + } + j++; + } + } + + int pi = (int) getpid(); + + retval = sched_setaffinity( pi, st, info->mask ); + + return retval; +} + +/****************************************************** + * veejay_playback_cycle() + * the playback cycle + ******************************************************/ +static void veejay_playback_cycle(veejay_t * info) +{ + video_playback_stats stats; + video_playback_setup *settings = + (video_playback_setup *) info->settings; + editlist *el = info->edit_list; + struct mjpeg_sync bs; + + struct timeval time_now; + double tdiff1, tdiff2; + int first_free, skipv, skipa, skipi, nvcorr; + struct mjpeg_params bp; + long ts, te; + + veejay_set_instance( info ); + + int which_cpu = 1; + char *env_value = getenv( "VEEJAY_SET_CPU" ); + if( env_value ) + { + if( sscanf( env_value, "%d", &which_cpu )) + { + if( which_cpu < 0 || which_cpu > settings->ncpu ) + { + veejay_msg(VEEJAY_MSG_ERROR, "VEEJAY_SET_CPU valid values are [%d ... %d]", 0, settings->ncpu ); + which_cpu = 1; + } + if(!which_cpu) + veejay_msg(VEEJAY_MSG_INFO, "VEEJAY_SET_CPU set to 0, render thread not locked on a single CPU."); + else + veejay_msg(VEEJAY_MSG_INFO, "VEEJAY_SET_CPU set to CPU %d", which_cpu ); + } + } + + if( settings->ncpu > 1 && which_cpu && settings->ncpu == 2) + { + veejay_msg(VEEJAY_MSG_INFO, "Found two cpu's, locking CPU %d for rendering purposes", which_cpu); + veejay_pin_cpu( info, which_cpu ); + } + + if( info->settings->late[1] ) + veejay_change_playback_mode(info,info->settings->late[0],info->settings->late[1]); + + vj_perform_queue_audio_frame(info); + vj_perform_queue_video_frame(info,0); + + if (vj_perform_queue_frame(info, 0) != 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"Unable to queue frame"); + return; + } + + + bp.input = 0; + bp.norm = + (el->video_norm == 'n') ? VIDEO_MODE_NTSC : VIDEO_MODE_PAL; + + veejay_msg(VEEJAY_MSG_DEBUG, "Output norm: %s", + bp.norm == VIDEO_MODE_NTSC ? "NTSC" : "PAL"); + + bp.norm = el->video_norm == VIDEO_MODE_NTSC ? 480 : 576; + + veejay_msg(VEEJAY_MSG_DEBUG, + "Output dimensions: %ldx%ld", + el->video_width, el->video_height); + + bp.odd_even = (el->video_inter == LAV_INTER_TOP_FIRST); + + if (!veejay_mjpeg_get_params(info, &bp)) { + veejay_msg(VEEJAY_MSG_ERROR, "Uhm?"); + return ; + } + + stats.stats_changed = 0; + stats.num_corrs_a = 0; + stats.num_corrs_b = 0; + stats.nsync = 0; + stats.audio = 0; + stats.norm = el->video_norm == 'n' ? 1 : 0; + tdiff1 = 0.; + tdiff2 = 0.; + nvcorr = 0; + + if(el->has_audio && info->audio == AUDIO_PLAY) + { + stats.audio = 1; + } + veejay_mjpeg_queue_buf(info, 1); + + while (settings->state != LAVPLAY_STATE_STOP) { + first_free = stats.nsync; + + int current_speed = settings->current_playback_speed; + + do { + if (settings->state == LAVPLAY_STATE_STOP) { + goto FINISH; + } + if (!veejay_mjpeg_sync_buf(info, &bs)) { + veejay_change_state_save(info, LAVPLAY_STATE_STOP); + goto FINISH; + } + + stats.nsync++; + gettimeofday(&time_now, 0); + stats.tdiff = time_now.tv_sec - bs.timestamp.tv_sec + + (time_now.tv_usec - bs.timestamp.tv_usec)*1.e-6; + } + while (stats.tdiff > settings->spvf && (stats.nsync - first_free) < 0); + + veejay_event_handle(info); + + +#ifdef HAVE_JACK + if ( info->audio==AUDIO_PLAY ) + { + struct timeval audio_tmstmp; + long int sec=0; + long int usec=0; + long num_audio_bytes_written = vj_jack_get_status( &sec,&usec); + audio_tmstmp.tv_sec = sec; + audio_tmstmp.tv_usec = usec; + + if (audio_tmstmp.tv_sec) + { + tdiff1 = settings->spvf * (stats.nsync - nvcorr) - + settings->spas * num_audio_bytes_written; + tdiff2 = (bs.timestamp.tv_sec - audio_tmstmp.tv_sec) + (bs.timestamp.tv_usec - audio_tmstmp.tv_usec) * 1.e-6; + } + } +#endif + stats.tdiff = tdiff1 - tdiff2; + + /* Fill and queue free buffers again */ + int n; + for (n = first_free; n < stats.nsync;) { + /* Audio/Video sync correction */ + skipv = 0; + skipa = 0; + skipi = 0; + + if (info->sync_correction) { + if (stats.tdiff > settings->spvf) { + /* Video is ahead audio */ + skipa = 1; + if (info->sync_ins_frames && current_speed != 0) + skipi = 1; + nvcorr++; + stats.num_corrs_a++; + stats.tdiff -= settings->spvf; + stats.stats_changed = 1; + } + if (stats.tdiff < -settings->spvf) { + /* Video is behind audio */ + skipv = 1; + if (!info->sync_skip_frames && current_speed != 0) + skipi = 1; + + nvcorr--; + stats.num_corrs_b++; + stats.tdiff += settings->spvf; + stats.stats_changed = 1; + } + } +#ifdef HAVE_SDL + ts= SDL_GetTicks(); +#endif + settings->buffer_entry[0] ++; + + if (!skipa) + vj_perform_queue_audio_frame(info); + + if (!skipv) + vj_perform_queue_video_frame(info,skipi); + + vj_perform_queue_frame( info, skipi ); + +#ifdef HAVE_SDL + te = SDL_GetTicks(); + info->real_fps = (int)( te - ts ); +#else + info->real_fps = 0; +#endif + if(skipv ) continue; + + if (!veejay_mjpeg_queue_buf(info, 1)) { + veejay_msg(VEEJAY_MSG_ERROR ,"Error queuing a frame"); + veejay_change_state_save(info, LAVPLAY_STATE_STOP); + goto FINISH; + } + + n++; + } +// veejay_event_handle(info); + + + /* output statistics */ + if (el->has_audio && (info->audio==AUDIO_PLAY)) + stats.audio = settings->audio_mute ? 0 : 1; + stats.stats_changed = 0; + } + + FINISH: + + /* All buffers are queued, sync on the outstanding buffers + * Never try to sync on the last buffer, it is a hostage of + * the codec since it is played over and over again + */ + if (info->audio_running || info->audio ==AUDIO_PLAY) + vj_perform_audio_stop(info); +} + +/****************************************************** + * veejay_playback_thread() + * The main playback thread + ******************************************************/ + +static void Welcome(veejay_t *info) +{ + veejay_msg(VEEJAY_MSG_WARNING, "Video project settings: %ldx%ld, Norm: [%s], fps [%2.2f], %s", + info->current_edit_list->video_width, + info->current_edit_list->video_height, + info->current_edit_list->video_norm == 'n' ? "NTSC" : "PAL", + info->current_edit_list->video_fps, + info->current_edit_list->video_inter==0 ? "Not interlaced" : "Interlaced" ); + if(info->audio==AUDIO_PLAY && info->edit_list->has_audio) + veejay_msg(VEEJAY_MSG_WARNING, " %ldHz %d Channels %dBps (%d Bit) %s %s", + info->current_edit_list->audio_rate, + info->current_edit_list->audio_chans, + info->current_edit_list->audio_bps, + info->current_edit_list->audio_bits, + (info->no_bezerk==0?"[Bezerk]" : " " ), + (info->verbose==0?" " : "[Debug]") ); + + if(info->settings->zoom) + { + veejay_msg(VEEJAY_MSG_INFO,"Software scaler - output stream dimensions %d x %d ", + info->video_output_width, info->video_output_height ); + } + else if(info->settings->composite ) + { + veejay_msg(VEEJAY_MSG_INFO, "Software composite - projection screen is %d x %d", + info->video_output_width, info->video_output_height ); + } + + + veejay_msg(VEEJAY_MSG_INFO,"Type 'man veejay' in a shell to learn more about veejay"); + veejay_msg(VEEJAY_MSG_INFO,"For a list of events, type 'veejay -u |less' in a shell"); + veejay_msg(VEEJAY_MSG_INFO,"Use 'reloaded' to enter interactive mode"); + veejay_msg(VEEJAY_MSG_INFO,"Alternatives are OSC applications or 'sendVIMS' extension for PD"); + + int k = verify_working_dir(); + if( k > 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING, + "Found %d veejay project files in current working directory (.edl,.sl, .cfg,.avi).",k); + veejay_msg(VEEJAY_MSG_WARNING, + "If you want to start a new project, start veejay in an empty directory"); + } +} + +static void *veejay_playback_thread(void *data) +{ + veejay_t *info = (veejay_t *) data; + int i; + + sigset_t mask; + struct sigaction act; + sigemptyset(&mask); + sigaddset( &mask, SIGPIPE ); + act.sa_handler = donothing2; + act.sa_flags = 0; + sigemptyset(&act.sa_mask); + + + pthread_sigmask( SIG_BLOCK, &mask, NULL ); + + + Welcome(info); + + veejay_playback_cycle(info); + + veejay_close(info); + + veejay_msg(VEEJAY_MSG_DEBUG,"Exiting playback thread"); + if(info->uc->is_server) { + for(i = 0; i < 4; i ++ ) + if(info->vjs[i]) vj_server_shutdown(info->vjs[i]); + } + if(info->osc) vj_osc_free(info->osc); + +#ifdef HAVE_SDL + for ( i = 0; i < MAX_SDL_OUT ; i ++ ) + if( info->sdl[i] ) + { +#ifndef X_DISPLAY_MISSING + if(info->sdl[i]->display) + x11_enable_screensaver( info->sdl[i]->display); +#endif + vj_sdl_free(info->sdl[i]); + free(info->sdl[i]); + } + + vj_sdl_quit(); +#endif +#ifdef HAVE_DIRECTFB + if( info->dfb ) + { + vj_dfb_free(info->dfb); + free(info->dfb); + } +#endif + vj_yuv4mpeg_free(info->output_stream); + free(info->output_stream); + + + if( info->video_out == 3 ) + { + vj_yuv_stream_stop_write(info->render_stream); + veejay_msg(VEEJAY_MSG_DEBUG, "Stopped rendering to [%s]", + info->stream_outname); + } +#ifdef HAVE_GL +#ifndef X_DISPLAY_MISSING + if( info->video_out == 4 ) + { + x11_enable_screensaver( x_get_display(info->gl) ); + x_display_close( info->gl ); + } +#endif +#endif +#ifdef HAVE_FREETYPE + vj_font_destroy( info->font ); + vj_font_destroy( info->osd ); +#endif + veejay_msg(VEEJAY_MSG_DEBUG,"Exiting playback thread"); + vj_perform_free(info); + + pthread_exit(NULL); + + return NULL; +} + +/* + port 3490 = command, 3491 = status + port 3492 = OSC + port 3493 = mcast frame sender (optional) + port 3494 = mcast command receiver (optional) + */ + +int vj_server_setup(veejay_t * info) +{ + if (info->uc->port == 0) + info->uc->port = VJ_PORT; + info->vjs[VEEJAY_PORT_CMD] = vj_server_alloc(info->uc->port, NULL, V_CMD); + if(!info->vjs[VEEJAY_PORT_CMD]) + return 0; + + info->vjs[VEEJAY_PORT_STA] = vj_server_alloc(info->uc->port, NULL, V_STATUS); + if(!info->vjs[VEEJAY_PORT_STA]) + return 0; + + //@ second VIMS control port + info->vjs[VEEJAY_PORT_DAT] = vj_server_alloc(info->uc->port + 5, NULL, V_CMD ); + if(!info->vjs[VEEJAY_PORT_DAT]) + return 0; + + info->vjs[VEEJAY_PORT_MAT] = NULL; + if( info->settings->use_vims_mcast ) + { + info->vjs[VEEJAY_PORT_MAT] = + vj_server_alloc(info->uc->port, info->settings->vims_group_name, V_CMD ); + if(!info->vjs[VEEJAY_PORT_MAT]) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Unable to initialize mcast sender"); + return 0; + } + else + veejay_msg(VEEJAY_MSG_INFO, "UDP multicast frame sender socket ready at port %d group %s", + info->uc->port, info->settings->vims_group_name ); + } + if(info->settings->use_mcast) + { + GoMultiCast( info->settings->group_name ); + } + info->osc = (void*) vj_osc_allocate(info->uc->port+4); + + if(!info->osc) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Unable to start OSC server at port %d", + info->uc->port + 4 ); + return 0; + } + + if( info->settings->use_mcast ) + veejay_msg(VEEJAY_MSG_INFO, "UDP multicast OSC channel ready at port %d (group '%s')", + info->uc->port + 4, info->settings->group_name ); + else + veejay_msg(VEEJAY_MSG_INFO, "UDP unicast OSC channel ready at port %d", + info->uc->port + 4 ); + + if(vj_osc_setup_addr_space(info->osc) == 0) + veejay_msg(VEEJAY_MSG_INFO, "Initialized OSC (http://www.cnmat.berkeley.edu/OpenSoundControl/)"); + + if (info->osc == NULL || info->vjs[VEEJAY_PORT_CMD] == NULL || info->vjs[VEEJAY_PORT_STA] == NULL) + { + veejay_msg(0, "Unable to setup basic network I/O. Abort"); + return 0; + } + info->uc->is_server = 1; + + return 1; +} + +/****************************************************** + * veejay_malloc() + * malloc the pointer and set default options + * + * return value: a pointer to an allocated veejay_t + ******************************************************/ +int prepare_cache_line(int perc, int n_slots) +{ + int total = 0; + char line[128]; + FILE *file = fopen( "/proc/meminfo","r"); + if(!file) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cant open proc, memory size cannot be determined"); + veejay_msg(VEEJAY_MSG_ERROR, "Cache disabled"); + return 1; + } + + fgets(line, 128, file ); + sscanf( line, "%*s %i", &total ); + fclose(file); +/* fgets( line,128, file ); + fgets( line,128, file ); + fclose( file ); + sscanf( line, "%*s %i %i %i %i", &total,&avail,&buffer,&cache ); +*/ + double p = (double) perc * 0.01; + int max_memory = (p * total); + if( n_slots <= 0) + n_slots = 1; + + int chunk_size = (max_memory <= 0 ? 0: max_memory / n_slots ); + + chunk_size_ = chunk_size; + n_cache_slots_ = n_slots; + + total_mem_mb_ = total / 1024; + if(chunk_size > 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "%d Kb total system RAM , Consuming up to %2.2f Mb", + total, (float)max_memory / 1024.0 ); + veejay_msg(VEEJAY_MSG_INFO, "Cache line size is %d Kb (%2.2f Mb) per sample", + chunk_size, (float) chunk_size/1024.0); + vj_el_init_chunk( chunk_size ); + } + else + veejay_msg(VEEJAY_MSG_INFO, "Memory cache disabled"); + + return 1; +} + +int smp_check() +{ + return get_nprocs(); +} + +veejay_t *veejay_malloc() +{ + + veejay_t *info; + int i; + + info = (veejay_t *) vj_calloc(sizeof(veejay_t)); + if (!info) + return NULL; + + info->settings = (video_playback_setup *) vj_calloc(sizeof(video_playback_setup)); + if (!(info->settings)) + return NULL; + veejay_memset( &(info->settings->action_scheduler), 0, sizeof(vj_schedule_t)); + veejay_memset( &(info->settings->viewport ), 0, sizeof(VJRectangle)); + + info->status_what = (char*) vj_calloc(sizeof(char) * MESSAGE_SIZE ); + info->status_msg = (char*) vj_calloc(sizeof(char) * MESSAGE_SIZE+5); + + info->uc = (user_control *) vj_calloc(sizeof(user_control)); + if (!(info->uc)) + return NULL; + + info->effect_frame1 = (VJFrame*) vj_calloc(sizeof(VJFrame)); + if(!info->effect_frame1) + return NULL; + + info->effect_frame2 = (VJFrame*) vj_calloc(sizeof(VJFrame)); + if(!info->effect_frame2) + return NULL; + + info->effect_frame_info = (VJFrameInfo*) vj_calloc(sizeof(VJFrameInfo)); + if(!info->effect_frame_info) + return NULL; + + info->effect_info = (vjp_kf*) vj_calloc(sizeof(vjp_kf)); + if(!info->effect_info) + return NULL; + + info->dummy = (dummy_t*) vj_calloc(sizeof(dummy_t)); + if(!info->dummy) + return NULL; + memset( info->dummy, 0, sizeof(dummy_t)); + + memset(&(info->settings->sws_templ), 0, sizeof(sws_template)); + + info->seq = (sequencer_t*) vj_calloc(sizeof( sequencer_t) ); + if(!info->seq) + return NULL; + + info->seq->samples = (int*) vj_calloc(sizeof(int) * MAX_SEQUENCES ); + + info->audio = AUDIO_PLAY; + info->continuous = 1; + info->sync_correction = 1; + info->sync_ins_frames = 1; + info->sync_skip_frames = 1; + info->double_factor = 1; + info->no_bezerk = 1; + info->nstreams = 1; + info->stream_outformat = -1; + info->rlinks = (int*) vj_calloc(sizeof(int) * 8 ); + info->settings->currently_processed_entry = -1; + info->settings->first_frame = 1; + info->settings->state = LAVPLAY_STATE_STOP; + info->uc->playback_mode = VJ_PLAYBACK_MODE_PLAIN; + info->uc->use_timer = 2; + info->uc->sample_key = 1; + info->uc->direction = 1; /* pause */ + info->uc->sample_start = 0; + info->uc->sample_end = 0; + info->net = 1; + for( i =0; i < 8 ; i ++ ) + info->rlinks[i] = -1; + + veejay_memset(info->action_file,0,256); + veejay_memset(info->stream_outname,0,256); + + for (i = 0; i < SAMPLE_MAX_PARAMETERS; i++) + info->effect_info->tmp[i] = 0; + +#ifdef HAVE_SDL + info->video_out = 0; +#else +#ifdef HAVE_DIRECTFB + info->video_out = 1; +#else + info->video_out = 3; + sprintf(info->stream_outname, "%s", "stdout"); +#endif +#endif + + +#ifdef HAVE_SDL + info->sdl = (vj_sdl**) vj_calloc(sizeof(vj_sdl*) * MAX_SDL_OUT ); +#endif + + info->pixel_format = FMT_422; //@default + info->settings->ncpu = smp_check(); + + yuv_init_lib(); + + if(!vj_avcodec_init( info->pixel_format, info->verbose )) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot initialize encoders!"); + return 0; + } + + + + return info; +} + + + + +/****************************************************** + * veejay_main() + * the whole video-playback cycle + * + * Basic setup: + * * this function initializes the devices, + * sets up the whole thing and then forks + * the main task and returns control to the + * main app. It can then start playing by + * setting playback speed and such. Stop + * by calling veejay_stop() + * + * return value: 1 on succes, 0 on error + ******************************************************/ + +int veejay_main(veejay_t * info) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + /* Flush the Linux File buffers to disk */ + sync(); + if(info->current_edit_list->has_audio && info->audio == AUDIO_PLAY) + { + info->audio_running = vj_perform_audio_start(info); + } + veejay_msg(VEEJAY_MSG_INFO, "Starting playback thread. Giving control to main app"); + + /* fork ourselves to return control to the main app */ + if (pthread_create(&(settings->playback_thread), NULL, + veejay_playback_thread, (void *) info)) { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to create thread"); + return -1; + } + + return 1; +} + + + +/*** Methods for simple video editing (cut/paste) ***/ + +/****************************************************** + * veejay_edit_copy() + * copy a number of frames into a buffer + * + * return value: 1 on succes, 0 on error + ******************************************************/ + +static void veejay_reset_el_buffer( veejay_t *info ) +{ + + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + if (settings->save_list) + free(settings->save_list); + + settings->save_list = NULL; + settings->save_list_len = 0; + +} + +int veejay_edit_copy(veejay_t * info, editlist *el, long start, long end) +{ + + if(el->is_empty) + { + veejay_msg(VEEJAY_MSG_ERROR, "No frames in EDL to copy"); + return 0; + } + + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + uint64_t k, i; + uint64_t n1 = (uint64_t) start; + uint64_t n2 = (uint64_t) end; + if (settings->save_list) + free(settings->save_list); + + settings->save_list = + (uint64_t *) vj_calloc((n2 - n1 + 1) * sizeof(uint64_t)); + + if (!settings->save_list) + { + veejay_change_state_save(info, LAVPLAY_STATE_STOP); + return 0; + } + + k = 0; + + for (i = n1; i <= n2; i++) + settings->save_list[k++] = el->frame_list[i]; + + settings->save_list_len = k; + + veejay_msg(VEEJAY_MSG_DEBUG, "Copied frames %d - %d to buffer (of size %d)",n1,n2,k ); + + return 1; +} +editlist *veejay_edit_copy_to_new(veejay_t * info, editlist *el, long start, long end) +{ + if( el->is_empty) + { + veejay_msg(VEEJAY_MSG_ERROR, "EDL is empty"); + return NULL; + } + + uint64_t k, i; + uint64_t n1 = (uint64_t) start; + uint64_t n2 = (uint64_t) end; + + long len = end - start + 1; + + if( n2 >= el->video_frames) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample end is outside of editlist"); + return NULL; + } + + if(len <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample too short"); + return NULL; + } + + /* Copy edl */ + editlist *new_el = vj_el_soft_clone( el ); + + if(!new_el) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot soft clone EDL"); + return NULL; + } + + /* copy edl frames */ + new_el->frame_list = (uint64_t *) vj_malloc( sizeof(uint64_t) * len ); + + if (!new_el->frame_list) + { + veejay_msg(0, "Out of memory, unable to allocate editlist of %ld bytes", len); + veejay_change_state_save(info, LAVPLAY_STATE_STOP); + return NULL; + } + + k = 0; + + +//veejay_msg(0, "start of framelist: %p, end = %p", &(el->frame_list[n1]), &(el->frame_list[n2+1]) ); +//veejay_msg(0, "memcpy %p, %p", el->frame_list + n1, el->frame_list + n1 + len ); + veejay_memcpy( new_el->frame_list , el->frame_list + n1, sizeof(uint64_t) * len ); + new_el->video_frames = len; + new_el->total_frames = len - 1; +// for (i = n1; i <= n2; i++) +// new_el->frame_list[k++] = el->frame_list[i]; + +// new_el->video_frames = k; + return new_el; +} + +/****************************************************** + * veejay_edit_delete() + * delete a number of frames from the current movie + * + * return value: 1 on succes, 0 on error + ******************************************************/ + +int veejay_edit_delete(veejay_t * info, editlist *el, long start, long end) +{ + if(el->is_empty) + { + veejay_msg(VEEJAY_MSG_ERROR, "Nothing in EDL to delete"); + return 0; + } + + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + + uint64_t i; + uint64_t n1 = (uint64_t) start; + uint64_t n2 = (uint64_t) end; + + if(info->dummy->active) + { + veejay_msg(VEEJAY_MSG_ERROR, "Playing dummy video!"); + return 0; + } + + if (n2 < n1 || n1 > el->total_frames || n2 > el->total_frames ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Incorrect parameters for deleting frames"); + return 0; + } + + for (i = n2 + 1; i < el->video_frames; i++) + el->frame_list[i - (n2 - n1 + 1)] = el->frame_list[i]; + + if (n1 - 1 < settings->min_frame_num) + { + if (n2 < settings->min_frame_num) + settings->min_frame_num -= (n2 - n1 + 1); + else + settings->min_frame_num = n1; + } + + if (n1 - 1 < settings->max_frame_num) + { + if (n2 <= settings->max_frame_num) + settings->max_frame_num -= (n2 - n1 + 1); + else + settings->max_frame_num = n1 - 1; + } + + if (n1 <= settings->current_frame_num) { + + if (settings->current_frame_num <= n2) + { + settings->current_frame_num = n1; + } + else + { + settings->current_frame_num -= (n2 - n1 + 1); + } + } + + el->video_frames -= (n2 - n1 + 1); + el->total_frames = el->video_frames - 1; + return 1; +} + + + + +/****************************************************** + * veejay_edit_cut() + * cut a number of frames into a buffer + * + * return value: 1 on succes, 0 on error + ******************************************************/ + +int veejay_edit_cut(veejay_t * info, editlist *el, long start, long end) +{ + if( el->is_empty ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Nothing to cut in EDL"); + return 0; + } + if (!veejay_edit_copy(info, el,start, end)) + return 0; + if (!veejay_edit_delete(info, el,start, end)) + return 0; + + return 1; +} + + +/****************************************************** + * veejay_edit_paste() + * paste frames from the buffer into a certain position + * + * return value: 1 on succes, 0 on error + ******************************************************/ + +int veejay_edit_paste(veejay_t * info, editlist *el, long destination) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + uint64_t i, k; + + if (!settings->save_list_len || !settings->save_list) + { + veejay_msg(VEEJAY_MSG_ERROR, + "No frames in the buffer to paste"); + return 0; + } + + if(el->is_empty) + { + destination = 0; + } + else + { + if (destination < 0 || destination > el->total_frames) + { + if(destination < 0) + veejay_msg(VEEJAY_MSG_ERROR, + "Destination cannot be negative"); + if(destination > el->total_frames) + veejay_msg(VEEJAY_MSG_ERROR, "Cannot paste beyond Edit List!"); + return 0; + } + } + + el->frame_list = (uint64_t*)realloc(el->frame_list, + ((el->is_empty ? 0 :el->video_frames) + + settings->save_list_len) * + sizeof(uint64_t)); + if (!el->frame_list) + { + veejay_change_state_save(info, LAVPLAY_STATE_STOP); + return 0; + } + + k = (uint64_t)settings->save_list_len; + for (i = el->total_frames; i >= destination && i > 0; i--) + el->frame_list[i + k] = el->frame_list[i]; + k = destination; + for (i = 0; i < settings->save_list_len; i++) + { + if (k <= settings->min_frame_num) + settings->min_frame_num++; + if (k < settings->max_frame_num) + settings->max_frame_num++; + + el->frame_list[k] = settings->save_list[i]; + k++; + } + el->video_frames += settings->save_list_len; + el->total_frames = el->video_frames - 1; + if(el->is_empty) + el->is_empty = 0; + veejay_increase_frame(info, 0); + + + veejay_msg(VEEJAY_MSG_DEBUG, + "Pasted %lld frames from buffer into position %ld in movie", + settings->save_list_len, destination ); + return 1; +} + + +/****************************************************** + * veejay_edit_move() + * move a number of frames to a different position + * + * return value: 1 on succes, 0 on error + ******************************************************/ + +int veejay_edit_move(veejay_t * info,editlist *el, long start, long end, + long destination) +{ + long dest_real; + if( el->is_empty ) + return 0; + + if (destination > el->total_frames || destination < 0 + || start < 0 || end < 0 || start >= el->video_frames + || end > el->total_frames || end < start) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid parameters for moving video from %ld - %ld to position %ld", + start,end,destination); + veejay_msg(VEEJAY_MSG_ERROR, "Range is 0 - %ld", el->total_frames); + return 0; + } + + if (destination < start) + dest_real = destination; + else if (destination > end) + dest_real = destination - (end - start + 1); + else + dest_real = start; + + if (!veejay_edit_cut(info, el, start, end)) + return 0; + + if (!veejay_edit_paste(info, el,dest_real)) + return 0; + + + return 1; +} + + +/****************************************************** + * veejay_edit_addmovie() + * add a number of frames from a new movie to a + * certain position in the current movie + * + * return value: 1 on succes, 0 on error + ******************************************************/ + +int veejay_edit_addmovie_sample(veejay_t * info, char *movie, int id ) +{ + char *files[1]; + + files[0] = strdup(movie); + sample_info *sample = NULL; + editlist *sample_edl = NULL; + // if sample exists, get it for update + if(sample_exists(id) ) + sample = sample_get(id); + + // if sample exists, it could have a edit list */ + if( sample ) + { + if( !sample_usable_edl( id ) ) + { + veejay_msg(0, "Sample %d has no EDL (its a picture!)", id ); + return -1; + } + + sample_edl = sample_get_editlist( id ); + } + + // if both, append it to sample's edit list + if(sample_edl && sample) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Adding video file to existing sample %d", id ); + if(veejay_edit_addmovie_sample( info, movie, id)) + return 0; + return -1; + } + + // create initial edit list for sample (is currently playing) + if(!sample_edl) + sample_edl = vj_el_init_with_args( files,1,info->preserve_pathnames,info->auto_deinterlace,0, + info->edit_list->video_norm , info->pixel_format); + // if that fails, bye + if(!sample_edl) + { + veejay_msg(0, "Error while creating EDL"); + return -1; + } + // the editlist dimensions must match (there's more) + if( sample_edl->video_width != info->edit_list->video_width || + sample_edl->video_height != info->edit_list->video_height ) + { + if(sample_edl) + vj_el_free(sample_edl); + veejay_msg(0, "Frame dimensions do not match. Abort"); + return -1; + } + + // the sample is not there yet,create it + if(!sample) + { + sample = sample_skeleton_new( 0, sample_edl->total_frames ); + if(sample) + { + sample->edit_list = sample_edl; + sample_store(sample); + // sample_set_editlist( sample->sample_id , sample_edl ); + + veejay_msg(VEEJAY_MSG_INFO, + "Created new sample %d from file %s",sample->sample_id, + files[0]); + } + else + veejay_msg(VEEJAY_MSG_ERROR, + "Failed to create new sample from file '%s'", + files[0]); + + } + + // free temporary values + if(files[0]) free(files[0]); + + // return new id + return sample->sample_id; +} + +int veejay_edit_addmovie(veejay_t * info, editlist *el, char *movie, long start,long end ) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + uint64_t n, i; + uint64_t c = el->video_frames; + if( el->is_empty ) + c -= 2; + + int res = open_video_file(movie, el, info->preserve_pathnames, info->auto_deinterlace,1, + info->edit_list->video_norm ); + + if (res < 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"Error adding file '%s' to EDL", movie ); + return 0; + } + + end = el->video_frames; + + el->frame_list = (uint64_t *) realloc(el->frame_list, (end + el->num_frames[n])*sizeof(uint64_t)); + if (el->frame_list==NULL) + { + veejay_msg(VEEJAY_MSG_ERROR, "Insufficient memory to allocate frame_list"); + vj_el_free(el); + return 0; + } + + for (i = 0; i < el->num_frames[n]; i++) + { + el->frame_list[c] = EL_ENTRY(n, i); + c++; + } + + el->video_frames = c; + el->total_frames = el->video_frames - 1; + settings->max_frame_num = el->total_frames; + settings->min_frame_num = 0; + + return 1; +} + + + +/****************************************************** + * veejay_toggle_audio() + * mutes or unmutes audio (1 = on, 0 = off) + * + * return value: 1 on succes, 0 on error + ******************************************************/ + + +int veejay_toggle_audio(veejay_t * info, int audio) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + editlist *el = info->current_edit_list; + + if( !(el->has_audio) ) { + veejay_msg(VEEJAY_MSG_WARNING, + "Audio playback has not been enabled"); + info->audio = 0; + return 0; + } + + settings->audio_mute = !settings->audio_mute; + + veejay_msg(VEEJAY_MSG_DEBUG, + "Audio playback was %s", audio == 0 ? "muted" : "unmuted"); + + + return 1; +} + + + +/*** Methods for saving the currently played movie to editlists or open new movies */ + +/****************************************************** + * veejay_save_selection() + * save a certain range of frames to an editlist + * + * return value: 1 on succes, 0 on error + ******************************************************/ + + +/****************************************************** + * veejay_save_all() + * save the whole current movie to an editlist + * + * return value: 1 on succes, 0 on error + ******************************************************/ +int veejay_save_all(veejay_t * info, char *filename, long n1, long n2) +{ + if( info->edit_list->num_video_files <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "EditList has no contents!"); + return 0; + } + if(n1 == 0 && n2 == 0 ) + n2 = info->edit_list->total_frames; + if( vj_el_write_editlist( filename, n1,n2, info->edit_list ) ) + veejay_msg(VEEJAY_MSG_INFO, "Saved editlist to file [%s]", filename); + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Error while saving editlist!"); + return 0; + } + + return 1; +} + +/****************************************************** + * veejay_open() + * open a new (series of) movie + * + * return value: 1 on succes, 0 on error + ******************************************************/ +/****************************************************** + * veejay_open() + * open a new (series of) movie + * + * return value: 1 on succes, 0 on error + ******************************************************/ +// open_video_files is called BEFORE init +static int veejay_open_video_files(veejay_t *info, char **files, int num_files, int force , char override_norm) +{ + vj_el_frame_cache(info->seek_cache ); + + if(info->auto_deinterlace) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Auto deinterlacing (for playback on monitor / beamer with vga input"); + } + + if(num_files<=0 || files == NULL) + { + veejay_msg(VEEJAY_MSG_WARNING, "Fallback to dummy - no video files given at commandline"); + info->dummy->active = 1; + } + + + //TODO: pass yuv sampling to dummy + if( info->dummy->active ) + { + if( !info->dummy->norm ) + info->dummy->norm = 'p'; + if( !info->dummy->fps ) + info->dummy->fps = 25.0; + if( !info->dummy->width ) + info->dummy->width = 352; + if( !info->dummy->height) + info->dummy->height = 288; + if( info->pixel_format == FMT_420 || info->pixel_format == FMT_420F) + info->dummy->chroma = CHROMA420; + else + info->dummy->chroma = CHROMA422; + if( !info->dummy->arate) + info->dummy->arate = 48000; + + info->current_edit_list = vj_el_dummy( 0, info->auto_deinterlace, info->dummy->chroma, + info->dummy->norm, info->dummy->width, info->dummy->height, info->dummy->fps, + info->pixel_format ); + + if( info->dummy->arate ) + { + editlist *el = info->current_edit_list; + el->has_audio = 1; + el->audio_rate = info->dummy->arate; + el->audio_chans = 2; + el->audio_bits = 16; + el->audio_bps = 4; + veejay_msg(VEEJAY_MSG_DEBUG, "Dummy Audio: %f KHz, %d channels, %d bps, %d bit audio", + (float)el->audio_rate/1000.0,el->audio_chans,el->audio_bps,el->audio_bits); + } + } + else + { + info->current_edit_list = + vj_el_init_with_args( + files, + num_files, + info->preserve_pathnames, + info->auto_deinterlace, + force, + override_norm, + info->pixel_format); + } + info->edit_list = info->current_edit_list; + + if(info->edit_list==NULL) + { + return 0; + } + + info->effect_frame_info->width = info->current_edit_list->video_width; + info->effect_frame_info->height= info->current_edit_list->video_height; + + if(info->settings->output_fps > 0.0) + { + veejay_msg(VEEJAY_MSG_WARNING, "Overriding Framerate with %2.2f", + info->settings->output_fps); + info->current_edit_list->video_fps = info->settings->output_fps; + } + else + { + info->settings->output_fps = info->current_edit_list->video_fps; + } +// init tags , samples ? + + return 1; +} + +int veejay_open_files(veejay_t * info, char **files, int num_files, float ofps, int force,int force_pix_fmt, char override_norm) +{ + int ret = 0; + video_playback_setup *settings = + (video_playback_setup *) info->settings; + + if(force_pix_fmt >= 0) + info->pixel_format = force_pix_fmt; + + char text[24]; + + switch(info->pixel_format) { + case FMT_422: + sprintf(text, "4:2:2 [16-235][16-240]");break; + case FMT_422F: + sprintf(text, "4:2:2 [0-255]");break; + case FMT_420: + sprintf(text, "4:2:0 [16-235][16-240]");break; + case FMT_420F: + sprintf(text, "4:2:0 [0-255]");break; + default: + veejay_msg(VEEJAY_MSG_ERROR, "Unknown pixel format set"); + return 0; + } + + veejay_msg(VEEJAY_MSG_DEBUG, "Processing set to YUV %s", text ); + + vj_el_init( info->pixel_format ); + + /* override options */ + if(ofps<=0.0) + ofps = settings->output_fps; + + settings->output_fps = ofps; + + if(num_files == 0) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Trying to start without video"); + ret = veejay_open_video_files( info, NULL, 0 , force, + override_norm ); + } + else + { + ret = veejay_open_video_files( info, files, num_files, force, + override_norm ); + } + + return ret; +} + diff --git a/veejay-server/veejay/libveejay.h b/veejay-server/veejay/libveejay.h new file mode 100644 index 00000000..bdd163a9 --- /dev/null +++ b/veejay-server/veejay/libveejay.h @@ -0,0 +1,130 @@ + /* + * 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. + */ + +/* todo: cleanup. lots bad things. */ +#ifndef VJ_LIBLAVPLAY_H +#define VJ_LIBLAVPLAY_H +#include "vj-lib.h" + +void veejay_set_instance( veejay_t *info ); + +veejay_t *veejay_malloc(); + +void veejay_change_playback_mode(veejay_t *info, int pm, int sample); + +int veejay_free(veejay_t *info); + +void veejay_signal_loop(void *); + +int veejay_init_editlist(veejay_t * info); + +int veejay_init(veejay_t *info,int w, int h, char *arg, int td, int fr); + +int veejay_open(veejay_t *info); + +int veejay_open_files(veejay_t * info, char **files, int num_files, float fps, int force, int pixfmt, + char norm); + +int veejay_main(veejay_t * info); + +int veejay_stop(veejay_t *info); + +void veejay_quit(veejay_t *info); + +int veejay_dummy_open(veejay_t * info,int ofps, char *file, int pixfmt); + +int veejay_close(veejay_t *info); + +int get_total_mem(void); + +char *veejay_title( ); + +void veejay_stop_sampling(veejay_t *info); +void veejay_set_sample_f(veejay_t *info, int sample, int offset ); +void veejay_set_sample(veejay_t *info, int sample); + +int veejay_set_frame(veejay_t *info, long frame_num); + +void veejay_change_state(veejay_t *info, int new_state); + +int veejay_set_speed(veejay_t *info , int speed); + +void veejay_busy(veejay_t *info); + +int veejay_increase_frame(veejay_t * info, long numframes); + +void veejay_composite_transform_points( veejay_t *info, void *coords, int points, int blob_id, int cx, int cy,int w, int h, int num_objects,uint8_t *plane ); + +void veejay_composite_dummy( ); + +int veejay_composite_active( veejay_t *info ); + + +int veejay_create_tag(veejay_t * info, int type, char *filename, + int index, int palette, int channel); + +int veejay_set_framedup(veejay_t *info, int n); + +void veejay_set_framerate( veejay_t *info , float fps ); + +int veejay_get_state(veejay_t *info); + +int veejay_create_sample(veejay_t * info, long start, long end); + +int veejay_edit_copy(veejay_t *info, editlist *el, long start, long end); + +int veejay_edit_delete(veejay_t *info, editlist *el, long start, long end); + +int veejay_edit_cut(veejay_t * info, editlist *el, long start, long end); + +int veejay_edit_paste(veejay_t * info, editlist *el, long destination); + +int veejay_edit_move(veejay_t * info, editlist *el , long start, long end,long dest); + +int veejay_edit_addmovie(veejay_t * info, editlist *el, char *movie, long start, + long end); +int veejay_edit_addmovie_sample(veejay_t * info, char *movie , int new_s); + +int veejay_edit_set_playable(veejay_t * info, long start, long end); + +void veejay_set_sampling(veejay_t *info, subsample_mode_t m); + + +int veejay_toggle_audio(veejay_t * info, int audio); + +int veejay_save_selection(veejay_t * info, char *filename, long start,long end); + +int veejay_save_all(veejay_t * info, char *filename, long n1, long n2); + +int vj_server_setup(veejay_t *info); + +void veejay_default_tags(veejay_t *info); + +void veejay_loop_count(veejay_t *info); + +editlist *veejay_edit_copy_to_new(veejay_t * info, editlist *el, long start, long end); + +void veejay_change_state_save(veejay_t * info, int new_state); + +void veejay_handle_signal(void *arg, int sig); + +void veejay_check_homedir(void *arg); + +void veejay_auto_loop(veejay_t *info); + +int prepare_cache_line(int perc, int n_slots); + +#endif diff --git a/veejay-server/veejay/veejay.c b/veejay-server/veejay/veejay.c new file mode 100644 index 00000000..8ea8394b --- /dev/null +++ b/veejay-server/veejay/veejay.c @@ -0,0 +1,811 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#define VJ_PROMPT "$> " +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef X_DISPLAY_MISSING +#include +#endif +#include +#include +#include +#include +static int run_server = 1; +static veejay_t *info = NULL; +static float override_fps = 0.0; +static int default_geometry_x = -1; +static int default_geometry_y = -1; +static int force_video_file = 0; // unused +static int override_pix_fmt = 1; +static int full_range = 0; +static char override_norm = 'p'; +static int auto_loop = 0; +static int n_slots_ = 4; +static int max_mem_ = 30; +static int live =0; +static void CompiledWith() +{ + veejay_msg(VEEJAY_MSG_INFO,"Compilation flags:"); +#ifdef USE_GDK_PIXBUF + veejay_msg(VEEJAY_MSG_INFO,"\tUse GDK Pixbuf"); +#endif + veejay_msg(VEEJAY_MSG_INFO,"\tUse software scaler"); +#ifdef HAVE_JACK + veejay_msg(VEEJAY_MSG_INFO,"\tUsing Jack audio server"); +#endif + veejay_msg(VEEJAY_MSG_INFO,"\tUsing Video4linux"); +#ifdef SUPPORT_READ_DV2 + veejay_msg(VEEJAY_MSG_INFO,"\tSupport for Digital Video enabled"); +#endif +#ifdef HAVE_XML2 + veejay_msg(VEEJAY_MSG_INFO,"\tUsing XML library for Gnome"); +#endif +#ifdef SUPPORT_READ_DV2 + veejay_msg(VEEJAY_MSG_INFO,"\tSupport for Digital Video enabled"); +#endif +#ifdef HAVE_SDL + veejay_msg(VEEJAY_MSG_INFO,"\tUsing Simple Direct Media Layer"); +#endif +#ifdef HAVE_GL + veejay_msg( VEEJAY_MSG_INFO, "\tUsing openGL "); +#endif +#ifdef HAVE_DIRECTFB + veejay_msg(VEEJAY_MSG_INFO,"\tUsing DirectFB"); +#endif +#ifdef ARCH_X86_64 + veejay_msg(VEEJAY_MSG_INFO,"\tCompiled for x86-64 architecture"); +#endif +#ifdef HAVE_X86CPU + veejay_msg(VEEJAY_MSG_INFO,"\tCompiled for x86 architecture"); +#endif +#ifdef HAVE_PPCCPU + veejay_msg(VEEJAY_MSG_INFO,"\tCompiled for PPC architecture"); +#endif +#ifdef HAVE_ALTIVEC + veejay_msg(VEEJAY_MSG_INFO,"\tUsing Altivec"); +#endif +#ifdef HAVE_ASM_SSE + veejay_msg(VEEJAY_MSG_INFO,"\tUsing SSE instruction set"); +#endif +#ifdef HAVE_CMOV + veejay_msg(VEEJAY_MSG_INFO,"\tUsing CMOV"); +#endif +#ifdef HAVE_ASM_SSE2 + veejay_msg(VEEJAY_MSG_INFO,"\tUsing SSE2 instruction set"); +#endif +#ifdef HAVE_ASM_MMX + veejay_msg(VEEJAY_MSG_INFO,"\tUsing MMX instruction set"); +#endif +#ifdef HAVE_ASM_MMX2 + veejay_msg(VEEJAY_MSG_INFO,"\tUsing MMX2 instruction set"); +#endif +#ifdef HAVE_ASM_3DNOW + veejay_msg(VEEJAY_MSG_INFO,"\tUsing 3Dnow instruction set"); +#endif + exit(0); +} + +static void Usage(char *progname) +{ + fprintf(stderr, "This is Veejay %s\n\n", VERSION); + fprintf(stderr, "Usage: %s [options] [ ...]\n", + progname); + fprintf(stderr, "where options are:\n\n"); + + fprintf(stderr, + " -p/--portoffset\t\tTCP port to accept/send messages (default: 3490)\n"); + fprintf(stderr, + " -t/--timer num\t\tspecify timer to use (none:0,normal:2,rtc:1) default is 1\n"); + + fprintf(stderr, + " -O/--output [012345]\t\tOutput video\n"); +#ifdef HAVE_SDL + fprintf(stderr, + "\t\t\t\t0 = SDL (default)\t\n"); +#endif +#ifdef HAVE_DIRECTFB + fprintf(stderr, + "\t\t\t\t1 = DirectDB\t\n"); +#ifdef HAVE_SDL + fprintf(stderr, + "\t\t\t\t2 = SDL and DirectDB secondary head (TV-Out) clone mode\n"); +#endif +#endif + fprintf(stderr, + "\t\t\t\t3 = YUV4MPEG stream (use with -o/--outstream )\n"); +#ifdef HAVE_GL + fprintf(stderr, + "\t\t\t\t4 = OpenGL (requires openGL extension ARB fragment program)\n"); +#endif + fprintf(stderr, + "\t\t\t\t5 = Head less (no video output)\n"); + + fprintf(stderr, + " -o/--outstream \twhere to write the yuv4mpeg stream (use with -O3)\n"); + fprintf(stderr, + " -c/--synchronization [01]\tSync correction off/on (default on)\n"); + fprintf(stderr, + " -f/--fps num\t\t\tOverride default frame rate (default: read from first loaded file)\n"); + fprintf(stderr, + " -P/--preserve-pathnames\tDo not 'canonicalise' pathnames in edit lists\n"); + fprintf(stderr, + " -a/--audio [01]\t\tEnable (1) or disable (0) audio (default 1)\n"); +#ifdef HAVE_SDL + fprintf(stderr, + " -s/--size NxN\t\t\twidth X height for SDL video window\n"); +#endif +#ifdef HAVE_XINERAMA +#ifndef X_DISPLAY_MISSING +#ifdef HAVE_GL + fprintf(stderr, + " -X/--xinerama N\t\tSelect Xinerama screen [0-n] (Use with -O4)\n"); +#endif +#endif +#endif + fprintf(stderr, + " -l/--action-file \tLoad a sample list/action list file (none at default)\n"); + fprintf(stderr, + " -u/--dump-events \t\tDump event information to screen\n"); + fprintf(stderr, + " -I/--deinterlace\t\tDeinterlace video if it is interlaced\n"); + fprintf(stderr, + " -x/--geometryx \t\tTop left x offset for SDL video window\n"); + fprintf(stderr, + " -y/--geometryy \t\tTop left y offset for SDL video window\n"); + fprintf(stderr, + " -F/--features \t\tList of compiled features\n"); + fprintf(stderr, + " -v/--verbose \t\tEnable debugging output (default off)\n"); + fprintf(stderr, + " -b/--bezerk \t\tBezerk (default off) \n"); + fprintf(stderr, + " -L/--auto-loop \t\tStart with default sample\n"); + fprintf(stderr, + " -g/--clip-as-sample\t\tLoad every video clip as a new sample\n"); + fprintf(stderr, + " -n/--no-color \t\tDont use colored text\n"); + fprintf(stderr, + " -r/--audiorate\t\tDummy audio rate\n"); + fprintf(stderr, + " -m/--memory \t\tMaximum memory to use for cache (0=disable, default=30 max=100)\n"); + fprintf(stderr, + " -j/--max_cache \t\tDivide cache memory over N samples (default=4)\n"); + fprintf(stderr, + " -Y/--yuv [0123]\t\tForce pixel format if you get a corrupted image. Load one videofile only.\n"); + fprintf(stderr, + "\t\t\t\t 0 = YUV 4:2:0 Planar\n"); + fprintf(stderr, + "\t\t\t\t 1 = YUV 4:2:2 Planar (default)\n"); + fprintf(stderr, + "\t\t\t\t 2 = YUV 4:2:0 Planar full range\n"); + fprintf(stderr, + "\t\t\t\t 3 = YUV 4:2:2 Planar full range\n"); + fprintf(stderr, + " -d/--dummy \t\tDummy playback\n"); + fprintf(stderr, + " -W/--width \t\tdummy width\n"); + fprintf(stderr, + " -H/--height \t\tdummy height\n"); + + fprintf(stderr, + " -N/--norm [0=PAL, 1=NTSC (defaults to PAL)]\n"); + fprintf(stderr, + " -R/--framerate \t\tdummy frame rate\n"); + fprintf(stderr, + " -M/--multicast-osc \t\tmulticast OSC\n"); + fprintf(stderr, + " -T/--multicast-vims \t\tmulticast VIMS\n"); + fprintf(stderr, + " --map-from-file \tmap N frames to memory\n"); + fprintf(stderr, + " -z/--zoom [1-11]\t\tScale output video\n"); + fprintf(stderr, + "\t\t\t\tsoftware scaler type (also use -w/--zoomwidth, -h/--zoomheight ). \n"); + fprintf(stderr, + "\t\t\t\available types are:\n"); + fprintf(stderr, + "\t\t\t\t1\tFast bilinear (default)\n"); + fprintf(stderr, + "\t\t\t\t2\tBilinear\n"); + fprintf(stderr, + "\t\t\t\t3\tBicubic (good quality)\n"); + fprintf(stderr, + "\t\t\t\t4\tExperimental\n"); + fprintf(stderr, + "\t\t\t\t5\tNearest Neighbor (bad quality)\n"); + fprintf(stderr, + "\t\t\t\t6\tArea\n"); + fprintf(stderr, + "\t\t\t\t7\tLuma bi cubic / chroma bilinear\n"); + fprintf(stderr, + "\t\t\t\t9\tGauss\n"); + fprintf(stderr, + "\t\t\t\t9\tsincR\n"); + fprintf(stderr, + "\t\t\t\t10\tLanczos\n"); + fprintf(stderr, + "\t\t\t\t11\tNatural bi cubic spline\n"); + fprintf(stderr, + "\n\t\t\t\tsoftware scaler options:\n"); + fprintf(stderr, + "\t\t\t\t--lgb=<0-100>\tGaussian blur filter (luma)\n"); + fprintf(stderr, + "\t\t\t\t--cgb=<0-100>\tGuassian blur filter (chroma)\n"); + fprintf(stderr, + "\t\t\t\t--ls=<0-100>\tSharpen filter (luma)\n"); + fprintf(stderr, + "\t\t\t\t--cs=<0-100>\tSharpen filter (chroma)\n"); + fprintf(stderr, + "\t\t\t\t--chs=\tChroma horizontal shifting\n"); + fprintf(stderr, + "\t\t\t\t--cvs=\tChroma vertical shifting\n"); + fprintf(stderr, + "\t\t\t\t-w/--zoomwidth \n"); + fprintf(stderr, + "\t\t\t\t-h/--zoomheight \n"); + fprintf(stderr, + "\t\t\t\t-C/--zoomcrop [top:bottom:left:right] (crop source before scaling)\n"); + fprintf(stderr, + " -D/--composite \t\tProjection screen setup\n"); +#ifdef HAVE_UNICAP + fprintf(stderr, + " -A/--all [num] \t\tStart with all capture devices, start with device \n"); +#endif + fprintf(stderr," -q/--quit \t\t\tQuit at end of file\n"); + fprintf(stderr,"\n\n"); +} + +#define OUT_OF_RANGE(val) ( val < 0 ? 1 : ( val > 100 ? 1 : 0) ) + +#define OUT_OF_RANGE_ERR(val) if(OUT_OF_RANGE(val)) { fprintf(stderr,"\tValue must be 0-100\n"); exit(1); } + +#define check_val(val,msg) {\ +char *v = strdup(val);\ +if(v==NULL){\ +fprintf(stderr, " Invalid argument given for %s\n",msg);\ +}\ +else\ +{\ +free(v);\ +}\ +} +static int set_option(const char *name, char *value) +{ + /* return 1 means error, return 0 means okay */ + int nerr = 0; + if (strcmp(name, "portoffset") == 0 || strcmp(name, "p") == 0) { + info->uc->port = atoi(optarg); + } else if (strcmp(name, "verbose") == 0 || strcmp(name, "v") == 0) { + info->verbose = 1; + } else if (strcmp(name, "no-color") == 0 || strcmp(name,"n") == 0) + { + veejay_set_colors(0); + } else if (strcmp(name, "audio") == 0 || strcmp(name, "a") == 0) { + info->audio = atoi(optarg); + } else if ( strcmp(name, "A" ) == 0 || strcmp(name, "capture-device" ) == 0 ) { + live = atoi(optarg); + } else if (strcmp(name, "bezerk") == 0 || strcmp(name, "b") == 0) { + info->no_bezerk = 0; + } else if (strcmp(name, "timer") == 0 || strcmp(name, "t") == 0) { + info->uc->use_timer = atoi(optarg); + if (info->uc->use_timer < 0 || info->uc->use_timer > 2) { + printf("Valid timers:\n\t0=none\n\t2=normal\n\t1=rtc\n"); + nerr++; + } + } else if (strcmp(name, "multicast-vims") == 0 || strcmp(name,"T")==0) + { + check_val(optarg, name); + info->settings->use_vims_mcast = 1; + info->settings->vims_group_name = strdup(optarg); + } + else if (strcmp(name, "multicast-osc") == 0 || strcmp(name, "M") == 0 ) + { + check_val(optarg,name); + info->settings->use_mcast = 1; + info->settings->group_name = strdup( optarg ); + } + else if (strcmp(name, "max_cache" )== 0 || strcmp(name, "j" ) == 0 ) + { + n_slots_ = atoi( optarg ); + if(n_slots_ < 0 ) n_slots_ = 0; else if (n_slots_ > 100) n_slots_ = 100; + } + else if (strcmp(name, "memory" ) == 0 || strcmp(name, "m" ) == 0) + { + max_mem_ = atoi(optarg); + if(max_mem_ < 0 ) max_mem_ = 0; else if (max_mem_ > 100) max_mem_ = 100; + } else if (strcmp(name, "synchronization") == 0 + || strcmp(name, "c") == 0) { + info->sync_correction = atoi(optarg); + } else if (strcmp(name, "version") == 0 ) + { printf("Veejay %s\n", VERSION); exit(0); + } else if (strcmp(name, "graphics-driver") == 0 + || strcmp(name, "G") == 0 + || strcmp(name, "output-driver") == 0 + || strcmp(name, "O") == 0) { + info->video_out = atoi(optarg); /* use SDL */ +#ifndef HAVE_GL + if(info->video_out==4) + { + fprintf(stderr, "OpenGL support not enabled at compile time\n"); + exit(-1); + } +#endif + } else if (strcmp(name, "F") == 0 || strcmp(name, "features")==0) { + CompiledWith(); + nerr++; + } else if (strcmp(name, "preserve-pathnames") == 0 + || strcmp(name, "P") == 0) { + info->preserve_pathnames = 1; + } else if (strcmp(name, "deinterlace") == 0 || strcmp(name, "I" )==0) { + info->auto_deinterlace = 1; + } else if (strcmp(name, "size") == 0 || strcmp(name, "s") == 0) { + if (sscanf(value, "%dx%d", &info->bes_width, &info->bes_height) != + 2) { + mjpeg_error("--size parameter requires NxN argument"); + nerr++; + } + } +#ifdef HAVE_XINERAMA +#ifndef X_DISPLAY_MISSING + else if (strcmp(name, "xinerama") == 0 || strcmp(name, "X") == 0 ) { + x11_user_select( atoi(optarg) ); + } +#endif +#endif + else if (strcmp(name, "outstream") == 0 || strcmp(name, "o") == 0) { + check_val(optarg,name); + snprintf(info->stream_outname,256,"%s", (char*) optarg); +#ifdef HAVE_XML2 + } else if (strcmp(name, "action-file")==0 || strcmp(name,"l")==0) { + check_val(optarg,name); + veejay_strncpy(info->action_file,(char*) optarg, strlen( (char*) optarg)); + info->load_action_file = 1; +#endif + } + else if(strcmp(name,"map-from-file") == 0 ) { + info->seek_cache = atoi(optarg); + } + else if (strcmp(name, "geometry-x") == 0 || strcmp(name, "x")==0) { + default_geometry_x = atoi(optarg); + } + else if (strcmp(name, "geometry-y") == 0 || strcmp(name,"y")==0) { + default_geometry_y = atoi(optarg); + } + else if(strcmp(name,"dump-events")==0 || strcmp(name,"u")==0) { + info->dump = 1; + } + else if(strcmp(name, "width") == 0 || strcmp(name, "W") == 0 ) { + info->dummy->width = atoi(optarg); + } + else if(strcmp(name, "height") == 0 || strcmp(name, "H") == 0 ) { + info->dummy->height = atoi(optarg); + } + else if(strcmp(name, "norm") == 0 || strcmp(name, "N") == 0 ) { + info->dummy->norm = optarg[0]; + if(info->dummy->norm == 1 ) + override_norm = 'n'; + } + else if(strcmp(name, "D") == 0 || strcmp(name, "composite") == 0) + { + info->settings->composite = 1; + } + else if(strcmp(name, "zoomwidth") == 0 || strcmp(name, "w") == 0) { + info->video_output_width = atoi(optarg); + } + else if(strcmp(name, "zoomheight") == 0 || strcmp(name, "h") == 0) { + info->video_output_height = atoi(optarg); + } + else if(strcmp(name, "audiorate") == 0 || strcmp(name, "r") == 0 ) + { + info->dummy->arate = atoi(optarg); + } + else if(strcmp(name, "framerate") == 0 || strcmp(name, "R" ) == 0 ) { + info->dummy->fps = atof(optarg); + } + else if (strcmp(name,"fps")==0 || strcmp(name, "f")==0) { + override_fps = atof(optarg); + } + else if(strcmp(name,"yuv")==0 || strcmp(name,"Y")==0) + { + override_pix_fmt = atoi(optarg); + if(override_pix_fmt > 1 ) + { + full_range = 1; + } + if( override_pix_fmt < 0 || override_pix_fmt > 3 ) + override_pix_fmt = 1; + } + else if( strcmp(name,"auto-loop")==0 || strcmp(name,"L") == 0) + { + auto_loop = 1; + } + else if (strcmp(name, "zoom") == 0 || strcmp(name, "z" ) == 0) + { + info->settings->zoom = atoi(optarg); + if(info->settings->zoom < 1 || info->settings->zoom > 11) + { + fprintf(stderr, "Use --zoom [1-11] or -z [1-11]\n"); + nerr++; + } + } + else if (strcmp(name, "lgb") == 0) + { + info->settings->sws_templ.lumaGBlur = (float)atof(optarg); + OUT_OF_RANGE_ERR( info->settings->sws_templ.lumaGBlur); + info->settings->sws_templ.use_filter = 1; + } + else if (strcmp(name, "cgb") == 0) + { + info->settings->sws_templ.chromaGBlur = (float)atof(optarg); + OUT_OF_RANGE_ERR( info->settings->sws_templ.chromaGBlur ); + info->settings->sws_templ.use_filter = 1; + + } + else if (strcmp(name, "ls") == 0) + { + info->settings->sws_templ.lumaSarpen = (float) atof(optarg); + OUT_OF_RANGE_ERR( info->settings->sws_templ.lumaSarpen); + info->settings->sws_templ.use_filter = 1; + + } + else if (strcmp(name, "cs") == 0) + { + info->settings->sws_templ.chromaSharpen = (float) atof(optarg); + OUT_OF_RANGE_ERR(info->settings->sws_templ.chromaSharpen); + info->settings->sws_templ.use_filter = 1; + + } + else if (strcmp(name, "chs") == 0) + { + info->settings->sws_templ.chromaHShift = (float) atof(optarg); + OUT_OF_RANGE_ERR(info->settings->sws_templ.chromaHShift ); + info->settings->sws_templ.use_filter = 1; + + } + else if (strcmp(name, "cvs") == 0) + { + info->settings->sws_templ.chromaVShift = (float) atof(optarg); + OUT_OF_RANGE_ERR(info->settings->sws_templ.chromaVShift ); + info->settings->sws_templ.use_filter = 1; + + } + else if (strcmp(name, "C") == 0 || strcmp(name, "zoomcrop") == 0 ) + { + if (sscanf(value, "%d:%d:%d:%d", &(info->settings->viewport.top), + &(info->settings->viewport.bottom), + &(info->settings->viewport.left), + &(info->settings->viewport.right)) < 4) + { + fprintf(stderr, "Crop requires top:bottom:left:right\n"); + nerr++; + } + info->settings->crop = 1; + } + else if (strcmp(name, "quit") == 0 || strcmp(name, "q") == 0 ) + { + info->continuous = 0; + } + else if (strcmp(name, "clip-as-sample") == 0 || strcmp(name, "g") == 0 ) + { + info->uc->file_as_sample = 1; + } + else if (strcmp(name, "dummy") == 0 || strcmp(name, "d" ) == 0 ) + { + info->dummy->active = 1; // enable DUMMY MODE + } + else + nerr++; /* unknown option - error */ + + return nerr; +} + +static int check_command_line_options(int argc, char *argv[]) +{ + int nerr, n, option_index = 0; + char option[2]; +#ifdef HAVE_GETOPT_LONG + /* getopt_long options */ + static struct option long_options[] = { + {"verbose", 0, 0, 0}, /* -v/--verbose */ + {"skip", 1, 0, 0}, /* -s/--skip */ + {"synchronization", 1, 0, 0}, /* -c/--synchronization */ + {"preserve-pathnames", 0, 0, 0}, /* -P/--preserve-pathnames */ + {"audio", 1, 0, 0}, /* -a/--audio num */ + {"size", 1, 0, 0}, /* -S/--size */ +#ifdef HAVE_XINERAMA +#ifndef X_DISPLAY_MISSING + {"xinerama",1,0,0}, /* -X/--Xinerama */ +#endif +#endif + {"graphics-driver", 1, 0, 0}, + {"timer", 1, 0, 0}, /* timer */ + {"dump-events",0,0,0}, + {"bezerk",0,0,0}, + {"outstream", 1, 0, 0}, + {"action-file",1,0,0}, + {"features",0,0,0}, + {"deinterlace",0,0,0}, + {"zoom",1,0,0}, + {"clip-as-sample",0,0,0}, + {"portoffset", 1, 0, 0}, + {"sample-mode",1,0,0}, + {"dummy",0,0,0}, + {"geometry-x",1,0,0}, + {"geometry-y",1,0,0}, + {"auto-loop",0,0,0}, + {"fps",1,0,0}, + {"no-color",0,0,0}, + {"version",0,0,0}, + {"width",1,0,0}, + {"height",1,0,0}, + {"zoomwidth", 1,0,0 }, + {"zoomheight", 1,0,0 }, + {"norm",1,0,0}, + {"framerate",1,0,0}, + {"audiorate",1,0,0}, + {"yuv",1,0,0}, + {"multicast-osc",1,0,0}, + {"multicast-vims",1,0,0}, + {"map-from-file",1,0,0}, + {"zoomcrop",1,0,0}, + {"lgb",1,0,0}, + {"cgb",1,0,0}, + {"ls",1,0,0}, + {"cs",1,0,0}, + {"chs",1,0,0}, + {"cvs",1,0,0}, + {"composite",0,0,0}, + {"quit",0,0,0}, + {"memory",1,0,0}, + {"max_cache",1,0,0}, + {"capture-device",1,0,0}, + {0, 0, 0, 0} + }; +#endif + if (argc < 2) { + Usage(argv[0]); + return 0; + } + +/* Get options */ + nerr = 0; +#ifdef HAVE_GETOPT_LONG + while ((n = + getopt_long(argc, argv, + "o:G:O:a:H:s:c:t:j:l:p:m:w:h:x:y:r:z:f:Y:A:N:H:W:R:M:C:T:nILFPVDugvdibjq", + long_options, &option_index)) != EOF) +#else + while ((n = + getopt(argc, argv, + "o:G:O:a:H:s:c:t:j:l:p:m:w:h:x:y:r:z:f:Y:A:N:H:W:R:M:C:T:nILFPVDugvdibjq" + )) != EOF) +#endif + { + switch (n) { +#ifdef HAVE_GETOPT_LONG + /* getopt_long values */ + case 0: + nerr += set_option(long_options[option_index].name, optarg); + break; +#endif + + /* These are the old getopt-values (non-long) */ + default: + sprintf(option, "%c", n); +#ifdef STRICT_CHECKING + { + int tmpn = set_option( option,optarg ); + if(tmpn) + veejay_msg(VEEJAY_MSG_ERROR, "Error setting option '%c'", option ); + nerr += tmpn; + } +#else + nerr += set_option(option, optarg); +#endif + break; + } + + } + if (optind > argc) + nerr++; + + if (nerr) + Usage(argv[0]); + + veejay_set_debug_level(info->verbose); + + if(info->video_out == 3) + { + veejay_silent(); + mjpeg_default_handler_verbosity( 0 ); + } + else + { + mjpeg_default_handler_verbosity( (info->verbose ? 1:0) ); + } + if(!info->dump) + { + if(veejay_open_files( + info, + argv + optind, + argc - optind, + override_fps, + force_video_file, + override_pix_fmt, + override_norm )<=0) + { + vj_el_show_formats(); + veejay_msg(VEEJAY_MSG_ERROR, "Unable to open video file(s), codec/format not supported)"); + nerr++; + } + } + + if(!nerr) + return 1; + return 0; +} + +static void print_license() +{ + veejay_msg(VEEJAY_MSG_INFO, + "Veejay -<|Classic|>- %s Copyright (C) Niels Elburg and others",VERSION); + veejay_msg(VEEJAY_MSG_INFO, + "This software is subject to the GNU GENERAL PUBLIC LICENSE"); + + veejay_msg(VEEJAY_MSG_INFO, + "Veejay comes with ABSOLUTELY NO WARRANTY; this is free software and"); + veejay_msg(VEEJAY_MSG_INFO, + "you are welcome to redistribute it under certain conditions."); + veejay_msg(VEEJAY_MSG_INFO, + "The license must be included in the (source) package (COPYING)"); +} + +static void donothing(int sig) +{ + veejay_msg(VEEJAY_MSG_INFO,"Received signal %x ",sig); + veejay_handle_signal( info, sig ); +} + +int main(int argc, char **argv) +{ + video_playback_setup *settings; + char *dont_use; + sigset_t allsignals; + struct sigaction action; + struct sched_param schp; + int i; + fflush(stdout); + vj_mem_init(); + vevo_strict_init(); + + info = veejay_malloc(); + if (!info) + return 1; + + settings = (video_playback_setup *) info->settings; + + if(!check_command_line_options(argc, argv)) + { + veejay_free(info); + return 0; + } + + if(info->dump) + { + veejay_set_colors(0); + vj_event_init(); + vj_effect_initialize(720,576,0); + vj_osc_allocate(VJ_PORT+2); + vj_event_dump(); + vj_effect_dump(); + veejay_free(info); + return 0; + } + + print_license(); + prepare_cache_line( max_mem_, n_slots_ ); + veejay_check_homedir( info ); + + sigemptyset(&(settings->signal_set)); + sigaddset(&(settings->signal_set), SIGINT); + sigaddset(&(settings->signal_set), SIGPIPE); + sigaddset(&(settings->signal_set), SIGILL); + sigaddset(&(settings->signal_set), SIGSEGV); + sigaddset(&(settings->signal_set), SIGFPE ); + sigaddset(&(settings->signal_set), SIGTERM ); + sigaddset(&(settings->signal_set), SIGABRT); + sigaddset(&(settings->signal_set), SIGPWR ); + sigaddset(&(settings->signal_set), SIGQUIT ); + + sigfillset( &allsignals ); + action.sa_handler = donothing; + action.sa_mask = allsignals; + action.sa_flags = SA_RESTART | SA_RESETHAND; + + signal( SIGPIPE, SIG_IGN ); + + for( i = 1; i < NSIG; i ++ ) + if( sigismember( &(settings->signal_set), i )) + sigaction( i, &action, 0 ); + + char *mem_func = get_memcpy_descr(); + if(mem_func) + { + veejay_msg(VEEJAY_MSG_INFO, "Using SIMD %s", mem_func); + free(mem_func); + } + + if(veejay_init( + info, + default_geometry_x, + default_geometry_y, + NULL, + live, + full_range ) < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot start Vveejay"); + return 0; + } + + if(auto_loop) + veejay_auto_loop(info); + + if(!veejay_main(info)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot start main playback cycle"); + return 1; + } + + + veejay_msg(VEEJAY_MSG_DEBUG, "Starting playback"); + + veejay_set_frame(info, 0); + veejay_set_speed(info, 1); + + int sig; + + while (veejay_get_state(info) != LAVPLAY_STATE_STOP) + { + usleep( 25000 ); + } + + veejay_quit(info); + veejay_busy(info); /* wait for all the nice goodies to shut down */ + veejay_free(info); + + veejay_msg(VEEJAY_MSG_INFO, "Thank you for using Veejay"); + + return 0; +} diff --git a/veejay-server/veejay/veejay.h b/veejay-server/veejay/veejay.h new file mode 100644 index 00000000..b4e3fb22 --- /dev/null +++ b/veejay-server/veejay/veejay.h @@ -0,0 +1,26 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg < elburg@hio.hen.nl> + * + * 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. + * + * + */ + + + +#define MIN_EFFECTS 1 +#define MAX_REALTIME_EFFECTS 10 diff --git a/veejay-server/veejay/vevo.h b/veejay-server/veejay/vevo.h new file mode 100644 index 00000000..b78c3169 --- /dev/null +++ b/veejay-server/veejay/vevo.h @@ -0,0 +1,54 @@ +/* veejay - Linux VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VEVO_H_INC +#define VEVO_H_INC + +#ifndef HAVE_LIVIDO_PORT_T +#define HAVE_LIVIDO_PORT_T +typedef struct livido_port_t void +#endif + +#include + +// rename functions +/* +#define vevo_port_free livido_port_free +#define vevo_port_new livido_port_new +#define vevo_property_set livido_property_set +#define vevo_property_get livido_property_get +#define vevo_property_element_size livido_property_element_size +#define vevo_property_num_elements livido_property_num_elements +#define vevo_property_atom_type livido_property_atom_type +#define vevo_list_properties livido_list_properties*/ + +void *vj_event_vevo_get_event_function( int id ); +char *vj_event_vevo_get_event_name( int id ); +char *vj_event_vevo_get_event_format( int id ); +int vj_event_vevo_get_num_args(int id); +int vj_event_vevo_get_flags( int id ); +int vj_event_vevo_get_vims_id( int id ); +void vj_init_vevo_events(void); +void vj_event_vevo_inline_fire_default( void *super, int vims_id, const char *format ); +void vj_event_vevo_inline_fire(void *super, int vims_id, const char *format, ... ); +char *vj_event_vevo_list_serialize(void); +void vj_event_vevo_dump(void); +char *vj_event_vevo_help_vims( int id, int n ); +int vj_event_vevo_get_default_value(int id, int p); +void vj_event_vevo_free(void); +#endif diff --git a/veejay-server/veejay/vims.h b/veejay-server/veejay/vims.h new file mode 100644 index 00000000..75f9212c --- /dev/null +++ b/veejay-server/veejay/vims.h @@ -0,0 +1,304 @@ +/* veejay - Linux VeeJay + * (C) 2002-2007 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#ifndef VIMS_H +#define VIMS_H + +enum { + VIMS_BUNDLE_START = 500, + VIMS_BUNDLE_END = 599, + VIMS_MAX = 602, +}; + +enum { + VIMS_FXLIST_INC = 1, + VIMS_FXLIST_DEC = 2, + VIMS_FXLIST_ADD = 3, + VIMS_PRINT_INFO = 4, + VIMS_PREVIEW_BW = 8, + VIMS_VIEWPORT = 9, + VIMS_FRONTBACK = 6, + VIMS_PROJECTION = 7, + VIMS_MACRO = 33, + VIMS_MACRO_SELECT = 34, + VIMS_RECVIEWPORT = 90, + VIMS_VIDEO_INFORMATION = 400, + VIMS_EFFECT_LIST = 401, + VIMS_EDITLIST_LIST = 402, + VIMS_BUNDLE_LIST = 403, + VIMS_STREAM_LIST = 405, + VIMS_STREAM_DEVICES = 406, + VIMS_SAMPLE_HISTORY_LIST = 407, + VIMS_SAMPLE_LIST = 408, + VIMS_STREAM_GET_V4L = 409, + VIMS_CHAIN_GET_ENTRY = 410, + VIMS_VIMS_LIST = 411, + VIMS_LOG = 412, + VIMS_SAMPLE_INFO = 413, + VIMS_SAMPLE_OPTIONS = 414, + VIMS_DEVICE_LIST = 415, + VIMS_FONT_LIST = 416, + VIMS_SRT_LIST = 417, + VIMS_SRT_INFO = 418, + VIMS_TRACK_LIST = 5, + VIMS_SEQUENCE_LIST = 419, + VIMS_KEYLIST = 420, + VIMS_SET_VOLUME = 300, + VIMS_FULLSCREEN = 301, + VIMS_SUSPEND = 254, + VIMS_QUIT = 600, + VIMS_CLOSE = 601, + VIMS_LOAD_PLUGIN = 310, + VIMS_UNLOAD_PLUGIN = 311, + VIMS_CMD_PLUGIN = 312, + VIMS_RECORD_DATAFORMAT = 302, + VIMS_SET_PLAIN_MODE = 303, + VIMS_INIT_GUI_SCREEN = 304, + VIMS_SWITCH_SAMPLE_STREAM = 305, + VIMS_AUDIO_ENABLE = 306, + VIMS_AUDIO_DISABLE = 307, + VIMS_SELECT_BANK = 308, + VIMS_SELECT_ID = 309, + VIMS_SAMPLE_RAND_START = 315, + VIMS_SAMPLE_RAND_STOP = 316, + VIMS_REC_AUTO_START = 320, + VIMS_REC_STOP = 321, + VIMS_REC_START = 322, + VIMS_EFFECT_SET_BG = 339, + VIMS_SAMPLE_MODE = 323, + VIMS_BEZERK = 324, + VIMS_DEBUG_LEVEL = 325, + VIMS_RESIZE_SDL_SCREEN = 326, + VIMS_SET_PLAY_MODE = 327, + VIMS_SET_MODE_AND_GO = 328, + VIMS_RGB_PARAMETER_TYPE = 329, + VIMS_SCREENSHOT = 330, + VIMS_NO_CACHING = 331, + VIMS_RGB24_IMAGE = 333, + VIMS_SYNC_CORRECTION = 334, + VIMS_FRAMERATE = 335, + VIMS_VIDEO_PLAY_FORWARD = 10, + VIMS_VIDEO_PLAY_BACKWARD = 11, + VIMS_VIDEO_PLAY_STOP = 12, + VIMS_VIDEO_SKIP_FRAME = 13, + VIMS_VIDEO_PREV_FRAME = 14, + VIMS_VIDEO_SKIP_SECOND = 15, + VIMS_VIDEO_PREV_SECOND = 16, + VIMS_VIDEO_GOTO_START = 17, + VIMS_VIDEO_GOTO_END = 18, + VIMS_VIDEO_SET_FRAME = 19, + VIMS_VIDEO_SET_SPEED = 20, + VIMS_VIDEO_SET_SLOW = 21, + VIMS_VIDEO_MCAST_START = 22, + VIMS_VIDEO_MCAST_STOP = 23, + VIMS_VIDEO_SET_SPEEDK = 24, + VIMS_EDITLIST_PASTE_AT = 50, + VIMS_EDITLIST_COPY = 51, + VIMS_EDITLIST_DEL = 52, + VIMS_EDITLIST_CROP = 53, + VIMS_EDITLIST_CUT = 54, + VIMS_EDITLIST_ADD = 55, + VIMS_EDITLIST_ADD_SAMPLE = 56, + VIMS_EDITLIST_SAVE = 58, + VIMS_EDITLIST_LOAD = 59, + VIMS_BUNDLE = 80, + VIMS_BUNDLE_DEL = 81, + VIMS_BUNDLE_ADD = 82, + VIMS_BUNDLE_ATTACH_KEY = 83, + VIMS_BUNDLE_FILE = 84, + VIMS_BUNDLE_SAVE = 85, + VIMS_BUNDLE_CAPTURE = 86, + VIMS_SET_SAMPLE_START = 150, + VIMS_SET_SAMPLE_END = 151, + VIMS_SAMPLE_NEW = 100, + VIMS_SAMPLE_SELECT = 101, + VIMS_SAMPLE_DEL = 120, + VIMS_SAMPLE_SET_LOOPTYPE = 102, + VIMS_SAMPLE_SET_DESCRIPTION = 103, + VIMS_SAMPLE_SET_SPEED = 104, + VIMS_SAMPLE_SET_START = 105, + VIMS_SAMPLE_SET_END = 106, + VIMS_SAMPLE_SET_DUP = 107, + VIMS_SAMPLE_SET_MARKER_START = 108, + VIMS_SAMPLE_SET_MARKER_END = 109, + VIMS_SAMPLE_SET_MARKER = 110, + VIMS_SAMPLE_CLEAR_MARKER = 111, + VIMS_SAMPLE_LOAD_SAMPLELIST = 125, + VIMS_SAMPLE_SAVE_SAMPLELIST = 126, + VIMS_SAMPLE_DEL_ALL = 121, + VIMS_SAMPLE_COPY = 127, + VIMS_SAMPLE_REC_START = 130, + VIMS_SAMPLE_REC_STOP = 131, + VIMS_SAMPLE_CHAIN_ENABLE = 112, + VIMS_SAMPLE_CHAIN_DISABLE = 113, + VIMS_SAMPLE_UPDATE = 143, + VIMS_SAMPLE_TOGGLE_LOOP = 144, + VIMS_SAMPLE_KF_STATUS = 145, + VIMS_SAMPLE_KF_GET = 146, + VIMS_SAMPLE_KF_RESET = 147, + VIMS_STREAM_COLOR = 202, + VIMS_STREAM_SELECT = 201, + VIMS_STREAM_ACTIVATE = 205, + VIMS_STREAM_DEACTIVATE = 206, + VIMS_STREAM_DELETE = 220, + VIMS_STREAM_NEW_V4L = 240, + VIMS_STREAM_NEW_DV1394 = 241, + VIMS_STREAM_NEW_COLOR = 242, + VIMS_STREAM_NEW_Y4M = 243, + VIMS_STREAM_NEW_UNICAST = 245, + VIMS_STREAM_NEW_MCAST = 246, + VIMS_STREAM_NEW_PICTURE = 247, + VIMS_STREAM_OFFLINE_REC_START = 228, + VIMS_STREAM_OFFLINE_REC_STOP = 229, + VIMS_STREAM_REC_START = 230, + VIMS_STREAM_REC_STOP = 231, + VIMS_STREAM_CHAIN_ENABLE = 212, + VIMS_STREAM_CHAIN_DISABLE = 213, + VIMS_STREAM_SET_DESCRIPTION = 203, + VIMS_STREAM_SET_BRIGHTNESS = 207, + VIMS_STREAM_SET_CONTRAST = 208, + VIMS_STREAM_SET_HUE = 209, + VIMS_STREAM_SET_COLOR = 210, + VIMS_STREAM_SET_WHITE = 211, + VIMS_STREAM_SET_SATURATION = 215, + VIMS_STREAM_SET_LENGTH = 212, + VIMS_SEQUENCE_STATUS = 340, + VIMS_SEQUENCE_ADD = 341, + VIMS_SEQUENCE_DEL = 342, + VIMS_PROJ_INC = 160, + VIMS_PROJ_DEC = 161, + VIMS_CHAIN_ENTRY_CHANNEL_INC = 350, + VIMS_CHAIN_ENTRY_CHANNEL_DEC = 351, + VIMS_CHAIN_TOGGLE_ALL = 352, + VIMS_CHAIN_ENABLE = 353, + VIMS_CHAIN_DISABLE = 354, + VIMS_CHAIN_CLEAR = 355, + VIMS_CHAIN_FADE_IN = 356, + VIMS_CHAIN_FADE_OUT = 357, + VIMS_CHAIN_LIST = 358, + VIMS_CHAIN_SET_ENTRY = 359, + VIMS_CHAIN_ENTRY_SET_EFFECT = 360, + VIMS_CHAIN_ENTRY_SET_PRESET = 361, + VIMS_CHAIN_ENTRY_SET_ARG_VAL = 362, + VIMS_CHAIN_ENTRY_SET_VIDEO_ON = 363, + VIMS_CHAIN_ENTRY_SET_VIDEO_OFF = 364, + VIMS_CHAIN_ENTRY_SET_DEFAULTS = 365, + VIMS_CHAIN_ENTRY_SET_CHANNEL = 366, + VIMS_CHAIN_ENTRY_SET_SOURCE = 367, + VIMS_CHAIN_ENTRY_SET_SOURCE_CHANNEL = 368, + VIMS_CHAIN_ENTRY_CLEAR = 369, + VIMS_CHAIN_MANUAL_FADE = 370, + VIMS_CHAIN_ENTRY_DOWN = 371, + VIMS_CHAIN_ENTRY_UP = 372, + VIMS_CHAIN_ENTRY_SOURCE_TOGGLE = 373, + VIMS_CHAIN_ENTRY_INC_ARG = 374, + VIMS_CHAIN_ENTRY_DEC_ARG = 375, + VIMS_CHAIN_TOGGLE = 376, + VIMS_CHAIN_ENTRY_SET_STATE = 377, + VIMS_ENTRY_CHANNEL_UP = 378, + VIMS_ENTRY_CHANNEL_DOWN = 379, + VIMS_ENTRY_VIDEO_TOGGLE = 380, + VIMS_ENTRY_SOURCE_TOGGLE = 381, + VIMS_OSD_EXTRA = 388, + VIMS_COPYRIGHT = 389, + VIMS_FONT_POS = 390, + VIMS_FONT_COL = 391, + VIMS_FONT_SIZE_FONT = 392, + VIMS_SRT_ADD = 393, + VIMS_SRT_DEL = 394, + VIMS_SRT_UPDATE = 395, + VIMS_SRT_SAVE = 396, + VIMS_SRT_LOAD = 397, + VIMS_SRT_SELECT = 398, + VIMS_OSD = 399, + VIMS_OUTPUT_Y4M_START = 40, + VIMS_OUTPUT_Y4M_STOP = 41, + VIMS_GET_FRAME = 42, + VIMS_VLOOPBACK_START = 45, + VIMS_VLOOPBACK_STOP = 46, +}; + + +enum { + VJ_PLAYBACK_MODE_PLAIN = 2, + VJ_PLAYBACK_MODE_SAMPLE = 0, + VJ_PLAYBACK_MODE_PATTERN = 3, + VJ_PLAYBACK_MODE_TAG = 1, + VJ_PLAYBACK_MODE_MEM = 4, +}; + +enum { + VJ_MAX_V4L_DEVICES = 2, + VJ_MAX_IN_STREAMS = 4, + VJ_MAX_OUT_STREAMS = 1, + VJ_MAX_VLOOPBACK_PIPES = 8, +}; + +/* request messages, global */ +#define MAX_SEQUENCES 100 +#define MAX_SPEED 12 +#define SAMPLE_MAX_EFFECTS 20 +#define PATTERN_MAX_TRACKS 3 +#define CELL_LENGTH 30 +#define ROW_SIZE (PATTERN_MAX_TRACKS * CELL_LENGTH) +#define PATTERN_DEFAULT_LENGTH (25*60) +#define EDIT_CUT 101 +#define EDIT_PASTE_AT 102 +#define EDIT_COPY 103 +#define EDIT_CROP 104 +#define EDIT_DEL 105 +#define MESSAGE_SIZE 1024 +#define EL_MIN_BUF (65535 * 4) +#define XMLTAG_BUNDLE_FILE "ACTIONFILE" +#define XMLTAG_EVENT_AS_KEY "BUNDLE" +#define SOCKETFRAMELEN (1024*4096) +#define FMT_420 0 +#define FMT_422 1 +#define FMT_420F 2 +#define FMT_422F 3 + +#define VEEJAY_PORT_CMD 0 +#define VEEJAY_PORT_STA 1 +#define VEEJAY_PORT_DAT 3 +#define VEEJAY_PORT_MAT 2 + +#define FMT_RGB24 2 +#define FMT_RGB32 1 + +#define MAX_EDIT_LIST_FILES 4096 + +#define VSOCK_S 0 +#define VSOCK_C 1 +#define V_STATUS 0 +#define V_CMD 1 +#define VMCAST_S 4 +#define VMCAST_C 5 + +enum +{ + VJ_CMD_PORT=0, + VJ_STA_PORT=1, + VJ_CMD_MCAST=3, + VJ_CMD_MCAST_IN=4, + VJ_MSG_PORT=5, + VJ_CMD_OSC=2, +}; + + +#endif diff --git a/veejay-server/veejay/vj-OSC.h b/veejay-server/veejay/vj-OSC.h new file mode 100644 index 00000000..b507ec58 --- /dev/null +++ b/veejay-server/veejay/vj-OSC.h @@ -0,0 +1,31 @@ +/* + * veejay - Linux VeeJay + * (C) 2003 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef VJ_OSC +#define VJ_OSC + + +int vj_osc_setup_addr_space(void *o); +int vj_osc_get_packet(void *o); +void vj_osc_free(void *o); +void vj_osc_dump(); +void* vj_osc_allocate(int port_id); + +#endif diff --git a/veejay-server/veejay/vj-bjack.h b/veejay-server/veejay/vj-bjack.h new file mode 100644 index 00000000..fc9e4e09 --- /dev/null +++ b/veejay-server/veejay/vj-bjack.h @@ -0,0 +1,34 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_BIOJACK_H +#define VJ_BIOJACK_H +int vj_jack_initialize(); +int vj_jack_init(int rate_hz, int channels, int bps); +int vj_jack_stop(); +int vj_jack_reset(); +int vj_jack_play(void *data, int len); +int vj_jack_pause(); +int vj_jack_resume(); +int vj_jack_rate(); +int vj_jack_get_space(); +long vj_jack_get_status(long int *sec, long int *usec); +int vj_jack_set_volume(int v); +int vj_jack_c_play(void *data, int len, int entry); + +#endif diff --git a/veejay-server/veejay/vj-composite.c b/veejay-server/veejay/vj-composite.c new file mode 100644 index 00000000..e39bc229 --- /dev/null +++ b/veejay-server/veejay/vj-composite.c @@ -0,0 +1,332 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg + * + * 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. + + this c file does a perspective transform on an input image in software. + + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include AVUTIL_INC +#include +#include +#ifdef STRICT_CHECKING +#include +#endif + +typedef struct +{ + int proj_width; + int proj_height; + int img_width; + int img_height; + int mode; + int focus; + uint8_t *proj_plane[3]; +// uint8_t *img_plane[3]; + uint8_t *large_plane[3]; //@slow + void *vp1; + void *sampler; + void *scaler; + int sample_mode; + int pf; + int blit; + uint8_t *ptr[3]; + int use_ptr; +} composite_t; + +//@ round to multiple of 8 +#define RUP8(num)(((num)+8)&~8) + + +void *composite_get_vp( void *data ) +{ + composite_t *c = (composite_t*) data; + return c->vp1; +} + +void *composite_init( int pw, int ph, int iw, int ih, const char *homedir, int sample_mode, int zoom_type, int pf ) +{ + composite_t *c = (composite_t*) vj_calloc(sizeof(composite_t)); + int vp1_enabled = 0; + int vp1_frontback = 0; + + c->sample_mode = sample_mode; + + c->mode = 0; + + c->proj_width = pw; + c->proj_height = ph; + c->img_width = iw; + c->img_height = ih; + + c->pf = pf; + + c->proj_plane[0] = (uint8_t*) vj_malloc( RUP8( pw * ph * 3) + RUP8(pw * 3)); + c->proj_plane[1] = c->proj_plane[0] + RUP8(pw * ph) + RUP8(pw); + c->proj_plane[2] = c->proj_plane[1] + RUP8(pw * ph) + RUP8(pw); + c->large_plane[0] = (uint8_t*) vj_malloc( RUP8(pw * ph * 3)+ RUP8(pw*3) ); + c->large_plane[1] = c->large_plane[0] + RUP8(pw * ph) + RUP8(pw); + c->large_plane[2] = c->large_plane[1] + RUP8(pw * ph) + RUP8(pw); + veejay_memset(c->large_plane[0], 0xff, pw*ph); + veejay_memset(c->large_plane[1], 128, pw*ph); + veejay_memset(c->large_plane[2], 128, pw*ph); + + c->vp1 = viewport_init( 0,0,pw,ph,pw, ph, homedir, &vp1_enabled, &vp1_frontback, 1); + + viewport_set_marker( c->vp1, 1 ); + + c->sampler = subsample_init( pw ); + + sws_template sws_templ; + veejay_memset(&sws_templ,0,sizeof(sws_template)); + sws_templ.flags = zoom_type; + + VJFrame *src = yuv_yuv_template( c->proj_plane[0],c->proj_plane[1],c->proj_plane[2], + iw,ih, PIX_FMT_YUV444P); + + VJFrame *dst = yuv_yuv_template( c->large_plane[0],c->large_plane[1],c->large_plane[2], + pw, ph, PIX_FMT_YUV444P ); + + c->scaler = yuv_init_swscaler( src, dst, &sws_templ, 0 ); + + free(dst); + free(src); + + veejay_msg(VEEJAY_MSG_INFO, "Configuring projection:"); + veejay_msg(VEEJAY_MSG_INFO, "\tSoftware scaler : %s", yuv_get_scaler_name(zoom_type) ); + veejay_msg(VEEJAY_MSG_INFO, "\tVideo resolution : %dx%d", iw,ih ); + veejay_msg(VEEJAY_MSG_INFO, "\tScreen resolution: %dx%d", pw,ph ); + veejay_msg(VEEJAY_MSG_INFO, "Usage:"); + veejay_msg(VEEJAY_MSG_INFO, "Press Middle-Mouse button to activate setup,"); + veejay_msg(VEEJAY_MSG_INFO, "Press CTRL+p to switch between projection and viewport focus"); + veejay_msg(VEEJAY_MSG_INFO, "Press CTRL+v to activate user viewport"); + + return (void*) c; +} + +void composite_destroy( void *compiz ) +{ + composite_t *c = (composite_t*) compiz; + if(c) + { + if(c->proj_plane[0]) free(c->proj_plane[0]); + if(c->large_plane[0]) free(c->large_plane[0]); +// if(c->img_plane[0]) free(c->img_plane[0]); + if(c->vp1) viewport_destroy( c->vp1 ); + if(c->scaler) yuv_free_swscaler( c->scaler ); + if(c->sampler) subsample_free(c->sampler); + free(c); + } + c = NULL; +} + +void composite_event( void *compiz, uint8_t *in[3], int mouse_x, int mouse_y, int mouse_button, int w_x, int w_y ) +{ + composite_t *c = (composite_t*) compiz; + viewport_external_mouse( c->vp1, c->large_plane, mouse_x, mouse_y, mouse_button, 1,w_x,w_y ); +} + +static inline void composite_fit_l( composite_t *c, VJFrame *img_data, uint8_t *planes[3] ) +{ + if(img_data->width == c->proj_width && img_data->height == c->proj_height ) + { //@ if sizes match, copy pointers + c->use_ptr = 1; + c->ptr[0] = planes[0]; + c->ptr[1] = planes[1]; + c->ptr[2] = planes[2]; + } + else + { + //@ software scaling + c->use_ptr = 0; + VJFrame *src1 = yuv_yuv_template( planes[0], planes[1], planes[2], + img_data->width, img_data->height, PIX_FMT_YUV444P ); + + VJFrame *dst1 = yuv_yuv_template( c->large_plane[0],c->large_plane[1], c->large_plane[2], + c->proj_width,c->proj_height, PIX_FMT_YUV444P ); + + yuv_convert_and_scale(c->scaler,src1,dst1 ); + free(src1); + free(dst1); + } +} + +static inline void composite_fit( composite_t *c, VJFrame *img_data, uint8_t *planes[3] ) +{ + if(img_data->width == c->proj_width && img_data->height == c->proj_height ) + { + c->use_ptr = 1; + c->ptr[0] = planes[0]; + c->ptr[1] = planes[1]; + c->ptr[2] = planes[2]; + } + else + { + c->use_ptr = 0; + VJFrame *src1 = yuv_yuv_template( planes[0], planes[1], planes[2], + img_data->width, img_data->height, PIX_FMT_YUV444P ); + + VJFrame *dst1 = yuv_yuv_template( c->proj_plane[0],c->proj_plane[1], c->proj_plane[2], + c->proj_width,c->proj_height, PIX_FMT_YUV444P ); + + yuv_convert_and_scale( c->scaler, src1, dst1 ); + free(src1); + free(dst1); + } +} + +static void composite_configure( composite_t *c,VJFrame *img_data, uint8_t *planes[3] ) +{ + composite_fit(c,img_data, planes ); + if( c->use_ptr ) + viewport_draw_interface_color(c->vp1, c->ptr ); + else + viewport_draw_interface_color( c->vp1, c->proj_plane ); +} +/* +static void composite_prerender( composite_t *c, VJFrame *img_data, uint8_t *planes[3]) +{ + VJFrame *src1 = yuv_yuv_template( planes[0], planes[1], planes[2], + img_data->width, img_data->height, PIX_FMT_YUV444P); + + VJFrame *dst1 = yuv_yuv_template( c->large_plane[0],c->large_plane[1], c->large_plane[2], + c->proj_width,c->proj_height, PIX_FMT_YUV444P); + + yuv_convert_and_scale( c->scaler, src1, dst1 ); + free(src1); + free(dst1); +} +*/ +void composite_process( void *compiz, uint8_t *img_dat[3], VJFrame *input, int use_vp, int focus ) +{ + composite_t *c = (composite_t*) compiz; + + if(!input->ssm) + { + chroma_supersample( c->sample_mode, c->sampler, img_dat, input->width, input->height ); + input->ssm = 1; + } + int proj_active = viewport_active(c->vp1 ); + + c->blit = 0; + + //@ If the current focus is VIEWPORT, pass trough + if( focus == 0 ) + { + composite_fit( c, input, img_dat ); + if(!c->use_ptr) + chroma_subsample( c->sample_mode, c->sampler, c->proj_plane, c->proj_width,c->proj_height ); + else + chroma_subsample( c->sample_mode, c->sampler, c->ptr, c->proj_width,c->proj_height); + input->ssm = 0; + return; + } + else + { + if( !proj_active ) //@ render projection to yuyv surface + { + composite_fit_l(c, input,img_dat ); + c->blit = 1; + input->ssm = 0; //@ blit subsamples data + } + else + { + if(use_vp) + { //@ dont show viewport data + composite_configure(c,input,input->data); + } + else + composite_configure(c, input, img_dat ); + + if(!c->use_ptr) + chroma_subsample( c->sample_mode, c->sampler, c->proj_plane, c->proj_width,c->proj_height ); + else + chroma_subsample( c->sample_mode, c->sampler, c->ptr, c->proj_width, c->proj_height ); + input->ssm = 0; + } + } +} +void composite_transform_points( void *compiz, void *coords, int n, int blob_id, int cx, int cy,int w, int h,int num_objects,uint8_t *plane ) +{ + composite_t *c = (composite_t*) compiz; + viewport_transform_coords( c->vp1, coords, n , blob_id,cx,cy,w,h,num_objects, plane); +} + +void composite_dummy( void *compiz ) +{ + if(!compiz) return; + composite_t *c = (composite_t*) compiz; + viewport_dummy_send( c->vp1 ); +} + +void composite_blit( void *compiz, uint8_t *yuyv ) +{ + composite_t *c = (composite_t*) compiz; + + if(c->use_ptr) + { + if(c->blit) + viewport_produce_full_img_yuyv(c->vp1,c->ptr,yuyv); + else + { + if(c->pf == FMT_420 || c->pf == FMT_420F ) + yuv420p_to_yuv422(c->ptr, yuyv, c->proj_width,c->proj_height ); + else + yuv422_to_yuyv(c->ptr,yuyv,c->proj_width,c->proj_height ); + } + } + else { + if(c->blit) + viewport_produce_full_img_yuyv( c->vp1, c->large_plane, yuyv); + else + { + if( c->pf == FMT_420 || c->pf == FMT_420F ) + yuv420p_to_yuv422( c->proj_plane, yuyv, c->proj_width,c->proj_height ); + else + yuv422_to_yuyv( c->proj_plane, yuyv, c->proj_width,c->proj_height ); + } + } +} + +void composite_get_blit_buffer( void *compiz, uint8_t *buf[3] ) +{ + composite_t *c = (composite_t*) compiz; + if(c->blit) + { + buf[0] = c->large_plane[0]; + buf[1] = c->large_plane[1]; + buf[2] = c->large_plane[2]; + } + else + { + buf[0] = c->proj_plane[0]; + buf[1] = c->proj_plane[1]; + buf[2] = c->proj_plane[2]; + } +} + diff --git a/veejay-server/veejay/vj-composite.h b/veejay-server/veejay/vj-composite.h new file mode 100644 index 00000000..de3fc4af --- /dev/null +++ b/veejay-server/veejay/vj-composite.h @@ -0,0 +1,32 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg + * + * 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. + */ +#ifndef COMPOSITEHVJ +#define COMPOSITEHVJ + +void *composite_init( int pw, int ph, int iw, int ih, const char *hd, int sample_mode, int zoom_type, int pixf ); +void composite_destroy( void *c ); +void composite_event( void *compiz, uint8_t *in[3], int mouse_x, int mouse_y, int mouse_button, int w, int h ); +void composite_process( void *compiz, uint8_t *in[3], VJFrame *input, int vp_active, int focus); +void composite_blit( void *compiz,uint8_t *yuyv ); +void composite_get_blit_buffer( void *compiz, uint8_t *buf[3] ); +void *composite_get_vp( void *data ); +void composite_transform_points( void *compiz, void *coords, int n, int blob_id, int cx, int cy, int w, int h,int num_objects,uint8_t *plane ); +void composite_dummy( void *compiz ); +#endif diff --git a/veejay-server/veejay/vj-dfb.c b/veejay-server/veejay/vj-dfb.c new file mode 100644 index 00000000..b08aebd4 --- /dev/null +++ b/veejay-server/veejay/vj-dfb.c @@ -0,0 +1,341 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +/* DirectFB support, this file is part of veejay + code inspired by mplayer and dfbtv + + */ + +#include +#include +#include +#include +#include +#ifdef HAVE_DIRECTFB +#include "vj-dfb.h" +void *vj_dfb_allocate(int width, int height, int norm) +{ + vj_dfb *dfb = (vj_dfb *) malloc(sizeof(vj_dfb)); + if (!dfb) + return NULL; + dfb->buffer = NULL; + dfb->screen_width = 0; + dfb->screen_height = 0; + dfb->screen_framebuffer = 0; + dfb->screen_pitch = 0; + sprintf(dfb->dev_name, "%s", "/dev/fb0"); + fprintf(stderr, "DirectFB: using [%s]\n", dfb->dev_name); + dfb->width = width; + dfb->height = height; + dfb->norm = norm; + dfb->stretch = 0; + return (void*)dfb; +} + +int vj_dfb_init(void *ptr) +{ + vj_dfb *framebuffer = (vj_dfb*) ptr; + DFBDisplayLayerConfig dlc; + DFBDisplayLayerConfigFlags failed; + DFBSurfaceDescription dsc; + int n; + + DirectFBInit(0, 0); + DirectFBSetOption("fbdev", framebuffer->dev_name); + DirectFBSetOption("no-cursor", ""); + DirectFBSetOption("bg-color", "00000000"); + DirectFBSetOption("matrox-crtc2", ""); + DirectFBSetOption("matrox-tv-standard", + framebuffer->norm ? "pal" : "ntsc"); + + fprintf(stderr, "DirectFB: PAL = %s\n", + framebuffer->norm ? "pal" : "ntsc"); + + framebuffer->bufs[0] = framebuffer->bufs[1] = framebuffer->bufs[2] = + NULL; + + DirectFBCreate(&framebuffer->d); + + framebuffer->d->GetDisplayLayer(framebuffer->d, 2, + &(framebuffer->crtc2)); + + if (!framebuffer->crtc2) { + fprintf(stderr, "Unable to initialize display layern"); + return -1; + } + + framebuffer->crtc2->SetCooperativeLevel(framebuffer->crtc2, + DLSCL_EXCLUSIVE); + + framebuffer->d->GetInputDevice(framebuffer->d, DIDID_KEYBOARD, + &(framebuffer->keyboard)); + + framebuffer->keyboard->CreateEventBuffer(framebuffer->keyboard, + &(framebuffer->buffer)); + + framebuffer->buffer->Reset(framebuffer->buffer); + + dlc.flags = DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE; + dlc.buffermode = DLBM_BACKVIDEO; + dlc.pixelformat = DSPF_I420; + + + dsc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; + dsc.width = framebuffer->width; + dsc.height = framebuffer->height; + dsc.pixelformat = dlc.pixelformat; + + if (framebuffer->d->CreateSurface(framebuffer->d, &dsc, + &framebuffer->frame) != DFB_OK) + return -1; + + if (framebuffer->crtc2->TestConfiguration(framebuffer->crtc2, + &dlc, &failed) != DFB_OK) { + fprintf(stderr, "TestConfiguration failed\n"); + return -1; + } + + framebuffer->crtc2->SetConfiguration(framebuffer->crtc2, &dlc); + + framebuffer->crtc2->GetSurface(framebuffer->crtc2, + &(framebuffer->c2frame) + ); + + framebuffer->c2frame->GetSize(framebuffer->c2frame, + &(framebuffer->screen_width), + &(framebuffer->screen_height) + ); + + fprintf(stderr, "DirectFB: Screen is %d x %d , Video is %d x %d\n", + framebuffer->screen_width, framebuffer->screen_height, + framebuffer->width, framebuffer->height); + + if (framebuffer->width != framebuffer->screen_width || + framebuffer->height != framebuffer->screen_height) { + framebuffer->stretch = 1; + } + + framebuffer->drect.x = + (framebuffer->screen_width - framebuffer->width) / 2; + framebuffer->drect.y = + (framebuffer->screen_height - framebuffer->height) / 2; + framebuffer->drect.w = framebuffer->width; + framebuffer->drect.h = framebuffer->height; + + framebuffer->c2frame->Clear(framebuffer->c2frame, 0, 0, 0, 0xff); + framebuffer->c2frame->Flip(framebuffer->c2frame, NULL, 0); + framebuffer->c2frame->Clear(framebuffer->c2frame, 0, 0, 0, 0xff); + + + framebuffer->c2frame->GetPixelFormat(framebuffer->c2frame, + &(framebuffer->frame_format) + ); + + framebuffer->frame->GetPixelFormat(framebuffer->frame, + &(framebuffer->frame_format) + ); + + fprintf(stderr, "DirectFB: Frame format = "); + switch (framebuffer->frame_format) { + case DSPF_I420: + fprintf(stderr, "I420\n"); + break; + default: + fprintf(stderr, "Wrong pixel format!\n"); + break; + } + + framebuffer->crtc2->SetOpacity(framebuffer->crtc2, 0xff); + + return 0; +} + +int vj_dfb_lock(void *ptr) +{ + vj_dfb *framebuffer = (vj_dfb*) ptr; + if (!framebuffer) + return -1; + framebuffer->c2frame->Lock(framebuffer->c2frame, + DSLF_WRITE, + &(framebuffer->screen_framebuffer), + &(framebuffer->screen_pitch) + ); + return 0; +} + +int vj_dfb_unlock(void *ptr) +{ + vj_dfb *framebuffer = (vj_dfb*) ptr; + if (!framebuffer) + return -1; + + framebuffer->c2frame->Unlock(framebuffer->c2frame); + return 0; +} + + +int vj_dfb_free(void *ptr) +{ + vj_dfb *framebuffer = (vj_dfb*)ptr; + if (!framebuffer) + return -1; + + if (framebuffer->buffer) { + framebuffer->buffer->Release(framebuffer->buffer); + } + if (framebuffer->keyboard) { + framebuffer->keyboard->Release(framebuffer->keyboard); + } + if (framebuffer->c2frame) { + framebuffer->c2frame->Release(framebuffer->c2frame); + } + if (framebuffer->crtc2) { + framebuffer->crtc2->Release(framebuffer->crtc2); + } + if (framebuffer->d) { + framebuffer->d->Release(framebuffer->d); + } + return 0; +} + + +void vj_dfb_wait_for_sync( void *ptr) +{ + vj_dfb *framebuffer = (vj_dfb*) ptr; + framebuffer->d->WaitForSync(framebuffer->d); +} + +int vj_dfb_get_pitch( void *ptr) +{ + vj_dfb *framebuffer = (vj_dfb*) ptr; + return (int) framebuffer->screen_pitch; +} + +uint8_t *vj_dfb_get_address(void *ptr) +{ + vj_dfb *framebuffer = (vj_dfb*) ptr; + return (uint8_t *) framebuffer->screen_framebuffer; +} + +int vj_dfb_get_output_field( void *ptr) +{ + vj_dfb *framebuffer = (vj_dfb*) ptr; + int fieldid; + framebuffer->crtc2->GetCurrentOutputField(framebuffer->crtc2, + &fieldid); + return fieldid; +} + +/* +int vj_dfb_update_yuv_overlay(void *ptr , uint8_t **frame) { + uint8_t *output; + vj_dfb *framebuffer = (vj_dfb*) ptr; + int pitch,i,p; + while(vj_dfb_get_output_field(framebuffer) != 0) { + fprintf(stderr, "resyncing...\n"); + vj_dfb_wait_for_sync(framebuffer); + } + + if(vj_dfb_lock(framebuffer)!=0) return -1; + + output = vj_dfb_get_address(framebuffer); + + pitch = vj_dfb_get_pitch(framebuffer); + + p = pitch; + if(p > framebuffer->width) p = framebuffer->width; + + for(i=0; i < framebuffer->height; i++) { + veejay_memcpy(output+i*pitch, frame[0]+i*framebuffer->width, p); + } + + output += pitch * framebuffer->height; + p = p / 2; + for(i=0; i < framebuffer->height/2; i++) { + veejay_memcpy(output+i*pitch/2, frame[1] + i * framebuffer->width/2, p); + } + + output += pitch * framebuffer->height/4; + for(i=0; i < framebuffer->height/2; i++) { + veejay_memcpy(output+i * pitch/2, frame[2] + i * framebuffer->width/2, p); + } + + if(vj_dfb_unlock(framebuffer)!=0) return -1; + + vj_dfb_wait_for_sync(framebuffer); + return 0; + +} +*/ + +int vj_dfb_update_yuv_overlay(void *ptr, uint8_t ** frame) +{ + vj_dfb *framebuffer = (vj_dfb*) ptr; + void *dst; + int i, p, pitch; + if (framebuffer->frame->Lock(framebuffer->frame, + DSLF_WRITE, &dst, &pitch) != DFB_OK) + return -1; + + p = pitch; + + if (p > framebuffer->width) + p = framebuffer->width; + + for (i = 0; i < framebuffer->height; i++) { + veejay_memcpy(dst + i * pitch, frame[0] + i * framebuffer->width, p); + } + + dst += pitch * framebuffer->height; + p = p / 2; + for (i = 0; i < framebuffer->height / 2; i++) { + veejay_memcpy(dst + i * pitch / 2, frame[1] + i * framebuffer->width / 2, + p); + } + + dst += pitch * framebuffer->height / 4; + for (i = 0; i < framebuffer->height / 2; i++) { + veejay_memcpy(dst + i * pitch / 2, frame[2] + i * framebuffer->width / 2, + p); + } + + framebuffer->frame->Unlock(framebuffer->frame); + + framebuffer->c2frame->SetBlittingFlags(framebuffer->c2frame, + DSBLIT_NOFX); + + if (framebuffer->stretch) { + framebuffer->c2frame->StretchBlit(framebuffer->c2frame, + framebuffer->frame, NULL, + //&(framebuffer->drect) + NULL); + } else { + framebuffer->c2frame->Blit(framebuffer->c2frame, + framebuffer->frame, + NULL, + framebuffer->drect.x, + framebuffer->drect.y); + + } + + framebuffer->c2frame->Flip(framebuffer->c2frame, NULL, + DSFLIP_WAITFORSYNC); + + return 0; +} +#endif diff --git a/veejay-server/veejay/vj-dfb.h b/veejay-server/veejay/vj-dfb.h new file mode 100644 index 00000000..e8127749 --- /dev/null +++ b/veejay-server/veejay/vj-dfb.h @@ -0,0 +1,71 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#ifndef VJ_DFB_H +#define VJ_DFB_H +#include + +#ifdef HAVE_DIRECTFB +#include +#include +#include + +typedef struct vj_dfb_t { + IDirectFB *d; + IDirectFBDisplayLayer *crtc2; + IDirectFBSurface *bufs[3]; + IDirectFBSurface *c2frame; + IDirectFBSurface *frame; + DFBRectangle drect; + DFBSurfacePixelFormat frame_format; + IDirectFBInputDevice *keyboard; + IDirectFBEventBuffer *buffer; + unsigned int screen_width; + unsigned int screen_height; + void *screen_framebuffer; + int screen_pitch; + int stretch; + int width; + int height; + char dev_name[100]; + int norm; +} vj_dfb; + +void *vj_dfb_allocate(int width, int height, int norm); + +int vj_dfb_init(void *dfb); + +int vj_dfb_lock(void *dfb); + +int vj_dfb_unlock(void * dfb); + +int vj_dfb_update_yuv_overlay(void * dfb, uint8_t ** yuv420); + +int vj_dfb_free(void * dfb); + +void vj_dfb_wait_for_sync(); + +int vj_dfb_get_pitch( void *dfb); + +int vj_dfb_update_yuv_overlay(void *dfb, uint8_t ** frame); + +uint8_t *vj_dfb_get_address(void *dfb ); + +int vj_dfb_get_output_field( void *dfb ); +#endif +#endif diff --git a/veejay-server/veejay/vj-event.c b/veejay-server/veejay/vj-event.c new file mode 100644 index 00000000..27dcfc7f --- /dev/null +++ b/veejay-server/veejay/vj-event.c @@ -0,0 +1,9450 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg + * + * 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 + */ + + +#include +#include +#include +#include +#include +#include +#ifdef HAVE_SDL +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_GL +#include +#endif +#ifdef USE_GDK_PIXBUF +#include +#endif +#include +#include +#include +#include +#include +#include +#include +/* Highest possible SDL Key identifier */ +#define MAX_SDL_KEY (3 * SDLK_LAST) + 1 +#define MSG_MIN_LEN 4 /* stripped ';' */ +#ifdef STRICT_CHECKING +#include +#endif +#ifdef HAVE_FREETYPE +#include +#endif + +static int use_bw_preview_ = 0; +static int _last_known_num_args = 0; +static hash_t *BundleHash = NULL; +static struct timeval time_last_; +static void *lzo_ = NULL; + +static int vj_event_valid_mode(int mode) { + switch(mode) { + case VJ_PLAYBACK_MODE_SAMPLE: + case VJ_PLAYBACK_MODE_TAG: + case VJ_PLAYBACK_MODE_PLAIN: + return 1; + } + + return 0; +} + +/* define the function pointer to any event */ +typedef void (*vj_event)(void *ptr, const char format[], va_list ap); + +void vj_event_create_effect_bundle(veejay_t * v,char *buf, int key_id, int key_mod ); + +/* struct for runtime initialization of event handlers */ +typedef struct { + int list_id; // VIMS id + vj_event act; // function pointer +} vj_events; + +static vj_events net_list[VIMS_MAX]; +static int override_keyboard = 0; +#ifdef HAVE_SDL +typedef struct +{ + vj_events *vims; + int key_symbol; + int key_mod; + int arg_len; + char *arguments; + int event_id; +} vj_keyboard_event; + +static hash_t *keyboard_events = NULL; + +static vj_keyboard_event *keyboard_event_map_[2048]; + +typedef struct +{ + int key_symbol; + int key_mod; + char *args; + int arg_len; + void *next; +} vims_key_list; + +#endif + +static int _recorder_format = ENCODER_MJPEG; +#ifdef USE_SWSCALER +static int preview_active_ = 0; +static VJFrame cached_cycle_[2]; +static sws_template preview_template; +static void *preview_scaler = NULL; +static int cached_width_ =0; +static int cached_height_ = 0; +#endif + +#define SEND_BUF 125000 +static char _print_buf[SEND_BUF]; +static char _s_print_buf[SEND_BUF]; + +static void *macro_bank_[12]; +static void *macro_port_ = NULL; +static int current_macro_ = 0; +static int macro_status_ = 0; +static int macro_key_ = 1; +static int macro_line_[3] = {-1 ,0,0}; +static int macro_current_age_ = 0; +static int macro_expected_age_ = 0; +#define MAX_MACROS 8 +typedef struct { + char *msg[MAX_MACROS]; + int pending[MAX_MACROS]; + int age[MAX_MACROS]; +} macro_block_t; + +int vj_event_macro_status(void) +{ + return macro_status_; +} + +static char *retrieve_macro_(veejay_t *v, long frame, int idx ); +static void store_macro_( veejay_t *v,char *str, long frame ); +static void reset_macro_(void); +static void replay_macro_(void); + +extern void veejay_pipe_write_status(veejay_t *info, int link_id ); +extern int _vj_server_del_client(vj_server * vje, int link_id); +extern int vj_event_exists( int id ); + +// forward decl +int vj_event_get_video_format(void) +{ + return _recorder_format; +} + +enum { + VJ_ERROR_NONE=0, + VJ_ERROR_MODE=1, + VJ_ERROR_EXISTS=2, + VJ_ERROR_VIMS=3, + VJ_ERROR_DIMEN=4, + VJ_ERROR_MEM=5, + VJ_ERROR_INVALID_MODE = 6, +}; + +#ifdef HAVE_SDL +#define VIMS_MOD_SHIFT 3 +#define VIMS_MOD_NONE 0 +#define VIMS_MOD_CTRL 2 +#define VIMS_MOD_ALT 1 + +static struct { /* hardcoded keyboard layout (the default keys) */ + int event_id; + int key_sym; + int key_mod; + const char *value; +} vj_event_default_sdl_keys[] = { + + { 0,0,0,NULL }, + { VIMS_EFFECT_SET_BG, SDLK_b, VIMS_MOD_ALT, NULL }, + { VIMS_VIDEO_PLAY_FORWARD, SDLK_KP6, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_PLAY_BACKWARD, SDLK_KP4, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_PLAY_STOP, SDLK_KP5, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_SKIP_FRAME, SDLK_KP9, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_PREV_FRAME, SDLK_KP7, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_SKIP_SECOND, SDLK_KP8, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_PREV_SECOND, SDLK_KP2, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_GOTO_START, SDLK_KP1, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_GOTO_END, SDLK_KP3, VIMS_MOD_NONE, NULL }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_a, VIMS_MOD_NONE, "1" }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_s, VIMS_MOD_NONE, "2" }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_d, VIMS_MOD_NONE, "3" }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_f, VIMS_MOD_NONE, "4" }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_g, VIMS_MOD_NONE, "5" }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_h, VIMS_MOD_NONE, "6" }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_j, VIMS_MOD_NONE, "7" }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_k, VIMS_MOD_NONE, "8" }, + { VIMS_VIDEO_SET_SPEEDK, SDLK_l, VIMS_MOD_NONE, "9" }, + { VIMS_VIDEO_SET_SLOW, SDLK_a, VIMS_MOD_ALT, "1" }, + { VIMS_VIDEO_SET_SLOW, SDLK_s, VIMS_MOD_ALT, "2" }, + { VIMS_VIDEO_SET_SLOW, SDLK_d, VIMS_MOD_ALT, "3" }, + { VIMS_VIDEO_SET_SLOW, SDLK_e, VIMS_MOD_ALT, "4" }, + { VIMS_VIDEO_SET_SLOW, SDLK_f, VIMS_MOD_ALT, "5" }, + { VIMS_VIDEO_SET_SLOW, SDLK_g, VIMS_MOD_ALT, "6" }, + { VIMS_VIDEO_SET_SLOW, SDLK_h, VIMS_MOD_ALT, "7" }, + { VIMS_VIDEO_SET_SLOW, SDLK_j, VIMS_MOD_ALT, "8" }, + { VIMS_VIDEO_SET_SLOW, SDLK_k, VIMS_MOD_ALT, "9" }, + { VIMS_VIDEO_SET_SLOW, SDLK_l, VIMS_MOD_ALT, "10" }, +#ifdef HAVE_SDL + { VIMS_FULLSCREEN, SDLK_f, VIMS_MOD_CTRL, NULL }, +#endif + { VIMS_CHAIN_ENTRY_DOWN, SDLK_KP_MINUS, VIMS_MOD_NONE, "1" }, + { VIMS_CHAIN_ENTRY_UP, SDLK_KP_PLUS, VIMS_MOD_NONE, "1" }, + { VIMS_CHAIN_ENTRY_CHANNEL_INC, SDLK_EQUALS, VIMS_MOD_NONE, NULL }, + { VIMS_CHAIN_ENTRY_CHANNEL_DEC, SDLK_MINUS, VIMS_MOD_NONE, NULL }, + { VIMS_CHAIN_ENTRY_SOURCE_TOGGLE, SDLK_SLASH, VIMS_MOD_NONE, NULL }, // stream/sample + { VIMS_CHAIN_ENTRY_INC_ARG, SDLK_PAGEUP, VIMS_MOD_NONE, "0 1" }, + { VIMS_CHAIN_ENTRY_INC_ARG, SDLK_KP_PERIOD, VIMS_MOD_NONE, "1 1" }, + { VIMS_CHAIN_ENTRY_INC_ARG, SDLK_PERIOD, VIMS_MOD_NONE, "2 1" }, + { VIMS_CHAIN_ENTRY_INC_ARG, SDLK_w, VIMS_MOD_NONE, "3 1" }, + { VIMS_CHAIN_ENTRY_INC_ARG, SDLK_r, VIMS_MOD_NONE, "4 1" }, + { VIMS_CHAIN_ENTRY_INC_ARG, SDLK_y, VIMS_MOD_NONE, "5 1" }, + { VIMS_CHAIN_ENTRY_INC_ARG, SDLK_i, VIMS_MOD_NONE, "6 1" }, + { VIMS_CHAIN_ENTRY_INC_ARG, SDLK_p, VIMS_MOD_NONE, "7 1" }, + { VIMS_CHAIN_ENTRY_DEC_ARG, SDLK_PAGEDOWN, VIMS_MOD_NONE, "0 -1" }, + { VIMS_CHAIN_ENTRY_DEC_ARG, SDLK_KP0, VIMS_MOD_NONE, "1 -1" }, + { VIMS_CHAIN_ENTRY_DEC_ARG, SDLK_COMMA, VIMS_MOD_NONE, "2 -1" }, + { VIMS_CHAIN_ENTRY_DEC_ARG, SDLK_q, VIMS_MOD_NONE, "3 -1" }, + { VIMS_CHAIN_ENTRY_DEC_ARG, SDLK_e, VIMS_MOD_NONE, "4 -1" }, + { VIMS_CHAIN_ENTRY_DEC_ARG, SDLK_t, VIMS_MOD_NONE, "5 -1" }, + { VIMS_CHAIN_ENTRY_DEC_ARG, SDLK_u, VIMS_MOD_NONE, "6 -1" }, + { VIMS_CHAIN_ENTRY_DEC_ARG, SDLK_o, VIMS_MOD_NONE, "7 -1" }, + { VIMS_OSD, SDLK_o, VIMS_MOD_CTRL, NULL }, + { VIMS_COPYRIGHT, SDLK_c, VIMS_MOD_CTRL, NULL }, + { VIMS_OSD_EXTRA, SDLK_h, VIMS_MOD_CTRL, NULL }, + { VIMS_VIEWPORT, SDLK_v, VIMS_MOD_CTRL, NULL }, + { VIMS_PROJECTION, SDLK_p, VIMS_MOD_CTRL, NULL }, + { VIMS_FRONTBACK, SDLK_b, VIMS_MOD_CTRL, NULL }, + { VIMS_SELECT_BANK, SDLK_1, VIMS_MOD_NONE, "1" }, + { VIMS_SELECT_BANK, SDLK_2, VIMS_MOD_NONE, "2" }, + { VIMS_SELECT_BANK, SDLK_3, VIMS_MOD_NONE, "3" }, + { VIMS_SELECT_BANK, SDLK_4, VIMS_MOD_NONE, "4" }, + { VIMS_SELECT_BANK, SDLK_5, VIMS_MOD_NONE, "5" }, + { VIMS_SELECT_BANK, SDLK_6, VIMS_MOD_NONE, "6" }, + { VIMS_SELECT_BANK, SDLK_7, VIMS_MOD_NONE, "7" }, + { VIMS_SELECT_BANK, SDLK_8, VIMS_MOD_NONE, "8" }, + { VIMS_SELECT_BANK, SDLK_9, VIMS_MOD_NONE, "9" }, + { VIMS_SELECT_ID, SDLK_F1, VIMS_MOD_NONE, "1" }, + { VIMS_SELECT_ID, SDLK_F2, VIMS_MOD_NONE, "2" }, + { VIMS_SELECT_ID, SDLK_F3, VIMS_MOD_NONE, "3" }, + { VIMS_SELECT_ID, SDLK_F4, VIMS_MOD_NONE, "4" }, + { VIMS_SELECT_ID, SDLK_F5, VIMS_MOD_NONE, "5" }, + { VIMS_SELECT_ID, SDLK_F6, VIMS_MOD_NONE, "6" }, + { VIMS_SELECT_ID, SDLK_F7, VIMS_MOD_NONE, "7" }, + { VIMS_SELECT_ID, SDLK_F8, VIMS_MOD_NONE, "8" }, + { VIMS_SELECT_ID, SDLK_F9, VIMS_MOD_NONE, "9" }, + { VIMS_SELECT_ID, SDLK_F10, VIMS_MOD_NONE, "10" }, + { VIMS_SELECT_ID, SDLK_F11, VIMS_MOD_NONE, "11" }, + { VIMS_SELECT_ID, SDLK_F12, VIMS_MOD_NONE, "12" }, + { VIMS_SET_PLAIN_MODE, SDLK_KP_DIVIDE, VIMS_MOD_NONE, NULL }, + { VIMS_REC_AUTO_START, SDLK_e, VIMS_MOD_CTRL, "100" }, + { VIMS_REC_STOP, SDLK_t, VIMS_MOD_CTRL, NULL }, + { VIMS_REC_START, SDLK_r, VIMS_MOD_CTRL, NULL }, + { VIMS_CHAIN_TOGGLE, SDLK_END, VIMS_MOD_NONE, NULL }, + { VIMS_CHAIN_ENTRY_SET_STATE, SDLK_END, VIMS_MOD_ALT, NULL }, + { VIMS_CHAIN_ENTRY_CLEAR, SDLK_DELETE, VIMS_MOD_NONE, NULL }, + { VIMS_FXLIST_INC, SDLK_UP, VIMS_MOD_NONE, "1" }, + { VIMS_FXLIST_DEC, SDLK_DOWN, VIMS_MOD_NONE, "1" }, + { VIMS_FXLIST_ADD, SDLK_RETURN, VIMS_MOD_NONE, NULL }, + { VIMS_SET_SAMPLE_START, SDLK_LEFTBRACKET, VIMS_MOD_NONE, NULL }, + { VIMS_SET_SAMPLE_END, SDLK_RIGHTBRACKET, VIMS_MOD_NONE, NULL }, + { VIMS_SAMPLE_SET_MARKER_START, SDLK_LEFTBRACKET, VIMS_MOD_ALT, NULL }, + { VIMS_SAMPLE_SET_MARKER_END, SDLK_RIGHTBRACKET, VIMS_MOD_ALT, NULL }, + { VIMS_SAMPLE_TOGGLE_LOOP, SDLK_KP_MULTIPLY, VIMS_MOD_NONE,NULL }, + { VIMS_SWITCH_SAMPLE_STREAM, SDLK_ESCAPE, VIMS_MOD_NONE, NULL }, + { VIMS_PRINT_INFO, SDLK_HOME, VIMS_MOD_NONE, NULL }, + { VIMS_SAMPLE_CLEAR_MARKER, SDLK_BACKSPACE, VIMS_MOD_NONE, NULL }, + { VIMS_MACRO, SDLK_SPACE, VIMS_MOD_NONE, "2 1" }, + { VIMS_MACRO, SDLK_SPACE, VIMS_MOD_SHIFT, "1 1" }, + { VIMS_MACRO, SDLK_SPACE, VIMS_MOD_CTRL, "0 0" }, + { VIMS_MACRO_SELECT, SDLK_F1, VIMS_MOD_CTRL, "0" }, + { VIMS_MACRO_SELECT, SDLK_F2, VIMS_MOD_CTRL, "1" }, + { VIMS_MACRO_SELECT, SDLK_F3, VIMS_MOD_CTRL, "2" }, + { VIMS_MACRO_SELECT, SDLK_F4, VIMS_MOD_CTRL, "3" }, + { VIMS_MACRO_SELECT, SDLK_F5, VIMS_MOD_CTRL, "4" }, + { VIMS_MACRO_SELECT, SDLK_F6, VIMS_MOD_CTRL, "5" }, + { VIMS_MACRO_SELECT, SDLK_F7, VIMS_MOD_CTRL, "6" }, + { VIMS_MACRO_SELECT, SDLK_F8, VIMS_MOD_CTRL, "7" }, + { VIMS_MACRO_SELECT, SDLK_F9, VIMS_MOD_CTRL, "8" }, + { VIMS_MACRO_SELECT, SDLK_F10, VIMS_MOD_CTRL, "9" }, + { VIMS_MACRO_SELECT, SDLK_F11, VIMS_MOD_CTRL, "10" }, + { VIMS_MACRO_SELECT, SDLK_F12, VIMS_MOD_CTRL, "11" }, + { VIMS_PROJ_INC, SDLK_LEFT, VIMS_MOD_NONE, NULL }, + { VIMS_PROJ_DEC, SDLK_RIGHT, VIMS_MOD_NONE, NULL }, + { 0,0,0,NULL }, +}; +#endif + +#define VIMS_REQUIRE_ALL_PARAMS (1<<0) /* all params needed */ +#define VIMS_DONT_PARSE_PARAMS (1<<1) /* dont parse arguments */ +#define VIMS_LONG_PARAMS (1<<3) /* long string arguments (bundle, plugin) */ +#define VIMS_ALLOW_ANY (1<<4) /* use defaults when optional arguments are not given */ + +#define FORMAT_MSG(dst,str) sprintf(dst,"%03d%s",strlen(str),str) +#define APPEND_MSG(dst,str) veejay_strncat(dst,str,strlen(str)) +#define SEND_MSG_DEBUG(v,str) \ +{\ +char *__buf = str;\ +int __len = strlen(str);\ +int __done = 0;\ +veejay_msg(VEEJAY_MSG_INFO, "--------------------------------------------------------");\ +for(__done = 0; __len > (__done + 80); __done += 80)\ +{\ + char *__tmp = strndup( str+__done, 80 );\ +veejay_msg(VEEJAY_MSG_INFO, "[%d][%s]",strlen(str),__tmp);\ + if(__tmp) free(__tmp);\ +}\ +veejay_msg(VEEJAY_MSG_INFO, "[%s]", str + __done );\ +vj_server_send(v->vjs[0], v->uc->current_link, __buf, strlen(__buf));\ +veejay_msg(VEEJAY_MSG_INFO, "--------------------------------------------------------");\ +} + +#define SEND_DATA(v,buf,buflen)\ +{\ + int res_ = vj_server_send(v->vjs[VEEJAY_PORT_CMD], v->uc->current_link, (uint8_t*) buf, buflen);\ + if(res_ <= 0) { \ + _vj_server_del_client( v->vjs[VEEJAY_PORT_CMD], v->uc->current_link); \ + _vj_server_del_client( v->vjs[VEEJAY_PORT_STA], v->uc->current_link); \ + return;\ + }\ +} + +#define SEND_MSG(v,str)\ +{\ +if(vj_server_send(v->vjs[VEEJAY_PORT_CMD], v->uc->current_link, (uint8_t*) str, strlen(str)) < 0) { \ + _vj_server_del_client( v->vjs[VEEJAY_PORT_CMD], v->uc->current_link); \ + _vj_server_del_client( v->vjs[VEEJAY_PORT_STA], v->uc->current_link);} \ +} + +/* some macros for commonly used checks */ + +#define SAMPLE_PLAYING(v) ( (v->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE) ) +#define STREAM_PLAYING(v) ( (v->uc->playback_mode == VJ_PLAYBACK_MODE_TAG) ) +#define PLAIN_PLAYING(v) ( (v->uc->playback_mode == VJ_PLAYBACK_MODE_PLAIN) ) + +#define p_no_sample(a) { veejay_msg(VEEJAY_MSG_ERROR, "Sample %d does not exist",a); } +#define p_no_tag(a) { veejay_msg(VEEJAY_MSG_ERROR, "Stream %d does not exist",a); } +#define p_invalid_mode() { veejay_msg(VEEJAY_MSG_DEBUG, "Invalid playback mode for this action"); } +#define v_chi(v) ( (v < 0 || v >= SAMPLE_MAX_EFFECTS ) ) + +#define P_A(a,b,c,d)\ +{\ +int __z = 0;\ +unsigned char *__tmpstr = NULL;\ +if(a!=NULL){\ +unsigned int __rp;\ +unsigned int __rplen = (sizeof(a) / sizeof(int) );\ +for(__rp = 0; __rp < __rplen; __rp++) a[__rp] = 0;\ +}\ +while(*c) { \ +if(__z > _last_known_num_args ) break; \ +switch(*c++) {\ + case 's':\ +__tmpstr = (char*)va_arg(d,char*);\ +if(__tmpstr != NULL) {\ + sprintf( b,"%s",__tmpstr);\ + }\ +__z++ ;\ + break;\ + case 'd': a[__z] = *( va_arg(d, int*)); __z++ ;\ + break; }\ + }\ +} + +/* P_A16: Parse 16 integer arguments. This macro is used in 1 function */ +#define P_A16(a,c,d)\ +{\ +int __z = 0;\ +while(*c) { \ +if(__z > 15 ) break; \ +switch(*c++) { case 'd': a[__z] = va_arg(d, int); __z++ ; break; }\ +}}\ + + +#define DUMP_ARG(a)\ +if(sizeof(a)>0){\ +int __l = sizeof(a)/sizeof(int);\ +int __i; for(__i=0; __i < __l; __i++) veejay_msg(VEEJAY_MSG_DEBUG,"[%02d]=[%06d], ",__i,a[__i]);}\ +else { veejay_msg(VEEJAY_MSG_DEBUG,"arg has size of 0x0");} + + +#define CLAMPVAL(a) { if(a<0)a=0; else if(a >255) a =255; } + + +static void init_vims_for_macro(); + +static void macro_select( int slot ) +{ + if( slot >= 0 && slot < 12 ) + { + macro_bank_[ current_macro_ ] = macro_port_; + current_macro_ = slot; + macro_port_ = macro_bank_[ current_macro_ ]; + if( !macro_port_ ) + { + if( macro_status_ == 1 ) + { + veejay_msg(VEEJAY_MSG_INFO, + "Continuing recording keystrokes in slot %d", current_macro_); + macro_bank_[ current_macro_ ] = + vpn(VEVO_ANONYMOUS_PORT ); + macro_port_ = macro_bank_[ current_macro_ ]; + } + else if (macro_status_ == 2 ) + { + veejay_msg(VEEJAY_MSG_INFO, + "No keystrokes found in slot %d", current_macro_); + } + } + macro_current_age_ = 0; + macro_expected_age_ = 0; + } +} + +static void replay_macro_(void) +{ + int i,k; + char **items; + + if(!macro_port_ ) + return; + + items = vevo_list_properties( macro_port_ ); + if(items) + { + int strokes = 0; + for(k = 0; items[k] != NULL ; k ++ ) + { + void *mb = NULL; + if( vevo_property_get( macro_port_, items[k],0,&mb ) == VEVO_NO_ERROR ) + { + macro_block_t *m = (macro_block_t*) mb; + for( i = 0; i < MAX_MACROS; i ++ ) + { + if(m->msg[i]) { m->pending[i] = 1; strokes ++; } + } + } + free(items[k]); + } + veejay_msg(VEEJAY_MSG_INFO, "Replay %d keystrokes in macro slot %d!", strokes, + current_macro_ ); + free(items); + } +} + +static void reset_macro_(void) +{ + int i,k; + char **items; + + if(!macro_port_ ) + return; + + items = vevo_list_properties( macro_port_ ); + if(items) + { + int strokes = 0; + for(k = 0; items[k] != NULL ; k ++ ) + { + void *mb = NULL; + if( vevo_property_get( macro_port_, items[k],0,&mb ) == VEVO_NO_ERROR ) + { + macro_block_t *m = (macro_block_t*) mb; + for( i = 0; i < MAX_MACROS; i ++ ) + if(m->msg[i]) { free(m->msg[i]); strokes ++; } + free(m); + } + free(items[k]); + } + veejay_msg(VEEJAY_MSG_INFO, "Cleared %d keystrokes from macro slot %d", + strokes, current_macro_ ); + free(items); + } + vevo_port_free(macro_port_); + macro_bank_[ current_macro_ ] = NULL; + macro_port_ = NULL; +} + +static char *retrieve_macro_(veejay_t *v, long frame, int idx ) +{ + void *mb = NULL; + char key[16]; + + int s = 0; + if( SAMPLE_PLAYING(v)) + s = sample_get_framedups( v->uc->sample_id ); + else if ( PLAIN_PLAYING(v)) + s = vj_perform_get_dups(); + + snprintf(key,16,"%08ld%02d", frame,s ); + + int error = vevo_property_get( macro_port_, key, 0, &mb ); + if( error == VEVO_NO_ERROR ) + { + if( idx == MAX_MACROS ) + return NULL; + + macro_block_t *m = (macro_block_t*) mb; + if( m->msg[idx ] && m->pending[idx] == 1 && m->age[idx] == macro_expected_age_) + { + m->pending[idx] = 0; + macro_expected_age_ ++; + return m->msg[idx]; + } + } + return NULL; +} + +static void store_macro_(veejay_t *v, char *str, long frame ) +{ + void *mb = NULL; + char key[16]; + int k; + int s = 0; + if( SAMPLE_PLAYING(v)) + s = sample_get_framedups( v->uc->sample_id ); + else if ( PLAIN_PLAYING(v)) + s = vj_perform_get_dups(); + + + snprintf(key,16,"%08ld%02d", frame,s ); + + int error = vevo_property_get( macro_port_, key, 0, &mb ); + if( error != VEVO_NO_ERROR ) + { // first element + macro_block_t *m = vj_calloc( sizeof(macro_block_t)); + m->msg[0] = strdup(str); + m->pending[0] = 1; + m->age[0] = macro_current_age_; + macro_current_age_++; + vevo_property_set( macro_port_, key, VEVO_ATOM_TYPE_VOIDPTR,1,&m ); + } + else + { + // following elements + macro_block_t *c = (macro_block_t*) mb; + for( k = 1; k < MAX_MACROS; k ++ ) + { + if(c->msg[k] == NULL ) + { + c->msg[k] = strdup(str); + c->pending[k] = 1; + c->age[k] = macro_current_age_; + macro_current_age_ ++; + return; + } + } + veejay_msg(VEEJAY_MSG_ERROR, "Slot for frame %ld is full (keystroke recorder)",frame ); + } + + veejay_msg(0, "key = %s, '%s' %ld", key,str,frame); + +} + + + +static hash_val_t int_bundle_hash(const void *key) +{ + return (hash_val_t) key; +} + +static int int_bundle_compare(const void *key1,const void *key2) +{ + return ((int)key1 < (int) key2 ? -1 : + ((int) key1 > (int) key2 ? +1 : 0)); +} + +typedef struct { + int event_id; + int accelerator; + int modifier; + char *bundle; +} vj_msg_bundle; + + +/* forward declarations (former console sample/tag print info) */ +#ifdef HAVE_SDL +vj_keyboard_event *new_keyboard_event( int symbol, int modifier, const char *value, int event_id ); +vj_keyboard_event *get_keyboard_event( int id ); +int keyboard_event_exists(int id); +int del_keyboard_event(int id ); +char *find_keyboard_default(int id); +#endif +void vj_event_print_plain_info(void *ptr, int x); +void vj_event_print_sample_info(veejay_t *v, int id); +void vj_event_print_tag_info(veejay_t *v, int id); +int vj_event_bundle_update( vj_msg_bundle *bundle, int bundle_id ); +vj_msg_bundle *vj_event_bundle_get(int event_id); +int vj_event_bundle_exists(int event_id); +int vj_event_suggest_bundle_id(void); +int vj_event_load_bundles(char *bundle_file); +int vj_event_bundle_store( vj_msg_bundle *m ); +int vj_event_bundle_del( int event_id ); +vj_msg_bundle *vj_event_bundle_new(char *bundle_msg, int event_id); +void vj_event_trigger_function(void *ptr, vj_event f, int max_args, const char format[], ...); +void vj_event_parse_bundle(veejay_t *v, char *msg ); +int vj_has_video(veejay_t *v); +void vj_event_fire_net_event(veejay_t *v, int net_id, char *str_arg, int *args, int arglen, int type); +void vj_event_commit_bundle( veejay_t *v, int key_num, int key_mod); +#ifdef HAVE_SDL +static vims_key_list * vj_event_get_keys( int event_id ); +int vj_event_single_fire(void *ptr , SDL_Event event, int pressed); +int vj_event_register_keyb_event(int event_id, int key_id, int key_mod, const char *args); +void vj_event_unregister_keyb_event(int key_id, int key_mod); +#endif + +#ifdef HAVE_XML2 +void vj_event_format_xml_event( xmlNodePtr node, int event_id ); +//void vj_event_format_xml_stream( xmlNodePtr node, int stream_id ); +#endif +void vj_event_init(void); + +int vj_has_video(veejay_t *v) +{ + if(v->current_edit_list->video_frames >= 1 && !v->current_edit_list->is_empty && v->current_edit_list->total_frames > 0) + return 1; + return 0; +} + +int vj_event_bundle_update( vj_msg_bundle *bundle, int bundle_id ) +{ + if(bundle) { + hnode_t *n = hnode_create(bundle); + if(!n) return 0; + hnode_put( n, (void*) bundle_id); + hnode_destroy(n); + return 1; + } + return 0; +} + +static void constrain_sample( veejay_t *v,int n, long lo, long hi ) +{ +#ifdef STRICT_CHECKING + assert( v->font != NULL ); +#endif + vj_font_set_constraints_and_dict( + v->font, + lo, + hi, + v->current_edit_list->video_fps, + sample_get_dict( n ) ); +} + +static void constrain_stream( veejay_t *v, int n, long hi ) +{ +#ifdef STRICT_CHECKING + assert(v->font != NULL ); +#endif + vj_font_set_constraints_and_dict( + v->font, + 0, + hi, + v->current_edit_list->video_fps, + vj_tag_get_dict( n ) ); +} + +vj_msg_bundle *vj_event_bundle_get(int event_id) +{ + vj_msg_bundle *m; + hnode_t *n = hash_lookup(BundleHash, (void*) event_id); + if(n) + { + m = (vj_msg_bundle*) hnode_get(n); + if(m) + { + return m; + } + } + return NULL; +} +#ifdef HAVE_SDL +void del_all_keyb_events() +{ + if(!keyboard_events) + return; + + if(!hash_isempty( keyboard_events )) + { + hscan_t scan; + hash_scan_begin( &scan, keyboard_events ); + hnode_t *node; + while( ( node = hash_scan_next(&scan)) != NULL ) + { + vj_keyboard_event *ev = NULL; + ev = hnode_get( node ); + if(ev) + { + if(ev->arguments) free(ev->arguments); + if(ev->vims) free(ev->vims); + } + } + hash_free_nodes( keyboard_events ); + hash_destroy( keyboard_events ); + } + + veejay_memset( keyboard_event_map_, 0, sizeof(keyboard_event_map_)); +} + +int del_keyboard_event(int id ) +{ + hnode_t *node; + vj_keyboard_event *ev = get_keyboard_event( id ); + + keyboard_event_map_[ id ] = NULL; + + if(ev == NULL) + return 0; + node = hash_lookup( keyboard_events, (void*) id ); + if(!node) + return 0; + if(ev->arguments) + free(ev->arguments); + if(ev->vims ) + free(ev->vims ); + hash_delete( keyboard_events, node ); + + return 1; +} + +vj_keyboard_event *get_keyboard_event(int id ) +{ + hnode_t *node = hash_lookup( keyboard_events, (void*) id ); + if(node) + return ((vj_keyboard_event*) hnode_get( node )); + return NULL; +} + +int keyboard_event_exists(int id) +{ + hnode_t *node = hash_lookup( keyboard_events, (void*) id ); + if(node) + if( hnode_get(node) != NULL ) + return 1; + return 0; +} + + +vj_keyboard_event *new_keyboard_event( + int symbol, int modifier, const char *value, int event_id ) +{ +// int vims_id = event_id; +/* if(vims_id == 0) + { + if(!vj_event_bundle_exists( event_id )) + { + veejay_msg(VEEJAY_MSG_ERROR, + "VIMS %d does not exist", event_id); + return NULL; + } + }*/ + + + if( event_id <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "VIMS event %d does not exist", event_id ); + return NULL; + } + + vj_keyboard_event *ev = (vj_keyboard_event*)vj_calloc(sizeof(vj_keyboard_event)); + if(!ev) + return NULL; + ev->vims = (vj_events*) vj_calloc(sizeof(vj_events)); + if(!ev->vims) + return NULL; + + ev->event_id = event_id; + + keyboard_event_map_ [ (modifier * SDLK_LAST) + symbol ] = ev; + + if(value) + { + ev->arg_len = strlen(value); + ev->arguments = strndup( value, ev->arg_len ); + } + else + { + if(event_id < VIMS_BUNDLE_START || event_id > VIMS_BUNDLE_END) + { + ev->arguments = find_keyboard_default( event_id ); + if(ev->arguments) + ev->arg_len = strlen(ev->arguments); + else + { + ev->arguments = NULL; + ev->arg_len = 0; + } + } + } + + if( vj_event_exists( event_id ) ) + { + ev->vims->act = (vj_event) vj_event_vevo_get_event_function( event_id ); + ev->vims->list_id = event_id; + } + else if ( vj_event_bundle_exists( event_id ) ) + { + ev->vims->act = vj_event_do_bundled_msg; + ev->vims->list_id = event_id; + } + ev->key_symbol = symbol; + ev->key_mod = modifier; + + return ev; +} +#endif + +int vj_event_bundle_exists(int event_id) +{ + hnode_t *n = hash_lookup( BundleHash, (void*) event_id ); + if(!n) + return 0; + return ( vj_event_bundle_get(event_id) == NULL ? 0 : 1); +} + +int vj_event_suggest_bundle_id(void) +{ + int i; + for(i=VIMS_BUNDLE_START ; i < VIMS_BUNDLE_END; i++) + { + if ( vj_event_bundle_exists(i ) == 0 ) return i; + } + + return -1; +} + +int vj_event_bundle_store( vj_msg_bundle *m ) +{ + hnode_t *n; + if(!m) return 0; + n = hnode_create(m); + if(!n) return 0; + if(!vj_event_bundle_exists(m->event_id)) + { + hash_insert( BundleHash, n, (void*) m->event_id); + } + else + { + hnode_put( n, (void*) m->event_id); + hnode_destroy( n ); + } + + // add bundle to VIMS list + veejay_msg(VEEJAY_MSG_DEBUG, + "Added Bundle VIMS %d to net_list", m->event_id ); + + net_list[ m->event_id ].list_id = m->event_id; + net_list[ m->event_id ].act = vj_event_none; + return 1; +} + +int vj_event_bundle_del( int event_id ) +{ + hnode_t *n; + vj_msg_bundle *m = vj_event_bundle_get( event_id ); + if(!m) return -1; + + n = hash_lookup( BundleHash, (void*) event_id ); + if(!n) + return -1; + + net_list[ m->event_id ].list_id = 0; + net_list[ m->event_id ].act = vj_event_none; + +#ifdef HAVE_SDL + vj_event_unregister_keyb_event( m->accelerator, m->modifier ); +#endif + if( m->bundle ) + free(m->bundle); + if(m) + free(m); + m = NULL; + + hash_delete( BundleHash, n ); + return 0; +} + +vj_msg_bundle *vj_event_bundle_new(char *bundle_msg, int event_id) +{ + vj_msg_bundle *m; + int len = 0; + if(!bundle_msg || strlen(bundle_msg) < 1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Doesn't make sense to store empty bundles in memory"); + return NULL; + } + len = strlen(bundle_msg); + m = (vj_msg_bundle*) malloc(sizeof(vj_msg_bundle)); + if(!m) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error allocating memory for bundled message"); + return NULL; + } + memset(m, 0, sizeof(m) ); + m->bundle = (char*) vj_calloc(sizeof(char) * len+1); + m->accelerator = 0; + m->modifier = 0; + if(!m->bundle) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error allocating memory for bundled message context"); + return NULL; + } + veejay_strncpy(m->bundle, bundle_msg, len); + + m->event_id = event_id; + + veejay_msg(VEEJAY_MSG_DEBUG, + "New VIMS Bundle %d [%s] created", + event_id, m->bundle ); + + return m; +} + + +void vj_event_trigger_function(void *ptr, vj_event f, int max_args, const char *format, ...) +{ + va_list ap; + va_start(ap,format); + f(ptr, format, ap); + va_end(ap); +} + + + +/* parse a keyframe packet */ +void vj_event_parse_kf( veejay_t *v, unsigned char *msg, int len ) +{ + if(SAMPLE_PLAYING(v)) + { + if(sample_chain_set_kfs( v->uc->sample_id, len, msg )==-1) + veejay_msg(VEEJAY_MSG_ERROR,"(VIMS) Invalid key frame blob [%s]",msg); + } + else if (STREAM_PLAYING(v)) + { + if(vj_tag_chain_set_kfs(v->uc->sample_id,len,msg ) == -1) + veejay_msg(VEEJAY_MSG_ERROR, "(VIMS) Invalid key frame blob [%s]",msg); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "(VIMS) Cannot store key frame in this playback mode"); + } +} + + +/* parse a message received from network */ +void vj_event_parse_bundle(veejay_t *v, char *msg ) +{ + + int num_msg = 0; + int offset = 3; + int i = 0; + + + if ( msg[offset] == ':' ) + { + int j = 0; + offset += 1; /* skip ':' */ + if( sscanf(msg+offset, "%03d", &num_msg )<= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR,"(VIMS) Invalid number of messages. Skipping message [%s] ",msg); + } + if ( num_msg <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR,"(VIMS) Invalid number of message given to execute. Skipping message [%s]",msg); + return; + } + + offset += 3; + + if ( msg[offset] != '{' ) + { + veejay_msg(VEEJAY_MSG_ERROR, "(VIMS) 'al' expected. Skipping message [%s]",msg); + return; + } + + offset+=1; /* skip # */ + + for( i = 1; i <= num_msg ; i ++ ) /* iterate through message bundle and invoke parse_msg */ + { + char atomic_msg[256]; + int found_end_of_msg = 0; + int total_msg_len = strlen(msg); + veejay_memset( atomic_msg,0,256 ); + while( (offset+j) < total_msg_len) + { + if(msg[offset+j] == '}') + { + return; /* dont care about semicolon here */ + } + else + if(msg[offset+j] == ';') + { + found_end_of_msg = offset+j+1; + veejay_strncpy(atomic_msg, msg+offset, (found_end_of_msg-offset)); + atomic_msg[ (found_end_of_msg-offset) ] ='\0'; + offset += j + 1; + j = 0; + vj_event_parse_msg( v, atomic_msg, strlen(atomic_msg) ); + } + j++; + } + } + } +} + +void vj_event_dump() +{ + vj_event_vevo_dump(); + + vj_osc_dump(); +} + +typedef struct { + void *value; +} vims_arg_t; + +static void dump_arguments_(int net_id,int arglen, int np, int prefixed, char *fmt) +{ + int i; + char *name = vj_event_vevo_get_event_name( net_id ); + veejay_msg(VEEJAY_MSG_ERROR, "VIMS '%03d' : '%s'", net_id, name ); + veejay_msg(VEEJAY_MSG_ERROR, "\tOnly %d arguments of %d seen",arglen,np); + veejay_msg(VEEJAY_MSG_ERROR, "\tFormat is '%s'", fmt ); + + for( i = prefixed; i < np; i ++ ) + { + char *help = vj_event_vevo_help_vims( net_id, i ); + veejay_msg(VEEJAY_MSG_ERROR,"\t\tArgument %d : %s", + i,help ); + if(help) free(help); + } +} + +static int vvm_[600]; + +static void init_vims_for_macro() +{ + veejay_memset( vvm_,1, sizeof(vvm_)); + vvm_[VIMS_MACRO] = 0; + vvm_[VIMS_TRACK_LIST] = 0; + vvm_[VIMS_RGB24_IMAGE] = 0; + vvm_[VIMS_SET_SAMPLE_START] =0; + vvm_[VIMS_SET_SAMPLE_END] = 0; + vvm_[VIMS_SAMPLE_NEW] = 0; + vvm_[VIMS_SAMPLE_DEL] = 0; + vvm_[VIMS_STREAM_DELETE] = 0; + vvm_[VIMS_SAMPLE_LOAD_SAMPLELIST]=0; + vvm_[VIMS_SAMPLE_SAVE_SAMPLELIST]=0; + vvm_[VIMS_SAMPLE_DEL_ALL] = 0; + vvm_[VIMS_SAMPLE_COPY] = 0; + vvm_[VIMS_SAMPLE_UPDATE] = 0; + vvm_[VIMS_SAMPLE_KF_GET]=0; + vvm_[VIMS_SAMPLE_KF_RESET]=0; + vvm_[VIMS_SAMPLE_KF_STATUS]=0; + vvm_[VIMS_STREAM_NEW_V4L] = 0; + vvm_[VIMS_STREAM_NEW_DV1394] = 0; + vvm_[VIMS_STREAM_NEW_COLOR] = 0; + vvm_[VIMS_STREAM_NEW_Y4M] = 0; + vvm_[VIMS_STREAM_NEW_UNICAST]=0; + vvm_[VIMS_STREAM_NEW_MCAST]=0; + vvm_[VIMS_STREAM_NEW_PICTURE]=0; + vvm_[VIMS_STREAM_SET_DESCRIPTION]=0; + vvm_[VIMS_SAMPLE_SET_DESCRIPTION]=0; + vvm_[VIMS_STREAM_SET_LENGTH]=0; + vvm_[VIMS_SEQUENCE_STATUS]=0; + vvm_[VIMS_SEQUENCE_ADD]=0; + vvm_[VIMS_SEQUENCE_DEL]=0; + vvm_[VIMS_CHAIN_LIST]=0; + vvm_[VIMS_OUTPUT_Y4M_START]=0; + vvm_[VIMS_OUTPUT_Y4M_STOP]=0; + vvm_[VIMS_GET_FRAME]=0; + vvm_[VIMS_VLOOPBACK_START]=0; + vvm_[VIMS_VLOOPBACK_STOP]=0; + vvm_[VIMS_VIDEO_MCAST_START]=0; + vvm_[VIMS_VIDEO_MCAST_STOP]=0; + vvm_[VIMS_SYNC_CORRECTION]=0; + vvm_[VIMS_NO_CACHING]=0; + vvm_[VIMS_SCREENSHOT]=0; + vvm_[VIMS_RGB_PARAMETER_TYPE]=0; + vvm_[VIMS_RESIZE_SDL_SCREEN] =0; + vvm_[VIMS_DEBUG_LEVEL]=0; + vvm_[VIMS_SAMPLE_MODE]=0; + vvm_[VIMS_BEZERK] = 0; + vvm_[VIMS_AUDIO_ENABLE]=0; + vvm_[VIMS_AUDIO_DISABLE]=0; + vvm_[VIMS_RECORD_DATAFORMAT]=0; + vvm_[VIMS_INIT_GUI_SCREEN]=0; + vvm_[VIMS_SUSPEND]=0; + vvm_[VIMS_VIEWPORT]=0; + vvm_[VIMS_PREVIEW_BW]=0; + vvm_[VIMS_FRONTBACK]=0; + vvm_[VIMS_RECVIEWPORT]=0; + vvm_[VIMS_PROJECTION] = 0; +} + +static int valid_for_macro(int net_id) +{ + int k; + if(net_id > 400 || net_id >= 388 || (net_id >= 80 && net_id <= 86) || (net_id >= 50 && net_id <= 59)) + return 0; + + return vvm_[net_id]; +} + +static void dump_argument_( int net_id , int i ) +{ + char *help = vj_event_vevo_help_vims( net_id, i ); + veejay_msg(VEEJAY_MSG_ERROR,"\t\tArgument %d : %s", + i,help ); + if(help) free(help); +} + +static int vj_event_verify_args( int *fx, int net_id , int arglen, int np, int prefixed, char *fmt ) +{ + if(net_id != VIMS_CHAIN_ENTRY_SET_PRESET ) + { + if( arglen != np ) + { + dump_arguments_(net_id,arglen, np, prefixed, fmt); + return 0; + } + } + else + { + if( arglen <= 3 ) + { + dump_arguments_(net_id, arglen,np,prefixed, fmt ); + return 0; + } + int fx_id = fx[2]; + if( fx_id <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid Effect ID" ); + return 0; + } + else + { + int fx_p = vj_effect_get_num_params( fx_id ); + int fx_c = vj_effect_get_extra_frame( fx_id ); + int min = fx_p + (prefixed > 0 ? 0: 3); + int max = min + ( fx_c ? 2 : 0 ) + prefixed; + int a_len = arglen -( prefixed > 0 ? prefixed - 1: 0 ); + if( a_len < min || a_len > max ) + { + if( a_len < min ) + veejay_msg(VEEJAY_MSG_ERROR,"Invalid number of parameters for Effect %d (Need %d, only have %d)", fx_id, + min, a_len ); + if( a_len > max ) + veejay_msg(VEEJAY_MSG_ERROR,"Invalid number of parameters for Effect %d (At most %d, have %d)",fx_id, + max, a_len ); + return 0; + } + if( a_len > min && a_len < max ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid mixing source given for Effect %d , use ",fx_id); + return 0; + } + } + } + return 1; +} + +void vj_event_fire_net_event(veejay_t *v, int net_id, char *str_arg, int *args, int arglen, int prefixed) +{ + int np = vj_event_vevo_get_num_args(net_id); + char *fmt = vj_event_vevo_get_event_format( net_id ); + int flags = vj_event_vevo_get_flags( net_id ); + int fmt_offset = 1; + vims_arg_t vims_arguments[16]; + memset( vims_arguments, 0, sizeof(vims_arguments) ); + + if(!vj_event_verify_args(args , net_id, arglen, np, prefixed, fmt )) + { + if(fmt) free(fmt); + return; + } + + if( np == 0 ) + { + vj_event_vevo_inline_fire_default( (void*) v, net_id, fmt ); + if(fmt) free(fmt); + return; + } + + int i=0; + while( i < arglen ) + { + if( fmt[fmt_offset] == 'd' ) + { + vims_arguments[i].value = (void*) &(args[i]); + } + if( fmt[fmt_offset] == 's' ) + { + if(str_arg == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Argument %d must be a string! (VIMS %03d)", i,net_id ); + if(fmt) free(fmt); + return; + } + vims_arguments[i].value = (void*) strdup( str_arg ); + if(flags & VIMS_REQUIRE_ALL_PARAMS ) + { + if( strlen((char*)vims_arguments[i].value) <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Argument %d is not a string!",i ); + if(fmt)free(fmt); + return; + } + } + } + fmt_offset += 3; + i++; + } + _last_known_num_args = arglen; + + while( i < np ) + { + int dv = vj_event_vevo_get_default_value( net_id, i); + if( fmt[fmt_offset] == 'd' ) + { + vims_arguments[i].value = (void*) &(dv); + } + i++; + } + + vj_event_vevo_inline_fire( (void*) v, net_id, + fmt, + vims_arguments[0].value, + vims_arguments[1].value, + vims_arguments[2].value, + vims_arguments[3].value, + vims_arguments[4].value, + vims_arguments[5].value, + vims_arguments[6].value, + vims_arguments[7].value, + vims_arguments[8].value, + vims_arguments[9].value, + vims_arguments[10].value, + vims_arguments[11].value, + vims_arguments[12].value, + vims_arguments[13].value, + vims_arguments[14].value, + vims_arguments[15].value); + fmt_offset = 1; + for ( i = 0; i < np ; i ++ ) + { + if( vims_arguments[i].value && + fmt[fmt_offset] == 's' ) + free( vims_arguments[i].value ); + fmt_offset += 3; + } + if(fmt) + free(fmt); + +} + +static int inline_str_to_int(const char *msg, int *val) +{ + char longest_num[16]; + int str_len = 0; + if( sscanf( msg , "%d", val ) <= 0 ) + return 0; + veejay_memset(longest_num,0, 16 ); + sprintf(longest_num, "%d", *val ); + + str_len = strlen( longest_num ); + return str_len; +} + +static char *inline_str_to_str(int flags, char *msg) +{ + char *res = NULL; + int len = strlen(msg); + if( len <= 0 ) + return res; + + if( (flags & VIMS_LONG_PARAMS) ) /* copy rest of message */ + { + res = (char*) malloc(sizeof(char) * len ); + veejay_strncpy( res, msg, len ); + } + else + { + char str[255]; + veejay_memset(str,0, sizeof(str) ); + if(sscanf( msg, "%s", str ) <= 0 ) + return res; + res = strndup( str, 255 ); + } + return res; +} + +int vj_event_parse_msg( void *ptr, char *msg, int msg_len ) +{ + veejay_t *v = (veejay_t*)ptr; + char head[5] = { 0,0,0,0,0}; + int net_id = 0; + int np = 0; + if( msg == NULL ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Empty VIMS, dropped!"); + return 0; + } + + if( msg_len < MSG_MIN_LEN ) + { + veejay_msg(VEEJAY_MSG_ERROR, "VIMS Message too small, dropped!"); + return 0; + + } + + veejay_memcpy(head,msg,4); + + if( strncasecmp( head, "bun", 3 ) == 0 ) + { + veejay_chomp_str( msg, &msg_len ); + vj_event_parse_bundle( v, msg ); + return 1; + } + + if( strncasecmp( head, "key", 3 ) == 0 ) + { + vj_event_parse_kf( v, msg, msg_len ); + return 1; + } + + veejay_chomp_str( msg, &msg_len ); + msg_len --; + + /* try to scan VIMS id */ + if ( sscanf( head, "%03d", &net_id ) != 1 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error parsing VIMS selector"); + return 0; + } + + if( net_id != 412 && net_id != 333) + veejay_msg(VEEJAY_MSG_DEBUG, "VIMS: Parse message '%s'", msg ); + + if( net_id <= 0 || net_id >= VIMS_MAX ) + { + veejay_msg(VEEJAY_MSG_ERROR, "VIMS Selector %d invalid", net_id ); + return 0; + } + + /* verify format */ + if( msg[3] != 0x3a || msg[msg_len] != ';' ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Syntax error in VIMS message"); + if( msg[3] != 0x3a ) + { + veejay_msg(VEEJAY_MSG_ERROR, "\tExpected ':' after VIMS selector"); + return 0; + } + if( msg[msg_len] != ';' ) + { + veejay_msg(VEEJAY_MSG_ERROR, "\tExpected ';' to terminate VIMS message"); + return 0; + } + } + + if ( net_id >= VIMS_BUNDLE_START && net_id < VIMS_BUNDLE_END ) + { + vj_msg_bundle *bun = vj_event_bundle_get(net_id ); + if(!bun) + { + veejay_msg(VEEJAY_MSG_ERROR, "(VIMS) internal error: Bundle %d not registered"); + return 0; + } + vj_event_parse_bundle( v, bun->bundle ); + return 1; + } + + if( net_id >= 400 && net_id < 499 ) + vj_server_client_promote( v->vjs[VEEJAY_PORT_CMD] , v->uc->current_link ); + + np = vj_event_vevo_get_num_args( net_id ); + + if ( msg_len <= MSG_MIN_LEN ) + { + int i_args[16]; + int i = 0; + while( i < np ) + { + i_args[i] = vj_event_vevo_get_default_value( net_id, i ); + i++; + } + vj_event_fire_net_event( v, net_id, NULL, i_args, np, 0 ); + if( macro_status_ == 1 && macro_port_ != NULL) + { + if( valid_for_macro(net_id)) + store_macro_( v,msg, v->settings->current_frame_num ); + } + + } + else + { + char *arguments = NULL; + char *fmt = vj_event_vevo_get_event_format( net_id ); + int flags = vj_event_vevo_get_flags( net_id ); + int i = 0; + int i_args[16]; + char *str = NULL; + int fmt_offset = 1; + char *arg_str = NULL; + memset( i_args, 0, sizeof(i_args) ); + + arg_str = arguments = strndup( msg + 4 , msg_len - 4 ); + + if( arguments == NULL ) + { + dump_arguments_( net_id, 0, np, 0, fmt ); + if(fmt) free(fmt ); + return 0; + } + if( np <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "VIMS %d accepts no arguments", net_id ); + if(fmt) free(fmt); + return 0; + } + + while( i < np ) + { + if( fmt[fmt_offset] == 'd' ) + i_args[i] = vj_event_vevo_get_default_value(net_id, i); + i++; + } + + for( i = 0; i < np; i ++ ) + { + int failed_arg = 1; + + if( fmt[fmt_offset] == 'd' ) + { + int il = inline_str_to_int( arguments, &i_args[i] ); + if( il > 0 ) + { + failed_arg = 0; + arguments += il; + } + } + if( fmt[fmt_offset] == 's' && str == NULL) + { + str = inline_str_to_str( flags,arguments ); + if(str != NULL ) + { + failed_arg = 0; + arguments += strlen(str); + } + } + + if( failed_arg ) + { + char *name = vj_event_vevo_get_event_name( net_id ); + veejay_msg(VEEJAY_MSG_ERROR, "Invalid argument %d for VIMS '%03d' : '%s' ", + i, net_id, name ); + if(name) free(name); + dump_argument_( net_id, i ); + if(fmt) free(fmt); + return 0; + } + + if( *arguments == ';' || *arguments == 0 ) + break; + fmt_offset += 3; + + if( *arguments == 0x20 ) + *arguments ++; + } + + i ++; + + if( flags & VIMS_ALLOW_ANY ) + i = np; + + if( macro_status_ == 1 && macro_port_ != NULL) + { + if( valid_for_macro(net_id)) + store_macro_( v,msg, v->settings->current_frame_num ); + } + vj_event_fire_net_event( v, net_id, str, i_args, i, 0 ); + + + if(fmt) free(fmt); + if(arg_str) free(arg_str); + if(str) free(str); + + return 1; + + } + return 0; +} + +void vj_event_update_remote(void *ptr) +{ + veejay_t *v = (veejay_t*)ptr; + int i; + + if( vj_server_poll( v->vjs[VEEJAY_PORT_CMD] ) ) + vj_server_new_connection( v->vjs[VEEJAY_PORT_CMD] ); + if( vj_server_poll( v->vjs[VEEJAY_PORT_STA] ) ) + vj_server_new_connection( v->vjs[VEEJAY_PORT_STA] ); + + if( vj_server_poll( v->vjs[VEEJAY_PORT_DAT] ) ) + { + vj_server_new_connection( v->vjs[VEEJAY_PORT_DAT] ); + } + + if( v->settings->use_vims_mcast ) + { + int res = vj_server_update(v->vjs[VEEJAY_PORT_MAT],0 ); + if(res > 0) + { + v->uc->current_link = 0; + char *buf = NULL; + int len =0; + while( ( buf = vj_server_retrieve_msg( v->vjs[VEEJAY_PORT_MAT], 0, buf,&len )) != NULL ) + { + + vj_event_parse_msg( v, buf,len ); + } + } + + } + + v->settings->is_dat = 0; + for( i = 0; i < VJ_MAX_CONNECTIONS; i ++ ) + { + if( vj_server_link_used( v->vjs[VEEJAY_PORT_CMD], i ) ) + { + int res = 1; + while( res != 0 ) + { + res = vj_server_update( v->vjs[VEEJAY_PORT_CMD], i ); + if(res>0) + { + v->uc->current_link = i; + int n = 0; + int len = 0; + char *buf = NULL; + while( (buf= vj_server_retrieve_msg(v->vjs[VEEJAY_PORT_CMD],i,buf, &len))!= NULL ) + { + vj_event_parse_msg( v, buf,len ); + n++; + } + } + if( res == -1 ) + { + _vj_server_del_client( v->vjs[VEEJAY_PORT_CMD], i ); + _vj_server_del_client( v->vjs[VEEJAY_PORT_STA], i ); + } + } + } + } + + v->settings->is_dat = 1; + for( i = 0; i < VJ_MAX_CONNECTIONS; i ++ ) + { + if( vj_server_link_used( v->vjs[VEEJAY_PORT_DAT], i ) ) + { + int res = 1; + while( res != 0 ) + { + res = vj_server_update( v->vjs[VEEJAY_PORT_DAT], i ); + if(res>0) + { + v->uc->current_link = i; + int n = 0; + int len = 0; + char *buf = NULL; + while( (buf= vj_server_retrieve_msg(v->vjs[VEEJAY_PORT_DAT],i,buf, &len))!= NULL ) + { + vj_event_parse_msg( v, buf,len ); + n++; + } + } + if( res == -1 ) + { + _vj_server_del_client( v->vjs[VEEJAY_PORT_DAT], i ); + } + } + } + } + + //@ repeat macros + if(macro_status_ == 2 && macro_port_ != NULL) + { + int n_macro = 0; + char *macro_msg = NULL; + for( n_macro = 0; n_macro < MAX_MACROS ; n_macro ++ ) + { + macro_msg = retrieve_macro_( v, v->settings->current_frame_num, n_macro ); + if(macro_msg) + vj_event_parse_msg(v,macro_msg, strlen(macro_msg)); + } + } + + + v->settings->is_dat = 0; + + + for( i = 0; i < VJ_MAX_CONNECTIONS; i ++ ) + if( vj_server_link_used( v->vjs[VEEJAY_PORT_STA], i )) + veejay_pipe_write_status( v, i ); + + if(!veejay_keep_messages()) + veejay_reap_messages(); +} + +void vj_event_commit_bundle( veejay_t *v, int key_num, int key_mod) +{ + char bundle[4096]; + veejay_memset(bundle,0,4096); + vj_event_create_effect_bundle(v, bundle, key_num, key_mod ); +} + +#ifdef HAVE_SDL +int vj_event_single_fire(void *ptr , SDL_Event event, int pressed) +{ + + SDL_KeyboardEvent *key = &event.key; + SDLMod mod = key->keysym.mod; + + int vims_mod = 0; + + if( (mod & KMOD_LSHIFT) || (mod & KMOD_RSHIFT )) + vims_mod = VIMS_MOD_SHIFT; + if( (mod & KMOD_LALT) || (mod & KMOD_ALT) ) + vims_mod = VIMS_MOD_ALT; + if( (mod & KMOD_CTRL) || (mod & KMOD_CTRL) ) + vims_mod = VIMS_MOD_CTRL; + + int vims_key = key->keysym.sym; + int index = vims_mod * SDLK_LAST + vims_key; + + vj_keyboard_event *ev = get_keyboard_event( index ); + if(!ev ) + { + veejay_msg(VEEJAY_MSG_ERROR,"Keyboard event %d unknown", index ); + return 0; + } + + int event_id = ev->vims->list_id; + if( event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END ) + { + vj_msg_bundle *bun = vj_event_bundle_get(event_id ); + if(!bun) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Requested BUNDLE %d does not exist", event_id); + return; + } + vj_event_parse_bundle( (veejay_t*) ptr, bun->bundle ); + } + else + { + char msg[100]; + if( ev->arg_len > 0 ) + { + sprintf(msg,"%03d:%s;", event_id, ev->arguments ); + } + else + sprintf(msg,"%03d:;", event_id ); + vj_event_parse_msg( (veejay_t*) ptr, msg, strlen(msg) ); + } + return 1; +} + +#endif +#ifdef HAVE_GL +void vj_event_single_gl_fire(void *ptr , int mod, int key) +{ + int vims_mod = 0; +#ifndef HAVE_SDL + return; +#else + switch( key ) + { + case 0xff0d: key = SDLK_RETURN; break; + case 0xff1b: key = SDLK_ESCAPE; break; + case 0xffbe: key = SDLK_F1; break; + case 0xffbf: key = SDLK_F2; break; + case 0xffc0: key = SDLK_F3; break; + case 0xffc1: key = SDLK_F4; break; + case 0xffc2: key = SDLK_F5; break; + case 0xffc3: key = SDLK_F6; break; + case 0xffc4: key = SDLK_F7; break; + case 0xffc5: key = SDLK_F8; break; + case 0xffc6: key = SDLK_F9; break; + case 0xffc7: key = SDLK_F10; break; + case 0xffc8: key = SDLK_F11; break; + case 0xffc9: key = SDLK_F12; break; + case 0xff63: key = SDLK_INSERT; break; + case 0xff50: key = SDLK_HOME; break; + case 0xff55: key = SDLK_PAGEUP; break; + case 0xff56: key = SDLK_PAGEDOWN; break; + case 0xff57: key = SDLK_END; break; + case 0xffff: key = SDLK_DELETE;break; + case 0xff08: key = SDLK_BACKSPACE;break; + case 0xff52: key = SDLK_UP; break; + case 0xff53: key = SDLK_RIGHT; break; + case 0xff54: key = SDLK_DOWN; break; + case 0xff51: key = SDLK_LEFT; break; + case 0xffaa: key = SDLK_KP_MULTIPLY; break; + case 0xffb0: key = SDLK_KP0; break; + case 0xffb1: case 0xff9c: key = SDLK_KP1; break; + case 0xffb2: case 0xff99: key = SDLK_KP2; break; + case 0xffb3: case 0xff9b: key = SDLK_KP3; break; + case 0xffb4: case 0xff96: key = SDLK_KP4; break; + case 0xffb5: case 0xff9d: key = SDLK_KP5; break; + case 0xffb6: case 0xff98: key = SDLK_KP6; break; + case 0xffb7: case 0xff95: key = SDLK_KP7; break; + case 0xffb8: case 0xff97: key = SDLK_KP8; break; + case 0xffb9: case 0xff9a: key = SDLK_KP9; break; + case 0xffab: key = SDLK_KP_PLUS; break; + case 0xffad: key = SDLK_KP_MINUS; break; + case 0xff8d: key = SDLK_KP_ENTER; break; + case 0xffaf: key = SDLK_KP_DIVIDE; break; + case 0xff9e: case 0xff9f: key = SDLK_KP_PERIOD; break; + default: + if( key > (256+128)) + veejay_msg(VEEJAY_MSG_DEBUG, "\tUnknown key pressed %x, mod = %d", key, mod ); + break; + + } + + switch( mod ) + { + case 1: + case 17: + vims_mod = VIMS_MOD_SHIFT; break; + case 4: + case 20: + vims_mod = VIMS_MOD_CTRL; break; + case 8: + case 24: + case 144: + vims_mod = VIMS_MOD_ALT; break; + default: + veejay_msg(VEEJAY_MSG_DEBUG, "\tUnknown modifier pressed %x, mod = %d", key , mod ); + break; + + } + + + int vims_key = key; + int index = vims_mod * SDLK_LAST + vims_key; + + vj_keyboard_event *ev = get_keyboard_event( index ); + if(!ev ) + { + veejay_msg(VEEJAY_MSG_ERROR,"Keyboard event %d unknown", index ); + return; + } + + // event_id is here VIMS list entry! + int event_id = ev->vims->list_id; + + if( event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END ) + { + vj_msg_bundle *bun = vj_event_bundle_get(event_id ); + if(!bun) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Requested BUNDLE %d does not exist", event_id); + return; + } + vj_event_parse_bundle( (veejay_t*) ptr, bun->bundle ); + } + else + { + char msg[100]; + if( ev->arg_len > 0 ) + { + sprintf(msg,"%03d:%s;", event_id, ev->arguments ); + } + else + sprintf(msg,"%03d:;", event_id ); + vj_event_parse_msg( (veejay_t*) ptr, msg,strlen(msg) ); + } +#endif +} + + +#endif +void vj_event_none(void *ptr, const char format[], va_list ap) +{ + veejay_msg(VEEJAY_MSG_DEBUG, "No action implemented for requested event"); +} + +#ifdef HAVE_XML2 +static int get_cstr( xmlDocPtr doc, xmlNodePtr cur, const xmlChar *what, char *dst ) +{ + xmlChar *tmp = NULL; + char *t = NULL; + if(! xmlStrcmp( cur->name, what )) + { + tmp = xmlNodeListGetString( doc, cur->xmlChildrenNode,1 ); + t = UTF8toLAT1(tmp); + if(!t) + return 0; + veejay_strncpy( dst, t, strlen(t) ); + free(t); + xmlFree(tmp); + return 1; + } + return 0; +} +static int get_fstr( xmlDocPtr doc, xmlNodePtr cur, const xmlChar *what, float *dst ) +{ + xmlChar *tmp = NULL; + char *t = NULL; + float tmp_f = 0; + int n = 0; + if(! xmlStrcmp( cur->name, what )) + { + tmp = xmlNodeListGetString( doc, cur->xmlChildrenNode,1 ); + t = UTF8toLAT1(tmp); + if(!t) + return 0; + + n = sscanf( t, "%f", &tmp_f ); + free(t); + xmlFree(tmp); + + if( n ) + *dst = tmp_f; + else + return 0; + + return 1; + } + return 0; +} + +static int get_istr( xmlDocPtr doc, xmlNodePtr cur, const xmlChar *what, int *dst ) +{ + xmlChar *tmp = NULL; + char *t = NULL; + int tmp_i = 0; + int n = 0; + if(! xmlStrcmp( cur->name, what )) + { + tmp = xmlNodeListGetString( doc, cur->xmlChildrenNode,1 ); + t = UTF8toLAT1(tmp); + if(!t) + { + veejay_msg(VEEJAY_MSG_ERROR, "Input not in UTF8 format!"); + return 0; + } + + n = sscanf( t, "%d", &tmp_i ); + free(t); + xmlFree(tmp); + + if( n ) + *dst = tmp_i; + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot convert value '%s'to number", t); + return 0; + } + return 1; + } + return 0; +} +#define XML_CONFIG_STREAM "stream" +#define XML_CONFIG_STREAM_SOURCE "source" +#define XML_CONFIG_STREAM_FILENAME "filename" +#define XML_CONFIG_STREAM_TYPE "type" +#define XML_CONFIG_STREAM_COLOR "rgb" +#define XML_CONFIG_STREAM_OPTION "option" +#define XML_CONFIG_STREAM_CHAIN "fxchain" + +#define XML_CONFIG_KEY_SYM "key_symbol" +#define XML_CONFIG_KEY_MOD "key_modifier" +#define XML_CONFIG_KEY_VIMS "vims_id" +#define XML_CONFIG_KEY_EXTRA "extra" +#define XML_CONFIG_EVENT "event" +#define XML_CONFIG_FILE "config" +#define XML_CONFIG_SETTINGS "run_settings" +#define XML_CONFIG_SETTING_PORTNUM "port_num" +#define XML_CONFIG_SETTING_HOSTNAME "hostname" +#define XML_CONFIG_SETTING_PRIOUTPUT "primary_output" +#define XML_CONFIG_SETTING_PRINAME "primary_output_destination" +#define XML_CONFIG_SETTING_SDLSIZEX "SDLwidth" +#define XML_CONFIG_SETTING_SDLSIZEY "SDLheight" +#define XML_CONFIG_SETTING_AUDIO "audio" +#define XML_CONFIG_SETTING_SYNC "sync" +#define XML_CONFIG_SETTING_TIMER "timer" +#define XML_CONFIG_SETTING_FPS "output_fps" +#define XML_CONFIG_SETTING_GEOX "Xgeom_x" +#define XML_CONFIG_SETTING_GEOY "Xgeom_y" +#define XML_CONFIG_SETTING_BEZERK "bezerk" +#define XML_CONFIG_SETTING_COLOR "nocolor" +#define XML_CONFIG_SETTING_YCBCR "chrominance_level" +#define XML_CONFIG_SETTING_WIDTH "output_width" +#define XML_CONFIG_SETTING_HEIGHT "output_height" +#define XML_CONFIG_SETTING_DFPS "dummy_fps" +#define XML_CONFIG_SETTING_DUMMY "dummy" +#define XML_CONFIG_SETTING_NORM "video_norm" +#define XML_CONFIG_SETTING_MCASTOSC "mcast_osc" +#define XML_CONFIG_SETTING_MCASTVIMS "mcast_vims" +#define XML_CONFIG_SETTING_SCALE "output_scaler" +#define XML_CONFIG_SETTING_PMODE "play_mode" +#define XML_CONFIG_SETTING_PID "play_id" +#define XML_CONFIG_SETTING_SAMPLELIST "sample_list" +#define XML_CONFIG_SETTING_EDITLIST "edit_list" + +#define __xml_cint( buf, var , node, name )\ +{\ +sprintf(buf,"%d", var);\ +xmlNewChild(node, NULL, (const xmlChar*) name, (const xmlChar*) buf );\ +} + +#define __xml_cfloat( buf, var , node, name )\ +{\ +sprintf(buf,"%f", var);\ +xmlNewChild(node, NULL, (const xmlChar*) name, (const xmlChar*) buf );\ +} + +#define __xml_cstr( buf, var , node, name )\ +{\ +if(var != NULL){\ +veejay_strncpy(buf,var,strlen(var));\ +xmlNewChild(node, NULL, (const xmlChar*) name, (const xmlChar*) buf );}\ +} + + +void vj_event_format_xml_settings( veejay_t *v, xmlNodePtr node ) +{ + char buf[4069]; + veejay_memset(buf,0,4096); + int c = veejay_is_colored(); + __xml_cint( buf, v->uc->port, node, XML_CONFIG_SETTING_PORTNUM ); + __xml_cint( buf, v->video_out, node, XML_CONFIG_SETTING_PRIOUTPUT); + __xml_cstr( buf, v->stream_outname,node,XML_CONFIG_SETTING_PRINAME ); + __xml_cint( buf, v->bes_width,node, XML_CONFIG_SETTING_SDLSIZEX ); + __xml_cint( buf, v->bes_height,node, XML_CONFIG_SETTING_SDLSIZEY ); + __xml_cint( buf, v->audio,node, XML_CONFIG_SETTING_AUDIO ); + __xml_cint( buf, v->sync_correction,node, XML_CONFIG_SETTING_SYNC ); + __xml_cint( buf, v->uc->use_timer,node, XML_CONFIG_SETTING_TIMER ); + __xml_cint( buf, v->uc->geox,node, XML_CONFIG_SETTING_GEOX ); + __xml_cint( buf, v->uc->geoy,node, XML_CONFIG_SETTING_GEOY ); + __xml_cint( buf, v->no_bezerk,node, XML_CONFIG_SETTING_BEZERK ); + __xml_cint( buf, c,node, XML_CONFIG_SETTING_COLOR ); + __xml_cint( buf, v->pixel_format,node, XML_CONFIG_SETTING_YCBCR ); + __xml_cint( buf, v->video_output_width,node, XML_CONFIG_SETTING_WIDTH ); + __xml_cint( buf, v->video_output_height,node, XML_CONFIG_SETTING_HEIGHT ); + __xml_cfloat( buf,v->dummy->fps,node, XML_CONFIG_SETTING_DFPS ); + __xml_cint( buf, v->dummy->norm,node, XML_CONFIG_SETTING_NORM ); + __xml_cint( buf, v->dummy->active,node, XML_CONFIG_SETTING_DUMMY ); + __xml_cint( buf, v->settings->use_mcast,node, XML_CONFIG_SETTING_MCASTOSC ); + __xml_cint( buf, v->settings->use_vims_mcast,node, XML_CONFIG_SETTING_MCASTVIMS ); + __xml_cint( buf, v->settings->zoom ,node, XML_CONFIG_SETTING_SCALE ); + __xml_cfloat( buf, v->settings->output_fps, node, XML_CONFIG_SETTING_FPS ); + __xml_cint( buf, v->uc->playback_mode, node, XML_CONFIG_SETTING_PMODE ); + __xml_cint( buf, v->uc->sample_id, node, XML_CONFIG_SETTING_PID ); +} + +void vj_event_xml_parse_config( veejay_t *v, xmlDocPtr doc, xmlNodePtr cur ) +{ + if( veejay_get_state(v) != LAVPLAY_STATE_STOP) + return; + + int c = 0; + char sample_list[1024]; + veejay_memset(sample_list,0,1024); + // todo: editlist loading ; veejay restart + + while( cur != NULL ) + { + get_cstr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_SAMPLELIST, sample_list ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_PORTNUM, &(v->uc->port) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_PRIOUTPUT, &(v->video_out) ); + get_cstr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_PRINAME, v->stream_outname); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_SDLSIZEX, &(v->bes_width) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_SDLSIZEY, &(v->bes_height) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_AUDIO, &(v->audio) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_SYNC, &(v->sync_correction) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_TIMER, &(v->uc->use_timer) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_GEOX, &(v->uc->geox) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_GEOY, &(v->uc->geoy) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_BEZERK, &(v->no_bezerk) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_COLOR, &c ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_YCBCR, &(v->pixel_format) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_WIDTH, &(v->video_output_width) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_HEIGHT,&(v->video_output_height) ); + get_fstr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_DFPS, &(v->dummy->fps ) ); + get_cstr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_NORM, &(v->dummy->norm) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_DUMMY, &(v->dummy->active) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_MCASTOSC, &(v->settings->use_mcast) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_MCASTVIMS, &(v->settings->use_vims_mcast) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_SCALE, &(v->settings->zoom) ); + get_fstr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_FPS, &(v->settings->output_fps ) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_PMODE, &(v->uc->playback_mode) ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_SETTING_PID, &(v->uc->sample_id ) ); + cur = cur->next; + } + + veejay_set_colors( c ); + if(sample_list) + { + v->settings->action_scheduler.sl = strdup( sample_list ); + veejay_msg(VEEJAY_MSG_DEBUG, "Scheduled '%s' for restart", sample_list ); + + v->settings->action_scheduler.state = 1; + } +} + +void vj_event_xml_new_keyb_event( void *ptr, xmlDocPtr doc, xmlNodePtr cur ) +{ + int key = 0; + int key_mod = 0; + int event_id = 0; + + char msg[4096]; + veejay_memset(msg,0,4096); + + while( cur != NULL ) + { + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_KEY_VIMS, &event_id ); + get_cstr( doc, cur, (const xmlChar*) XML_CONFIG_KEY_EXTRA, msg ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_KEY_SYM, &key ); + get_istr( doc, cur, (const xmlChar*) XML_CONFIG_KEY_MOD, &key_mod ); + cur = cur->next; + } + + if( event_id <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid key '%s' in configuration file", XML_CONFIG_KEY_VIMS); + return; + } + + if( event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END ) + { + int b_key = 0, b_mod = 0; + if( vj_event_bundle_exists(event_id)) + { + vj_msg_bundle *mm = vj_event_bundle_get( event_id ); + if( mm ) + { + b_key = mm->accelerator; + b_mod = mm->modifier; + } + if(!override_keyboard) + { + veejay_msg(VEEJAY_MSG_WARNING, + "Bundle %d already exists in VIMS system! (Bundle in configfile was ignored)",event_id); + return; + } + else + { + if(vj_event_bundle_del(event_id) != 0) + { + veejay_msg(0, "Unable to delete bundle %d", event_id); + return; + } + } + } + + vj_msg_bundle *m = vj_event_bundle_new( msg, event_id); + if(!msg) + { + veejay_msg(VEEJAY_MSG_ERROR, "Failed to create new Bundle %d - [%s]", event_id, msg ); + return; + } + + m->accelerator = b_key; + m->modifier = b_mod; + + + if(vj_event_bundle_store(m)) + veejay_msg(VEEJAY_MSG_DEBUG, "Added bundle %d , trigger with key %d (mod %d)", event_id, b_key, b_mod); + } + +#ifdef HAVE_SDL + if( key > 0 && key_mod >= 0) + { + if( override_keyboard ) + vj_event_unregister_keyb_event( key, key_mod ); + if( !vj_event_register_keyb_event( event_id, key, key_mod, NULL )) + veejay_msg(VEEJAY_MSG_ERROR, "Attaching key %d + %d to Bundle %d ", key,key_mod,event_id); + } +#endif +} + +int veejay_load_action_file( void *ptr, char *file_name ) +{ + xmlDocPtr doc; + xmlNodePtr cur; + + veejay_t *v = (veejay_t*) ptr; + if(!file_name) + return 0; + + doc = xmlParseFile( file_name ); + + if(doc==NULL) + return 0; + + cur = xmlDocGetRootElement( doc ); + if( cur == NULL) + { + xmlFreeDoc(doc); + return 0; + } + + if( xmlStrcmp( cur->name, (const xmlChar *) XML_CONFIG_FILE)) + { + xmlFreeDoc(doc); + return 0; + } + + cur = cur->xmlChildrenNode; + override_keyboard = 1; + while( cur != NULL ) + { + if( !xmlStrcmp( cur->name, (const xmlChar*) XML_CONFIG_SETTINGS ) ) + { + vj_event_xml_parse_config( v, doc, cur->xmlChildrenNode ); + } + if( !xmlStrcmp( cur->name, (const xmlChar *) XML_CONFIG_EVENT )) + { + vj_event_xml_new_keyb_event( (void*)v, doc, cur->xmlChildrenNode ); + } + cur = cur->next; + } + override_keyboard = 0; + xmlFreeDoc(doc); + return 1; +} + +void vj_event_format_xml_event( xmlNodePtr node, int event_id ) +{ + char buffer[4096]; + int key_id=0; + int key_mod=-1; + + veejay_memset( buffer,0, 4096 ); + + if( event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END) + { /* its a Bundle !*/ + vj_msg_bundle *m = vj_event_bundle_get( event_id ); + if(!m) + { + veejay_msg(VEEJAY_MSG_ERROR, "bundle %d does not exist", event_id); + return; + } + veejay_strncpy(buffer, m->bundle, strlen(m->bundle) ); + xmlNewChild(node, NULL, (const xmlChar*) XML_CONFIG_KEY_EXTRA , + (const xmlChar*) buffer); + // m->event_id and event_id should be equal + } + /* Put all known VIMS so we can detect differences in runtime + some Events will not exist if SDL, Jack, DV, Video4Linux would be missing */ + + sprintf(buffer, "%d", event_id); + xmlNewChild(node, NULL, (const xmlChar*) XML_CONFIG_KEY_VIMS , + (const xmlChar*) buffer); +#ifdef HAVE_SDL + if(key_id > 0 && key_mod >= 0 ) + { + sprintf(buffer, "%d", key_id ); + xmlNewChild(node, NULL, (const xmlChar*) XML_CONFIG_KEY_SYM , + (const xmlChar*) buffer); + sprintf(buffer, "%d", key_mod ); + xmlNewChild(node, NULL, (const xmlChar*) XML_CONFIG_KEY_MOD , + (const xmlChar*) buffer); + } +#endif +} + +static void vj_event_send_new_id(veejay_t * v, int new_id) +{ + + if( vj_server_client_promoted( v->vjs[0], v->uc->current_link )) + { + char result[6]; + sprintf( result, "%05d",new_id ); + sprintf(_s_print_buf, "%03d%s",5, result); + SEND_MSG( v,_s_print_buf ); + } +} + +void vj_event_write_actionfile(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + char file_name[512]; + char live_set[512]; + int args[2] = {0,0}; + int i; + //veejay_t *v = (veejay_t*) ptr; + xmlDocPtr doc; + xmlNodePtr rootnode,childnode; + P_A(args,file_name,format,ap); + doc = xmlNewDoc( "1.0" ); + rootnode = xmlNewDocNode( doc, NULL, (const xmlChar*) XML_CONFIG_FILE,NULL); + xmlDocSetRootElement( doc, rootnode ); + + for( i = 0; i < VIMS_MAX; i ++ ) + { + if( net_list[i].list_id > 0 ) + { + childnode = xmlNewChild( rootnode,NULL,(const xmlChar*) XML_CONFIG_EVENT ,NULL); + vj_event_format_xml_event( childnode, i ); + } + } + xmlSaveFormatFile( file_name, doc, 1); + + veejay_msg(VEEJAY_MSG_INFO, "Saved Action file as '%s'" , file_name ); + xmlFreeDoc(doc); +} +#endif // XML2 +void vj_event_read_file( void *ptr, const char format[], va_list ap ) +{ + char file_name[512]; + int args[1]; + + P_A(args,file_name,format,ap); + +#ifdef HAVE_XML2 + if(veejay_load_action_file( ptr, file_name )) + veejay_msg(VEEJAY_MSG_INFO, "Loaded Action file '%s'", file_name ); + else + veejay_msg(VEEJAY_MSG_ERROR,"Unable to load Action file '%s'", file_name ); +#endif +} + +#ifdef HAVE_SDL +vims_key_list *vj_event_get_keys( int event_id ) +{ + vims_key_list *list = vj_calloc( sizeof(vims_key_list)); + vims_key_list *tree = list; + vims_key_list *next = NULL; + if ( event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END ) + { + if( vj_event_bundle_exists( event_id )) + { + vj_msg_bundle *bun = vj_event_bundle_get( event_id ); + if( bun ) + { + list->key_symbol = bun->accelerator; + list->key_mod = bun->modifier; + } + } + return list; + } + + if(!hash_isempty( keyboard_events )) + { + hscan_t scan; + hash_scan_begin( &scan, keyboard_events ); + hnode_t *node; + while( ( node = hash_scan_next(&scan)) != NULL ) + { + vj_keyboard_event *ev = NULL; + ev = hnode_get( node ); + if(ev && ev->event_id == event_id) + { + next = vj_calloc( sizeof(vims_key_list)); + + tree->key_symbol = ev->key_symbol; + tree->key_mod = ev->key_mod; + tree->args = ev->arguments; + tree->arg_len = ev->arg_len; + tree->next = next; + + tree = next; + } + } + } + return list; +} + +void vj_event_unregister_keyb_event( int sdl_key, int modifier ) +{ + int index = (modifier * SDLK_LAST) + sdl_key; + vj_keyboard_event *ev = get_keyboard_event( index ); + if(ev) + { + vj_msg_bundle *m = vj_event_bundle_get( ev->event_id ); + if(m) + { + m->accelerator = 0; + m->modifier = 0; + + vj_event_bundle_update( m, ev->event_id ); + veejay_msg(VEEJAY_MSG_DEBUG, "Bundle %d dropped key binding", + ev->event_id); + } + if( ev->vims ) + free(ev->vims); + if( ev->arguments) + free(ev->arguments ); + veejay_memset(ev, 0, sizeof( vj_keyboard_event )); + + del_keyboard_event( index ); + } + else + { + veejay_msg(0,"No event was attached to key %d : %d", modifier, sdl_key); + } +} + +int vj_event_register_keyb_event(int event_id, int symbol, int modifier, const char *value) +{ + int offset = SDLK_LAST * modifier; + int index = offset + symbol; + if( keyboard_event_exists( index )) + { + veejay_msg(VEEJAY_MSG_DEBUG, + "Keboard binding %d + %d already exists", modifier, symbol); + vj_keyboard_event *ff = get_keyboard_event(index); + if(ff && value) + { + if(ff->arguments) free(ff->arguments); + ff->arguments = strdup(value); + ff->arg_len = strlen(value); + veejay_msg( VEEJAY_MSG_DEBUG, + "Updated arguments of keybinding %d+%d, (VIMS %03d:%s;) ",modifier,symbol, ff->event_id, + value); + return 1; + } + return 0; + } + + if( vj_event_bundle_exists(event_id)) + { + vj_keyboard_event *ev = get_keyboard_event( index ); + if( ev ) + { + ev->key_symbol = symbol; + ev->key_mod = modifier; + veejay_msg(VEEJAY_MSG_INFO, + "Updated Bundle ID %d with keybinding %d+%d", + ev->event_id, modifier, symbol ); + return 1; + } + } + + vj_keyboard_event *ev = NULL; + + if( event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END ) + { + char val[10]; + vj_msg_bundle *m = vj_event_bundle_get( event_id ); + sprintf(val, "%d", event_id ); + if( m ) + { + m->accelerator = symbol; + m->modifier = modifier; + + vj_event_bundle_update( m, event_id ); + + ev = new_keyboard_event( symbol, modifier, val, event_id ); + veejay_msg(VEEJAY_MSG_DEBUG, "Bundle %d triggered by key %d (mod %d)", event_id,symbol, modifier); + } + } + else + { + ev = new_keyboard_event( symbol, modifier, value, event_id ); + } + + + if(!ev) + return 0; + + hnode_t *node = hnode_create( ev ); + if(!node) + { + return 0; + } + + hash_insert( keyboard_events, node, (void*) index ); + + return 1; +} +#endif +void vj_event_init_network_events() +{ + int i; + int net_id = 0; + for( i = 0; i <= 600; i ++ ) + { + net_list[ net_id ].act = + (vj_event) vj_event_vevo_get_event_function( i ); + + if( net_list[ net_id ].act ) + { + net_list[net_id].list_id = i; + net_id ++; + } + } + veejay_msg(VEEJAY_MSG_DEBUG, "Registered %d VIMS events", net_id ); +} +#ifdef HAVE_SDL +char *find_keyboard_default(int id) +{ + char *result = NULL; + int i; + for( i = 1; vj_event_default_sdl_keys[i].event_id != 0; i ++ ) + { + if( vj_event_default_sdl_keys[i].event_id == id ) + { + if( vj_event_default_sdl_keys[i].value != NULL ) + result = strdup( vj_event_default_sdl_keys[i].value ); + break; + } + } + return result; +} + +void vj_event_init_keyboard_defaults() +{ + int i; + int keyb_events = 0; + for( i = 1; vj_event_default_sdl_keys[i].event_id != 0; i ++ ) + { + if( vj_event_register_keyb_event( + vj_event_default_sdl_keys[i].event_id, + vj_event_default_sdl_keys[i].key_sym, + vj_event_default_sdl_keys[i].key_mod, + vj_event_default_sdl_keys[i].value )) + { + keyb_events++; + } + else + { + + veejay_msg(VEEJAY_MSG_ERROR, + "VIMS event %03d does not exist ", vj_event_default_sdl_keys[i].event_id ); + } + } +} +#endif + +void vj_event_init() +{ + int i; + + veejay_memset( keyboard_event_map_, 0, sizeof(keyboard_event_map_)); + + vj_init_vevo_events(); +#ifdef HAVE_SDL + if( !(keyboard_events = hash_create( HASHCOUNT_T_MAX, int_bundle_compare, int_bundle_hash))) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot initialize hash for keyboard events"); + return; + } +#endif + for(i=0; i < VIMS_MAX; i++) + { + net_list[i].act = vj_event_none; + net_list[i].list_id = 0; + } + + if( !(BundleHash = hash_create(HASHCOUNT_T_MAX, int_bundle_compare, int_bundle_hash))) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot initialize hashtable for message bundles"); + return; + } + + vj_event_init_network_events(); +#ifdef HAVE_SDL + vj_event_init_keyboard_defaults(); +#endif + lzo_ = lzo_new(); + + veejay_memset( &time_last_, 0, sizeof( struct timeval )); + + init_vims_for_macro(); + +} + +void vj_event_linkclose(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + veejay_msg(VEEJAY_MSG_INFO, "Remote requested session-end, quitting Client"); + int i = v->uc->current_link; + _vj_server_del_client( v->vjs[0], i ); + _vj_server_del_client( v->vjs[1], i ); + _vj_server_del_client( v->vjs[3], i ); +} + +void vj_event_quit(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + veejay_msg(VEEJAY_MSG_INFO, "Remote requested session-end, quitting Veejay"); + veejay_change_state(v, LAVPLAY_STATE_STOP); +} + +void vj_event_sample_mode(void *ptr, const char format[], va_list ap) +{ +} + +void vj_event_set_framerate( void *ptr, const char format[] , va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *s = NULL; + + P_A(args,s,format,ap); + + float new_fps = (float) args[0] * 0.01; + + if(new_fps == 0.0 ) + new_fps = v->current_edit_list->video_fps; + + veejay_set_framerate( v, new_fps ); + + veejay_msg(VEEJAY_MSG_INFO, "Playback engine is now playing at %2.2f FPS", new_fps ); +} + +void vj_event_sync_correction( void *ptr,const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *s = NULL; + + P_A(args,s,format,ap); + + if(args[0] == 0 ) + { + v->sync_correction = 0; + veejay_msg(VEEJAY_MSG_INFO, "Sync correction disabled"); + } + else if( args[0] == 1 ) + { + v->sync_correction = 1; + veejay_msg(VEEJAY_MSG_INFO, "Sync correction enabled"); + } + +} + +void vj_event_bezerk(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if(v->no_bezerk) v->no_bezerk = 0; else v->no_bezerk = 1; + if(v->no_bezerk==1) + veejay_msg(VEEJAY_MSG_INFO,"Bezerk On :No sample-restart when changing input channels"); + else + veejay_msg(VEEJAY_MSG_INFO,"Bezerk Off :Sample-restart when changing input channels"); +} +void vj_event_no_caching(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if(v->no_caching) + v->no_caching = 0; + else + v->no_caching = 1; + + if(v->no_caching==1) + { + vj_el_break_cache( v->current_edit_list ); + veejay_msg(VEEJAY_MSG_INFO,"Sample FX Cache disabled: Grabbing all samples on FX chain"); + + } + else + { + vj_el_setup_cache( v->current_edit_list ); + veejay_msg(VEEJAY_MSG_INFO,"Sample FX Cache enabled : Recycling identicial samples in FX chain (default)"); + } + + vj_el_set_caching(v->no_caching); +} + +void vj_event_debug_level(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if(v->verbose) v->verbose = 0; else v->verbose = 1; + veejay_set_debug_level( v->verbose ); + if(v->verbose) + veejay_msg(VEEJAY_MSG_INFO, "Displaying debug information" ); + else + veejay_msg(VEEJAY_MSG_INFO, "Not displaying debug information"); +} + +void vj_event_suspend(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + veejay_change_state(v, LAVPLAY_STATE_PAUSED); + veejay_msg(VEEJAY_MSG_WARNING, "Suspending veejay"); +} + +void vj_event_set_play_mode_go(void *ptr, const char format[], va_list ap) +{ + int args[2]; + veejay_t *v = (veejay_t*) ptr; + char *s = NULL; + + P_A(args,s,format,ap); + if(vj_event_valid_mode(args[0])) + { + if(args[0] == VJ_PLAYBACK_MODE_PLAIN) + { + if( vj_has_video(v) ) + veejay_change_playback_mode(v, args[0], 0); + else + veejay_msg(VEEJAY_MSG_ERROR, + "There are no video files in the editlist"); + return; + } + + if(args[0] == VJ_PLAYBACK_MODE_SAMPLE) + { + if(args[1]==0) args[1] = v->uc->sample_id; + if(args[1]==-1) args[1] = sample_size()-1; + if(sample_exists(args[1])) + { + veejay_change_playback_mode(v,args[0] ,args[1]); + } + else + { + p_no_sample(args[1]); + } + } + if(args[0] == VJ_PLAYBACK_MODE_TAG) + { + if(args[1]==0) args[1] = v->uc->sample_id; + if(args[1]==-1) args[1] = vj_tag_size()-1; + if(vj_tag_exists(args[1])) + { + veejay_change_playback_mode(v,args[0],args[1]); + } + else + { + p_no_tag(args[1]); + } + } + } + else + { + p_invalid_mode(); + } +} + + + +void vj_event_set_rgb_parameter_type(void *ptr, const char format[], va_list ap) +{ + + int args[2]; + char *s = NULL; + P_A(args,s,format,ap); + if(args[0] >= 0 && args[0] <= 3 ) + { + rgb_parameter_conversion_type_ = args[0]; + if(args[0] == 0) + veejay_msg(VEEJAY_MSG_INFO,"GIMP's RGB -> YUV"); + if(args[1] == 1) + veejay_msg(VEEJAY_MSG_INFO,"CCIR601 RGB -> YUV"); + if(args[2] == 2) + veejay_msg(VEEJAY_MSG_INFO,"Broken RGB -> YUV"); + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Use: 0=GIMP , 1=CCIR601, 2=Broken"); + } +} + +void vj_event_effect_set_bg(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + v->uc->take_bg = 1; + veejay_msg(VEEJAY_MSG_INFO, "Next frame will be taken for static background\n"); +} + +void vj_event_send_keylist( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + unsigned int i,len=0; + char message[256]; + char *blob = vj_calloc( 1024 * 32 ); + char line[512]; + char header[7]; + int skip = 0; + if(!hash_isempty( keyboard_events )) + { + hscan_t scan; + hash_scan_begin( &scan, keyboard_events ); + hnode_t *node; + while( ( node = hash_scan_next(&scan)) != NULL ) + { + vj_keyboard_event *ev = NULL; + ev = hnode_get( node ); + if(ev) + { + if( ev->event_id >= VIMS_BUNDLE_START && ev->event_id < VIMS_BUNDLE_END ) + { + skip = 1; + if( vj_event_bundle_exists(ev->event_id)) + { + vj_msg_bundle *mm = vj_event_bundle_get( ev->event_id); + if( mm->bundle ) { skip = 0; snprintf(message, 256, "%s", mm->bundle ); } + } + } + else + { + if(ev->arguments) + snprintf(message,256, "%03d:%s;", ev->event_id,ev->arguments); + else + snprintf(message,256, "%03d:;", ev->event_id ); + } + + if(!skip) + { + snprintf( line, 512, "%04d%03d%03d%03d%s", + ev->event_id, ev->key_mod, ev->key_symbol, strlen(message), message ); + int line_len = strlen(line); + len += line_len; + veejay_strncat( blob, line, line_len); + } + skip = 0; + } + } + } + + sprintf( header, "%06d", len ); + + SEND_MSG( v, header ); + SEND_MSG( v, blob ); + + free( blob ); + +} + +static int min_bundles_len(veejay_t *v ) +{ + vj_msg_bundle *m; + int i; + int len = 0; + const int token_len = 20; + char tmp[1024]; + char *buf = NULL; + + for( i = 0; i <= 600 ; i ++ ) + { + if( i >= VIMS_BUNDLE_START && i < VIMS_BUNDLE_END ) + { + if(!vj_event_bundle_exists(i)) + continue; + + len += token_len; + m = vj_event_bundle_get(i); + len += strlen( m->bundle ); + + } + else + { + if( !vj_event_exists(i) || (i >= 400 && i < VIMS_BUNDLE_START)) + continue; + + char *name = vj_event_vevo_get_event_name(i); + char *form = vj_event_vevo_get_event_format(i); + + len += token_len; + len += strlen(name); + + int form_len = (form ? strlen( form ): 0); + int name_len = (name ? strlen(name) : 0); +#ifdef HAVE_SDL + vims_key_list *tree = vj_event_get_keys( i ); + while( tree != NULL ) + { + vims_key_list *this = tree; + len += tree->arg_len; + len += form_len; + len += token_len; + len += name_len; + tree = tree->next; + free(this); + } + +#endif + free(name); + if(form) free(form); + } + } + return len; +} + +void vj_event_send_bundles(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + vj_msg_bundle *m; + int i; + const int token_len = 20; + char tmp[1024]; + + int len = min_bundles_len(v); +#ifdef STRICT_CHECKING + int consumed_len = len; +#endif + + if( len <= 0 ) + { + SEND_MSG(v, "000000"); + return; + } + + char *buf = vj_calloc( len+6+64 ); + + int rc = 0; + + for( i = 0; i <= 600 ; i ++ ) + { + if( i >= VIMS_BUNDLE_START && i < VIMS_BUNDLE_END ) + { + if(!vj_event_bundle_exists(i)) + continue; + + m = vj_event_bundle_get(i); +#ifdef STRICT_CHECKING + assert( m!= NULL); +#endif + int bun_len = strlen(m->bundle); + + sprintf(tmp, "%04d%03d%03d%04d%s%03d%03d", + i, m->accelerator, m->modifier, bun_len, m->bundle, 0,0 ); + + veejay_strncat( buf, tmp, strlen(tmp) ); +#ifdef STRICT_CHECKING + consumed_len -= strlen(tmp); + assert( consumed_len > 0 ); +#endif + } + else + { + if( !vj_event_exists(i) || (i >= 400 && i < VIMS_BUNDLE_START) ) + continue; + + char *name = vj_event_vevo_get_event_name(i); + char *form = vj_event_vevo_get_event_format(i); +#ifdef STRICT_CHECKING + assert( name != NULL ); +#endif + int name_len = strlen(name); + int form_len = (form ? strlen(form) : 0); +#ifdef HAVE_SDL + vims_key_list *tree = vj_event_get_keys( i ); + while( tree != NULL ) + { + vims_key_list *this = tree; + sprintf(tmp, "%04d%03d%03d%04d%s%03d%03d", + i, tree->key_symbol, tree->key_mod, name_len, name, form_len, tree->arg_len ); + veejay_strncat( buf,tmp,strlen(tmp)); +#ifdef STRICT_CHECKING + if( tree->arg_len ) + assert( tree->args != NULL ); +#endif + if(form) + veejay_strncat( buf, form, form_len); + if(tree->arg_len) + veejay_strncat( buf, tree->args, tree->arg_len ); +#ifdef STRICT_CHECKING + consumed_len -= strlen(tmp); + consumed_len -= form_len; + consumed_len -= tree->arg_len; + assert( consumed_len > 0 ); +#endif + tree = tree->next; + free(this); + } + +#endif + free(name); + if(form) + free(form); + + } + } + +#ifdef STRICT_CHECKING + assert( consumed_len >= 0 ); +#endif + int pack_len = strlen( buf ); + char header[7]; + sprintf(header, "%06d", pack_len ); + SEND_MSG(v, header); + SEND_MSG(v,buf); + + if(buf) free(buf); + +} + +void vj_event_send_vimslist(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + char *buf = vj_event_vevo_list_serialize(); + SEND_MSG(v,buf); + if(buf) free(buf); +} + +void vj_event_send_devicelist( void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + + char *buf = vj_tag_scan_devices(); + SEND_MSG( v, buf ); + free(buf); +} + + +void vj_event_sample_select(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *s = NULL; + P_A( args, s , format, ap); + + if(args[0] == 0 ) + { + args[0] = v->uc->sample_id; + } + if(args[0] == -1) + { + args[0] = sample_size()-1; + } + if(sample_exists(args[0])) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_SAMPLE,args[0] ); + } + else + { + p_no_sample(args[0]); + } +} + +void vj_event_tag_select(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *s = NULL; + P_A( args, s , format, ap); + + if(args[0] == 0 ) + { + args[0] = v->uc->sample_id; + } + if(args[0]==-1) + { + args[0] = vj_tag_size()-1; + } + + if(vj_tag_exists(args[0])) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_TAG,args[0]); + } + else + { + p_no_tag(args[0]); + } +} + + +void vj_event_switch_sample_tag(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + + if(!STREAM_PLAYING(v) && !SAMPLE_PLAYING(v)) + { + if(sample_exists(v->last_sample_id)) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_SAMPLE, v->last_sample_id); + return; + } + if(vj_tag_exists(v->last_tag_id)) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_TAG, v->last_tag_id); + return; + } + if(sample_size()-1 <= 0) + { + if(vj_tag_exists( vj_tag_size()-1 )) + { + veejay_change_playback_mode( v, VJ_PLAYBACK_MODE_TAG, vj_tag_size()-1); + return; + } + } + } + + if(SAMPLE_PLAYING(v)) + { + if(vj_tag_exists(v->last_tag_id)) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_TAG, v->last_tag_id); + } + else + { + int id = vj_tag_size() - 1; + if(id) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_TAG,id); + } + else + { + p_no_tag(id); + } + } + } + else + if(STREAM_PLAYING(v)) + { + if(sample_exists(v->last_sample_id) ) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_SAMPLE, v->last_sample_id); + } + else + { + int id = sample_size() - 1; + if(id) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_SAMPLE,id); + } + else + { + p_no_sample(id); + } + } + } +} + +void vj_event_set_volume(void *ptr, const char format[], va_list ap) +{ + int args[1]; + char *s = NULL; + P_A(args,s,format,ap) + if(args[0] >= 0 && args[0] <= 100) + { +#ifdef HAVE_JACK + if(vj_jack_set_volume(args[0])) + { + veejay_msg(VEEJAY_MSG_INFO, "Volume set to %d", args[0]); + } +#else + veejay_msg(VEEJAY_MSG_ERROR, "Audio support not compiled in"); +#endif + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Use a value between 0-100 for audio volume"); + } +} +void vj_event_set_play_mode(void *ptr, const char format[], va_list ap) +{ + int args[1]; + char *s = NULL; + veejay_t *v = (veejay_t*) ptr; + P_A(args,s,format,ap); + + if(vj_event_valid_mode(args[0])) + { + int mode = args[0]; + /* check if current playing ID is valid for this mode */ + if(mode == VJ_PLAYBACK_MODE_SAMPLE) + { + int last_id = sample_size()-1; + if(last_id == 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "There are no samples. Cannot switch to sample mode"); + return; + } + if(!sample_exists(v->last_sample_id)) + { + v->uc->sample_id = last_id; + } + if(sample_exists(v->uc->sample_id)) + { + veejay_change_playback_mode( v, VJ_PLAYBACK_MODE_SAMPLE, v->uc->sample_id ); + } + } + if(mode == VJ_PLAYBACK_MODE_TAG) + { + int last_id = vj_tag_size()-1; + if(last_id == 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "There are no streams. Cannot switch to stream mode"); + return; + } + + if(!vj_tag_exists(v->last_tag_id)) /* jump to last used Tag if ok */ + { + v->uc->sample_id = last_id; + } + if(vj_tag_exists(v->uc->sample_id)) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_TAG, v->uc->sample_id); + } + } + if(mode == VJ_PLAYBACK_MODE_PLAIN) + { + if(vj_has_video(v) ) + veejay_change_playback_mode( v, VJ_PLAYBACK_MODE_PLAIN, 0); + else + veejay_msg(VEEJAY_MSG_ERROR, + "There are no video files in the editlist"); + } + } + else + { + p_invalid_mode(); + } + +} + +void vj_event_sample_new(void *ptr, const char format[], va_list ap) +{ + int new_id = 0; + veejay_t *v = (veejay_t*) ptr; + if(PLAIN_PLAYING(v)) + { + int args[2]; + char *s = NULL; + int num_frames = v->edit_list->total_frames; + P_A(args,s,format,ap); + + if(args[0] < 0) + { + /* count from last frame */ + int nframe = args[0]; + args[0] = v->edit_list->total_frames + nframe; + } + if(args[1] == 0) + { + args[1] = v->edit_list->total_frames; + } + + if(args[0] >= 0 && args[1] > 0 && args[0] <= args[1] && args[0] <= num_frames && + args[1] <= num_frames ) + { + editlist *el = veejay_edit_copy_to_new( v, v->edit_list, args[0],args[1] ); + if(!el) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cant copy EDL"); + return; + } + int start = 0; + int end = el->total_frames; + + sample_info *skel = sample_skeleton_new(start, end ); + if(skel) + { + //skel->edit_list = vj_el_clone( v->edit_list ); + skel->edit_list = el; + if(!skel->edit_list) + veejay_msg(VEEJAY_MSG_ERROR, "Failed to copy EDL !!"); + } + + if(sample_store(skel)==0) + { + veejay_msg(VEEJAY_MSG_INFO, "Created new sample [%d] with EDL", skel->sample_id); +// sample_set_looptype(skel->sample_id,1); + new_id = skel->sample_id; + } + + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid frame range given : %d - %d , range is %d - %d", + args[0],args[1], 1,num_frames); + } + } + else + { + p_invalid_mode(); + } + + vj_event_send_new_id( v, new_id); + +} + +void vj_event_fullscreen(void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *s = NULL; + P_A(args,s,format,ap); + // parsed display num!! -> index of SDL array + + //int id = args[0]; + int id = 0; + int status = args[0]; + + switch(v->video_out) + { + case 4: +#ifdef HAVE_GL + { + int go_fs = x_display_get_fs( v->gl ) == 1 ? 0:1; + x_display_set_fullscreen( v->gl, go_fs ); + v->settings->full_screen = go_fs; + } +#endif + break; + case 1: + case 0: +#ifdef HAVE_SDL + { + int go_fs = v->sdl[id]->fs == 1 ? 0:1 ; + char *caption = veejay_title(); + v->settings->full_screen = go_fs; + vj_sdl_free(v->sdl[id]); + vj_sdl_init( + v->settings->ncpu, + v->sdl[id], + v->bes_width, + v->bes_height, + caption, + 1, + go_fs + ); + free(caption); + } +#endif + break; + default: + break; + } + veejay_msg(VEEJAY_MSG_INFO,"Video screen is %s", + (v->settings->full_screen ? "full screen" : "windowed")); + +} + + +void vj_event_set_screen_size(void *ptr, const char format[], va_list ap) +{ + int args[5]; + veejay_t *v = (veejay_t*) ptr; + char *s = NULL; + + P_A(args,s,format,ap); + + int id = 0; + int w = args[0]; + int h = args[1]; + int x = args[2]; + int y = args[3]; + + if( w < 0 || w > 4096 || h < 0 || h > 4096 || x < 0 || y < 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid arguments '%d %d %d %d'", w,h,x,y ); + return; + } + + if( w == 0 && h == 0 ) + { + switch( v->video_out ) + { + case 0: +#ifdef HAVE_SDL + if( v->sdl[id] ) + { + vj_sdl_free( v->sdl[id] ); + free(v->sdl[id]); + v->sdl[id] = NULL; + v->video_out = 5; + vj_sdl_quit(); + veejay_msg(VEEJAY_MSG_INFO, "Closed SDL window"); + return; + } +#endif + break; + case 4: + veejay_msg(VEEJAY_MSG_INFO, "Not yet implemented!"); + return; + break; + case 5: + break; + } + } + else + { + char *title = veejay_title(); + + switch( v->video_out ) + { + case 5: +#ifdef HAVE_SDL + if(!v->sdl[id] ) + { + v->sdl[id] = vj_sdl_allocate( + v->video_output_width, + v->video_output_height, + v->pixel_format ); + veejay_msg(VEEJAY_MSG_INFO, "Allocated SDL window"); + + if(vj_sdl_init( v->settings->ncpu, + v->sdl[id], + v->bes_width, + v->bes_height, + title, + 1, + v->settings->full_screen ) + ) { + veejay_msg(VEEJAY_MSG_INFO, "Opened SDL Video Window of size %d x %d", w, h ); + v->video_out = 0; + } + } +#endif + case 0: +#ifdef HAVE_SDL + if( x > 0 && y > 0 ) + vj_sdl_set_geometry(v->sdl[id],x,y); + + if( w > 0 && h > 0 ) + vj_sdl_resize( v->sdl[id], w, h, v->settings->full_screen ); +#endif + break; + + case 4: +#ifdef HAVE_GL + if( w > 0 && h > 0 ) + x_display_resize(w,h,w,h); +#endif + break; + } + free(title); + } +} + +void vj_event_play_stop(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if(!STREAM_PLAYING(v)) + { + int speed = v->settings->current_playback_speed; + veejay_set_speed(v, (speed == 0 ? 1 : 0 )); + veejay_msg(VEEJAY_MSG_INFO,"Video is %s", (speed==0 ? "paused" : "playing")); + } + else + { + p_invalid_mode(); + } +} + + +void vj_event_play_reverse(void *ptr,const char format[],va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + if(!STREAM_PLAYING(v)) + { + int speed = v->settings->current_playback_speed; + if( speed == 0 ) speed = -1; + else + if(speed > 0) speed = -(speed); + veejay_set_speed(v, + speed ); + + veejay_msg(VEEJAY_MSG_INFO, "Video is playing in reverse at speed %d.", speed); + } + else + { + p_invalid_mode(); + } +} + +void vj_event_play_forward(void *ptr, const char format[],va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + if(!STREAM_PLAYING(v)) + { + int speed = v->settings->current_playback_speed; + if(speed == 0) speed = 1; + else if(speed < 0 ) speed = -1 * speed; + + veejay_set_speed(v, + speed ); + + veejay_msg(VEEJAY_MSG_INFO, "Video is playing forward at speed %d" ,speed); + } + else + { + p_invalid_mode(); + } +} + +void vj_event_play_speed(void *ptr, const char format[], va_list ap) +{ + int args[2]; + veejay_t *v = (veejay_t*) ptr; + if(!STREAM_PLAYING(v)) + { + char *s = NULL; + int speed = 0; + P_A(args,s,format,ap); + veejay_set_speed(v, args[0] ); + speed = v->settings->current_playback_speed; + veejay_msg(VEEJAY_MSG_INFO, "Video is playing at speed %d now (%s)", + speed, speed == 0 ? "paused" : speed < 0 ? "reverse" : "forward" ); + } + else + { + p_invalid_mode(); + } +} + +void vj_event_play_speed_kb(void *ptr, const char format[], va_list ap) +{ + int args[2]; + veejay_t *v = (veejay_t*) ptr; + if(!STREAM_PLAYING(v)) + { + char *s = NULL; + P_A(args,s,format,ap); + + int speed = abs(args[0]); + if( v->settings->current_playback_speed < 0 ) + veejay_set_speed( v, -1 * speed ); + else + veejay_set_speed(v, speed ); + speed = v->settings->current_playback_speed; + veejay_msg(VEEJAY_MSG_INFO, "Video is playing at speed %d now (%s)", + speed, speed == 0 ? "paused" : speed < 0 ? "reverse" : "forward" ); + } + else + { + p_invalid_mode(); + } +} + + + +void vj_event_play_slow(void *ptr, const char format[],va_list ap) +{ + int args[1]; + veejay_t *v = (veejay_t*)ptr; + char *s = NULL; + P_A(args,s,format,ap); + + if(PLAIN_PLAYING(v) || SAMPLE_PLAYING(v)) + { + if(veejay_set_framedup(v, args[0])) + { + veejay_msg(VEEJAY_MSG_INFO,"A/V frames will be repeated %d times ",args[0]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to set frame repeat of %d", args[0]); + } + } + else + { + p_invalid_mode(); + } + +} + + +void vj_event_set_frame(void *ptr, const char format[], va_list ap) +{ + int args[1]; + veejay_t *v = (veejay_t*) ptr; + if(!STREAM_PLAYING(v)) + { + video_playback_setup *s = v->settings; + char *str = NULL; + P_A(args,str,format,ap); + if(args[0] == -1 ) + args[0] = v->edit_list->total_frames; + veejay_set_frame(v, args[0]); + } + else + { + p_invalid_mode(); + } +} + + +void vj_event_projection_dec( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + if( v->settings->composite ) + viewport_projection_inc( composite_get_vp( v->composite ), -1, vj_perform_get_width(v), vj_perform_get_height(v) ); +} +void vj_event_projection_inc( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + if( v->settings->composite ) + viewport_projection_inc( composite_get_vp( v->composite) , 1, vj_perform_get_width(v), vj_perform_get_height(v) ); +} + +void vj_event_inc_frame(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *s = NULL; + P_A( args,s,format, ap ); + if(!STREAM_PLAYING(v)) + { + video_playback_setup *s = v->settings; + veejay_set_frame(v, (s->current_frame_num + args[0])); + veejay_msg(VEEJAY_MSG_INFO, "Skip to frame %d", s->current_frame_num); + } + else + { + p_invalid_mode(); + } +} + +void vj_event_dec_frame(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *) ptr; + int args[1]; + char *s = NULL; + P_A( args,s,format, ap ); + if(!STREAM_PLAYING(v)) + { + video_playback_setup *s = v->settings; + veejay_set_frame(v, (s->current_frame_num - args[0])); + veejay_msg(VEEJAY_MSG_INFO, "Skip to frame %d", s->current_frame_num); + } + else + { + p_invalid_mode(); + } +} + +void vj_event_prev_second(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + int args[1]; + char *s = NULL; + P_A( args,s,format, ap ); + if(!STREAM_PLAYING(v)) + { + video_playback_setup *s = v->settings; + veejay_set_frame(v, (s->current_frame_num - (int) + (args[0] * v->edit_list->video_fps))); + veejay_msg(VEEJAY_MSG_INFO, "Skip to frame %d", s->current_frame_num ); + } + else + { + p_invalid_mode(); + } +} + +void vj_event_next_second(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + int args[1]; + char *str = NULL; + P_A( args,str,format, ap ); + if(!STREAM_PLAYING(v)) + { + video_playback_setup *s = v->settings; + veejay_set_frame(v, (s->current_frame_num + (int) + ( args[0] * v->edit_list->video_fps))); + veejay_msg(VEEJAY_MSG_INFO, "Skip to frame %d", s->current_frame_num ); + } + else + { + p_invalid_mode(); + } +} + + +void vj_event_sample_start(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + video_playback_setup *s = v->settings; + if(SAMPLE_PLAYING(v) || PLAIN_PLAYING(v)) + { + v->uc->sample_start = s->current_frame_num; + veejay_msg(VEEJAY_MSG_INFO, "Change sample starting position to %ld", v->uc->sample_start); + } + else + { + p_invalid_mode(); + } +} + + + +void vj_event_sample_end(void *ptr, const char format[] , va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + video_playback_setup *s = v->settings; + if(PLAIN_PLAYING(v)) + { + v->uc->sample_end = s->current_frame_num; + if( v->uc->sample_end > v->uc->sample_start) { + long vstart = v->uc->sample_start; + long vend = v->uc->sample_end; + long devia = (long) v->current_edit_list->video_fps * 2; + vstart -= devia; + vend += devia; + + long start_dif = devia; + long end_dif = (v->uc->sample_end - v->uc->sample_start); + if(vstart < 0 ) { vstart=0; start_dif = v->uc->sample_start; } + if(vend > v->current_edit_list->total_frames) { + vend = v->current_edit_list->total_frames; + } + + editlist *el = veejay_edit_copy_to_new( v, v->current_edit_list, vstart, vend ); + if(!el) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to clone current editlist!"); + return; + } + + int start = (int) start_dif; + int end = (int) end_dif + start; + + sample_info *skel = sample_skeleton_new(start,end); + if(!skel) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create new sample!"); + return; + } + + v->uc->sample_start = v->uc->sample_end; + skel->edit_list = el; + + if(sample_store(skel)==0) { + veejay_msg(VEEJAY_MSG_INFO,"Created new Sample %d\t [%ld] | %ld-%ld | [%ld]", + skel->sample_id, + 0, + start, + end, + el->total_frames); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR,"Unable to create new sample"); + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample ending position before starting position. Cannot create new sample"); + } + } + else + { + p_invalid_mode(); + } + +} + +void vj_event_goto_end(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if(STREAM_PLAYING(v)) + { + p_invalid_mode(); + return; + } + if(SAMPLE_PLAYING(v)) + { + veejay_set_frame(v, sample_get_endFrame(v->uc->sample_id)); + veejay_msg(VEEJAY_MSG_INFO, "Goto sample's endings position"); + } + if(PLAIN_PLAYING(v)) + { + veejay_set_frame(v,v->edit_list->total_frames); + veejay_msg(VEEJAY_MSG_INFO, "Goto frame %ld of edit decision list", + v->edit_list->total_frames); + } +} + +void vj_event_goto_start(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if(STREAM_PLAYING(v)) + { + p_invalid_mode(); + return; + } + if( SAMPLE_PLAYING(v)) + { + veejay_set_frame(v, sample_get_startFrame(v->uc->sample_id)); + veejay_msg(VEEJAY_MSG_INFO, "Goto sample's starting position"); + } + if ( PLAIN_PLAYING(v)) + { + veejay_set_frame(v,0); + veejay_msg(VEEJAY_MSG_INFO, "Goto first frame of edit decision list"); + } +} + +void vj_event_sample_rand_start( void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + video_playback_setup *settings = v->settings; + int args[2]; + char *s = NULL; + P_A(args,s,format,ap); + + if(args[0] == RANDTIMER_FRAME) + settings->randplayer.timer = RANDTIMER_FRAME; + else + settings->randplayer.timer = RANDTIMER_LENGTH; + + + settings->randplayer.mode = RANDMODE_SAMPLE; + + vj_perform_randomize(v); + veejay_msg(VEEJAY_MSG_INFO, "Started sample randomizer, %s", + (settings->randplayer.timer == RANDTIMER_FRAME ? "freestyling" : "playing full length of gambled samples")); +} + +void vj_event_sample_rand_stop( void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + video_playback_setup *settings = v->settings; + + if(settings->randplayer.mode != RANDMODE_INACTIVE) + veejay_msg(VEEJAY_MSG_INFO, "Stopped sample randomizer"); + else + veejay_msg(VEEJAY_MSG_ERROR, "Sample randomizer not started"); + settings->randplayer.mode = RANDMODE_INACTIVE; +} + +void vj_event_sample_set_loop_type(void *ptr, const char format[], va_list ap) +{ + int args[2]; + veejay_t *v = (veejay_t*) ptr; + char *s = NULL; + P_A(args,s,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0) + { + args[0] = v->uc->sample_id; + } + if(args[0] == -1) args[0] = sample_size()-1; + + if(args[1] == -1) + { + if(sample_exists(args[0])) + { + if(sample_get_looptype(args[0])==2) + { + int lp; + sample_set_looptype(args[0],1); + lp = sample_get_looptype(args[0]); + veejay_msg(VEEJAY_MSG_INFO, "Sample %d loop type is now %s",args[0], + ( lp==1 ? "Normal Looping" : (lp==2 ? "Pingpong Looping" : "No Looping" ) ) ); + return; + } + else + { + int lp; + sample_set_looptype(args[0],2); + lp = sample_get_looptype(args[0]); + veejay_msg(VEEJAY_MSG_INFO, "Sample %d loop type is now %s",args[0], + ( lp==1 ? "Normal Looping" : lp==2 ? "Pingpong Looping" : "No Looping" ) ); + return; + } + } + else + { + p_no_sample(args[0]); + return; + } + } + + if(args[1] >= 0 && args[1] <= 3) + { + if(sample_exists(args[0])) + { + int lp; + sample_set_looptype( args[0] , args[1]); + lp = sample_get_looptype(args[0]); + switch(lp) + { + case 0: veejay_msg(VEEJAY_MSG_INFO, "Play once");break; + case 1: veejay_msg(VEEJAY_MSG_INFO, "Normal looping");break; + case 2: veejay_msg(VEEJAY_MSG_INFO, "Pingpong looping");break; + case 3: veejay_msg(VEEJAY_MSG_INFO, "Random frame");break; + } + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample %d does not exist or invalid looptype %d",args[1],args[0]); + } +} + +void vj_event_sample_set_speed(void *ptr, const char format[], va_list ap) +{ + int args[2]; + veejay_t *v = (veejay_t*) ptr; + char *s = NULL; + P_A(args, s, format, ap); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == -1) + args[0] = sample_size() - 1; + + if( args[0] == 0) + args[0] = v->uc->sample_id; + + if( sample_set_speed(args[0], args[1]) != -1) + { + veejay_msg(VEEJAY_MSG_INFO, "Changed speed of sample %d to %d",args[0],args[1]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Speed %d it too high to set on sample %d !", + args[1],args[0]); + } + } + else + { + p_invalid_mode(); + } +} + +void vj_event_sample_set_marker_start(void *ptr, const char format[], va_list ap) +{ + int args[2]; + veejay_t *v = (veejay_t*)ptr; + + char *str = NULL; + P_A(args,str,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0) + { + args[0] = v->uc->sample_id; + } + + if(args[0] == -1) args[0] = sample_size()-1; + + if( sample_exists(args[0]) ) + { + int start = 0; int end = 0; + if ( sample_get_el_position( args[0], &start, &end ) ) + { + if( sample_set_marker_start( args[0], args[1] ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Sample %d marker starting position set at %d", args[0],args[1]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot set marker position %d for sample %d (limits are %d - %d)",args[1],args[0],start,end); + } + } + } + else + { + p_no_sample( args[0] ); + } +} + + +void vj_event_sample_set_marker_end(void *ptr, const char format[], va_list ap) +{ + int args[2]; + veejay_t *v = (veejay_t*) ptr; + + char *str = NULL; + P_A(args,str,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0 ) + args[0] = v->uc->sample_id; + + if(args[0] == -1) + args[0] = sample_size()-1; + + if( sample_exists(args[0]) ) + { + int start = 0; int end = 0; + if ( sample_get_el_position( args[0], &start, &end ) ) + { + args[1] = end - args[1]; // add sample's ending position + if( sample_set_marker_end( args[0], args[1] ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Sample %d marker ending position set at position %d", args[0],args[1]); + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Marker position out side of sample boundaries"); + } + } + } + else + { + p_no_sample(args[0]); + } +} + + +void vj_event_sample_set_marker(void *ptr, const char format[], va_list ap) +{ + int args[3]; + veejay_t *v = (veejay_t*) ptr; + char *s = NULL; + P_A(args,s,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0) + { + args[0] = v->uc->sample_id; + } + if(args[0] == -1) args[0] = sample_size()-1; + + if( sample_exists(args[0]) ) + { + int start = 0; + int end = 0; + if( sample_get_el_position( args[0], &start, &end ) ) + { + if( sample_set_marker( args[0], args[1],args[2] ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Sample %d marker starting position at %d, ending position at %d", args[0],args[1],args[2]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot set marker %d-%d for sample %d",args[1],args[2],args[0]); + } + } + } + else + { + p_no_sample( args[0] ); + } +} + + +void vj_event_sample_set_marker_clear(void *ptr, const char format[],va_list ap) +{ + int args[1]; + veejay_t *v = (veejay_t*) ptr; + char *s = NULL; + P_A(args,s,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0) + args[0] = v->uc->sample_id; + + if(args[0] == -1) args[0] = sample_size()-1; + + if( sample_exists(args[0]) ) + { + if( sample_marker_clear( args[0] ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Sample %d marker cleared", args[0]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot set marker %d-%d for sample %d",args[1],args[2],args[0]); + } + } + else + { + p_no_sample(args[0]); + } +} + +void vj_event_sample_set_dup(void *ptr, const char format[], va_list ap) +{ + int args[2]; + veejay_t *v = (veejay_t*) ptr; + char *s = NULL; + P_A(args,s,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0) + args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = sample_size()-1; + + if( sample_exists(args[0])) + { + if( sample_set_framedup( args[0], args[1] ) != -1) + { + veejay_msg(VEEJAY_MSG_INFO, "Sample %d frame repeat set to %d", args[0],args[1]); + if( args[0] == v->uc->sample_id) + { + if(veejay_set_framedup(v, args[1])) + { + veejay_msg(VEEJAY_MSG_INFO, + "Video frame will be duplicated %d to output",args[1]); + } + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR,"Cannot set frame repeat to %d for sample %d",args[0],args[1]); + } + } + else + { + p_no_sample(args[0]); + } +} + +void vj_event_tag_set_descr( void *ptr, const char format[], va_list ap) +{ + char str[TAG_MAX_DESCR_LEN]; + int args[2]; + veejay_t *v = (veejay_t*) ptr; + P_A(args,str,format,ap); + + if(!STREAM_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0 ) + args[0] = v->uc->sample_id; + + if(args[0] == -1) + args[0] = vj_tag_size()-1; + + if( vj_tag_set_description(args[0],str) == 1) + veejay_msg(VEEJAY_MSG_INFO, "Changed stream title to '%s'", str ); + else + veejay_msg(VEEJAY_MSG_ERROR, "Cannot change title of stream %d to '%s'", args[0], str ); +} + +void vj_event_sample_set_descr(void *ptr, const char format[], va_list ap) +{ + char str[SAMPLE_MAX_DESCR_LEN]; + int args[5]; + veejay_t *v = (veejay_t*) ptr; + P_A(args,str,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0 ) + args[0] = v->uc->sample_id; + + if(args[0] == -1) args[0] = sample_size()-1; + + if(sample_set_description(args[0],str) == 0) + veejay_msg(VEEJAY_MSG_INFO, "Changed sample title to %s",str); + else + veejay_msg(VEEJAY_MSG_ERROR, "Cannot change title of sample %d to '%s'", args[0],str ); +} + +#ifdef HAVE_XML2 +void vj_event_sample_save_list(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + char str[255]; + int *args = NULL; + P_A(args,str,format,ap); + if(sample_writeToFile( str, v->seq,v->font, v->uc->sample_id, v->uc->playback_mode) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Saved %d samples to file '%s'", sample_size()-1, str); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Error saving samples to file %s", str); + } +} + +void vj_event_sample_load_list(void *ptr, const char format[], va_list ap) +{ + char str[255]; + int *args = NULL; + veejay_t *v = (veejay_t*) ptr; + P_A( args, str, format, ap); + + int id = 0; + int mode = 0; + + if( sample_readFromFile( str, v->seq, v->font, v->edit_list, &id, &mode ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Loaded sample list from file '%s'", str); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to load samples from file '%s", str); + } +} +#endif + +void vj_event_sample_rec_start( void *ptr, const char format[], va_list ap) +{ + char tmp[255]; + veejay_t *v = (veejay_t *)ptr; + int args[2]; + int result = 0; + char *str = NULL; + char prefix[150]; + P_A(args,str,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + veejay_memset(tmp,0,255); + veejay_memset(prefix,0,150); + + if( !v->seq->active ) + { + sample_get_description(v->uc->sample_id, prefix ); + } + else + { + if( v->seq->rec_id ) + { + veejay_msg(0, "Already recording the sequence!"); + return; + } + else + { + v->seq->rec_id = v->uc->sample_id; + sprintf( prefix, "sequence_"); + } + } + + if(!veejay_create_temp_file(prefix, tmp)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create temporary file, Record aborted." ); + if(v->seq->rec_id && v->seq->active) + v->seq->rec_id = 0; + return; + } + + if( args[0] == 0 ) + { + if(!v->seq->active ) + { + args[0] = sample_get_longest(v->uc->sample_id); + } + else + { + int i; + for( i = 0; i < MAX_SEQUENCES; i ++ ) + { + args[0] += sample_get_longest( v->seq->samples[i] ); + } + } + veejay_msg(VEEJAY_MSG_DEBUG, "\tRecording %d frames", args[0]); + } + + int format_ = _recorder_format; + if(format_==-1) + { + veejay_msg(VEEJAY_MSG_ERROR,"Select a video codec first"); + if(v->seq->active && v->seq->rec_id ) + v->seq->rec_id = 0; + return; + } + + if(args[0] <= 1 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cowardly refusing to record less then 2 frames"); + if(v->seq->active && v->seq->rec_id ) + v->seq->rec_id = 0; + + return; + } + + if( sample_init_encoder( v->uc->sample_id, tmp, format_, v->edit_list, args[0]) == 1) + { + video_playback_setup *s = v->settings; + s->sample_record_id = v->uc->sample_id; + s->sample_record_switch = args[1]; + result = 1; + if(v->use_osd) + { + veejay_msg(VEEJAY_MSG_INFO,"Turned off OSD, recording now"); + v->use_osd = 0; + } + veejay_msg(VEEJAY_MSG_INFO, "Sample recording started , record %d frames from sample %d and %s", + args[0],s->sample_record_id, (args[1] == 1 ? "play new sample" : "dont play new sample" )); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR,"Unable to start sample recorder"); + } + + if(result == 1) + { + v->settings->sample_record = 1; + v->settings->sample_record_switch = args[1]; + } + + if( v->seq->active ) + { + int i; + int start_at = 0; + for( i = 0; i < MAX_SEQUENCES; i ++ ) + { + if ( sample_exists( v->seq->samples[i] )) + { + start_at = v->seq->samples[i]; + break; + } + } + if( start_at == v->uc->sample_id ) + veejay_set_frame(v,sample_get_startFrame(v->uc->sample_id)); + else + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_SAMPLE, start_at ); + } + else + { + veejay_set_frame(v, sample_get_startFrame(v->uc->sample_id)); + } +} + +void vj_event_sample_rec_stop(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + + if( SAMPLE_PLAYING(v)) + { + video_playback_setup *s = v->settings; + int stop_sample = v->uc->sample_id; + + if(v->seq->active && v->seq->rec_id ) + stop_sample = v->seq->rec_id; + + if( sample_stop_encoder( stop_sample ) == 1 ) + { + char avi_file[255]; + v->settings->sample_record = 0; + if( sample_get_encoded_file( stop_sample, avi_file) <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to append file '%s' to sample %d", avi_file, stop_sample); + } + else + { + // add to new sample + int ns = veejay_edit_addmovie_sample(v,avi_file,0 ); + if(ns > 0) + veejay_msg(VEEJAY_MSG_INFO, "Loaded file '%s' to new sample %d",avi_file, ns); + if(ns <= 0 ) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to append file %s to EditList!",avi_file); + + + sample_reset_encoder( stop_sample ); + s->sample_record = 0; + s->sample_record_id = 0; + if(v->seq->active && v->seq->rec_id ) + v->seq->rec_id = 0; + if(s->sample_record_switch) + { + s->sample_record_switch = 0; + if( ns > 0 ) + veejay_change_playback_mode( v,VJ_PLAYBACK_MODE_SAMPLE, ns ); + } + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample recorder was never started for sample %d",stop_sample); + } + } + else + { + p_invalid_mode(); + } +} + + +void vj_event_sample_set_num_loops(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + int args[2]; + char *s = NULL; + P_A(args,s,format,ap); + + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = sample_size()-1; + + if(sample_exists(args[0])) + { + + if( sample_set_loops(v->uc->sample_id, args[1])) + { veejay_msg(VEEJAY_MSG_INFO, "Setted %d no. of loops for sample %d", + sample_get_loops(v->uc->sample_id),args[0]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR,"Cannot set %d loops for sample %d",args[1],args[0]); + } + + } + else + { + p_no_sample(args[0]); + } +} + + +void vj_event_sample_rel_start(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + int args[4]; + //video_playback_setup *s = v->settings; + char *str = NULL; + int s_start; + int s_end; + + P_A(args,str,format,ap); + if(SAMPLE_PLAYING(v)) + { + + if(args[0] == 0) + args[0] = v->uc->sample_id; + + if(args[0] == -1) args[0] = sample_size()-1; + + if(!sample_exists(args[0])) + { + p_no_sample(args[0]); + return; + } + + s_start = sample_get_startFrame(args[0]) + args[1]; + s_end = sample_get_endFrame(args[0]) + args[2]; + + if (sample_set_startframe(args[0],s_start) && + sample_set_endframe(args[0],s_end)) + { + constrain_sample( v, args[0], s_start, s_end ); + veejay_msg(VEEJAY_MSG_INFO, "Sample update start %d end %d", + s_start,s_end); + } + } + else + { + p_invalid_mode(); + } + +} + +void vj_event_sample_set_start(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + int args[2]; + int mf; + video_playback_setup *s = v->settings; + char *str = NULL; + P_A(args,str,format,ap); + + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if(args[0] == 0) + args[0] = v->uc->sample_id; + if(args[0] == -1) + args[0] = sample_size()-1; + + if( args[0] <= 0 ) + return; + + if( args[1] < sample_get_endFrame(args[0])) { + if( sample_set_startframe(args[0],args[1] ) ) { + veejay_msg(VEEJAY_MSG_INFO, "Sample starting frame updated to frame %d", + sample_get_startFrame(args[0])); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to update sample %d 's starting position to %d",args[0],args[1]); + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample %d 's starting position %d must be greater than ending position %d.", + args[0],args[1], sample_get_endFrame(args[0])); + } +} + +void vj_event_sample_set_end(void *ptr, const char format[] , va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + int args[2]; + int mf; + video_playback_setup *s = v->settings; + char *str = NULL; + P_A(args,str,format,ap); + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if(args[0] == 0) + args[0] = v->uc->sample_id; + if(args[1] == -1) + args[1] = sample_video_length( args[0] ); + if(args[1] <= 0 ) + { + veejay_msg(0, "Impossible to set ending position %d for sample %d", args[1],args[0] ); + return; + } + if( args[1] >= sample_get_startFrame(v->uc->sample_id)) + { + if(sample_set_endframe(args[0],args[1])) + { + constrain_sample( v, args[0], + sample_get_startFrame(v->uc->sample_id), + sample_get_endFrame(v->uc->sample_id ) + ); + veejay_msg(VEEJAY_MSG_INFO,"Sample ending frame updated to frame %d", + sample_get_endFrame(args[0])); + } + else + { + veejay_msg(0, "Impossible to set ending position %d for sample %d", args[1],args[0] ); + } + } + else + { + veejay_msg(0, "Ending position must be greater then start position"); + } +} + +void vj_event_sample_del(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *s = NULL; + P_A(args,s,format,ap); + int deleted_sample = 0; + + if(SAMPLE_PLAYING(v) && v->uc->sample_id == args[0]) + { + veejay_msg(VEEJAY_MSG_INFO,"Cannot delete sample while playing"); + return; + } + + if(sample_del(args[0])) + { + veejay_msg(VEEJAY_MSG_INFO, "Deleted sample %d", args[0]); + deleted_sample = args[0]; + int i; + for( i = 0; i < MAX_SEQUENCES ; i ++ ) + if( v->seq->samples[i] == deleted_sample ) + v->seq->samples[i] = 0; + + sample_verify_delete( args[0] , 0 ); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to delete sample %d",args[0]); + } + vj_event_send_new_id( v, deleted_sample ); +} + +void vj_event_sample_copy(void *ptr, const char format[] , va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *s = NULL; + int new_sample =0; + P_A(args,s,format,ap); + + if( sample_exists(args[0] )) + { + new_sample = sample_copy(args[0]); + if(!new_sample) + veejay_msg(VEEJAY_MSG_ERROR, "Failed to copy sample %d.",args[0]); + } + vj_event_send_new_id( v, new_sample ); +} + +void vj_event_sample_clear_all(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if( !SAMPLE_PLAYING(v)) + { + sample_del_all(); + veejay_msg(VEEJAY_MSG_INFO,"Deleted all samples"); + } + else + { + p_invalid_mode(); + } +} + + + +void vj_event_chain_enable(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + if(SAMPLE_PLAYING(v)) + { + sample_set_effect_status(v->uc->sample_id, 1); + } + else + { + if(STREAM_PLAYING(v)) + { + vj_tag_set_effect_status(v->uc->sample_id, 1); + } + else + p_invalid_mode(); + } + veejay_msg(VEEJAY_MSG_INFO, "Enabled effect chain"); + +} + +void vj_event_stream_set_length( void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *s = NULL; + P_A(args,s,format,ap); + + if(STREAM_PLAYING(v)) + { + if(args[0] > 0 && args[0] < 999999 ) + { + vj_tag_set_n_frames(v->uc->sample_id, args[0]); + v->settings->max_frame_num = args[0]; + constrain_stream( v, v->uc->sample_id, (long) args[0]); + } + else + veejay_msg(VEEJAY_MSG_ERROR, "Ficticious length must be 0 - 999999"); + } + else + p_invalid_mode(); +} + +void vj_event_chain_disable(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + if(SAMPLE_PLAYING(v) ) + { + sample_set_effect_status(v->uc->sample_id, 0); + veejay_msg(VEEJAY_MSG_INFO, "Effect chain on Sample %d is disabled",v->uc->sample_id); + } + else + { + if(STREAM_PLAYING(v) ) + { + vj_tag_set_effect_status(v->uc->sample_id, 0); + veejay_msg(VEEJAY_MSG_INFO, "Effect chain on Stream %d is enabled",v->uc->sample_id); + } + else + p_invalid_mode(); + } +} + +void vj_event_sample_chain_enable(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[4]; + char *s = NULL; + P_A(args,s,format,ap); + if(!SAMPLE_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if(args[0] == 0) + { + args[0] = v->uc->sample_id; + } + + if(sample_exists(args[0])) + { + sample_set_effect_status(args[0], 1); + veejay_msg(VEEJAY_MSG_INFO, "Effect chain on Sample %d is enabled",args[0]); + } + else + p_no_sample(args[0]); + +} + +void vj_event_all_samples_chain_toggle(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *s = NULL; + P_A(args,s,format,ap); + if(SAMPLE_PLAYING(v)) + { + int i; + for(i=0; i < sample_size()-1; i++) + sample_set_effect_status( i, args[0] ); + veejay_msg(VEEJAY_MSG_INFO, "Effect Chain on all samples %s", (args[0]==0 ? "Disabled" : "Enabled")); + } + else + { + if(STREAM_PLAYING(v)) + { + int i; + for(i=0; i < vj_tag_size()-1; i++) + vj_tag_set_effect_status(i,args[0]); + veejay_msg(VEEJAY_MSG_INFO, "Effect Chain on all streams %s", (args[0]==0 ? "Disabled" : "Enabled")); + } + else + p_invalid_mode(); + } +} + + +void vj_event_tag_chain_enable(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[4]; + char *s = NULL; + P_A(args,s,format,ap); + + if(!STREAM_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0 ) + args[0] = v->uc->sample_id; + + if(vj_tag_exists(args[0])) + { + vj_tag_set_effect_status(args[0], 1); + veejay_msg(VEEJAY_MSG_INFO, "Effect chain on stream %d is enabled",args[0]); + } + else + p_no_tag(args[0]); + +} +void vj_event_tag_chain_disable(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *s = NULL; + P_A(args,s,format,ap); + if(!STREAM_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + if( args[0] == 0 ) + args[0] = v->uc->sample_id; + if(vj_tag_exists(args[0])) + { + vj_tag_set_effect_status(args[0], 0); + veejay_msg(VEEJAY_MSG_INFO, "Effect chain on stream %d is disabled",args[0]); + } + else + { + p_no_tag(args[0]); + } + +} + +void vj_event_sample_chain_disable(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *s = NULL; + P_A(args,s,format,ap); + + if(args[0] == 0) + { + args[0] = v->uc->sample_id; + } + + if(SAMPLE_PLAYING(v) && sample_exists(args[0])) + { + sample_set_effect_status(args[0], 0); + veejay_msg(VEEJAY_MSG_INFO, "Effect chain on stream %d is disabled",args[0]); + } + if(STREAM_PLAYING(v) && vj_tag_exists(args[0])) + { + vj_tag_set_effect_status(args[0], 0); + veejay_msg(VEEJAY_MSG_INFO, "Effect chain on stream %d is disabled",args[0]); + } + +} + + +void vj_event_chain_toggle(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + if(SAMPLE_PLAYING(v)) + { + int flag = sample_get_effect_status(v->uc->sample_id); + if(flag == 0) + { + sample_set_effect_status(v->uc->sample_id,1); + } + else + { + sample_set_effect_status(v->uc->sample_id,0); + } + veejay_msg(VEEJAY_MSG_INFO, "Effect chain is %s.", (sample_get_effect_status(v->uc->sample_id) ? "enabled" : "disabled")); + } + if(STREAM_PLAYING(v)) + { + int flag = vj_tag_get_effect_status(v->uc->sample_id); + if(flag == 0) + { + vj_tag_set_effect_status(v->uc->sample_id,1); + } + else + { + vj_tag_set_effect_status(v->uc->sample_id,0); + } + veejay_msg(VEEJAY_MSG_INFO, "Effect chain is %s.", (vj_tag_get_effect_status(v->uc->sample_id) ? "enabled" : "disabled")); + } +} + +void vj_event_chain_entry_video_toggle(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + if(SAMPLE_PLAYING(v)) + { + int c = sample_get_selected_entry(v->uc->sample_id); + int flag = sample_get_chain_status(v->uc->sample_id,c); + if(flag == 0) + { + sample_set_chain_status(v->uc->sample_id, c,1); + } + else + { + sample_set_chain_status(v->uc->sample_id, c,0); + } + veejay_msg(VEEJAY_MSG_INFO, "Video on chain entry %d is %s", c, + (flag==0 ? "Disabled" : "Enabled")); + } + if(STREAM_PLAYING(v)) + { + int c = vj_tag_get_selected_entry(v->uc->sample_id); + int flag = vj_tag_get_chain_status( v->uc->sample_id,c); + if(flag == 0) + { + vj_tag_set_chain_status(v->uc->sample_id, c,1); + } + else + { + vj_tag_set_chain_status(v->uc->sample_id, c,0); + } + veejay_msg(VEEJAY_MSG_INFO, "Video on chain entry %d is %s", c, + (flag==0 ? "Disabled" : "Enabled")); + + } +} + +void vj_event_chain_entry_enable_video(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *s = NULL; + P_A(args,s,format,ap); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + if(sample_exists(args[0])) + { + if(sample_set_chain_status(args[0],args[1],1) != -1) + { + veejay_msg(VEEJAY_MSG_INFO, "Sample %d: Video on chain entry %d is %s",args[0],args[1], + ( sample_get_chain_status(args[0],args[1]) == 1 ? "Enabled" : "Disabled")); + } + } + else + p_no_sample(args[0]); + } + if(STREAM_PLAYING(v)) + { + if(args[0] == 0)args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + if(vj_tag_exists(args[0])) + { + if(vj_tag_set_chain_status(args[0],args[1],1)!=-1) + { + veejay_msg(VEEJAY_MSG_INFO, "Stream %d: Video on chain entry %d is %s",args[0],args[1], + vj_tag_get_chain_status(args[0],args[1]) == 1 ? "Enabled" : "Disabled" ); + } + } + else + p_no_tag(args[0]); + } +} +void vj_event_chain_entry_disable_video(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(sample_exists(args[0])) + { + if(sample_set_chain_status(args[0],args[1],0)!=-1) + { + veejay_msg(VEEJAY_MSG_INFO, "Sample %d: Video on chain entry %d is %s",args[0],args[1], + ( sample_get_chain_status(args[0],args[1])==1 ? "Enabled" : "Disabled")); + } + } + else + p_no_sample(args[0]); + } + if(STREAM_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(vj_tag_exists(args[0])) + { + if(vj_tag_set_chain_status(args[0],args[1],0)!=-1) + { + veejay_msg(VEEJAY_MSG_INFO, "Stream %d: Video on chain entry %d is %s",args[0],args[1], + vj_tag_get_chain_status(args[0],args[1]) == 1 ? "Enabled" : "Disabled" ); + } + } + else + p_no_tag(args[0]); + } + +} + +void vj_event_manual_chain_fade(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + + if(args[0] == 0 && (SAMPLE_PLAYING(v) || STREAM_PLAYING(v)) ) + { + args[0] = v->uc->sample_id; + } + + if( args[1] < 0 || args[1] > 255) + { + veejay_msg(VEEJAY_MSG_ERROR,"Invalid opacity range %d use [0-255] ", args[1]); + return; + } + args[1] = 255 - args[1]; + + if( SAMPLE_PLAYING(v) && sample_exists(args[0])) + { + if( sample_set_manual_fader( args[0], args[1] ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Set chain opacity to %f", + sample_get_fader_val( args[0] )); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Error setting chain opacity of sample %d to %d", args[0],args[1]); + } + } + if (STREAM_PLAYING(v) && vj_tag_exists(args[0])) + { + if( vj_tag_set_manual_fader( args[0], args[1] ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Set chain opacity to %f", + vj_tag_get_fader_val(args[0])); + } + } + +} + +void vj_event_chain_fade_in(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *str = NULL; P_A(args,str,format,ap); + + if(args[0] == 0 && (SAMPLE_PLAYING(v) || STREAM_PLAYING(v)) ) + { + args[0] = v->uc->sample_id; + } + + if( SAMPLE_PLAYING(v) && sample_exists(args[0])) + { + if( sample_set_fader_active( args[0], args[1],-1 ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Chain Fade In from sample to full effect chain in %d frames. Per frame %2.2f", + args[1], sample_get_fader_inc(args[0])); + if(sample_get_effect_status(args[0]==0)) + { + sample_set_effect_status(args[0], -1); + } + } + } + if (STREAM_PLAYING(v) && vj_tag_exists(args[0])) + { + if( vj_tag_set_fader_active( args[0], args[1],-1 ) ) + { + veejay_msg(VEEJAY_MSG_INFO,"Chain Fade In from stream to full effect chain in %d frames. Per frame %2.2f", + args[1], sample_get_fader_inc(args[0])); + if(vj_tag_get_effect_status(args[0]==0)) + { + vj_tag_set_effect_status(args[0],-1); + } + } + } + +} + +void vj_event_chain_fade_out(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *str = NULL; P_A(args,str,format,ap); + + if(args[0] == 0 && (SAMPLE_PLAYING(v) || STREAM_PLAYING(v)) ) + { + args[0] = v->uc->sample_id; + } + + if( SAMPLE_PLAYING(v) && sample_exists(args[0])) + { + if( sample_set_fader_active( args[0], args[1],1 ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Chain Fade Out from sample to full effect chain in %d frames. Per frame %2.2f", + args[1], sample_get_fader_inc(args[0])); + } + } + if (STREAM_PLAYING(v) && vj_tag_exists(args[0])) + { + if( vj_tag_set_fader_active( args[0], args[1],1 ) ) + { + veejay_msg(VEEJAY_MSG_INFO,"Chain Fade Out from stream to full effect chain in %d frames. Per frame %2.2f", + args[1], sample_get_fader_inc(args[0])); + } + } +} + + + +void vj_event_chain_clear(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[1]; + char *str = NULL; + P_A(args,str,format,ap); + + if(args[0] == 0 && (SAMPLE_PLAYING(v) || STREAM_PLAYING(v)) ) + { + args[0] = v->uc->sample_id; + } + + if( SAMPLE_PLAYING(v) && sample_exists(args[0])) + { + int i; + for(i=0; i < SAMPLE_MAX_EFFECTS;i++) + { + int effect = sample_get_effect_any(args[0],i); + if(vj_effect_is_valid(effect)) + { + sample_chain_remove(args[0],i); + veejay_msg(VEEJAY_MSG_INFO,"Sample %d: Deleted effect %s from entry %d", + args[0],vj_effect_get_description(effect), i); + } + } + v->uc->chain_changed = 1; + } + if (STREAM_PLAYING(v) && vj_tag_exists(args[0])) + { + int i; + for(i=0; i < SAMPLE_MAX_EFFECTS;i++) + { + int effect = vj_tag_get_effect_any(args[0],i); + if(vj_effect_is_valid(effect)) + { + vj_tag_chain_remove(args[0],i); + veejay_msg(VEEJAY_MSG_INFO,"Stream %d: Deleted effect %s from entry %d", + args[0],vj_effect_get_description(effect), i); + } + } + v->uc->chain_changed = 1; + } + + +} + +void vj_event_chain_entry_del(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *str = NULL; P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(sample_exists(args[0])) + { + int effect = sample_get_effect_any(args[0],args[1]); + if( vj_effect_is_valid(effect)) + { + sample_chain_remove(args[0],args[1]); + v->uc->chain_changed = 1; + veejay_msg(VEEJAY_MSG_INFO,"Sample %d: Deleted effect %s from entry %d", + args[0],vj_effect_get_description(effect), args[1]); + } + } + } + + if (STREAM_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(vj_tag_exists(args[0])) + { + int effect = vj_tag_get_effect_any(args[0],args[1]); + if(vj_effect_is_valid(effect)) + { + vj_tag_chain_remove(args[0],args[1]); + v->uc->chain_changed = 1; + veejay_msg(VEEJAY_MSG_INFO,"Stream %d: Deleted effect %s from entry %d", + args[0],vj_effect_get_description(effect), args[1]); + } + } + } +} + +void vj_event_chain_entry_set_defaults(void *ptr, const char format[], va_list ap) +{ + +} + +void vj_event_chain_entry_set(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[3]; + char *str = NULL; P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = sample_size()-1; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(sample_exists(args[0])) + { + //int real_id = vj_effect_real_to_sequence(args[2]); + if(sample_chain_add(args[0],args[1],args[2]) != -1) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Sample %d chain entry %d has effect %s", + args[0],args[1],vj_effect_get_description(args[2])); + v->uc->chain_changed = 1; + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot set effect %d on sample %d chain %d",args[2],args[0],args[1]); + } + } + } + if( STREAM_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = vj_tag_size()-1; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(vj_tag_exists(args[0])) + { + if(vj_tag_set_effect(args[0],args[1], args[2]) != -1) + { + // veejay_msg(VEEJAY_MSG_INFO, "Stream %d chain entry %d has effect %s", + // args[0],args[1],vj_effect_get_description(real_id)); + v->uc->chain_changed = 1; + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot set effect %d on stream %d chain %d",args[2],args[0],args[1]); + } + } + } +} + +void vj_event_chain_entry_select(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *str = NULL; P_A(args,str,format,ap); + + if( SAMPLE_PLAYING(v) ) + { + if(args[0] >= 0 && args[0] < SAMPLE_MAX_EFFECTS) + { + if( sample_set_selected_entry( v->uc->sample_id, args[0])) + { + veejay_msg(VEEJAY_MSG_INFO,"Selected entry %d [%s]", + sample_get_selected_entry(v->uc->sample_id), + vj_effect_get_description( + sample_get_effect_any(v->uc->sample_id,sample_get_selected_entry(v->uc->sample_id)))); + } + } + } + if ( STREAM_PLAYING(v)) + { + if(args[0] >= 0 && args[0] < SAMPLE_MAX_EFFECTS) + { + if( vj_tag_set_selected_entry(v->uc->sample_id,args[0])) + { + veejay_msg(VEEJAY_MSG_INFO, "Selected entry %d [%s]", + vj_tag_get_selected_entry(v->uc->sample_id), + vj_effect_get_description( + vj_tag_get_effect_any(v->uc->sample_id,vj_tag_get_selected_entry(v->uc->sample_id)))); + } + } + } +} + +void vj_event_entry_up(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *s = NULL; + P_A(args,s,format,ap); + if(SAMPLE_PLAYING(v) || STREAM_PLAYING(v)) + { + int effect_id=-1; + int c=-1; + if(SAMPLE_PLAYING(v)) + { + c = sample_get_selected_entry(v->uc->sample_id) + args[0]; + if(c >= SAMPLE_MAX_EFFECTS) c = 0; + sample_set_selected_entry( v->uc->sample_id, c); + effect_id = sample_get_effect_any(v->uc->sample_id, c ); + } + if(STREAM_PLAYING(v)) + { + c = vj_tag_get_selected_entry(v->uc->sample_id)+args[0]; + if( c>= SAMPLE_MAX_EFFECTS) c = 0; + vj_tag_set_selected_entry(v->uc->sample_id,c); + effect_id = vj_tag_get_effect_any(v->uc->sample_id,c); + } + + veejay_msg(VEEJAY_MSG_INFO, "Entry %d has effect %s", + c, vj_effect_get_description(effect_id)); + + } +} +void vj_event_entry_down(void *ptr, const char format[] ,va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *s = NULL; + P_A(args,s,format,ap); + if(SAMPLE_PLAYING(v) || STREAM_PLAYING(v)) + { + int effect_id=-1; + int c = -1; + + if(SAMPLE_PLAYING(v)) + { + c = sample_get_selected_entry( v->uc->sample_id ) - args[0]; + if(c < 0) c = SAMPLE_MAX_EFFECTS-1; + sample_set_selected_entry( v->uc->sample_id, c); + effect_id = sample_get_effect_any(v->uc->sample_id, c ); + } + if(STREAM_PLAYING(v)) + { + c = vj_tag_get_selected_entry(v->uc->sample_id) - args[0]; + if(c<0) c= SAMPLE_MAX_EFFECTS-1; + vj_tag_set_selected_entry(v->uc->sample_id,c); + effect_id = vj_tag_get_effect_any(v->uc->sample_id,c); + } + veejay_msg(VEEJAY_MSG_INFO , "Entry %d has effect %s", + c, vj_effect_get_description(effect_id)); + } +} + +void vj_event_chain_entry_preset(void *ptr,const char format[], va_list ap) +{ + int args[16]; + veejay_t *v = (veejay_t*)ptr; + memset(args,0,16); + //P_A16(args,format,ap); + char *str = NULL; + P_A(args,str,format,ap); + if(SAMPLE_PLAYING(v)) + { + int num_p = 0; + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(sample_exists(args[0])) + { + int real_id = args[2]; + int i; + num_p = vj_effect_get_num_params(real_id); + + if(sample_chain_add( args[0],args[1],args[2])!=-1) + { + int args_offset = 3; + + for(i=0; i < num_p; i++) + { + if(vj_effect_valid_value(real_id,i,args[(i+args_offset)]) ) + { + + if(sample_set_effect_arg(args[0],args[1],i,args[(i+args_offset)] )==-1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error setting argument %d value %d for %s", + i, + args[(i+args_offset)], + vj_effect_get_description(real_id)); + } + } + } + + /* if ( vj_effect_get_extra_frame( real_id )) + { + int source = args[num_p+3]; + int channel_id = args[num_p+4]; + int err = 1; + if( (source != VJ_TAG_TYPE_NONE && vj_tag_exists(channel_id))|| (source == VJ_TAG_TYPE_NONE && sample_exists(channel_id)) ) + { + err = 0; + } + if( err == 0 && sample_set_chain_source( args[0],args[1], source ) && + sample_set_chain_channel( args[0],args[1], channel_id )) + { + veejay_msg(VEEJAY_MSG_INFO, "Updated mixing channel to %s %d", + (source == VJ_TAG_TYPE_NONE ? "sample" : "stream" ), + channel_id); + } + }*/ + } + } + } + if( STREAM_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(vj_tag_exists(v->uc->sample_id)) + { + int real_id = args[2]; + int num_p = vj_effect_get_num_params(real_id); + int i; + + if(vj_tag_set_effect(args[0],args[1], args[2]) != -1) + { + for(i=0; i < num_p; i++) + { + if(vj_effect_valid_value(real_id, i, args[i+3]) ) + { + if(vj_tag_set_effect_arg(args[0],args[1],i,args[i+3]) == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "setting argument %d value %d for %s", + i, + args[i+3], + vj_effect_get_description(real_id)); + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Parameter %d value %d is invalid for effect %d (%d-%d)", + i,args[(i+3)], real_id, + vj_effect_get_min_limit(real_id,i), + vj_effect_get_max_limit(real_id,i)); + } + } + v->uc->chain_changed = 1; + } +/* + if( vj_effect_get_extra_frame(real_id) ) + { + int channel_id = args[num_p + 4]; + int source = args[ num_p + 3]; + int err = 1; + + if( (source != VJ_TAG_TYPE_NONE && vj_tag_exists(channel_id))|| (source == VJ_TAG_TYPE_NONE && sample_exists(channel_id)) ) + { + err = 0; + } + + if( err == 0 && vj_tag_set_chain_source( args[0],args[1], source ) && + vj_tag_set_chain_channel( args[0],args[1], channel_id )) + { + veejay_msg(VEEJAY_MSG_INFO,"Updated mixing channel to %s %d", + (source == VJ_TAG_TYPE_NONE ? "sample" : "stream"), channel_id ); + } + }*/ + } + } + +} + +void vj_event_chain_entry_src_toggle(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + if(SAMPLE_PLAYING(v)) + { + int entry = sample_get_selected_entry(v->uc->sample_id); + int src = sample_get_chain_source(v->uc->sample_id, entry); + int cha = sample_get_chain_channel( v->uc->sample_id, entry ); + if(src == 0 ) // source is sample, toggle to stream + { + if(!vj_tag_exists(cha)) + { + cha =vj_tag_size()-1; + if(cha <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "No streams to mix with"); + return; + } + } + veejay_msg(VEEJAY_MSG_DEBUG, "Switched from source Sample to Stream"); + //src = vj_tag_get_type(cha); + src = 1; + } + else + { + if(!sample_exists(cha)) + { + cha = sample_size()-1; + if(cha<=0) + { + veejay_msg(VEEJAY_MSG_ERROR, "No samples to mix with"); + return; + } + } + veejay_msg(VEEJAY_MSG_DEBUG, "Switched from source Stream to Sample"); + src = 0; + } + sample_set_chain_source( v->uc->sample_id, entry, src ); + sample_set_chain_channel(v->uc->sample_id,entry,cha); + veejay_msg(VEEJAY_MSG_INFO, "Chain entry %d uses %s %d", entry,(src==VJ_TAG_TYPE_NONE ? "Sample":"Stream"), cha); + if(v->no_bezerk) + { + veejay_set_frame(v, sample_get_startFrame(v->uc->sample_id)); + } + + } + + if(STREAM_PLAYING(v)) + { + int entry = vj_tag_get_selected_entry(v->uc->sample_id); + int src = vj_tag_get_chain_source(v->uc->sample_id, entry); + int cha = vj_tag_get_chain_channel( v->uc->sample_id, entry ); + char description[100]; + + if(src == VJ_TAG_TYPE_NONE ) // mix sample, change to stream + { + if(!vj_tag_exists(cha)) + { + cha = vj_tag_size()-1; + if(cha <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "No streams to mix with"); + return; + } + } + src = 1; + } + else + { + if(!sample_exists(cha)) + { + cha = sample_size()-1; + if(cha<=0) + { + veejay_msg(VEEJAY_MSG_ERROR, "No samples to mix with"); + return; + } + } + src = 0; + } + vj_tag_set_chain_source( v->uc->sample_id, entry, src ); + vj_tag_set_chain_channel(v->uc->sample_id,entry,cha); + + vj_tag_get_descriptive(cha, description); + veejay_msg(VEEJAY_MSG_INFO, "Chain entry %d uses %s %d (%s)", entry,( src == 0 ? "Sample" : "Stream" ), cha,description); + } +} + +void vj_event_chain_entry_source(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[3]; + char *str = NULL; + P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(sample_exists(args[0])) + { + int src = args[2]; + int c = sample_get_chain_channel(args[0],args[1]); + if(src == VJ_TAG_TYPE_NONE) + { + if(!sample_exists(c)) + { + c = sample_size()-1; + if(c<=0) + { + veejay_msg(VEEJAY_MSG_ERROR, "You should create a sample first\n"); + return; + } + } + } + else + { + if(!vj_tag_exists(c) ) + { + c = vj_tag_size() - 1; + if(c<=0) + { + veejay_msg(VEEJAY_MSG_ERROR, "You should create a stream first (there are none)"); + return; + } + src = vj_tag_get_type(c); + } + } + + if(c > 0) + { + sample_set_chain_channel(args[0],args[1], c); + sample_set_chain_source (args[0],args[1],src); + + veejay_msg(VEEJAY_MSG_INFO, "Mixing with source (%s %d)", + src == VJ_TAG_TYPE_NONE ? "sample" : "stream",c); + // if(v->no_bezerk) veejay_set_sample(v, v->uc->sample_id); + if(v->no_bezerk) + { + veejay_set_frame(v, + sample_get_startFrame(v->uc->sample_id)); + } + } + + } + } + if(STREAM_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(vj_tag_exists(args[0])) + { + int src = args[2]; + int c = vj_tag_get_chain_channel(args[0],args[1]); + + if(src == VJ_TAG_TYPE_NONE) + { + if(!sample_exists(c)) + { + c = sample_size()-1; + if(c<=0) + { + veejay_msg(VEEJAY_MSG_ERROR, "You should create a sample first\n"); + return; + } + } + } + else + { + if(!vj_tag_exists(c) ) + { + c = vj_tag_size() - 1; + if(c<=0) + { + veejay_msg(VEEJAY_MSG_ERROR, "You should create a stream first (there are none)"); + return; + } + src = vj_tag_get_type(c); + } + } + + if(c > 0) + { + vj_tag_set_chain_channel(args[0],args[1], c); + vj_tag_set_chain_source (args[0],args[1],src); + veejay_msg(VEEJAY_MSG_INFO, "Mixing with source (%s %d)", + src==VJ_TAG_TYPE_NONE ? "sample" : "stream",c); + // if(v->no_bezerk) veejay_set_sample(v, v->uc->sample_id); + + } + } + } +} + +#define clamp_channel( a, b, c ) ( ( a < b ? c : (a >= c ? b : a ))) + +void vj_event_chain_entry_channel_dec(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[1]; + char *str = NULL; P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + int entry = sample_get_selected_entry(v->uc->sample_id); + int cha = sample_get_chain_channel(v->uc->sample_id,entry); + int src = sample_get_chain_source(v->uc->sample_id,entry); + int old = cha; + if(src==VJ_TAG_TYPE_NONE) + { //decrease sample id + cha = cha - args[0]; + if( sample_size()-1 <= 0 ) + { + veejay_msg(0, "No samples to mix with"); + return; + } + clamp_channel( + cha, + 1, + sample_size()-1 ); + + if( !sample_exists( cha ) ) + cha = old; + } + else + { + cha = cha - args[0]; + if( vj_tag_size()-1 <= 0 ) + { + veejay_msg(0, "No streams to mix with"); + return; + } + clamp_channel( + cha, + 1, + vj_tag_size()-1 ); + + if( !vj_tag_exists( cha )) + cha = old; + } + sample_set_chain_channel( v->uc->sample_id, entry, cha ); + veejay_msg(VEEJAY_MSG_INFO, "Chain entry %d uses %s %d",entry, + (src==VJ_TAG_TYPE_NONE ? "Sample" : "Stream"),cha); + + if(v->no_bezerk) + veejay_set_frame(v , sample_get_startFrame(v->uc->sample_id)); + } + if(STREAM_PLAYING(v)) + { + int entry = vj_tag_get_selected_entry(v->uc->sample_id); + int cha = vj_tag_get_chain_channel(v->uc->sample_id,entry); + int src = vj_tag_get_chain_source(v->uc->sample_id,entry); + int old = cha; + char description[100]; + + if(src==VJ_TAG_TYPE_NONE) + { //decrease sample id + cha = cha - args[0]; + if( sample_size()-1 <= 0 ) + { + veejay_msg(0, "No samples to mix with"); + return; + } + clamp_channel( + cha, + 1, + sample_size()-1 ); + if( !sample_exists(cha ) ) + cha = old; + } + else + { + cha = cha - args[0]; + if( vj_tag_size()-1 <= 0 ) + { + veejay_msg(0, "No streams to mix with"); + return; + } + clamp_channel( + cha, + 1, + vj_tag_size()-1 ); + if(! vj_tag_exists( cha )) + cha = old; + } + + vj_tag_set_chain_channel( v->uc->sample_id, entry, cha ); + vj_tag_get_descriptive( cha, description); + + veejay_msg(VEEJAY_MSG_INFO, "Chain entry %d uses Stream %d (%s)",entry,cha,description); +// if(v->no_bezerk) veejay_set_sample(v, v->uc->sample_id); + + } + +} + +void vj_event_chain_entry_channel_inc(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[1]; + char *str = NULL; P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + int entry = sample_get_selected_entry(v->uc->sample_id); + int cha = sample_get_chain_channel(v->uc->sample_id,entry); + int src = sample_get_chain_source(v->uc->sample_id,entry); + int old = cha; + if(src==VJ_TAG_TYPE_NONE) + { //decrease sample id + cha = cha + args[0]; + if( sample_size()-1 <= 0 ) + { + veejay_msg(0, "No samples to mix with"); + return; + } + clamp_channel( + cha, + 1, + sample_size()-1 ); + if( !sample_exists( cha ) ) + cha = old; + } + else + { + cha = cha + args[0]; + if( vj_tag_size()-1 <= 0 ) + { + veejay_msg(0, "No streams to mix with"); + return; + } + clamp_channel( + cha, + 1, + vj_tag_size()-1 ); + if( !vj_tag_exists(cha) ) + cha = old; + } + + sample_set_chain_channel( v->uc->sample_id, entry, cha ); + veejay_msg(VEEJAY_MSG_INFO, "Chain entry %d uses %s %d",entry, + (src==VJ_TAG_TYPE_NONE ? "Sample" : "Stream"),cha); +// if(v->no_bezerk) veejay_set_sample(v, v->uc->sample_id); + if(v->no_bezerk) veejay_set_frame(v,sample_get_startFrame(v->uc->sample_id)); + + } + if(STREAM_PLAYING(v)) + { + int entry = vj_tag_get_selected_entry(v->uc->sample_id); + int cha = vj_tag_get_chain_channel(v->uc->sample_id,entry); + int src = vj_tag_get_chain_source(v->uc->sample_id,entry); + int old = cha; + char description[100]; + + if(src==0) + { //decrease sample id + cha = cha + args[0]; + if( sample_size()-1 <= 0 ) + { + veejay_msg(0, "No samples to mix with"); + return; + } + clamp_channel( + cha, + 1, + sample_size()-1 ); + if( !sample_exists( cha ) ) + cha = old; + } + else + { + cha = cha + args[0]; + if( vj_tag_size()-1 <= 0 ) + { + veejay_msg(0, "No streams to mix with"); + return; + } + clamp_channel( + cha, + 1, + vj_tag_size()-1 ); + if( !vj_tag_exists( cha )) + cha = old; + } + + vj_tag_set_chain_channel( v->uc->sample_id, entry, cha ); + vj_tag_get_descriptive( cha, description); +// if(v->no_bezerk) veejay_set_sample(v, v->uc->sample_id); + + veejay_msg(VEEJAY_MSG_INFO, "Chain entry %d uses Stream %d (%s)",entry, + vj_tag_get_chain_channel(v->uc->sample_id,entry),description); + } +} + +void vj_event_chain_entry_channel(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[3]; + char *str = NULL; P_A(args,str,format,ap); + if(SAMPLE_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of bounds: %d", args[1]); + return; + } + + if(sample_exists(args[0])) + { + int src = sample_get_chain_source( args[0],args[1]); + int err = 1; + if(src == VJ_TAG_TYPE_NONE && sample_exists(args[2])) + { + err = 0; + } + if(src != VJ_TAG_TYPE_NONE && vj_tag_exists(args[2])) + { + err = 0; + } + if(err == 0 && sample_set_chain_channel(args[0],args[1], args[2])>= 0) + { + veejay_msg(VEEJAY_MSG_INFO, "Selected input channel (%s %d)", + (src == VJ_TAG_TYPE_NONE ? "sample" : "stream"),args[2]); + // if(v->no_bezerk) veejay_set_sample(v, v->uc->sample_id); + if(v->no_bezerk) veejay_set_frame(v,sample_get_startFrame(v->uc->sample_id)); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid channel (%s %d) given", + (src ==VJ_TAG_TYPE_NONE ? "sample" : "stream") , args[2]); + } + } + } + if(STREAM_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(vj_tag_exists(args[0])) + { + int src = vj_tag_get_chain_source(args[0],args[1]); + int err = 1; + if( src == VJ_TAG_TYPE_NONE && sample_exists( args[2])) + err = 0; + if( src != VJ_TAG_TYPE_NONE && vj_tag_exists( args[2] )) + err = 0; + + if( err == 0 && vj_tag_set_chain_channel(args[0],args[1],args[2])>=0) + { + veejay_msg(VEEJAY_MSG_INFO, "Selected input channel (%s %d)", + (src==VJ_TAG_TYPE_NONE ? "sample" : "stream"), args[2]); +// if(v->no_bezerk) veejay_set_sample(v, v->uc->sample_id); + + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid channel (%s %d) given", + (src ==VJ_TAG_TYPE_NONE ? "sample" : "stream") , args[2]); + } + } + } +} + +void vj_event_chain_entry_srccha(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[4]; + char *str = NULL; P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = sample_size()-1; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(sample_exists(args[0])) + { + int source = args[2]; + int channel_id = args[3]; + int err = 1; + if( source == VJ_TAG_TYPE_NONE && sample_exists(channel_id)) + err = 0; + if( source != VJ_TAG_TYPE_NONE && vj_tag_exists(channel_id)) + err = 0; + + + if( err == 0 && + sample_set_chain_source(args[0],args[1],source)!=-1 && + sample_set_chain_channel(args[0],args[1],channel_id) != -1) + { + veejay_msg(VEEJAY_MSG_INFO, "Selected input channel (%s %d) to mix in", + (source == VJ_TAG_TYPE_NONE ? "sample" : "stream") , channel_id); + // if(v->no_bezerk) veejay_set_sample(v,v->uc->sample_id); + if(v->no_bezerk) veejay_set_frame(v,sample_get_startFrame(v->uc->sample_id)); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid channel (%s %d) given", + (source ==VJ_TAG_TYPE_NONE ? "sample" : "stream") , args[2]); + } + } + } + if(STREAM_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = sample_size()-1; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(vj_tag_exists(args[0])) + { + int source = args[2]; + int channel_id = args[3]; + int err = 1; + if( source == VJ_TAG_TYPE_NONE && sample_exists(channel_id)) + err = 0; + if( source != VJ_TAG_TYPE_NONE && vj_tag_exists(channel_id)) + err = 0; + + + if( err == 0 && + vj_tag_set_chain_source(args[0],args[1],source)!=-1 && + vj_tag_set_chain_channel(args[0],args[1],channel_id) != -1) + { + veejay_msg(VEEJAY_MSG_INFO, "Selected input channel (%s %d) to mix in", + (source == VJ_TAG_TYPE_NONE ? "sample" : "stream") , channel_id); + // if(v->no_bezerk) veejay_set_sample(v,v->uc->sample_id); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid channel (%s %d) given", + (source ==VJ_TAG_TYPE_NONE ? "sample" : "stream") , args[2]); + } + } + } + +} + + +void vj_event_chain_arg_inc(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *str = NULL; P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + int c = sample_get_selected_entry(v->uc->sample_id); + int effect = sample_get_effect_any(v->uc->sample_id, c); + int val = sample_get_effect_arg(v->uc->sample_id,c,args[0]); + if ( vj_effect_is_valid( effect ) ) + { + + int tval = val + args[1]; + if( tval > vj_effect_get_max_limit( effect,args[0] ) ) + tval = vj_effect_get_min_limit( effect,args[0]); + else + if( tval < vj_effect_get_min_limit( effect,args[0] ) ) + tval = vj_effect_get_max_limit( effect,args[0] ); + if(sample_set_effect_arg( v->uc->sample_id, c,args[0],tval)!=-1 ) + { + veejay_msg(VEEJAY_MSG_INFO,"Set parameter %d value %d",args[0],tval); + } + } + } + + if(STREAM_PLAYING(v)) + { + int c = vj_tag_get_selected_entry(v->uc->sample_id); + int effect = vj_tag_get_effect_any(v->uc->sample_id, c); + int val = vj_tag_get_effect_arg(v->uc->sample_id, c, args[0]); + + int tval = val + args[1]; + + if( tval > vj_effect_get_max_limit( effect,args[0] )) + tval = vj_effect_get_min_limit( effect,args[0] ); + else + if( tval < vj_effect_get_min_limit( effect,args[0] )) + tval = vj_effect_get_max_limit( effect,args[0] ); + + + if(vj_tag_set_effect_arg(v->uc->sample_id, c, args[0], tval) ) + { + veejay_msg(VEEJAY_MSG_INFO,"Set parameter %d value %d",args[0], tval ); + } + } +} + +void vj_event_chain_entry_set_arg_val(void *ptr, const char format[], va_list ap) +{ + int args[4]; + veejay_t *v = (veejay_t*)ptr; + char *str = NULL; P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = sample_size()-1; + if(args[1] == -1) args[1] = sample_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(sample_exists(args[0])) + { + int effect = sample_get_effect_any( args[0], args[1] ); + if( vj_effect_valid_value(effect,args[2],args[3]) ) + { + if(sample_set_effect_arg( args[0], args[1], args[2], args[3])) { + veejay_msg(VEEJAY_MSG_INFO, "Set parameter %d to %d on Entry %d of Sample %d", args[2], args[3],args[1],args[0]); + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Parameter %d with value %d invalid for Chain Entry %d of Sample %d", + args[2], args[3], args[1], args[0] ); + } + } else { veejay_msg(VEEJAY_MSG_ERROR, "Sample %d does not exist", args[0]); } + } + if(STREAM_PLAYING(v)) + { + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[1] == -1) args[1] = vj_tag_get_selected_entry(v->uc->sample_id); + if(v_chi(args[1])) + { + veejay_msg(VEEJAY_MSG_ERROR, "Chain index out of boundaries: %d", args[1]); + return; + } + + if(vj_tag_exists(args[0])) + { + int effect = vj_tag_get_effect_any(args[0],args[1] ); + if ( vj_effect_valid_value( effect,args[2],args[3] ) ) + { + if(vj_tag_set_effect_arg(args[0],args[1],args[2],args[3])) { + veejay_msg(VEEJAY_MSG_INFO,"Set parameter %d to %d on Entry %d of Stream %d", args[2],args[3],args[2],args[1]); + } + } + else { + veejay_msg(VEEJAY_MSG_ERROR, "Parameter %d with value %d for Chain Entry %d invalid for Stream %d", + args[2],args[3], args[1],args[0]); + } + } + else { + veejay_msg(VEEJAY_MSG_ERROR,"Stream %d does not exist", args[0]); + } + } +} + +void vj_event_el_cut(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + + if( SAMPLE_PLAYING(v)) + { + if( !sample_usable_edl( v->uc->sample_id )) + { + veejay_msg(VEEJAY_MSG_ERROR, "This sample type has no EDL (all frames are identical)"); + return; + } + + editlist *el = sample_get_editlist( v->uc->sample_id ); + if(!el) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample has no EDL (is this possible?)"); + return; + } + if( args[0] < 0 || args[0] > el->total_frames || args[1] < 0 || args[1] > el->total_frames) + { + veejay_msg(VEEJAY_MSG_ERROR, "Frame number out of bounds"); + return; + } + + if(veejay_edit_cut( v,el, args[0], args[1] )) + { + veejay_msg(VEEJAY_MSG_INFO, "Cut frames %d-%d from sample %d into buffer",args[0],args[1], + v->uc->sample_id); + } + + sample_set_startframe( v->uc->sample_id, 0 ); + sample_set_endframe( v->uc->sample_id, sample_video_length(v->uc->sample_id) ); + + constrain_sample( v, v->uc->sample_id, 0, el->total_frames ); + } + + if ( STREAM_PLAYING(v) || PLAIN_PLAYING(v)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot cut frames in this playback mode"); + return; + } + +} + +void vj_event_el_copy(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; P_A(args,str,format,ap); + + if ( SAMPLE_PLAYING(v)) + { + if( !sample_usable_edl( v->uc->sample_id )) + { + veejay_msg(VEEJAY_MSG_ERROR, "This sample type has no EDL (all frames are identical)"); + return; + } + + editlist *el = sample_get_editlist( v->uc->sample_id ); + if(!el) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample has no EDL (is this possible?)"); + return; + } + if( args[0] < 0 || args[0] > el->total_frames || args[1] < 0 || args[1] > el->total_frames) + { + veejay_msg(VEEJAY_MSG_ERROR, "Frame number out of bounds"); + return; + } + + if(veejay_edit_copy( v,el, args[0], args[1] )) + { + veejay_msg(VEEJAY_MSG_INFO, "Copy frames %d-%d from sample %d into buffer",args[0],args[1], + v->uc->sample_id); + } + + sample_set_startframe( v->uc->sample_id, 0 ); + sample_set_endframe( v->uc->sample_id,sample_video_length(v->uc->sample_id)); + + constrain_sample( v, v->uc->sample_id, 0, el->total_frames ); + } + if ( STREAM_PLAYING(v) || PLAIN_PLAYING(v)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot copy frames in this playback mode"); + return; + } + +} + +void vj_event_el_del(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; P_A(args,str,format,ap); + + if ( SAMPLE_PLAYING(v)) + { + if( !sample_usable_edl( v->uc->sample_id )) + { + veejay_msg(VEEJAY_MSG_ERROR, "This sample type has no EDL (all frames are identical)"); + return; + } + + editlist *el = sample_get_editlist( v->uc->sample_id ); + + if(!el) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample has no EDL (is this possible?)"); + return; + } + if( args[0] < 0 || args[0] > el->total_frames || args[1] < 0 || args[1] > el->total_frames) + { + veejay_msg(VEEJAY_MSG_ERROR, "Frame number out of bounds"); + return; + } + + if(veejay_edit_delete( v,el, args[0], args[1] )) + { + veejay_msg(VEEJAY_MSG_INFO, "Deleted frames %d-%d from EDL of sample %d", + v->uc->sample_id,args[0],args[1]); + } + sample_set_startframe( v->uc->sample_id, 0 ); + sample_set_endframe( v->uc->sample_id, sample_video_length(v->uc->sample_id)); + + constrain_sample( v, v->uc->sample_id, 0, el->total_frames ); + + } + + if ( STREAM_PLAYING(v) || PLAIN_PLAYING(v)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot delete frames in this playback mode"); + return; + } + +} + +void vj_event_el_crop(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; P_A(args,str,format,ap); + + if ( STREAM_PLAYING(v) || PLAIN_PLAYING(v)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot delete frames in this playback mode"); + return; + } + + if(SAMPLE_PLAYING(v)) + { + if( !sample_usable_edl( v->uc->sample_id )) + { + veejay_msg(VEEJAY_MSG_ERROR, "This sample type has no EDL (all frames are identical)"); + return; + } + + editlist *el = sample_get_editlist( v->uc->sample_id); + if(!el) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample has no EDL"); + return; + } + + if( args[0] < 0 || args[0] > el->total_frames || args[1] < 0 || args[1] > el->total_frames) + { + veejay_msg(VEEJAY_MSG_ERROR, "Frame number out of bounds"); + return; + } + + if( args[1] <= args[0] ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Crop: start - end (start must be smaller then end)"); + return; + } + int s2 =0; + int s1 = veejay_edit_delete(v,el, 0, args[0]); + int res = 0; + if(s1) + { + args[1] -= args[0]; // after deleting the first part, move arg[1] + s2 = veejay_edit_delete(v, el,args[1], el->total_frames); + if(s2) + { + veejay_set_frame(v,0); + veejay_msg(VEEJAY_MSG_INFO, "Delete frames 0- %d , %d - %d from sample %d", 0,args[0],args[1], + el->total_frames, v->uc->sample_id); + res = 1; + sample_set_startframe( v->uc->sample_id, 0 ); + sample_set_endframe( v->uc->sample_id, sample_video_length(v->uc->sample_id) ); + constrain_sample( v, v->uc->sample_id,0, el->total_frames ); + } + + } + if(!res) + veejay_msg(VEEJAY_MSG_ERROR, "Invalid range given to crop ! %d - %d", args[0],args[1] ); + + } +} + +void vj_event_el_paste_at(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *str = NULL; P_A(args,str,format,ap); + + if ( STREAM_PLAYING(v) || PLAIN_PLAYING(v)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot paste frames in this playback mode"); + return; + } + + if( SAMPLE_PLAYING(v)) + { + if( !sample_usable_edl( v->uc->sample_id )) + { + veejay_msg(VEEJAY_MSG_ERROR, "This sample type has no EDL (all frames are identical)"); + return; + } + + editlist *el = sample_get_editlist( v->uc->sample_id ); + long length = el->total_frames; + if(!el) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample has no EDL"); + return; + } + if( args[0] >= 0 && args[0] <= el->total_frames) + { + if( veejay_edit_paste( v, el, args[0] ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Pasted buffer at frame %d",args[0]); + } + sample_set_startframe( v->uc->sample_id, 0 ); + sample_set_endframe( v->uc->sample_id, sample_video_length(v->uc->sample_id)); + constrain_sample( v, v->uc->sample_id, 0, el->total_frames); + } + + } +} + +void vj_event_el_save_editlist(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + char str[1024]; + veejay_memset(str,0,1024); + int args[2] = {0,0}; + P_A(args,str,format,ap); + if( STREAM_PLAYING(v) || PLAIN_PLAYING(v) ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Wrong playback mode for saving EDL of sample"); + return; + } + + if( veejay_save_all(v, str,args[0],args[1]) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Saved EditList as %s",str); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR,"Unable to save EditList as %s",str); + } +} + +void vj_event_el_load_editlist(void *ptr, const char format[], va_list ap) +{ + veejay_msg(VEEJAY_MSG_ERROR, "EditList: Load not implemented"); +} + + +void vj_event_el_add_video(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int start = -1; + int destination = v->edit_list->total_frames; + char str[1024]; + int *args = NULL; + P_A(args,str,format,ap); + + if(SAMPLE_PLAYING(v)) + { + if( !sample_usable_edl( v->uc->sample_id )) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot append video to a picture sample"); + return; + } + } + + if ( veejay_edit_addmovie(v,( SAMPLE_PLAYING(v) ? v->edit_list : v->current_edit_list),str,start,destination)) + veejay_msg(VEEJAY_MSG_INFO, "Added video file %s to EditList",str); + else + veejay_msg(VEEJAY_MSG_INFO, "Unable to add file %s to EditList",str); +} + +void vj_event_el_add_video_sample(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + char str[1024]; + int args[2]; + P_A(args,str,format,ap); + + int new_sample_id = args[0]; + if(new_sample_id == 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "Trying to create new sample from %s", + str ); + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Trying to append %s to current sample", + str ); + } + new_sample_id = veejay_edit_addmovie_sample(v,str,new_sample_id ); + if(new_sample_id <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to open %s", str ); + new_sample_id = 0; + } + vj_event_send_new_id( v,new_sample_id ); +} + +void vj_event_tag_del(void *ptr, const char format[] , va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char *str = NULL; P_A(args,str,format,ap); + + + if(STREAM_PLAYING(v) && v->uc->sample_id == args[0]) + { + veejay_msg(VEEJAY_MSG_INFO,"Cannot delete stream while playing"); + } + else + { + if(vj_tag_exists(args[0])) + { + if(vj_tag_del(args[0])) + { + veejay_msg(VEEJAY_MSG_INFO, "Deleted stream %d", args[0]); + vj_tag_verify_delete( args[0], 1 ); + } + } + } + vj_event_send_new_id( v, args[0] ); +} + +void vj_event_tag_toggle(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[1]; + char *str = NULL; P_A(args,str,format,ap); + if(STREAM_PLAYING(v)) + { + int active = vj_tag_get_active(v->uc->sample_id); + vj_tag_set_active( v->uc->sample_id, !active); + veejay_msg(VEEJAY_MSG_INFO, "Stream is %s", (vj_tag_get_active(v->uc->sample_id) ? "active" : "disabled")); + } +} + +#ifdef USE_GDK_PIXBUF +void vj_event_tag_new_picture(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + char str[255]; + int *args = NULL; + P_A(args,str,format,ap); + + int id = veejay_create_tag(v, VJ_TAG_TYPE_PICTURE, str, v->nstreams,0,0); + + vj_event_send_new_id( v, id ); + if(id <= 0 ) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create new Picture stream"); +} +#endif + +#ifdef SUPPORT_READ_DV2 +void vj_event_tag_new_dv1394(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + + if(args[0] == -1) args[0] = 63; + veejay_msg(VEEJAY_MSG_DEBUG, "Try channel %d", args[0]); + int id = veejay_create_tag(v, VJ_TAG_TYPE_DV1394, "/dev/dv1394", v->nstreams,0, args[0]); + vj_event_send_new_id( v, id ); + if( id <= 0) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create new DV1394 stream"); +} +#endif + +void vj_event_tag_new_v4l(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + char *str = NULL; + int args[2]; + char filename[255]; + P_A(args,str,format,ap); + + sprintf(filename, "video%d", args[0]); + +#ifdef HAVE_UNICAP + int id = veejay_create_tag(v, VJ_TAG_TYPE_V4L, filename, v->nstreams,args[0],args[1]); + vj_event_send_new_id( v, id ); +#else + int id = -1; + vj_event_send_new_id( v, id ); +#endif + if( id <= 0 ) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create new Video4Linux stream "); +} + +void vj_event_tag_new_net(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + + char str[255]; + int args[2]; + + P_A(args,str,format,ap); + + if( strncasecmp( str, "localhost",9 ) == 0 ) + { + if( args[0] == v->uc->port ) + { + veejay_msg(0, "Try another port number, I am listening on this one."); + return; + } + } + + int id = veejay_create_tag(v, VJ_TAG_TYPE_NET, str, v->nstreams, args[0],0); + vj_event_send_new_id( v, id); + + if(id <= 0) + veejay_msg(VEEJAY_MSG_ERROR, "Failed to create unicast stream"); +} + +void vj_event_tag_new_mcast(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + + char str[255]; + int args[2]; + + P_A(args,str,format,ap); + + veejay_msg(VEEJAY_MSG_DEBUG, "%s, %d", str, args[0]); + + int id = veejay_create_tag(v, VJ_TAG_TYPE_MCAST, str, v->nstreams, args[0],0); + vj_event_send_new_id( v, id ); + + if( id <= 0) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create new multicast stream"); + +} + + + +void vj_event_tag_new_color(void *ptr, const char format[], va_list ap) +{ + veejay_t *v= (veejay_t*) ptr; + char *str=NULL; + int args[4]; + P_A(args,str,format,ap); + + int i; + for(i = 0 ; i < 3; i ++ ) + CLAMPVAL( args[i] ); + + + int id = vj_tag_new( VJ_TAG_TYPE_COLOR, NULL, -1, v->edit_list,v->pixel_format, -1,0 ); + if(id > 0) + { + vj_tag_set_stream_color( id, args[0],args[1],args[2] ); + } + + vj_event_send_new_id( v , id ); + if( id <= 0 ) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create new solid color stream"); + +} + +void vj_event_tag_new_y4m(void *ptr, const char format[], va_list ap) +{ + veejay_t *v= (veejay_t*) ptr; + char str[255]; + int *args = NULL; + P_A(args,str,format,ap); + int id = veejay_create_tag(v, VJ_TAG_TYPE_YUV4MPEG, str, v->nstreams,0,0); + + vj_event_send_new_id( v, id ); + if( id <= 0 ) + veejay_msg(VEEJAY_MSG_INFO, "Unable to create new Yuv4mpeg stream"); +} +#ifdef HAVE_UNICAP +void vj_event_v4l_set_brightness(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + if(args[0]==0) args[0] = v->uc->sample_id; + if(args[0]==-1) args[0] = vj_tag_size()-1; + if(vj_tag_exists(args[0]) && STREAM_PLAYING(v)) + { + if(vj_tag_set_brightness(args[0],args[1])) + { + veejay_msg(VEEJAY_MSG_INFO,"Set brightness to %d",args[1]); + } + } + +} +#endif +// 159, 164 for white +void vj_event_v4l_get_info(void *ptr, const char format[] , va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + if(args[0]==0) args[0] = v->uc->sample_id; + if(args[0]==-1) args[0] = vj_tag_size()-1; + + char send_msg[33]; + char message[30]; + veejay_memset(send_msg, 0,sizeof(send_msg)); + veejay_memset(message, 0,sizeof(message)); + + if(vj_tag_exists(args[0])) + { + int values[6]; + memset(values,0,6*sizeof(int)); +#ifdef HAVE_UNICAP + if(vj_tag_get_v4l_properties( args[0], &values[0], &values[1], &values[2], &values[3], &values[4], &values[5])) + { + sprintf(message, "%05d%05d%05d%05d%05d%05d", + values[0],values[1],values[2],values[3],values[4],values[5] ); + } +#else + sprintf(message, "000000000000000000000000000000" ); +#endif + } + FORMAT_MSG(send_msg, message); + SEND_MSG( v,send_msg ); +} + +#ifdef HAVE_UNICAP +void vj_event_v4l_set_contrast(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + if(args[0]==0) args[0] = v->uc->sample_id; + if(args[0]==-1)args[0] = vj_tag_size()-1; + if(vj_tag_exists(args[0]) && STREAM_PLAYING(v)) + { + if(vj_tag_set_contrast(args[0],args[1])) + { + veejay_msg(VEEJAY_MSG_INFO,"Set contrast to %d",args[1]); + } + } + +} + + +void vj_event_v4l_set_white(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + if(args[0]==0) args[0] = v->uc->sample_id; + if(args[0]==-1)args[0] = vj_tag_size()-1; + if(vj_tag_exists(args[0]) && STREAM_PLAYING(v)) + { + if(vj_tag_set_white(args[0],args[1])) + { + veejay_msg(VEEJAY_MSG_INFO,"Set whiteness to %d",args[1]); + } + } + +} +void vj_event_v4l_set_saturation(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + if(args[0]==0) args[0] = v->uc->sample_id; + if(args[0]==-1)args[0] = vj_tag_size()-1; + if(vj_tag_exists(args[0]) && STREAM_PLAYING(v)) + { + if(vj_tag_set_saturation(args[0],args[1])) + { + veejay_msg(VEEJAY_MSG_INFO,"Set saturation to %d",args[1]); + } + } + +} +void vj_event_v4l_set_color(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = vj_tag_size()-1; + if(vj_tag_exists(args[0]) && STREAM_PLAYING(v)) + { + if(vj_tag_set_color(args[0],args[1])) + { + veejay_msg(VEEJAY_MSG_INFO,"Set color to %d",args[1]); + } + } + +} +void vj_event_v4l_set_hue(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + unsigned char *str = NULL; + P_A(args,str,format,ap); + if(args[0] == 0) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = vj_tag_size()-1; + if(vj_tag_exists(args[0]) && STREAM_PLAYING(v)) + { + if(vj_tag_set_hue(args[0],args[1])) + { + veejay_msg(VEEJAY_MSG_INFO,"Set hue to %d",args[1]); + } + } + +} +#endif +void vj_event_viewport_frontback(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if(v->frontback == 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "Viewport is rendered before FX processing"); + v->frontback = 1; + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Viewport is rendered after FX processing"); + v->frontback = 0; + } + +} + +void vj_event_toggle_osd( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + if(v->use_osd == 0 ) + { + v->use_osd = 1; + veejay_msg(VEEJAY_MSG_INFO, "OSD on"); + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "OSD off"); + v->use_osd = 0; + } +} +void vj_event_toggle_copyright( void *ptr, const char format[], va_list ap ) +{ + static int old_osd = -1; + veejay_t *v = (veejay_t*) ptr; + if( old_osd == -1 ) + old_osd = v->use_osd; + if(v->use_osd == 0 || v->use_osd == 1) + v->use_osd = 2; + else + v->use_osd = (old_osd==-1?0: old_osd); +} +void vj_event_toggle_osd_extra( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + if(v->use_osd == 3 ) + v->use_osd = 0; + else + { + v->use_osd = 3; + veejay_msg(VEEJAY_MSG_INFO, "Not displaying viewport help"); + } +} + +void vj_event_tag_set_format(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char str[255]; + veejay_memset(str,0,255); + P_A(args,str,format,ap); + + if(v->settings->tag_record || v->settings->offline_record) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot change data format while recording to disk"); + return; + } + if(strncasecmp(str, "mlzo",4) == 0 ) + { + _recorder_format = ENCODER_LZO; + veejay_msg(VEEJAY_MSG_INFO, "Recorder writes in LZO YUV 4:2:2 Planar"); + return; + } + + + if(strncasecmp(str, "yv16",4) == 0 || strncasecmp(str,"y422",4)==0) + { + _recorder_format = ENCODER_YUV422; + veejay_msg(VEEJAY_MSG_INFO, "Recorder writes in YUV 4:2:2 Planar"); + return; + } + + if(strncasecmp(str,"mpeg4",5)==0 || strncasecmp(str,"divx",4)==0) + { + _recorder_format = ENCODER_MPEG4; + veejay_msg(VEEJAY_MSG_INFO, "Recorder writes in MPEG4 format"); + return; + } + + if(strncasecmp(str,"msmpeg4v3",9)==0 || strncasecmp(str,"div3",4)==0) + { + _recorder_format = ENCODER_DIVX; + veejay_msg(VEEJAY_MSG_INFO,"Recorder writes in MSMPEG4v3 format"); + return; + } + if(strncasecmp(str,"dvvideo",7)==0||strncasecmp(str,"dvsd",4)==0) + { + int o = _recorder_format; + _recorder_format = ENCODER_DVVIDEO; + if(vj_el_is_dv(v->edit_list)) + veejay_msg(VEEJAY_MSG_INFO,"Recorder writes in DVVIDEO format"); + else + { veejay_msg(VEEJAY_MSG_ERROR, "Not working in a valid DV resolution"); + _recorder_format = o; + } + return; + } + if(strncasecmp(str,"mjpeg",5)== 0 || strncasecmp(str,"mjpg",4)==0 || + strncasecmp(str, "jpeg",4)==0) + { + _recorder_format = ENCODER_MJPEG; + veejay_msg(VEEJAY_MSG_INFO, "Recorder writes in MJPEG AVI format"); + return; + } +#ifdef HAVE_LIBQUICKTIME + if(strncasecmp(str,"quicktime-dv", 12 ) == 0 ) + { + if( vj_el_is_dv( v->edit_list )) + { + _recorder_format = ENCODER_QUICKTIME_DV; + veejay_msg(VEEJAY_MSG_INFO, "Recorder writes in QT DV format"); + } + else + veejay_msg(VEEJAY_MSG_ERROR, "Not working in valid DV resolution"); + return; + } + if(strncasecmp(str, "quicktime-mjpeg", 15 ) == 0 ) + { + _recorder_format = ENCODER_QUICKTIME_MJPEG; + veejay_msg( VEEJAY_MSG_INFO, "Recorder writes in QT mjpeg format"); + return; + } +#endif + if(strncasecmp(str,"i420",4)==0 || strncasecmp(str,"yv12",4)==0 ) + { + _recorder_format = ENCODER_YUV420; + veejay_msg(VEEJAY_MSG_INFO, "Recorder writes in uncompressed YV12/I420 (see swapping)"); + if(v->pixel_format == FMT_422 || v->pixel_format == FMT_422F ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Using 2x2 -> 1x1 and 1x1 -> 2x2 conversion"); + } + return; + } + veejay_msg(VEEJAY_MSG_INFO, "Use one of these:"); + veejay_msg(VEEJAY_MSG_INFO, "mpeg4, div3, dvvideo , mjpeg , i420 or yv16"); + +} + +static void _vj_event_tag_record( veejay_t *v , int *args, char *str ) +{ + if(!STREAM_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + char tmp[255]; + char prefix[255]; + if(args[0] <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"Number of frames to record must be > 0"); + return; + } + + if(args[1] < 0 || args[1] > 1) + { + veejay_msg(VEEJAY_MSG_ERROR,"Auto play is either on or off"); + return; + } + + char sourcename[255]; + veejay_memset(sourcename,0,255); + vj_tag_get_description( v->uc->sample_id, sourcename ); + sprintf(prefix,"%s-%02d-", sourcename, v->uc->sample_id); + if(! veejay_create_temp_file(prefix, tmp )) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot create temporary file %s", tmp); + return; + } + + int format = _recorder_format; + if(_recorder_format == -1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Set a destination format first"); + return; + } + + if(args[0] <= 1 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cowardly refusing to record less then 2 frames"); + return; + } + + if( vj_tag_init_encoder( v->uc->sample_id, tmp, format, + args[0]) <= 0 ) + { + veejay_msg(VEEJAY_MSG_INFO, "Error trying to start recording from stream %d", v->uc->sample_id); + vj_tag_stop_encoder(v->uc->sample_id); + v->settings->tag_record = 0; + return; + } + + if(v->use_osd) + { + veejay_msg(VEEJAY_MSG_INFO,"Turned off OSD, recording now"); + v->use_osd = 0; + } + + if(args[1]==0) + v->settings->tag_record_switch = 0; + else + v->settings->tag_record_switch = 1; + + v->settings->tag_record = 1; +} + +void vj_event_tag_rec_start(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + + _vj_event_tag_record( v, args, str ); +} + +void vj_event_tag_rec_stop(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; + video_playback_setup *s = v->settings; + + if( STREAM_PLAYING(v) && v->settings->tag_record) + { + int play_now = s->tag_record_switch; + if(!vj_tag_stop_encoder( v->uc->sample_id)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Wasnt recording anyway"); + return; + } + + char avi_file[255]; + if( !vj_tag_get_encoded_file(v->uc->sample_id, avi_file)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Dont know where I put the file?!"); + return; + } + + // create new sample + int ns = veejay_edit_addmovie_sample( v,avi_file, 0 ); + if(ns > 0) + { + int len = vj_tag_get_encoded_frames(v->uc->sample_id) - 1; + veejay_msg(VEEJAY_MSG_INFO,"Added file %s (%d frames) to EditList as sample %d", + avi_file, len ,ns); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot add videofile %s to EditList!",avi_file); + } + + veejay_msg(VEEJAY_MSG_ERROR, "Stopped recording from stream %d", v->uc->sample_id); + vj_tag_reset_encoder( v->uc->sample_id); + s->tag_record = 0; + s->tag_record_switch = 0; + + if(play_now) + { + veejay_msg(VEEJAY_MSG_INFO, "Playing sample %d now", sample_size()-1); + veejay_change_playback_mode( v, VJ_PLAYBACK_MODE_SAMPLE, sample_size()-1 ); + } + } + else + { + if(v->settings->offline_record) + { + veejay_msg(VEEJAY_MSG_ERROR, "Perhaps you want to stop recording from a non visible stream ? See VIMS id %d", + VIMS_STREAM_OFFLINE_REC_STOP); + } + veejay_msg(VEEJAY_MSG_ERROR, "Not recording from visible stream"); + } +} + +void vj_event_tag_rec_offline_start(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[3]; + char *str = NULL; P_A(args,str,format,ap); + + if( v->settings->offline_record ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Already recording from stream %d", v->settings->offline_tag_id); + return; + } + if( v->settings->tag_record) + { + veejay_msg(VEEJAY_MSG_ERROR ,"Please stop the stream recorder first"); + return; + } + + if( STREAM_PLAYING(v) && (args[0] == v->uc->sample_id) ) + { + veejay_msg(VEEJAY_MSG_INFO,"Using stream recorder for stream %d (is playing)",args[0]); + _vj_event_tag_record(v, args+1, str); + return; + } + + + if( vj_tag_exists(args[0])) + { + char tmp[255]; + + int format = _recorder_format; + char prefix[40]; + sprintf(prefix, "stream-%02d", args[0]); + + if(!veejay_create_temp_file(prefix, tmp )) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error creating temporary file %s", tmp); + return; + } + + if(format==-1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Set a destination format first"); + return; + } + + if( vj_tag_init_encoder( args[0], tmp, format, + args[1]) ) + { + video_playback_setup *s = v->settings; + veejay_msg(VEEJAY_MSG_INFO, "(Offline) recording from stream %d", args[0]); + s->offline_record = 1; + s->offline_tag_id = args[0]; + s->offline_created_sample = args[2]; + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "(Offline) error starting recording stream %d",args[0]); + } + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Stream %d does not exist",args[0]); + } +} + +void vj_event_tag_rec_offline_stop(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + video_playback_setup *s = v->settings; + if(s->offline_record) + { + if( vj_tag_stop_encoder( s->offline_tag_id ) == 0 ) + { + char avi_file[255]; + + if( vj_tag_get_encoded_file(v->uc->sample_id, avi_file)!=0) return; + + // create new sample + int ns = veejay_edit_addmovie_sample(v,avi_file,0); + + if(ns) + { + if( vj_tag_get_encoded_frames(v->uc->sample_id) > 0) + veejay_msg(VEEJAY_MSG_INFO, "Created new sample %d from file %s", + ns,avi_file); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot add videofile %s to EditList!",avi_file); + } + + vj_tag_reset_encoder( v->uc->sample_id); + + if(s->offline_created_sample) + { + veejay_msg(VEEJAY_MSG_INFO, "Playing new sample %d now ", sample_size()-1); + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_SAMPLE , sample_size()-1); + } + } + s->offline_record = 0; + s->offline_tag_id = 0; + s->offline_created_sample = 0; + } +} + + +void vj_event_output_y4m_start(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + char str[1024]; + int *args = NULL; + P_A( args,str,format,ap); + if(v->stream_enabled==0) + { + int n=0; + veejay_strncpy(v->stream_outname, str,strlen(str)); + n= vj_yuv_stream_start_write(v->output_stream,str,v->edit_list); + if(n==1) + { + int s = v->settings->current_playback_speed; + veejay_msg(VEEJAY_MSG_DEBUG, "Pausing veejay"); + + veejay_set_speed(v,0); + if(vj_yuv_stream_open_pipe(v->output_stream,str,v->edit_list)) + { + vj_yuv_stream_header_pipe(v->output_stream,v->edit_list); + v->stream_enabled = 1; + } + veejay_msg(VEEJAY_MSG_DEBUG, "Resuming veejay"); + veejay_set_speed(v,s); + + } + if(n==0) + if( vj_yuv_stream_start_write(v->output_stream,str,v->edit_list)==0) + { + v->stream_enabled = 1; + veejay_msg(VEEJAY_MSG_INFO, "Started YUV4MPEG streaming to [%s]", str); + } + if(n==-1) + { + veejay_msg(VEEJAY_MSG_INFO, "YUV4MPEG stream not started"); + } + } +} + +void vj_event_output_y4m_stop(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + if(v->stream_enabled==1) + { + vj_yuv_stream_stop_write(v->output_stream); + v->stream_enabled = 0; + veejay_msg(VEEJAY_MSG_INFO , "Stopped YUV4MPEG streaming to %s", v->stream_outname); + } +} + +void vj_event_enable_audio(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; +#ifdef HAVE_JACK + if (!v->audio_running ) + { + veejay_msg(0,"Veejay was started without audio."); + return; + } + + if( v->audio == NO_AUDIO ) + { + vj_jack_enable(); + v->audio = AUDIO_PLAY; + } +#endif +} + +void vj_event_disable_audio(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t *)ptr; +#ifdef HAVE_JACK + if (!v->audio_running ) + { + veejay_msg(0,"Veejay was started without audio."); + return; + } + + if( v->audio != NO_AUDIO ) + { + vj_jack_disable(); + v->audio = NO_AUDIO; + vj_jack_reset(); + } +#endif +} + + +void vj_event_effect_inc(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int real_id; + int args[1]; + char *s = NULL; + P_A(args,s,format,ap); + if(!SAMPLE_PLAYING(v) && !STREAM_PLAYING(v)) + { + p_invalid_mode(); + return; + } + v->uc->key_effect += args[0]; + if(v->uc->key_effect >= vj_effect_max_effects()) v->uc->key_effect = 1; + + real_id = vj_effect_get_real_id(v->uc->key_effect); + + veejay_msg(VEEJAY_MSG_INFO, "Selected %s Effect %s (%d)", + (vj_effect_get_extra_frame(real_id)==1 ? "Video" : "Image"), + vj_effect_get_description(real_id), + real_id); +} + +void vj_event_effect_dec(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int real_id; + int args[1]; + char *s = NULL; + P_A(args,s,format,ap); + if(!SAMPLE_PLAYING(v) && !STREAM_PLAYING(v)) + { + p_invalid_mode(); + return; + } + + v->uc->key_effect -= args[0]; + if(v->uc->key_effect <= 0) v->uc->key_effect = vj_effect_max_effects()-1; + + real_id = vj_effect_get_real_id(v->uc->key_effect); + veejay_msg(VEEJAY_MSG_INFO, "Selected %s Effect %s (%d)", + (vj_effect_get_extra_frame(real_id) == 1 ? "Video" : "Image"), + vj_effect_get_description(real_id), + real_id); +} +void vj_event_effect_add(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + if(SAMPLE_PLAYING(v)) + { + int c = sample_get_selected_entry(v->uc->sample_id); + if ( sample_chain_add( v->uc->sample_id, c, + vj_effect_get_real_id(v->uc->key_effect)) != 1) + { + int real_id = vj_effect_get_real_id(v->uc->key_effect); + veejay_msg(VEEJAY_MSG_INFO,"Added Effect %s on chain entry %d", + vj_effect_get_description(real_id), + c + ); + if(v->no_bezerk && vj_effect_get_extra_frame(real_id) ) + { + //veejay_set_sample(v,v->uc->sample_id); + // + int nf = sample_get_startFrame( v->uc->sample_id ); + veejay_set_frame(v,nf ); + } + v->uc->chain_changed = 1; + } + } + if(STREAM_PLAYING(v)) + { + int c = vj_tag_get_selected_entry(v->uc->sample_id); + if ( vj_tag_set_effect( v->uc->sample_id, c, + vj_effect_get_real_id( v->uc->key_effect) ) != -1) + { + int real_id = vj_effect_get_real_id(v->uc->key_effect); + veejay_msg(VEEJAY_MSG_INFO,"Added Effect %s on chain entry %d", + vj_effect_get_description(real_id), + c + ); +// if(v->no_bezerk && vj_effect_get_extra_frame(real_id)) veejay_set_sample(v,v->uc->sample_id); + v->uc->chain_changed = 1; + } + } + +} + +void vj_event_misc_start_rec_auto(void *ptr, const char format[], va_list ap) +{ + +} +void vj_event_misc_start_rec(void *ptr, const char format[], va_list ap) +{ + +} +void vj_event_misc_stop_rec(void *ptr, const char format[], va_list ap) +{ + +} + +void vj_event_select_id(void *ptr, const char format[], va_list ap) +{ + veejay_t *v= (veejay_t*)ptr; + int args[2]; + char *str = NULL; + P_A(args,str, format, ap); + if(!STREAM_PLAYING(v)) + { + int sample_id = (v->uc->sample_key*12)-12 + args[0]; + if(sample_exists(sample_id)) + { + veejay_change_playback_mode( v, VJ_PLAYBACK_MODE_SAMPLE, sample_id); + vj_event_print_sample_info(v,sample_id); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR,"Selected sample %d does not exist",sample_id); + } + } + else + { + int sample_id = (v->uc->sample_key*12)-12 + args[0]; + if(vj_tag_exists(sample_id )) + { + veejay_change_playback_mode(v, VJ_PLAYBACK_MODE_TAG ,sample_id); + + } + else + { + veejay_msg(VEEJAY_MSG_INFO,"Selected stream %d does not exist",sample_id); + } + } + +} + +void vj_event_select_macro( void *ptr, const char format[], va_list ap ) +{ + int args[2]; + char *str = NULL; + P_A( args, str, format, ap ); + macro_select( args[0] ); + veejay_msg(VEEJAY_MSG_INFO, "Changed macro slot to %d", current_macro_ ); +} + +void vj_event_select_bank(void *ptr, const char format[], va_list ap) +{ + veejay_t *v =(veejay_t*) ptr; + int args[1]; + + char *str = NULL; P_A(args,str,format,ap); + if(args[0] >= 1 && args[0] <= 9) + { + veejay_msg(VEEJAY_MSG_INFO,"Selected bank %d (active sample range is now %d-%d)",args[0], + (12 * args[0]) - 12 , (12 * args[0])); + v->uc->sample_key = args[0]; + } +} + +void vj_event_print_tag_info(veejay_t *v, int id) +{ + int i, y, j, value; + char description[100]; + char source[150]; + char title[150]; + vj_tag_get_descriptive(id,description); + vj_tag_get_description(id, title); + vj_tag_get_source_name(id, source); + + if(v->settings->tag_record) + veejay_msg(VEEJAY_MSG_INFO, "Stream '%s' [%d]/[%d] [%s] %s recorded: %06ld frames ", + title,id,vj_tag_size()-1,description, + (vj_tag_get_active(id) ? "is active" : "is not active"), + vj_tag_get_encoded_frames(id)); + else + veejay_msg(VEEJAY_MSG_INFO, + "Stream [%d]/[%d] [%s] %s ", + id, vj_tag_size()-1, description, + (vj_tag_get_active(id) == 1 ? "is active" : "is not active")); + + veejay_msg(VEEJAY_MSG_INFO, "|-----------------------------------|"); + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) + { + y = vj_tag_get_effect_any(id, i); + if (y != -1) + { + veejay_msg(VEEJAY_MSG_INFO, "%02d [%d] [%s] %s (%s)", + i, + y, + vj_tag_get_chain_status(id,i) ? "on" : "off", vj_effect_get_description(y), + (vj_effect_get_subformat(y) == 1 ? "2x2" : "1x1") + ); + + for (j = 0; j < vj_effect_get_num_params(y); j++) + { + value = vj_tag_get_effect_arg(id, i, j); + if (j == 0) + { + veejay_msg(VEEJAY_MSG_PRINT, " [%04d]", value); + } + else + { + veejay_msg(VEEJAY_MSG_PRINT, " [%04d]",value); + } + + } + veejay_msg(VEEJAY_MSG_PRINT, "\n"); + + if (vj_effect_get_extra_frame(y) == 1) + { + int source = vj_tag_get_chain_source(id, i); + veejay_msg(VEEJAY_MSG_INFO, " V %s [%d]",(source == VJ_TAG_TYPE_NONE ? "Sample" : "Stream"), + vj_tag_get_chain_channel(id,i) + ); + //veejay_msg(VEEJAY_MSG_INFO, " A: %s", vj_tag_get_chain_audio(id, i) ? "yes" : "no"); + } + + veejay_msg(VEEJAY_MSG_PRINT, "\n"); + } + } +} + +void vj_event_create_effect_bundle(veejay_t * v, char *buf, int key_id, int key_mod ) +{ + char blob[50 * SAMPLE_MAX_EFFECTS]; + char prefix[20]; + int i ,y,j; + int num_cmd = 0; + int id = v->uc->sample_id; + int event_id = 0; + int bunlen=0; + veejay_memset(prefix,0,20); + veejay_memset(blob,0,50*SAMPLE_MAX_EFFECTS ); + + if(!SAMPLE_PLAYING(v) && !STREAM_PLAYING(v)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot take snapshot of Effect Chain"); + return; + } + + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) + { + y = (SAMPLE_PLAYING(v) ? sample_get_effect_any(id, i) : vj_tag_get_effect_any(id,i) ); + if (y != -1) + { + num_cmd++; + } + } + if(num_cmd < 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Effect Chain is empty." ); + return; + } + + for (i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + y = (SAMPLE_PLAYING(v) ? sample_get_effect_any(id, i) : vj_tag_get_effect_any(id,i) ); + if( y != -1) + { + //int entry = i; + int effect_id = y; + if(effect_id != -1) + { + char bundle[200]; + int np = vj_effect_get_num_params(y); + veejay_memset(bundle,0,200); + sprintf(bundle, "%03d:0 %d %d", VIMS_CHAIN_ENTRY_SET_PRESET,i, effect_id ); + for (j = 0; j < np; j++) + { + char svalue[10]; + int value = (SAMPLE_PLAYING(v) ? sample_get_effect_arg(id, i, j) : vj_tag_get_effect_arg(id,i,j)); + if(value != -1) + { + if(j == (np-1)) + sprintf(svalue, " %d;", value); + else + sprintf(svalue, " %d", value); + veejay_strncat( bundle, svalue, strlen(svalue)); + } + } + veejay_strncpy( blob+bunlen, bundle,strlen(bundle)); + bunlen += strlen(bundle); + } + } + } + sprintf(prefix, "BUN:%03d{", num_cmd); + sprintf(buf, "%s%s}",prefix,blob); + event_id = vj_event_suggest_bundle_id(); + + if(event_id <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot add more bundles"); + return; + } + + vj_msg_bundle *m = vj_event_bundle_new( buf, event_id); + if(!m) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to create new Bundle"); + return; + } + if(!vj_event_bundle_store(m)) + veejay_msg(VEEJAY_MSG_ERROR, "Error storing Bundle %d", event_id); +} + + +void vj_event_print_sample_info(veejay_t *v, int id) +{ + video_playback_setup *s = v->settings; + int y, i, j; + long value; + char timecode[15]; + char curtime[15]; + char sampletitle[200]; + MPEG_timecode_t tc; + int start = sample_get_startFrame( id ); + int end = sample_get_endFrame( id ); + int speed = sample_get_speed(id); + int len = end - start; + + if(start == 0) len ++; + veejay_memset( sampletitle,0,200); + mpeg_timecode(&tc, len, + mpeg_framerate_code(mpeg_conform_framerate(v->edit_list->video_fps)),v->edit_list->video_fps); + sprintf(timecode, "%2d:%2.2d:%2.2d:%2.2d", tc.h, tc.m, tc.s, tc.f); + + mpeg_timecode(&tc, s->current_frame_num, + mpeg_framerate_code(mpeg_conform_framerate + (v->edit_list->video_fps)), + v->edit_list->video_fps); + + sprintf(curtime, "%2d:%2.2d:%2.2d:%2.2d", tc.h, tc.m, tc.s, tc.f); + sample_get_description( id, sampletitle ); + + veejay_msg(VEEJAY_MSG_PRINT, "\n"); + veejay_msg(VEEJAY_MSG_INFO, + "Sample '%s'[%4d]/[%4d]\t[duration: %s | %8d]", + sampletitle,id,sample_size()-1,timecode,len); + + if(sample_encoder_active(v->uc->sample_id)) + { + veejay_msg(VEEJAY_MSG_INFO, "REC %09d\t[timecode: %s | %8ld ]", + sample_get_frames_left(v->uc->sample_id), + curtime,(long)v->settings->current_frame_num); + + } + else + { + veejay_msg(VEEJAY_MSG_INFO, " \t[timecode: %s | %8ld ]", + curtime,(long)v->settings->current_frame_num); + } + veejay_msg(VEEJAY_MSG_INFO, + "[%09d] - [%09d] @ %4.2f (speed %d)", + start,end, (float)speed * v->edit_list->video_fps,speed); + veejay_msg(VEEJAY_MSG_INFO, + "[%s looping]", + (sample_get_looptype(id) == + 2 ? "pingpong" : (sample_get_looptype(id)==1 ? "normal" : (sample_get_looptype(id)==3 ? "random" : "none")) ) + ); + + int first = 0; + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) + { + y = sample_get_effect_any(id, i); + if (y != -1) + { + if(!first) + { + veejay_msg(VEEJAY_MSG_INFO, "\nI: E F F E C T C H A I N\nI:"); + veejay_msg(VEEJAY_MSG_INFO,"Entry|Effect ID|SW | Name"); + first = 1; + } + veejay_msg(VEEJAY_MSG_INFO, "%02d |%03d |%s| %s %s", + i, + y, + sample_get_chain_status(id,i) ? "on " : "off", vj_effect_get_description(y), + (vj_effect_get_subformat(y) == 1 ? "2x2" : "1x1") + ); + + for (j = 0; j < vj_effect_get_num_params(y); j++) + { + value = sample_get_effect_arg(id, i, j); + if (j == 0) + { + veejay_msg(VEEJAY_MSG_PRINT, "I:\t\t\tP%d=[%d]",j, value); + } + else + { + veejay_msg(VEEJAY_MSG_PRINT, " P%d=[%d] ",j,value); + } + } + veejay_msg(VEEJAY_MSG_PRINT, "\n"); + if (vj_effect_get_extra_frame(y) == 1) + { + int source = sample_get_chain_source(id, i); + + veejay_msg(VEEJAY_MSG_PRINT, "I:\t\t\t Mixing with %s %d\n",(source == VJ_TAG_TYPE_NONE ? "sample" : "stream"), + sample_get_chain_channel(id,i) + ); + } + } + } + + //vj_el_print( sample_get_editlist( id ) ); + + veejay_msg(VEEJAY_MSG_DEBUG, + "Sample has EDL %p, Plain at %p", sample_get_editlist( id ), v->current_edit_list ); + + veejay_msg(VEEJAY_MSG_PRINT, "\n"); + +} + +void vj_event_print_plain_info(void *ptr, int x) +{ + veejay_t *v = (veejay_t*) ptr; + if( PLAIN_PLAYING(v)) vj_el_print( v->edit_list ); +} + +void vj_event_print_info(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*)ptr; + int args[1]; + char *str = NULL; P_A(args,str,format,ap); + if(args[0]==0) + { + args[0] = v->uc->sample_id; + } + + veejay_msg(VEEJAY_MSG_INFO, "%d / %d Mb used in cache", + get_total_mem(), + vj_el_cache_size() ); + + vj_event_print_plain_info(v,args[0]); + + if( SAMPLE_PLAYING(v) && sample_exists(args[0]) ) + { + vj_event_print_sample_info( v, args[0] ); + } + if( STREAM_PLAYING(v) && vj_tag_exists(args[0]) ) + { + vj_event_print_tag_info(v, args[0]) ; + } +} + +void vj_event_send_track_list ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + veejay_memset( _s_print_buf,0,SEND_BUF); + sprintf(_s_print_buf, "%05d",0); + int n = vj_tag_size()-1; + if (n >= 1 ) + { + char line[300]; + veejay_memset( _print_buf, 0,SEND_BUF); + int i; + for(i=0; i <= n; i++) + { + if(vj_tag_exists(i) && !vj_tag_is_deleted(i)) + { + vj_tag *tag = vj_tag_get(i); + if(tag->source_type == VJ_TAG_TYPE_NET ) + { + char cmd[275]; + char space[275]; + sprintf(space, "%s %d", tag->descr, tag->id ); + sprintf(cmd, "%03d%s",strlen(space),space); + APPEND_MSG(_print_buf,cmd); + } + } + } + sprintf(_s_print_buf, "%05d%s",strlen(_print_buf),_print_buf); + } + + SEND_MSG(v,_s_print_buf); +} + +void vj_event_send_tag_list ( void *ptr, const char format[], va_list ap ) +{ + int args[1]; + + veejay_t *v = (veejay_t*)ptr; + char *str = NULL; + P_A(args,str,format,ap); + int i,n; + veejay_memset( _s_print_buf,0,SEND_BUF); + sprintf(_s_print_buf, "%05d",0); + + //if(args[0]>0) start_from_tag = args[0]; + + n = vj_tag_size()-1; + if (n >= 1 ) + { + char line[300]; + veejay_memset( _print_buf,0, SEND_BUF); + + for(i=0; i <= n; i++) + { + if(vj_tag_exists(i) &&!vj_tag_is_deleted(i)) + { + vj_tag *tag = vj_tag_get(i); + char source_name[255]; + char cmd[300]; + veejay_memset(source_name,0,200);veejay_memset(cmd,0,255); + veejay_memset(line,0,300); + //vj_tag_get_description( i, source_name ); + vj_tag_get_source_name( i, source_name ); + sprintf(line,"%05d%02d%03d%03d%03d%03d%03d%s", + i, + vj_tag_get_type(i), + tag->color_r, + tag->color_g, + tag->color_b, + tag->opacity, + strlen(source_name), + source_name + ); + sprintf(cmd, "%03d%s",strlen(line),line); + APPEND_MSG(_print_buf,cmd); + } + } + sprintf(_s_print_buf, "%05d%s",strlen(_print_buf),_print_buf); + } + + SEND_MSG(v,_s_print_buf); +} + +static void _vj_event_gatter_sample_info( veejay_t *v, int id ) +{ + char description[SAMPLE_MAX_DESCR_LEN]; + int end_frame = sample_get_endFrame( id ); + int start_frame = sample_get_startFrame( id ); + char timecode[15]; + MPEG_timecode_t tc; + + mpeg_timecode( &tc, (end_frame - start_frame), + mpeg_framerate_code( mpeg_conform_framerate(v->edit_list->video_fps) ), + v->edit_list->video_fps ); + + sprintf( timecode, "%2d:%2.2d:%2.2d:%2.2d", tc.h,tc.m,tc.s,tc.f ); + sample_get_description( id, description ); + + int dlen = strlen(description); + int tlen = strlen(timecode); + + sprintf( _s_print_buf, + "%05d%03d%s%03d%s%02d%02d", + ( 3 + dlen + 3+ tlen + 2 +2), + dlen, + description, + tlen, + timecode, + 0, + id + ); + +} +static void _vj_event_gatter_stream_info( veejay_t *v, int id ) +{ + char description[SAMPLE_MAX_DESCR_LEN]; + char source[255]; + int stream_type = vj_tag_get_type( id ); + veejay_memset( source,0, 255 ); + vj_tag_get_source_name( id, source ); + vj_tag_get_description( id, description ); + + int dlen = strlen( description ); + int tlen = strlen( source ); + sprintf( _s_print_buf, + "%05d%03d%s%03d%s%02d%02d", + ( 3 + dlen + 3 + tlen + 2 + 2), + dlen, + description, + tlen, + source, + stream_type, + id + ); +} + +void vj_event_send_sample_info ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + int failed = 1; + char *str = NULL; + P_A(args,str,format,ap); + if(args[0] == 0 ) + args[0] = v->uc->sample_id; + + veejay_memset( _s_print_buf,0,SEND_BUF); + + switch( args[1] ) + { + case 0: + if(args[0] == -1) + args[0] = sample_size() - 1; + + if(sample_exists(args[0])) + { + _vj_event_gatter_sample_info(v,args[0]); + failed = 0; + } + break; + case 1: + if(args[0] == -1) + args[0] = vj_tag_size() - 1; + + if(vj_tag_exists(args[0])) + { + _vj_event_gatter_stream_info(v,args[0]); + failed = 0; + } + break; + default: + break; + } + + if(failed) + sprintf( _s_print_buf, "%05d", 0 ); + SEND_MSG(v , _s_print_buf ); +} + +#ifdef USE_GDK_PIXBUF +void vj_event_get_scaled_image ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + char *str = NULL; + P_A(args,str,format,ap); + + int w=0,h=0; + w = args[0]; + h = args[1]; + + if( w <= 0 || h <= 0 || w >= 2000 || h >= 2000 ) + { + veejay_msg(0, "Invalid image dimension %dx%d requested",w,h ); + SEND_MSG(v, "0000000" ); + return; + } + + veejay_image_t *img = NULL; + + VJFrame frame; + veejay_memcpy(&frame, v->effect_frame1, sizeof(VJFrame)); + vj_perform_get_primary_frame( v, frame.data ); + + //@ 420,422,444 + int full444 = (v->settings->composite); + if( v->video_out == 4 ) + full444 = 1; + + //@ fast*_picture delivers always 4:2:0 data to reduce bandwidth + if( use_bw_preview_ ) + vj_fastbw_picture_save_to_mem( + &frame, + w, + h, + (full444 ? 4: v->pixel_format )); + else + vj_fast_picture_save_to_mem( + &frame, + w, + h, + (full444 ? 4 : v->pixel_format )); + + int input_len = (use_bw_preview_ ? ( w * h ) : (( w * h ) + ((w * h)/2)) ); + + char header[8]; + sprintf( header, "%06d%1d", input_len, use_bw_preview_ ); + SEND_DATA(v, header, 7 ); + SEND_DATA(v, vj_perform_get_preview_buffer(), input_len ); +} +#endif + +void vj_event_toggle_bw( void *ptr, const char format[], va_list ap ) +{ + if( use_bw_preview_ ) + use_bw_preview_ = 0; + else + use_bw_preview_ = 1; +} + +void vj_event_send_sample_list ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + int args[1]; + int start_from_sample = 1; + char cmd[300]; + char *str = NULL; + int i,n; + P_A(args,str,format,ap); + + veejay_memset( _s_print_buf,0,SEND_BUF); + sprintf(_s_print_buf, "%05d", 0); + + n = sample_size(); + if( n >= 1 ) + { + char line[308]; + veejay_memset(_print_buf, 0,SEND_BUF); + for(i=start_from_sample; i <= n; i++) + { + if(sample_exists(i)) + { + char description[SAMPLE_MAX_DESCR_LEN]; + int end_frame = sample_get_endFrame(i); + int start_frame = sample_get_startFrame(i); + veejay_memset(cmd,0, 300); + + /* format of sample: + 00000 : id + 000000000 : start + 000000000 : end + xxx: str : description + */ + sample_get_description( i, description ); + + sprintf(cmd,"%05d%09d%09d%03d%s", + i, + start_frame, + end_frame, + strlen(description), + description + ); + FORMAT_MSG(line,cmd); + APPEND_MSG(_print_buf,line); + } + + } + sprintf(_s_print_buf, "%05d%s", strlen(_print_buf),_print_buf); + } + SEND_MSG(v, _s_print_buf); +} + +void vj_event_send_log ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + int num_lines = 0; + int str_len = 0; + char *messages = NULL; + veejay_memset( _s_print_buf,0,SEND_BUF); + + messages = veejay_pop_messages( &num_lines, &str_len ); + + if(str_len == 0 || num_lines == 0 ) + sprintf(_s_print_buf, "%06d", 0); + else + sprintf(_s_print_buf, "%06d%s", str_len, messages ); + if(messages) + free(messages); + + veejay_msg(VEEJAY_MSG_DEBUG, "\tDebug: send log %s", _s_print_buf); + + SEND_MSG( v, _s_print_buf ); +} + +void vj_event_send_chain_entry ( void *ptr, const char format[], va_list ap ) +{ + char fline[255]; + char line[255]; + int args[4]; + char *str = NULL; + int error = 1; + veejay_t *v = (veejay_t*)ptr; + P_A(args,str,format,ap); + veejay_memset(line,0,255); + veejay_memset(fline,0,255); + sprintf(line, "%03d", 0); + + if( SAMPLE_PLAYING(v) ) + { + if(args[0] == 0) + args[0] = v->uc->sample_id; + + if(args[1]==-1) + args[1] = sample_get_selected_entry(args[0]); + + int effect_id = sample_get_effect_any(args[0], args[1]); + + if(effect_id > 0) + { + int is_video = vj_effect_get_extra_frame(effect_id); + int params[SAMPLE_MAX_PARAMETERS]; + int p; + int video_on = sample_get_chain_status(args[0],args[1]); + int audio_on = 0; + //int audio_on = sample_get_chain_audio(args[0],args[1]); + int num_params = vj_effect_get_num_params(effect_id); + for(p = 0 ; p < num_params; p++) + params[p] = sample_get_effect_arg(args[0],args[1],p); +#ifdef STRICT_CHECKING + assert( args[2] >= 0 && args[2] <= num_params ); +#endif + for(p = num_params; p < SAMPLE_MAX_PARAMETERS; p++) + params[p] = 0; + + int kf_start = 0, kf_end = 0, kf_type = 0; + int kf_status = sample_get_kf_status( args[0],args[1] ); + sample_get_kf_tokens( args[0],args[1],args[2],&kf_start,&kf_end,&kf_type ); + sprintf(line, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + effect_id, + is_video, + num_params, + params[0], + params[1], + params[2], + params[3], + params[4], + params[5], + params[6], + params[7], + params[8], + video_on, + audio_on, + sample_get_chain_source(args[0],args[1]), + sample_get_chain_channel(args[0],args[1]), + kf_status, kf_start,kf_end,kf_type + ); + error = 0; + } + } + + if(STREAM_PLAYING(v)) + { + if(args[0] == 0) + args[0] = v->uc->sample_id; + + if(args[1] == -1) + args[1] = vj_tag_get_selected_entry(args[0]); + + int effect_id = vj_tag_get_effect_any(args[0], args[1]); + + if(effect_id > 0) + { + int is_video = vj_effect_get_extra_frame(effect_id); + int params[SAMPLE_MAX_PARAMETERS]; + int p; + int num_params = vj_effect_get_num_params(effect_id); + int video_on = vj_tag_get_chain_status(args[0], args[1]); + for(p = 0 ; p < num_params; p++) + { + params[p] = vj_tag_get_effect_arg(args[0],args[1],p); + } + for(p = num_params; p < SAMPLE_MAX_PARAMETERS;p++) + { + params[p] = 0; + } + int kf_start = 0, kf_end = 0, kf_type = 0; + int kf_status = vj_tag_get_kf_status(args[0],args[1]); + vj_tag_get_kf_tokens( args[0],args[1],args[2],&kf_start,&kf_end,&kf_type ); + sprintf(line, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + effect_id, + is_video, + num_params, + params[0], + params[1], + params[2], + params[3], + params[4], + params[5], + params[6], + params[7], + params[8], + video_on, + 0, + vj_tag_get_chain_source(args[0],args[1]), + vj_tag_get_chain_channel(args[0],args[1]), + kf_status,kf_start,kf_end, kf_type + ); + error = 0; + } + } + + if(!error) + { + FORMAT_MSG(fline,line); + SEND_MSG(v, fline); + } + else + SEND_MSG(v,line); +} + +void vj_event_send_chain_list ( void *ptr, const char format[], va_list ap ) +{ + int i; + char line[18]; + int args[1]; + char *str = NULL; + veejay_t *v = (veejay_t*)ptr; + P_A(args,str,format,ap); + + if(args[0] == 0) + args[0] = v->uc->sample_id; + + veejay_memset( _s_print_buf,0,SEND_BUF); + veejay_memset( _print_buf,0, SEND_BUF); + + sprintf( _s_print_buf, "%03d",0 ); + + if(SAMPLE_PLAYING(v)) + { + if(args[0] == -1) args[0] = sample_size()-1; + + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + int effect_id = sample_get_effect_any(args[0], i); + if(effect_id > 0) + { + int is_video = vj_effect_get_extra_frame(effect_id); + int using_effect = sample_get_chain_status(args[0], i); + int using_audio = 0; + //int using_audio = sample_get_chain_audio(args[0],i); + sprintf(line,"%02d%03d%1d%1d%1d", + i, + effect_id, + is_video, + (using_effect <= 0 ? 0 : 1 ), + (using_audio <= 0 ? 0 : 1 ) + ); + + APPEND_MSG(_print_buf,line); + } + } + sprintf(_s_print_buf, "%03d%s",strlen(_print_buf), _print_buf); + + } + if(STREAM_PLAYING(v)) + { + if(args[0] == -1) args[0] = vj_tag_size()-1; + + for(i=0; i < SAMPLE_MAX_EFFECTS; i++) + { + int effect_id = vj_tag_get_effect_any(args[0], i); + if(effect_id > 0) + { + int is_video = vj_effect_get_extra_frame(effect_id); + int using_effect = vj_tag_get_chain_status(args[0],i); + sprintf(line, "%02d%03d%1d%1d%1d", + i, + effect_id, + is_video, + (using_effect <= 0 ? 0 : 1 ), + 0 + ); + APPEND_MSG(_print_buf, line); + } + } + sprintf(_s_print_buf, "%03d%s",strlen( _print_buf ), _print_buf); + + } + SEND_MSG(v, _s_print_buf); +} + +void vj_event_send_video_information ( void *ptr, const char format[], va_list ap ) +{ + /* send video properties */ + char info_msg[255]; + veejay_t *v = (veejay_t*)ptr; + veejay_memset(info_msg,0,sizeof(info_msg)); + veejay_memset( _s_print_buf,0,SEND_BUF); + veejay_memset( info_msg,0, 255 ); + editlist *el = ( SAMPLE_PLAYING(v) ? sample_get_editlist( v->uc->sample_id ) : + v->current_edit_list ); + + long n_frames = el->total_frames; + if( SAMPLE_PLAYING(v)) + n_frames = sample_max_video_length( v->uc->sample_id ); + + snprintf(info_msg,sizeof(info_msg)-1, "%04d %04d %01d %c %02.3f %1d %04d %06ld %02d %03ld %08ld %1d", + el->video_width, + el->video_height, + el->video_inter, + el->video_norm, + el->video_fps, + el->has_audio, + el->audio_bits, + el->audio_rate, + el->audio_chans, + el->num_video_files, + n_frames, + v->audio + ); + sprintf( _s_print_buf, "%03d%s",strlen(info_msg), info_msg); + + + SEND_MSG(v,_s_print_buf); +} + +void vj_event_send_editlist ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + veejay_memset( _s_print_buf,0, SEND_BUF ); + int b = 0; + editlist *el = ( SAMPLE_PLAYING(v) ? sample_get_editlist( v->uc->sample_id ) : + v->current_edit_list ); + + if( el->num_video_files <= 0 ) + { + SEND_MSG( v, "000000"); + return; + } + + + char *msg = (char*) vj_el_write_line_ascii( el, &b ); + sprintf( _s_print_buf, "%06d%s", b, msg ); + if(msg)free(msg); + + SEND_MSG( v, _s_print_buf ); +} + +void vj_event_send_devices ( void *ptr, const char format[], va_list ap ) +{ + char str[255]; + struct dirent **namelist; + int n_dev = 0; + int n; + char device_list[512]; + char useable_devices[2]; + int *args = NULL; + veejay_t *v = (veejay_t*)ptr; + P_A(args,str,format,ap); + veejay_memset(device_list,0,512); + + n = scandir(str,&namelist,0,alphasort); + if( n<= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "No device information in [%s]",str); + SEND_MSG(v,"0000"); + return; + } + + + while(n--) + { + if( strncmp(namelist[n]->d_name, "video", 4)==0) + { + FILE *fd; + char filename[300]; + sprintf(filename,"%s%s",str,namelist[n]->d_name); + fd = fopen( filename, "r"); + if(fd) + { + fclose(fd); + } + } + } + sprintf(useable_devices,"%02d", n_dev); + + APPEND_MSG( device_list, useable_devices ); + SEND_MSG(v,device_list); + +} + +void vj_event_send_frame ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + + int i = 0; + for( i = 0; i < 8 ; v->rlinks ++ ) + if( v->rlinks[i] < 0 || v->rlinks[i] == v->uc->current_link ) + break; + + if( i == 8 ) { + veejay_msg(0, "No more video stream connections allowed, limited to 8"); + SEND_MSG(v,"00000000000000000000"); + return; + } + + if (!v->settings->is_dat ) + { + veejay_msg(1, "Wrong control port for retrieving frames!"); + SEND_MSG(v, "00000000000000000000"); //@ send empty header only (20 bytes) + return; + } + + + v->rlinks[i] = v->uc->current_link; + v->settings->unicast_frame_sender = 1; + +// v->settings->unicast_frame_sender = 1; +// v->settings->unicast_link_id = v->uc->current_link; +} + + +void vj_event_mcast_start ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + if(!v->settings->use_vims_mcast) + veejay_msg(VEEJAY_MSG_ERROR, "start veejay in multicast mode (see -V commandline option)"); + else + { + v->settings->mcast_frame_sender = 1; + veejay_msg(VEEJAY_MSG_INFO, "Veejay started mcast frame sender"); + } +} + + +void vj_event_mcast_stop ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + if(!v->settings->use_vims_mcast) + veejay_msg(VEEJAY_MSG_ERROR, "start veejay in multicast mode (see -V commandline option)"); + else + { + v->settings->mcast_frame_sender = 0; + veejay_msg(VEEJAY_MSG_INFO, "Veejay stopped mcast frame sender"); + } +} + +void vj_event_send_effect_list ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + int i; + char *priv_msg = NULL; + int len = 0; + + for( i = 1; i < vj_effect_max_effects(); i ++ ) + len += vj_effect_get_summary_len( i ); + + priv_msg = (char*) malloc(sizeof(char) * (5 + len + 1000)); + memset(priv_msg, 0, (5+len+100)); + sprintf(priv_msg, "%05d", len ); + + for(i=1; i < vj_effect_max_effects(); i++) + { + char line[300]; + char fline[300]; + int effect_id = vj_effect_get_real_id(i); + veejay_memset(line,0, 300); + veejay_memset(fline,0,300); + if(vj_effect_get_summary(i,line)) + { + sprintf(fline, "%03d%s", strlen(line), line ); + veejay_strncat( priv_msg, fline, strlen(fline) ); + } + } + SEND_MSG(v,priv_msg); + free(priv_msg); +} + + + +int vj_event_load_bundles(char *bundle_file) +{ + FILE *fd; + char *event_name, *event_msg; + char buf[65535]; + int event_id=0; + if(!bundle_file) return -1; + fd = fopen(bundle_file, "r"); + veejay_memset(buf,0,65535); + if(!fd) return -1; + while(fgets(buf,4096,fd)) + { + buf[strlen(buf)-1] = 0; + event_name = strtok(buf, "|"); + event_msg = strtok(NULL, "|"); + if(event_msg!=NULL && event_name!=NULL) { + //veejay_msg(VEEJAY_MSG_INFO, "Event: %s , Msg [%s]",event_name,event_msg); + event_id = atoi( event_name ); + if(event_id && event_msg) + { + vj_msg_bundle *m = vj_event_bundle_new( event_msg, event_id ); + if(m != NULL) + { + if( vj_event_bundle_store(m) ) + { + veejay_msg(VEEJAY_MSG_INFO, "(VIMS) Registered a bundle as event %03d",event_id); + } + } + } + } + } + fclose(fd); + return 1; +} + +void vj_event_do_bundled_msg(void *ptr, const char format[], va_list ap) +{ + veejay_t *v = (veejay_t*) ptr; + int args[1]; + char s[1024]; + vj_msg_bundle *m; + P_A( args, s , format, ap); + //veejay_msg(VEEJAY_MSG_INFO, "Parsing message bundle as event"); + m = vj_event_bundle_get(args[0]); + if(m) + { + vj_event_parse_bundle( v, m->bundle ); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Requested event %d does not exist. ",args[0]); + } +} + +#ifdef HAVE_SDL +void vj_event_attach_detach_key(void *ptr, const char format[], va_list ap) +{ + int args[4] = { 0,0,0,0 }; + char value[100]; + veejay_memset(value,0,sizeof(value)); + int mode = 0; + + + P_A( args, value, format ,ap ); + + if( args[1] <= 0 || args[1] >= SDLK_LAST) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid key identifier %d (range is 1 - %d)", args[1], SDLK_LAST); + return; + } + if( args[2] < 0 || args[2] > VIMS_MOD_SHIFT ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid key modifier (3=shift,2=ctrl,1=alt, 0=none)"); + return; + } + + char *clone = NULL; + mode = args[0]; + + switch(mode) + { + case 1: + vj_event_unregister_keyb_event( args[1],args[2] ); + break; + default: + + if( strncmp(value, "dummy",5 ) != 0 ) + clone = value; + vj_event_register_keyb_event( args[0], args[1], args[2], clone ); + break; + } +} +#endif + +void vj_event_bundled_msg_del(void *ptr, const char format[], va_list ap) +{ + + int args[1]; + char *s = NULL; + P_A(args,s,format,ap); + if ( vj_event_bundle_del( args[0] ) == 0) + { + veejay_msg(VEEJAY_MSG_INFO,"Bundle %d deleted from event system",args[0]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Bundle is %d is not known",args[0]); + } +} + + + + +void vj_event_bundled_msg_add(void *ptr, const char format[], va_list ap) +{ + + int args[2] = {0,0}; + char s[1024]; + veejay_memset(s,0, 1024); + P_A(args,s,format,ap); + + if(args[0] == 0) + { + args[0] = vj_event_suggest_bundle_id(); + veejay_msg(VEEJAY_MSG_DEBUG, "(VIMS) suggested new Event id %d", args[0]); + } + else + { + veejay_msg(VEEJAY_MSG_DEBUG, "(VIMS) requested to add/replace %d", args[0]); + } + + if(args[0] < VIMS_BUNDLE_START|| args[0] > VIMS_BUNDLE_END ) + { + // invalid bundle + veejay_msg(VEEJAY_MSG_ERROR, "Customized events range from %d-%d", VIMS_BUNDLE_START, VIMS_BUNDLE_END); + return; + } + // allocate new + veejay_strrep( s, '_', ' '); + vj_msg_bundle *m = vj_event_bundle_new(s, args[0]); + if(!m) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error adding bundle ?!"); + return; + } + + // bye existing bundle + if( vj_event_bundle_exists(args[0])) + { + veejay_msg(VEEJAY_MSG_DEBUG,"(VIMS) Bundle exists - replacing contents "); + vj_msg_bundle *mm = vj_event_bundle_get( args[0] ); + if(mm) + { + m->modifier = mm->modifier; + m->accelerator = mm->accelerator; + } + + vj_event_bundle_del( args[0] ); + } + + if( vj_event_bundle_store(m)) + { + veejay_msg(VEEJAY_MSG_INFO, "(VIMS) Registered Bundle %d in VIMS",args[0]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "(VIMS) Error in Bundle %d '%s'",args[0],s ); + } +} + +void vj_event_set_stream_color(void *ptr, const char format[], va_list ap) +{ + int args[4]; + char *s = NULL; + P_A(args,s,format,ap); + veejay_t *v = (veejay_t*) ptr; + + if(STREAM_PLAYING(v)) + { + if(args[0] == 0 ) args[0] = v->uc->sample_id; + if(args[0] == -1) args[0] = vj_tag_size()-1; + } + // allow changing of color while playing plain/sample + if(vj_tag_exists(args[0]) && + vj_tag_get_type(args[0]) == VJ_TAG_TYPE_COLOR ) + { + CLAMPVAL( args[1] ); + CLAMPVAL( args[2] ); + CLAMPVAL( args[3] ); + vj_tag_set_stream_color(args[0],args[1],args[2],args[3]); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Stream %d does not exist", + args[0]); + } +} + +#ifdef USE_GDK_PIXBUF +void vj_event_screenshot(void *ptr, const char format[], va_list ap) +{ + int args[4]; + char filename[1024]; + veejay_memset(filename,0,1024); + P_A(args, filename, format, ap ); + veejay_t *v = (veejay_t*) ptr; + + char type[5]; + veejay_memset(type,0,5); + + + veejay_get_file_ext( filename, type, sizeof(type)); + + if(args[0] == 0 ) + args[0] = v->video_output_width; + if(args[1] == 0 ) + args[1] = v->video_output_height; + + v->settings->export_image = + vj_picture_prepare_save( filename , type, args[0], args[1] ); + if(v->settings->export_image) + v->uc->hackme = 1; +} +#else +#ifdef HAVE_JPEG +void vj_event_screenshot(void *ptr, const char format[], va_list ap) +{ + int args[4]; + char filename[1024]; + veejay_memset(filename,0,1024); + P_A(args, filename, format, ap ); + veejay_t *v = (veejay_t*) ptr; + + v->uc->hackme = 1; + v->uc->filename = strdup( filename ); +} +#endif +#endif + + + + +void vj_event_quick_bundle( void *ptr, const char format[], va_list ap) +{ + vj_event_commit_bundle( (veejay_t*) ptr,0,0); +} + + +void vj_event_vloopback_start(void *ptr, const char format[], va_list ap) +{ + int args[2]; + char *s = NULL; + char device_name[100]; + + P_A(args,s,format,ap); + + veejay_t *v = (veejay_t*)ptr; + + sprintf(device_name, "/dev/video%d", args[0] ); + + veejay_msg(VEEJAY_MSG_INFO, "Open vloopback %s", device_name ); + + v->vloopback = vj_vloopback_open( device_name, + (v->edit_list->video_norm == 'p' ? 1 : 0), + 1, // pipe, 0 = mmap + v->video_output_width, + v->video_output_height, + v->pixel_format ); + if(v->vloopback == NULL) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Cannot open vloopback %s", device_name ); + + return; + } + + int ret = 0; + + veejay_msg(VEEJAY_MSG_DEBUG, "Vloopback pipe"); + ret = vj_vloopback_start_pipe( v->vloopback ); + /* + veejay_msg(VEEJAY_MSG_DEBUG, "Vloopback mmap"); + ret = vj_vloopback_start_mmap( v->vloopback ); + */ + + if(ret) + { + veejay_msg(VEEJAY_MSG_DEBUG, + "Setup vloopback!"); + } + + if(!ret) + { + veejay_msg(VEEJAY_MSG_ERROR, + "closing vloopback"); + if(v->vloopback) + vj_vloopback_close( v->vloopback ); + v->vloopback = NULL; + } + + if( v->vloopback == NULL ) + veejay_msg(VEEJAY_MSG_ERROR, "Failed to setup vloopback pusher"); + +} + +void vj_event_vloopback_stop( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*) ptr; + vj_vloopback_close( v->vloopback ); +} + +/* + * Function that returns the options for a special sample (markers, looptype, speed ...) or + * for a special stream ... + * + * Needs two Parameters, first on: -1 last created sample, 0 == current playing sample, >=1 id of sample + * second parameter is the playmode of this sample to decide if its a video sample or any kind of stream + * (for this see comment on void vj_event_send_sample_info(..) + */ +void vj_event_send_sample_options ( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2]; + int id=0; + char *str = NULL; + int failed = 1; + + P_A(args,str,format,ap); + if(args[0] == 0 ) + args[0] = v->uc->sample_id; + if(args[0] == -1) + args[0] = sample_size() - 1; + + veejay_memset( _s_print_buf,0,SEND_BUF); + + id = args[0]; + char options[100]; + char prefix[4]; + veejay_memset(prefix,0, 4 ); + veejay_memset(options, 0,100); + + switch(args[1]) + { + case VJ_PLAYBACK_MODE_SAMPLE: + if(sample_exists(id)) + { + /* For gathering sample-infos use the sample_info_t-structure that is defined in /libsample/sampleadm.h */ + sample_info *si = sample_get(id); + if (si) + { + int start = si->first_frame; + int end = si->last_frame; + int speed = si->speed; + int loop = si->looptype; + int marker_start = si->marker_start; + int marker_end = si->marker_end; + int effects_on = si->effect_toggle; + + sprintf( options, + "%06d%06d%03d%02d%06d%06d%01d", + start, + end, + speed, + loop, + marker_start, + marker_end, + effects_on); + failed = 0; + + sprintf(prefix, "%02d", 0 ); + + } + } + break; + case VJ_PLAYBACK_MODE_TAG: + if(vj_tag_exists(id)) + { + /* For gathering further informations of the stream first decide which type of stream it is + the types are definded in libstream/vj-tag.h and uses then the structure that is definded in + libstream/vj-tag.h as well as some functions that are defined there */ + vj_tag *si = vj_tag_get(id); + int stream_type = si->source_type; + + sprintf(prefix, "%02d", stream_type ); + + if (stream_type == VJ_TAG_TYPE_COLOR) + { + int col[3] = {0,0,0}; + col[0] = si->color_r; + col[1] = si->color_g; + col[2] = si->color_b; + + sprintf( options, + "%03d%03d%03d", + col[0], + col[1], + col[2] + ); + failed = 0; + } + /* this part of returning v4l-properties is here implemented again ('cause there is + * actually a VIMS-command to get these values) to get all necessary stream-infos at + * once so only ONE VIMS-command is needed */ + else if (stream_type == VJ_TAG_TYPE_V4L) + { +#ifdef HAVE_UNICAP + int brightness=0; + int hue = 0; + int contrast = 0; + int color = 0; + int white = 0; + int sat = 0; + int effects_on = 0; + + vj_tag_get_v4l_properties(id,&brightness,&hue,&sat, &contrast, &color, &white ); + effects_on = si->effect_toggle; + + sprintf( options, + "%05d%05d%05d%05d%05d%05d%01d", + brightness, + hue, + sat, + contrast, + color, + white, + effects_on); + failed = 0; +#endif + } + else + { + int effects_on = si->effect_toggle; + sprintf( options, + "%01d", + effects_on); + failed = 0; + } + } + break; + default: + break; + } + + if(failed) + sprintf( _s_print_buf, "%05d", 0 ); + else + sprintf( _s_print_buf, "%05d%s%s",strlen(prefix) + strlen(options), prefix,options ); + + SEND_MSG(v , _s_print_buf ); +} +#ifdef HAVE_FREETYPE +void vj_event_get_srt_list( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + char *str = NULL; + int len = 0; + + if(!v->font) + { + SEND_MSG(v, "000000" ); + return; + } + + char **list = vj_font_get_sequences( v->font ); + int i; + + if(!list) + { + SEND_MSG(v, "000000" ); + return; + } + + for(i = 0; list[i] != NULL ; i ++ ) + { + int k = strlen(list[i]); + if(k>0) + len += (k+1); + } + if(len <= 0) + { + SEND_MSG(v, "000000" ); + return; + } + + str = vj_calloc( len + 20 ); + char *p = str; + sprintf(p, "%06d", len ); + p += 6; + for(i = 0; list[i] != NULL ; i ++ ) + { + sprintf(p, "%s ", list[i]); + p += strlen(list[i]) + 1; + free(list[i]); + } + free(list); + + SEND_MSG(v , str ); + free(str); +} + +void vj_event_get_font_list( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + char *str = NULL; + int len = 0; + + if(!v->font) + { + SEND_MSG(v, "000000" ); + return; + } + + char **list = vj_font_get_all_fonts( v->font ); + int i; + + if(!list) + { + SEND_MSG(v, "000000" ); + return; + } + + for(i = 0; list[i] != NULL ; i ++ ) + { + int k = strlen(list[i]); + if(k>0) + len += (k+3); + } + if(len <= 0) + { + SEND_MSG(v, "000000" ); + return; + } + + str = vj_calloc( len + 20 ); + char *p = str; + sprintf(p, "%06d", len ); + p += 6; + for(i = 0; list[i] != NULL ; i ++ ) + { + int k = strlen(list[i]); + sprintf(p, "%03d%s", k,list[i]); + p += (k + 3); + free(list[i]); + } + free(list); + + SEND_MSG(v , str ); + free(str); + +} +void vj_event_get_srt_info( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2] = {0,0}; + char *str = NULL; + P_A(args,str,format,ap); + + if(!v->font) + { + SEND_MSG(v, "000000"); + return; + } + + char *sequence = vj_font_get_sequence( v->font,args[0] ); + + if(!sequence) + { + SEND_MSG(v, "000000"); + return; + + } + + int len = strlen( sequence ); + str = vj_calloc( len+20 ); + sprintf(str,"%06d%s",len,sequence); + free(sequence); + + SEND_MSG(v , str ); +} + +void vj_event_save_srt( void *ptr, const char format[], va_list ap ) +{ + char file_name[512]; + int args[1]; + veejay_t *v = (veejay_t*)ptr; + + P_A(args,file_name,format,ap); + + if(!v->font) + { + veejay_msg(0, "No font renderer active"); + return; + } + + if( vj_font_save_srt( v->font, file_name ) ) + veejay_msg(VEEJAY_MSG_INFO, "Saved SRT file '%s'", file_name ); + else + veejay_msg(VEEJAY_MSG_ERROR, "Unable to save SRT file '%s'", file_name ); +} +void vj_event_load_srt( void *ptr, const char format[], va_list ap ) +{ + char file_name[512]; + int args[1]; + veejay_t *v = (veejay_t*)ptr; + + P_A(args,file_name,format,ap); + + if(!v->font) + { + veejay_msg(0, "No font renderer active"); + return; + } + + if( vj_font_load_srt( v->font, file_name ) ) + veejay_msg(VEEJAY_MSG_INFO, "Loaded SRT file '%s'", file_name ); + else + veejay_msg(VEEJAY_MSG_ERROR, "Unable to open SRT file '%s'", file_name ); +} + +void vj_event_select_subtitle( void *ptr, const char format[], va_list ap ) +{ + int args[6]; + veejay_t *v = (veejay_t*)ptr; + + if(!v->font) + { + veejay_msg(VEEJAY_MSG_ERROR, "No font renderer active"); + return; + } + + P_A(args,NULL,format,ap); + + vj_font_set_current( v->font, args[0] ); +} + + +void vj_event_get_keyframes( void *ptr, const char format[], va_list ap ) +{ + int args[3]; + veejay_t *v = (veejay_t*)ptr; + + P_A(args,NULL,format,ap); + + if(SAMPLE_PLAYING(v)) + { + int data_len = 0; + unsigned char *data = sample_chain_get_kfs( v->uc->sample_id, args[0],args[1], &data_len ); + if( data_len > 0 && data ) + { + char header[32]; + sprintf(header, "%08d",data_len ); + SEND_DATA( v, header,8); + SEND_DATA( v, data, data_len ); + free(data); + return; + } + } else if (STREAM_PLAYING(v)) + { + int data_len = 0; + unsigned char *data = vj_tag_chain_get_kfs( v->uc->sample_id, args[0],args[1], &data_len ); + if( data_len > 0 && data ) + { + char header[32]; + sprintf(header, "%08d",data_len ); + SEND_DATA( v, header,8); + SEND_DATA( v, data, data_len ); + free(data); + return; + } + + } + SEND_MSG( v, "00000000" ); +} + +void vj_event_set_kf_status( void *ptr, const char format[], va_list ap ) +{ + int args[3]; + veejay_t *v = (veejay_t*)ptr; + + P_A(args,NULL,format,ap); + + if(SAMPLE_PLAYING(v)) + { + sample_chain_set_kf_status( v->uc->sample_id, args[0],args[1] ); + veejay_msg(VEEJAY_MSG_INFO, "Sample %d is using animated parameter values", v->uc->sample_id); + } else if (STREAM_PLAYING(v)) + { + vj_tag_chain_set_kf_status(v->uc->sample_id,args[0],args[1] ); + veejay_msg(VEEJAY_MSG_INFO, "Stream %d is using animated parameter values", v->uc->sample_id); + + } +} +void vj_event_reset_kf( void *ptr, const char format[], va_list ap ) +{ + int args[3]; + veejay_t *v = (veejay_t*)ptr; + + P_A(args,NULL,format,ap); + + if(SAMPLE_PLAYING(v)) + { + sample_chain_reset_kf( v->uc->sample_id, args[0] ); + } else if (STREAM_PLAYING(v)) + { + vj_tag_chain_reset_kf( v->uc->sample_id, args[0] ); + } + +} + +static void *select_dict( veejay_t *v , int n ) +{ + void *dict = NULL; + if( SAMPLE_PLAYING(v) ) + return sample_get_dict( n ); + else if(STREAM_PLAYING(v)) + return vj_tag_get_dict( n ); + return NULL; +} + +void vj_event_add_subtitle( void *ptr, const char format[], va_list ap ) +{ + unsigned char text[2048]; + int args[6]; + int k; + veejay_t *v = (veejay_t*)ptr; + + if(!v->font) + { + veejay_msg(VEEJAY_MSG_ERROR, "No font renderer active"); + return; + } + + veejay_memset(text,0,2048); + P_A(args,text,format,ap); + + void *dict = select_dict( v, v->uc->sample_id ); + if(!dict) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid playback mode for subtitles"); + return; + } + + int len = strlen( text ); + if ( len <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "No text given"); + return; + } + for( k = 0; k < len ; k ++ ) { + if( !isprint( text[k] ) ) + text[k] == 0x20; + } + + + + if( args[3] < 0 || args[4] < 0 || + args[3] >= v->current_edit_list->video_width || + args[4] >= v->current_edit_list->video_height ) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Invalid XY position"); + return; + } + + vj_font_set_dict( v->font, dict ); + + int id = vj_font_new_text( v->font, text, (long) args[1], (long)args[2], args[0] ); + + vj_font_set_position( v->font, args[3] ,args[4] ); + + char newslot[50]; + sprintf(newslot, "%05d%05d",5, id ); + SEND_MSG(v,newslot); +} +void vj_event_upd_subtitle( void *ptr, const char format[], va_list ap ) +{ + int args[5]; + char text[2048]; + + veejay_t *v = (veejay_t*)ptr; + P_A(args,text,format,ap); + + if(!v->font ) + { + veejay_msg(0, "No font renderer active"); + return; + } + + void *dict = select_dict( v, v->uc->sample_id ); + if(!dict) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid playback mode for subtitles"); + return; + } + + vj_font_set_dict( v->font, dict ); +// vj_font_set_constraints_and_dict( v->font, +// (long) args[1], (long) args[2], +// v->current_edit_list->video_fps, +// dict ); + vj_font_update_text( v->font, (long) args[1], (long) args[2], args[0], text ); +} + +void vj_event_del_subtitle( void *ptr, const char format[], va_list ap ) +{ + int args[5]; + veejay_t *v = (veejay_t*)ptr; + P_A(args,NULL,format,ap); + + if(!v->font) + { + veejay_msg(0, "No font renderer active"); + return; + } + + + void *dict = select_dict( v, v->uc->sample_id ); + if(!dict) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid playback mode for subtitles"); + return; + } + + vj_font_set_dict( v->font, dict ); + + vj_font_del_text( v->font, args[0] ); + +} + +void vj_event_font_set_position( void *ptr, const char format[], va_list ap ) +{ + int args[5]; + veejay_t *v = (veejay_t*)ptr; + P_A(args,NULL,format,ap); + + if(!v->font) + { + veejay_msg(0, "No font renderer active"); + return; + } + + void *dict = select_dict( v, v->uc->sample_id ); + if(!dict) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid playback mode for subtitles"); + return; + } + vj_font_set_dict( v->font, dict ); + + vj_font_set_position( v->font, args[0] ,args[1] ); +} +void vj_event_font_set_color( void *ptr, const char format[], va_list ap ) +{ + int args[6]; + veejay_t *v = (veejay_t*)ptr; + P_A(args,NULL,format,ap); + + if(!v->font) + { + veejay_msg(0, "No font renderer active"); + return; + } + + void *dict = select_dict( v, v->uc->sample_id ); + if(!dict) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid playback mode for subtitles"); + return; + } + vj_font_set_dict( v->font, dict ); + + + switch( args[4] ) + { + case 0: + vj_font_set_outline_and_border( + v->font, args[0],args[1] ); + //outline, //use_bg + break; + case 1: + vj_font_set_fgcolor( v->font, + args[0],args[1],args[2],args[3] ); + break; + case 2: + vj_font_set_bgcolor( v->font, + args[0],args[1],args[2],args[3] ); + break; + case 3: + vj_font_set_lncolor( v->font, + args[0],args[1],args[2],args[3] ); + break; + default: + veejay_msg(0, "Invalid mode. Use 0=outline/border 1=FG,2=BG,3=LN" ); + break; + } +} +void vj_event_font_set_size_and_font( void *ptr, const char format[], va_list ap ) +{ + int args[5]; + veejay_t *v = (veejay_t*)ptr; + P_A(args,NULL,format,ap); + + if(!v->font) + { + veejay_msg(0, "No font renderer active"); + return; + } + + void *dict = select_dict( v, v->uc->sample_id ); + if(!dict) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid playback mode for subtitles"); + return; + } + vj_font_set_dict( v->font, dict ); + + vj_font_set_size_and_font(v->font, args[0],args[1]); +} +#endif + +void vj_event_sequencer_add_sample( void *ptr, const char format[], va_list ap ) +{ + int args[5]; + veejay_t *v = (veejay_t*)ptr; + P_A(args,NULL,format,ap); + + int seq = args[0]; + int id = args[1]; + + if( seq < 0 || seq >= MAX_SEQUENCES ) + { + veejay_msg( VEEJAY_MSG_ERROR,"Slot not within bounds"); + return; + } + + if( sample_exists(id )) + { + v->seq->samples[ seq ] = id; + if( v->seq->size < MAX_SEQUENCES ) + { + v->seq->size ++; + } + veejay_msg(VEEJAY_MSG_INFO, "Added sample %d to slot %d/%d", + id, seq,MAX_SEQUENCES ); + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Sample %d does not exist. It cannot be added to the sequencer",id); + } + +} + +void vj_event_sequencer_del_sample( void *ptr, const char format[], va_list ap ) +{ + int args[5]; + veejay_t *v = (veejay_t*)ptr; + P_A(args,NULL,format,ap); + + int seq_it = args[0]; + + if( seq_it < 0 || seq_it >= MAX_SEQUENCES ) + { + veejay_msg( VEEJAY_MSG_ERROR, "Sequence slot %d is not used, nothing deleted",seq_it ); + return; + } + + if( v->seq->samples[ seq_it ] ) + { + veejay_msg(VEEJAY_MSG_INFO, "Deleted sequence %d (Sample %d)", seq_it, + v->seq->samples[ seq_it ] ); + v->seq->samples[ seq_it ] = 0; + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Sequence slot %d already empty", seq_it ); + } + +} + +void vj_event_get_sample_sequences( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + int i; + + if( v->seq->size <= 0 ) + { + SEND_MSG(v,"000000"); + return; + } + + veejay_memset( _s_print_buf, 0, SEND_BUF ); + + sprintf(_s_print_buf, "%06d%04d%04d%04d", + ( 12 + (4*MAX_SEQUENCES)), + v->seq->current,MAX_SEQUENCES, v->seq->active ); + + for( i =0; i < MAX_SEQUENCES ;i ++ ) + { + char tmp[32]; + sprintf(tmp, "%04d", v->seq->samples[i]); + veejay_strncat(_s_print_buf, tmp, 4 ); + } + + SEND_MSG(v, _s_print_buf ); + +} + +void vj_event_sample_sequencer_active( void *ptr, const char format[], va_list ap ) +{ + int args[5]; + veejay_t *v = (veejay_t*)ptr; + P_A(args,NULL,format,ap); + + if( v->seq->size == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Sequencer list is empty. Please add samples first"); + return; + } + + if( args[0] == 0 ) + { + v->seq->active = 0; + v->seq->current = 0; + veejay_msg(VEEJAY_MSG_INFO, "Sample sequencer disabled"); + } + else + { + v->seq->active = 1; + veejay_msg(VEEJAY_MSG_INFO, "Sample sequencer enabled"); + } +} + +void vj_event_set_macro_status( void *ptr, const char format[], va_list ap ) +{ + veejay_t *v = (veejay_t*)ptr; + int args[2] = {0,0}; + int k,i; + char *str = NULL; + P_A(args,str,format,ap); + + if( args[1] == 0 ) + { + reset_macro_(); + macro_status_ = 0; + macro_current_age_ = 0; + macro_expected_age_ = 0; + args[0] = 0; + macro_line_[0] = -1; + macro_line_[1] = 0; + macro_line_[2] = 0; + veejay_msg(VEEJAY_MSG_INFO, "Cleared all recorded keystrokes"); + } + if( args[0] == 0 ) + { + if( macro_port_ ) + { + macro_status_ = 0; //@ stop + veejay_msg(VEEJAY_MSG_INFO, "Stopped macro recorder"); + } + } else if (args[0] == 1 ) + { + reset_macro_(); + macro_port_ = vpn(VEVO_ANONYMOUS_PORT); + macro_bank_[ current_macro_ ] = macro_port_; + veejay_msg(VEEJAY_MSG_INFO , "Recording keystrokes!"); + macro_status_ = 1; + macro_line_[0] = v->settings->current_frame_num; + macro_line_[1] = v->uc->playback_mode; + macro_line_[2] = v->uc->sample_id; + macro_current_age_ =0; + } + else if (args[0] == 2) + { + if( macro_status_ == 0 && macro_port_ ) + { + macro_status_ = 2; + veejay_msg(VEEJAY_MSG_INFO, "Resume playing keystrokes"); + } else if( macro_line_[0] >= 0 && macro_port_ != NULL) + { + /* if( macro_status_ == 1 ) + { //@ store current speed and direction + char last[100]; + snprintf(last,100, "%03d:%d;", + VIMS_VIDEO_SET_SPEED, v->settings->current_playback_speed ); + store_macro_( v, last, v->settings->current_frame_num ); + }*/ + macro_status_ = 2; + veejay_msg(VEEJAY_MSG_INFO, "Replay all keystrokes!"); + veejay_change_playback_mode( v, macro_line_[1],macro_line_[2] ); + veejay_set_frame( v, macro_line_[0] ); + macro_expected_age_ = 0; + replay_macro_(); + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "No keystrokes to playback!"); + } + } +} + +void vj_event_stop() +{ + // destroy bundlehash, destroy keyboard_events +#ifdef HAVE_SDL + del_all_keyb_events(); +#endif + + vj_picture_free(); + + vj_event_vevo_free(); + + lzo_free( lzo_ ); + + int i; + for( i = 0; i < 12; i ++ ) + { + macro_port_ = macro_bank_[i]; + if(macro_port_) + reset_macro_(); + } +} + diff --git a/veejay-server/veejay/vj-event.h b/veejay-server/veejay/vj-event.h new file mode 100644 index 00000000..d6eff360 --- /dev/null +++ b/veejay-server/veejay/vj-event.h @@ -0,0 +1,273 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ + +#ifndef VJ_EVENT_H +#define VJ_EVENT_H +#include +#ifdef HAVE_XML2 +#include +#include +#endif + +void vj_event_fmt_arg ( int *args, char *str, const char format[], va_list ap); +void vj_event_init (); +void vj_event_print_range ( int n1, int n2); +int veejay_finish_action_file(void *ptr, char *filename ); +int veejay_load_action_file( void *ptr, char *filename ); +int vj_event_macro_status(void); +void vj_event_select_macro( void *ptr, + const char format[], va_list ap); +void vj_event_stop(); +int vj_event_parse_msg( void *v, char *msg, int msg_len ); + + +#ifdef HAVE_SDL +#ifdef HAVE_XML2 +void vj_event_xml_new_keyb_event ( void *v, xmlDocPtr doc, xmlNodePtr cur ); +#endif +#endif +int vj_event_get_video_format(void); +int vj_event_get_num_args(int net_id); +void vj_event_update_remote(void *ptr); +void vj_event_dump(void); +void vj_event_set_stream_color ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_arg_inc ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_arg_set ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_disable ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_enable ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_audio_toggle ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_audio_vol_inc ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_channel ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_channel_inc ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_del ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_inc ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_channel_dec ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_preset ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_select ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_set_arg_val ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_set ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_src_toggle ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_source ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_srccha ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_video_toggle ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_disable_video ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_enable_video ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_entry_set_defaults ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_fade_in ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_fade_out ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_toggle ( void *ptr, const char format[], va_list ap ); +void vj_event_chain_clear ( void *ptr, const char format[], va_list ap ); +void vj_event_dec_frame ( void *ptr, const char format[], va_list ap ); +void vj_event_effect_add ( void *ptr, const char format[], va_list ap ); +void vj_event_effect_dec ( void *ptr, const char format[], va_list ap ); +void vj_event_effect_inc ( void *ptr, const char format[], va_list ap ); +void vj_event_el_copy ( void *ptr, const char format[], va_list ap ); +void vj_event_el_crop ( void *ptr, const char format[], va_list ap ); +void vj_event_el_cut ( void *ptr, const char format[], va_list ap ); +void vj_event_el_del ( void *ptr, const char format[], va_list ap ); +void vj_event_el_paste_at ( void *ptr, const char format[], va_list ap ); +void vj_event_el_load_editlist ( void *ptr, const char format[], va_list ap ); +void vj_event_el_save_editlist ( void *ptr, const char format[], va_list ap ); +void vj_event_el_add_video_his ( void *ptr, const char format[], va_list ap ); +void vj_event_el_add_video_sample ( void *ptr, const char format[], va_list ap ); +void vj_event_el_add_video ( void *ptr, const char format[], va_list ap ); +void vj_event_entry_down ( void *ptr, const char format[], va_list ap ); +void vj_event_entry_up ( void *ptr, const char format[], va_list ap ); +void vj_event_goto_end ( void *ptr, const char format[], va_list ap ); +void vj_event_goto_start ( void *ptr, const char format[], va_list ap ); +void vj_event_inc_frame ( void *ptr, const char format[], va_list ap ); +void vj_event_misc_start_rec ( void *ptr, const char format[], va_list ap ); +void vj_event_misc_start_rec_auto ( void *ptr, const char format[], va_list ap ); +void vj_event_misc_stop_rec ( void *ptr, const char format[], va_list ap ); +void vj_event_next_second ( void *ptr, const char format[], va_list ap ); +void vj_event_none ( void *ptr, const char format[], va_list ap ); +void vj_event_output_y4m_start ( void *ptr, const char format[], va_list ap ); +void vj_event_output_y4m_stop ( void *ptr, const char format[], va_list ap ); +void vj_event_output_raw_start ( void *ptr, const char format[], va_list ap ); +void vj_event_output_raw_stop ( void *ptr, const char format[], va_list ap ); +void vj_event_play_forward ( void *ptr, const char format[], va_list ap ); +void vj_event_play_reverse ( void *ptr, const char format[], va_list ap ); +void vj_event_play_speed ( void *ptr, const char format[], va_list ap ); +void vj_event_play_speed_kb ( void *ptr, const char format[], va_list ap ); +void vj_event_play_slow ( void *ptr, const char format[], va_list ap ); +void vj_event_play_stop ( void *ptr, const char format[], va_list ap ); +void vj_event_prev_second ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_clear_all ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_copy ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_del ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_end ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_load_list ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_rec_start ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_rec_stop ( void *ptr, const char format[], va_list ap ); +#ifdef HAVE_XML2 +void vj_event_sample_save_list ( void *ptr, const char format[], va_list ap ); +#endif +void vj_event_sample_select ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_descr ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_end ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_freeze_play ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_loop_type ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_speed ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_nl ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_no ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_num_loops ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_pp ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_start ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_start ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_marker_start ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_marker_end ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_marker_clear ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_set_marker ( void *ptr, const char format[], va_list ap ); +void vj_event_set_frame ( void *ptr, const char format[], va_list ap ); +void vj_event_set_play_mode ( void *ptr, const char format[], va_list ap ); +void vj_event_set_play_mode_go ( void *ptr, const char format[], va_list ap ); +void vj_event_switch_sample_tag ( void *ptr, const char format[], va_list ap ); +#ifdef HAVE_SDL +void vj_event_set_screen_size ( void *ptr, const char format[], va_list ap ); +#endif +void vj_event_sample_set_dup ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_del ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_new_raw ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_new_avformat ( void *ptr, const char format[], va_list ap ); +#ifdef USE_GDK_PIXBUF +void vj_event_tag_new_picture ( void *ptr, const char format[], va_list ap ); +#endif +void vj_event_tag_new_v4l ( void *ptr, const char format[], va_list ap ); +#ifdef SUPPORT_READ_DV2 +void vj_event_tag_new_dv1394 ( void *ptr, const char format[], va_list ap ); +#endif +void vj_event_tag_new_color ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_new_y4m ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_new_net ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_new_mcast ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_rec_offline_start ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_rec_offline_stop ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_rec_start ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_rec_stop ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_select ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_toggle ( void *ptr, const char format[], va_list ap ); +void vj_event_select_id ( void *ptr, const char format[], va_list ap ); +void vj_event_select_bank ( void *ptr, const char format[], va_list ap ); +void vj_event_enable_audio ( void *ptr, const char format[], va_list ap ); +void vj_event_disable_audio ( void *ptr, const char format[], va_list ap ); +void vj_event_print_info ( void *ptr, const char format[], va_list ap ); +void vj_event_send_keylist( void *ptr, const char format[], va_list ap ); +void vj_event_send_tag_list ( void *ptr, const char format[], va_list ap ); +void vj_event_send_sample_list ( void *ptr, const char format[], va_list ap ); +void vj_event_send_log ( void *ptr, const char format[], va_list ap ); +void vj_event_send_chain_list ( void *ptr, const char format[], va_list ap ); +void vj_event_send_chain_entry ( void *ptr, const char format[], va_list ap ); +void vj_event_send_sample_history_list ( void *ptr, const char format[], va_list ap ); +void vj_event_send_video_information ( void *ptr, const char format[], va_list ap ); +void vj_event_send_editlist ( void *ptr, const char format[], va_list ap ); +void vj_event_send_devices ( void *ptr, const char format[], va_list ap ); +void vj_event_send_frame ( void *ptr, const char fomrat[], va_list ap ); +void vj_event_send_effect_list ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_new ( void *ptr, const char format[], va_list ap ); +void vj_event_do_bundled_msg ( void *ptr, const char format[], va_list ap ); +void vj_event_bundled_msg_del ( void *ptr, const char format[], va_list ap ); +void vj_event_bundled_msg_add ( void *ptr, const char format[], va_list ap ); +void vj_event_read_file ( void *ptr, const char format[], va_list ap ); +#ifdef HAVE_SDL +void vj_event_attach_detach_key ( void *ptr, const char format[], va_list ap ); +#endif +void vj_event_write_actionfile ( void *ptr, const char format[], va_list ap ); +void vj_event_screenshot ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_chain_enable ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_chain_disable ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_chain_enable ( void *ptr, const char format[], va_list ap ); +void vj_event_v4l_set_brightness ( void *ptr, const char format[], va_list ap ); +void vj_event_v4l_set_contrast ( void *ptr, const char format[], va_list ap ); +void vj_event_v4l_set_color ( void *ptr, const char format[], va_list ap ); +void vj_event_v4l_set_hue ( void *ptr, const char format[], va_list ap ); +void vj_event_v4l_set_white ( void *ptr, const char format[], va_list ap ); +void vj_event_v4l_set_saturation ( void *ptr, const char format[], va_list ap ); +void vj_event_v4l_get_info ( void *ptr, const char format[], va_list ap ); +void vj_event_manual_chain_fade(void *ptr, const char format[], va_list ap); +void vj_event_tag_chain_disable ( void *ptr, const char format[], va_list ap ); +void vj_event_all_samples_chain_toggle ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_rel_start ( void *ptr, const char format[], va_list ap ); +void vj_event_effect_set_bg ( void *ptr, const char format[], va_list ap ); +void vj_event_quit ( void *ptr, const char format[], va_list ap ); +void vj_event_suspend ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_set_format ( void *ptr, const char format[], va_list ap ); +void vj_event_set_volume ( void *ptr, const char format[], va_list ap ); +void vj_event_tag_new_shm ( void *ptr, const char format[], va_list ap ); +void vj_event_debug_level ( void *ptr, const char format[], va_list ap ); +void vj_event_bezerk ( void *ptr, const char format[], va_list ap ); +void vj_event_plugin_command ( void *ptr, const char format[], va_list ap ); +void vj_event_load_plugin ( void *ptr, const char format[], va_list ap ); +void vj_event_unload_plugin ( void *ptr, const char format[], va_list ap ); +void vj_event_fullscreen ( void *ptr, const char format[], va_list ap ); +void vj_event_sample_mode ( void *ptr, const char format[], va_list ap ); +void vj_event_set_rgb_parameter_type ( void *ptr,const char format[], va_list ap ); +void vj_event_tag_set_descr ( void *ptr, const char format[], va_list ap ); +void vj_event_send_vimslist ( void *ptr, const char format[], va_list ap ); +void vj_event_send_devicelist ( void *ptr, const char format[], va_list ap ); +void vj_event_send_bundles (void *ptr, const char format[], va_list ap); + +void vj_event_mcast_start( void *ptr, const char format[], va_list ap); + +void vj_event_mcast_stop( void *ptr, const char format[], va_list ap); +void vj_event_vloopback_start ( void *ptr, const char format[], va_list ap ); +void vj_event_vloopback_stop ( void *ptr, const char format[], va_list ap ); +void vj_event_quick_bundle (void *ptr, const char format[], va_list ap); + +void vj_event_sample_rand_start( void *ptr, const char format[], va_list ap); +void vj_event_sample_rand_stop( void *ptr, const char format[], va_list ap); +void vj_event_send_sample_info ( void *ptr, const char format[], va_list ap ); +void vj_event_get_scaled_image( void *ptr, const char format[], va_list ap); +void vj_event_send_sample_options( void *ptr, const char format[], va_list ap); +void vj_event_stream_set_length( void *ptr, const char format[], va_list ap); +void vj_event_linkclose(void *ptr, const char format[], va_list ap); +void vj_event_send_track_list( void *ptr, const char format[], va_list ap); + +void vj_event_toggle_bw( void *ptr, const char format[], va_list ap ); +void vj_event_no_caching(void *ptr, const char format[], va_list ap); + +#ifdef HAVE_FREETYPE +void vj_event_get_srt_list( void *ptr, const char format[], va_list ap ); +void vj_event_get_font_list( void *ptr, const char format[], va_list ap ); +void vj_event_get_srt_info( void *ptr, const char format[], va_list ap ); +void vj_event_save_srt( void *ptr, const char format[], va_list ap ); +void vj_event_load_srt( void *ptr, const char format[], va_list ap ); +void vj_event_add_subtitle( void *ptr, const char format[], va_list ap ); +void vj_event_upd_subtitle( void *ptr, const char format[], va_list ap ); +void vj_event_del_subtitle( void *ptr, const char format[], va_list ap ); +void vj_event_font_set_position(void *ptr, const char format[], va_list ap ); +void vj_event_font_set_color(void *ptr, const char format[], va_list ap ); +void vj_event_font_set_size_and_font(void *ptr,const char format[], va_list ap ); +void vj_event_select_subtitle( void *ptr, const char format[], va_list ap ); +void vj_event_toggle_osd( void *ptr, const char format[], va_list ap ); +void vj_event_toggle_copyright( void *ptr, const char format[], va_list ap ); +void vj_event_toggle_osd_extra(void *ptr, const char format[], va_list ap); +void vj_event_set_macro_status( void *ptr, const char format[], va_list ap ); +#endif +void vj_event_set_framerate( void *ptr, const char format[], va_list ap ); +void vj_event_sync_correction( void *ptr,const char format[], va_list ap ); +void vj_event_get_keyframes( void *ptr, const char format[], va_list ap ); +void vj_event_set_kf_status( void *ptr, const char format[], va_list ap ); +void vj_event_reset_kf( void *ptr, const char format[], va_list ap); +void vj_event_sample_sequencer_active( void *ptr, const char format[], va_list ap ); +void vj_event_get_sample_sequences( void *ptr, const char format[], va_list ap ); +void vj_event_sequencer_del_sample( void *ptr, const char format[], va_list ap ); +void vj_event_sequencer_add_sample( void *ptr, const char format[], va_list ap ); +void vj_event_projection_inc( void *ptr, const char format[], va_list ap); +void vj_event_projection_dec( void *ptr, const char format[], va_list ap); +#endif diff --git a/veejay-server/veejay/vj-eventman.c b/veejay-server/veejay/vj-eventman.c new file mode 100644 index 00000000..fb840b3a --- /dev/null +++ b/veejay-server/veejay/vj-eventman.c @@ -0,0 +1,2570 @@ +/* veejay - Linux VeeJay + * (C) 2002-2005 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif + +#define MAX_INDEX 1024 + +#define VIMS_REQUIRE_ALL_PARAMS (1<<0) /* all params needed */ +#define VIMS_DONT_PARSE_PARAMS (1<<1) /* dont parse arguments */ +#define VIMS_LONG_PARAMS (1<<3) /* long string arguments (bundle, plugin) */ +#define VIMS_ALLOW_ANY (1<<4) /* use defaults when optional arguments are not given */ +#define livido_port_t vevo_port_t + +#define SAMPLE_ID_HELP "Sample ID (0=current playing, -1=last created, > 0 = Sample ID)" +#define STREAM_ID_HELP "Stream ID (-1=last created, > 0 = Stream ID)" +#define SAMPLE_STREAM_ID_HELP "Sample or Stream ID (0=current playing, -1=last created, > 0 = ID)" +static vevo_port_t **index_map_ = NULL; +/* define the function pointer to any event */ +typedef void (*vevo_event)(void *ptr, const char format[], va_list ap); + +static void dump_event_stderr(vevo_port_t *event) +{ + char *fmt = NULL; + char *name = NULL; + int n_arg = 0; + int vims_id = 0; + char *param = NULL; + int i; + char key[10]; + + size_t len = vevo_property_element_size(event, "format", 0 ); + if(len > 0 ) + { + fmt = malloc(sizeof(char) * len); + vevo_property_get( event, "format", 0, &fmt ); + } + name = malloc(sizeof(char) * vevo_property_element_size( event, "description", 0 )); + vevo_property_get( event, "description", 0, &name ); + + vevo_property_get( event, "arguments", 0, &n_arg ); + vevo_property_get( event, "vims_id", 0, &vims_id ); + + veejay_msg(VEEJAY_MSG_INFO, "VIMS selector %03d\t'%s'", vims_id, name ); + if(fmt) + veejay_msg(VEEJAY_MSG_INFO, "\tFORMAT: '%s', where:", fmt ); + + for( i = 0; i < n_arg; i ++ ) + { + sprintf(key, "help_%d", i ); + size_t len2 = vevo_property_element_size( event, key, 0 ); + if(len2 > 0 ) + { + param = malloc(sizeof(char) * len2 ); + vevo_property_get( event, key, 0, ¶m ); + veejay_msg(VEEJAY_MSG_INFO,"\t\tArgument %d is %s", i, param ); + free(param); + } + } + + if(fmt) free(fmt); + free(name); + +} + +int vj_event_vevo_list_size(void) +{ + int i; + int len =0; + for ( i = 0; i < MAX_INDEX ;i ++ ) + { + if( index_map_[i] != NULL ) + { + char *name = vj_event_vevo_get_event_name( i ); + char *format= vj_event_vevo_get_event_format( i ); + len += (name == NULL ? 0: strlen( name )); + len += (format == NULL ? 0: strlen( format )); + len += 12; + if(name) free(name); + if(format)free(format); + } + } + return len; +} + +char *vj_event_vevo_help_vims( int id, int n ) +{ + char *help = NULL; + char key[10]; + sprintf(key, "help_%d", n); + size_t len = vevo_property_element_size( index_map_[id], key, 0 ); + if(len > 0 ) + { + help = (char*) malloc(sizeof(char) * len ); + vevo_property_get( index_map_[id], key, 0, &help ); + } + return help; +} + +char *vj_event_vevo_list_serialize(void) +{ + int len = vj_event_vevo_list_size() + 5; + char *res = (char*) malloc(sizeof(char) * len + 100 ); + int i; + memset( res, 0, len ); + sprintf(res, "%05d", len - 5); + for ( i = 0; i < MAX_INDEX ;i ++ ) + { + if ( index_map_[i] != NULL ) + { + char *name = vj_event_vevo_get_event_name( i ); + char *format= vj_event_vevo_get_event_format( i ); + int name_len = (name == NULL ? 0: strlen( name )); + int fmt_len = (format == NULL? 0: strlen( format )); + char tmp[13]; + sprintf( tmp, "%04d%02d%03d%03d", + i, vj_event_vevo_get_num_args(i), fmt_len, name_len ); + veejay_strncat( res, tmp, 12 ); + if( format != NULL ) + veejay_strncat( res, format, fmt_len ); + if( name != NULL ) + veejay_strncat( res, name, name_len ); + if(name) free(name); + if(format) free(format); + + } + } + return res; +} + +void vj_event_vevo_inline_fire(void *super, int vims_id, const char *format, ... ) +{ + va_list ap; + va_start( ap, format ); + void *func = NULL; + vevo_property_get( index_map_[vims_id], "function", 0, &func ); + vevo_event f = (vevo_event) func; + f( super, format, ap ); + va_end( ap ); +} + +void vj_event_vevo_inline_fire_default( void *super, int vims_id, const char *format ) +{ + char key[10]; + int i = 0; + int n = 0; + int dval[4] = {0,0,0,0}; + if(!index_map_[vims_id]) + { + veejay_msg(0, "No such event: %d", vims_id); + return; + } + vevo_property_get( index_map_[vims_id] , "arguments", 0, &n ); + // dangerous, dval != atom_type, i != n defaults + while( i < n ) + { + sprintf(key, "argument_%d", i ); + vevo_property_get( index_map_[vims_id], key, 0, &dval[i] ); + i++; + } + vj_event_vevo_inline_fire( super, vims_id, format, &dval[0],&dval[1],&dval[2],&dval[3]); +} + +static vevo_port_t *_new_event( + const char *format, + int vims_id, + const char *name, + void *function, + int n_arg, + int flags, + ... ) +{ + int n = 0; + int it = 1; + char param_name[16]; + char descr_name[255]; + +#ifdef STRICT_CHECKING + assert( name != NULL ); + assert( function != NULL ); + assert( vims_id > 0 ); +#endif + + vevo_port_t *p = (void*) vpn( VEVO_EVENT_PORT ); +#ifdef STRICT_CHECKING + assert( p != NULL ); +#endif + if( format ) + vevo_property_set( p, "format", VEVO_ATOM_TYPE_STRING, 1, &format ); + else + vevo_property_set( p, "format", VEVO_ATOM_TYPE_STRING, 0, NULL ); + + vevo_property_set( p, "description", VEVO_ATOM_TYPE_STRING, 1, &name ); + vevo_property_set( p, "function", VEVO_ATOM_TYPE_VOIDPTR, 1,&function ); + vevo_property_set( p, "arguments", VEVO_ATOM_TYPE_INT, 1, &n_arg ); + vevo_property_set( p, "flags", VEVO_ATOM_TYPE_INT, 1, &flags ); + vevo_property_set( p, "vims_id", VEVO_ATOM_TYPE_INT, 1, &vims_id ); + + va_list ap; + va_start(ap, flags); + + for( n = 0; n < n_arg ; n ++) + { + int dd = 0; + char *ds = NULL; + + sprintf(param_name, "argument_%d", n ); + const char *arg = va_arg( ap, const char*); +#ifdef STRICT_CHECKING + if(!arg) veejay_msg(VEEJAY_MSG_DEBUG, "\t%s - %d = '%s' of format %c (%s)",param_name, n, arg, format[it],format ); + assert( arg != NULL ); +#endif + char *descr = (char*) strdup( arg ); + sprintf(descr_name, "help_%d", n ); + + if (format[it] == 'd') + { + dd = va_arg( ap, int ); + vevo_property_set( p, param_name, VEVO_ATOM_TYPE_INT,1, &dd ); + } + else + { + ds = va_arg( ap, char*); + if(!ds) + vevo_property_set( p, param_name, VEVO_ATOM_TYPE_STRING, 0, NULL ); + else + vevo_property_set( p, param_name, VEVO_ATOM_TYPE_STRING,1, &ds ); + } + + vevo_property_set( p, descr_name, VEVO_ATOM_TYPE_STRING, 1,&descr ); + + it += 3; + + if( ds ) + free( ds); + if( descr ) + free( descr ); + } + + va_end(ap); + + return p; +} + +void * vj_event_vevo_get_event_function( int id ) +{ + void *func = NULL; + if( index_map_[id] ) + vevo_property_get( index_map_[id] , "function", 0, &func ); + return func; +} + +char *vj_event_vevo_get_event_name( int id ) +{ + char *descr = NULL; + size_t len = vevo_property_element_size( index_map_[id], "description", 0 ); + if(len > 0 ) + { + descr = (char*) malloc(sizeof(char) * len ); + vevo_property_get( index_map_[id], "description", 0, &descr ); + } + return descr; +} +char *vj_event_vevo_get_event_format( int id ) +{ + char *fmt = NULL; + if(!index_map_[id]) + return NULL; + size_t len = vevo_property_element_size( index_map_[id], "format", 0 ); + if(len > 0 ) + { + fmt = (char*) malloc(sizeof(char) * len ); + vevo_property_get( index_map_[id], "format", 0, &fmt ); + } + return fmt; +} + +int vj_event_exists( int id ) +{ + if( index_map_[id]) + return 1; + return 0; +} + + +int vj_event_vevo_get_default_value(int id, int p) +{ + int n =0; + if(!index_map_[id]) + return 0; + char key[15]; + sprintf(key, "argument_%d",p); + vevo_property_get(index_map_[id], key, 0, &n ); + return n; +} +int vj_event_vevo_get_num_args(int id) +{ + if(!index_map_[id]) + return 0; + int n =0; + vevo_property_get(index_map_[id], "arguments", 0, &n ); + return n; +} +int vj_event_vevo_get_flags( int id ) +{ + if(!index_map_[id]) + return 0; + int flags = 0; + vevo_property_get( index_map_[id], "flags", 0, &flags ); + return flags; +} + +int vj_event_vevo_get_vims_id( int id ) +{ + if(!index_map_[id]) + return 0; + int vims_id = 0; + vevo_property_get( index_map_[id], "vims_id", 0, &vims_id ); + return vims_id; +} + +void vj_event_vevo_dump(void) +{ + int i; + veejay_msg(VEEJAY_MSG_INFO, "VIMS Syntax: ':;'"); + veejay_msg(VEEJAY_MSG_INFO, "Use arguments according to FORMAT"); + veejay_msg(VEEJAY_MSG_INFO, "FORMAT controls the arguments as in C printf. Interpreted sequences are:"); + veejay_msg(VEEJAY_MSG_INFO, "\t%%d\tinteger"); + veejay_msg(VEEJAY_MSG_INFO, "\t%%s\tstring"); + + for( i = 0; i < MAX_INDEX; i ++ ) + { + if( index_map_[i] ) + { + dump_event_stderr( index_map_[i] ); + } + } +} + +void vj_event_vevo_free(void) +{ + int i; + + veejay_msg(VEEJAY_MSG_DEBUG, "Closing VIMS event system"); + + if( !index_map_) + return; + + for( i = 0 ; i < MAX_INDEX ; i ++ ) + if( index_map_[i] ) vevo_port_free( index_map_[i] ); + + free(index_map_); +} + +void vj_init_vevo_events(void) +{ + index_map_ = (vevo_port_t*) vj_malloc(sizeof(vevo_port_t*) * MAX_INDEX ); + veejay_memset( index_map_, 0, sizeof( vevo_port_t *) * MAX_INDEX ); + + index_map_[VIMS_MACRO] = _new_event( + "%d %d", + VIMS_MACRO, + "Macro keystroke recorder/playback", + vj_event_set_macro_status, + 2, + VIMS_ALLOW_ANY, + "Keep or reset (1=reset)", + 1, + "Macro status (0=disabled,1=record,2=playing)", + 0, + NULL ); + + index_map_[VIMS_MACRO_SELECT] = _new_event( + "%d", + VIMS_MACRO_SELECT, + "Select a bank to store macro keystrokes", + vj_event_select_macro, + 1, + VIMS_ALLOW_ANY, + "Bank ID", + 0, + NULL ); + + index_map_[VIMS_VIDEO_PLAY_FORWARD] = _new_event( + NULL, + VIMS_VIDEO_PLAY_FORWARD, + "Play forward", + vj_event_play_forward, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_VIDEO_PLAY_BACKWARD] = _new_event( + NULL, + VIMS_VIDEO_PLAY_BACKWARD, + "Play backward", + vj_event_play_reverse, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_VIDEO_PLAY_STOP] = _new_event( + NULL, + VIMS_VIDEO_PLAY_STOP, + "Play stop", + vj_event_play_stop, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_VIDEO_SKIP_FRAME] = _new_event( + "%d", + VIMS_VIDEO_SKIP_FRAME, + "Skip N frames forward", + vj_event_inc_frame, + 1, + VIMS_ALLOW_ANY, + "Number of frames", // param label + 1, // default + NULL ); + + index_map_[VIMS_VIDEO_PREV_FRAME] = _new_event( + "%d", + VIMS_VIDEO_PREV_FRAME, + "Skip N frames backward", + vj_event_dec_frame, + 1, + VIMS_ALLOW_ANY, + "Number of frames", + 1, + NULL ); + + index_map_[VIMS_VIDEO_SKIP_SECOND] = _new_event( + "%d", + VIMS_VIDEO_SKIP_SECOND, + "Skip N seconds forward", + vj_event_next_second, + 1, + VIMS_ALLOW_ANY, + "Number of seconds", + 1, + NULL ); + + index_map_[VIMS_VIDEO_PREV_SECOND] = _new_event( + "%d", + VIMS_VIDEO_PREV_SECOND, + "Skip N seconds backward", + vj_event_prev_second, + 1, + VIMS_ALLOW_ANY, + "Number of seconds", + 1, + NULL ); + + index_map_[VIMS_VIDEO_GOTO_START] = _new_event( + NULL, + VIMS_VIDEO_GOTO_START, + "Go to starting position", + vj_event_goto_start, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_VIDEO_GOTO_END] = _new_event( + NULL, + VIMS_VIDEO_GOTO_END, + "Go to ending position", + vj_event_goto_end, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_VIDEO_SET_SPEEDK] = _new_event( + "%d", + VIMS_VIDEO_SET_SPEED, + "Change trickplay speed depending on play direction", + vj_event_play_speed_kb, + 1, + VIMS_ALLOW_ANY, + "Frame step", + 1, + NULL ); + + index_map_[VIMS_VIDEO_SET_SPEED] = _new_event( + "%d", + VIMS_VIDEO_SET_SPEED, + "Change trickplay speed", + vj_event_play_speed, + 1, + VIMS_ALLOW_ANY, + "Frame step", + 1, + NULL ); + + index_map_[VIMS_VIDEO_SET_SLOW] = _new_event( + "%d", + VIMS_VIDEO_SET_SLOW, + "Change frameduplication", + vj_event_play_slow, + 1, + VIMS_ALLOW_ANY, + "Frame repeat", + 0, + NULL ); + + index_map_[VIMS_VIDEO_SET_FRAME] = _new_event( + "%d", + VIMS_VIDEO_SET_FRAME, + "Set current frame number", + vj_event_set_frame, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Frame number", + 0, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_UP] = _new_event( + "%d", + VIMS_CHAIN_ENTRY_UP, + "Increment current FX chain entry", + vj_event_entry_up, + 1, + VIMS_ALLOW_ANY, + "Increment value", + 1, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_DOWN] = _new_event( + "%d", + VIMS_CHAIN_ENTRY_DOWN, + "Decrement current FX chain entry", + vj_event_entry_down, + 1, + VIMS_ALLOW_ANY, + "Decrement value", + -1, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_CHANNEL_INC] = _new_event( + "%d", + VIMS_CHAIN_ENTRY_CHANNEL_INC, + "Increment current Channel ID on selected chain entry", + vj_event_chain_entry_channel_inc, + 1, + VIMS_ALLOW_ANY, + "Increment vale", + 1, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_CHANNEL_DEC] = _new_event( + "%d", + VIMS_CHAIN_ENTRY_CHANNEL_DEC, + "Decrement current Channel ID on selected chain entry", + vj_event_chain_entry_channel_dec, + 1, + VIMS_ALLOW_ANY, + "Decrement value", + 1, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_SOURCE_TOGGLE] = _new_event( + "%d %d", + VIMS_CHAIN_ENTRY_SOURCE_TOGGLE, + "Change source type of a chain entry", + vj_event_chain_entry_src_toggle, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Chain entry", + 1, + "Source type (0=Sample, 1=Stream)", + 0, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_INC_ARG] = _new_event( + "%d %d", + VIMS_CHAIN_ENTRY_INC_ARG, + "Increment current value of a parameter", + vj_event_chain_arg_inc, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Parameter number", + 0, + "Step size", + 0, + NULL ); + + + + index_map_[VIMS_CHAIN_ENTRY_DEC_ARG] = _new_event( + "%d %d", + VIMS_CHAIN_ENTRY_DEC_ARG, + "Decrement current value of a parameter", + vj_event_chain_arg_inc, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Parameter number", + 0, + "Step size", + 0, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_SET_STATE] = _new_event( + "%d %d", + VIMS_CHAIN_ENTRY_SET_STATE, + "Enable / disable effect on current entry", + vj_event_chain_entry_video_toggle, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_CHAIN_TOGGLE] = _new_event( + NULL, + VIMS_CHAIN_TOGGLE, + "Enable / disable Effect Chain", + vj_event_chain_toggle, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SET_SAMPLE_START] = _new_event( + NULL, + VIMS_SET_SAMPLE_START, + "Store current frame as starting position of new sample", + vj_event_sample_start, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SAMPLE_KF_STATUS] = _new_event( + "%d %d", + VIMS_SAMPLE_KF_STATUS, + "Change KF play status for entry X", + vj_event_set_kf_status, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Entry ID", + 0, + "Status value", + 0, + NULL ); + index_map_[VIMS_SAMPLE_KF_RESET] = _new_event( + "%d", + VIMS_SAMPLE_KF_STATUS, + "Clear KF series on entry X", + vj_event_reset_kf, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Entry ID", + 0, + NULL ); + index_map_[VIMS_SAMPLE_KF_GET] = _new_event( + "%d %d", + VIMS_SAMPLE_KF_GET, + "Get keyframes for parameter Y on entry X", + vj_event_get_keyframes, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Entry ID", + 0, + "Parameter ID", + 0, + NULL ); + + index_map_[VIMS_SET_SAMPLE_END] = _new_event( + NULL, + VIMS_SET_SAMPLE_END, + "Store current frame as ending position of a new sample ( and commit )", + vj_event_sample_end, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SAMPLE_SET_MARKER_START] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_MARKER_START, + "Set in point on sample", + vj_event_sample_set_marker_start, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Position", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_SET_MARKER_END] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_MARKER_END, + "Set out point on sample", + vj_event_sample_set_marker_end, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Position", + 0, + NULL ); + + + index_map_[VIMS_FXLIST_INC] = _new_event( + "%d", + VIMS_FXLIST_INC, + "Increment index of Effect List", + vj_event_effect_inc, + 1, + VIMS_ALLOW_ANY, + "Step size", + 1, + NULL ); + + index_map_[VIMS_FXLIST_DEC] = _new_event( + "%d", + VIMS_FXLIST_DEC, + "Decrement index of Effect List", + vj_event_effect_dec, + 1, + VIMS_ALLOW_ANY, + "Step size", + 1, + NULL ); + index_map_[VIMS_FXLIST_ADD] = _new_event( + NULL, + VIMS_FXLIST_ADD, + "Put selected effect in Effect List to current sample and current entry", + vj_event_effect_add, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SELECT_BANK] = _new_event( + "%d", + VIMS_SELECT_BANK, + "Set current sample bank", + vj_event_select_bank, + 1, + VIMS_ALLOW_ANY, + "Bank number", + 0, + NULL ); + index_map_[VIMS_SELECT_ID] = _new_event( + "%d", + VIMS_SELECT_ID, + "Play stream or sample slot (depends on current playmode)", + vj_event_select_id, + 1, + VIMS_ALLOW_ANY, + "Slot number", + 1, + NULL ); + + index_map_[VIMS_SAMPLE_RAND_START] = _new_event( + "%d", + VIMS_SAMPLE_RAND_START, + "Start sample randomizer", + vj_event_sample_rand_start, + 1, + VIMS_ALLOW_ANY, + "Mode (0=Random duration, 1=Sample duration)", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_RAND_STOP] = _new_event( + NULL, + VIMS_SAMPLE_RAND_STOP, + "Stop sample randomizer", + vj_event_sample_rand_stop, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SAMPLE_TOGGLE_LOOP] = _new_event( + "%d %d", + VIMS_SAMPLE_TOGGLE_LOOP, + "Switch between loop types", + vj_event_sample_set_loop_type, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Looptype (0=None, 1=Normal, 2=Pingpong)", + -1, + NULL); + + index_map_[VIMS_PREVIEW_BW] = _new_event( + NULL, + VIMS_PREVIEW_BW, + "Toggle grayscale preview on/off (default=off)", + vj_event_toggle_bw, + 0, + VIMS_ALLOW_ANY, + NULL, + NULL ); + index_map_[VIMS_RECORD_DATAFORMAT] = _new_event( + "%s", + VIMS_RECORD_DATAFORMAT, + "Set codec to use for recording (global setting)", + vj_event_tag_set_format, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Codec name (use 'x' to see list)", + NULL, + NULL ); + + index_map_[VIMS_REC_AUTO_START] = _new_event( + NULL, + VIMS_REC_AUTO_START, + "Start recording now and play when finished", + vj_event_misc_start_rec_auto, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_REC_START] = _new_event( + NULL, + VIMS_REC_START, + "Start recording", + vj_event_misc_start_rec, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_REC_STOP] = _new_event( + NULL, + VIMS_REC_STOP, + "Stop recording", + vj_event_misc_stop_rec, + 0, + VIMS_ALLOW_ANY , + NULL ); + + index_map_[VIMS_SAMPLE_NEW] = _new_event( + "%d %d", + VIMS_SAMPLE_NEW, + "Create a new sample", + vj_event_sample_new, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Starting position", + 0, + "Ending position", + -1, + NULL ); + + index_map_[VIMS_PRINT_INFO] = _new_event( + "%d", + VIMS_PRINT_INFO, + "Print current settings", + vj_event_print_info, + 1, + VIMS_ALLOW_ANY, + "Sample or Stream ID (depends on playmode, 0=current playing)", + 0, + NULL ); + + index_map_[VIMS_SET_PLAIN_MODE] = _new_event( + "%d", + VIMS_SET_PLAIN_MODE, + "Change playback mode", + vj_event_set_play_mode, + 1, + VIMS_ALLOW_ANY, + "Playback (2=plain,1=stream,0=sample)", + 2, + NULL ); + + index_map_[VIMS_SAMPLE_SET_LOOPTYPE] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_LOOPTYPE, + "Change looptype of sample", + vj_event_sample_set_loop_type, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Looptype (0=None,1=Normal,2=Pingpong)", + 1, + NULL ); + + index_map_[VIMS_SAMPLE_SET_SPEED] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_SPEED, + "Change playback speed of sample", + vj_event_sample_set_speed, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Speed (0=pause, > 0 and < (end-start)", + 1, + NULL ); + + index_map_[VIMS_SAMPLE_SET_DESCRIPTION] = _new_event( + "%d %s", + VIMS_SAMPLE_SET_DESCRIPTION, + "Change title of sample", + vj_event_sample_set_descr, + 2, + VIMS_REQUIRE_ALL_PARAMS | VIMS_LONG_PARAMS, + SAMPLE_ID_HELP, + 0, + "Title", + NULL, + NULL ); + + index_map_[VIMS_SAMPLE_SET_END] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_END, + "Change end position of sample", + vj_event_sample_set_end, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Frame number", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_SET_START] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_START, + "Change start position of sample", + vj_event_sample_set_start, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Frame number", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_SET_DUP] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_DUP, + "Change frame repeat for this sample", + vj_event_sample_set_dup, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Frame repeat", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_SET_MARKER_START] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_MARKER_START, + "Set in point in sample", + vj_event_sample_set_marker_start, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Position", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_SET_MARKER_END] = _new_event( + "%d %d", + VIMS_SAMPLE_SET_MARKER_END, + "Set out point in sample", + vj_event_sample_set_marker_end, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Position", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_SET_MARKER] = _new_event( + "%d %d %d", + VIMS_SAMPLE_SET_MARKER, + "Set in and out points in sample", + vj_event_sample_set_marker, + 3, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Starting position", + 0, + "Ending position", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_CLEAR_MARKER] = _new_event( + "%d", + VIMS_SAMPLE_CLEAR_MARKER, + "Clear in and out points", + vj_event_sample_set_marker_clear, + 1, + VIMS_ALLOW_ANY, + SAMPLE_ID_HELP, + 0, + NULL ); +#ifdef HAVE_XML2 + index_map_[VIMS_SAMPLE_LOAD_SAMPLELIST] = _new_event( + "%s", + VIMS_SAMPLE_LOAD_SAMPLELIST, + "Load samples from file", + vj_event_sample_load_list, + 1, + VIMS_REQUIRE_ALL_PARAMS | VIMS_LONG_PARAMS, + "Filename", + NULL, + NULL ); + index_map_[VIMS_SAMPLE_SAVE_SAMPLELIST] = _new_event( + "%s", + VIMS_SAMPLE_SAVE_SAMPLELIST, + "Save samples to file", + vj_event_sample_save_list, + 1, + VIMS_REQUIRE_ALL_PARAMS|VIMS_LONG_PARAMS, + "Filename", + NULL, + NULL ); +#endif + + + index_map_[VIMS_SAMPLE_CHAIN_ENABLE] = _new_event( + "%d", + VIMS_SAMPLE_CHAIN_ENABLE, + "Enable effect chain of sample", + vj_event_sample_chain_enable, + 1, + VIMS_ALLOW_ANY, + SAMPLE_ID_HELP, + 0, + NULL ); + + index_map_[VIMS_SAMPLE_CHAIN_DISABLE] = _new_event( + "%d", + VIMS_SAMPLE_CHAIN_DISABLE, + "Disable effect chain of sample", + vj_event_sample_chain_disable, + 1, + VIMS_ALLOW_ANY, + SAMPLE_ID_HELP, + 0, + NULL ); + + index_map_[VIMS_SAMPLE_REC_START] = _new_event( + "%d %d", + VIMS_SAMPLE_REC_START, + "Start recording from sample", + vj_event_sample_rec_start, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Number of frames (0=sample duration)", + 0, + "Auto Play (0=disable, 1=enable)", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_REC_STOP] = _new_event( + NULL, + VIMS_SAMPLE_REC_STOP, + "Stop recording from this sample", + vj_event_sample_rec_stop, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SAMPLE_DEL] = _new_event( + "%d", + VIMS_SAMPLE_DEL, + "Delete sample", + vj_event_sample_del, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Sample ID >= 1", + 0, + NULL ); + + index_map_[VIMS_SAMPLE_DEL_ALL] = _new_event( + NULL, + VIMS_SAMPLE_DEL_ALL, + "Delete all samples (caution!)", + vj_event_sample_clear_all, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SAMPLE_COPY] = _new_event( + "%d", + VIMS_SAMPLE_COPY, + "Copy sample to new", + vj_event_sample_copy, + 1, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + NULL ); + + index_map_[VIMS_SAMPLE_SELECT] = _new_event( + "%d", + VIMS_SAMPLE_SELECT, + "Select and play sample", + vj_event_sample_select, + 1, + VIMS_ALLOW_ANY, + SAMPLE_ID_HELP, + 0, + NULL ); + + index_map_[VIMS_STREAM_SELECT] = _new_event( + "%d", + VIMS_STREAM_SELECT, + "Select and play stream", + vj_event_tag_select, + 1, + VIMS_ALLOW_ANY, + "Stream ID >= 1", + 0, + NULL ); + + index_map_[VIMS_STREAM_DELETE] = _new_event( + "%d", + VIMS_STREAM_DELETE, + "Delete stream", + vj_event_tag_del, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Stream ID >= 1", + 0, + NULL ); + index_map_[VIMS_STREAM_NEW_V4L] = _new_event( + "%d %d", + VIMS_STREAM_NEW_V4L, + "Open video4linux device as new input stream", + vj_event_tag_new_v4l, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Device Number (0=/dev/video0,1=/dev/video1, ... )", + 0, + "Channel Number (0=TV,1=composite,2=svideo)", + 0, + NULL ); +#ifdef SUPPORT_READ_DV2 + index_map_[VIMS_STREAM_NEW_DV1394] = _new_event( + "%d", + VIMS_STREAM_NEW_DV1394, + "Open dv1394 device as new input stream", + vj_event_tag_new_dv1394, + 1, + VIMS_ALLOW_ANY, + "Channel number", + 63, + NULL ); +#endif + index_map_[VIMS_STREAM_NEW_Y4M] = _new_event( + "%s", + VIMS_STREAM_NEW_Y4M, + "Open yuv4mpeg (special) file as new input stream", + vj_event_tag_new_y4m, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Filename", + NULL, + NULL ); + index_map_[VIMS_STREAM_NEW_COLOR] = _new_event( + "%d %d %d", + VIMS_STREAM_NEW_COLOR, + "Solid RGB color fill as new input stream", + vj_event_tag_new_color, + 3, + VIMS_REQUIRE_ALL_PARAMS, + "Red", + 0, + "Green", + 0, + "Blue", + 0, + NULL ); + index_map_[VIMS_RGB_PARAMETER_TYPE] = _new_event( + "%d", + VIMS_RGB_PARAMETER_TYPE, + "Change YUV <-> RGB conversion (unadvised)", + vj_event_set_rgb_parameter_type, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Mode (0=GIMP,1=CCIR701,2=broken)", + 0, + NULL ); + index_map_[VIMS_STREAM_COLOR] = _new_event( + "%d %d %d %d", + VIMS_STREAM_COLOR, + "Change RGB color of solid stream", + vj_event_set_stream_color, + 4, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Red", + 0, + "Green", + 0, + "Blue", + 0, + NULL ); + index_map_[VIMS_STREAM_NEW_UNICAST] = _new_event( + "%d %s", + VIMS_STREAM_NEW_UNICAST, + "Open TCP veejay connection (peer to peer, raw data) as new input stream", + vj_event_tag_new_net, + 2, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Port number", + 0, + "Hostname or IP address", + NULL, + NULL ); + index_map_[VIMS_STREAM_NEW_MCAST] = _new_event( + "%d %s", + VIMS_STREAM_NEW_MCAST, + "Open UDP multicast as new input stream", + vj_event_tag_new_mcast, + 2, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Port Number", + 0, + "Multicast Address", + NULL, + NULL ); +#ifdef USE_GDK_PIXBUF + index_map_[VIMS_STREAM_NEW_PICTURE] = _new_event( + "%s", + VIMS_STREAM_NEW_PICTURE, + "Open image from file as new input stream", + vj_event_tag_new_picture, + 1, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Filename", + NULL, + NULL ); +#endif + + index_map_[VIMS_STREAM_OFFLINE_REC_START] = _new_event( + "%d %d %d", + VIMS_STREAM_OFFLINE_REC_START, + "Start offline recording from stream", + vj_event_tag_rec_offline_start, + 3, + VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Number of frames", + 0, + "Auto Play (0=disable,1=enable)", + 0, + NULL ); + index_map_[VIMS_STREAM_OFFLINE_REC_STOP] = _new_event( + NULL, + VIMS_STREAM_OFFLINE_REC_STOP, + "Stop offline recording from this stream", + vj_event_tag_rec_offline_stop, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_STREAM_SET_DESCRIPTION] = _new_event( + "%d %s", + VIMS_STREAM_SET_DESCRIPTION, + "Change title of stream", + vj_event_tag_set_descr, + 2, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Title", + NULL, + NULL ); + index_map_[VIMS_STREAM_REC_START] = _new_event( + "%d %d", + VIMS_STREAM_REC_START, + "Start recording from stream", + vj_event_tag_rec_start, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Number of frames", + 0, + "Auto Play (0=disable,1=enable)", + 0, + NULL ); + index_map_[VIMS_STREAM_REC_STOP] = _new_event( + "%d %d", + VIMS_STREAM_REC_STOP, + "Stop recording from this stream", + vj_event_tag_rec_stop, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_STREAM_CHAIN_ENABLE] = _new_event( + "%d", + VIMS_STREAM_CHAIN_ENABLE, + "Enable effect chain of stream", + vj_event_tag_chain_enable, + 1, + VIMS_ALLOW_ANY, + STREAM_ID_HELP, + 0, + NULL ); + index_map_[VIMS_STREAM_CHAIN_DISABLE] = _new_event( + "%d", + VIMS_STREAM_CHAIN_DISABLE, + "Disable effect chain of stream", + vj_event_tag_chain_disable, + 1, + VIMS_ALLOW_ANY, + STREAM_ID_HELP, + 0, + NULL ); + index_map_[VIMS_CHAIN_ENTRY_SET_EFFECT] = _new_event( + "%d %d %d", + VIMS_CHAIN_ENTRY_SET_EFFECT, + "Add effect to chain entry with default values", + vj_event_chain_entry_set, + 3, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + "Effect ID", + 0, + NULL ); + index_map_[VIMS_CHAIN_ENTRY_SET_PRESET] = _new_event( + "%d %d %d %d %d %d %d %d %d %d %d", + VIMS_CHAIN_ENTRY_SET_PRESET, + "Preset effect on chain entry", + vj_event_chain_entry_preset, + 11, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current", + -1, + "Effect ID", + 0, + "Parameter 0", + 0, + "Parameter 1", + 0, + "Parameter 2", + 0, + "Parameter 3", + 0, + "Parameter 4", + 0, + "Parameter 5", + 0, + "Parameter 6", + 0, + "Parameter 7", + 0, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_SET_ARG_VAL] = _new_event( + "%d %d %d %d", + VIMS_CHAIN_ENTRY_SET_ARG_VAL, + "Set a parameter value", + vj_event_chain_entry_set_arg_val, + 4, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + "Parameter number", + 0, + "Value", + 0, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_SET_VIDEO_ON] = _new_event( + "%d %d", + VIMS_CHAIN_ENTRY_SET_VIDEO_ON, + "Enable effect on chain index", + vj_event_chain_entry_enable_video, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_SET_VIDEO_OFF] = _new_event( + "%d %d", + VIMS_CHAIN_ENTRY_SET_VIDEO_OFF, + "Disable effect on chain index", + vj_event_chain_entry_disable_video, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_SET_DEFAULTS] = _new_event( + "%d %d", + VIMS_CHAIN_ENTRY_SET_DEFAULTS, + "Reset effect to default", + vj_event_chain_entry_set_defaults, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + NULL ); + index_map_[VIMS_CHAIN_ENTRY_SET_CHANNEL] = _new_event( + "%d %d %d", + VIMS_CHAIN_ENTRY_SET_CHANNEL, + "Set mixing channel", + vj_event_chain_entry_channel, + 3, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + "Sample ID", + 1, + NULL ); + index_map_[VIMS_CHAIN_ENTRY_SET_SOURCE] = _new_event( + "%d %d %d", + VIMS_CHAIN_ENTRY_SET_SOURCE, + "Set mixing source type", + vj_event_chain_entry_source, + 3, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + "Source Type (0=sample,1=stream)", + 0, + NULL ); + + index_map_[VIMS_CHAIN_ENTRY_SET_SOURCE_CHANNEL] = _new_event( + "%d %d %d %d", + VIMS_CHAIN_ENTRY_SET_SOURCE_CHANNEL, + "Set mixing channel and source type", + vj_event_chain_entry_srccha, + 4, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + "Source Type (0=sample,1=stream)", + 0, + "Sample or Stream ID", + 0, + NULL ); + index_map_[VIMS_CHAIN_ENTRY_CLEAR] = _new_event( + "%d %d", + VIMS_CHAIN_ENTRY_CLEAR, + "Reset chain index", + vj_event_chain_entry_del, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index (-1=current)", + -1, + NULL ); + index_map_[VIMS_CHAIN_ENABLE] = _new_event( + NULL, + VIMS_CHAIN_ENABLE, + "Enable Effect Chain", + vj_event_chain_enable, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_CHAIN_DISABLE] = _new_event( + NULL, + VIMS_CHAIN_DISABLE, + "Disable Effect Chain", + vj_event_chain_disable, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_CHAIN_CLEAR] = _new_event( + "%d", + VIMS_CHAIN_CLEAR, + "Reset Effect Chain", + vj_event_chain_clear, + 1, + VIMS_ALLOW_ANY, + SAMPLE_STREAM_ID_HELP, + 0, + NULL ); + index_map_[VIMS_CHAIN_FADE_IN] = _new_event( + "%d %d", + VIMS_CHAIN_FADE_IN, + "Fade in effect chain", + vj_event_chain_fade_in, + 2, + VIMS_ALLOW_ANY, + SAMPLE_STREAM_ID_HELP, + 0, + "Duration in frames", + 100, + NULL ); + index_map_[VIMS_CHAIN_FADE_OUT] = _new_event( + "%d %d", + VIMS_CHAIN_FADE_OUT, + "Fade out effet chain", + vj_event_chain_fade_out, + 2, + VIMS_ALLOW_ANY, + SAMPLE_STREAM_ID_HELP, + 0, + "Duration in frames", + 100, + NULL ); + index_map_[VIMS_CHAIN_MANUAL_FADE] = _new_event( + "%d %d", + VIMS_CHAIN_MANUAL_FADE, + "Set opacity of Effect Chain", + vj_event_manual_chain_fade, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Opacity value [0-255]", + 0, + NULL ); + index_map_[VIMS_CHAIN_SET_ENTRY] = _new_event( + "%d", + VIMS_CHAIN_SET_ENTRY, + "Set Chain Index", + vj_event_chain_entry_select, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Index value", + 0, + NULL ); + + index_map_[VIMS_OUTPUT_Y4M_START] = _new_event( + "%s", + VIMS_OUTPUT_Y4M_START, + "(OUT) Write video output to (special) file in yuv4mpeg format", + vj_event_output_y4m_start, + 1, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS , + "Filename", + NULL, + NULL ); + index_map_[VIMS_OUTPUT_Y4M_STOP] = _new_event( + NULL, + VIMS_OUTPUT_Y4M_STOP, + "(OUT) Stop writing video output to yuv4mpeg file", + vj_event_output_y4m_stop, + 0, + VIMS_ALLOW_ANY, + NULL ); +#ifdef HAVE_SDL + index_map_[VIMS_RESIZE_SDL_SCREEN] = _new_event( + "%d %d %d %d", + VIMS_RESIZE_SDL_SCREEN, + "(OUT) Resize SDL video window", + vj_event_set_screen_size, + 4, + VIMS_REQUIRE_ALL_PARAMS, + "Width", + 0, + "Height", + 0, + "X offset", + 0, + "Y offset", + 0, + NULL ); +#endif + index_map_[VIMS_SET_PLAY_MODE] = _new_event( + "%d", + VIMS_SET_PLAY_MODE, + "Change playback mode", + vj_event_set_play_mode, + 1, + VIMS_ALLOW_ANY, + "Playback mode (0=sample,1=stream,2=plain)", + 0 ); + index_map_[VIMS_SET_MODE_AND_GO] = _new_event( + "%d %d", + VIMS_SET_MODE_AND_GO, + "Play sample / stream", + vj_event_set_play_mode_go, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Source type (0=sample,1=stream)", + 0, + NULL ); + index_map_[VIMS_SWITCH_SAMPLE_STREAM] = _new_event( + NULL, + VIMS_SWITCH_SAMPLE_STREAM, + "Switch between sample and stream playback", + vj_event_switch_sample_tag, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_AUDIO_DISABLE] = _new_event( + NULL, + VIMS_AUDIO_DISABLE, + "Disable audio playback", + vj_event_disable_audio, + 0, + VIMS_ALLOW_ANY , + NULL ); + + index_map_[VIMS_AUDIO_ENABLE] = _new_event( + NULL, + VIMS_AUDIO_DISABLE, + "Enable audio playback", + vj_event_enable_audio, + 0, + VIMS_ALLOW_ANY , + NULL ); + + + index_map_[VIMS_EDITLIST_PASTE_AT] = _new_event( + "%d", + VIMS_EDITLIST_PASTE_AT, + "Paste frames from buffer at frame into edit descision list", + vj_event_el_paste_at, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "EDL position", + 0, + NULL ); + index_map_[VIMS_EDITLIST_CUT] = _new_event( + "%d %d", + VIMS_EDITLIST_CUT, + "Cut frames from edit descision list to buffer", + vj_event_el_cut, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "EDL start position", + 0, + "EDL end position", + 0, + NULL ); + index_map_[VIMS_EDITLIST_COPY] = _new_event( + "%d %d", + VIMS_EDITLIST_COPY, + "Copy frames from edit descision list to buffer", + vj_event_el_copy, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "EDL start position", + 0, + "EDL end position", + 0, + NULL ); + index_map_[VIMS_EDITLIST_CROP] = _new_event( + "%d %d", + VIMS_EDITLIST_CROP, + "Crop frames from edit descision list to buffer", + vj_event_el_crop, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "EDL start position", + 0, + "EDL end position", + 0, + NULL ); + index_map_[VIMS_EDITLIST_DEL] = _new_event( + "%d %d", + VIMS_EDITLIST_DEL, + "Delete frames from editlist (no undo!)", + vj_event_el_del, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "EDL start position", + 0, + "EDL end position", + 0, + NULL ); + index_map_[VIMS_EDITLIST_SAVE] = _new_event( + "%d %d %s", + VIMS_EDITLIST_SAVE, + "Save (selection of) edit descision list to new file", + vj_event_el_save_editlist, + 3, + VIMS_LONG_PARAMS | VIMS_ALLOW_ANY, + "EDL start position (0=start position)", + 0, + "EDL end position (0=end position)", + 0, + "Filename", + NULL, + NULL ); + index_map_[VIMS_EDITLIST_LOAD] = _new_event( + "%s", + VIMS_EDITLIST_LOAD, + "Load edit descision list from file", + vj_event_el_load_editlist, + 1, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Filename", + NULL, + NULL ); + index_map_[VIMS_EDITLIST_ADD] = _new_event( + "%s", + VIMS_EDITLIST_ADD, + "Add video file to edit descision list", + vj_event_el_add_video, + 1, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Filename", + NULL, + NULL ); + index_map_[VIMS_EDITLIST_ADD_SAMPLE] = _new_event( + "%d %s", + VIMS_EDITLIST_ADD_SAMPLE, + "GUI: Append a file to the plain EDL and create a new sample (unadvised!)", + vj_event_el_add_video_sample, + 2, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "existing or new ID", + 0, + "Filename", + NULL, + NULL ); + index_map_[VIMS_STREAM_LIST] = _new_event( + "%d", + VIMS_STREAM_LIST, + "GUI: Get a list of all streams (unadvised!)", + vj_event_send_tag_list, + 1, + VIMS_ALLOW_ANY, + "stream offset", + 0, + NULL ); + + index_map_[VIMS_TRACK_LIST] = _new_event( + NULL, + VIMS_TRACK_LIST, + "GUI: Get a list of all tracks (unadvised!)", + vj_event_send_track_list, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SAMPLE_LIST] = _new_event( + "%d", + VIMS_SAMPLE_LIST, + "GUI: Get a list of all samples (unadvised!)", + vj_event_send_sample_list, + 1, + VIMS_ALLOW_ANY, + "sample offset", + 0, + NULL ); + index_map_[VIMS_SAMPLE_INFO] = _new_event( + "%d %d", + VIMS_SAMPLE_INFO, + "GUI: Get sample or stream information (unadivsed!)", + vj_event_send_sample_info, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Source Type (0=sample,1=stream)", + 0, + NULL ); + index_map_[VIMS_SAMPLE_OPTIONS] = _new_event( + "%d %d", + VIMS_SAMPLE_OPTIONS, + "GUI: Get sample options", + vj_event_send_sample_options, + 2, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_STREAM_ID_HELP, + 0, + "Source Type (0=sample,1=stream)", + 0, + NULL ); + index_map_[VIMS_EDITLIST_LIST] = _new_event( + NULL, + VIMS_EDITLIST_LIST, + "GUI: Get EDL", + vj_event_send_editlist, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_BUNDLE] = _new_event( + "%d", + VIMS_BUNDLE, + "Execute VIMS bundle", + vj_event_do_bundled_msg, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Bundle ID", + 0, + NULL ); +#ifdef HAVE_XML2 + index_map_[VIMS_BUNDLE_FILE] = _new_event( + "%s", + VIMS_BUNDLE_FILE, + "Veejay load action file", + vj_event_read_file, + 1, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Filename", + NULL , + NULL ); + index_map_[VIMS_BUNDLE_SAVE] = _new_event( + "%d %s", + VIMS_BUNDLE_SAVE, + "Veejay save action file", + vj_event_write_actionfile, + 2, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Mode (0=only Bundles,1=save edl/sample list)", + 0, + "Filename", + NULL, + NULL ); +#endif + index_map_[VIMS_BUNDLE_DEL] = _new_event( + "%d", + VIMS_BUNDLE_DEL, + "Delete a VIMS bundle", + vj_event_bundled_msg_del, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Bundle ID", + 0, + NULL ); + index_map_[VIMS_BUNDLE_LIST] = _new_event( + NULL, + VIMS_BUNDLE_LIST, + "GUI: Get all bundles", + vj_event_send_bundles, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[ VIMS_KEYLIST ] = _new_event( + NULL, + VIMS_KEYLIST, + "GUI: Get all keys", + vj_event_send_keylist, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_DEVICE_LIST] = _new_event( + NULL, + VIMS_DEVICE_LIST, + "GUI: Get all devices and their locations", + vj_event_send_devicelist, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_VIMS_LIST] = _new_event( + NULL, + VIMS_VIMS_LIST, + "GUI: Get all VIMS events", + vj_event_send_vimslist, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_BUNDLE_ADD] = _new_event( + "%d %s", + VIMS_BUNDLE_ADD, + "Add a new bundle to the event list", + vj_event_bundled_msg_add, + 2, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Bundle ID (0=new, 1=overwrite existing)", + 0, + "VIMS text", + 0, + NULL ); + index_map_[VIMS_BUNDLE_CAPTURE] = _new_event( + NULL, + VIMS_BUNDLE_CAPTURE, + "Capture Effect Chain to a new Bundle", + vj_event_quick_bundle, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_LOG] = _new_event( + NULL, + VIMS_LOG, + "GUI: Get console output", + vj_event_send_log, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_CHAIN_LIST] = _new_event( + "%d", + VIMS_CHAIN_LIST, + "GUI: Get effect chain", + vj_event_send_chain_list, + 1, + VIMS_ALLOW_ANY, + SAMPLE_STREAM_ID_HELP, + 0, + NULL ); + index_map_[VIMS_CHAIN_GET_ENTRY] = _new_event( + "%d %d", + VIMS_CHAIN_GET_ENTRY, + "GUI: Get effect chain index details", + vj_event_send_chain_entry, + 2, + VIMS_ALLOW_ANY, + SAMPLE_STREAM_ID_HELP, + 0, + "Chain Index", + -1, + NULL ); + index_map_[VIMS_EFFECT_LIST] = _new_event( + NULL, + VIMS_EFFECT_LIST, + "GUI: Get all effects", + vj_event_send_effect_list, + 0, + VIMS_ALLOW_ANY ); + index_map_[VIMS_VIDEO_INFORMATION] = _new_event( + NULL, + VIMS_VIDEO_INFORMATION, + "GUI: Get video information details", + vj_event_send_video_information, + 0, + VIMS_ALLOW_ANY ); +#ifdef HAVE_SDL + index_map_[VIMS_BUNDLE_ATTACH_KEY] = _new_event( + "%d %d %d %s", + VIMS_BUNDLE_ATTACH_KEY, + "Attach/Detach a Key to VIMS Event", + vj_event_attach_detach_key, + 4, + VIMS_ALLOW_ANY, + "VIMS ID", + 0, + "SDL Key symbol", + 0, + "SDL Key modifier (0=none,1=alt,2=ctrl,3=shift)", + 0, + "VIMS message", + NULL, + NULL ); + +#endif +#ifdef USE_SWSCALER + index_map_[VIMS_RGB24_IMAGE] = _new_event( + "%d %d", + VIMS_REQUIRE_ALL_PARAMS, + "GUI: Get preview image (raw RGB24)", + vj_event_get_scaled_image, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Width", + 0, + "Height", + 0, + NULL ); + +#else +#ifdef USE_GDK_PIXBUF + index_map_[VIMS_RGB24_IMAGE] = _new_event( + "%d %d", + VIMS_REQUIRE_ALL_PARAMS, + "GUI: Get preview image (raw RGB24)", + vj_event_get_scaled_image, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Width", + 0, + "Height", + 0, + NULL ); +#endif +#endif +#ifdef USE_GDK_PIXBUF + index_map_[VIMS_SCREENSHOT] = _new_event( + "%d %d %s", + VIMS_SCREENSHOT, + "Save output frame to file", + vj_event_screenshot, + 3, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Width", + 0, + "Height", + 0, + "Filename", + NULL, + NULL ); +#else +#ifdef HAVE_JPEG + index_map_[VIMS_SCREENSHOT] = _new_event( + "%d %d %s", + VIMS_SCREENSHOT, + "Save output frame to file", + vj_event_screenshot, + 3, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Width", + 0, + "Height", + 0, + "Filename", + NULL, + NULL ); +#endif +#endif + index_map_[VIMS_CHAIN_TOGGLE_ALL] = _new_event( + "%d", + VIMS_CHAIN_TOGGLE_ALL, + "Enable or disable Effect Chain for ALL samples or streams", + vj_event_all_samples_chain_toggle, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "On = 1, Off= 0", + 0, + NULL ); + index_map_[VIMS_SAMPLE_UPDATE] = _new_event( + "%d %d %d", + VIMS_SAMPLE_UPDATE, + "Set sample's starting and ending position", + vj_event_sample_rel_start, + 3, + VIMS_REQUIRE_ALL_PARAMS, + SAMPLE_ID_HELP, + 0, + "Starting position", + 0, + "Ending position", + 0, + NULL ); + index_map_[VIMS_STREAM_SET_LENGTH] = _new_event( + "%d", + VIMS_STREAM_SET_LENGTH, + "Set ficticious stream length", + vj_event_stream_set_length, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Number of frames", + 0, + NULL); +#ifdef HAVE_UNICAP + index_map_[VIMS_STREAM_SET_BRIGHTNESS] = _new_event( + "%d %d", + VIMS_STREAM_SET_BRIGHTNESS, + "Set brightness value for Video4linux stream", + vj_event_v4l_set_brightness, + 2, + VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Value 0-65535", + 0, + NULL ); + index_map_[VIMS_STREAM_SET_CONTRAST] = _new_event( + "%d %d", + VIMS_STREAM_SET_CONTRAST, + "Set constrast value for Video4linux stream", + vj_event_v4l_set_contrast, + 2, + VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Value 0-65535", + 0, + NULL ); + + index_map_[VIMS_STREAM_SET_HUE] = _new_event( + "%d %d", + VIMS_STREAM_SET_BRIGHTNESS, + "Set hue value for Video4linux stream", + vj_event_v4l_set_hue, + 2, + VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Value 0-65535", + 0, + NULL ); + + index_map_[VIMS_STREAM_SET_COLOR] = _new_event( + "%d %d", + VIMS_STREAM_SET_COLOR, + "Set color value for Video4linux stream", + vj_event_v4l_set_color, + 2, + VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Value 0-65535", + 0, + NULL ); + index_map_[VIMS_STREAM_SET_SATURATION] = _new_event( + "%d %d", + VIMS_STREAM_SET_WHITE, + "Set saturation value for Video4linux stream", + vj_event_v4l_set_saturation, + 2, + VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Value 0-65535", + 0, + NULL ); + index_map_[VIMS_STREAM_SET_WHITE] = _new_event( + "%d %d", + VIMS_STREAM_SET_WHITE, + "Set white balance value for Video4linux stream", + vj_event_v4l_set_white, + 2, + VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + "Value 0-65535", + 0, + NULL ); +#endif + index_map_[VIMS_STREAM_GET_V4L] = _new_event( + "%d", + VIMS_STREAM_GET_V4L, + "GUI: Get video4linux properties", + vj_event_v4l_get_info, + 1, + VIMS_REQUIRE_ALL_PARAMS, + STREAM_ID_HELP, + 0, + NULL ); + index_map_[VIMS_VLOOPBACK_START] = _new_event( + "%d", + VIMS_VLOOPBACK_START, + "OUT: Start writing video output to a vloopback device", + vj_event_vloopback_start, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Vloopback pipe number", + 0, + NULL ); + index_map_[VIMS_VLOOPBACK_STOP] = _new_event( + NULL, + VIMS_VLOOPBACK_STOP, + "OUT: Stop writing to vloopback device", + vj_event_vloopback_stop, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_EFFECT_SET_BG] = _new_event( + NULL, + VIMS_EFFECT_SET_BG, + "Take current frame as Mask for this Effect", + vj_event_effect_set_bg, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_QUIT] = _new_event( + NULL, + VIMS_QUIT, + "Quit Veejay (caution!)", + vj_event_quit, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_CLOSE] = _new_event( + NULL, + VIMS_QUIT, + "End sessions with veejay", + vj_event_linkclose, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_SET_VOLUME] = _new_event( + "%d", + VIMS_SET_VOLUME, + "Set audio volume", + vj_event_set_volume, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Volume 0-100", + 0, + NULL ); + index_map_[VIMS_SUSPEND] = _new_event( + NULL, + VIMS_SUSPEND, + "Suspend Veejay (caution!)", + vj_event_suspend, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_DEBUG_LEVEL] = _new_event( + NULL, + VIMS_DEBUG_LEVEL, + "More/Less verbosive console output", + vj_event_debug_level, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_SYNC_CORRECTION] = _new_event( + "%d", + VIMS_SYNC_CORRECTION, + "Enable/Disable sync correction", + vj_event_sync_correction, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "0=off,1=on", + 0, + NULL ); + index_map_[VIMS_FRAMERATE] = _new_event( + "%d", + VIMS_FRAMERATE, + "Change playback engine framerate", + vj_event_set_framerate, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Multiple by 100 (ie. for 25fps, use 2500)", + 0, + NULL ); + index_map_[VIMS_BEZERK] = _new_event( + NULL, + VIMS_BEZERK, + "Bezerk mode toggle ", + vj_event_bezerk, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_NO_CACHING] = _new_event( + NULL, + VIMS_NO_CACHING, + "Editlist cache mode toggle", + vj_event_no_caching, + 0, + VIMS_ALLOW_ANY, + NULL ); + + + index_map_[VIMS_SAMPLE_MODE] = _new_event( + NULL, + VIMS_SAMPLE_MODE, + "Change between box or triangle filter for sampling purposes", + vj_event_sample_mode, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_VIDEO_MCAST_START] = _new_event( + NULL, + VIMS_VIDEO_MCAST_START, + "Start built-in UDP mcast server (YUV planar)", + vj_event_mcast_start, + 0, + VIMS_ALLOW_ANY, + NULL ); + index_map_[VIMS_VIDEO_MCAST_STOP] = _new_event( + NULL, + VIMS_VIDEO_MCAST_STOP, + "Stop built-in UDP mcast server", + vj_event_mcast_stop, + 0, + VIMS_ALLOW_ANY , + NULL ); + index_map_[VIMS_GET_FRAME] = _new_event( + NULL, + VIMS_GET_FRAME, + "TCP: Send a frame to a connected veejay client", + vj_event_send_frame, + 0, + VIMS_ALLOW_ANY, + NULL ); + + + index_map_[ VIMS_PROJ_INC ] = _new_event( + NULL, + VIMS_PROJ_INC, + "Increase projection/camera area", + vj_event_projection_inc, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[ VIMS_PROJ_DEC ] = _new_event( + NULL, + VIMS_PROJ_DEC, + "Decrease projection/camera area", + vj_event_projection_dec, + 0, + VIMS_ALLOW_ANY, + NULL ); + +#ifdef HAVE_SDL + index_map_[VIMS_FULLSCREEN] = _new_event( + "%d", + VIMS_FULLSCREEN, + "Enable / Disable Fullscreen video output", + vj_event_fullscreen, + 1, + VIMS_ALLOW_ANY, + "On = 1, Off=0", + 1, + NULL ); +#endif + +#ifdef HAVE_FREETYPE + + index_map_[ VIMS_FONT_COL ] = _new_event( + "%d %d %d %d %d", + VIMS_FONT_COL, + "Set font color", + vj_event_font_set_color, + 5, + VIMS_REQUIRE_ALL_PARAMS, + "Red", + 0, + "Green", + 0, + "Blue", + 0, + "Alpha", + 0, + "0=Transparent 1=BG 2=FG", + 0, + NULL ); + + index_map_[ VIMS_FONT_POS ] = _new_event( + "%d %d", + VIMS_FONT_POS, + "Set font position", + vj_event_font_set_position, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "X position", + 0, + "Y position", + 0, + NULL ); + + index_map_[ VIMS_FONT_SIZE_FONT ] = _new_event( + "%d %d", + VIMS_FONT_SIZE_FONT, + "Set font type and font size", + vj_event_font_set_size_and_font, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Font type", + 0, + "Font size", + 0, + NULL ); + + index_map_[ VIMS_OSD_EXTRA ] = _new_event( + NULL, + VIMS_OSD_EXTRA, + "Print help in OSD (if available)", + vj_event_toggle_osd_extra, + 0, + VIMS_ALLOW_ANY, + NULL + ); + + index_map_[ VIMS_COPYRIGHT ] = _new_event( + NULL, + VIMS_OSD, + "Print copyright", + vj_event_toggle_copyright, + 0, + VIMS_ALLOW_ANY, + NULL + ); + + index_map_[ VIMS_OSD ] = _new_event( + NULL, + VIMS_OSD, + "Toggle OSD status", + vj_event_toggle_osd, + 0, + VIMS_ALLOW_ANY, + NULL + ); + + index_map_[ VIMS_SRT_ADD ] = _new_event( + "%d %d %d %d %d %s", + VIMS_SRT_ADD, + "Add a subtitle sequence", + vj_event_add_subtitle, + 6, + VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS, + "Subtitle sequence (0=new)", + 0, + "Start position", + 0, + "End position", + 0, + "X position", + 0, + "Y position", + 0, + "Text", + NULL, + NULL ); + + index_map_[ VIMS_SRT_SELECT ] = _new_event( + "%d", + VIMS_SRT_SELECT, + "Select a subtitle sequence", + vj_event_select_subtitle, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Subtitle sequence", + 0, + NULL ); + + index_map_[ VIMS_SRT_DEL ] = _new_event( + "%d", + VIMS_SRT_DEL, + "Delete a subtitle sequence", + vj_event_del_subtitle, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Subtitle sequence", + 0, + NULL ); + + index_map_[ VIMS_SRT_UPDATE ] = _new_event( + "%d %d %d %s", + VIMS_SRT_UPDATE, + "Update a subtitle sequence", + vj_event_upd_subtitle, + 4, + VIMS_REQUIRE_ALL_PARAMS | VIMS_LONG_PARAMS, + "Subtitle sequence", + 0, + "Start position", + 0, + "End position", + 0, + "Text", + NULL, + NULL ); + + index_map_[ VIMS_SRT_SAVE ] = _new_event( + "%s", + VIMS_SRT_SAVE, + "Export subtitles to SRT", + vj_event_save_srt, + 1, + VIMS_REQUIRE_ALL_PARAMS | VIMS_LONG_PARAMS, + "Filename", + NULL, + NULL ); + index_map_[ VIMS_SRT_LOAD ] = _new_event( + "%s", + VIMS_SRT_LOAD, + "Import subtitles from SRT", + vj_event_load_srt, + 1, + VIMS_REQUIRE_ALL_PARAMS | VIMS_LONG_PARAMS, + "Filename", + NULL, + NULL ); + + index_map_[VIMS_FONT_LIST] = _new_event( + NULL, + VIMS_FONT_LIST, + "GUI: Get list of loaded fonts", + vj_event_get_font_list, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SRT_LIST] = _new_event( + NULL, + VIMS_SRT_LIST, + "GUI: Get list of loaded subtitle sequences", + vj_event_get_srt_list, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[VIMS_SRT_INFO] = _new_event( + "%d", + VIMS_SRT_INFO, + "GUI: Get subtitle sequence", + vj_event_get_srt_info, + 1, + VIMS_ALLOW_ANY, + "Subtitle sequence", + 1, + NULL ); + + + index_map_[ VIMS_SEQUENCE_LIST ] = _new_event( + NULL, + VIMS_SRT_INFO, + "GUI: Get list of sample sequences", + vj_event_get_sample_sequences, + 0, + VIMS_ALLOW_ANY, + NULL ); + + index_map_[ VIMS_SEQUENCE_STATUS ] = _new_event( + "%d", + VIMS_SEQUENCE_STATUS, + "Set sequence play on or off", + vj_event_sample_sequencer_active, + 1, + VIMS_ALLOW_ANY, + "Status 0=off,1=on", + 0, + NULL ); + + index_map_[ VIMS_SEQUENCE_ADD ] = _new_event( + "%d %d", + VIMS_SEQUENCE_ADD, + "Add a sample to the sequence", + vj_event_sequencer_add_sample, + 2, + VIMS_REQUIRE_ALL_PARAMS, + "Seq ID", + 0, + "Sample ID", + 0, + NULL ); + + index_map_[ VIMS_SEQUENCE_DEL ] = _new_event( + "%d", + VIMS_SEQUENCE_DEL, + "Del sample from sequence slot", + vj_event_sequencer_del_sample, + 1, + VIMS_REQUIRE_ALL_PARAMS, + "Seq ID", + 0, + NULL ); + + +#endif +} + + + diff --git a/veejay-server/veejay/vj-font.c b/veejay-server/veejay/vj-font.c new file mode 100644 index 00000000..96924898 --- /dev/null +++ b/veejay-server/veejay/vj-font.c @@ -0,0 +1,2321 @@ +/* + * drawtext.c: print text over the screen + * heavily modified to serve as font renderer in veejay + ****************************************************************************** + * Author: Gustavo Sverzut Barbieri + * Niels Elburg (Nov. 2006) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_XML2 +#include +#include +#endif + +extern int vj_tag_size(); + +#ifdef STRICT_CHECKING +#include +#endif + +#ifdef HAVE_FREETYPE +#include +#include +#include +#include +#include FT_FREETYPE_H +#include FT_GLYPH_H + +#define BSIZE 256 + +typedef struct +{ + int id; + char *text; + long start; + long end; + unsigned int x; + unsigned int y; + int size; + int font; + char *key; + int time; + uint8_t bg[3]; + uint8_t fg[3]; + uint8_t ln[3]; + uint8_t alpha[3]; + int use_bg; + int outline; +} srt_seq_t; + + +typedef struct +{ + int id[16]; +} srt_cycle_t; + +typedef struct { + unsigned char *text; + unsigned char *font; + uint8_t *fd_buf; + + unsigned int x; + unsigned int y; + int bg; + int outline; + uint8_t alpha[3]; + + uint8_t bgcolor[3]; + uint8_t fgcolor[3]; + uint8_t lncolor[3]; + + FT_Library library; + FT_Face face; + FT_Glyph glyphs[ BSIZE ]; + FT_Bitmap bitmaps[ BSIZE ]; + int advance[ BSIZE ]; + int bitmap_left[ BSIZE ]; + int bitmap_top[ BSIZE ]; + unsigned int glyphs_index[ BSIZE ]; + int text_height; + int text_width; + int current_font; + int baseline; + int use_kerning; + int current_size; + char **font_table; + char **font_list; + int auto_number; + int font_index; + long index_len; + srt_cycle_t **index; + float fps; + void *dictionary; + void *plain; + int time; + char *add; + char *prev; + pthread_mutex_t mutex; + srt_cycle_t *text_buffer; + uint32_t text_max_size; +} vj_font_t; + +static int configure(vj_font_t *f, int size, int font); +static char *make_key(int id); +static char *vj_font_pos_to_timecode( vj_font_t *font, long pos ); +static long vj_font_timecode_to_pos( vj_font_t *font, const char *tc ); +static srt_seq_t *vj_font_new_srt_sequence(vj_font_t *font, int id,char *text, long lo, long hi ); +static void vj_font_del_srt_sequence( vj_font_t *f, int seq_id ); +static void vj_font_store_srt_sequence( vj_font_t *f, srt_seq_t *s ); +static int font_selector( const struct dirent *dir ); +static int find_fonts(vj_font_t *ec, char *path); +static void print_fonts(vj_font_t *ec); +static char *select_font( vj_font_t *ec, int id ); +static void vj_font_substract_timecodes( vj_font_t *font, const char *tc_srt, long *lo, long *hi ); +static char *vj_font_split_strd( const char *str ); +static char *vj_font_split_str( const char *str ); + +static int get_default_font( vj_font_t *f ); + +static int test_font( vj_font_t *f , const char *font, int id); + +static void font_lock(vj_font_t *f) +{ + pthread_mutex_lock( &(f->mutex) ); +} +static void font_unlock( vj_font_t *f ) +{ + pthread_mutex_unlock( &(f->mutex) ); +} +/* +static srt_nodes_t *index_node_new( srt_seq_t *s ) +{ + srt_nodes_t *seq = (srt_nodes_t*) vj_calloc(sizeof(srt_nodes_t)); + seq->id = s->id; + seq->next = NULL; + return seq; +}*/ + +static int index_node_append( vj_font_t *f, srt_seq_t *s ) +{ + int k; long i; + for( i = s->start ; i <= s->end ; i ++ ) + { + srt_cycle_t *q = f->index[ i ]; +#ifdef STRICT_CHECKING + assert( q != NULL ); +#endif + for( k = 0; k < 16; k ++ ) + { + if( q->id[k] == 0 ) + { + q->id[k] = s->id; + break; + } + } + } + return 0; +} + +static void index_node_remove( vj_font_t *f, srt_seq_t *s ) +{ + int k; long i; + for( i = s->start; i <= s->end; i ++ ) + { + srt_cycle_t *q = f->index[i]; + if( q == NULL) continue; + for( k = 0;k < 16; k ++ ) + { + if( q->id[k] == s->id ) + q->id[k] =0; + } + } +} + +static char *make_key(int id) +{ + char key[32]; + sprintf(key,"s%d",id); + return strdup(key); +} + +int vj_font_srt_sequence_exists( void *font, int id ) +{ + if(!font) + return 0; + vj_font_t *f = (vj_font_t*) font; + if(!f->dictionary ) + return 0; + +#ifdef STRICT_CHECKING + assert( f->dictionary != NULL ); +#endif + char *key = make_key(id); + void *srt = NULL; + int error = vevo_property_get( f->dictionary, key,0,&srt ); + free(key); + if( error == VEVO_NO_ERROR ) + return 1; + return 0; +} + +static char *vj_font_pos_to_timecode( vj_font_t *font, long pos ) +{ + vj_font_t *ff = (vj_font_t*) font; + MPEG_timecode_t tc; + veejay_memset(&tc, 0,sizeof(MPEG_timecode_t)); + char tmp[20]; + + y4m_ratio_t ratio = mpeg_conform_framerate( ff->fps ); + int n = mpeg_framerate_code( ratio ); + + mpeg_timecode(&tc, pos, n, ff->fps ); + + snprintf(tmp, 20, "%2d:%2.2d:%2.2d:%2.2d", + tc.h, tc.m, tc.s, tc.f ); + + return strdup(tmp); +} + +static long vj_font_timecode_to_pos( vj_font_t *font, const char *tc ) +{ + int t[4]; + + sscanf( tc, "%1d:%02d:%02d:%02d", &t[0],&t[1],&t[2],&t[3] ); + + long res = 0; + + res = (long) t[3]; + res += (long) t[2] * font->fps; + res += (long) t[1] * font->fps * 60.0; + res += (long) t[0] * font->fps * 3600.0; + + return res; +} + +static void vj_font_substract_timecodes( vj_font_t *font, const char *tc_srt, long *lo, long *hi ) +{ + char tc1[20]; + char tc2[20]; + veejay_memset(tc1,0,sizeof(tc1)); + veejay_memset(tc2,0,sizeof(tc2)); + + sscanf( tc_srt, "%s %*s %s", tc1,tc2 ); + + *lo = vj_font_timecode_to_pos( font, tc1 ); + *hi = vj_font_timecode_to_pos( font, tc2 ); +} + +static char *vj_font_split_strd( const char *str ) +{ + const char *p = str; + char *res = NULL; + int i = 0; + while( *p != '\0' && *p != '\n' ) + { + *p ++; + i++; + } + if(*p == '\n') + { + *p ++; + i ++; + } + if(*p == '\n' ) + { + *p ++; + i ++; + } + else + { + return NULL; + } + + if( i <= 0 ) + return NULL; + + res = strndup( str, i ); + return res; +} + +static char *vj_font_split_str( const char *str ) +{ + const char *p = str; + char *res = NULL; + int i = 0; + while( *p != '\0' && *p != '\n' ) + { + *p ++; + i++; + } + if(*p == '\n') + { + *p ++; + i ++; + } + if( i <= 0 ) + return NULL; + + res = strndup( str, i ); + return res; +} + +static srt_seq_t *vj_font_new_srt_sequence( vj_font_t *f,int id,char *text, long lo, long hi ) +{ + char tmp_key[16]; + srt_seq_t *s = (srt_seq_t*) vj_calloc(sizeof( srt_seq_t )); + s->id = id; + s->text = strdup( text ); + s->start = lo; + s->end = hi; + sprintf(tmp_key, "s%d", id ); + s->bg[0] = 0; + s->bg[1] = 0; + s->bg[2] = 0; + s->fg[0] = 255; + s->fg[1] = 255; + s->fg[2] = 255; + s->ln[0] = 200; + s->ln[1] = 255; + s->ln[2] = 255; + s->alpha[0] = 0; + s->alpha[1] = 0; + s->alpha[2] = 0; + s->use_bg = 0; + s->outline = 0; + s->size = 40; + s->font = get_default_font(f); + s->key = strdup(tmp_key); + return s; +} + +void vj_font_set_current( void *font , int cur ) +{ + vj_font_t *f = (vj_font_t*) font; + if(vj_font_srt_sequence_exists( font, cur )) + { + f->auto_number = cur; + } + +} + +static void vj_font_del_srt_sequence( vj_font_t *f, int seq_id ) +{ +#ifdef STRICT_CHECKING + assert( f->dictionary != NULL ); +#endif + if(seq_id == 0 ) + seq_id = f->auto_number; + + char *key = make_key(seq_id ); + void *srt = NULL; + + + int error = vevo_property_get( f->dictionary, key, 0, &srt ) ; + if( error == VEVO_NO_ERROR ) + { + srt_seq_t *s = (srt_seq_t*) srt; + + index_node_remove( f, s ); + + free(s->text); + free(s->key); + free(s); + vevo_property_set( f->dictionary, key, VEVO_ATOM_TYPE_VOIDPTR, 0,NULL ); + + } + free(key); +} + +static void vj_font_store_srt_sequence( vj_font_t *f, srt_seq_t *s ) +{ +#ifdef STRICT_CHECKING + assert( f->dictionary != NULL ); +#endif + void *srt = NULL; + int error = vevo_property_get( f->dictionary, s->key, 0, &srt ); + if( error == VEVO_NO_ERROR ) + { + srt_seq_t *old = (srt_seq_t*) srt; + + index_node_remove( f, old ); + + veejay_msg(VEEJAY_MSG_DEBUG, "replacing subtitle %d, '%s', %ld -> %ld", + old->id, old->text,old->start,old->end ); + free(old->text); + free(old->key); + free(old); + } + + error = vevo_property_set( f->dictionary, s->key, VEVO_ATOM_TYPE_VOIDPTR, 1,&s ); + if( error != VEVO_NO_ERROR ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to store SRT sequence '%s'", s->key ); + } + else + { + index_node_append( f, s ); + } +} + +int vj_font_load_srt( void *font, const char *filename ) +{ + vj_font_t *ff = (vj_font_t*) font; + FILE *f = fopen( filename, "r" ); + unsigned int len = 0; + unsigned int i; + if(!f) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to load SRT file '%s'",filename ); + return 0; + } + fseek( f, 0, SEEK_END ); + len = ftell( f ); + + if( len <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "SRT file '%s' is empty", filename ); + return 0; + } + rewind( f ); + + ff->fd_buf = (uint8_t*) vj_calloc( len ); + fread( ff->fd_buf, len,1, f ); + + fclose( f ); + + //parse the file + uint8_t *str = ff->fd_buf; + int offset = 0; + + + font_lock( ff ); + while( offset < len ) + { + char *line = vj_font_split_str( str ); + if(!line) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to parse sequence ID in srt file"); + font_unlock( ff ); + return 0; + } + int n = strlen( line ); + + offset += n; + str += n; + + char *timecode = vj_font_split_str( str ); + if(!timecode) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to parse timecode in srt file"); + font_unlock(ff); + return 0; + } + n = strlen( timecode ); + + offset += n; + str += n; + + char *text = vj_font_split_strd ( str ); + if(!text) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to parse subtitle text in srt file"); + font_unlock(ff); + return 0; + } + n = strlen ( text ); + + offset += n; + str += n; + + long lo=0,hi=0; + int seq_id = atoi( line ); + + vj_font_substract_timecodes( ff, timecode, &lo, &hi ); + + if( lo == hi ) + { + veejay_msg(VEEJAY_MSG_ERROR, "It makes no sense to create a subtitle sequence with length 0"); + font_unlock(ff); + return 0; + } + + srt_seq_t *s = vj_font_new_srt_sequence(ff, seq_id, text, lo,hi ); + + vj_font_store_srt_sequence( ff, s ); + + free(line); + free(timecode); + free(text); + } + font_unlock( ff ); + + free( ff->fd_buf ); + + return 1; +} +static int get_xml_int( xmlDocPtr doc, xmlNodePtr node ) +{ + xmlChar *tmp = xmlNodeListGetString( doc, node->xmlChildrenNode, 1 ); + char *ch = UTF8toLAT1( tmp ); + int res = 0; + if( ch ) + { + res = atoi( ch ); + free(ch); + } + if(tmp) + free(tmp); + return res; +} + +static void get_xml_3int( xmlDocPtr doc, xmlNodePtr node, int *first , int *second, int *third ) +{ + xmlChar *tmp = xmlNodeListGetString( doc, node->xmlChildrenNode, 1 ); + char *ch = UTF8toLAT1( tmp ); + if( ch ) + { + sscanf( ch, "%d %d %d" , first, second, third ); + free(ch); + } + if(tmp) + free(tmp); +} + + +void vj_font_xml_unpack( xmlDocPtr doc, xmlNodePtr node, void *font ) +{ + if(!node) + return; + vj_font_t *f = (vj_font_t*) font; + + int x=0,y=0,id=0,size=0,type=0, use_bg=0, outline=0; + int bg[3] = {0,0,0}; + int fg[3] = {0,0,0}; + int alpha[3] = {0,0,0}; + int ln[3] = {0,0,0}; + + while( node != NULL ) + { + if( !xmlStrcmp( node->name, (const xmlChar*) "srt_id" )) + id = get_xml_int( doc, node ); + if( !xmlStrcmp( node->name, (const xmlChar*) "x_pos" )) + x = get_xml_int( doc,node ); + if( !xmlStrcmp( node->name, (const xmlChar*) "y_pos" )) + y = get_xml_int( doc, node ); + if( !xmlStrcmp( node->name, (const xmlChar*) "font_size" )) + size = get_xml_int(doc,node); + if( !xmlStrcmp( node->name, (const xmlChar*) "font_family" )) + type = get_xml_int( doc, node ); + if( !xmlStrcmp( node->name, (const xmlChar*) "bg" )) + get_xml_3int( doc, node, &bg[0], &bg[1], &bg[2] ); + if( !xmlStrcmp( node->name, (const xmlChar*) "fg" )) + get_xml_3int( doc, node, &fg[0], &fg[1], &fg[2] ); + if( !xmlStrcmp( node->name, (const xmlChar*) "ln" )) + get_xml_3int( doc, node, &ln[0], &ln[1], &ln[2] ); + if( !xmlStrcmp( node->name, (const xmlChar*) "alpha" )) + get_xml_3int( doc, node, &alpha[0], &alpha[1], &alpha[2] ); + if( !xmlStrcmp( node->name, (const xmlChar*) "use_bg" )) + use_bg = get_xml_int( doc, node ); + if( !xmlStrcmp( node->name, (const xmlChar*) "use_outline" )) + outline = get_xml_int(doc,node); + + node = node->next; + } + + char *key = make_key( id ); + srt_seq_t *s = NULL; + if( vevo_property_get( f->dictionary, key, 0, &s ) == VEVO_NO_ERROR ) + { + s->x = x; s->y = y; s->size = size; s->font = type; + s->use_bg = use_bg; s->outline = outline; + s->bg[0] = bg[0]; s->bg[1] = bg[1]; s->bg[2] = bg[2]; + s->fg[0] = fg[0]; s->fg[1] = fg[1]; s->fg[2] = fg[2]; + s->ln[0] = ln[0]; s->ln[1] = ln[1]; s->ln[2] = ln[2]; + s->alpha[0] = alpha[0]; + s->alpha[1] = alpha[1]; + s->alpha[2] = alpha[2]; + } + else + { + veejay_msg(VEEJAY_MSG_DEBUG, "Sequence %d (%s) not in .srt file (tried dictionary %p)", id,key, f->dictionary ); + } + free(key); + +} + +void vj_font_xml_pack( xmlNodePtr node, void *font ) +{ + vj_font_t *ff = (vj_font_t*) font; + char **items = vevo_list_properties ( ff->dictionary ); + if(!items) + return; +#ifdef STRICT_CHECKING + assert( ff->dictionary != NULL ); +#endif + + char buf[100]; + int i; + for( i = 0; items[i] != NULL ; i ++ ) + { + void *srt = NULL; + if ( vevo_property_get( ff->dictionary, items[i], 0, &srt ) == VEVO_NO_ERROR ) + { + srt_seq_t *s = (srt_seq_t*) srt; + + xmlNodePtr *childnode = xmlNewChild( node, NULL, (const xmlChar*) "SUBTITLES" , NULL ); + + sprintf(buf, "%d", s->id ); + xmlNewChild(childnode, NULL, (const xmlChar*) "srt_id", (const xmlChar*) buf ); + + sprintf(buf, "%d",s->x ); + xmlNewChild(childnode, NULL, (const xmlChar*) "x_pos", (const xmlChar*) buf ); + + sprintf(buf, "%d", s->y ); + xmlNewChild(childnode, NULL, (const xmlChar*) "y_pos", (const xmlChar*) buf ); + + sprintf(buf, "%d", s->size ); + xmlNewChild(childnode, NULL, (const xmlChar*) "font_size", (const xmlChar*) buf ); + + sprintf(buf, "%d", s->font ); + xmlNewChild(childnode, NULL, (const xmlChar*) "font_family", (const xmlChar*) buf ); + + sprintf(buf, "%d %d %d", s->bg[0],s->bg[1],s->bg[2] ); + xmlNewChild(childnode, NULL, (const xmlChar*) "bg" , (const xmlChar*) buf ); + + sprintf(buf, "%d %d %d", s->fg[0], s->fg[1], s->fg[2] ); + xmlNewChild(childnode, NULL, (const xmlChar*) "fg", (const xmlChar*) buf ); + + sprintf(buf, "%d %d %d", s->ln[0], s->ln[1], s->ln[2] ); + xmlNewChild(childnode,NULL, (const xmlChar*) "ln", (const xmlChar*) buf ); + + sprintf(buf, "%d %d %d", s->alpha[0], s->alpha[1],s->alpha[2] ); + xmlNewChild(childnode, NULL, (const xmlChar*) "alpha", (const xmlChar*) buf ); + + sprintf(buf, "%d", s->use_bg ); + xmlNewChild(childnode, NULL, (const xmlChar*) "use_bg", (const xmlChar*) buf ); + + sprintf(buf, "%d", s->outline ); + xmlNewChild(childnode, NULL, (const xmlChar*) "use_outline", (const xmlChar*) buf ); + + + } + free(items[i]); + } + free(items); +} + + +int vj_font_save_srt( void *font , const char *filename ) +{ + vj_font_t *ff = (vj_font_t*) font; + char **items = vevo_list_properties ( ff->dictionary ); + if(!items) + { + veejay_msg(0, "No subtitle sequences present, nothing to save"); + return 0; + } + int i; + FILE *f = fopen( filename , "w" ); + if(!f) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot open file '%s' for writing", filename ); + return 0; + } +#ifdef STRICT_CHECKING + assert( ff->dictionary != NULL ); +#endif + for( i = 0; items[i] != NULL ; i ++ ) + { + void *srt = NULL; + if ( vevo_property_get( ff->dictionary, items[i], 0, &srt ) == VEVO_NO_ERROR ) + { + srt_seq_t *s = (srt_seq_t*) srt; + int n = strlen(s->text); + if( n > 0 ) + { + char *tc1 = vj_font_pos_to_timecode( ff, s->start ); + char *tc2 = vj_font_pos_to_timecode( ff, s->end ); + fprintf( f, "%d\n%s --> %s\n%s\n\n", + s->id, + tc1, + tc2, + s->text ); + free(tc1); + free(tc2); + } + } + free(items[i]); + } + free(items); + fclose( f ); + + veejay_msg(VEEJAY_MSG_DEBUG, "Saved %d subtitles to %s", i, filename ); + + return 1; +} + +char *vj_font_get_sequence( void *font, int seq ) +{ + vj_font_t *ff = (vj_font_t*) font; + char tmp[1024]; + srt_seq_t *s = NULL; + void *srt = NULL; + + if( seq == 0 ) + seq = ff->auto_number; + char *key = make_key( seq ); + +#ifdef STRICT_CHECKING + assert( ff->dictionary != NULL ); +#endif + if( vevo_property_get( ff->dictionary, key, 0, &srt ) != VEVO_NO_ERROR ) + return NULL; + + s = (srt_seq_t*) srt; + + int tcl1, tcl2; + char *tc1 = vj_font_pos_to_timecode( ff, s->start ); + char *tc2 = vj_font_pos_to_timecode( ff, s->end ); + int len = strlen(s->text); + tcl1 = strlen(tc1); + tcl2 = strlen(tc2); + + uint8_t bg[3]; + uint8_t fg[3]; + + + sprintf( tmp, "%05d%09d%09d%02d%s%02d%s%03d%s%04d%04d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d%03d", + s->id, + (int)s->start, + (int)s->end, + tcl1, + tc1, + tcl2, + tc2, + len, + s->text, + s->x, + s->y, + s->font, + s->size, + s->bg[0], + s->bg[1], + s->bg[2], + s->fg[0], + s->fg[1], + s->fg[2], + s->use_bg, + s->outline, + s->ln[0], + s->ln[1], + s->ln[2], + s->alpha[0], + s->alpha[1], + s->alpha[2]); + + free(tc1); + free(tc2); + free(key); + return strdup(tmp); +} + +int vj_font_new_text( void *font, char *text, long lo,long hi, int seq) +{ + vj_font_t *ff = (vj_font_t*) font; + if( lo == hi ) + { + veejay_msg(VEEJAY_MSG_ERROR, "It makes no sense to make a subtitle of length 0" ); + return 0; + } + + if(seq == 0 ) + { + int an = ff->auto_number; + while( vj_font_srt_sequence_exists( font, an ) ) + an++; + ff->auto_number = an; + veejay_msg(VEEJAY_MSG_DEBUG, "New subtitle sequence %d", an ); + seq = ff->auto_number; + } + + font_lock( ff ); + + srt_seq_t *s = vj_font_new_srt_sequence(ff, seq, text, lo,hi ); + + vj_font_store_srt_sequence( ff, s ); + + font_unlock(ff); + + return seq; +} +void vj_font_del_text( void *font, int seq ) +{ + vj_font_t *ff = (vj_font_t*) font; + ff->auto_number = seq; + font_lock( ff ); + vj_font_del_srt_sequence( ff, seq); + font_unlock( ff ); +} + +void vj_font_set_position( void *font, int x, int y ) +{ + vj_font_t *ff = (vj_font_t*) font; + int seq = ff->auto_number; + + char *key = make_key( seq ); + +#ifdef STRICT_CHECKING + assert( ff->dictionary != NULL ); +#endif + srt_seq_t *s = NULL; + if( vevo_property_get( ff->dictionary, key, 0, &s ) != VEVO_NO_ERROR ) + { + free(key); + return; + } + font_lock( ff ); + + s->x = x; + s->y = y; + + font_unlock( ff ); + free(key); +} + +void vj_font_set_size_and_font( void *font, int f_id, int size ) +{ + vj_font_t *ff = (vj_font_t*) font; + if( f_id < 0 || f_id >= ff->font_index || size < 6 || size > 400 ) + return ; + int seq = ff->auto_number; + + char *key = make_key( seq ); + +#ifdef STRICT_CHECKING + assert( ff->dictionary != NULL ); +#endif + srt_seq_t *s = NULL; + if( vevo_property_get( ff->dictionary, key, 0, &s ) != VEVO_NO_ERROR ) + { + free(key); + return; + } + + font_lock( ff ); + + s->font = f_id; + s->size = size; + + veejay_msg(VEEJAY_MSG_DEBUG, "Selected font '%s', size %d", + ff->font_list[s->font], s->size ); + + font_unlock( ff ); + + free(key); +} + +void vj_font_update_text( void *font, long s1, long s2, int seq, char *text) +{ + vj_font_t *ff = (vj_font_t*) font; + srt_seq_t *s = NULL; + void *srt = NULL; + if(seq == 0 ) + seq = ff->auto_number; + char *key = make_key( seq ); +#ifdef STRICT_CHECKING + assert( ff->dictionary != NULL ); +#endif + int error = vevo_property_get( ff->dictionary, key, 0, &srt ); + if( error != VEVO_NO_ERROR ) + { + veejay_msg(0, "Subtitle sequence %d does not exist, code %d, used key '%s'",seq,error,key); + free(key); + return; + } + s = (srt_seq_t*) srt; + + font_lock( ff ); + + long k; +/* + long len = s2 - s1; + if( len > ff->text_max_size ) + len = ff->text_max_size; +*/ + if( s2 > ff->text_max_size ) + s2 = ff->text_max_size; + if( s1 > ff->text_max_size ) + s1 = ff->text_max_size; + if( s1 == s2 ) { + veejay_msg(0, "Sample too long to subtitle"); + free(key); + return; + } + + for( k = s1; k <= s2; k ++ ) + ff->index[k] = &(ff->text_buffer[k]); + + + index_node_remove( font, s ); + if( s->text ) + free(s->text); + s->text = strdup( text ); + s->start = s1; + s->end = s2; + + ff->auto_number = seq; + + index_node_append( font, s ); + + font_unlock( ff ); + + free(key); +} + +char **vj_font_get_sequences( void *font ) +{ + vj_font_t *f = (vj_font_t*) font; + char **items = vevo_list_properties( f->dictionary ); + if(!items) + return NULL; + int i; + int j=0; + int len=0; + + for( i = 0; items[i] != NULL ; i ++ ) + len ++; + + if( len <= 0 ) + return NULL; + + char **res = (char**) vj_calloc(sizeof(char*) * (len+1)); + for( i = 0; items[i] != NULL ; i ++ ) + { + srt_seq_t *s = NULL; + if( vevo_property_get( f->dictionary, items[i], 0,&s ) == VEVO_NO_ERROR ) + { + char tmp[16]; + sprintf(tmp, "%d", s->id ); + res[j] = strdup(tmp); + j++; + } + free(items[i]); + + } + free(items); + if( j == 0 ) + { + free(res); + return NULL; + } + + return res; +} + +#define MAX_FONTS 250 + +char **vj_font_get_all_fonts( void *font ) +{ + vj_font_t *f = (vj_font_t*) font; + int i; + if( f->font_index <= 0 ) + return NULL; + + char **res = (char**) vj_calloc(sizeof(char*) * (f->font_index +1) ); + for( i =0; i < f->font_index ;i ++ ) + res[i] = strdup( f->font_list[i] ); + return res; +} + +static int font_selector( const struct dirent *dir ) +{ + if(strstr(dir->d_name, ".ttf" )) return 1; + if(strstr(dir->d_name, ".TTF" )) return 1; +// if(strstr(dir->d_name, ".pfa" )) return 1; +// if(strstr(dir->d_name, ".pcf.gz" )) return 1; + return 0; +} + +static int dir_selector( const struct dirent *dir ) +{ + return 1; +} + +static int is_ttf( const char *file ) +{ + if(strstr( file, ".ttf" ) || strstr( file, ".TTF" ) || strstr( file, "PFA" ) || + strstr(file, "pfa" ) || strstr( file, "pcf" ) || strstr( file, "PCF" ) ) + return 1; + return 0; +} + +static int try_deepen( vj_font_t *f , char *path ) +{ + int n = 0; + if(!path) return 0; + + struct stat l; + memset( &l, 0, sizeof(struct stat) ); + if( lstat( path, &l ) < 0 ) + return 0; + + if( S_ISLNK( l.st_mode ) ) + { + memset(&l,0,sizeof(struct stat)); + stat( path, &l ); + } + + if( S_ISDIR( l.st_mode )) + { + return 1; + } + + if( S_ISREG( l.st_mode )) + { + if( is_ttf( path ) ) + { + if( f->font_index < MAX_FONTS ) + { + char *try_font = strdup(path); + if( test_font (f, try_font, f->font_index) ) + { + f->font_table[ f->font_index ] = try_font; + f->font_index ++; + } + else + { + free(try_font); + } + } + } + } + return 0; +} + +static int find_fonts(vj_font_t *ec, char *path) +{ + struct dirent **files; + int n = scandir(path, &files, dir_selector,alphasort); + + if(n < 0) + return 0; + + while( n -- ) + { + char tmp[1024]; + snprintf( tmp, 1024, "%s/%s", path, files[n]->d_name ); + if( strcmp( files[n]->d_name , "." ) != 0 && + strcmp( files[n]->d_name, ".." ) != 0 ) + { + if(try_deepen( ec, tmp )) + find_fonts( ec, tmp ); + } + free( files[n] ); + } + free(files); + return 1; +} + +static char *select_font( vj_font_t *ec, int id ) +{ + if( id < 0 || id >= ec->font_index ) + return NULL; + + return ec->font_table[id]; +} + +static int test_font( vj_font_t *f , const char *font, int id) +{ + char name[1024]; + FT_Face face; + int error; + + FT_SfntName sn,qn,zn; + if ( (error = FT_New_Face( f->library, font, 0, &face )) != 0) + { + return 0; + } + + memset( &qn, 0,sizeof( FT_SfntName ) ); + memset( &zn, 0, sizeof( FT_SfntName )); + memset( &sn, 0, sizeof( FT_SfntName )); + + FT_Get_Sfnt_Name( face, TT_NAME_ID_FONT_FAMILY, &qn ); + FT_Get_Sfnt_Name( face, TT_NAME_ID_FONT_SUBFAMILY, &zn ); + + + if( !zn.string || !qn.string || qn.string_len <= 0 || zn.string_len <= 0 ) + { + FT_Done_Face(face); + return 0; + } + char *name1 = strndup( qn.string, qn.string_len ); + char *name2 = strndup( zn.string, zn.string_len ); + + int n1 = strlen(name1); + int n2 = n1 + strlen(name2); + + if( n2 <= 2 || (n2+n1) > 150) + { + FT_Done_Face(face); + free(name1); + free(name2); + return 0; + } + + snprintf( name,1024,"%s (%s)", name1, name2); + + f->font_list[id] = strdup( name ); + + free(name1); + free(name2); + + FT_Done_Face( face ); + return 1; +} + + + +static void print_fonts(vj_font_t *ec) +{ + int i; + for(i =0 ; i < ec->font_index ; i ++ ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "[%03d] : [%s]", + i, ec->font_list[i] ); + } +} + + +void vj_font_set_outline_and_border( void *font, int outline, int border) +{ + vj_font_t *ff = (vj_font_t*) font; + + int seq = ff->auto_number; + char *key = make_key( seq ); + +#ifdef STRICT_CHECKING + assert( ff->dictionary != NULL ); +#endif + srt_seq_t *s = NULL; + if( vevo_property_get( ff->dictionary, key, 0, &s ) != VEVO_NO_ERROR ) + { + free(key); + return; + } + font_lock( ff ); + + s->use_bg = border; + s->outline = outline; + + font_unlock( ff ); + + free(key); +} + +void vj_font_set_lncolor( void *font, int r, int g, int b, int a) +{ + vj_font_t *f = (vj_font_t*) font; + + int seq = f->auto_number; + + char *key = make_key( seq ); + +#ifdef STRICT_CHECKING + assert( f->dictionary != NULL ); +#endif + srt_seq_t *s = NULL; + if( vevo_property_get( f->dictionary, key, 0, &s ) != VEVO_NO_ERROR ) + { + free(key); + return; + } + font_lock( f ); + + s->ln[0] = r; + s->ln[1] = g; + s->ln[2] = b; + s->alpha[2] = a; + + font_unlock( f ); + + free(key); +} + +void vj_font_set_bgcolor( void *font, int r, int g, int b,int a) +{ + vj_font_t *f = (vj_font_t*) font; + + int seq = f->auto_number; + + char *key = make_key( seq ); + +#ifdef STRICT_CHECKING + assert( f->dictionary != NULL ); +#endif + srt_seq_t *s = NULL; + if( vevo_property_get( f->dictionary, key, 0, &s ) != VEVO_NO_ERROR ) + { + free(key); + return; + } + font_lock( f ); + + s->bg[0] = r; + s->bg[1] = g; + s->bg[2] = b; + s->alpha[1] = a; + + font_unlock( f ); + + free(key); +} + + +void vj_font_set_fgcolor( void *font, int r, int g, int b, int a) +{ + vj_font_t *ff = (vj_font_t*) font; + int seq = ff->auto_number; + + char *key = make_key( seq ); + +#ifdef STRICT_CHECKING + assert( ff->dictionary != NULL ); +#endif + srt_seq_t *s = NULL; + if( vevo_property_get( ff->dictionary, key, 0, &s ) != VEVO_NO_ERROR ) + { + free(key); + return; + } + font_lock( ff ); + + s->fg[0] = r; + s->fg[1] = g; + s->fg[2] = b; + s->alpha[0] = a; + + font_unlock( ff ); + + free(key); +} + +void vj_font_dictionary_destroy( void *font, void *dict ) +{ + char **items = vevo_list_properties(dict ); + if(!items) + return; + + vj_font_t *f = (vj_font_t*) font; + + int i; + for( i = 0; items[i] != NULL ; i ++ ) + { + srt_seq_t *s = NULL; + if( vevo_property_get( dict, items[i], 0,&s ) == VEVO_NO_ERROR ) + { + index_node_remove( f, s ); + + free(s->text); + free(s); + } + free(items[i]); + } + free(items); + vevo_port_free( dict ); +} + + +void vj_font_destroy(void *ctx) +{ + if(!ctx) + return; + + vj_font_t *f = (vj_font_t*) ctx; + + if( f->face ) + { + int c; + for( c = 0; c < 256 ; c ++) + { + if( f->glyphs[c] ) + FT_Done_Glyph( f->glyphs[c] ); + f->glyphs[c] = NULL; + } + FT_Done_Face( f->face ); + } + + if(f->plain) + vj_font_dictionary_destroy( f,f->plain ); + + FT_Done_FreeType( f->library ); + + int i; + for( i = 0 ; i < MAX_FONTS ;i ++ ) + { + if( f->font_list[i] ) + free(f->font_list[i]); + if( f->font_table[i] ) + free(f->font_table[i]); + } + free( f->text_buffer ); + free( f->font_table ); + free( f->font_list ); + free( f ); +} + +static void fallback_font(vj_font_t *f) +{ + f->current_font = get_default_font( f ); + + while( (f->font = select_font(f, f->current_font )) == NULL ) + { + f->current_font ++; + if( f->current_font >= f->font_index ) + { + veejay_msg(0, "No more fonts to try"); + vj_font_destroy( f ); + } + } + +} + +static int configure(vj_font_t *f, int size, int font) +{ + int c,error; + FT_BBox bbox; + int yMax,yMin,xMax,xMin; + + f->current_font = font; + f->font = select_font( f , font ); + if(f->font == NULL ) + { + fallback_font( f ); + } + + veejay_msg(VEEJAY_MSG_DEBUG, "Using font %s, size %d (#%d)", f->font, size, font ); + + if( f->face ) + { + for( c = 0; c < 256 ; c ++) + { + if( f->glyphs[c] ) + FT_Done_Glyph( f->glyphs[c] ); + f->glyphs[c] = NULL; + } + FT_Done_Face( f->face ); + } + + if ( (error = FT_New_Face( f->library, f->font, 0, &(f->face) )) != 0) + { + veejay_msg(VEEJAY_MSG_ERROR,"Cannot load face: %s (error #%d)\n ", f->font, error); + return 0; + } + + f->current_size = size; + if ( (error = FT_Set_Pixel_Sizes( f->face, 0, f->current_size)) != 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot set font size to %d pixels (error #%d)\n", + f->current_size, error ); + return 0; + } + + f->use_kerning = FT_HAS_KERNING(f->face); + + yMax = -32000; + yMin = 32000; + xMax = -32000; + xMin = 32000; + + for( c = 0; c < 256 ; c ++) + { + // load char + error = FT_Load_Char( f->face, (unsigned char) c , FT_LOAD_RENDER | FT_LOAD_MONOCHROME ); + if(!error) + { + f->bitmaps[c] = f->face->glyph->bitmap; + f->bitmap_left[c] = f->face->glyph->bitmap_left; + f->bitmap_top[c] = f->face->glyph->bitmap_top; + f->advance[c] = f->face->glyph->advance.x >> 6; + + + FT_Get_Glyph( f->face->glyph, &(f->glyphs[c]) ); + } + + f->glyphs_index[c] = FT_Get_Char_Index( f->face, (unsigned char) c ); + if( f->glyphs_index[c] ) + { + FT_Glyph_Get_CBox( f->glyphs[ c ] , ft_glyph_bbox_pixels, &bbox); + if( bbox.yMax > yMax ) + yMax = bbox.yMax; + if( bbox.yMin < yMin ) + yMin = bbox.yMin; + if( bbox.xMax > xMax ) + xMax = bbox.xMax; + if( bbox.xMin < xMin ) + xMin = bbox.xMin; + } + } + + f->text_height = yMax - yMin; + f->text_width = xMax - xMin; + f->baseline = yMax; + + return 1; +} + +void *vj_font_get_plain_dict( void *font ) +{ + vj_font_t *f = (vj_font_t*) font; + return f->plain; +} + +void vj_font_print_credits(void *font, char *text) +{ + vj_font_t *f = (vj_font_t*) font; + + static const char *intro = + "A visual instrument for GNU/Linux\n"; + static const char *license = + "This program is licensed as\nFree Software (GNU/GPL version 2)\n\nFor more information see:\nhttp://veejayhq.net\nhttp://veejay.dyne.org\nhttp://www.sourceforge.net/projects/veejay\nhttp://www.gnu.org"; + static const char *copyr = + "(C) 2002-2008 Copyright N.Elburg et all\n"; + //@ create text to print + snprintf(text, 1024,"This is Veejay version %s\n%s\n%s\n%s",VERSION,intro,copyr,license); +} + + +void vj_font_customize_osd( void *font,void *uc, int type, int vp, int wp ) +{ + vj_font_t *f = (vj_font_t*) font; + veejay_t *v = (veejay_t*) uc; + video_playback_setup *settings =v->settings; + + char buf[256]; + + switch( v->uc->playback_mode ) + { + case VJ_PLAYBACK_MODE_SAMPLE: + snprintf(buf,256, "(S) %d|%d M=%dMb C=%dms V=%s F%s", + v->uc->sample_id, + sample_size()-1, + sample_cache_used(0), + v->real_fps, + (vp ? "Y" : "N" ), + (wp ? "P" : "V") ); + break; + case VJ_PLAYBACK_MODE_TAG: + snprintf(buf,256, "(T) %d|%d C=%dms V=%s F=%s", + v->uc->sample_id, + vj_tag_size(), + v->real_fps, + (vp ? "Y" : "N" ), + (wp ? "P" : "V" )); + break; + default: + f->time = type; + if( f->add ) + { + free(f->add ); + } + f->add = NULL; + return; + break; + } + + + if(f->add) + { + free(f->add); + } + f->add = strdup( buf ); + f->time = type; +} + +void vj_font_set_constraints_and_dict( void *font, long lo, long hi, float fps, void *dict ) +{ + vj_font_t *f = (vj_font_t*) font; + + long len = hi - lo + 1; + + veejay_msg(VEEJAY_MSG_DEBUG, "Subtitle: Dictionary %p, Lo = %ld , Hi = %ld, Fps = %f, font = %p", + dict, lo,hi, fps , font); + + f->fps = fps; + + if( f->dictionary ) + { + char **items = vevo_list_properties(f->dictionary ); + if(items) + { + int i; + for( i = 0; items[i] != NULL ; i ++ ) + { + srt_seq_t *s = NULL; + if( vevo_property_get( f->dictionary, items[i], 0,&s ) == VEVO_NO_ERROR ) + index_node_remove( f, s ); + free(items[i]); + } + free(items); + } + } + + veejay_memset( f->text_buffer, 0, f->text_max_size * sizeof(srt_cycle_t)); + f->index = f->text_buffer; + if( len > f->text_max_size ) + { + veejay_msg(VEEJAY_MSG_WARNING, + "Sample too long , subtitling frames %d - %d", 0, f->text_max_size); + len = f->text_max_size; + } + f->index_len = len; + + long k; + for( k = 0; k <= f->index_len; k ++ ) + f->index[k] = &(f->text_buffer[k]); + + if(dict) + { + f->dictionary = dict; + char **items = vevo_list_properties( f->dictionary ); + if( items ) + { + int i; + for( i = 0; items[i] != NULL ; i ++ ) + { + srt_seq_t *s = NULL; + if( vevo_property_get(dict, items[i],0, &s ) == VEVO_NO_ERROR ) + index_node_append(f,s ); + free(items[i]); + } + free(items); + } + } +} + +void vj_font_set_dict( void *font, void *dict ) +{ + vj_font_t *f = (vj_font_t*) font; + f->dictionary = dict; +} + +void *vj_font_get_dict(void *font) +{ + vj_font_t *f = (vj_font_t*) font; + return f->dictionary; +} + +static int compare_strings( char **p1, char **p2 ) +{ + return strcoll( *p1, *p2 ); +} + +static int get_default_font( vj_font_t *f ) +{ + static struct + { + char *name; + } default_fonts[] = { + { "Arab (Regular)"}, + { "Mashq (Regular)" }, + { "DejaVu Sans (Bold)" }, + { NULL }, + }; + int i,j; + for( i = 0; i < f->font_index; i ++ ) + { + for( j = 0; default_fonts[j].name != NULL ; j ++ ) + { + if( f->font_list[i]) + { + if( strcasecmp( default_fonts[j].name, f->font_list[i] ) == 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG,"Using default font '%s'", default_fonts[j].name ); + return i; + } + } + } + } + return 0; +} + +void *vj_font_init( int w, int h, float fps, int is_osd ) +{ + int error=0; + vj_font_t *f = (vj_font_t*) vj_calloc(sizeof(vj_font_t)); + f->text = NULL; + f->x = 0; + f->y = 0; + f->auto_number = 1; + f->index_len = 0; + f->fgcolor[0] = 235; + f->fgcolor[1] = 128; + f->fgcolor[2] = 128; + f->bgcolor[0] = 16; + f->bgcolor[1] = 128; + f->bgcolor[2] = 128; + f->lncolor[0] = 200; + f->lncolor[1] = 128; + f->lncolor[2] = 128; + f->alpha[0] = 0; + f->alpha[1] = 0; + f->alpha[2] = 0; + f->bg = 0; + f->outline = 0; + f->text_height = 0; + + int tmp = (w / 100) * 3; + if(tmp>15) tmp = 14; + if(tmp<11) tmp = 11; + f->current_size = (is_osd ? (tmp): 40); + + f->fps = fps; + f->index = NULL; + f->font_table = (char**) vj_calloc(sizeof(char*) * MAX_FONTS ); + f->font_list = (char**) vj_calloc(sizeof(char*) * MAX_FONTS); + f->font_index =0; + f->plain = vpn( VEVO_ANONYMOUS_PORT ); + + if ( (error = FT_Init_FreeType(&(f->library))) != 0 ) + { + free(f->font_table); + free(f->font_list); + free(f); + veejay_msg(VEEJAY_MSG_ERROR,"Cannot load FreeType (error #%d) \n",error); + return NULL; + } + + find_fonts(f,"/usr/X11R6/lib/X11/fonts/TTF"); + find_fonts(f,"/usr/X11R6/lib/X11/fonts/Type1"); + find_fonts(f,"/usr/X11R6/lib/X11/truetype"); + find_fonts(f,"/usr/X11R6/lib/X11/TrueType"); + find_fonts(f,"/usr/share/fonts/truetype"); + find_fonts(f,"~/veejay-fonts"); + + if( f->font_index <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "No TrueType fonts found"); + vj_font_destroy( f ); + return NULL; + } + qsort( f->font_table, f->font_index, sizeof(char*), compare_strings ); + qsort( f->font_list, f->font_index, sizeof(char*), compare_strings ); + + int df = get_default_font( f ); + + while(!configure( f, f->current_size, df )) + { + f->current_font ++; + if( f->current_font >= f->font_index ) + { + veejay_msg(0, "No more fonts to try"); + vj_font_destroy( f ); + } + return NULL; + } + + f->time = is_osd; + f->text_buffer = (srt_cycle_t*) + vj_calloc(sizeof(srt_cycle_t) * (sizeof(srt_cycle_t)*22500)); + f->text_max_size = 22500; + //print_fonts(f); + + pthread_mutex_init( &(f->mutex), NULL ); + + return f; +} + +static void draw_glyph( + vj_font_t *f, + VJFrame *picture, + FT_Bitmap *bitmap, + unsigned int x, + unsigned int y, + unsigned int width, + unsigned int height, + uint8_t *yuv_fgcolor, + uint8_t *yuv_lncolor, + int outline) +{ + int r, c; + int spixel, dpixel[3], in_glyph=0; + dpixel[2] = 128; dpixel[1] = 128; + + + uint8_t *Y = picture->data[0]; + uint8_t *U = picture->data[1]; + uint8_t *V = picture->data[2]; + + uint8_t *bitbuffer = bitmap->buffer; + uint32_t bitmap_rows = bitmap->rows; + uint32_t bitmap_wid = bitmap->width; + uint32_t bitmap_pitch = bitmap->pitch; + + int p,left,top,bot,pos; + + if (bitmap->pixel_mode == ft_pixel_mode_mono) + { + in_glyph = 0; + for (r=0; (r < bitmap_rows) && (r+y < height); r++) + { + for (c=0; (c < bitmap_wid) && (c+x < width); c++) + { + p = (c+x) + ((y+r)*width); + left = (c+x-1) + ((y+r)*width); + top = (c+x) + ((y+r-1)*width); + bot = (c+x) + ((y+r+1)*width); + + dpixel[0] = Y[ p ]; + dpixel[1] = U[ p ]; + dpixel[2] = V[ p ]; + + pos = r * bitmap_pitch + (c >> 3 ); + + // spixel = bitmap->buffer[r*bitmap->pitch +c/8] & (0x80>>(c%8)); + + spixel = bitbuffer[ pos ] & ( 0x80 >> ( c % 8 )); + + if (spixel) + { + dpixel[0] = yuv_fgcolor[0]; + dpixel[1] = yuv_fgcolor[1]; + dpixel[2] = yuv_fgcolor[2]; + } + if (outline) + { + if ( (!in_glyph) && (spixel) ) + { + in_glyph = 1; + if (c-1 >= 0) + { + Y[ left ] = yuv_lncolor[0]; + U[ left ] = yuv_lncolor[1]; + V[ left ] = yuv_lncolor[2]; + } + } + else if ( (in_glyph) && (!spixel) ) + { + in_glyph = 0; + dpixel[0] = yuv_lncolor[0]; + dpixel[1] = yuv_lncolor[1]; + dpixel[2] = yuv_lncolor[2]; + } + + if (in_glyph) + { + if ( (r-1 >= 0) && (! bitbuffer[(r-1)*bitmap->pitch +c/8] & (0x80>>(c%8))) ) + { + Y[ top ] = yuv_lncolor[0]; + U[ top ] = yuv_lncolor[1]; + V[ top ] = yuv_lncolor[2]; + } + + if ( (r+1 < height) && (! bitbuffer[(r+1)*bitmap->pitch +c/8] & (0x80>>(c%8))) ) + { + Y[ bot ] = yuv_lncolor[0]; + U[ bot ] = yuv_lncolor[1]; + V[ bot ] = yuv_lncolor[2]; + } + } + } + Y[ p ] = dpixel[0]; + U[ p ] = dpixel[1]; + V[ p ] = dpixel[2]; + } + } + } +} + +// in struct: line color [3] , alpha fg, bg and line color +// extras in sequence: alpha (3x), linecolor( 3x ) +static void draw_transparent_glyph( + vj_font_t *f, + VJFrame *picture, + FT_Bitmap *bitmap, + unsigned int x, + unsigned int y, + unsigned int width, + unsigned int height, + uint8_t *yuv_fgcolor, + uint8_t *yuv_lncolor, + int outline, + int fgop, + int bgop) +{ + int r, c; + int spixel, dpixel[3], in_glyph=0; + dpixel[2] = 128; dpixel[1] = 128; + + + uint8_t *Y = picture->data[0]; + uint8_t *U = picture->data[1]; + uint8_t *V = picture->data[2]; + + const uint8_t fop1 = fgop; + const uint8_t fop0 = 255 - fop1; + const uint8_t bop1 = bgop; + const uint8_t bop0 = 255 - bop1; + + // opacity for line color , fgcolor and bgcolor. is bg color needed here? + if (bitmap->pixel_mode == ft_pixel_mode_mono) + { + + in_glyph = 0; + for (r=0; (r < bitmap->rows) && (r+y < height); r++) + { + for (c=0; (c < bitmap->width) && (c+x < width); c++) + { + int p = (c+x) + ((y+r)*width); + int left = (c+x-1) + ((y+r)*width); + int top = (c+x) + ((y+r-1)*width); + int bot = (c+x) + ((y+r+1)*width); + + dpixel[0] = Y[ p ]; + dpixel[1] = U[ p ]; + dpixel[2] = V[ p ]; + + spixel = bitmap->buffer[r*bitmap->pitch +c/8] & (0x80>>(c%8)); + + if (spixel) + { + dpixel[0] = (Y[p] * fop0 + yuv_fgcolor[0] * fop1 ) >> 8; + dpixel[1] = (U[p] * fop0 + yuv_fgcolor[1] * fop1 ) >> 8; + dpixel[2] = (V[p] * fop0 + yuv_fgcolor[2] * fop1 ) >> 8; + } + if (outline) + { + if ( (!in_glyph) && (spixel) ) + { + in_glyph = 1; + if (c-1 >= 0) + { + Y[ left ] = (Y[p] * bop0 + yuv_lncolor[0] * bop1)>>8; + U[ left ] = (U[p] * bop0 + yuv_lncolor[1] * bop1)>>8; + V[ left ] = (V[p] * bop0 + yuv_lncolor[2] * bop1)>>8; + } + } + else if ( (in_glyph) && (!spixel) ) + { + in_glyph = 0; + dpixel[0] = (Y[p] * bop0 + yuv_lncolor[0] * bop1) >> 8; + dpixel[1] = (U[p] * bop0 + yuv_lncolor[1] * bop1) >> 8; + dpixel[2] = (V[p] * bop0 + yuv_lncolor[2] * bop1) >> 8; + } + + if (in_glyph) + { + if ( (r-1 >= 0) && (! bitmap->buffer[(r-1)*bitmap->pitch +c/8] & (0x80>>(c%8))) ) + { + Y[ top ] = (Y[p] * bop0 + yuv_lncolor[0] * bop1)>>8; + U[ top ] = (U[p] * bop0 + yuv_lncolor[1] * bop1)>>8; + V[ top ] = (V[p] * bop0 + yuv_lncolor[2] * bop1)>>8; + } + + if ( (r+1 < height) && (! bitmap->buffer[(r+1)*bitmap->pitch +c/8] & (0x80>>(c%8))) ) + { + Y[ bot ] = (Y[p] * bop0 + yuv_lncolor[0] * bop1)>>8; + U[ bot ] = (U[p] * bop0 + yuv_lncolor[1] * bop1)>>8; + V[ bot ] = (V[p] * bop0 + yuv_lncolor[2] * bop1)>>8; + } + } + } + Y[ p ] = dpixel[0]; + U[ p ] = dpixel[1]; + V[ p ] = dpixel[2]; + } + } + } +} + +static inline void draw_transparent_box( + VJFrame *picture, + unsigned int x, + unsigned int y, + unsigned int width, + unsigned int height, + uint8_t *yuv_color, + uint8_t opacity) +{ + const int op1 = opacity; + const int op0 = 255 - op1; + const int w = picture->width; + int i, j; + + uint8_t *A[3] = { + picture->data[0], + picture->data[1], + picture->data[2] + }; + + int p; + + for (j = y; j < height; j++) + for (i = x; i < width; i++) + { + p = (i + (j * w)); + A[0][p] = (op0 * A[0][ p ] + op1 * yuv_color[0]) >> 8; + A[1][p] = (op0 * A[1][ p ] + op1 * yuv_color[1]) >> 8; + A[2][p] = (op0 * A[2][ p ] + op1 * yuv_color[2]) >> 8; + } + +} + +static inline void draw_box(VJFrame *picture, unsigned int x, unsigned int y, unsigned int width, unsigned int height, uint8_t *yuv_color) +{ + int i, j; + + for (j = y; j < height; j++) + for (i = x; i < width; i++) + { + picture->data[0][ i + (j * picture->width ) ] = yuv_color[0]; + picture->data[1][ i + (j * picture->width ) ] = yuv_color[1]; + picture->data[2][ i + (j * picture->width ) ] = yuv_color[2]; + } + +} + +#define MAXSIZE_TEXT 1024 + +static void vj_font_text_render(vj_font_t *f, srt_seq_t *seq, void *_picture ) +{ + int size = strlen(seq->text); + FT_Face face = f->face; + FT_GlyphSlot slot = face->glyph; + FT_Vector pos[MAXSIZE_TEXT]; + FT_Vector delta; + + unsigned char c; + int x = 0, y = 0, i=0; + int str_w, str_w_max; + + VJFrame *picture = (VJFrame*) _picture; + int width = picture->width; + int height = picture->height; + + int x1 = f->x; + int y1 = f->y; + + str_w = str_w_max = 0; + + x = f->x; + y = f->y; + + char *text = seq->text; + + for (i=0; i < size; i++) + { + c = text[i]; + if ( (f->use_kerning) && (i > 0) && (f->glyphs_index[c]) ) + { + FT_Get_Kerning( + f->face, + f->glyphs_index[c], + // f->glyphs_index[ text[i-1] ], + f->glyphs_index[c], + ft_kerning_default, + &delta + ); + + x += delta.x >> 6; + } + + if( isblank( c ) || c == 20 ) + { + f->advance[c] = f->current_size; + if( (x + f->current_size) >= width ) + { + str_w = width = f->x - 1; + y += f->text_height; + x = f->x; + } + } + else + if (( (x + f->advance[ c ]) >= width ) || ( c == '\n' )) + { + str_w = width - f->x - 1; + y += f->text_height; + x = f->x; + } + + pos[i].x = x + f->bitmap_left[c]; + pos[i].y = y - f->bitmap_top[c] + f->baseline; + x += f->advance[c]; + + if (str_w > str_w_max) + str_w_max = str_w; + } + + if (f->bg) + { + if ( str_w_max + f->x >= width ) + str_w_max = width - f->x - 1; + if ( y >= height ) + y = height - 1 - 2*f->y; + + if( str_w_max == 0 ) + str_w_max = x1 + (x - x1); + + int bw = str_w_max; + int bh = y - y1; + if(bh <= 0 ) + bh = y1 + f->current_size; + + if( f->alpha[1] == 0 ) + { + draw_box( + picture, + x1, + y1, + bw, + bh, + f->bgcolor + ); + } + else + { + draw_transparent_box( + picture, + x1, + y1, + bw, + bh, + f->bgcolor, + f->alpha[1] ); + } + } + + for (i=0; i < size; i++) + { + c = text[i]; + if ( ((c == '_') && (text == f->text) ) || /* skip '_' (consider as space) + IF text was specified in cmd line + (which doesn't like neasted quotes) */ + ( c == '\n' )) /* Skip new line char, just go to new line */ + continue; + + if( f->alpha[0] || f->alpha[2] ) + { + draw_transparent_glyph( f, picture, &(f->bitmaps[c]), + pos[i].x,pos[i].y,width,height, + f->fgcolor,f->lncolor, f->outline, + f->alpha[0],f->alpha[2] ); + } + else + { + draw_glyph( f,picture, &(f->bitmaps[ c ]), + pos[i].x,pos[i].y,width, height, + f->fgcolor,f->lncolor,f->outline ); + } + x += slot->advance.x >> 6; + } + +} + +static void vj_font_text_osd_render(vj_font_t *f, long posi, void *_picture, char *in_string ) +{ + FT_Face face = f->face; + FT_GlyphSlot slot = face->glyph; + FT_Vector pos[MAXSIZE_TEXT]; + FT_Vector delta; + char osd_text[1024]; + unsigned char c; + int x = 0, y = 0, i=0; + int str_w, str_w_max; + + VJFrame *picture = (VJFrame*) _picture; + int width = picture->width; + int height = picture->height; + int x1,y1; + str_w = str_w_max = 0; + + int size = 0; + + if( in_string == NULL && f->time > 2 ) + return; + + if(f->time > 2 ) { + veejay_memset( osd_text, 0, sizeof(osd_text)); + size = strlen( in_string ); + if( size > 1024 ) { + veejay_msg(VEEJAY_MSG_WARNING, "Text buffer too long, truncating."); + size=1024; + } + if( size > 0 ) + veejay_strncpy(osd_text, in_string, size ); + } else if(f->time == 2 ) { + vj_font_print_credits(f,osd_text); + size = strlen(osd_text); + } + else + { + unsigned char *tmp_text = vj_font_pos_to_timecode( f, posi ); + + if( f->add ) + snprintf(osd_text,1024, "%s %s", tmp_text, f->add ); + else + snprintf(osd_text,1024, "%s", tmp_text ); + + size = strlen( osd_text ); + free(tmp_text); + y = picture->height - f->current_size - 4; + } + + if( size <= 0 ) //@ Nothing to do + return; + + x1 = x; + y1 = y; + unsigned int str_wi = 0; + char *text = osd_text; + + for (i=0; i < size; i++) + { + c = text[i]; + if ( (f->use_kerning) && (i > 0) && (f->glyphs_index[c]) ) + { + FT_Get_Kerning( + f->face, + f->glyphs_index[c], + f->glyphs_index[c], + ft_kerning_default, + &delta + ); + + x += delta.x >> 6; + } + + if( isblank( c ) || c == 20 ) + { + f->advance[c] = f->current_size; + if( (x + f->current_size) >= width ) + { + str_w = width = f->x - 1; + y += f->text_height; + x = f->x; + } + } + else + if (( (x + f->advance[ c ]) >= width ) || ( c == '\n' )) + { + str_w = width - f->x - 1; + y += f->text_height; + if( str_wi < x ) + str_wi = x; + x = f->x; + } + + pos[i].x = x + f->bitmap_left[c]; + pos[i].y = y - f->bitmap_top[c] + f->baseline; + x += f->advance[c]; + + if (str_w > str_w_max) + str_w_max = str_w; + } + +// if ( str_w_max + f->x >= width ) +// str_w_max = width - f->x - 1; + + if ( y >= height ) + y = height - 1 - 2*f->y; + +// if( str_w_max == 0 ) + str_w_max = (x - x1); + + int bw = str_w_max; + int bh = y - y1; + if(bh <= 0 ) + bh = y1 + f->current_size + 4; + + draw_transparent_box( + picture, + x1, + y1, + str_wi,//picture->width, + bh, + f->bgcolor, + 80 ); + + for (i=0; i < size; i++) + { + c = text[i]; + if ( ((c == '_') && (text == f->text) ) || /* skip '_' (consider as space) + IF text was specified in cmd line + (which doesn't like neasted quotes) */ + ( c == '\n' )) /* Skip new line char, just go to new line */ + continue; + + draw_glyph( f,picture, &(f->bitmaps[ c ]), + pos[i].x,pos[i].y,width, height, + f->fgcolor,f->lncolor,f->outline ); + + x += slot->advance.x >> 6; + } +} + + +int vj_font_norender(void *ctx, long position) +{ + if(!ctx) + return 0; + vj_font_t *f = (vj_font_t *) ctx; + + if(f->time) + return 1; + + if( position < 0 || position > f->index_len ) + return 0; + + if(!f->dictionary ) + return 0; + + if(!f->index[position]) + return 0; + + int work = 0; + int k = 0; + for( k = 0; k <16; k ++ ) + if( f->index[position]->id[k] ) + work ++; + return work; +} + +void vj_font_render(void *ctx, void *_picture, long position, char *in_string) +{ + vj_font_t *f = (vj_font_t *) ctx; + + if(f->time) { + vj_font_text_osd_render( f, position, _picture, in_string ); + return; + } + + if( position < 0 || position > f->index_len ) + return; + + srt_cycle_t *list = f->index[ position ]; + +#ifdef STRICT_CHECKING + assert( f->dictionary != NULL ); +#endif + + if(!list ) + return; + + font_lock( f ); + int k; + for( k = 0; k < 16 ; k ++ ) + { + if( list->id[k] == 0 ) + continue; + + srt_seq_t *s = NULL; + char *key = make_key( list->id[k] ); + + if( vevo_property_get( f->dictionary, key, 0, &s ) == VEVO_NO_ERROR ) + { + int old_font = f->current_font; + int old_size = f->current_size; + + if( old_font != s->font || old_size != s->size ) + if(!configure( f, s->size, s->font )) + if(!configure( f, old_size, old_font )) + break; + + f->x = s->x; + f->y = s->y; + f->bg = s->use_bg; + f->outline = s->outline; + + if(f->outline) + _rgb2yuv( s->ln[0],s->ln[1],s->ln[2], f->lncolor[0],f->lncolor[1],f->lncolor[2]); + + _rgb2yuv( s->fg[0],s->fg[1],s->fg[2], f->fgcolor[0],f->fgcolor[1],f->fgcolor[2] ); + if(f->bg) + _rgb2yuv( s->bg[0],s->bg[1],s->bg[2], f->bgcolor[0],f->bgcolor[1],f->bgcolor[2] ); + + memcpy( f->alpha, s->alpha, sizeof(s->alpha) ); + + vj_font_text_render( f,s, _picture ); + } + free(key); + } + font_unlock(f); +} + + + +#endif + diff --git a/veejay-server/veejay/vj-font.h b/veejay-server/veejay/vj-font.h new file mode 100644 index 00000000..8bbdc3a2 --- /dev/null +++ b/veejay-server/veejay/vj-font.h @@ -0,0 +1,55 @@ +#ifndef VJFONT_H +#define VJFONT_H +/* + * Linux VeeJay + * + * Copyright(C)2002-2006 Niels Elburg < nelburg@looze.net > + * + * 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. + * + * + */ + +void *vj_font_init(int s_w, int s_h, float fps, int osd); +int vj_font_srt_sequence_exists( void *font, int id ); +void vj_font_render(void *ctx, void *_picture, long nframe, char *in_string); +void vj_font_destroy(void *ctx); +int vj_font_load_srt( void *font, const char *filename ); +int vj_font_save_srt( void *font , const char *filename ); +char *vj_font_get_sequence( void *font, int seq ); +void *vj_font_get_plain_dict( void *font ); +void vj_font_set_constraints_and_dict( void *font, long lo, long hi, float fps, void *dict ); +void vj_font_dictionary_destroy(void *font,void *dict); +int vj_font_clear_text( void *font ); +int vj_font_new_text( void *font, char *text, long s1,long s2, int seq); +void vj_font_del_text( void *font, int seq ); +char **vj_font_get_all_fonts( void *font ); +void vj_font_set_lncolor( void *font, int r, int g, int b, int a ); +void vj_font_set_fgcolor( void *font, int r, int g, int b, int a ); +void vj_font_set_bgcolor( void *font, int r, int g, int b, int a ); +void vj_font_set_outline_and_border( void *font, int outline, int border); +void vj_font_set_position( void *font, int x, int y ); +void vj_font_set_size_and_font( void *font, int f_id, int size ); +void vj_font_set_dict( void *font, void *dict ); +void *vj_font_get_dict(void *font); +void vj_font_update_text( void *font, long s1,long s2, int seq, char *text); +char **vj_font_get_sequences( void *font ); +char *vj_font_get_sequence( void *font , int id ); +void vj_font_set_current( void *font , int cur ); +void vj_font_xml_pack( xmlNodePtr node, void *font ); +void vj_font_xml_unpack( xmlDocPtr doc, xmlNodePtr node, void *font ); +void vj_font_customize_osd( void *font,void *uc, int type, int vp, int wp ); +int vj_font_norender(void *ctx, long position); +#endif diff --git a/veejay-server/veejay/vj-jack.h b/veejay-server/veejay/vj-jack.h new file mode 100644 index 00000000..a69b99a5 --- /dev/null +++ b/veejay-server/veejay/vj-jack.h @@ -0,0 +1,63 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_JACK_H +#define VJ_JACK_H + +#include +#ifdef HAVE_JACK +#include + +int vj_jack_init(editlist *el); + +int vj_jack_update_buffer( uint8_t *buff, int bps, int num_channels, int buf_len); + +int vj_jack_stop(); + +int vj_jack_start(); + +int vj_jack_pause(); + +int vj_jack_resume(); + +void vj_jack_reset(); + +int vj_jack_play(void *data, int len); + +int vj_jack_set_volume(int volume); + +int vj_jack_pause(); + +int vj_jack_resume(); + +long vj_jack_get_status(long int *sec, long int *usec); + +void vj_jack_enable(); + +void vj_jack_disable(); + +int vj_jack_get_space(); + +int vj_jack_continue(int speed); + +int vj_jack_initialize(); + +int vj_jack_rate(); + +#endif +#endif diff --git a/veejay-server/veejay/vj-lib.h b/veejay-server/veejay/vj-lib.h new file mode 100644 index 00000000..357d3ca8 --- /dev/null +++ b/veejay-server/veejay/vj-lib.h @@ -0,0 +1,344 @@ +/* + * Copyright (C) 2002 Niels Elburg + * + * 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. + * + */ + +#ifndef VJ_LIB_H +#define VJ_LIB_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + NO_AUDIO = 0, + AUDIO_PLAY = 1, + AUDIO_RENDER = 2, +}; + + + + +enum { + LAVPLAY_STATE_STOP = 0, /* uninitialized state */ + LAVPLAY_STATE_PAUSED = 1, /* also known as: speed = 0 */ + LAVPLAY_STATE_PLAYING = 2, /* speed != 0 */ + LAVPLAY_STATE_RENDER_READY = 3, /* render mode */ +}; + +/* nmacro recorder, 5 lines code for play back of what you changed at navigation */ +enum { + VJ_MACRO_PLAIN_RECORD = 0, + VJ_MACRO_PLAIN_PLAY = 1, +}; + +#define MJPEG_MAX_BUF 64 +#define VJ_AUDIO_BUF_SIZE 16384 + + + +#define DUMMY_DEFAULT_WIDTH 352 +#define DUMMY_DEFAULT_HEIGHT 288 +#define DUMMY_DEFAULT_FPS 25 + +/* Video Playback Setup, necessary items for reading and playing video */ +struct mjpeg_sync +{ + unsigned long frame; /* Frame (0 - n) for double buffer */ + unsigned long length; /* number of code bytes in buffer (capture only) */ + unsigned long seq; /* frame sequence number */ + struct timeval timestamp; /* timestamp */ +}; +#define VJ_SCHED_NONE (1<<0) +#define VJ_SCHED_SL (1<<1) +#define VJ_SCHED_EL (1<<2) + +typedef struct { + int state; + char *sl; +} vj_schedule_t; + +#define RANDMODE_INACTIVE 0 +#define RANDMODE_SAMPLE 1 +#define RANDTYPE_NOFX 0 +#define RANDTYPE_PIXEL 1 +#define RANDTYPE_GEO 2 +#define RANDTYPE_MIXED 3 +#define RANDTIMER_FRAME 1 +#define RANDTIMER_LENGTH 0 + +typedef struct +{ + int mode; + int type; + int timer; + int min_delay; + int max_delay; +} vj_rand_player; + +typedef struct +{ + int chroma; + char norm; + int width; + int height; + float fps; + int active; + long arate; +} dummy_t; + +typedef struct +{ + int active; + int current; + int size; + int *samples; + int rec_id; +} sequencer_t; + + +typedef struct { + pthread_t software_playback_thread; /* the thread for software playback */ + pthread_mutex_t valid_mutex; + pthread_cond_t buffer_filled[MJPEG_MAX_BUF]; + pthread_cond_t buffer_done[MJPEG_MAX_BUF]; + pthread_mutex_t syncinfo_mutex; + pthread_t signal_thread; + sigset_t signal_set; + struct timeval lastframe_completion; /* software sync variable */ + + long old_field_len; + uint64_t save_list_len; /* for editing purposes */ + + double spvf; /* seconds per video frame */ + int usec_per_frame; /* milliseconds per frame */ + int msec_per_frame; + int min_frame_num; /* the lowest frame to be played back - normally 0 */ + int max_frame_num; /* the latest frame to be played back - normally num_frames - 1 */ + int current_frame_num; /* the current frame */ + int previous_frame_num; /* previous frame num */ + int current_playback_speed; /* current playback speed */ + int currently_processed_frame; /* changes constantly */ + int currently_synced_frame; /* changes constantly */ + int first_frame; /* software sync variable */ + int valid[MJPEG_MAX_BUF]; /* num of frames to be played */ + long buffer_entry[MJPEG_MAX_BUF]; + int render_entry; + int render_list; + int last_rendered_frame; + long rendered_frames; + long currently_processed_entry; + struct mjpeg_sync syncinfo[MJPEG_MAX_BUF]; /* synchronization info */ + uint64_t *save_list; /* for editing purposes */ + int abuf_len; + double spas; /* seconds per audio sample */ + int audio_mute; /* controls whether to currently play audio or not */ + int state; /* playing, paused or stoppped */ + int effect; /* realtime effect during play */ + int video_fd; + pthread_t playback_thread; /* the thread for the whole playback-library */ + int offline_ready; + int offline_record; + int offline_tag_id; + int offline_created_sample; + int sample_record; + int sample_record_id; + int sample_record_switch; + int full_screen; + int tag_record_switch; + int tag_record; + int dct_method; + subsample_mode_t sample_mode; + int unicast_link_id; + int unicast_frame_sender; + int is_dat; + int mcast_frame_sender; + int use_mcast; + char *group_name; + int use_vims_mcast; + char *vims_group_name; + int zoom; + int composite; + sws_template sws_templ; + vj_schedule_t action_scheduler; + float output_fps; + int crop; + VJRectangle viewport; + vj_rand_player randplayer; + void *export_image; + int links[16]; + int ncpu; + int vp_rec; + int late[2]; +} video_playback_setup; + + +typedef struct { + int stats_changed; /* has anything bad happened? */ + unsigned int frame; /* current frame which is being played back */ + unsigned int num_corrs_a; /* Number of corrections because video ahead audio */ + unsigned int num_corrs_b; /* Number of corrections because video behind audio */ + unsigned int num_aerr; /* Number of audio buffers in error */ + unsigned int num_asamps; + unsigned int nsync; /* Number of syncs */ + unsigned int nqueue; /* Number of frames queued */ + int play_speed; /* current playback speed */ + int audio; /* whether audio is currently turned on */ + int norm; /* [0-2] playback norm: 0 = PAL, 1 = NTSC, 2 = SECAM */ + double tdiff; /* video/audio time difference (sync debug purposes) */ +} video_playback_stats; + +/* User Control , it keeps track of user's actions */ +typedef struct { + int playback_mode; /* playing plain,sample,tag or pattern */ + int sample_id; /* which sample or tag is beeing played */ + char *filename; + int hackme; + int take_bg; + int direction; /* forward, reverse or pause */ + int looptype; /* loop setting depending on playmode */ + long sample_end; /* end of sample */ + long sample_start; /* start of sample */ + int play_sample; /* playing sample or not */ + int key_effect; /* selected effect */ + int effect_id; /* current effect id */ + int loops; + int next; + int sample_key; /* sample by key */ + int sample_select; /* selected sample */ + int sample_pressed; /* which sample key was pressed */ + int chain_changed; + int use_timer; + int rtc_fd; + int current_link; + int port; + float rtc_delay; + int is_server; + int render_changed; + int input_device; + int geox; + int geoy; + int file_as_sample; + int mouse[4]; + char *osd_extra; +} user_control; + +typedef struct { + int video_output_width; /* width of the SDL playback window in case of software playback */ + int video_output_height; /* height of the SDL playback window in case of software playback */ + int double_factor; /* while playing, duplicate each frame double_factor times */ + int preserve_pathnames; + int audio; /* [0-1] Whether to play audio, 0 = no, 1 = yes */ + int continuous; /* [0-1] 0 = quit when the video has been played, 1 = continue cycle */ + int sync_correction; /* [0-1] Whether to enable sync correction, 0 = no, 1 = yes */ + int sync_skip_frames; /* [0-1] If video is behind audio: 1 = skip video, 0 = insert audio */ + int sync_ins_frames; /* [0-1] If video is ahead of audio: 1 = insert video, 0 = skip audio */ + int auto_deinterlace; + int load_action_file; + editlist *current_edit_list; + editlist *edit_list; /* the playing editlist */ + user_control *uc; /* user control */ + +// v4l_video *vj[4]; /* v4l input */ + void *osc; + VJFrame *plugin_frame; + VJFrameInfo *plugin_frame_info; + VJFrame *effect_frame1; + VJFrame *effect_frame2; + VJFrameInfo *effect_frame_info; + vjp_kf *effect_info; /* effect dependent variables */ +#ifdef HAVE_DIRECTFB + void *dfb; +#endif + //vj_ladspa_instance *vli; + //int vli_enabled; + int video_out; +#ifdef HAVE_GL + void *gl; +#endif +#ifdef HAVE_SDL + vj_sdl **sdl; /* array of SDL windows */ +#endif + vj_yuv *output_stream; /* output stream for dumping video */ + vj_yuv *render_stream; + void *vloopback; // vloopback output + void *video_out_scaler; + int render_now; /* write RGB */ + int render_continous; + char action_file[256]; + char stream_outname[256]; + int stream_outformat; + int stream_enabled; + int last_sample_id; + int last_tag_id; + int nstreams; + int sfd; + vj_server *vjs[4]; /* 0=cmd, 1 = sta, 2 = mcast, 3 = msg */ + int net; + int render_entry; + int render_continue; + video_playback_setup *settings; /* private info - don't touch :-) (type UNKNOWN) */ + int real_fps; + int dump; + int verbose; + int no_bezerk; + int pixel_format; + dummy_t *dummy; + int seek_cache; + int bes_width; + int bes_height; + char *status_what; + char *status_msg; + char *homedir; + void *font; + void *osd; + int use_osd; + sequencer_t *seq; + int no_caching; + void *viewport; + void *composite; + int use_vp; + int use_proj; + int which_vp; + int frontback; + int out_buf; + unsigned long *mask; + unsigned long *cpumask; + int ncpus; + int sz; + int audio_running; + int *rlinks; +} veejay_t; + +typedef struct { + int arg; + int val; + int press; + int increment; + int lock; + int minterpolate; + int interpolate; +} vj_key; + +#endif diff --git a/veejay-server/veejay/vj-misc.c b/veejay-server/veejay/vj-misc.c new file mode 100644 index 00000000..f97f8614 --- /dev/null +++ b/veejay-server/veejay/vj-misc.c @@ -0,0 +1,475 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_JPEG +#include +#endif +#include +#include +#include +#include AVUTIL_INC +#ifdef STRICT_CHECKING +#include +#endif +static unsigned int vj_relative_time = 0; +static unsigned int vj_stamp_ = 0; +static unsigned int vj_get_timer() +{ + struct timeval tv; + gettimeofday(&tv, 0); + return ((tv.tv_sec & 1000000) + tv.tv_usec); +} + +unsigned int vj_stamp() +{ + vj_stamp_ ++; + return vj_stamp_; +} + +void vj_stamp_clear() +{ + vj_stamp_ = 0; +} + +unsigned int vj_get_relative_time() +{ + unsigned int time, relative; + time = vj_get_timer(); + relative = time - vj_relative_time; + vj_relative_time = time; + return relative; +} + +int vj_perform_take_bg(veejay_t *info, uint8_t **src) +{ + VJFrame frame; + char *descr = "Map B to A (substract background mask)"; + veejay_memset(&frame, 0, sizeof(VJFrame)); + frame.data[0] = src[0]; + frame.data[1] = src[1]; + frame.data[2] = src[2]; + frame.width = info->edit_list->video_width; + frame.height = info->edit_list->video_height; + + vj_effect_prepare( &frame, vj_effect_get_by_name( descr ) ); + + return 1; +} + +#ifdef HAVE_JPEG +int vj_perform_screenshot2(veejay_t * info, uint8_t ** src) +{ + FILE *frame; + int res = 0; + uint8_t *jpeg_buff; + VJFrame tmp; + int jpeg_size; + + video_playback_setup *settings = info->settings; + + jpeg_buff = (uint8_t *) malloc( 65535 * 4); + if (!jpeg_buff) + return -1; + + vj_get_yuv_template( &tmp, + info->video_output_width, + info->video_output_height, + info->pixel_format ); + + if( tmp.shift_v == 0 ) + { + tmp.data[0] = (uint8_t*) vj_malloc(sizeof(uint8_t) * tmp.len * 3); + tmp.data[1] = tmp.data[0] + tmp.len; + tmp.data[2] = tmp.data[1] + tmp.len + tmp.uv_len; + + tmp.format = PIX_FMT_YUV420P; + + VJFrame *srci = yuv_yuv_template( src[0],src[1],src[2], info->video_output_width, + info->video_output_height , PIX_FMT_YUV422P); + + yuv_convert_any_ac( srci,&tmp, srci->format, tmp.format ); + + free(srci); + } + else + { + tmp.data[0] = src[0]; + tmp.data[1] = src[1]; + tmp.data[2] = src[2]; + } + + if(info->uc->filename == NULL) + { + info->uc->filename = (char*) malloc(sizeof(char) * 12); + sprintf(info->uc->filename, "%06d.jpg", info->settings->current_frame_num ); + } + frame = fopen(info->uc->filename, "wb"); + + if (frame) + { + jpeg_size = encode_jpeg_raw(jpeg_buff, (65535*4), 100, + settings->dct_method, + info->edit_list->video_inter, 0, + info->video_output_width, + info->video_output_height, + tmp.data[0], + tmp.data[1], tmp.data[2]); + + res = fwrite(jpeg_buff, jpeg_size, 1, frame); + fclose(frame); + if(res) + veejay_msg(VEEJAY_MSG_INFO, "Dumped frame to %s", info->uc->filename); + } + + if (jpeg_buff) + free(jpeg_buff); + if( tmp.shift_v == 0 ) + { + free(tmp.data[0]); + } + + return res; +} + +#endif + +int veejay_create_temp_file(const char *prefix, char *dst) +{ + time_t today_time_; + struct tm *today; + + today_time_ = time(NULL); + today = localtime( &today_time_ ); + /* time: + prefix_01-01-04-hh:mm:ss + put time in filename, on cp a.o. the creation date + will be set to localtime (annoying for users who + copy arround files) + */ + + sprintf(dst, + "%s_%02d%02d%02d_%02d%02d%02d", + prefix, + today->tm_mday, + today->tm_mon, + (today->tm_year%100), + today->tm_hour, + today->tm_min, + today->tm_sec); + + return 1; +} + +void vj_get_rgb_template(VJFrame *src, int w, int h ) +{ + src->width = w; + src->height = h; + src->uv_width = 0; + src->uv_height = 0; + src->format = PIX_FMT_RGB24; + src->len = w * h * 3; + src->uv_len = 0; + src->data[0] = NULL; + src->data[1] = NULL; + src->data[2] = NULL; +} + +void vj_get_yuvgrey_template(VJFrame *src, int w, int h) +{ + src->width = w; + src->uv_width = 0; + src->height = h; + src->format = PIX_FMT_GRAY8; + src->uv_height = 0; + src->shift_v = 0; + src->len = w * h; + src->uv_len = 0; + src->shift_h = 0; + src->data[0] = NULL; + src->data[1] = NULL; + src->data[2] = NULL; +} + +void vj_get_yuv_template(VJFrame *src, int w, int h, int fmt) +{ + src->width = w; + src->uv_width = w >> 1; + src->height = h; + + src->format = get_ffmpeg_pixfmt( fmt ); + + if(fmt == 0||fmt == 2) + { + src->uv_height = h >> 1; + src->shift_v = 1; + } + if(fmt == 1||fmt==3) + { + src->uv_height = h; + src->shift_v = 0; + } + src->len = w * h; + src->uv_len = src->uv_width * src->uv_height; + src->shift_h = 1; + src->data[0] = NULL; + src->data[1] = NULL; + src->data[2] = NULL; + +} + +void vj_get_yuv444_template(VJFrame *src, int w, int h) +{ + src->width = w; + src->uv_width = w; + src->height = h; + src->format = PIX_FMT_YUV444P; + src->uv_height = h; + src->shift_v = 0; + src->len = w * h; + src->uv_len = src->uv_width * src->uv_height; + src->shift_h = 0; + src->data[0] = NULL; + src->data[1] = NULL; + src->data[2] = NULL; +} +int available_diskspace(void) +{ + return 1; +} + +static int possible_veejay_file( const char *file ) +{ + if( strstr( file , ".edl" ) || strstr( file, ".EDL" ) || + strstr( file, ".sl" ) || strstr(file, ".SL" ) || + strstr( file, ".cfg" ) || strstr(file, ".CFG" ) || + strstr( file, ".avi" ) || strstr(file, ".mov" ) ) + return 1; + return 0; +} + +static int try_file( char *path ) +{ + struct stat l; + memset( &l, 0, sizeof( struct stat ) ); + if( lstat(path, &l ) < 0 ) + return 0; + if( S_ISREG(l.st_mode )) + { + if( possible_veejay_file( path ) ) + return 1; + } + return 0; +} + +int verify_working_dir() +{ + char path[1024]; + if(getcwd( path, sizeof(path))== NULL ) + return 0; + struct dirent **files; + int n = scandir( path, &files, NULL, alphasort ); + if( n <= 0 ) + return 0; + + int c = 0; + while( n -- ) { + char tmp[1024]; + snprintf( tmp, sizeof(tmp), "%s/%s", path, files[n]->d_name ); + if( try_file( tmp ) ) + c++; + } + + free(files); + return c; +} + + +int sufficient_space(int max_size, int nframes) +{ +//bogus + return available_diskspace(); +} +#define ZEROPAD 1 /* pad with zero */ +#define SIGN 2 /* unsigned/signed long */ +#define PLUS 4 /* show plus */ +#define SPACE 8 /* space if plus */ +#define LEFT 16 /* left justified */ +#define SPECIAL 32 /* 0x */ +#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ + + +/* the sprintf functions below was stolen and stripped from linux 2.4.33 + * from files: + * linux/lib/vsprintf.c + * asm-i386/div64.h + */ +#ifdef ARCH_X86 +#define do_div(n,base) ({ \ + unsigned long __upper, __low, __high, __mod; \ + asm("":"=a" (__low), "=d" (__high):"A" (n)); \ + __upper = __high; \ + if (__high) { \ + __upper = __high % (base); \ + __high = __high / (base); \ + } \ + asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" (__upper)); \ + asm("":"=A" (n):"a" (__low),"d" (__high)); \ + __mod; \ +}) +#endif +#ifdef ARCH_X86_64 +#define do_div(n,base) \ +({ \ + int _res; \ + _res = ((unsigned long) (n)) % (unsigned) (base); \ + (n) = ((unsigned long) (n)) / (unsigned) (base); \ + _res; \ +}) +#endif + +#if defined(ARCH_X86) || defined(ARCH_X86_64) +static char * kern_number(char * buf, char * end, long long num, int base, int type) +{ + char c,sign=0,tmp[66]; + static const char small_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; + int i=0; + const char *digits = small_digits; + + if (type & SIGN) { + if (num < 0) { + sign = '-'; + num = -num; + } + } + + if (num == 0) + tmp[i++]='0'; + else while (num != 0) + tmp[i++] = digits[do_div(num,base)]; + + if (sign) { + if (buf <= end) + *buf = sign; + ++buf; + } + + while (i-- > 0) { + if (buf <= end) + *buf = tmp[i]; + ++buf; + } + + return buf; +} + +static int kern_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) +{ +#ifdef STRICT_CHECKING + assert( size > 0 ); +#endif + int num,flags,base; + char *str, *end, c; + const char *s; + str = buf; + end = buf + size - 1; + + if( end < buf - 1 ) { + end = ((void*)-1); + size = end - buf + 1; + } + + for( ; *fmt; ++fmt ) { + if( *fmt != '%' ) { + if( str <= end ) + *str = *fmt; + ++str; + continue; + } + + flags = 0; + repeat: + ++ fmt; + switch( *fmt ) { + case ' ': flags |= SPACE; goto repeat; + } + + base = 10; + + switch( *fmt ) { + case 'd': + flags |= SIGN; + break; + } + + num = va_arg(args, unsigned int); + if (flags & SIGN) + num = (signed int) num; + + str = kern_number(str, end, num, base, flags); + } + if( str <= end ) + *str = '\0'; + else if ( size > 0 ) + *end = '\0'; + + return str-buf; +} + +/* + * veejay_sprintf can only deal with format 'd' ... it is used to produce + * status lines. + * + * + */ + +int veejay_sprintf( char *s, size_t size, const char *format, ... ) +{ + va_list arg; + int done; + va_start( arg, format ); + done = kern_vsnprintf( s, size, format, arg ); + va_end(arg); + return done; +} +#else +int veejay_sprintf( char *s, size_t size, const char *format, ... ) +{ + va_list arg; + int done; + va_start(arg,format); + done = vsnprintf( s,size, format, arg ); + return done; +} +#endif diff --git a/veejay-server/veejay/vj-misc.h b/veejay-server/veejay/vj-misc.h new file mode 100644 index 00000000..daa39906 --- /dev/null +++ b/veejay-server/veejay/vj-misc.h @@ -0,0 +1,57 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_MISC_H +#define VJ_MISC_H +#include +#include +#include "vj-lib.h" + +//#define VEEJAY_FILE_LIMIT (1048576 * 1900) +#define VEEJAY_FILE_LIMIT (1048576 * 16000) +int available_diskspace(void); + +int vj_perform_screenshot2(veejay_t * info, uint8_t ** src); + +#ifdef ARCH_X86 +int veejay_sprintf( char *s, size_t size, const char *format, ... ); +#define veejay_snprintf veejay_sprintf +#else +#define veejay_snprintf snprintf +#endif + +unsigned int vj_get_relative_time(void); + +void vj_stamp_clear(); +unsigned int vj_stamp(); + +int vj_perform_take_bg( veejay_t *info, uint8_t **src); + +int veejay_create_temp_file(const char *prefix, char *dst); + +void vj_get_yuv_template(VJFrame *src, int w, int h, int fmt); + +void vj_get_rgb_template(VJFrame *src, int w, int h ); + +void vj_get_yuvgrey_template(VJFrame *src, int w, int h); + +void vj_get_yuv444_template(VJFrame *src, int w, int h); + +int verify_working_dir(); + +#endif diff --git a/veejay-server/veejay/vj-osc.c b/veejay-server/veejay/vj-osc.c new file mode 100644 index 00000000..d649059c --- /dev/null +++ b/veejay-server/veejay/vj-osc.c @@ -0,0 +1,1277 @@ +/* + * Copyright (C) 2002-2004 Niels Elburg + * + * 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. + * + */ + +/* libOMC_dirty + + initial test implementation + use ./sendOSC from ${veejay_package_dir}/libOMC/test + to send OSC messages to port VJ_PORT + 2 (usually 3492) + + + /video/ + /video/playbackward : Play backward + /video/playforward : Play forward + /video/stop : Stop + /video/gotostart : Skip to start + /video/gotoend : Skip to end + /video/speed : Set playback speed + + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static veejay_t *osc_info; + +#include +#include + +typedef struct osc_arg_t { + int a; + int b; + int c; +} osc_arg; + +typedef struct vj_osc_t { + struct OSCAddressSpaceMemoryTuner t; + struct OSCReceiveMemoryTuner rt; + struct OSCContainerQueryResponseInfoStruct cqinfo; + struct OSCMethodQueryResponseInfoStruct ris; + struct sockaddr_in cl_addr; + int sockfd; + int clilen; + fd_set readfds; + OSCcontainer container; + OSCcontainer *leaves; + OSCPacketBuffer packet; + osc_arg *osc_args; +} vj_osc; + + +/* VIMS does the job */ +extern void vj_event_fire_net_event(veejay_t *v, int net_id, char *str_arg, int *args, int arglen, int type); + + +#define OSC_STRING_SIZE 255 +#define OPUSH(p) { _old_p_mode = osc_info->uc->playback_mode; osc_info->uc->playback_mode = p; } +#define OPOP() { osc_info->uc->playback_mode = _old_p_mode; } + + +// forward decl +void vj_osc_cb_play_forward(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_play_backward(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_speed(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_dup(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_skip_to_start(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_skip_to_end(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_frame(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_slow(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_plain_mode( void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra ); +void vj_osc_cb_next_second(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_prev_second(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_next_frame(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_prev_frame(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_new_sample(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_copy_sample(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_select_start(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_select_end(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_del(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_select_sample(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_set_jitter(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_set_start(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_set_end(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_set_dup(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_set_speed(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_set_looptype(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_set_marker(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_clear_marker(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_record_start(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_record_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_record_format(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_his_render(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sample_his_play(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_clear(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_disable_video(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_enable_video(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_del(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_select(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_default(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_preset(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_set(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_set_arg_val(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_channel(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_entry_source(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_manual_fade(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_fade_in(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_fade_out(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_enable(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_disable(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_tag_record_offline_start(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_tag_record_offline_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_tag_record_start(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_tag_record_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_tag_select(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_add(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_chain_toggle_all(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter0(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter1(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter2(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter3(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter4(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter5(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter6(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter7(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_set_parameter8(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_tag_new_v4l(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_tag_new_y4m(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_tag_new_solid(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); + +void vj_osc_cb_tag_new_net(void *context, int arglen, const void *vargs, OSCTimeTag when,NetworkReturnAddressPtr ra ); + +void vj_osc_cb_tag_new_mcast(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra ); + +void vj_osc_cb_load_samplelist(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_save_samplelist(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_output_start_y4m(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_output_stop_y4m(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +#ifdef HAVE_SDL +void vj_osc_cb_resize( void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra ); +void vj_osc_cb_fullscreen(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +#endif +void vj_osc_cb_screenshot(void *context, int arglen, const void *vargs,OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_sampling(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_bezerk(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_verbose(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_el_paste_at(void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_el_copy(void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_el_del(void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_el_crop(void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_el_cut(void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_el_add(void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_el_save(void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_el_load(void *context,int arglen,const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_mcast_start(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); +void vj_osc_cb_mcast_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); + +void vj_osc_set_veejay_t(veejay_t *t); + +void *_vj_osc_time_malloc(int num_bytes) ; +void *_vj_osc_rt_malloc(int num_bytes); +int vj_osc_attach_methods( vj_osc *o ); +int vj_osc_build_cont( vj_osc *o ); + +#ifdef ARCH_X86 +/* convert a big endian 32 bit string to an int for internal use */ +static int toInt(const char* b) { + return (( (int) b[3] ) & 0xff ) + ((((int) b[2]) & 0xff) << 8) + ((((int) b[1]) & 0xff) << 16) + + ((((int) b[0] ) & 0xff) << 24); +} +#else +static int toInt(const char *b) +{ + return (( (int) b[0] ) & 0xff ) + (( (int) b[1] & 0xff ) << 8) + ((( (int) b[2])&0xff) << 16 ) + + ((( (int) b[3] ) & 0xff ) << 24); +} +#endif + +/* parse int arguments */ +static int vj_osc_count_int_arguments(int arglen, const void *vargs) +{ + unsigned int num_args = 0; + // type tags indicated with 0x2c + const char *args = (const char*) vargs; + if(args[0] == 0x2c) + { + int i; + // count occurences of 'i' (0x69) + for ( i = 1; i < arglen ; i ++ ) + { + if( args[i] == 0x69 ) num_args ++; + if( (i+1) < arglen && args[i+1] == 0 ) break; + } + } + else + { + // for non typed tags its much simpler, every integer is stored 32 bits + if(arglen < 4) return 0; + num_args = arglen / 4; + } + return num_args; +} + +static int vj_osc_parse_char_arguments(int arglen, const void *vargs, char *dst) +{ + const char *args = (const char*)vargs; + if(arglen <= 4) return 0; + if(args[1] == 0x73) + { + int b = 0; + for(b = 0; b < arglen; b++) + { + dst[b] = args[b+4]; + if(args[b+4] == 0) + break; + } + return arglen; + } + return 0; +} +/* parse int arguments */ +static int vj_osc_parse_int_arguments(int arglen, const void *vargs, int *arguments) +{ + int num_args = vj_osc_count_int_arguments(arglen,vargs); + int i=0; + int offset = 0; + const char *args = (const char*)vargs; + + if(num_args <= 0) + return 0; + + if( args[0] == 0x2c ) + { // type tag + // figure out padding length of typed tag + unsigned int pad = 4 + ( num_args + 1 ) / 4 * 4; + for ( i = 0; i < num_args ; i ++ ) + { + arguments[i] = toInt( args + pad + offset ); + offset += 4; + } + } + else + { + for(i = 0; i < num_args; i ++) + { + arguments[i] = toInt( args + offset); + offset += 4; + } + + } + + return num_args; /* success */ +} + +/* memory allocation functions of libOMC_dirty (OSC) */ + +void *_vj_osc_time_malloc(int num_bytes) { + return vj_malloc( num_bytes ); +} + +void *_vj_osc_rt_malloc(int num_bytes) { + return vj_malloc( num_bytes ); +} + + +///////////////////////////////////// CALLBACKS FOR OSC //////////////////////////////////////// + +#define NET_F_prefixed(a,b,c,d)\ +{\ +int arguments[16];\ +int num_arg = vj_osc_parse_int_arguments(a,b,arguments+3);\ +if( num_arg != 1 ) {\ + veejay_msg(VEEJAY_MSG_ERROR, "parameter %d accepts only 1 value\n", d );\ + } else {\ +arguments[0] = 0;\ +arguments[1] = -1;\ +arguments[2] = d;\ +vj_event_fire_net_event( osc_info, c, NULL, arguments, 4,3);\ +}\ +}\ + +#define NET_F_prefixed_full(a,b,c)\ +{\ +int arguments[16];\ +int num_arg = vj_osc_parse_int_arguments(a,b,arguments+2);\ +arguments[0] = 0;\ +arguments[1] = -1;\ +vj_event_fire_net_event( osc_info, c, NULL, arguments, num_arg + 2,2);\ +} +#define NET_F_prefixed_single(a,b,c)\ +{\ +int arguments[16];\ +int num_arg = vj_osc_parse_int_arguments(a,b,arguments+1);\ +arguments[0] = 0;\ +vj_event_fire_net_event( osc_info, c, NULL, arguments, num_arg + 1,1);\ +} + +#define NET_F_full_str(a,b,c)\ +{\ +char str[OSC_STRING_SIZE];\ +int __n = vj_osc_parse_char_arguments(a,b,str);\ +str[__n] = '\0';\ +int args[2] = { 0,0};\ +vj_event_fire_net_event(osc_info, c, str,args, __n + 2,2);\ +} + +#define NET_F_str(a,b,c)\ +{\ +char str[OSC_STRING_SIZE];\ +int __n = vj_osc_parse_char_arguments(a,b,str);\ +str[__n] = '\0';\ +vj_event_fire_net_event(osc_info, c, str,NULL, 1,0);\ +} + +#define NET_F_mixed(a,b,c)\ +{\ +char str[OSC_STRING_SIZE];\ +int args[16];\ +int __a = vj_osc_count_int_arguments(a,b);\ +int __n = vj_osc_parse_char_arguments(a,b,str);\ +memset( args,0,16 );\ +str[__n] = '\0';\ +vj_osc_parse_int_arguments( a , b , args );\ +vj_event_fire_net_event(osc_info, c, str,args, __a + 1,0);\ +} +#define NET_F_mixed_str(a,b,c)\ +{\ +char str[OSC_STRING_SIZE];\ +int args[16];\ +int __n = vj_osc_parse_char_arguments(a,b,str);\ +memset( args,0,16 );\ +args[0] = 0;\ +args[1] = 0;\ +str[__n] = '\0';\ +vj_event_fire_net_event(osc_info, c, str,args, 3,2);\ +} + + + + +#define NET_F(a,b,c)\ +{\ +int arguments[16];\ +memset( arguments,0,16 ); \ +int num_arg = vj_osc_parse_int_arguments(a,b,arguments);\ +vj_event_fire_net_event( osc_info, c, NULL,arguments, num_arg,0 );\ +} + +/* DVIMS does some wacky things with arguments, + if 1 argument is missing , a default sample is chosen, + if 2 arguments are missing, a default sample and entry id is chosen. + if there are no arguments no event is fired +*/ + + +void vj_osc_cb_el_add_sample(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_mixed(arglen, vargs, VIMS_EDITLIST_ADD_SAMPLE); +} +void vj_osc_cb_el_load(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_str(arglen, vargs, VIMS_EDITLIST_LOAD); +} +void vj_osc_cb_el_save(void *context, int arglen , const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_mixed_str(arglen, vargs, VIMS_EDITLIST_SAVE); +} +void vj_osc_cb_el_add(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra ) +{ + NET_F_str(arglen, vargs, VIMS_EDITLIST_ADD ); +} +void vj_osc_cb_el_cut(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra ) +{ + NET_F(arglen, vargs, VIMS_EDITLIST_CUT ); +} +void vj_osc_cb_mcast_start(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs, VIMS_VIDEO_MCAST_START ); +} +void vj_osc_cb_mcast_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs, VIMS_VIDEO_MCAST_STOP ); +} + +void vj_osc_cb_el_crop(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra ) +{ + NET_F(arglen, vargs, VIMS_EDITLIST_CROP ); +} +void vj_osc_cb_el_del(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra ) +{ + NET_F(arglen, vargs, VIMS_EDITLIST_DEL ); +} +void vj_osc_cb_el_copy(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_EDITLIST_COPY ); +} +void vj_osc_cb_el_paste_at( void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_EDITLIST_PASTE_AT); +} + +/* /video/playforward */ +void vj_osc_cb_play_forward(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) { + + NET_F(arglen, vargs, VIMS_VIDEO_PLAY_FORWARD); + +} +/* /video/playbackward */ +void vj_osc_cb_play_backward(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) { + + NET_F(arglen, vargs, VIMS_VIDEO_PLAY_BACKWARD); +} + + + +/* /video/stop */ +void vj_osc_cb_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) { + + NET_F(arglen,vargs, VIMS_VIDEO_PLAY_STOP); + +} +/* /video/speed */ +void vj_osc_cb_set_speed(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) { + + NET_F(arglen, vargs, VIMS_VIDEO_SET_SPEED ); +} +/* /sample/dup */ +void vj_osc_cb_set_dup(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) { + + +} +/* /sample /video/gotostart */ +void vj_osc_cb_skip_to_start(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) { + + NET_F(arglen,vargs,VIMS_VIDEO_GOTO_START); +} +/* /sample /video/gotoend */ +void vj_osc_cb_skip_to_end(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) { + + NET_F(arglen,vargs,VIMS_VIDEO_GOTO_END); +} + + +void vj_osc_cb_set_frame(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_VIDEO_SET_FRAME); +} + +void vj_osc_cb_set_slow(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_VIDEO_SET_SLOW); +} + +void vj_osc_cb_plain_mode(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F( arglen,vargs,VIMS_SET_PLAIN_MODE ); +} + +void vj_osc_cb_next_second(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_VIDEO_SKIP_SECOND); +} + +void vj_osc_cb_prev_second(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_VIDEO_PREV_SECOND); +} + +void vj_osc_cb_next_frame(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_VIDEO_SKIP_FRAME); +} + +void vj_osc_cb_prev_frame(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_VIDEO_PREV_FRAME); +} + +void vj_osc_cb_new_sample(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_SAMPLE_NEW); +} + +void vj_osc_cb_copy_sample(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_SAMPLE_COPY ); +} + +void vj_osc_cb_select_start(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_SET_SAMPLE_START); +} + + +void vj_osc_cb_select_end(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_SET_SAMPLE_END); +} + +void vj_osc_cb_sample_del(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_SAMPLE_DEL); +} + + +void vj_osc_cb_select_sample(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_SAMPLE_SELECT); +} +void vj_osc_cb_sample_set_jitter(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen, vargs, VIMS_SAMPLE_UPDATE ); +} +void vj_osc_cb_sample_set_start(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen, vargs, VIMS_SAMPLE_SET_START); +} + +void vj_osc_cb_sample_set_end(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen, vargs, VIMS_SAMPLE_SET_END); +} + +void vj_osc_cb_sample_set_dup(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen,vargs,VIMS_SAMPLE_SET_DUP); +} + +void vj_osc_cb_sample_set_speed(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen, vargs,VIMS_SAMPLE_SET_SPEED); +} + +void vj_osc_cb_sample_set_looptype(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen,vargs,VIMS_SAMPLE_SET_LOOPTYPE); +} + +void vj_osc_cb_sample_set_marker(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen, vargs, VIMS_SAMPLE_SET_MARKER); +} + +void vj_osc_cb_sample_clear_marker(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen, vargs, VIMS_SAMPLE_CLEAR_MARKER); +} + +void vj_osc_cb_sample_record_start(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_SAMPLE_REC_START); +} +void vj_osc_cb_record_format(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_str(arglen, vargs, VIMS_RECORD_DATAFORMAT ); +} +void vj_osc_cb_sample_record_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_SAMPLE_REC_STOP); +} + +void vj_osc_cb_chain_clear( void *ctx, int arglen, const void *vargs, + OSCTimeTag when, NetworkReturnAddressPtr ra ) +{ + NET_F_prefixed_single( arglen, vargs, VIMS_CHAIN_CLEAR ); +} + +void vj_osc_cb_chain_entry_disable_video(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen,vargs,VIMS_CHAIN_ENTRY_SET_VIDEO_OFF); +} + +void vj_osc_cb_chain_entry_enable_video(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen,vargs,VIMS_CHAIN_ENTRY_SET_VIDEO_ON); +} + +void vj_osc_cb_chain_toggle_all(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen,vargs,VIMS_CHAIN_TOGGLE_ALL); +} + +void vj_osc_cb_chain_entry_del(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen,vargs,VIMS_CHAIN_ENTRY_CLEAR); +} + +void vj_osc_cb_chain_entry_select(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_CHAIN_SET_ENTRY); +} + +void vj_osc_cb_chain_entry_default(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen,vargs,VIMS_CHAIN_ENTRY_SET_DEFAULTS); +} + +void vj_osc_cb_chain_entry_preset(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen,vargs,VIMS_CHAIN_ENTRY_SET_PRESET); +} + +void vj_osc_cb_chain_entry_set(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen, vargs, VIMS_CHAIN_ENTRY_SET_EFFECT); +} + +void vj_osc_cb_chain_entry_set_arg_val(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL); +} + + +void vj_osc_cb_chain_entry_channel(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen, vargs, VIMS_CHAIN_ENTRY_SET_CHANNEL); + +} + +void vj_osc_cb_chain_entry_source(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full(arglen, vargs, VIMS_CHAIN_ENTRY_SET_SOURCE); +} + +void vj_osc_cb_chain_manual_fade(void *ctx, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen, vargs, VIMS_CHAIN_MANUAL_FADE ); +} + +void vj_osc_cb_chain_fade_in(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen, vargs, VIMS_CHAIN_FADE_IN); +} + +void vj_osc_cb_chain_fade_out(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen,vargs,VIMS_CHAIN_FADE_OUT); +} + +void vj_osc_cb_chain_enable(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen,vargs,VIMS_CHAIN_ENABLE); +} + +void vj_osc_cb_chain_disable(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_single(arglen,vargs,VIMS_CHAIN_DISABLE); +} + +void vj_osc_cb_tag_record_offline_start(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_STREAM_OFFLINE_REC_START); +} + + +void vj_osc_cb_tag_record_offline_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_STREAM_OFFLINE_REC_STOP); +} + +void vj_osc_cb_tag_record_start(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_STREAM_REC_START); +} + +void vj_osc_cb_tag_record_stop(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_STREAM_REC_STOP); +} + +void vj_osc_cb_tag_select(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_STREAM_SELECT); +} + +void vj_osc_cb_chain_add( void *ctx, int arglen, const void *vargs, + OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_prefixed_full( arglen, vargs, VIMS_CHAIN_ENTRY_SET_EFFECT); +} + +void vj_osc_cb_set_parameter0(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,0); +} + +void vj_osc_cb_set_parameter1(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,1); +} + +void vj_osc_cb_set_parameter2(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,2); +} + +void vj_osc_cb_set_parameter3(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,3); +} + +void vj_osc_cb_set_parameter4(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,4); +} + +void vj_osc_cb_set_parameter5(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,5); +} + +void vj_osc_cb_set_parameter6(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,6); +} + +void vj_osc_cb_set_parameter7(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,7); +} + + +void vj_osc_cb_set_parameter8(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_prefixed(arglen,vargs,VIMS_CHAIN_ENTRY_SET_ARG_VAL,8); +} +void vj_osc_cb_tag_new_v4l(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_STREAM_NEW_V4L); +} +void vj_osc_cb_tag_new_solid(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_STREAM_NEW_COLOR); +} + +void vj_osc_cb_tag_new_net(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_mixed(arglen,vargs,VIMS_STREAM_NEW_UNICAST); +} +void vj_osc_cb_tag_new_mcast(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra ) +{ + NET_F_mixed(arglen,vargs,VIMS_STREAM_NEW_MCAST); +} + +void vj_osc_cb_tag_new_y4m(void *context, int arglen, const void *vargs, OSCTimeTag when, + NetworkReturnAddressPtr ra) +{ + NET_F_str(arglen,vargs,VIMS_STREAM_NEW_Y4M); +} + +void vj_osc_cb_load_samplelist(void *context, int arglen, const void *vargs, + OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_str(arglen,vargs,VIMS_SAMPLE_LOAD_SAMPLELIST); +} + +void vj_osc_cb_save_samplelist(void *context, int arglen, const void *vargs, + OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_str(arglen,vargs,VIMS_SAMPLE_SAVE_SAMPLELIST); +} + +void vj_osc_cb_output_start_y4m(void *context, int arglen, const void *vargs, + OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_str(arglen,vargs,VIMS_OUTPUT_Y4M_START); +} + +void vj_osc_cb_output_stop_y4m(void *context, int arglen, const void *vargs, + OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F(arglen,vargs,VIMS_OUTPUT_Y4M_STOP); +} + +#ifdef HAVE_SDL +void vj_osc_cb_resize(void *context, int arglen, const void *vargs, OSCTimeTag when, +NetworkReturnAddressPtr ra ) +{ + NET_F( arglen, vargs, VIMS_RESIZE_SDL_SCREEN ); +} +void vj_osc_cb_fullscreen(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F( arglen, vargs, VIMS_FULLSCREEN ); +} +#endif +void vj_osc_cb_screenshot( void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F_mixed_str(arglen, vargs, VIMS_SCREENSHOT); +} +void vj_osc_cb_sampling( void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F(arglen, vargs, VIMS_SAMPLE_MODE ); +} +void vj_osc_cb_verbose( void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra) +{ + NET_F( arglen, vargs, VIMS_DEBUG_LEVEL ) +} +void vj_osc_cb_bezerk( void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra ) +{ + NET_F( arglen, vargs, VIMS_BEZERK ); +} +/* initialize the pointer to veejay_t */ + +void vj_osc_set_veejay_t(veejay_t *info) { + osc_info = info; +} + +void vj_osc_free(void *d) +{ + if(!d) return; + vj_osc *c = (vj_osc*) d; + void *addr = OSCPacketBufferGetClientAddr(c->packet ); + if(addr) + free(addr); + if(c->osc_args) free(c->osc_args); + if(c->leaves) free(c->leaves); + if(c) free(c); + c = NULL; +} + + + +static struct +{ + const char *descr; + const char *name; + void (*cb)(void *ctx, int len, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra); + int leave; +} osc_methods[] = +{ + { "play foward", "play", vj_osc_cb_play_forward, 0 }, + { "play reverse", "reverse", vj_osc_cb_play_backward, 0 }, + { "pause", "pause", vj_osc_cb_stop, 0 }, + { "speed ( < 0 = reverse, > 0 = forward)", + "speed", vj_osc_cb_set_speed, 0 }, + { "slow", "slow", vj_osc_cb_set_dup, 0 }, + { "goto start", "goto_start", vj_osc_cb_skip_to_start, 0 }, + { "goto end", "goto_end", vj_osc_cb_skip_to_end, 0 }, + { "set frame ", "set_frame", vj_osc_cb_set_frame, 0 }, + { "set previous frame", "prev_frame", vj_osc_cb_prev_frame, 0 }, + { "set next frame", "next_frame", vj_osc_cb_next_frame, 0 }, + { "set next second", "next_second", vj_osc_cb_next_second, 0 }, + { "set previous second", "prev_second", vj_osc_cb_prev_second, 0 }, + { "play plain video", "mode", vj_osc_cb_plain_mode, 0 }, + { "create new sample ", + "new", vj_osc_cb_new_sample, 1 }, + { "copy sample as new sample", + "copy", vj_osc_cb_copy_sample, 1 }, + { "delete sample ", "del", vj_osc_cb_sample_del, 1 }, + { "select and play sample ", + "select", vj_osc_cb_select_sample, 1 }, + { "relative start/end position update ", + "jitter", vj_osc_cb_sample_set_jitter, 13 }, + { "set sample new starting position ", + "start", vj_osc_cb_sample_set_start, 13 }, + { "set sample new ending position ", + "end", vj_osc_cb_sample_set_end, 13 }, + { "sample set looptype <0 = none, 1 = normal, 2 = bounce>", + "looptype", vj_osc_cb_sample_set_looptype, 13 }, + { "sample set playback speed ", + "speed", vj_osc_cb_sample_set_speed, 13 }, + { "sample set marker ", + "marker", vj_osc_cb_sample_set_marker, 13 }, + { "sample set frame duplicate ", + "slow", vj_osc_cb_sample_set_dup, 13 }, + { "sample delete marker", + "nomarker", vj_osc_cb_sample_clear_marker, 13 }, + { "sample start recording <0=entire sample, N=num frames> <0=dont play 1=play>", + "start", vj_osc_cb_sample_record_start, 14 }, + { "sample stop recording", "stop", vj_osc_cb_sample_record_stop, 14 }, + { "sample set recorder format (mjpeg,mpeg4,dv,divx,yv12,yv16)", + "format", vj_osc_cb_record_format, 14 }, + { "stream select and play ", + "select", vj_osc_cb_tag_select, 2 }, + { "new video4linux input stream ", + "v4l", vj_osc_cb_tag_new_v4l, 19 }, + { "new solid color stream ", + "solid", vj_osc_cb_tag_new_solid, 19 }, + { "new yuv4mpeg input stream ", + "y4m", vj_osc_cb_tag_new_y4m, 19 }, + { "new multicast input stream
", + "mcast", vj_osc_cb_tag_new_mcast, 19 }, + { "new peer-to-peer input stream ", + "net", vj_osc_cb_tag_new_net, 19 }, + + { "hidden record from stream ", + "o_start", vj_osc_cb_tag_record_offline_start, 16 }, + { "stop hidden recording ", "o_stop", vj_osc_cb_tag_record_offline_stop, 16 }, + { "start stream recorder ", + "start", vj_osc_cb_tag_record_start, 16 }, + { "stop stream recorder ", "stop", vj_osc_cb_tag_record_stop, 16 }, + { "set stream recorder format (mjpeg,divx,dv,yv12,yv16,mpeg4)", + "format", vj_osc_cb_record_format, 16 }, + { "Effect chain clear", "reset", vj_osc_cb_chain_clear, 4 }, + { "Fade in effect chain ", + "fade_in" , vj_osc_cb_chain_fade_in, 4 }, + { "Fade out effect chain ", + "fade_out", vj_osc_cb_chain_fade_out, 4 }, + { "Effect chain enabled", "enable", vj_osc_cb_chain_enable, 4 }, + { "Effect chain disabled", "disable", vj_osc_cb_chain_disable, 4 }, + { "Manual Fader (0=A 255=B", + "opacity", vj_osc_cb_chain_manual_fade, 4 }, + { "All Effect chains on/off (1/0)", + "global_fx", vj_osc_cb_chain_toggle_all, 4 }, + { "Disable effect chain entry ", + "disable", vj_osc_cb_chain_entry_disable_video,9 }, + { "Enable effect chain entry ", + "enable", vj_osc_cb_chain_entry_enable_video, 9 }, + { "Clear effect chain entry ", + "clear", vj_osc_cb_chain_entry_del, 9 }, + { "Select effect chain entry ", + "select", vj_osc_cb_chain_entry_select, 9 }, + { "Set effect default values on chain entry ", + "defaults", vj_osc_cb_chain_entry_default, 9 }, + { "Preset an effect on chain entry", + "preset", vj_osc_cb_chain_entry_preset, 9 }, +// { "/entry/set", "set", vj_osc_cb_chain_entry_set, 9 }, + { "Select channel for mixing effect on entry ", + "channel", vj_osc_cb_chain_entry_channel, 9 }, + { "Select source (0=sample,1=stream) for mixing effect on entry ", + "source", vj_osc_cb_chain_entry_source, 9 }, + + { "Set argument to value for effect on entry ", + "set", vj_osc_cb_chain_entry_set_arg_val, 8 }, + + + { "Samplelist load ", "load", vj_osc_cb_load_samplelist, 6 }, + { "Samplelist save ", "save", vj_osc_cb_save_samplelist, 6 }, + { "Editlist add filename (as new sample)","add_sample", vj_osc_cb_el_add_sample, 7 }, + { "EditList paste frames from buf at frame ", + "paste_at", vj_osc_cb_el_paste_at, 7 }, + { "EditList copy frames to to buffer", + "copy", vj_osc_cb_el_copy, 7 }, + { "EditList delete frames to ", + "del", vj_osc_cb_el_del, 7 }, + { "EditList crop frames 0 - - end", + "crop", vj_osc_cb_el_crop, 7 }, + { "EditList cut frames to into buffer", + "cut", vj_osc_cb_el_cut, 7 }, + { "EditList add file ", + "add", vj_osc_cb_el_add, 7 }, + { "EditList save ", + "save", vj_osc_cb_el_save, 7 }, + { "EditList load ", + "load", vj_osc_cb_el_load, 7 }, +#ifdef HAVE_SDL + { "Resize SDL video window ", + "resize", vj_osc_cb_resize, 10 }, + { "Toggle SDL video window fullscreen/windowed", + "fullscreen", vj_osc_cb_fullscreen, 10 }, +#endif + { "Configure sampling mode (linear=0 or triangle=1)", + "sampling", vj_osc_cb_sampling, 11 }, + { "Toggle verbose output mode", + "verbose", vj_osc_cb_verbose, 11 }, + { "Toggle bezerk mode", "bezerk", vj_osc_cb_bezerk, 11 }, + + { "Stop mcast frame sender", "mcaststop", vj_osc_cb_mcast_stop, 5 }, + { "Start mcast frame sender", "mcaststart", vj_osc_cb_mcast_start, 5 }, + + { NULL, NULL, NULL, 0 }, +}; + +static struct +{ + const char *comment; + const char *name; + int leave; + int att; + int it; +} osc_cont[] = +{ + { "/video/", "video", 0, -1,0 }, + { "/sample/", "sample", 1, -1,0 }, + { "/stream/", "stream", 2, -1,0 }, + { "/record/", "record", 3, -1,0 }, + { "/chain/" , "chain", 4, -1,0 }, + { "/video/set", "set", 12, 0,0 }, + { "/sample/set", "set", 13, 1,0 }, + { "/sample/rec", "rec", 14, 1,0 }, +// { "/sample/chain", "chain", 15, 1,0 }, +// { "/sample/entry", "entry", 18, 1,0 }, + { "/stream/rec", "rec", 16, 2,0 }, +// { "/stream/chain", "chain", 17, 2,0 }, +// { "/stream/entry", "entry", 18, 2,0 }, + { "/stream/new", "new", 19, 2,0 }, + { "/out/", "out", 5, -1,0 }, + { "/cl", "cl", 6, -1,0 }, + { "/el", "el", 7, -1,0 }, + { "/arg", "arg", 8, -1,0 }, + { "/entry", "entry", 9, -1,0 }, +#ifdef HAVE_SDL + { "/output", "output", 10, -1,0 }, +#endif + { "/config", "config", 11, -1,0 }, +// { "", "%d", 20, 9 ,20 }, +// { "", "%d", 40, 8 ,10 }, + { NULL, NULL, 0, -1,0 }, + +}; + + +int vj_osc_build_cont( vj_osc *o ) +{ + /* Create containers /video , /sample, /chain and /tag */ + int i; + for( i = 0; osc_cont[i].name != NULL ; i ++ ) + { + if ( osc_cont[i].it == 0 ) + { + o->cqinfo.comment = osc_cont[i].comment; + + // add a container to a leave + if ( ( o->leaves[ osc_cont[i].leave ] = + OSCNewContainer( osc_cont[i].name, + (osc_cont[i].att == -1 ? o->container : o->leaves[ osc_cont[i].att ] ), + &(o->cqinfo) ) ) == 0 ) + { + if(osc_cont[i].att == - 1) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot create container %d (%s) ", + i, osc_cont[i].name ); + return 0; + } + else + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot add branch %s to container %d)", + osc_cont[i].name, osc_cont[i].att ); + return 0; + } + } + } + else + { + int n = osc_cont[i].it; + int j; + int base = osc_cont[i].leave; + char name[50]; + char comment[50]; + + for ( j = 0; j < n ; j ++ ) + { + sprintf(name, "N%d", j); + sprintf(comment, "<%d>", j); + veejay_msg(VEEJAY_MSG_ERROR, "Try cont.%d '%s', %d %d ",j, name, + base + j, base ); + o->cqinfo.comment = comment; + if (( o->leaves[ base + j ] = OSCNewContainer( name, + o->leaves[ osc_cont[i].att ] , + &(o->cqinfo) ) ) == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot auto numerate container %s ", + osc_cont[i].name ); + return 0; + + } + } + } + } + return 1; +} + +int vj_osc_attach_methods( vj_osc *o ) +{ + int i; + for( i = 0; osc_methods[i].name != NULL ; i ++ ) + { + o->ris.description = osc_methods[i].descr; + if( o->leaves[ osc_methods[i].leave ] ) + { + OSCNewMethod( osc_methods[i].name, + o->leaves[ osc_methods[i].leave ], + osc_methods[i].cb , + &(o->osc_args[0]), + &(o->ris)); + } + } + return 1; +} + + + +/* initialization, setup a UDP socket and invoke OSC magic */ +void* vj_osc_allocate(int port_id) { + void *res; + char tmp[200]; + vj_osc *o = (vj_osc*)vj_malloc(sizeof(vj_osc)); + o->osc_args = (osc_arg*)vj_malloc(50 * sizeof(*o->osc_args)); + o->rt.InitTimeMemoryAllocator = _vj_osc_time_malloc; + o->rt.RealTimeMemoryAllocator = _vj_osc_rt_malloc; + o->rt.receiveBufferSize = 1024; + o->rt.numReceiveBuffers = 100; + o->rt.numQueuedObjects = 100; + o->rt.numCallbackListNodes = 200; + o->leaves = (OSCcontainer*) vj_malloc(sizeof(OSCcontainer) * 100); + o->t.initNumContainers = 100; + o->t.initNumMethods = 200; + o->t.InitTimeMemoryAllocator = _vj_osc_time_malloc; + o->t.RealTimeMemoryAllocator = _vj_osc_rt_malloc; + + if(OSCInitReceive( &(o->rt))==FALSE) { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot initialize OSC receiver"); + return NULL; + } + o->packet = OSCAllocPacketBuffer(); + + if(NetworkStartUDPServer( o->packet, port_id) != TRUE) { + veejay_msg(VEEJAY_MSG_ERROR, "(VIMS) Cannot start OSC/UDP server at port %d ", + port_id); + } + + if( IsMultiCast( tmp ) ) + { + veejay_msg(VEEJAY_MSG_INFO, "Multicast address %s, port %d", + tmp, port_id ); + } + + /* Top level container / */ + o->container = OSCInitAddressSpace(&(o->t)); + + OSCInitContainerQueryResponseInfo( &(o->cqinfo) ); + o->cqinfo.comment = "Video commands"; + + if( !vj_osc_build_cont( o )) + return NULL; + + OSCInitMethodQueryResponseInfo( &(o->ris)); + if( !vj_osc_attach_methods( o )) + return NULL; + + res =(void*) o; + return res; +} + + +void vj_osc_dump() +{ + + veejay_msg(VEEJAY_MSG_INFO,"Veejay OSC"); + veejay_msg(VEEJAY_MSG_INFO,"When using strings, set it *always* as the first argument"); + OSCPrintWholeAddressSpace(); + + +} + +/* dump the OSC address space to screen */ +int vj_osc_setup_addr_space(void *d) { + char addr[100]; + vj_osc *o = (vj_osc*) d; + //struct OSCMethodQueryResponseInfoStruct qri; + + if(OSCGetAddressString( addr, 100, o->container ) == FALSE) { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot get address space of OSC"); + return -1; + } + veejay_msg(VEEJAY_MSG_DEBUG, "Address of top level container [%s]",addr); + return 0; +} + + +/* get a packet */ +int vj_osc_get_packet(void *d) { + //OSCTimeTag tag; + struct timeval tv; + tv.tv_sec=0; + tv.tv_usec = 0; + vj_osc *o = (vj_osc*) d; + /* see if there is something to read , this is effectivly NetworkPacketWaiting */ + // if(ioctl( o->sockfd, FIONREAD, &bytes,0 ) == -1) return 0; + // if(bytes==0) return 0; + if(NetworkPacketWaiting(o->packet)==TRUE) { + /* yes, receive packet from UDP */ + if(NetworkReceivePacket(o->packet) == TRUE) { + /* OSC must accept this packet (OSC will auto-invoke it, see source !) */ + OSCAcceptPacket(o->packet); + /* Is this really productive ? */ + OSCBeProductiveWhileWaiting(); + /* tell caller we had 1 packet */ + return 1; + } + } + return 0; +} + diff --git a/veejay-server/veejay/vj-perform.c b/veejay-server/veejay/vj-perform.c new file mode 100644 index 00000000..9854fdcd --- /dev/null +++ b/veejay-server/veejay/vj-perform.c @@ -0,0 +1,2939 @@ +/* + * veejay + * + * Copyright (C) 2000-2007 Niels Elburg + * + * 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. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_FREETYPE +#include +#endif +#define RECORDERS 1 +#ifdef HAVE_JACK +#include +#endif +#include +#include +#include +#ifdef STRICT_CHECKING +#include +#endif + +#define PERFORM_AUDIO_SIZE 16384 +static int simple_frame_duplicator =0; + +static int performer_framelen = 0; + +typedef struct { + uint8_t *Y; + uint8_t *Cb; + uint8_t *Cr; + uint8_t *alpha; + int ssm; + char padding[12]; +} ycbcr_frame; + +typedef struct { + int fader_active; + int fx_status; + int enc_active; + int type; + int active; + char padding[12]; +} varcache_t; + +#define RUP8(num)(((num)+8)&~8) + +static varcache_t pvar_; +static void *lzo_; +static void *effect_sampler = NULL; +static void *crop_sampler = NULL; +static VJFrame *crop_frame = NULL; +static ycbcr_frame **video_output_buffer = NULL; /* scaled video output */ +static int video_output_buffer_convert = 0; +static ycbcr_frame **frame_buffer; /* chain */ +static ycbcr_frame **primary_buffer; /* normal */ +#define CACHE_TOP 0 +#define CACHE 1 +#define CACHE_SIZE (SAMPLE_MAX_EFFECTS+CACHE) +static int cached_tag_frames[CACHE_SIZE]; /* cache a frame into the buffer only once */ +static int cached_sample_frames[CACHE_SIZE]; +static int frame_info[64][SAMPLE_MAX_EFFECTS]; /* array holding frame lengths */ +static uint8_t *audio_buffer[SAMPLE_MAX_EFFECTS]; /* the audio buffer */ +static uint8_t *lin_audio_buffer_ = NULL; +static uint8_t *top_audio_buffer = NULL; +static uint8_t *resample_audio_buffer = NULL; +static uint8_t *audio_render_buffer = NULL; +static uint8_t *down_sample_buffer = NULL; +static uint8_t *temp_buffer[4]; +static uint8_t *socket_buffer = NULL; +static ycbcr_frame *record_buffer = NULL; // needed for recording invisible streams +static VJFrame *helper_frame = NULL; +static int vj_perform_record_buffer_init(); +static void vj_perform_record_buffer_free(); +#ifdef HAVE_JACK +static int jack_rate_ = 0; +static ReSampleContext *resample_context[(MAX_SPEED+1)]; +static ReSampleContext *downsample_context[(MAX_SPEED+1)]; +static ReSampleContext *resample_jack = NULL; +#endif + +#define MLIMIT(var, low, high) \ +if((var) < (low)) { var = (low); } \ +if((var) > (high)) { var = (high); } + +//forward + +static int vj_perform_get_frame_fx(veejay_t *info, int s1, long nframe, uint8_t *img[3]); +static void vj_perform_pre_chain(veejay_t *info, VJFrame *frame); +static void vj_perform_post_chain_sample(veejay_t *info, VJFrame *frame); +static void vj_perform_post_chain_tag(veejay_t *info, VJFrame *frame); +static void seq_play_sample( veejay_t *info, int n); +static void vj_perform_plain_fill_buffer(veejay_t * info); +static int vj_perform_tag_fill_buffer(veejay_t * info); +static void vj_perform_clear_cache(void); +static int vj_perform_increase_tag_frame(veejay_t * info, long num); +static int vj_perform_increase_plain_frame(veejay_t * info, long num); +static void vj_perform_apply_secundary_tag(veejay_t * info, int sample_id,int type, int chain_entry); +static void vj_perform_apply_secundary(veejay_t * info, int sample_id,int type, int chain_entry); +static int vj_perform_tag_complete_buffers(veejay_t * info, int *h); +static int vj_perform_increase_sample_frame(veejay_t * info, long num); +static int vj_perform_sample_complete_buffers(veejay_t * info, int *h); +static void vj_perform_use_cached_ycbcr_frame(veejay_t *info, int centry, int chain_entry, int width, int height); +static int vj_perform_apply_first(veejay_t *info, vjp_kf *todo_info, VJFrame **frames, VJFrameInfo *frameinfo, int e, int c, int n_frames ); +static int vj_perform_render_sample_frame(veejay_t *info, uint8_t *frame[4], int sample); +static int vj_perform_render_tag_frame(veejay_t *info, uint8_t *frame[4]); +static int vj_perform_record_commit_single(veejay_t *info); +static int vj_perform_get_subframe(veejay_t * info, int sub_sample,int chain_entyr ); +static int vj_perform_get_subframe_tag(veejay_t * info, int sub_sample, int chain_entry ); +static void vj_perform_reverse_audio_frame(veejay_t * info, int len, uint8_t *buf ); + +static int vj_perform_tag_is_cached(int chain_entry, int tag_id) +{ + int c; + int res = -1; + for(c=CACHE_SIZE; c >= 0 ; c--) + { + if(chain_entry != c && cached_tag_frames[c] == tag_id) + { + res = c; + break; + } + } + + return res; +} +static int vj_perform_sample_is_cached(int nframe, int chain_entry) +{ + int c; + int res = -1; + for(c=CACHE_SIZE; c >= 0 ; c--) + { + if(chain_entry != c && cached_sample_frames[c] == nframe) + { + res = c; + break; + } + } + return res; +} + +void vj_perform_clear_frame_info() +{ + int c = 0; + for (c = 0; c < SAMPLE_MAX_EFFECTS; c++) { + frame_info[0][c] = 0; + } +} + + +static void vj_perform_clear_cache() +{ + veejay_memset(cached_tag_frames, 0 , sizeof(cached_tag_frames)); + veejay_memset(cached_sample_frames, 0, sizeof(cached_sample_frames)); +} + +static int vj_perform_increase_tag_frame(veejay_t * info, long num) +{ + video_playback_setup *settings = info->settings; + settings->current_frame_num += num; + + if (settings->current_frame_num < settings->min_frame_num) { + settings->current_frame_num = settings->min_frame_num; + if (settings->current_playback_speed < 0) { + settings->current_playback_speed = + +(settings->current_playback_speed); + } + return -1; + } + if (settings->current_frame_num >= settings->max_frame_num) { + settings->current_frame_num = settings->min_frame_num; + return -1; + } + return 0; +} + +int vj_perform_get_dups() +{ + return simple_frame_duplicator; +} + +static int vj_perform_increase_plain_frame(veejay_t * info, long num) +{ + video_playback_setup *settings = info->settings; + + simple_frame_duplicator++; + + if (simple_frame_duplicator >= info->sfd) { + settings->current_frame_num += num; + simple_frame_duplicator = 0; + } + + + if (settings->current_frame_num < settings->min_frame_num) { + settings->current_frame_num = settings->min_frame_num; + + return 0; + } + if (settings->current_frame_num >= settings->max_frame_num) { + if(!info->continuous) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Reached end of video - Ending veejay session ... "); + veejay_change_state(info, LAVPLAY_STATE_STOP); + } + settings->current_frame_num = settings->max_frame_num; + return 0; + } + return 0; +} + + +static int vj_perform_valid_sequence( veejay_t *info ) +{ + int cur = info->seq->current + 1; + int cycle = 0; + while( info->seq->samples[ cur ] == 0 ) + { + cur ++; + if( cur >= MAX_SEQUENCES && !cycle) + { + cur = 0; + cycle = 1; + } + else if ( cur >= MAX_SEQUENCES && cycle ) + { + veejay_msg(VEEJAY_MSG_ERROR, "No valid sequence to play. Sequence Play disabled"); + info->seq->active = 0; + return -1; + } + } + return cur; +} + +static int vj_perform_try_sequence( veejay_t *info ) +{ + if(! info->seq->active ) + return 0; + + if( sample_get_loop_dec( info->uc->sample_id ) >= 1 ) + { + int n = vj_perform_valid_sequence( info ); + if( n >= 0 ) + { + sample_set_loop_dec( info->uc->sample_id, 0 ); //reset loop + + veejay_msg(0, "Sequence play selects sample %d", info->seq->samples[info->seq->current]); + + seq_play_sample(info, n ); + return 1; + } + return 0; + } + + return 0; +} + +static void seq_play_sample( veejay_t *info, int n) +{ + + info->seq->current = n; + + int id = info->seq->samples[n]; + + if(id) + { + sample_chain_free( info->uc->sample_id ); + sample_chain_malloc( id ); + } + + int which_sample = 0; + int offset = sample_get_first_mix_offset( info->uc->sample_id, &which_sample, info->seq->samples[info->seq->current] ); + + veejay_set_sample_f( info, info->seq->samples[ info->seq->current ] , offset ); +} + +static int vj_perform_increase_sample_frame(veejay_t * info, long num) +{ + video_playback_setup *settings = + (video_playback_setup *) info->settings; + int start,end,looptype,speed; + int ret_val = 1; + + if(num == 0 ) return 1; + + if(sample_get_short_info(info->uc->sample_id,&start,&end,&looptype,&speed)!=0) return -1; + + settings->current_playback_speed = speed; + + int cur_sfd = sample_get_framedups( info->uc->sample_id ); + int max_sfd = sample_get_framedup( info->uc->sample_id ); + + cur_sfd ++; + + if( max_sfd > 0 ) { + if( cur_sfd >= max_sfd ) + { + // settings->current_frame_num += num; + cur_sfd = 0; + } + sample_set_framedups( info->uc->sample_id , cur_sfd); + if( cur_sfd != 0 ) + return 1; + } + settings->current_frame_num += num; + + if (speed >= 0) { /* forward play */ + + if(looptype==3) + { + int range = end - start; + int num = start + ((int) ( (double)range * rand()/(RAND_MAX))); + settings->current_frame_num = num; + } + + if (settings->current_frame_num > end || settings->current_frame_num < start) { + switch (looptype) { + case 2: + info->uc->direction = -1; + if(!vj_perform_try_sequence( info ) ) + { + sample_apply_loop_dec( info->uc->sample_id, info->edit_list->video_fps); + veejay_set_frame(info, end); + veejay_set_speed(info, (-1 * speed)); + } + break; + case 1: + if(! info->seq->active ) + veejay_set_frame(info, start); + else + { + int n = vj_perform_valid_sequence( info ); + if( n >= 0 ) + { + seq_play_sample( info, n ); + } + else + veejay_set_frame(info,start); + } + break; + case 3: + veejay_set_frame(info, start); + break; + default: + veejay_set_frame(info, end); + veejay_set_speed(info, 0); + } + } + } else { /* reverse play */ + if( looptype == 3 ) + { + int range = end - start; + int num = end - ((int) ( (double)range*rand()/(RAND_MAX))); + settings->current_frame_num = num; + } + + if (settings->current_frame_num < start || settings->current_frame_num >= end ) { + switch (looptype) { + case 2: + info->uc->direction = 1; + if(!vj_perform_try_sequence(info) ) + { + sample_apply_loop_dec( info->uc->sample_id, info->edit_list->video_fps); + veejay_set_frame(info, start); + veejay_set_speed(info, (-1 * speed)); + } + break; + case 1: + if(!info->seq->active) + veejay_set_frame(info, end); + else + { + int n = vj_perform_valid_sequence( info ); + if( n >= 0 ) + { + seq_play_sample(info, n ); + } + else + veejay_set_frame(info,end); + } + break; + case 3: + veejay_set_frame(info,end); + break; + default: + veejay_set_frame(info, start); + veejay_set_speed(info, 0); + } + } + } + sample_update_offset( info->uc->sample_id, settings->current_frame_num ); + vj_perform_rand_update( info ); + + return ret_val; +} + +static int vj_perform_alloc_row(veejay_t *info, int c, int frame_len) +{ + uint8_t *buf = vj_malloc(sizeof(uint8_t) * RUP8(helper_frame->len * 3)); +#ifdef STRICT_CHECKING + assert ( buf != NULL ); +#endif + if(!buf) + return 0; + + frame_buffer[c]->Y = buf; + frame_buffer[c]->Cb = frame_buffer[c]->Y + RUP8(frame_len); + frame_buffer[c]->Cr = frame_buffer[c]->Cb + RUP8(frame_len); + + frame_buffer[c]->ssm = info->effect_frame1->ssm; + + return 1; +} + +static void vj_perform_free_row(int c) +{ + if(frame_buffer[c]->Y) + free( frame_buffer[c]->Y ); + frame_buffer[c]->Y = NULL; + frame_buffer[c]->Cb = NULL; + frame_buffer[c]->Cr = NULL; + frame_buffer[c]->ssm = 0; + cached_sample_frames[c+1] = 0; + cached_tag_frames[c+1] = 0; +} + +#define vj_perform_row_used(c) ( frame_buffer[c]->Y == NULL ? 0 : 1 ) + +static int vj_perform_verify_rows(veejay_t *info ) +{ + if( pvar_.fx_status == 0 ) + return 0; + + int c,v,has_rows = 0; + const int w = info->edit_list->video_width; + const int h = info->edit_list->video_height; + + for(c=0; c < SAMPLE_MAX_EFFECTS; c++) + { + v = (info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE ? + sample_get_effect_any(info->uc->sample_id,c) : vj_tag_get_effect_any(info->uc->sample_id,c)); + if( v > 0) + { + if(!vj_perform_row_used(c)) + { + if ( !vj_perform_alloc_row( info, c, w*h) ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to allocate memory for FX entry %d",c); + veejay_change_state( info, LAVPLAY_STATE_STOP ); + return -1; + } + } + has_rows ++; + } + else + { + if(vj_perform_row_used(c)) + vj_perform_free_row(c); + } + } + return has_rows; +} + + +static int vj_perform_record_buffer_init() +{ + if(record_buffer->Cb==NULL) + record_buffer->Cb = (uint8_t*)vj_malloc(sizeof(uint8_t) * RUP8(helper_frame->uv_len) ); + if(!record_buffer->Cb) return 0; + if(record_buffer->Cr==NULL) + record_buffer->Cr = (uint8_t*)vj_malloc(sizeof(uint8_t) * RUP8(helper_frame->uv_len) ); + if(!record_buffer->Cr) return 0; + + if(record_buffer->Y == NULL) + record_buffer->Y = (uint8_t*)vj_malloc(sizeof(uint8_t) * RUP8(helper_frame->len)); + if(!record_buffer->Y) return 0; + + veejay_memset( record_buffer->Y , 16, helper_frame->len ); + veejay_memset( record_buffer->Cb, 128, helper_frame->uv_len ); + veejay_memset( record_buffer->Cr, 128, helper_frame->uv_len ); + + return 1; +} + +static void vj_perform_record_buffer_free() +{ + + if(record_buffer->Y) free(record_buffer->Y); + record_buffer->Y = NULL; + if(record_buffer->Cb) free(record_buffer->Cb); + record_buffer->Cb = NULL; + if(record_buffer->Cr) free(record_buffer->Cr); + record_buffer->Cr = NULL; + if(record_buffer) + free(record_buffer); +} +static char ppm_path[1024]; + +int vj_perform_init(veejay_t * info) +{ + const int w = info->edit_list->video_width; + const int h = info->edit_list->video_height; + const int frame_len = ((w * h)/7) * 8; + int c; + // buffer used to store encoded frames (for plain and sample mode) + performer_framelen = frame_len *2; + frame_buffer = (ycbcr_frame **) vj_malloc(sizeof(ycbcr_frame*) * SAMPLE_MAX_EFFECTS); + if(!frame_buffer) return 0; + + record_buffer = (ycbcr_frame*) vj_malloc(sizeof(ycbcr_frame) ); + if(!record_buffer) return 0; + record_buffer->Y = NULL; + record_buffer->Cb = NULL; + record_buffer->Cr = NULL; + + primary_buffer = + (ycbcr_frame **) vj_malloc(sizeof(ycbcr_frame **) * 8); + if(!primary_buffer) return 0; + for( c = 0; c < 6; c ++ ) + { + primary_buffer[c] = (ycbcr_frame*) vj_calloc(sizeof(ycbcr_frame)); + primary_buffer[c]->Y = (uint8_t*) vj_malloc( sizeof(uint8_t) * RUP8((frame_len+w) * 3) ); +#ifdef STRICT_CHECKING + assert( primary_buffer[c] != NULL ); + assert( primary_buffer[c]->Y != NULL ); +#endif + primary_buffer[c]->Cb = primary_buffer[c]->Y + (frame_len + w); + primary_buffer[c]->Cr = primary_buffer[c]->Cb + (frame_len +w); + + veejay_memset( primary_buffer[c]->Y, 0, (frame_len+w)); + veejay_memset( primary_buffer[c]->Cb,128, (frame_len+w)); + veejay_memset( primary_buffer[c]->Cr,128, (frame_len+w)); + } + + + primary_buffer[6] = (ycbcr_frame*) vj_calloc(sizeof(ycbcr_frame)); + primary_buffer[6]->Y = (uint8_t*) vj_calloc( sizeof(uint8_t) * RUP8(512 * 512 * 3)); + primary_buffer[7] = (ycbcr_frame*) vj_calloc(sizeof(ycbcr_frame)); + primary_buffer[7]->Y = (uint8_t*) vj_calloc( sizeof(uint8_t) * RUP8(w * h * 3)); + primary_buffer[7]->Cb = primary_buffer[7]->Y + ( RUP8(w*h)); + primary_buffer[7]->Cr = primary_buffer[7]->Cb + ( RUP8(w*h)); + + + video_output_buffer_convert = 0; + video_output_buffer = + (ycbcr_frame**) vj_malloc(sizeof(ycbcr_frame*) * 2 ); + if(!video_output_buffer) + return 0; + + veejay_memset( ppm_path,0,sizeof(ppm_path)); + + for(c=0; c < 2; c ++ ) + { + video_output_buffer[c] = (ycbcr_frame*) vj_malloc(sizeof(ycbcr_frame)); + video_output_buffer[c]->Y = NULL; + video_output_buffer[c]->Cb = NULL; + video_output_buffer[c]->Cr = NULL; + } + + sample_record_init(frame_len); + vj_tag_record_init(w,h); + // to render fading of effect chain: + temp_buffer[0] = (uint8_t*)vj_malloc(sizeof(uint8_t) * RUP8(frame_len) ); + if(!temp_buffer[0]) return 0; + veejay_memset( temp_buffer[0], 16, frame_len ); + temp_buffer[1] = (uint8_t*)vj_malloc(sizeof(uint8_t) * RUP8(frame_len) ); + if(!temp_buffer[1]) return 0; + veejay_memset( temp_buffer[1], 128, frame_len ); + temp_buffer[2] = (uint8_t*)vj_malloc(sizeof(uint8_t) * RUP8(frame_len) ); + if(!temp_buffer[2]) return 0; + veejay_memset( temp_buffer[2], 128, frame_len ); + // to render fading of effect chain: + socket_buffer = (uint8_t*)vj_malloc(sizeof(uint8_t) * frame_len * 4 ); // large enough !! + veejay_memset( socket_buffer, 16, frame_len * 4 ); + // to render fading of effect chain: + + /* allocate space for frame_buffer, the place we render effects in */ + for (c = 0; c < SAMPLE_MAX_EFFECTS; c++) { + frame_buffer[c] = (ycbcr_frame *) vj_malloc(sizeof(ycbcr_frame)); + if(!frame_buffer[c]) return 0; + veejay_memset( frame_buffer[c],0, sizeof(ycbcr_frame)); + } + // clear the cache information + vj_perform_clear_cache(); + veejay_memset( frame_info[0],0,SAMPLE_MAX_EFFECTS); + + helper_frame = (VJFrame*) vj_malloc(sizeof(VJFrame)); + veejay_memcpy(helper_frame, info->effect_frame1, sizeof(VJFrame)); + + vj_perform_record_buffer_init(); + + effect_sampler = subsample_init( w ); + +#ifdef USE_GDK_PIXBUF + vj_picture_init( &(info->settings->sws_templ)); +#endif + + lzo_ = lzo_new(); + + int vp = 0; int frontback = 0; + int pvp = 0; + + veejay_memset( &pvar_, 0, sizeof( varcache_t)); + + return 1; +} + + +static void vj_perform_close_audio() { + int i; + + if( lin_audio_buffer_ ) + free(lin_audio_buffer_ ); + veejay_memset( audio_buffer, 0, sizeof(uint8_t*) * SAMPLE_MAX_EFFECTS ); + + if(top_audio_buffer) free(top_audio_buffer); + if(resample_audio_buffer) free(resample_audio_buffer); + if(audio_render_buffer) free( audio_render_buffer ); + if(down_sample_buffer) free( down_sample_buffer ); +#ifdef HAVE_JACK + for(i=0; i <= MAX_SPEED; i ++) + { + if(resample_context[i]) + audio_resample_close( resample_context[i] ); + if(downsample_context[i]) + audio_resample_close( downsample_context[i]); + } + + if(resample_jack) + audio_resample_close(resample_jack); +#endif + veejay_msg(VEEJAY_MSG_INFO, "Stopped Audio playback task"); +} + +int vj_perform_init_audio(veejay_t * info) +{ + // video_playback_setup *settings = info->settings; +#ifndef HAVE_JACK + return 0; +#else + int i; + + if(!info->audio ) + { + veejay_msg(0,"No audio found"); + return 0; + } + /* top audio frame */ + top_audio_buffer = + (uint8_t *) vj_calloc(sizeof(uint8_t) * 8 * PERFORM_AUDIO_SIZE); + if(!top_audio_buffer) + return 0; + + down_sample_buffer = (uint8_t*) vj_calloc(sizeof(uint8_t) * PERFORM_AUDIO_SIZE * MAX_SPEED *4 ); + if(!down_sample_buffer) + return 0; + audio_render_buffer = (uint8_t*) vj_calloc(sizeof(uint8_t) * PERFORM_AUDIO_SIZE * MAX_SPEED * 4 ); + if(!audio_render_buffer) + return 0; + + resample_audio_buffer = (uint8_t*) vj_calloc(sizeof(uint8_t) * PERFORM_AUDIO_SIZE * 2); + if(!resample_audio_buffer) + return 0; + + /* chained audio */ + lin_audio_buffer_ = (uint8_t*) vj_calloc( sizeof(uint8_t) * PERFORM_AUDIO_SIZE * SAMPLE_MAX_EFFECTS ); + if(!lin_audio_buffer_) + return 0; + + for (i = 0; i < SAMPLE_MAX_EFFECTS; i++) { + audio_buffer[i] = lin_audio_buffer_ + (PERFORM_AUDIO_SIZE * i); + } + + for( i = 0; i <= MAX_SPEED; i ++ ) + { + int out_rate = (info->edit_list->audio_rate * (i+2)); + int down_rate = (info->edit_list->audio_rate / (i+2)); + + resample_context[i] = audio_resample_init( + info->edit_list->audio_chans, + info->edit_list->audio_chans, + info->edit_list->audio_rate, + out_rate); + if(!resample_context[i]) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cannot initialize audio upsampler for speed %d", i); + return 0; + } + downsample_context[i] = audio_resample_init( + info->edit_list->audio_chans, + info->edit_list->audio_chans, + info->edit_list->audio_rate, + down_rate ); + if(!downsample_context[i]) + { + veejay_msg(VEEJAY_MSG_WARNING, "Cannot initialize audio downsampler for dup %d",i); + return 0; + } + + veejay_msg(VEEJAY_MSG_DEBUG, "Resampler %d: Speed %d resamples audio to %d Hz, Slow %d to %d Hz ", i,i+2,out_rate, + i+2, down_rate ); + } + return 1; +#endif +} + +void vj_perform_free(veejay_t * info) +{ + int fblen = SAMPLE_MAX_EFFECTS; // mjpg buf + int c; + + sample_record_free(); + + if(info->edit_list->has_audio) + vj_perform_close_audio(); + + for (c = 0; c < fblen; c++) { + if(vj_perform_row_used(c)) + vj_perform_free_row(c); + if(frame_buffer[c]) + { + if(frame_buffer[c]->Y) free(frame_buffer[c]->Y); + if(frame_buffer[c]->Cb) free(frame_buffer[c]->Cb); + if(frame_buffer[c]->Cr) free(frame_buffer[c]->Cr); + free(frame_buffer[c]); + } + } + + if(frame_buffer) free(frame_buffer); + + for( c = 0;c < 8; c++ ) + { + if(primary_buffer[c]->Y) free(primary_buffer[c]->Y ); + free(primary_buffer[c] ); + } + if(primary_buffer) free(primary_buffer); + + if(socket_buffer) free(socket_buffer); + if(crop_frame) + { + if(crop_frame->data[0]) free(crop_frame->data[0]); + if(crop_frame->data[1]) free(crop_frame->data[1]); + if(crop_frame->data[2]) free(crop_frame->data[2]); + } + if(crop_sampler) + subsample_free(crop_sampler); + if(effect_sampler) + subsample_free(effect_sampler); + + +// if( info->viewport ) +// viewport_destroy( info->viewport ); + + for(c=0; c < 3; c ++) + { + if(temp_buffer[c]) free(temp_buffer[c]); + } + vj_perform_record_buffer_free(); + + for( c = 0 ; c < 2 ; c ++ ) + { + if(video_output_buffer[c]->Y ) + free(video_output_buffer[c]->Y); + if(video_output_buffer[c]->Cb ) + free(video_output_buffer[c]->Cb ); + if(video_output_buffer[c]->Cr ) + free(video_output_buffer[c]->Cr ); + free(video_output_buffer[c]); + } + free(video_output_buffer); + free(helper_frame); + + if(lzo_) + lzo_free(lzo_); +} + +int vj_perform_audio_start(veejay_t * info) +{ + int res; + editlist *el = info->current_edit_list; + + if (el->has_audio) + { +#ifdef HAVE_JACK + vj_jack_initialize(); + + res = vj_jack_init( info->current_edit_list ); + if( res <= 0) + { + info->audio=NO_AUDIO; + veejay_msg(VEEJAY_MSG_WARNING, + "Audio playback disabled (unable to connect to jack)"); + return 0; + } + + jack_rate_ = vj_jack_rate(); + + if ( res == 2 ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Jack plays at %d Hz, resampling audio from %d -> %d",jack_rate_,el->audio_rate,jack_rate_); + resample_jack = audio_resample_init( el->audio_chans,el->audio_chans, jack_rate_, el->audio_rate); + + if(!resample_jack) + { + resample_jack = NULL; + veejay_msg(VEEJAY_MSG_WARNING, "Cannot initialize resampler for %d -> %d audio rate conversion ", + el->audio_rate,jack_rate_); + return 0; + } + + return 1; + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Jack is running the same samplerate as Veejay"); + } + return 1; +#else + veejay_msg(VEEJAY_MSG_WARNING, "Jack support not compiled in (no audio)"); + return 0; +#endif + } + return 0; +} + +void vj_perform_audio_stop(veejay_t * info) +{ + if (info->edit_list->has_audio) { +#ifdef HAVE_JACK + vj_jack_stop(); + if(resample_jack) + { + audio_resample_close(resample_jack); + resample_jack = NULL; + } +#endif + info->audio = NO_AUDIO; + } +} + +void vj_perform_get_primary_frame(veejay_t * info, uint8_t ** frame) +{ + frame[0] = primary_buffer[info->out_buf]->Y; + frame[1] = primary_buffer[info->out_buf]->Cb; + frame[2] = primary_buffer[info->out_buf]->Cr; +} + +uint8_t *vj_perform_get_a_work_buffer( ) +{ + return primary_buffer[4]->Y; +} +void vj_perform_get_space_buffer( uint8_t *d[4] ) +{ + d[0] = primary_buffer[5]->Y; + d[1] = primary_buffer[5]->Cb; + d[2] = primary_buffer[5]->Cr; +} +uint8_t *vj_perform_get_preview_buffer() +{ + return primary_buffer[6]->Y; +} + +void vj_perform_get_output_frame( uint8_t **frame ) +{ + frame[0] = video_output_buffer[0]->Y; + frame[1] = video_output_buffer[0]->Cb; + frame[2] = video_output_buffer[0]->Cr; +} +void vj_perform_get_crop_dimensions(veejay_t *info, int *w, int *h) +{ + *w = info->edit_list->video_width - info->settings->viewport.left - info->settings->viewport.right; + *h = info->edit_list->video_height - info->settings->viewport.top - info->settings->viewport.bottom; + +} +int vj_perform_get_cropped_frame( veejay_t *info, uint8_t **frame, int crop ) +{ + if(crop) + { + VJFrame src; + veejay_memset( &src, 0, sizeof(VJFrame)); + + vj_get_yuv_template( &src, + info->edit_list->video_width, + info->edit_list->video_height, + info->pixel_format ); + + src.data[0] = primary_buffer[0]->Y; + src.data[1] = primary_buffer[0]->Cb; + src.data[2] = primary_buffer[0]->Cr; + + // yuv crop needs supersampled data + chroma_supersample( info->settings->sample_mode,effect_sampler, src.data, src.width,src.height ); + yuv_crop( &src, crop_frame, &(info->settings->viewport)); + chroma_subsample( info->settings->sample_mode,crop_sampler, crop_frame->data, crop_frame->width, crop_frame->height ); + } + + frame[0] = crop_frame->data[0]; + frame[1] = crop_frame->data[1]; + frame[2] = crop_frame->data[2]; + + return 1; +} + +int vj_perform_init_cropped_output_frame(veejay_t *info, VJFrame *src, int *dw, int *dh ) +{ + video_playback_setup *settings = info->settings; + if( crop_frame ) + free(crop_frame); + crop_frame = yuv_allocate_crop_image( src, &(settings->viewport) ); + if(!crop_frame) + return 0; + + *dw = crop_frame->width; + *dh = crop_frame->height; + + crop_sampler = subsample_init( *dw ); + + /* enough space to supersample*/ + int i; + for( i = 0; i < 3; i ++ ) + { + crop_frame->data[i] = (uint8_t*) vj_malloc(sizeof(uint8_t) * RUP8(crop_frame->len) ); + if(!crop_frame->data[i]) + return 0; + } + return 1; +} +void vj_perform_init_output_frame( veejay_t *info, uint8_t **frame, + int dst_w, int dst_h ) +{ + int i; + for(i = 0; i < 2; i ++ ) + { + if( video_output_buffer[i]->Y != NULL ) + free(video_output_buffer[i]->Y ); + if( video_output_buffer[i]->Cb != NULL ) + free(video_output_buffer[i]->Cb ); + if( video_output_buffer[i]->Cr != NULL ) + free(video_output_buffer[i]->Cr ); + + video_output_buffer[i]->Y = (uint8_t*) + vj_malloc(sizeof(uint8_t) * RUP8( dst_w * dst_h) ); + veejay_memset( video_output_buffer[i]->Y, 16, dst_w * dst_h ); + video_output_buffer[i]->Cb = (uint8_t*) + vj_malloc(sizeof(uint8_t) * RUP8( dst_w * dst_h) ); + veejay_memset( video_output_buffer[i]->Cb, 128, dst_w * dst_h ); + video_output_buffer[i]->Cr = (uint8_t*) + vj_malloc(sizeof(uint8_t) * RUP8(dst_w * dst_h) ); + veejay_memset( video_output_buffer[i]->Cr, 128, dst_w * dst_h ); + + } + frame[0] = video_output_buffer[0]->Y; + frame[1] = video_output_buffer[0]->Cb; + frame[2] = video_output_buffer[0]->Cr; + +} + +static void long2str(unsigned char *dst, int32_t n) +{ + dst[0] = (n )&0xff; + dst[1] = (n>> 8)&0xff; + dst[2] = (n>>16)&0xff; + dst[3] = (n>>24)&0xff; +} + +static int vj_perform_compress_frame( veejay_t *info, uint8_t *dst) +{ + const int len = info->effect_frame1->width * info->effect_frame1->height; + const int uv_len = info->effect_frame1->uv_width * info->effect_frame1->uv_height; + uint8_t *dstI = dst + (3*4); + unsigned int size1=0,size2=0,size3=0; + int i = lzo_compress( lzo_ , primary_buffer[info->out_buf]->Y, dstI, &size1, len ); + if( i == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to compress Y plane"); +#ifdef STRICT_CHECKING + assert(0); +#endif + return 0; + } + dstI += size1; + + i = lzo_compress( lzo_, primary_buffer[info->out_buf]->Cb, dstI, &size2, uv_len ); + if( i == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to compress U plane"); +#ifdef STRICT_CHECKING + assert(0); +#endif + return 0; + } + dstI += size2; + + i = lzo_compress( lzo_, primary_buffer[info->out_buf]->Cr, dstI, &size3, uv_len ); + if( i == 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to compress V plane"); +#ifdef STRICT_CHECKING + assert(0); +#endif + return 0; + } + + long2str( dst,size1); + long2str( dst+4, size2 ); + long2str( dst+8, size3 ); + + return (size1+size2+size3+12); +} + +int vj_perform_send_primary_frame_s2(veejay_t *info, int mcast, int to_link_id) +{ + int hlen =0; + unsigned char info_line[32]; + + int compr_len = 0; + if( !mcast ) + { + uint8_t *sbuf = socket_buffer + (sizeof(uint8_t) * 21 ); + compr_len = vj_perform_compress_frame(info,sbuf); +#ifdef STRICT_CHECKING + assert( compr_len > 0 ); +#endif + /* peer to peer connection */ + sprintf(info_line, "%04d %04d %1d %08d ", info->effect_frame1->width, + info->effect_frame1->height, info->effect_frame1->format, + compr_len ); + hlen = strlen(info_line ); +#ifdef STRICT_CHECKING + assert( hlen == 21 ); +#endif + veejay_memcpy( socket_buffer, info_line, sizeof(uint8_t) * 21 ); + } + else + { + compr_len = vj_perform_compress_frame(info,socket_buffer ); +#ifdef STRICT_CHECKING + assert(compr_len > 0 ); +#endif + } + + int id = (mcast ? 2: 3); + int __socket_len = hlen + compr_len; + + if(!mcast) + { + int i; + for( i = 0; i < 8 ; i++ ) { + if( info->rlinks[i] >= 0 ) { + to_link_id = info->rlinks[i]; + if(vj_server_send_frame( info->vjs[id], to_link_id, socket_buffer, __socket_len, + info->effect_frame1, info->real_fps )<=0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Error sending frame to remote"); + _vj_server_del_client( info->vjs[id], to_link_id ); + } + info->rlinks[i] = -1; + } + } + + } + else + { + if(vj_server_send_frame( info->vjs[id], to_link_id, socket_buffer, __socket_len, + info->effect_frame1, info->real_fps )<=0) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Error sending multicast frame."); + } + } + return 1; +} + +void vj_perform_get_output_frame_420p( veejay_t *info, uint8_t **frame, int w, int h ) +{ + if(info->pixel_format == FMT_422 || info->pixel_format == FMT_422F) + { + frame[0] = video_output_buffer[1]->Y; + frame[1] = video_output_buffer[1]->Cb; + frame[2] = video_output_buffer[1]->Cr; + + if( video_output_buffer_convert == 0 ) + { + uint8_t *src_frame[3]; + src_frame[0] = video_output_buffer[0]->Y; + src_frame[1] = video_output_buffer[0]->Cb; + src_frame[2] = video_output_buffer[0]->Cr; + + VJFrame *srci = yuv_yuv_template( video_output_buffer[0]->Y, video_output_buffer[0]->Cb, + video_output_buffer[0]->Cr, w, h, + get_ffmpeg_pixfmt(info->pixel_format)); + VJFrame *dsti = yuv_yuv_template( video_output_buffer[1]->Y, video_output_buffer[1]->Cb, + video_output_buffer[1]->Cr, w, h, + PIX_FMT_YUV420P ); + + yuv_convert_any_ac( srci,dsti, srci->format, dsti->format ); + free(srci); + free(dsti); + + video_output_buffer_convert = 1; + return; + } + } + else + { + frame[0] = video_output_buffer[0]->Y; + frame[1] = video_output_buffer[0]->Cb; + frame[2] = video_output_buffer[0]->Cr; + } +} + +int vj_perform_is_ready(veejay_t *info) +{ + if( info->settings->zoom ) + { + if( video_output_buffer[0]->Y == NULL ) return 0; + if( video_output_buffer[0]->Cb == NULL ) return 0; + if( video_output_buffer[0]->Cr == NULL ) return 0; + } + return 1; +} + +void vj_perform_unlock_primary_frame( void ) +{ + video_output_buffer_convert = 0; + // call this every cycle +} + +void vj_perform_get_primary_frame_420p(veejay_t *info, uint8_t **frame ) +{ + editlist *el = info->edit_list; + if(info->pixel_format==FMT_422 || info->pixel_format == FMT_422F) + { + uint8_t *pframe[3]; + pframe[0] = primary_buffer[info->out_buf]->Y; + pframe[1] = primary_buffer[info->out_buf]->Cb; + pframe[2] = primary_buffer[info->out_buf]->Cr; + + VJFrame *srci = yuv_yuv_template( pframe[0],pframe[1],pframe[2],el->video_width,el->video_height, + get_ffmpeg_pixfmt( info->pixel_format)); + VJFrame *dsti = yuv_yuv_template( temp_buffer[0],temp_buffer[1], temp_buffer[2],el->video_width, + el->video_height, (info->pixel_format == FMT_420 ? PIX_FMT_YUV420P: + PIX_FMT_YUVJ420P) ); + + yuv_convert_any_ac(srci,dsti, srci->format,dsti->format ); + + free(srci); + free(dsti); + + frame[0] = temp_buffer[0]; + frame[1] = temp_buffer[1]; + frame[2] = temp_buffer[2]; + } + else + { + frame[0] = primary_buffer[info->out_buf]->Y; + frame[1] = primary_buffer[info->out_buf]->Cb; + frame[2] = primary_buffer[info->out_buf]->Cr; + } +} + +static int vj_perform_apply_first(veejay_t *info, vjp_kf *todo_info, + VJFrame **frames, VJFrameInfo *frameinfo, int e , int c, int n_frame) +{ + int n_a = vj_effect_get_num_params(e); + int entry = e; + int err = 0; + int args[16]; + + veejay_memset( args, 0 , sizeof(args) ); + + if( info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG ) + { + if(!vj_tag_get_all_effect_args(todo_info->ref, c, args, n_a, n_frame )) + return 1; + } + else + { + if(!sample_get_all_effect_arg( todo_info->ref, c, args, n_a, n_frame)) + return 1; + } + + err = vj_effect_apply( frames, frameinfo, todo_info,entry, args ); + + return err; +} + +static void vj_perform_reverse_audio_frame(veejay_t * info, int len, + uint8_t * buf) +{ + int i; + int bps = info->edit_list->audio_bps; + uint8_t sample[bps]; + int x=len*bps; + for( i = 0; i < x/2 ; i += bps ) { + veejay_memcpy(sample,buf+i,bps); + veejay_memcpy(buf+i ,buf+(x-i-bps),bps); + veejay_memcpy(buf+(x-i-bps), sample,bps); + } +} + + +static void vj_perform_use_cached_ycbcr_frame(veejay_t *info, int centry, int chain_entry, int width, int height) +{ + int len1 = (width*height); + + if( centry == 0 ) + { + int len2 = ( info->effect_frame1->ssm == 1 ? len1 : + info->effect_frame1->uv_len ); + + veejay_memcpy(frame_buffer[chain_entry]->Y,primary_buffer[0]->Y, len1 ); + veejay_memcpy(frame_buffer[chain_entry]->Cb,primary_buffer[0]->Cb,len2 ); + veejay_memcpy(frame_buffer[chain_entry]->Cr,primary_buffer[0]->Cr,len2); + + frame_buffer[chain_entry]->ssm = info->effect_frame1->ssm; + } + else + { + int c = centry - 1; + int len2 = ( frame_buffer[c]->ssm == 1 ? len1 : info->effect_frame2->uv_len ); + + veejay_memcpy( frame_buffer[chain_entry]->Y,frame_buffer[c]->Y, len1); + veejay_memcpy( frame_buffer[chain_entry]->Cb,frame_buffer[c]->Cb, len2); + veejay_memcpy( frame_buffer[chain_entry]->Cr,frame_buffer[c]->Cr, len2); + + frame_buffer[chain_entry]->ssm = frame_buffer[c]->ssm; + } +} + + + +static int vj_perform_get_subframe(veejay_t * info, int sub_sample, + int chain_entry) + +{ + video_playback_setup *settings = (video_playback_setup*) info->settings; + int a = info->uc->sample_id; + int b = sub_sample; + //int trim_val = sample_get_trimmer(a, chain_entry); + + int sample_a[4]; + int sample_b[4]; + + int offset = sample_get_offset(a, chain_entry); + int len_a, len_b; + if(sample_get_short_info(b,&sample_b[0],&sample_b[1],&sample_b[2],&sample_b[3])!=0) return -1; + + if(sample_get_short_info(a,&sample_a[0],&sample_a[1],&sample_a[2],&sample_a[3])!=0) return -1; + + len_a = sample_a[1] - sample_a[0]; + len_b = sample_b[1] - sample_b[0]; + + /* offset + start >= end */ + if(sample_b[3] >= 0) /* sub sample plays forward */ + { + if( settings->current_playback_speed != 0) + offset += sample_b[3]; /* speed */ + + if( sample_b[2] == 3 ) + offset = sample_b[0] + ( (int) ( (double) len_b * rand()/RAND_MAX) ); + + /* offset reached sample end */ + if( offset > len_b ) + { + if(sample_b[2] == 2) /* sample is in pingpong loop */ + { + /* then set speed in reverse and set offset to sample end */ + //offset = sample_b[1] - sample_b[0]; + offset = 0; + sample_set_speed( b, (-1 * sample_b[3]) ); + sample_set_offset(a,chain_entry,offset); + return sample_b[1]; + } + if(sample_b[2] == 1) + { + offset = 0; + } + if(sample_b[2] == 0) + { + offset = 0; + sample_set_speed(b,0); + } + if(sample_b[2] == 3 ) + offset = 0; + } + sample_set_offset(a,chain_entry,offset); + return (sample_b[0] + offset); + } + else + { /* sub sample plays reverse */ + if(settings->current_playback_speed != 0) + offset += sample_b[3]; /* speed */ + + if( sample_b[2] == 3 ) + offset = sample_b[0] + ( (int) ( (double) len_b * rand()/RAND_MAX)); + + if ( offset < -(len_b) ) + { + /* reached start position */ + if(sample_b[2] == 2) + { + //offset = sample_b[1] - sample_b[0]; + offset = 0; + sample_set_speed( b, (-1 * sample_b[3])); + sample_set_offset(a,chain_entry,offset); + return sample_b[0]; + } + if(sample_b[2] == 1) + { + //offset = sample_b[1] - sample_b[0]; + offset = 0; + } + if(sample_b[2]== 0) + { + sample_set_speed(b , 0); + offset = 0; + } + if(sample_b[2] == 3 ) + offset = 0; + } + sample_set_offset(a, chain_entry, offset); + + return (sample_b[1] + offset); + } + return 0; +} + + +static int vj_perform_get_subframe_tag(veejay_t * info, int sub_sample, + int chain_entry) + +{ + video_playback_setup *settings = (video_playback_setup*) info->settings; + //int trim_val = sample_get_trimmer(a, chain_entry); + + int sample[4]; + + int offset = sample_get_offset(sub_sample, chain_entry); + int nset = offset; + int len; + + if(sample_get_short_info(sub_sample,&sample[0],&sample[1],&sample[2],&sample[3])!=0) return -1; + + len = sample[1] - sample[0]; + + /* offset + start >= end */ + if(sample[3] >= 0) /* sub sample plays forward */ + { + if( settings->current_playback_speed != 0) + offset += sample[3]; /* speed */ + + if( sample[2] == 3 ) + offset = sample[0] + ( (int) ( (double) len * rand()/RAND_MAX)); + + /* offset reached sample end */ + if( offset > len ) + { + if(sample[2] == 2) /* sample is in pingpong loop */ + { + /* then set speed in reverse and set offset to sample end */ + //offset = sample_b[1] - sample_b[0]; + offset = 0; + sample_set_speed( sub_sample, (-1 * sample[3]) ); + sample_set_offset( sub_sample,chain_entry,offset); + return sample[1]; + } + if(sample[2] == 1) + { + offset = 0; + } + if(sample[2] == 0) + { + offset = 0; + sample_set_speed( sub_sample,0); + } + if(sample[2] == 3 ) + offset = 0; + } + + sample_set_offset(sub_sample,chain_entry,offset); + return (sample[0] + nset); + } + else + { /* sub sample plays reverse */ + if(settings->current_playback_speed != 0) + offset += sample[3]; /* speed */ + if( sample[2] == 3 ) + offset = sample[0] + ( (int) ( (double) len * rand()/RAND_MAX)); + + if ( offset < -(len) ) + { + /* reached start position */ + if(sample[2] == 2) + { + //offset = sample_b[1] - sample_b[0]; + offset = 0; + sample_set_speed( sub_sample, (-1 * sample[3])); + sample_set_offset( sub_sample,chain_entry,offset); + return sample[0]; + } + if(sample[2] == 1) + { + //offset = sample_b[1] - sample_b[0]; + offset = 0; + } + if(sample[2]== 0) + { + sample_set_speed( sub_sample , 0); + offset = 0; + } + if(sample[2] == 3 ) + offset = 0; + } + sample_set_offset(sub_sample, chain_entry, offset); + + return (sample[1] + nset); + } + return 0; +} + +#define ARRAY_LEN(x) ((int)(sizeof(x)/sizeof((x)[0]))) +int vj_perform_fill_audio_buffers(veejay_t * info, uint8_t *audio_buf, uint8_t *temporary_buffer, int *sampled_down) +{ +#ifdef HAVE_JACK + video_playback_setup *settings = info->settings; + int len = 0; + int speed = sample_get_speed(info->uc->sample_id); + int bps = info->edit_list->audio_bps; + int pred_len = (info->edit_list->audio_rate / info->edit_list->video_fps ); + int rs = 0; + int n_samples = 0; + + int cur_sfd = sample_get_framedups( info->uc->sample_id ); + int max_sfd = sample_get_framedup( info->uc->sample_id ); + + + if( cur_sfd <= 0 ) + { + if (speed > 1 || speed < -1) + { + int a_len = 0; + int n_frames = abs(speed); + uint8_t *tmp = temporary_buffer; + uint8_t *sambuf = tmp; + long i,start,end; + + if( n_frames >= MAX_SPEED ) + n_frames = MAX_SPEED - 1; + + if( speed < 0 ) + { + start = settings->current_frame_num - n_frames; + end = settings->current_frame_num; + } + else + { + start = settings->current_frame_num; + end = settings->current_frame_num + n_frames; + } + + for ( i = start; i < end; i ++ ) + { + a_len = vj_el_get_audio_frame(info->edit_list,i, tmp); + if( a_len <= 0 ) + { + n_samples += pred_len; + veejay_memset( tmp, 0, pred_len * bps ); + tmp += (pred_len*bps); + } + else + { + n_samples += a_len; + tmp += (a_len* bps ); + rs = 1; + } + } +#ifdef STRICT_CHECKING + assert( resample_context[ n_frames ] != NULL ); +#endif + if( rs ) + { + if( speed < 0 ) + vj_perform_reverse_audio_frame(info, n_samples, sambuf ); + n_samples = audio_resample( resample_context[n_frames-2], audio_buf, sambuf, n_samples ); + } + } else if( speed == 0 ) { + n_samples = len = pred_len; + veejay_memset( audio_buf, 0, pred_len * bps ); + } else { + n_samples = vj_el_get_audio_frame( info->edit_list, settings->current_frame_num, audio_buf ); + if(n_samples <= 0 ) + { + veejay_memset( audio_buf,0, pred_len * bps ); + n_samples = pred_len; + } + else + { + rs = 1; + } + if( speed < 0 && rs) + vj_perform_reverse_audio_frame(info,n_samples,audio_buf); + } + + if( n_samples < pred_len ) + { + veejay_memset( audio_buf + (n_samples * bps ) , 0, (pred_len- n_samples) * bps ); + n_samples = pred_len; + } + + } + + if( cur_sfd <= max_sfd && max_sfd > 1) + { + int val = *sampled_down; + if( cur_sfd == 0 ) + { + // @ resample buffer + n_samples = audio_resample( downsample_context[ max_sfd-2 ], + down_sample_buffer, audio_buf, n_samples ); + *sampled_down = n_samples / max_sfd; + val = n_samples / max_sfd; + n_samples = pred_len; + } + else + { + n_samples = pred_len; + } + veejay_memcpy( audio_buf, down_sample_buffer + (cur_sfd * val *bps ), val * bps ); + } + + return n_samples; +#else + return 0; +#endif +} + +static void vj_perform_apply_secundary_tag(veejay_t * info, int sample_id, + int type, int chain_entry ) +{ /* second sample */ + int width = info->edit_list->video_width; + int height = info->edit_list->video_height; + int error = 1; + int nframe; + int len = 0; + int centry = -1; +#ifdef STRICT_CHECKING + assert( frame_buffer[chain_entry]->Cb != frame_buffer[chain_entry]->Cr ); +#endif + uint8_t *fb[3] = { + frame_buffer[chain_entry]->Y, + frame_buffer[chain_entry]->Cb, + frame_buffer[chain_entry]->Cr }; + + switch (type) + { + case VJ_TAG_TYPE_YUV4MPEG: /* playing from stream */ + case VJ_TAG_TYPE_V4L: + case VJ_TAG_TYPE_VLOOPBACK: + case VJ_TAG_TYPE_AVFORMAT: + case VJ_TAG_TYPE_NET: + case VJ_TAG_TYPE_MCAST: + case VJ_TAG_TYPE_PICTURE: + case VJ_TAG_TYPE_COLOR: + + centry = vj_perform_tag_is_cached(chain_entry, sample_id); + + if (centry == -1) + { + if(! vj_tag_get_active( sample_id ) ) + { + // active stream if neccesaary + vj_tag_set_active(sample_id, 1 ); + } + + if (vj_tag_get_active(sample_id) == 1 ) + { + int res = vj_tag_get_frame(sample_id, fb, audio_buffer[chain_entry]); + if(res==1) + error = 0; + else + vj_tag_set_active(sample_id, 0); + frame_buffer[chain_entry]->ssm = 0; + } + } + else + { + vj_perform_use_cached_ycbcr_frame(info, centry, chain_entry, width,height); + error = 0; + } + if(!error) + cached_tag_frames[1 + chain_entry ] = sample_id; + break; + + case VJ_TAG_TYPE_NONE: + nframe = vj_perform_get_subframe_tag(info, sample_id, chain_entry); // get exact frame number to decode + centry = vj_perform_sample_is_cached(sample_id, chain_entry); + if(centry == -1 || info->no_caching) + { + len = vj_perform_get_frame_fx( info, sample_id, nframe, fb ); + if(len > 0) + error = 0; + frame_buffer[chain_entry]->ssm = 0; + } + else + { + vj_perform_use_cached_ycbcr_frame( info, centry, chain_entry, width,height ); + cached_sample_frames[ 1 + chain_entry ] = sample_id; + error = 0; + } + if(!error) + cached_sample_frames[chain_entry+1] = sample_id; + + break; + + } +} + +static int vj_perform_get_frame_( veejay_t *info, int s1, long nframe, uint8_t *img[3] ) +{ + editlist *el = ( s1 ? sample_get_editlist(s1) : info->current_edit_list); + int max_sfd = (s1 ? sample_get_framedup( s1 ) : info->sfd ); + int cur_sfd = (s1 ? sample_get_framedups(s1 ) : simple_frame_duplicator ); + if( cur_sfd <= max_sfd && max_sfd > 1 ) + { + uint8_t *p0_buffer[3] = { + primary_buffer[7]->Y, + primary_buffer[7]->Cb, + primary_buffer[7]->Cr }; + + uint8_t *p1_buffer[3]= { + primary_buffer[4]->Y, + primary_buffer[4]->Cb, + primary_buffer[4]->Cr }; + + int speed = info->settings->current_playback_speed; + int start = ( s1 ? sample_get_startFrame(s1) : info->settings->min_frame_num ); + int end = ( s1 ? sample_get_endFrame(s1) : info->settings->max_frame_num ); + + if( cur_sfd == 0 ) + { + int p0,p1, n2frame; + p0 = vj_el_get_video_frame( el, nframe, p0_buffer ); + n2frame = nframe + speed; + if( n2frame < start ) n2frame = start; else if (n2frame > end ) n2frame = end; + p1 = vj_el_get_video_frame( el, n2frame, p1_buffer ); + int uv_len = (info->effect_frame1->ssm ? info->effect_frame1->len : info->effect_frame1->uv_len ); + veejay_memcpy( img[0], p0_buffer[0], info->effect_frame1->len ); + veejay_memcpy( img[1], p0_buffer[1], uv_len); + veejay_memcpy( img[2], p0_buffer[2], uv_len ); + return 1; + } + else + { + uint32_t i; + const uint32_t N = max_sfd; + const uint32_t n1 = cur_sfd; + const float frac = 1.0f / (float) N * n1; + const uint32_t len = el->video_width * el->video_height; + for( i = 0; i < len ; i ++ ) + { + img[0][i] = p0_buffer[0][i] + ( frac * (p1_buffer[0][i] - p0_buffer[0][i])); + img[1][i] = p0_buffer[1][i] + ( frac * (p1_buffer[1][i] - p0_buffer[1][i])); + img[2][i] = p0_buffer[2][i] + ( frac * (p1_buffer[2][i] - p0_buffer[2][i])); + } + return 1; + } + } + + return vj_el_get_video_frame( el, nframe, img ); + +} + + +static int vj_perform_get_frame_fx(veejay_t *info, int s1, long nframe, uint8_t *img[3]) +{ + return vj_el_get_video_frame( + //info->edit_list, + sample_get_editlist( s1 ), + nframe, + img ); +} + + +static void vj_perform_apply_secundary(veejay_t * info, int sample_id, int type, + int chain_entry) +{ /* second sample */ + + + int width = info->edit_list->video_width; + int height = info->edit_list->video_height; + int error = 1; + int nframe; + int len; + int res = 1; + int centry = -1; + + uint8_t *fb[3] = { + frame_buffer[chain_entry]->Y, + frame_buffer[chain_entry]->Cb, + frame_buffer[chain_entry]->Cr }; + + switch (type) + { + case VJ_TAG_TYPE_YUV4MPEG: + case VJ_TAG_TYPE_V4L: + case VJ_TAG_TYPE_VLOOPBACK: + case VJ_TAG_TYPE_AVFORMAT: + case VJ_TAG_TYPE_NET: + case VJ_TAG_TYPE_MCAST: + case VJ_TAG_TYPE_COLOR: + case VJ_TAG_TYPE_PICTURE: + + centry = vj_perform_tag_is_cached(chain_entry, sample_id); // is it cached? + //@ not cached + if (centry == -1 ) + { + if(! vj_tag_get_active( sample_id ) ) + { + // active stream if neccesaary + vj_tag_set_active(sample_id, 1 ); + } + + if (vj_tag_get_active(sample_id) == 1) + { + res = vj_tag_get_frame(sample_id, fb, audio_buffer[chain_entry]); + if(res) + error = 0; + else + vj_tag_set_active(sample_id, 0); // stop stream + frame_buffer[chain_entry]->ssm = 0; + } + } + else + { + vj_perform_use_cached_ycbcr_frame(info,centry, chain_entry, width, height); + error = 0; + } + if(!error ) + cached_tag_frames[1 + chain_entry ] = sample_id; + break; + case VJ_TAG_TYPE_NONE: + nframe = vj_perform_get_subframe(info, sample_id, chain_entry); // get exact frame number to decode + centry = vj_perform_sample_is_cached(sample_id, chain_entry); + + if(centry == -1 || info->no_caching) + { + len = vj_perform_get_frame_fx( info, sample_id, nframe, fb ); + if(len > 0 ) + error = 0; + frame_buffer[chain_entry]->ssm = 0; + } + else + { + vj_perform_use_cached_ycbcr_frame(info,centry, chain_entry,width,height); + cached_sample_frames[ 1 + chain_entry ] = sample_id; + error = 0; + } + if(!error) + cached_sample_frames[chain_entry+1] = sample_id; + break; + + } +} + +static int vj_perform_tag_render_chain_entry(veejay_t *info, int chain_entry) +{ + VJFrame *frames[2]; + VJFrameInfo *frameinfo; + video_playback_setup *settings = info->settings; + frames[0] = info->effect_frame1; + frames[1] = info->effect_frame2; + frameinfo = info->effect_frame_info; + // setup pointers to ycbcr 4:2:0 or 4:2:2 data + frames[0]->data[0] = primary_buffer[0]->Y; + frames[0]->data[1] = primary_buffer[0]->Cb; + frames[0]->data[2] = primary_buffer[0]->Cr; + frames[0]->format = info->pixel_format; + vjp_kf *setup; + setup = info->effect_info; + setup->ref = info->uc->sample_id; + + if (vj_tag_get_chain_status(info->uc->sample_id, chain_entry)) + { + int effect_id = vj_tag_get_effect_any(info->uc->sample_id, chain_entry); // what effect is enabled + if (effect_id > 0) + { + int sub_mode = vj_effect_get_subformat(effect_id); + int ef = vj_effect_get_extra_frame(effect_id); + if(ef) + { + int sub_id = + vj_tag_get_chain_channel(info->uc->sample_id, + chain_entry); // what id + int source = + vj_tag_get_chain_source(info->uc->sample_id, // what source type + chain_entry); + + vj_perform_apply_secundary_tag(info,sub_id,source,chain_entry ); // get it + frames[1]->data[0] = frame_buffer[chain_entry]->Y; + frames[1]->data[1] = frame_buffer[chain_entry]->Cb; + frames[1]->data[2] = frame_buffer[chain_entry]->Cr; + frames[1]->format = info->pixel_format; + frames[1]->ssm = frame_buffer[chain_entry]->ssm; + // sample B + if(sub_mode && frames[1]->ssm == 0) + { + chroma_supersample( + settings->sample_mode, + effect_sampler, + frames[1]->data, + frameinfo->width, + frameinfo->height ); + frames[1]->ssm = 1; + frame_buffer[chain_entry]->ssm = 1; + } + else if (!sub_mode && frames[1]->ssm == 1 ) + { + chroma_subsample( + settings->sample_mode, + effect_sampler, + frames[1]->data, + frameinfo->width, + frameinfo->height + ); + frames[1]->ssm = 0; + frame_buffer[chain_entry]->ssm = 0; + } + } + + if( sub_mode && frames[0]->ssm == 0 ) + { + chroma_supersample( + settings->sample_mode, + effect_sampler, + frames[0]->data, + frameinfo->width, + frameinfo->height ); + frames[0]->ssm = 1; + } + else if(!sub_mode && frames[0]->ssm == 1) + { + chroma_subsample( + settings->sample_mode, + effect_sampler, + frames[0]->data,frameinfo->width, + frameinfo->height + ); + frames[0]->ssm = 0; + } + + vj_perform_apply_first(info,setup,frames,frameinfo,effect_id,chain_entry, + (int) settings->current_frame_num ); + } // if + } // for + return 0; +} + +static int vj_perform_render_chain_entry(veejay_t *info, int chain_entry) +{ + VJFrame *frames[2]; + VJFrameInfo *frameinfo; + video_playback_setup *settings = info->settings; + frames[0] = info->effect_frame1; + frames[1] = info->effect_frame2; + frames[1]->format = info->pixel_format; + frameinfo = info->effect_frame_info; + frames[0]->data[0] = primary_buffer[0]->Y; + frames[0]->data[1] = primary_buffer[0]->Cb; + frames[0]->data[2] = primary_buffer[0]->Cr; + frames[0]->format = info->pixel_format; + + vjp_kf *setup; + setup = info->effect_info; + setup->ref = info->uc->sample_id; + + if (sample_get_chain_status(info->uc->sample_id, chain_entry)) + { + int effect_id = + sample_get_effect_any(info->uc->sample_id, chain_entry); // what effect is enabled + + if (effect_id > 0) + { + int sub_mode = vj_effect_get_subformat(effect_id); + int ef = vj_effect_get_extra_frame(effect_id); + if(ef) + { + int sub_id = + sample_get_chain_channel(info->uc->sample_id, + chain_entry); // what id + int source = + sample_get_chain_source(info->uc->sample_id, // what source type + chain_entry); + vj_perform_apply_secundary(info,sub_id,source,chain_entry); // get it + + frames[1]->data[0] = frame_buffer[chain_entry]->Y; + frames[1]->data[1] = frame_buffer[chain_entry]->Cb; + frames[1]->data[2] = frame_buffer[chain_entry]->Cr; + frames[1]->ssm = frame_buffer[chain_entry]->ssm; + if(frames[1]->ssm == 0 && sub_mode) + { + chroma_supersample( + settings->sample_mode, + effect_sampler, + frames[1]->data, + frameinfo->width, + frameinfo->height ); + frames[1]->ssm = 0; + frame_buffer[chain_entry]->ssm = 1; + } + else if(frames[1]->ssm == 1 && !sub_mode ) + { + frames[1]->ssm = 0; + frame_buffer[chain_entry]->ssm = 0; + chroma_subsample( + settings->sample_mode, + effect_sampler, + frames[1]->data, + frameinfo->width, + frameinfo->height + ); + } + } + + if( sub_mode && frames[0]->ssm == 0) + { + chroma_supersample( + settings->sample_mode, + effect_sampler, + frames[0]->data, + frameinfo->width, + frameinfo->height ); + + frames[0]->ssm = 1; + } + else if(!sub_mode && frames[0]->ssm == 1) + { + chroma_subsample( + settings->sample_mode, + effect_sampler, + frames[0]->data, + frameinfo->width, + frameinfo->height + ); + frames[0]->ssm = 0; + } + + vj_perform_apply_first(info,setup,frames,frameinfo,effect_id,chain_entry, + (int) settings->current_frame_num ); + + } // if + } // status + return 0; +} + +static int vj_perform_sample_complete_buffers(veejay_t * info, int *hint444) +{ + int chain_entry; + vjp_kf *setup; + VJFrame *frames[2]; + VJFrameInfo *frameinfo; + setup = info->effect_info; + + frames[0] = info->effect_frame1; + frames[1] = info->effect_frame2; + frameinfo = info->effect_frame_info; + setup->ref = info->uc->sample_id; + frames[0]->data[0] = primary_buffer[0]->Y; + frames[0]->data[1] = primary_buffer[0]->Cb; + frames[0]->data[2] = primary_buffer[0]->Cr; + if(pvar_.fader_active) + vj_perform_pre_chain( info, frames[0] ); + + for(chain_entry = 0; chain_entry < SAMPLE_MAX_EFFECTS; chain_entry++) + { + vj_perform_render_chain_entry(info, chain_entry); + } + *hint444 = frames[0]->ssm; + return 1; +} + + +static int vj_perform_tag_complete_buffers(veejay_t * info,int *hint444 ) +{ + int chain_entry; + VJFrame *frames[2]; + + frames[0] = info->effect_frame1; + frames[1] = info->effect_frame2; + frames[0]->data[0] = primary_buffer[0]->Y; + frames[0]->data[1] = primary_buffer[0]->Cb; + frames[0]->data[2] = primary_buffer[0]->Cr; + + if( pvar_.fader_active ) + vj_perform_pre_chain( info, frames[0] ); + + + for(chain_entry = 0; chain_entry < SAMPLE_MAX_EFFECTS; chain_entry++) + vj_perform_tag_render_chain_entry( info, chain_entry); + + *hint444 = frames[0]->ssm; + return 1; +} + + +static void vj_perform_plain_fill_buffer(veejay_t * info) +{ + video_playback_setup *settings = (video_playback_setup*) info->settings; + uint8_t *frame[3]; + int ret = 0; + frame[0] = primary_buffer[0]->Y; + frame[1] = primary_buffer[0]->Cb; + frame[2] = primary_buffer[0]->Cr; + + if(info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE) + { + ret = vj_perform_get_frame_(info, info->uc->sample_id, settings->current_frame_num,frame ); + } + else + { + ret = vj_el_get_video_frame(info->current_edit_list,settings->current_frame_num,frame); + } + + if(ret <= 0) + { + veejay_msg(0, "Unable to queue video frame %d, stopping Veejay", + settings->current_frame_num ); + veejay_change_state_save(info, LAVPLAY_STATE_STOP); + } +} +static uint32_t rec_audio_sample_ = 0; +static int vj_perform_render_sample_frame(veejay_t *info, uint8_t *frame[3], int sample) +{ + int audio_len = 0; + long nframe = info->settings->current_frame_num; + uint8_t *buf = NULL; + + if( info->current_edit_list->has_audio ) + { + buf = (uint8_t*) vj_malloc(sizeof(uint8_t) * PERFORM_AUDIO_SIZE ); + audio_len = vj_perform_fill_audio_buffers(info, buf, audio_render_buffer, &rec_audio_sample_ ); + } + int res = sample_record_frame( sample,frame,buf,audio_len ); + + if( buf ) + free(buf); + + return res; +} + + +static int vj_perform_render_tag_frame(veejay_t *info, uint8_t *frame[3]) +{ + long nframe = info->settings->current_frame_num; + int sample_id = info->uc->sample_id; + + if(info->settings->offline_record) + sample_id = info->settings->offline_tag_id; + + if(info->settings->offline_record) + { + if (!vj_tag_get_frame(sample_id, frame, NULL)) + { + return 0;//skip and dont care + } + } + + return vj_tag_record_frame( sample_id, frame, NULL, 0); +} + +static int vj_perform_record_commit_single(veejay_t *info) +{ + //video_playback_setup *settings = info->settings; + + char filename[512]; + //int n_files = 0; + if(info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE) + { + if(sample_get_encoded_file(info->uc->sample_id, filename)) + { +// does file exist ? + int id = veejay_edit_addmovie_sample(info,filename, 0 ); + if(id <= 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "Adding file %s to new sample", filename); + return 0; + } + return id; + } + } + + if(info->uc->playback_mode==VJ_PLAYBACK_MODE_TAG) + { + int stream_id = (info->settings->offline_record ? info->settings->offline_tag_id : info->uc->sample_id); + if(vj_tag_get_encoded_file(stream_id, filename)) + { + int id = veejay_edit_addmovie_sample(info, filename, 0); + if( id <= 0 ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Adding file %s to new sample", filename); + return 0; + } + return id; + } + } + return 0; +} + +void vj_perform_record_stop(veejay_t *info) +{ + video_playback_setup *settings = info->settings; + if(info->uc->playback_mode==VJ_PLAYBACK_MODE_SAMPLE) + { + sample_reset_encoder(info->uc->sample_id); + sample_reset_autosplit(info->uc->sample_id); + if( settings->sample_record && settings->sample_record_switch) + { + settings->sample_record_switch = 0; + veejay_set_sample( info,sample_size()-1); + veejay_msg(VEEJAY_MSG_INFO, "Autoplaying new sample %d", sample_size()-1); + } + settings->sample_record = 0; + settings->sample_record_id = 0; + settings->sample_record_switch =0; + settings->render_list = 0; + } + + if(info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG) + { + int stream_id = (settings->offline_record ? settings->offline_tag_id : info->uc->sample_id); + int play = settings->tag_record_switch; + vj_tag_reset_encoder(stream_id); + vj_tag_reset_autosplit(stream_id); + if(settings->offline_record) + { + play = settings->offline_created_sample; + settings->offline_record = 0; + settings->offline_created_sample = 0; + settings->offline_tag_id = 0; + } + else + { + settings->tag_record = 0; + settings->tag_record_switch = 0; + } + + if(play) + { + info->uc->playback_mode = VJ_PLAYBACK_MODE_SAMPLE; + veejay_set_sample(info ,sample_size()-1); + veejay_msg(VEEJAY_MSG_INFO, "Autoplaying new sample %d", sample_size()-1); + } + + } + +} + + +void vj_perform_record_sample_frame(veejay_t *info, int sample) { + video_playback_setup *settings = info->settings; + uint8_t *frame[3]; + int res = 1; + int n = 0; + frame[0] = primary_buffer[0]->Y; + frame[1] = primary_buffer[0]->Cb; + frame[2] = primary_buffer[0]->Cr; + + if( available_diskspace() ) + res = vj_perform_render_sample_frame(info, frame, sample); + + if( res == 2) + { + int df = vj_event_get_video_format(); + int len = sample_get_total_frames(sample); + long frames_left = sample_get_frames_left(sample) ; + sample_stop_encoder( sample ); + n = vj_perform_record_commit_single( info ); + sample_reset_encoder( sample ); + if(frames_left > 0 ) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Continue, %d frames left to record", frames_left); + if( sample_init_encoder( sample, NULL, + df, info->edit_list, frames_left)==-1) + { + veejay_msg(VEEJAY_MSG_ERROR, + "Error while auto splitting "); + report_bug(); + } + } + else + { + veejay_msg(VEEJAY_MSG_DEBUG, "Added new sample %d of %d frames",n,len); + } + } + + + if( res == 1) + { + if( info->seq->active && info->seq->rec_id ) + info->seq->rec_id = 0; + sample_stop_encoder(sample); + vj_perform_record_commit_single( info ); + vj_perform_record_stop(info); + } + + if( res == -1) + { + if( info->seq->active && info->seq->rec_id ) + info->seq->rec_id = 0; + + sample_stop_encoder(sample); + vj_perform_record_stop(info); + } +} + + +void vj_perform_record_tag_frame(veejay_t *info) { + video_playback_setup *settings = info->settings; + uint8_t *frame[3]; + int res = 1; + int stream_id = info->uc->sample_id; + if( settings->offline_record ) + stream_id = settings->offline_tag_id; + + if(settings->offline_record) + { + frame[0] = record_buffer->Y; + frame[1] = record_buffer->Cb; + frame[2] = record_buffer->Cr; + } + else + { + frame[0] = primary_buffer[0]->Y; + frame[1] = primary_buffer[0]->Cb; + frame[2] = primary_buffer[0]->Cr; + } + + if(available_diskspace()) + res = vj_perform_render_tag_frame(info, frame); + + if( res == 2) + { + int df = vj_event_get_video_format(); + long frames_left = vj_tag_get_frames_left(stream_id) ; + vj_tag_stop_encoder( stream_id ); + vj_perform_record_commit_single( info ); + vj_tag_reset_encoder( stream_id ); + if(frames_left > 0 ) + { + if( vj_tag_init_encoder( stream_id, NULL, + df, frames_left)==-1) + { + veejay_msg(VEEJAY_MSG_WARNING, + "Error while auto splitting."); + report_bug(); + } + } + } + + + if( res == 1) + { + vj_tag_stop_encoder(stream_id); + vj_perform_record_commit_single( info ); + vj_perform_record_stop(info); + } + + if( res == -1) + { + vj_tag_stop_encoder(stream_id); + vj_perform_record_stop(info); + } + +} + + +static int vj_perform_tag_fill_buffer(veejay_t * info) +{ + int error = 1; + uint8_t *frame[3]; + int type = pvar_.type; + int active = pvar_.active; + frame[0] = primary_buffer[0]->Y; + frame[1] = primary_buffer[0]->Cb; + frame[2] = primary_buffer[0]->Cr; + + if(!active) + { + if (type == VJ_TAG_TYPE_V4L || type == VJ_TAG_TYPE_NET || type == VJ_TAG_TYPE_MCAST || type == VJ_TAG_TYPE_PICTURE ) + vj_tag_enable( info->uc->sample_id ); + } + else + { + if (vj_tag_get_frame(info->uc->sample_id, frame, NULL)) + { + error = 0; + cached_tag_frames[0] = info->uc->sample_id; + } + } + + + if (error == 1) + { + VJFrame dumb; + if( info->pixel_format == FMT_422 || info->pixel_format == FMT_422F ) + vj_el_init_422_frame( info->edit_list, &dumb ); + else + vj_el_init_420_frame( info->edit_list, &dumb ); + + dumb.data[0] = frame[0]; + dumb.data[1] = frame[1]; + dumb.data[2] = frame[2]; + + dummy_apply(&dumb, + info->edit_list->video_width, + info->edit_list->video_height, VJ_EFFECT_COLOR_BLACK); + } + return 1; +} + +static void vj_perform_pre_chain(veejay_t *info, VJFrame *frame) +{ + veejay_memcpy( temp_buffer[0] ,frame->data[0], frame->len ); + veejay_memcpy( temp_buffer[1], frame->data[1], frame->uv_len); + veejay_memcpy( temp_buffer[2], frame->data[2], frame->uv_len ); /* /4 */ +} + +static inline void vj_perform_supersample_chain( veejay_t *info, VJFrame *frame ) +{ + chroma_supersample( + info->settings->sample_mode, + effect_sampler, + temp_buffer, + frame->width, + frame->height + ); + frame->ssm = 1; +} + +static void vj_perform_post_chain_sample(veejay_t *info, VJFrame *frame) +{ + unsigned int opacity; + int mode = pvar_.fader_active; + + if( frame->ssm ) + vj_perform_supersample_chain( info, frame ); + + if(mode == 2 ) // manual fade + opacity = (int) sample_get_fader_val(info->uc->sample_id); + else // fade in/fade out + opacity = (int) sample_apply_fader_inc(info->uc->sample_id); + + if(mode != 2) + { + int dir =sample_get_fader_direction(info->uc->sample_id); + + if((dir<0) &&(opacity == 0)) + { + sample_set_effect_status(info->uc->sample_id, 1); + sample_reset_fader(info->uc->sample_id); + veejay_msg(VEEJAY_MSG_DEBUG, "Sample Chain Auto Fade Out done"); + } + if((dir>0) && (opacity==255)) + { + sample_set_effect_status(info->uc->sample_id,0); + sample_reset_fader(info->uc->sample_id); + veejay_msg(VEEJAY_MSG_DEBUG, "Sample Chain Auto fade In done"); + } + } + + int len2 = ( frame->ssm == 1 ? helper_frame->len : helper_frame->uv_len ); + opacity_blend_apply( frame->data ,temp_buffer,frame->len, len2, opacity ); +} + + +static void vj_perform_post_chain_tag(veejay_t *info, VJFrame *frame) +{ + unsigned int opacity; + int mode = pvar_.fader_active; + + if( !frame->ssm ) + vj_perform_supersample_chain( info, frame ); + + if(mode == 2) + opacity = (int) vj_tag_get_fader_val(info->uc->sample_id); + else + opacity = (int) vj_tag_apply_fader_inc(info->uc->sample_id); + + if(mode != 2) + { + int dir = vj_tag_get_fader_direction(info->uc->sample_id); + if((dir < 0) && (opacity == 0)) + { + vj_tag_set_effect_status(info->uc->sample_id,1); + vj_tag_reset_fader(info->uc->sample_id); + veejay_msg(VEEJAY_MSG_DEBUG, "Stream Chain Auto Fade done"); + } + if((dir > 0) && (opacity == 255)) + { + vj_tag_set_effect_status(info->uc->sample_id,0); + vj_tag_reset_fader(info->uc->sample_id); + veejay_msg(VEEJAY_MSG_DEBUG, "Stream Chain Auto Fade done"); + } + + } + + int len2 = ( frame->ssm == 1 ? helper_frame->len : helper_frame->uv_len ); + opacity_blend_apply( frame->data ,temp_buffer,frame->len, len2, opacity ); +} +static uint32_t play_audio_sample_ = 0; +int vj_perform_queue_audio_frame(veejay_t *info) +{ + if( info->audio == NO_AUDIO || !info->current_edit_list->has_audio) + return 1; + +#ifdef HAVE_JACK + editlist *el = info->current_edit_list; + video_playback_setup *settings = info->settings; + long this_frame = settings->current_frame_num; + int num_samples = (el->audio_rate/el->video_fps); + int pred_len = num_samples; + int bps = el->audio_bps; + uint8_t *a_buf = top_audio_buffer; + int rs = 0; + if (info->audio == AUDIO_PLAY) + { + if(settings->audio_mute || settings->current_playback_speed == 0 ) + { + veejay_memset( a_buf, 0, num_samples * bps); + vj_jack_play( a_buf, num_samples * bps ); + return 1; + } + + switch (info->uc->playback_mode) + { + case VJ_PLAYBACK_MODE_SAMPLE: + if( el->has_audio ) + num_samples = vj_perform_fill_audio_buffers(info,a_buf, audio_render_buffer + (2* PERFORM_AUDIO_SIZE * MAX_SPEED), &play_audio_sample_); + if(num_samples <= 0 ) + { + num_samples = pred_len; + veejay_memset( a_buf, 0, num_samples * bps ); + } + else + rs = 1; + break; + case VJ_PLAYBACK_MODE_PLAIN: + if( el->has_audio ) + { + if (settings->current_frame_num <= settings->max_frame_num) + num_samples = vj_el_get_audio_frame(el, this_frame,a_buf ); + else + num_samples = 0; + if( num_samples <= 0 ) + { + num_samples = pred_len; + veejay_memset( a_buf, 0, num_samples * bps ); + } + else + rs = 1; + if( settings->current_playback_speed < 0 && rs ) + vj_perform_reverse_audio_frame(info,num_samples,a_buf); + } + break; + //@ pfffff there is no stream that delivers audio anyway yet + case VJ_PLAYBACK_MODE_TAG: + if(el->has_audio) + { + num_samples = vj_tag_get_audio_frame(info->uc->sample_id, a_buf); + if(num_samples <= 0 ) + { + num_samples = pred_len; + veejay_memset(a_buf, 0, num_samples * bps ); + } + else + rs = 1; + } + break; + } + if( jack_rate_ != el->audio_rate && rs) + { +#ifdef STRICT_CHECKING + assert( resample_jack != NULL ); + assert( num_samples > 0 ); +#endif + veejay_memcpy( resample_audio_buffer, a_buf, num_samples * bps); + num_samples = audio_resample( resample_jack, (short*)top_audio_buffer,(short*)resample_audio_buffer, num_samples ); + vj_jack_play( top_audio_buffer, num_samples * bps ); + } + else + { + vj_jack_play( a_buf, (num_samples * bps )); + } + } +#endif + return 1; +} + +int vj_perform_get_width( veejay_t *info ) +{ +#ifdef HAVE_GL + if(info->video_out == 4 ) + return x_display_width(info->gl); +#endif +#ifdef HAVE_SDL + if(info->video_out <= 1 ) + return vj_sdl_screen_w(info->sdl[0]); +#endif + return info->video_output_width; +} + +int vj_perform_get_height( veejay_t *info ) +{ +#ifdef HAVE_GL + if(info->video_out == 4 ) + return x_display_height(info->gl); +#endif +#ifdef HAVE_SDL + if(info->video_out <= 1 ) + return vj_sdl_screen_h(info->sdl[0]); +#endif + return info->video_output_height; +} +static void vj_perform_render_osd( veejay_t *info, video_playback_setup *settings, int destination ) +{ + if(info->use_osd <= 0) + return; + + VJFrame *frame = info->effect_frame1; + frame->data[0] = primary_buffer[destination]->Y; + frame->data[1] = primary_buffer[destination]->Cb; + frame->data[2] = primary_buffer[destination]->Cr; + + if( !frame->ssm) + { + chroma_supersample( + settings->sample_mode, + effect_sampler, + frame->data, + frame->width, + frame->height + ); + frame->ssm = 1; + } + + if( info->which_vp == 1 ) + { + info->uc->osd_extra = viewport_get_my_help( info->composite ); + } + else + info->uc->osd_extra = NULL; + + vj_font_customize_osd(info->osd, info, info->use_osd, 0,info->which_vp ); + vj_font_render( info->osd, frame , settings->current_frame_num,info->uc->osd_extra ); + + if(info->which_vp==1 ) + { + if(info->uc->osd_extra) free(info->uc->osd_extra); + info->uc->osd_extra = NULL; + } +} + +static void vj_perform_finish_chain( veejay_t *info ) +{ + VJFrame *frame = info->effect_frame1; + frame->data[0] = primary_buffer[0]->Y; + frame->data[1] = primary_buffer[0]->Cb; + frame->data[2] = primary_buffer[0]->Cr; + + if(info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG ) + { + if( pvar_.fader_active ) + vj_perform_post_chain_tag(info,frame); + } + else if( info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE ) + { + if( pvar_.fader_active) + vj_perform_post_chain_sample(info,frame); + } +} + +static void vj_perform_finish_render( veejay_t *info, video_playback_setup *settings, int destination ) +{ + VJFrame *frame = info->effect_frame1; + VJFrame *frame2= info->effect_frame2; + uint8_t *pri[3]; + + pri[0] = primary_buffer[destination]->Y; + pri[1] = primary_buffer[destination]->Cb; + pri[2] = primary_buffer[destination]->Cr; + + if( settings->composite ) + { //@ scales in software + + if(info->which_vp == 1 ) + { //@ focus on projection screen + composite_event( info->composite, pri, info->uc->mouse[0],info->uc->mouse[1],info->uc->mouse[2], + vj_perform_get_width(info), vj_perform_get_height(info)); + } + + composite_process( info->composite, pri, frame, 0, info->which_vp ); + } + + if( frame->ssm == 1 ) + { + chroma_subsample( + settings->sample_mode, + effect_sampler, + pri, + frame->width, + frame->height + ); + frame->ssm = 0; + } + + if( frame2->ssm == 1 ) + { + frame2->ssm=0; + } + + if (info->uc->take_bg==1) + { + vj_perform_take_bg(info,pri); + info->uc->take_bg = 0; + veejay_msg(VEEJAY_MSG_INFO, "Snapped background image"); + } + + +} + +static void vj_perform_render_font( veejay_t *info, video_playback_setup *settings ) +{ +// VJFrame *frame = font_frame; + VJFrame *frame = info->effect_frame1; + + frame->data[0] = primary_buffer[0]->Y; + frame->data[1] = primary_buffer[0]->Cb; + frame->data[2] = primary_buffer[0]->Cr; + +#ifdef HAVE_FREETYPE + if(vj_font_norender( info->font, settings->current_frame_num )) + { + if( !frame->ssm ) + { + chroma_supersample( + settings->sample_mode, + effect_sampler, + frame->data, + frame->width, + frame->height + ); + frame->ssm = 1; + } + + vj_font_render( info->font, frame , settings->current_frame_num,NULL ); + } +#endif +} + +static void vj_perform_record_frame( veejay_t *info ) +{ + VJFrame *frame = info->effect_frame1; + int which_sample = info->uc->sample_id; + if( info->seq->active && info->seq->rec_id && info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE ) + which_sample = info->seq->rec_id; + + if(frame->ssm == 1) + { + video_playback_setup *settings = info->settings; + uint8_t *dst[3] = { NULL, primary_buffer[3]->Cb, + primary_buffer[3]->Cr }; + chroma_subsample_cp( settings->sample_mode, effect_sampler, + frame->data,dst, frame->width,frame->height ); + uint8_t *chroma[2] = { primary_buffer[0]->Cb, primary_buffer[0]->Cr }; + primary_buffer[0]->Cb = dst[1]; + primary_buffer[0]->Cr = dst[2]; + + if(info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG ) + vj_perform_record_tag_frame(info); + else if (info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE ) + vj_perform_record_sample_frame(info, which_sample ); + + primary_buffer[0]->Cb = chroma[0]; + primary_buffer[0]->Cr = chroma[1]; + } + else + { + if(info->uc->playback_mode == VJ_PLAYBACK_MODE_TAG ) + vj_perform_record_tag_frame(info); + else if (info->uc->playback_mode == VJ_PLAYBACK_MODE_SAMPLE ) + vj_perform_record_sample_frame(info, which_sample ); + } +} + +static int vj_perform_render_magic( veejay_t *info, video_playback_setup *settings ) +{ + int deep = 0; + //@ Finalize the FX chain (Could leave the FX chain supersampled) + vj_perform_finish_chain( info ); + + //@ Render any subtitles in sample/stream (Leaves FX chain supersampled) + vj_perform_render_font( info, settings ); + + //@ record frame + if( pvar_.enc_active ) + { + vj_perform_record_frame(info); + } + + //@ Render OSD menu + vj_perform_render_osd( info, settings, deep ); + + //@ Do the subsampling + vj_perform_finish_render( info, settings,deep ); + + return deep; +} + + +int vj_perform_queue_video_frame(veejay_t *info, const int skip_incr) +{ + video_playback_setup *settings = info->settings; + + if(skip_incr) + return 1; + + int is444 = 0; + int res = 0; + + + veejay_memset( &pvar_, 0, sizeof(varcache_t)); + + if(settings->offline_record) + vj_perform_record_tag_frame(info); + + switch (info->uc->playback_mode) + { + case VJ_PLAYBACK_MODE_SAMPLE: + + sample_var( info->uc->sample_id, &(pvar_.type), + &(pvar_.fader_active), + &(pvar_.fx_status), + &(pvar_.enc_active), + &(pvar_.active) + ); + + if( info->seq->active && info->seq->rec_id ) + pvar_.enc_active = 1; + + vj_perform_plain_fill_buffer(info); + + cached_sample_frames[0] = info->uc->sample_id; + + if(vj_perform_verify_rows(info)) + vj_perform_sample_complete_buffers(info, &is444); + + + info->out_buf = vj_perform_render_magic( info, info->settings ); + res = 1; + + break; + + case VJ_PLAYBACK_MODE_PLAIN: + + vj_perform_plain_fill_buffer(info); + + info->out_buf = vj_perform_render_magic( info, info->settings ); + res = 1; + break; + case VJ_PLAYBACK_MODE_TAG: + + vj_tag_var( info->uc->sample_id, + &(pvar_.type), + &(pvar_.fader_active), + &(pvar_.fx_status), + &(pvar_.enc_active), + &(pvar_.active) + + ); + + if (vj_perform_tag_fill_buffer(info)) + { + if(vj_perform_verify_rows(info)) + vj_perform_tag_complete_buffers(info, &is444); + info->out_buf = vj_perform_render_magic( info, info->settings ); + } + res = 1; + break; + default: + return 0; + } + + return res; +} + + +int vj_perform_queue_frame(veejay_t * info, int skip ) +{ + video_playback_setup *settings = (video_playback_setup*) info->settings; + if(!skip) + { + switch(info->uc->playback_mode) + { + case VJ_PLAYBACK_MODE_TAG: + vj_perform_increase_tag_frame(info, settings->current_playback_speed); + break; + case VJ_PLAYBACK_MODE_SAMPLE: + vj_perform_increase_sample_frame(info,settings->current_playback_speed); + break; + case VJ_PLAYBACK_MODE_PLAIN: + vj_perform_increase_plain_frame(info,settings->current_playback_speed); + break; + default: + break; + } + } + vj_perform_clear_cache(); + //__global_frame = 0; + + return 0; +} + + +static int track_dup = 0; +void vj_perform_randomize(veejay_t *info) +{ + video_playback_setup *settings = info->settings; + if(settings->randplayer.mode == RANDMODE_INACTIVE) + return; + + double n_sample = (double) (sample_size()-1); + + if( settings->randplayer.mode == RANDMODE_SAMPLE ) + track_dup = info->uc->sample_id; + + if( n_sample == 1.0 ) + track_dup = 0; + + int take_n = 1 + (int) (n_sample * rand() / (RAND_MAX+1.0)); + int min_delay = 1; + int max_delay = 0; + char timecode[15]; + + int use = ( take_n == track_dup ? 0: 1 ); + + while(!sample_exists(take_n) || !use) + { + veejay_msg(VEEJAY_MSG_DEBUG, + "Sample to play (at random) %d does not exist", + take_n); + take_n = 1 + (int) ( n_sample * rand()/(RAND_MAX+1.0)); + use = (track_dup == take_n ? 0:1 ); + } + + int start,end; + start = sample_get_startFrame( take_n); + end = sample_get_endFrame( take_n ); + + if( settings->randplayer.timer == RANDTIMER_FRAME ) + { + max_delay = (end-start) + 1; + max_delay = min_delay + (int) ((double)max_delay * rand() / (RAND_MAX+1.0)); + } + else + { + max_delay = (end-start); + } + + settings->randplayer.max_delay = max_delay; + settings->randplayer.min_delay = min_delay; + + + MPEG_timecode_t tc; + + mpeg_timecode(&tc, max_delay, + mpeg_framerate_code(mpeg_conform_framerate( + info->edit_list->video_fps)), + info->edit_list->video_fps ); + sprintf(timecode, "%2d:%2.2d:%2.2d:%2.2d", tc.h, tc.m, tc.s, tc.f); + veejay_msg(VEEJAY_MSG_DEBUG, + "Sample randomizer trigger in %s", + timecode ); + + veejay_set_sample( info, take_n ); +} + +int vj_perform_rand_update(veejay_t *info) +{ + video_playback_setup *settings = info->settings; + if(settings->randplayer.mode == RANDMODE_INACTIVE) + return 0; + if(settings->randplayer.mode == RANDMODE_SAMPLE) + { + settings->randplayer.max_delay --; + if(settings->randplayer.max_delay <= 0 ) + vj_perform_randomize(info); + return 1; + } + return 0; +} + diff --git a/veejay-server/veejay/vj-perform.h b/veejay-server/veejay/vj-perform.h new file mode 100644 index 00000000..e7077590 --- /dev/null +++ b/veejay-server/veejay/vj-perform.h @@ -0,0 +1,76 @@ +#ifndef VJ_PERFORM_H +#define VJ_PERFORM_H + +#include "vj-lib.h" + +/* multithreaded code, what starts in queue belongs to playback_thread */ +uint8_t *vj_perform_get_preview_buffer(); + +void vj_perform_init_output_frame( veejay_t *info, uint8_t **frame, + int dst_w, int dst_h ); + +void vj_perform_update_plugin_frame(VJFrame *frame); + +void vj_perform_unlock_primary_frame( void ); + +VJFrame *vj_perform_init_plugin_frame(veejay_t *info); +VJFrameInfo *vj_perform_init_plugin_frame_info(veejay_t *info); + +int vj_perform_init(veejay_t * info); + +int vj_perform_init_audio(veejay_t * info); + +void vj_perform_free(veejay_t *info); + +int vj_perform_audio_start(veejay_t * info); + +void vj_perform_audio_status(struct timeval tmpstmp, unsigned int nb_out, + unsigned int nb_err); + +void vj_perform_audio_stop(veejay_t * info); + +void vj_perform_get_primary_frame(veejay_t * info, uint8_t ** frame ); + +void vj_perform_get_primary_frame_420p(veejay_t *info, uint8_t **frame ); + +int vj_perform_fill_audio_buffers(veejay_t *info, uint8_t *audio_buf, uint8_t *temporary_buffer, int *temporary_sum); + +int vj_perform_tag_decode_buffers(veejay_t * info, int entry); + +int vj_perform_queue_frame(veejay_t * info, int skip); + +int vj_perform_queue_audio_frame(veejay_t * info); + +int vj_perform_queue_video_frame(veejay_t * info, int skip); + +void vj_perform_clear_frame_info(); + +void vj_perform_record_stop(veejay_t *info); + +void vj_perform_record_sample_frame(veejay_t *info, int sample); + +void vj_perform_record_tag_frame(veejay_t *info ); +void vj_perform_get_output_frame_420p( veejay_t *info, uint8_t **frame, int w, int h ); +void vj_perform_get_output_frame( uint8_t **frame ); + +int vj_perform_get_cropped_frame( veejay_t *info, uint8_t **frame, int crop ); +int vj_perform_init_cropped_output_frame(veejay_t *info, VJFrame *src, int *dw, int *dh ); +void vj_perform_get_crop_dimensions(veejay_t *info, int *w, int *h); +int vj_perform_rand_update(veejay_t *info); +void vj_perform_randomize(veejay_t *info); + +void vj_perform_free_plugin_frame(VJFrameInfo *f ); + +uint8_t *vj_perform_get_a_work_buffer( ); + +int vj_perform_send_primary_frame_s2(veejay_t *info, int mcast, int dst_link); +void vj_perform_get_backstore( uint8_t **frame ); +int vj_perform_get_sampling(); + +int vj_perform_get_width( veejay_t *info ); +int vj_perform_get_height( veejay_t *info ); + + +int vj_perform_get_dups(); + +#endif diff --git a/veejay-server/veejay/vj-pjack.c b/veejay-server/veejay/vj-pjack.c new file mode 100644 index 00000000..e29788a7 --- /dev/null +++ b/veejay-server/veejay/vj-pjack.c @@ -0,0 +1,200 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#ifdef HAVE_JACK +#include +#include +static int driver = 0; +static int bits_per_sample = 0; +static unsigned long audio_rate = 0; +static int audio_channels = 0; +static int audio_bps = 0; +static unsigned long v_rate = 0; +extern void veejay_msg(int type, const char format[], ...); + +int vj_jack_initialize() +{ + JACK_Init(); + return 0; +} +static int _vj_jack_start(int *dri) +{ + int err = JACK_Open(dri, bits_per_sample,&audio_rate,audio_channels); + if(err == ERR_RATE_MISMATCH) + { + veejay_msg(1, + "(Jackd) Sample rate mismatch (Retrying)"); + + err = JACK_Open(dri, bits_per_sample,&audio_rate, + audio_channels); + + } + + if(err != ERR_SUCCESS) + { + switch(err) + { + case ERR_OPENING_JACK: + veejay_msg(0, "Unable to open Jackd (is jackd running?"); + break; + case ERR_RATE_MISMATCH: + veejay_msg(0, "Jackd cannot handle samplerate of %d Hz", audio_rate); + break; + case ERR_TOO_MANY_OUTPUT_CHANNELS: + veejay_msg(0, "Cannot connect to jackd, Too many output channels: %d", + audio_channels ); + break; + case ERR_PORT_NOT_FOUND: + veejay_msg(0, "Unable to find jack port"); + break; + } +// veejay_msg(0, "To run veejay without audio, use -a0"); + return 0; + } + + return 1; +} + +int vj_jack_init(editlist *el) +{ + int err; + int v_rate = el->audio_rate; + int i = 0; + int ret = 0; + + JACK_Init(); + + bits_per_sample = 16; + audio_channels = el->audio_chans; + + if( !_vj_jack_start(&driver) ) + return ret; + + long jack_rate = JACK_GetSampleRate(driver ); + + audio_bps = audio_rate * audio_channels; + + veejay_msg(2,"Jack: %ld, %d Hz/ %d Channels %d Bit ", jack_rate,audio_rate,audio_channels,bits_per_sample); + + ret = 1; + + if( jack_rate != el->audio_rate ) + ret = 2; + + JACK_SetState(driver, PAUSED ); + + return ret; +} + +int vj_jack_rate() +{ + return JACK_GetSampleRate(driver); +} + + +int vj_jack_continue(int speed) +{ + if(speed==0) + { + if(JACK_GetState(driver) == PAUSED) + return 1; + + JACK_SetState(driver, PAUSED ); + return 1; + } + + if( JACK_GetState(driver) == PAUSED ) + { + JACK_SetState(driver, PLAYING); + return 1; + } + return 0; +} + + +int vj_jack_stop() +{ + + JACK_Reset( driver ); + + if(JACK_Close(driver)) + { + veejay_msg(2, + "(Jack) Error closing device"); + } + return 1; +} + +void vj_jack_enable() +{ + if( JACK_GetState(driver) == STOPPED ) + JACK_SetState(driver, PLAYING ); +} + +void vj_jack_disable() +{ + JACK_SetState( driver, STOPPED ); +} + + +void vj_jack_reset() +{ + JACK_Reset(driver); +} + +int vj_jack_c_play(void *data, int len, int entry) +{ + return 0; +} + +int vj_jack_play(void *data, int len) +{ + return JACK_Write(driver,data,len); +} + +int vj_jack_set_volume(int volume) +{ + if(JACK_SetAllVolume( driver, volume)==0) + return 1; + return 0; +} + +int vj_jack_pause() +{ + JACK_SetState(driver,PAUSED); + return 1; +} + +int vj_jack_resume() +{ + JACK_SetState(driver,PLAYING); + return 1; +} + +int vj_jack_get_space() +{ + return JACK_GetBytesFreeSpace(driver); +} + +long vj_jack_get_status(long int *sec, long int *usec) +{ + return JACK_OutputStatus( driver, sec, usec); +} +#endif diff --git a/veejay-server/veejay/vj-plug.h b/veejay-server/veejay/vj-plug.h new file mode 100644 index 00000000..503a4a3f --- /dev/null +++ b/veejay-server/veejay/vj-plug.h @@ -0,0 +1,49 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + + +*/ + +#ifndef _VEEJAY_PLUG_H +#define _VEEJAY_PLUG_H +#include +#define VJPLUG_VIDO_DRIVER 1 +#define VJPLUG_NORMAL 0 +#define VJPLUG_VIDI_DRIVER 2 + +#define VJ_EFFECT_ERROR -1024 +#define VJ_EFFECT_DESCR_LEN 200; + +#define ARRAY_SIZE(buf) (\ + (int) ( sizeof(buf[0]) / sizeof(uint8_t) ) + \ + (int) ( sizeof(buf[1]) / sizeof(uint8_t) ) +\ + (int) ( sizeof(buf[2]) / sizeof(uint8_t) ) ) + +/* VJPluginInfo + this struct describeds the plugin and its events +*/ +typedef struct +{ + char *name; // name of plugin + char *help; // help to display + int is_sink; + int is_src; + int plugin_type; +} VJPluginInfo; + +#endif diff --git a/veejay-server/veejay/vj-sdl.c b/veejay-server/veejay/vj-sdl.c new file mode 100644 index 00000000..2e1ac366 --- /dev/null +++ b/veejay-server/veejay/vj-sdl.c @@ -0,0 +1,384 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2004 Niels Elburg + * + * 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 + */ + +/* + * Output in YUY2 always + * Seems that YUV 4:2:0 (YV12) overlays have problems with multiple SDL video window + */ +#include +#ifdef HAVE_SDL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//extern void *(* veejay_memcpy)(void *to, const void *from, size_t len) ; +#ifdef STRICT_CHECKING +#include +#endif + +vj_sdl *vj_sdl_allocate(int width, int height, int fmt) +{ + vj_sdl *vjsdl = (vj_sdl *) malloc(sizeof(vj_sdl)); + if (!vjsdl) + return NULL; + vjsdl->flags[0] = 0; + vjsdl->flags[1] = 0; + vjsdl->mouse_motion = 1; + vjsdl->use_keyboard = 1; + vjsdl->pix_format = SDL_YUY2_OVERLAY; + vjsdl->pix_fmt = fmt; + vjsdl->width = width; + vjsdl->height = height; + vjsdl->frame_size = width * height; + vjsdl->sw_scale_width = 0; + vjsdl->sw_scale_height = 0; + vjsdl->custom_geo[0] = -1; + vjsdl->custom_geo[1] = -1; + vjsdl->show_cursor = 0; + vjsdl->display = NULL; + return vjsdl; +} + +void vj_sdl_set_geometry(vj_sdl* sdl, int w, int h) +{ + sdl->custom_geo[0] = w; + sdl->custom_geo[1] = h; + if (sdl->custom_geo[0] != -1 && sdl->custom_geo[1]!=-1) + { + char exp_str[100]; + sprintf(exp_str, "SDL_VIDEO_WINDOW_POS=%d,%d",sdl->custom_geo[0], + sdl->custom_geo[1]); + if(putenv(exp_str)==0) + veejay_msg(VEEJAY_MSG_DEBUG,"SDL geometry %d , %d", + sdl->custom_geo[0],sdl->custom_geo[1]); + } + +} + +void vj_sdl_resize( vj_sdl *vjsdl , int scaled_width, int scaled_height, int fs ) +{ + //@ sw_scale_width is misleading ; it lets SDL use the BES + if (scaled_width) + vjsdl->sw_scale_width = scaled_width; + if (scaled_height) + vjsdl->sw_scale_height = scaled_height; + + int my_bpp = SDL_VideoModeOK( vjsdl->sw_scale_width, vjsdl->sw_scale_height,24, + vjsdl->flags[fs] ); + if(!my_bpp) + { + veejay_msg(VEEJAY_MSG_DEBUG, "Requested depth not supported"); + return; + } + + vjsdl->screen = SDL_SetVideoMode( vjsdl->sw_scale_width, vjsdl->sw_scale_height,my_bpp, + vjsdl->flags[fs]); + + vjsdl->rectangle.x = 0; + vjsdl->rectangle.y = 0; + vjsdl->rectangle.w = scaled_width; + vjsdl->rectangle.h = scaled_height; + + + veejay_msg(VEEJAY_MSG_INFO, "Changed video window to size %d x %d", + vjsdl->sw_scale_width,vjsdl->sw_scale_height); +} + + +int vj_sdl_init(int ncpu, vj_sdl * vjsdl, int scaled_width, int scaled_height, const char *caption, int show, int fs) +{ + uint8_t *sbuffer; + char name[100]; + int i = 0; + const int bpp = 24; + const SDL_VideoInfo *info = NULL; + SDL_SysWMinfo wminfo; + + if (!vjsdl) + return 0; + + veejay_memset( &wminfo, 0, sizeof(SDL_SysWMinfo)); + + if (SDL_Init(SDL_INIT_VIDEO) < 0) + { + veejay_msg(VEEJAY_MSG_ERROR, "%s", SDL_GetError()); + veejay_msg(VEEJAY_MSG_INFO, "\tHint: 'export SDL_VIDEODRIVER=x11'"); + return 0; + } + + /* dont overwrite environment settings, but export if they are not set already */ + + setenv( "SDL_VIDEO_YUV_DIRECT", "1", 0 ); + setenv( "SDL_VIDEO_HWACCEL", "1", 0 ); + + char *hw_env = getenv("SDL_VIDEO_HWACCEL"); + int hw_on = 0; + if(hw_env) + { + hw_on = atoi(hw_env); + } + + int extra_flags = (ncpu > 1 ? SDL_ASYNCBLIT : 0 ); + + if( hw_on == 0 ) + { + veejay_msg(VEEJAY_MSG_WARNING, "Setting up for software emulation"); + vjsdl->flags[0] = SDL_SWSURFACE | SDL_ANYFORMAT | extra_flags; + vjsdl->flags[1] = SDL_SWSURFACE | SDL_FULLSCREEN | SDL_ANYFORMAT | extra_flags; + } + else + { + veejay_msg(VEEJAY_MSG_INFO, "Setting up SDL with Hardware Acceleration"); + vjsdl->flags[0] = SDL_HWSURFACE | SDL_DOUBLEBUF | extra_flags; + vjsdl->flags[1] = SDL_HWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF | extra_flags; + } + + if (vjsdl->custom_geo[0] != -1 && vjsdl->custom_geo[1]!=-1) + { + char exp_str[100]; + sprintf(exp_str, "SDL_VIDEO_WINDOW_POS=%d,%d",vjsdl->custom_geo[0], + vjsdl->custom_geo[1]); + if(putenv(exp_str)==0) + veejay_msg(VEEJAY_MSG_DEBUG,"SDL geometry %d , %d", + vjsdl->custom_geo[0],vjsdl->custom_geo[1]); + } + + + if (scaled_width) + vjsdl->sw_scale_width = scaled_width; + if (scaled_height) + vjsdl->sw_scale_height = scaled_height; + + + SDL_EnableKeyRepeat( SDL_DEFAULT_REPEAT_DELAY, 100 ); + + info = SDL_GetVideoInfo(); + + veejay_msg(VEEJAY_MSG_DEBUG, "Video output driver: SDL"); + veejay_msg( (info->hw_available ? VEEJAY_MSG_DEBUG : VEEJAY_MSG_WARNING), " hw_surface = %s", + (info->hw_available ? "Yes" : "No")); + veejay_msg(VEEJAY_MSG_DEBUG, " window manager = %s", + (info->wm_available ? "Yes" : "No" )); + veejay_msg((info->blit_hw ? VEEJAY_MSG_DEBUG : VEEJAY_MSG_WARNING), " BLIT acceleration: %s ", + ( info->blit_hw ? "Yes" : "No" ) ); + veejay_msg(VEEJAY_MSG_DEBUG, " Software surface: %s", + ( info->blit_sw ? "Yes" : "No" ) ); + veejay_msg(VEEJAY_MSG_DEBUG, " Preferred depth: %d bits/pixel", info->vfmt->BitsPerPixel); + + int my_bpp = SDL_VideoModeOK( vjsdl->sw_scale_width, vjsdl->sw_scale_height,bpp, + vjsdl->flags[fs] ); + if(!my_bpp) + { + veejay_msg(VEEJAY_MSG_ERROR, "Requested depth of %d bits/pixel not supported",bpp); + return 0; + } + + vjsdl->screen = SDL_SetVideoMode( vjsdl->sw_scale_width, vjsdl->sw_scale_height,my_bpp, + vjsdl->flags[fs]); + + if (!vjsdl->screen) + { + veejay_msg(VEEJAY_MSG_WARNING, "%s", SDL_GetError()); + return 0; + } + + veejay_msg(VEEJAY_MSG_DEBUG, " Output dimensions: %d x %d", + vjsdl->sw_scale_width, vjsdl->sw_scale_height ); + + if (vjsdl->use_keyboard == 1) + SDL_EventState(SDL_KEYDOWN, SDL_ENABLE); + else + SDL_EventState(SDL_KEYDOWN, SDL_DISABLE); + + if (vjsdl->mouse_motion == 1) + SDL_EventState(SDL_MOUSEMOTION, SDL_ENABLE); + else + SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); + + + if (vjsdl->show_cursor == 1) + SDL_ShowCursor(SDL_ENABLE); + else + SDL_ShowCursor(SDL_DISABLE); + + SDL_WM_GrabInput( SDL_GRAB_OFF ); + + vjsdl->yuv_overlay = SDL_CreateYUVOverlay(vjsdl->width, + vjsdl->height, + vjsdl->pix_format, + vjsdl->screen); + + if (!vjsdl->yuv_overlay) + { + veejay_msg(VEEJAY_MSG_ERROR, "%s", SDL_GetError()); + return 0; + } + + SDL_VideoDriverName( name, 100 ); + + vjsdl->display = NULL; + if(SDL_GetWMInfo(&wminfo)) + { + if( wminfo.subsystem == SDL_SYSWM_X11 ) + vjsdl->display = wminfo.info.x11.display; + } +#ifndef X_DISPLAY_MISSING + if( vjsdl->display ) + x11_disable_screensaver( vjsdl->display ); +#endif + veejay_msg(VEEJAY_MSG_DEBUG, "Using Video Driver %s", name ); + + veejay_msg(VEEJAY_MSG_INFO, "Initialized %s SDL video overlay (%dx%d), %s", + ( vjsdl->pix_format == SDL_YV12_OVERLAY ? "YV12" : "YUYV"), + scaled_width, scaled_height, + ( vjsdl->yuv_overlay->hw_overlay ? "using Hardware Acceleration" : "not using Hardware Acceleration")); + + vjsdl->rectangle.x = 0; + vjsdl->rectangle.y = 0; + vjsdl->rectangle.w = scaled_width; + vjsdl->rectangle.h = scaled_height; + + if (!vj_sdl_lock(vjsdl)) + { + veejay_msg(VEEJAY_MSG_ERROR, "Cant lock SDL Surface"); + return 0; + } + + sbuffer = (uint8_t *) vjsdl->screen->pixels; + for (i = 0; i < vjsdl->screen->h; ++i) + { + memset(sbuffer, (i * 255) / vjsdl->screen->h, + vjsdl->screen->w * vjsdl->screen->format->BytesPerPixel); + sbuffer += vjsdl->screen->pitch; + } + + char *title = veejay_title(); + SDL_WM_SetCaption(title, NULL); + free(title); + + if (!vj_sdl_unlock(vjsdl)) + return 0; + + + /* + we can draw something on the raw surface. + */ + + if(show) + { + SDL_UpdateRect(vjsdl->screen, 0, 0, vjsdl->rectangle.w, + vjsdl->rectangle.h); + } + + + vjsdl->fs = fs; + + SDL_EnableKeyRepeat( SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL ); + + return 1; +} + +int vj_sdl_screen_w( vj_sdl *vjsdl ) +{ + return vjsdl->screen->w; +} +int vj_sdl_screen_h( vj_sdl *vjsdl ) +{ + return vjsdl->screen->h; +} + +void vj_sdl_show(vj_sdl *vjsdl) { + SDL_UpdateRect(vjsdl->screen,0,0,vjsdl->rectangle.w, vjsdl->rectangle.h); +} + +int vj_sdl_lock(vj_sdl * vjsdl) +{ + if (SDL_MUSTLOCK(vjsdl->screen)) { + if (SDL_LockSurface(vjsdl->screen) < 0) { + sprintf(vjsdl->last_error, "%s", SDL_GetError()); + return 0; + } + } + if (SDL_LockYUVOverlay(vjsdl->yuv_overlay) < 0) { + sprintf(vjsdl->last_error, "%s", SDL_GetError()); + return 0; + } + return 1; +} + +int vj_sdl_unlock(vj_sdl * vjsdl) +{ + if (SDL_MUSTLOCK(vjsdl->screen)) { + SDL_UnlockSurface(vjsdl->screen); + } + SDL_UnlockYUVOverlay(vjsdl->yuv_overlay); + return 1; +} + +uint8_t *vj_sdl_get_yuv_overlay(vj_sdl *vjsdl ) +{ + return vjsdl->yuv_overlay->pixels[0]; +} + +void vj_sdl_flip( vj_sdl *vjsdl ) +{ + SDL_DisplayYUVOverlay( vjsdl->yuv_overlay, &(vjsdl->rectangle)); +} + + +int vj_sdl_update_yuv_overlay(vj_sdl * vjsdl, uint8_t ** yuv420) +{ + if (!vj_sdl_lock(vjsdl)) + return 0; +#ifdef STRICT_CHECKING + assert( yuv420[0] != NULL ); + assert( yuv420[1] != NULL ); + assert( yuv420[2] != NULL ); +#endif + + if(vjsdl->pix_fmt == FMT_420 || vjsdl->pix_fmt == FMT_420F) + yuv420p_to_yuv422( yuv420, vjsdl->yuv_overlay->pixels[0],vjsdl->width,vjsdl->height); + else + yuv422_to_yuyv( yuv420, vjsdl->yuv_overlay->pixels[0], vjsdl->width,vjsdl->height); + + if (!vj_sdl_unlock(vjsdl)) + return 0; + + SDL_DisplayYUVOverlay(vjsdl->yuv_overlay, &(vjsdl->rectangle)); + + return 1; +} + +void vj_sdl_quit() +{ + SDL_Quit(); +} + +void vj_sdl_free(vj_sdl * vjsdl) +{ + SDL_FreeYUVOverlay(vjsdl->yuv_overlay); +// SDL_Quit(); +} +#endif diff --git a/veejay-server/veejay/vj-sdl.h b/veejay-server/veejay/vj-sdl.h new file mode 100644 index 00000000..c9d6789b --- /dev/null +++ b/veejay-server/veejay/vj-sdl.h @@ -0,0 +1,69 @@ +/* veejay - Linux VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef VJ_SDL_H +#define VJ_SDL_H + +#include +#ifdef HAVE_SDL +#include +#include +#include + +typedef struct vj_sdl_t { + SDL_Surface *screen; + SDL_Overlay *yuv_overlay; + SDL_Rect rectangle; + SDL_Event event; + uint32_t flags[2]; + int show_cursor; + int mouse_motion; + int use_keyboard; + int pix_format; + int width; + int height; + int sw_scale_width; + int sw_scale_height; + int frame_size; + char last_error[255]; + int custom_geo[2]; + int fs; + int pix_fmt; + void *display; +} vj_sdl; + +vj_sdl *vj_sdl_allocate(int width, int height, int pixel_format); +void vj_sdl_set_geometry(vj_sdl *sdl, int w, int h); +void vj_sdl_show(vj_sdl *vjsdl); +int vj_sdl_init(int ncpu, vj_sdl * vjsdl, int scaled_width, int scaled_height,const char *caption, int show, int fs); +int vj_sdl_lock(vj_sdl * vjsdl); +int vj_sdl_unlock(vj_sdl * vjsdl); +int vj_sdl_update_yuv_overlay(vj_sdl * vjsdl, uint8_t ** yuv420); +int vj_sdl_direct_yuv_overlay(vj_sdl * vjsdl, uint8_t * buffer, int buflen, + int dataformat); +void vj_sdl_free(vj_sdl * vjsdl); +void vj_sdl_quit(); +uint8_t *vj_sdl_get_yuv_overlay(vj_sdl *vjsdl ); + +void vj_sdl_resize( vj_sdl *vjsdl , int scaled_width, int scaled_height, int fs ); +int vj_sdl_screen_w( vj_sdl *vjsdl ); +int vj_sdl_screen_h( vj_sdl *vjsdl ); +void vj_sdl_flip( vj_sdl *vjsdl ); + +#endif +#endif diff --git a/veejay-server/veejay/vj-viewport.c b/veejay-server/veejay/vj-viewport.c new file mode 100644 index 00000000..fec2b5f3 --- /dev/null +++ b/veejay-server/veejay/vj-viewport.c @@ -0,0 +1,2827 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg + * + * 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. + * + * Viewport with Perspective Transform Estimation for Veejay + * + * Resources: + * Gimp 1.0,2.0 (Perspective transformation (C) Spencer Kimball & Peter Mattis) + * Cinelerra (Motion plugin, no author in any file present. GPL2). + * Xine (bresenham line drawing routine) + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define X0 0 +#define Y0 1 +#define X1 2 +#define Y1 3 +#define X2 4 +#define Y2 5 +#define X3 6 +#define Y3 7 +#ifndef MIN +#define MIN(a,b) ( (a)>(b) ? (b) : (a) ) +#endif +#ifndef MAX +#define MAX(a,b) ( (a)>(b) ? (a) : (b) ) +#endif + +#define clamp1(x, y, z) ((x) = ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x)))) +#define distance1(x1,y1,x2,y2) ( sqrt( (x1 - x2) * (x1 - x2) + ( y1 - y2 ) * (y1 -y2 ) ) ) + +#define round1(x) ( (int32_t)( (x>0) ? (x) + 0.5 : (x) - 0.5 )) +#define min4(a,b,c,d) MIN(MIN(MIN(a,b),c),d) +#define max4(a,b,c,d) MAX(MAX(MAX(a,b),c),d) + +#undef _PREFETCH +#undef _PREFETCHW +#ifdef HAVE_ASM_DNOW +#define _PREFETCH "prefetch" +#define _PREFETCHW "prefetchw" +#elif defined ( HAVE_ASM_MMX2 ) +#define _PREFETCH "prefetchnta" +#define _PREFETCHW "prefetcht0" +#else +#define _PREFETCH "/nop" +#define _PREFETCHW "/nop" +#endif + + +typedef struct +{ + float m[4][4]; +} matrix_t; + +typedef struct +{ + int32_t x,y; + int32_t h,w; + int32_t x0,y0,w0,h0; + float points[9]; + int users[4]; + float usermouse[2]; + int userm; + int user; + int save; + int user_ui; + int user_reverse; + int user_mode; + int grid_size; + int renew; + int disable; + int snap_marker; + int marker_size; + float x1; + float x2; + float x3; + float x4; + float y1; + float y2; + float y3; + float y4; + int32_t *map; + uint8_t *img[4]; + matrix_t *M; + matrix_t *m; + matrix_t *T; + char *help; + uint8_t *grid; + uint8_t grid_val; + int parameters[8]; + char *homedir; + int32_t tx1,tx2,ty1,ty2; + int32_t ttx1,ttx2,tty1,tty2; + int mode; + int32_t *buf; + void *sender; + uint32_t seq_id; +} viewport_t; + +typedef struct +{ + int reverse; + int grid_size; + int grid_color; + int frontback; + int x0,y0,w0,h0; + float x1; + float x2; + float x3; + float x4; + float y1; + float y2; + float y3; + float y4; +} viewport_config_t; + +static void viewport_draw_col( void *data, uint8_t *img, uint8_t *u, uint8_t *v ); +static void viewport_draw( void *data, uint8_t *img ); +static inline int grab_pixel( uint8_t *plane, int x, int y, int w ); +static void viewport_update_perspective( viewport_t *v, float *values ); +static void viewport_update_grid( viewport_t *v, int size, uint8_t val ); +static void viewport_process( viewport_t *p ); +static int viewport_configure( + viewport_t *v, + float x1, float y1, + float x2, float y2, + float x3, float y3, + float x4, float y4, + int32_t x0, int32_t y0, + int32_t w0, int32_t h0, + int32_t w, int32_t h, + uint32_t reverse, + uint8_t color, + int size); + +static void viewport_draw_grid(int32_t w, int32_t h, uint8_t *grid, int32_t grid_size, uint8_t op0); +static matrix_t *viewport_transform(float x1,float y1,float x2,float y2,float *coord ); +static inline void point_map( matrix_t *M, float x, float y, float *nx, float *ny); +static matrix_t * viewport_invert_matrix( matrix_t *M, matrix_t *D ); +static matrix_t *viewport_adjoint_matrix(matrix_t *M); +static double viewport_matrix_determinant( matrix_t *M ); +static matrix_t *viewport_multiply_matrix( matrix_t *A, matrix_t *B ); +static void viewport_copy_from( matrix_t *A, matrix_t *B ); +static void viewport_scale_matrix( matrix_t *M, float sx, float sy ); +static void viewport_translate_matrix( matrix_t *M, float x, float y ); +static matrix_t *viewport_identity_matrix(void); +static matrix_t *viewport_matrix(void); +static void viewport_update_context_help(viewport_t *v); +static void viewport_find_transform( float *coord, matrix_t *M ); +static void viewport_print_matrix( matrix_t *M ); +void viewport_line (uint8_t *plane,int x1, int y1, int x2, int y2, int w, int h, uint8_t col); +static void draw_point( uint8_t *plane, int x, int y, int w, int h, int size, int col ); +static viewport_config_t *viewport_load_settings( const char *dir, int mode ); +static void viewport_save_settings( viewport_t *v , int frontback); +static void viewport_prepare_process( viewport_t *v ); + +#ifdef HAVE_X86CPU +static inline int int_max( int a, int b ) +{ + b = a-b; + a -= b & (b>>31); + return a; +} +static inline int int_min( int a, int b ) +{ + b = b- a; + a += b & (b>>31); // if(a < b) then a = b + return a; +} +#else +static inline int int_max(int a, int b ) +{ + return MAX(a,b); +} +static inline int int_min(int a, int b ) +{ + return MIN(a,b); +} +#endif + +static void viewport_print_matrix( matrix_t *M ) +{ + veejay_msg(0, "|%f\t%f\t%f", M->m[0][0], M->m[0][1], M->m[0][2] ); + veejay_msg(0, "|%f\t%f\t%f", M->m[1][0], M->m[1][1], M->m[1][2] ); + veejay_msg(0, "|%f\t%f\t%f", M->m[2][0], M->m[2][1], M->m[2][2] ); +} +/* + * Bresenham line implementation from Xine + */ + +void viewport_line (uint8_t *plane, + int x1, int y1, int x2, int y2, int w, int h, uint8_t col) { + + uint8_t *c; + int dx, dy, t, inc, d, inc1, inc2; + int swap_x = 0; + int swap_y = 0; + + if( x1 < 0 ) x1 = 0; else if (x1 > w ) x1 = w; + if( y1 < 0 ) y1 = 0; else if (y1 > h ) y1 = h; + if( x2 < 0 ) x2 = 0; else if (x2 > w ) x2 = w; + if( y2 < 0 ) y2 = 0; else if (y2 > h ) y2 = h; + + /* sort line */ + if (x2 < x1) { + t = x1; + x1 = x2; + x2 = t; + swap_x = 1; + } + if (y2 < y1) { + t = y1; + y1 = y2; + y2 = t; + swap_y = 1; + } + + /* clip line */ + if (x1 < 0) { + y1 = y1 + (y2-y1) * -x1 / (x2-x1); + x1 = 0; + } + if (y1 < 0) { + x1 = x1 + (x2-x1) * -y1 / (y2-y1); + y1 = 0; + } + if (x2 > w) { + y2 = y1 + (y2-y1) * (w-x1) / (x2-x1); + x2 = w; + } + if (y2 > h) { + x2 = x1 + (x2-x1) * (h-y1) / (y2-y1); + y2 = h; + } + + if (x1 >= w || y1 >= h) + return; + + dx = x2 - x1; + dy = y2 - y1; + + /* unsort line */ + if (swap_x) { + t = x1; + x1 = x2; + x2 = t; + } + if (swap_y) { + t = y1; + y1 = y2; + y2 = t; + } + + if( dx>=dy ) { + if( x1>x2 ) + { + t = x2; x2 = x1; x1 = t; + t = y2; y2 = y1; y1 = t; + } + + if( y2 > y1 ) inc = 1; else inc = -1; + + inc1 = 2*dy; + d = inc1 - dx; + inc2 = 2*(dy-dx); + + c = plane + y1 * w + x1; + + while(x1y2 ) { + t = x2; x2 = x1; x1 = t; + t = y2; y2 = y1; y1 = t; + } + + if( x2 > x1 ) inc = 1; else inc = -1; + + inc1 = 2*dx; + d = inc1-dy; + inc2 = 2*(dx-dy); + + c = plane + y1 * w + x1; + + while(y1 w ) x1 = w; + if( y1 < 0 ) y1 = 0; else if ( y1 > h ) y1 = h; + if( x2 < 0 ) x2 = 0; else if ( x2 > w ) x2 = w; + if( y2 < 0 ) y2 = 0; else if ( y2 > h ) y2 = h; + + unsigned int i,j; + for( i = y1; i < y2; i ++ ) + { + for( j = x1; j < x2 ; j ++ ) + plane[ i * w + j ] = col; + } +} + +static void viewport_find_transform( float *coord, matrix_t *M ) +{ + double dx1,dx2,dx3,dy1,dy2,dy3; + double det1,det2; + + dx1 = coord[X1] - coord[X3]; + dx2 = coord[X2] - coord[X3]; + dx3 = coord[X0] - coord[X1] + coord[X3] - coord[X2]; + + dy1 = coord[Y1] - coord[Y3]; + dy2 = coord[Y2] - coord[Y3]; + dy3 = coord[Y0] - coord[Y1] + coord[Y3] - coord[Y2]; + + /* is the mapping affine? */ + if( ((dx3 == 0.0) && (dy3==0.0)) ) + { + M->m[0][0] = coord[X1] - coord[X0]; + M->m[0][1] = coord[X3] - coord[X1]; + M->m[0][2] = coord[X0]; + + M->m[1][0] = coord[Y1] - coord[Y0]; + M->m[1][1] = coord[Y3] - coord[Y1]; + M->m[1][2] = coord[Y0]; + + M->m[2][0] = 0.0; + M->m[2][1] = 0.0; + } + else + { + det1 = dx3 * dy2 - dy3 * dx2; + det2 = dx1 * dy2 - dy1 * dx2; + M->m[2][0] = det1/det2; + + det1 = dx1 * dy3 - dy1 * dx3; + det2 = dx1 * dy2 - dy1 * dx2; + M->m[2][1] = det1/det2; + + M->m[0][0] = coord[X1] - coord[X0] + M->m[2][0] * coord[X1]; + M->m[0][1] = coord[X2] - coord[X0] + M->m[2][1] * coord[X2]; + M->m[0][2] = coord[X0]; + + M->m[1][0] = coord[Y1] - coord[Y0] + M->m[2][0] * coord[Y1]; + M->m[1][1] = coord[Y2] - coord[Y0] + M->m[2][1] * coord[Y2]; + M->m[1][2] = coord[Y0]; + } + + M->m[2][2] = 1.0; +} + +static void viewport_update_context_help(viewport_t *v) +{ + char render_mode[32]; + sprintf(render_mode, "%s", ( v->user_ui == 0 ? "Grid Mode" : "Render Mode" ) ); + char reverse_mode[32]; + sprintf(reverse_mode, "%s", ( v->user_reverse ? "Forward" : "Reverse" ) ); + char tmp[1024]; + char hlp[1024]; + + if( v->user_ui ) + { + sprintf(tmp, "Mouse Left: Find center of blob\nMouse Left + SHIFT: Set point\nMouse Left + ALTGr: Set projection quad\nMouse Right: %s\nMouse Middle: %s\nMouse Middle + SHIFT: Line Color\nMouse Wheel: Marker size\nMouse Wheel + ALTGr: Scale projection quad\nMouse Wheel + CTRL: Scale camera and projection quad\nCTRL + h:Hide/Show this Help", + reverse_mode, render_mode); + } + else + sprintf(tmp, "Mouse Right = %s\nMouse Middle = %s\nCTRL + h = Hide/Show this Help\nMouse Wheel + CTRL = Scale quads\nMouse Wheel + ALTGr = Scale projection area", reverse_mode, render_mode ); + + if(v->mode == 0 ) + { + if( v->user_ui ) + sprintf(hlp, "Viewport\nPerspective Transform\n%s\n(1) %.2fx%.2f Pos: %.2fx%.2f\n(2) %.2fx%.2f\n(3) %.2fx%.2f\n(4) %.2fx%.2f\n", + tmp,v->x1,v->y1, v->usermouse[0],v->usermouse[1], + v->x2,v->y2,v->x3,v->y3,v->x4,v->y4 ); + else + sprintf(hlp, "Viewport\nPerspective Transform %s\n%s", + reverse_mode, tmp ); + } + else + { + if(v->user_ui ) + sprintf(hlp, "Interactive Camera/Projection setup\n%s\n(1) %.2fx%.2f Pos: %.2fx%.2f\n(2) %.2fx%.2f\n(3) %.2fx%.2f\n(4) %.2fx%.2f\n", + tmp,v->x1,v->y1, v->usermouse[0],v->usermouse[1], + v->x2,v->y2,v->x3,v->y3,v->x4,v->y4 ); + else + sprintf(hlp, "Interactive Camera/Projection\nPerspective Transform %s\n%s", reverse_mode, tmp ); + + } + + if(v->help) + free(v->help); + v->help = strdup( hlp ); +} + +char *viewport_get_my_help(viewport_t *v) +{ + char render_mode[32]; + sprintf(render_mode, "%s", ( v->user_ui == 0 ? "Grid Mode" : "Render Mode" ) ); + char reverse_mode[32]; + sprintf(reverse_mode, "%s", ( v->user_reverse ? "Forward" : "Reverse" ) ); + char tmp[1024]; + char hlp[1024]; + + if( v->user_ui ) + { + sprintf(tmp, "Mouse Left: Find center of blob\nMouse Left + LSHIFT: Set point\nMouse Left + RSHIFT: Set projection quad\nMouse Right: %s\nMouse Middle: %s\nMouse Middle + LSHIFT: Line Color\nMouse Wheel: Marker size (%dx%d)\nMouse Wheel + RSHIFT:Scale projection quad\nMouse Wheel + CTRL: Scale camera and projection quad\nCTRL + h:Hide/Show this Help", + reverse_mode, render_mode , v->marker_size,v->marker_size); + } + else + sprintf(tmp, "Mouse Right = %s\nMouse Middle = %s\nCTRL + h = Hide/Show this Help\nMouse Wheel + CTRL = Scale quads\nMouse Wheel + ALTGr = Scale projection area", reverse_mode, render_mode ); + + if(v->mode == 0 ) + { + if( v->user_ui ) + sprintf(hlp, "Viewport\nPerspective Transform\n%s\n",tmp ); + else + sprintf(hlp, "Viewport\nPerspective Transform %s\n%s", + reverse_mode, tmp ); + } + else + { + if(v->user_ui ) + sprintf(hlp, "Interactive Camera/Projection setup\n%s",tmp ); + else + sprintf(hlp, "Interactive Camera/Projection\nPerspective Transform %s\n%s", reverse_mode, tmp ); + + } + + return strdup( hlp ); +} + + +static matrix_t *viewport_matrix(void) +{ + matrix_t *M = (matrix_t*) vj_malloc(sizeof(matrix_t)); + uint32_t i,j; + for( i = 0;i < 3 ; i ++ ) + { + for( j = 0; j < 3 ; j++ ) + M->m[i][j] = 0.0; + } + return M; +} + +static matrix_t *viewport_identity_matrix(void) +{ + matrix_t *M = viewport_matrix(); + M->m[0][0] = 1.0; + M->m[1][1] = 1.0; + M->m[2][2] = 1.0; + return M; +} + +static void viewport_translate_matrix( matrix_t *M, float x, float y ) +{ + float g = M->m[2][0]; + float h = M->m[2][1]; + float i = M->m[2][2]; + + M->m[0][0] += x * g; + M->m[0][1] += x * h; + M->m[0][2] += x * i; + + M->m[1][0] += y * g; + M->m[1][1] += y * h; + M->m[1][2] += y * i; +} + +static void viewport_scale_matrix( matrix_t *M, float sx, float sy ) +{ + M->m[0][0] *= sx; + M->m[0][1] *= sx; + M->m[0][2] *= sx; + + M->m[1][0] *= sy; + M->m[1][1] *= sy; + M->m[1][2] *= sy; +} + +static void viewport_copy_from( matrix_t *A, matrix_t *B ) +{ + uint32_t i,j; + for( i =0 ; i < 3; i ++ ) + for( j = 0; j < 3 ; j ++ ) + A->m[i][j] = B->m[i][j]; +} + +static matrix_t *viewport_multiply_matrix( matrix_t *A, matrix_t *B ) +{ + matrix_t *R = viewport_matrix(); + + R->m[0][0] = A->m[0][0] * B->m[0][0] + A->m[0][1] * B->m[1][0] + A->m[0][2] * B->m[2][0]; + R->m[0][1] = A->m[0][0] * B->m[0][1] + A->m[0][1] * B->m[1][1] + A->m[0][2] * B->m[2][1]; + R->m[0][2] = A->m[0][0] * B->m[0][2] + A->m[0][1] * B->m[1][2] + A->m[0][2] * B->m[2][2]; + + R->m[1][0] = A->m[1][0] * B->m[0][0] + A->m[1][1] * B->m[1][0] + A->m[1][2] * B->m[2][0]; + R->m[1][1] = A->m[1][0] * B->m[0][1] + A->m[1][1] * B->m[1][1] + A->m[1][2] * B->m[2][1]; + R->m[1][2] = A->m[1][0] * B->m[0][2] + A->m[1][1] * B->m[1][2] + A->m[1][2] * B->m[2][2]; + + R->m[2][0] = A->m[2][0] * B->m[0][0] + A->m[2][1] * B->m[0][1] + A->m[2][2] * B->m[2][0]; + R->m[2][1] = A->m[2][0] * B->m[0][1] + A->m[2][1] * B->m[1][1] + A->m[2][2] * B->m[2][1]; + R->m[2][2] = A->m[2][0] * B->m[0][2] + A->m[2][1] * B->m[1][2] + A->m[2][2] * B->m[2][2]; + + + return R; +} + +static double viewport_matrix_determinant( matrix_t *M ) +{ + double D = M->m[0][0] * M->m[1][1] * M->m[2][2] + + M->m[0][1] * M->m[1][2] * M->m[2][0] + + M->m[2][0] * M->m[1][1] * M->m[0][2] - + M->m[1][0] * M->m[0][1] * M->m[2][2] - + M->m[2][1] * M->m[1][2] * M->m[0][0]; + + return D; +} + +static matrix_t *viewport_adjoint_matrix(matrix_t *M) +{ + matrix_t *A = viewport_matrix(); + A->m[0][0] = M->m[0][0]; + A->m[0][1] = -M->m[0][1]; + A->m[0][2] = M->m[0][2]; + A->m[1][0] = -M->m[1][0]; + A->m[1][1] = M->m[1][1]; + A->m[1][2] = -M->m[1][2]; + A->m[2][0] = M->m[2][0]; + A->m[2][1] = -M->m[2][1]; + A->m[2][2] = M->m[2][2]; + return A; +} + +static matrix_t * viewport_invert_matrix( matrix_t *M, matrix_t *D ) +{ + double det = viewport_matrix_determinant( M ); + if( det == 0.0 ) + { + veejay_msg(0, "det = %f, inverse of matrix not possible"); + return NULL; + } + det = 1.0 / det; + + D->m[0][0] = (M->m[1][1] * M->m[2][2] - M->m[1][2] * M->m[2][1] ) * det; + D->m[1][0] = (M->m[1][0] * M->m[2][2] - M->m[1][2] * M->m[2][0] ) * det; + D->m[2][0] = (M->m[1][0] * M->m[2][1] - M->m[1][1] * M->m[2][0] ) * det; + D->m[0][1] = (M->m[0][1] * M->m[2][2] - M->m[0][2] * M->m[2][1] ) * det; + D->m[1][1] = (M->m[0][0] * M->m[2][2] - M->m[0][2] * M->m[2][0] ) * det; + D->m[2][1] = (M->m[0][0] * M->m[2][1] - M->m[0][1] * M->m[2][0] ) * det; + D->m[0][2] = (M->m[0][1] * M->m[1][2] - M->m[0][2] * M->m[1][1] ) * det; + D->m[1][2] = (M->m[0][0] * M->m[1][2] - M->m[0][2] * M->m[1][0] ) * det; + D->m[2][2] = (M->m[0][0] * M->m[1][1] - M->m[0][1] * M->m[1][0] ) * det; + + matrix_t *A = viewport_adjoint_matrix( D ); + + return A; +} + +static inline void point_map( matrix_t *M, float x, float y, float *nx, float *ny) +{ + float w = M->m[2][0] * x + M->m[2][1] * y + M->m[2][2]; + + if( w == 0.0 ) + w = 1.0; + else + w = 1.0 / w; + + *nx = (M->m[0][0] * x + M->m[0][1] * y + M->m[0][2] ) * w; + *ny = (M->m[1][0] * x + M->m[1][1] * y + M->m[1][2] ) * w; + +} + + + +static matrix_t *viewport_transform( + float x1, + float y1, + float x2, + float y2, + float *coord ) +{ + float sx=1.0,sy=1.0; + + if( (x2-x1) > 0.0 ) + sx = 1.0 / (x2-x1); + if( (y2-y1) > 0.0 ) + sy = 1.0 / (y2-y1); + + matrix_t *H = viewport_matrix(); + viewport_find_transform( coord, H ); + + matrix_t *I = viewport_identity_matrix(); + viewport_translate_matrix( I, -x1, -y1 ); + viewport_scale_matrix( I, sx,sy ); + matrix_t *R = viewport_multiply_matrix( H,I ); + free(I); + free(H); + return R; +} + + +static void viewport_draw_grid(int32_t w, int32_t h, uint8_t *grid, int32_t grid_size, uint8_t op0) +{ + int32_t j,k; + uint8_t op1 = 0xff - op0; + for( j = 0; j < h; j ++ ) + for( k = 0;k < w ; k ++ ) + grid[j*w+k] = ((k%grid_size>1)?((j%grid_size>1)? op1 : op0 ) : op0 ); +} + +void viewport_get_projection_coords( void *data, int32_t *x0, int32_t *y0, int32_t *w0, int32_t *h0 ) +{ + viewport_t *v = (viewport_t*) data; + + *x0 = v->x0; + *y0 = v->y0; + *w0 = v->w0; + *h0 = v->h0; +} + +float *viewport_get_projection_points( void *data ) +{ + viewport_t *v = (viewport_t*) data; + float *res = vj_malloc( sizeof(float) * 8 ); + + res[0] = v->x0; + res[1] = v->y0; + res[2] = v->x0 + v->w0; + res[3] = v->y0; + res[4] = v->x0; + res[5] = v->y0 + v->h0; + res[6] = v->x0 + v->w0; + res[7] = v->y0 + v->h0; + + return res; +} + +void viewport_set_projection( void *data, float *res ) +{ + viewport_t *v = (viewport_t*) data; + v->x1 = res[0]; + v->y1 = res[1]; + v->x2 = res[2]; + v->y2 = res[3]; + v->x3 = res[4]; + v->y3 = res[5]; + v->x4 = res[6]; + v->y4 = res[7]; + +} + +static int viewport_configure( + viewport_t *v, + float x1, float y1, /* output */ + float x2, float y2, + float x3, float y3, + float x4, float y4, + int32_t x0, int32_t y0, /* input */ + int32_t w0, int32_t h0, + int32_t wid, int32_t hei, + uint32_t reverse, + uint8_t color, + int size) +{ + //FIXME + int w = wid, h = hei; + + v->grid_size = size; + + + v->points[X0] = (float) x1 * (float) w / 100.0; + v->points[Y0] = (float) y1 * (float) h / 100.0; + + v->points[X1] = (float) x2 * (float) w / 100.0; + v->points[Y1] = (float) y2 * (float) h / 100.0; + + v->points[X2] = (float) x3 * (float) w / 100.0; + v->points[Y2] = (float) y3 * (float) h / 100.0; + + v->points[X3] = (float) x4 * (float) w / 100.0; + v->points[Y3] = (float) y4 * (float) h / 100.0; + + v->w = wid; /* image plane boundaries */ + v->x = 0; + v->h = hei; + v->y = 0; + + v->x0 = x0; + v->y0 = y0; + v->w0 = w0; + v->h0 = h0; + + v->grid_size = size; + v->grid_val = color; + + v->x1 = x1; + v->x2 = x2; + v->x3 = x3; + v->x4 = x4; + v->y1 = y1; + v->y2 = y2; + v->y3 = y3; + v->y4 = y4; + v->user_reverse = reverse; + + float tmp = v->points[X3]; + v->points[X3] = v->points[X2]; + v->points[X2] = tmp; + tmp = v->points[Y3]; + v->points[Y3] = v->points[Y2]; + v->points[Y2] = tmp; + + matrix_t *m = viewport_transform( x0, y0, x0 + w0, y0 + h0, v->points ); + + if ( reverse ) + { + v->m = viewport_matrix(); + viewport_copy_from( v->m, m ); + matrix_t *im = viewport_matrix(); + v->M = viewport_invert_matrix( v->m, im ); + if(!v->M) + { + free(im); + free(v->m); + return 0; + } + free(im); + viewport_prepare_process( v ); + return 1; + + } + else + { + matrix_t *tmp = viewport_matrix(); + matrix_t *im = viewport_invert_matrix( m, tmp ); + free(tmp); + if(!im) + { + free(m); + return 0; + } + v->M = m; + v->m = im; + viewport_prepare_process( v ); + return 1; + } + + return 0; +} + +static void viewport_process( viewport_t *p ) +{ + const int32_t w = p->w; + const int32_t h = p->h; + const int32_t X = p->x0; + const int32_t Y = p->y0; + const int32_t W0 = p->w0; + const int32_t H0 = p->h0; + + matrix_t *M = p->M; + matrix_t *m = p->m; + + const int len = w * h; + const float xinc = m->m[0][0]; + const float yinc = m->m[1][0]; + const float winc = m->m[2][0]; + + const int32_t tx1 = p->ttx1; + const int32_t tx2 = p->ttx2; + const int32_t ty1 = p->tty1; + const int32_t ty2 = p->tty2; + + const float m01 = m->m[0][1]; + const float m11 = m->m[1][1]; + const float m21 = m->m[2][1]; + const float m02 = m->m[0][2]; + const float m12 = m->m[1][2]; + const float m22 = m->m[2][2]; + + float tx,ty,tw; + float ttx,tty; + int32_t x,y; + int32_t itx,ity; + + int32_t *map = p->map; + register int32_t pos = 0; + + for( y = ty1; y < ty2; y ++ ) + { + tx = xinc * ( tx1 + 0.5 ) + m01 * ( y + 0.5) + m02; + ty = yinc * ( tx1 + 0.5 ) + m11 * ( y + 0.5) + m12; + tw = winc * ( tx1 + 0.5 ) + m21 * ( y + 0.5) + m22; + + for( x = tx1; x < tx2 ; x ++ ) + { + if( tw == 0.0 ) { + ttx = 0.0; + tty = 0.0; + } else if ( tw != 1.0 ) { + ttx = tx / tw; + tty = ty / tw; + } else { + ttx = tx; + tty = ty; + } + + itx = (int32_t) ttx; + ity = (int32_t) tty; + + pos = ity * w + itx; + + if( pos >= 0 && pos < len ) + map[ (y * w + x) ] = pos; + else + map[ (y * w + x) ] = (len+1); + + tx += xinc; + ty += yinc; + tw += winc; + } + } + + +} + +static void viewport_prepare_process( viewport_t *v ) +{ + const int32_t w = v->w; + const int32_t h = v->h; + + const int32_t X = v->x0; + const int32_t Y = v->y0; + + float dx1,dx2,dx3,dx4,dy1,dy2,dy3,dy4; + matrix_t *M = v->M; + + point_map( M, v->x, v->y, &dx1, &dy1); + point_map( M, v->x + v->w, v->y, &dx2, &dy2 ); + point_map( M, v->x, v->y + v->h, &dx4, &dy4 ); + point_map( M, v->x + v->w, v->y + v->h, &dx3, &dy3 ); + + v->tx1 = round1( min4( dx1, dx2, dx3, dx4 ) ); + v->ty1 = round1( min4( dy1, dy2, dy3, dy4 ) ); + v->tx2 = round1( max4( dx1, dx2, dx3, dx4 ) ); + v->ty2 = round1( max4( dy1, dy2, dy3, dy4 ) ); + + clamp1( v->ty1 , Y, Y + v->h0 ); + clamp1( v->ty2 ,Y,Y + v->h0 ); + clamp1( v->tx1, X, X + v->w0 ); + clamp1( v->tx2, X, X + v->w0 ); + + v->ttx2 = v->tx2; + v->tty2 = v->ty2; + v->ttx1 = v->tx1; + v->tty1 = v->ty1; + + clamp1( v->ttx2,0, v->w ); + clamp1( v->tty2,0, v->h ); + clamp1( v->ttx1,0, v->w ); + clamp1( v->tty1,0, v->h ); + +} + + +void viewport_process_dynamic_map( void *data, uint8_t *in[3], uint8_t *out[3], uint32_t *map, int feather ) +{ + viewport_t *v = (viewport_t*) data; + const int32_t w = v->w; + const int32_t h = v->h; + const int32_t X = v->x0; + const int32_t Y = v->y0; + const int32_t W0 = v->w0; + const int32_t H0 = v->h0; + matrix_t *M = v->M; + matrix_t *m = v->m; + + const float xinc = m->m[0][0]; + const float yinc = m->m[1][0]; + const float winc = m->m[2][0]; + const int32_t tx1 = v->ttx1; + const int32_t tx2 = v->ttx2; + const int32_t ty1 = v->tty1; + const int32_t ty2 = v->tty2; + + const float m01 = m->m[0][1]; + const float m11 = m->m[1][1]; + const float m21 = m->m[2][1]; + const float m02 = m->m[0][2]; + const float m12 = m->m[1][2]; + const float m22 = m->m[2][2]; + + const uint8_t *inY = in[0]; + const uint8_t *inU = in[1]; + const uint8_t *inV = in[2]; + + uint8_t *outY = out[0]; + uint8_t *outU = out[1]; + uint8_t *outV = out[2]; + + float tx,ty,tw; + float ttx,tty; + int32_t x,y; + int32_t itx,ity; +/* +#if defined (HAVE_ASM_MMX) || defined (HAVE_AMS_SSE ) + + fast_memset_dirty( outY , 0, ty1 * v->w ); + fast_memset_dirty( outU , 128, ty1 * v->w ); + fast_memset_dirty( outV , 128, ty1 * v->w ); + fast_memset_finish(); +#else + + for( y =0 ; y < ty1; y ++ ) + { + for( x = 0 ; x < w ; x ++ ) + { + outY[ (y * w +x ) ] = 0; + outU[ (y * w +x ) ] = 128; + outV[ (y * w +x ) ] = 128; + } + } +#endif +*/ + for( y = ty1; y < ty2; y ++ ) + { + tx = xinc * ( tx1 + 0.5 ) + m01 * ( y + 0.5) + m02; + ty = yinc * ( tx1 + 0.5 ) + m11 * ( y + 0.5) + m12; + tw = winc * ( tx1 + 0.5 ) + m21 * ( y + 0.5) + m22; + /* for( x = 0; x < tx1; x ++ ) + { + outY[(y*w+x)] = 0; + outU[(y*w+x)] = 128; + outV[(y*w+x)] = 128; + }*/ + + for( x = tx1; x < tx2 ; x ++ ) + { + if( tw == 0.0 ) { + ttx = 0.0; + tty = 0.0; + } else if ( tw != 1.0 ) { + ttx = tx / tw; + tty = ty / tw; + } else { + ttx = tx; + tty = ty; + } + + itx = (int32_t) ttx; + ity = (int32_t) tty; + + if( itx >= X && itx <= w && ity >= Y && ity < h + && + map[( y * w + x)] >= feather ) + { + outY[(y*w+x)] = inY[(ity*w+itx)]; + outU[(y*w+x)] = inU[(ity*w+itx)]; + outV[(y*w+x)] = inV[(ity*w+itx)]; + } + /*else + { + outY[(y*w+x)] = 0; + outU[(y*w+x)] = 128; + outV[(y*w+x)] = 128; + + }*/ + + tx += xinc; + ty += yinc; + tw += winc; + } + /* + for( x = tx2; x < w; x ++ ) + { + outY[(y*w+x)] = 0; + outU[(y*w+x)] = 128; + outV[(y*w+x)] = 128; + }*/ + + } +/* +#if defined (HAVE_ASM_MMX) || defined (HAVE_AMS_SSE ) + int rest = h - ty2; + fast_memset_dirty( outY + (ty2 * v->w),0, rest * v->w ); + fast_memset_dirty( outU + (ty2 * v->w), 128, rest * v->w ); + fast_memset_dirty( outV + (ty2 * v->w), 128, rest * v->w ); + fast_memset_finish(); +#else + for( y = ty2 ; y < h; y ++ ) + { + for( x = 0; x < w; x ++ ) + { + outY[(y*w+x)] = 0; + outU[(y*w+x)] = 128; + outV[(y*w+x)] = 128; + } + } +#endif +*/ + +} +void viewport_process_dynamic( void *data, uint8_t *in[3], uint8_t *out[3] ) +{ + viewport_t *v = (viewport_t*) data; + const int32_t w = v->w; + const int32_t h = v->h; + const int32_t X = v->x0; + const int32_t Y = v->y0; + matrix_t *M = v->M; + matrix_t *m = v->m; + + const float xinc = m->m[0][0]; + const float yinc = m->m[1][0]; + const float winc = m->m[2][0]; + const int32_t tx1 = v->ttx1; + const int32_t tx2 = v->ttx2; + const int32_t ty1 = v->tty1; + const int32_t ty2 = v->tty2; + + const float m01 = m->m[0][1]; + const float m11 = m->m[1][1]; + const float m21 = m->m[2][1]; + const float m02 = m->m[0][2]; + const float m12 = m->m[1][2]; + const float m22 = m->m[2][2]; + + const uint8_t *inY = in[0]; + const uint8_t *inU = in[1]; + const uint8_t *inV = in[2]; + + uint8_t *outY = out[0]; + uint8_t *outU = out[1]; + uint8_t *outV = out[2]; + + float tx,ty,tw; + float ttx,tty; + int32_t x,y; + int32_t itx,ity; + +#if defined (HAVE_ASM_MMX) || defined (HAVE_AMS_SSE ) + + fast_memset_dirty( outY , 0, ty1 * v->w ); + fast_memset_dirty( outU , 128, ty1 * v->w ); + fast_memset_dirty( outV , 128, ty1 * v->w ); + fast_memset_finish(); +#else + + for( y =0 ; y < ty1; y ++ ) + { + for( x = 0 ; x < w ; x ++ ) + { + outY[ (y * w +x ) ] = 0; + outU[ (y * w +x ) ] = 128; + outV[ (y * w +x ) ] = 128; + } + } +#endif + + for( y = ty1; y < ty2; y ++ ) + { + tx = xinc * ( tx1 + 0.5 ) + m01 * ( y + 0.5) + m02; + ty = yinc * ( tx1 + 0.5 ) + m11 * ( y + 0.5) + m12; + tw = winc * ( tx1 + 0.5 ) + m21 * ( y + 0.5) + m22; + for( x = 0; x < tx1; x ++ ) + { + outY[(y*w+x)] = 0; + outU[(y*w+x)] = 128; + outV[(y*w+x)] = 128; + } + + for( x = tx1; x < tx2 ; x ++ ) + { + if( tw == 0.0 ) { + ttx = 0.0; + tty = 0.0; + } else if ( tw != 1.0 ) { + ttx = tx / tw; + tty = ty / tw; + } else { + ttx = tx; + tty = ty; + } + + itx = (int32_t) ttx; + ity = (int32_t) tty; + + if( itx >= X && itx <= w && ity >= Y && ity < h ) + { + outY[(y*w+x)] = inY[(ity*w+itx)]; + outU[(y*w+x)] = inU[(ity*w+itx)]; + outV[(y*w+x)] = inV[(ity*w+itx)]; + } + else + { + outY[(y*w+x)] = 0; + outU[(y*w+x)] = 128; + outV[(y*w+x)] = 128; + + } + + tx += xinc; + ty += yinc; + tw += winc; + } + for( x = tx2; x < w; x ++ ) + { + outY[(y*w+x)] = 0; + outU[(y*w+x)] = 128; + outV[(y*w+x)] = 128; + } + + } + +#if defined (HAVE_ASM_MMX) || defined (HAVE_AMS_SSE ) + int rest = h - ty2; + fast_memset_dirty( outY + (ty2 * v->w),0, rest * v->w ); + fast_memset_dirty( outU + (ty2 * v->w), 128, rest * v->w ); + fast_memset_dirty( outV + (ty2 * v->w), 128, rest * v->w ); + fast_memset_finish(); +#else + for( y = ty2 ; y < h; y ++ ) + { + for( x = 0; x < w; x ++ ) + { + outY[(y*w+x)] = 0; + outU[(y*w+x)] = 128; + outV[(y*w+x)] = 128; + } + } +#endif +} + + +void viewport_destroy( void *data ) +{ + viewport_t *v = (viewport_t*)data; + if( v ) + { + if( v->M ) free( v->M ); + if( v->m ) free( v->m ); + if( v->T ) free( v->T ); + if( v->grid) free( v->grid ); + if( v->map ) free( v->map ); + if( v->help ) free( v->help ); + if( v->homedir) free(v->homedir); + if( v->buf ) free(v->buf); + free(v); + } + v = NULL; +} + +static void viewport_update_grid( viewport_t *v, int size, uint8_t val ) +{ + v->grid_size = size; + v->grid_val = val; + + viewport_draw_grid( v->w, v->h, v->grid, v->grid_size, v->grid_val ); +} + +static void viewport_update_perspective( viewport_t *v, float *values ) +{ + int res = viewport_configure (v, v->x1, v->y1, + v->x2, v->y2, + v->x3, v->y3, + v->x4, v->y4, + v->x0, v->y0, + v->w0, v->h0, + v->w, v->h, + v->user_reverse, + v->grid_val, + v->grid_size ); + + + if(! res ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Viewport: Invalid quadrilateral. Trying to fallback"); + + v->x1 = values[0]; v->x2 = values[2]; v->x3 = values[4]; v->x4 = values[6]; + v->y1 = values[1]; v->y2 = values[3]; v->y3 = values[5]; v->y4 = values[7]; + + if(!viewport_configure( v, v->x1, v->y1, v->x2, v->y2, v->x3, v->y3,v->x4,v->y4, + v->x0, v->y0, v->w0, v->h0,v->w,v->h, v->user_reverse, v->grid_val,v->grid_size )); + { + veejay_msg(VEEJAY_MSG_ERROR, "Unable to configure the viewport"); + veejay_msg(VEEJAY_MSG_ERROR, "If you are using a preset-configuration, see ~/.veejay/viewport.cfg"); + v->disable = 1; + return; + } + } + + + // Clear map + const int len = v->w * v->h; + int k; + for( k = 0 ; k < len ; k ++ ) + v->map[k] = len+1; + + v->disable = 0; + + // Update map + viewport_process( v ); +} + + +void *viewport_init(int x0, int y0, int w0, int h0, int w, int h, const char *homedir, int *enable, int *frontback, int mode ) +{ + //@ try to load last saved settings + viewport_config_t *vc = viewport_load_settings( homedir,mode ); + if(!vc) + { + veejay_msg(VEEJAY_MSG_ERROR, "No or invalid viewport configuration file in %s", homedir ); + veejay_msg(VEEJAY_MSG_ERROR, "Using default values"); + } + + viewport_t *v = (viewport_t*) vj_calloc(sizeof(viewport_t)); + + v->homedir = strdup(homedir); + v->mode = mode; + v->marker_size = 4; + int res; + + if( vc == NULL ) + { + res = viewport_configure (v, 16.0, 16.0, + 90.0, 16.0, + 16.0, 90.0, + 90.0, 90.0, + // 90.0,90.0, + // 16.0,90.0, + x0,y0,w0,h0, + w,h, + 1, + 0xff, + w/16 ); + + *enable = 0; + *frontback = 1; + v->user_ui = 1; + + } + else + { + res = viewport_configure( v, vc->x1, vc->y1, + vc->x2, vc->y2, + vc->x3, vc->y3, + vc->x4, vc->y4, + vc->x0, vc->y0, + vc->w0, vc->h0, + w,h, + vc->reverse, + vc->grid_color, + vc->grid_size ); + + *enable = 1; + *frontback = vc->frontback; + v->user_ui = 0; + + free( vc ); + } + + + if(! res ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid point locations"); + viewport_destroy( v ); + return NULL; + } + + // Allocate memory for map + v->map = (int32_t*) vj_malloc(sizeof(int32_t) * (v->w * v->h + v->w) ); + + const int len = v->w * v->h; + int k; + for( k = 0 ; k < len ; k ++ ) + v->map[k] = len+1; + + // Allocate memory for grid + v->grid = (uint8_t*) vj_malloc( len + v->w ); + + //draw grid +// viewport_draw_grid( v->w, v->h, v->grid, v->grid_size, v->grid_val ); + + // calculate initial view + viewport_process( v ); + + v->buf = vj_calloc( sizeof(int32_t) * 50000 ); + + return (void*)v; +} + +int viewport_active( void *data ) +{ + viewport_t *v = (viewport_t*) data; + return v->user_ui; +} + +char *viewport_get_help(void *data) +{ + viewport_t *v = (viewport_t*)data; + return v->help; +} + +static viewport_config_t *viewport_load_settings( const char *dir, int mode ) +{ + viewport_config_t *vc = vj_calloc(sizeof(viewport_config_t)); + + char path[1024]; + if(!mode) + sprintf(path, "%s/viewport-mapping.cfg", dir); + else + sprintf(path, "%s/viewport-projection.cfg", dir); + FILE *fd = fopen( path, "r" ); + if(!fd) + { + free(vc); + return NULL; + } + fseek(fd,0,SEEK_END ); + unsigned int len = ftell( fd ); + + if( len <= 0 ) + { + free(vc); + return NULL; + } + + char *buf = vj_calloc( (len+1) ); + + rewind( fd ); + fread( buf, len, 1 , fd); + + fclose(fd ); + + int n = sscanf(buf, "%f %f %f %f %f %f %f %f %d %d %d %d %d %d %d %d", + &vc->x1, &vc->y1, + &vc->x2, &vc->y2, + &vc->x3, &vc->y3, + &vc->x4, &vc->y4, + &vc->reverse, + &vc->grid_size, + &vc->grid_color, + &vc->x0, + &vc->y0, + &vc->w0, + &vc->h0, + &vc->frontback); + + if( n != 16 ) + { + veejay_msg(0, "Unable to read %s (file is %d bytes)",path, len ); + free(vc); + free(buf); + return NULL; + } + + free(buf); + veejay_msg(VEEJAY_MSG_INFO, "Viewport configuration:"); + veejay_msg(VEEJAY_MSG_INFO, "\tBehaviour:\t%s", (vc->reverse ? "Forward" : "Projection") ); + veejay_msg(VEEJAY_MSG_INFO, "\tQuad :\t(1) %fx%f (2) %fx%f", vc->x1,vc->y1,vc->x2,vc->y2); + veejay_msg(VEEJAY_MSG_INFO, "\t :\t(3) %fx%f (4) %fx%f", vc->x2,vc->y2,vc->x3,vc->y3); + veejay_msg(VEEJAY_MSG_INFO, "\tGrid :\t%dx%d", vc->grid_size, vc->grid_size); + veejay_msg(VEEJAY_MSG_INFO, "\tPencil :\t%s", (vc->grid_color == 0xff ? "white" : "black" ) ); + + return vc; +} + +static void viewport_save_settings( viewport_t *v, int frontback ) +{ + char path[1024]; + if( !v->mode ) + sprintf(path, "%s/viewport-mapping.cfg", v->homedir ); + else + sprintf(path, "%s/viewport-projection.cfg", v->homedir ); + + FILE *fd = fopen( path, "wb" ); + + if(!fd) + { + veejay_msg(0, "Unable to open '%s' for writing. Cannot save viewport settings", + path ); + return; + } + + char content[512]; + + sprintf( content, "%f %f %f %f %f %f %f %f %d %d %d %d %d %d %d %d\n", + v->x1,v->y1,v->x2,v->y2, + v->x3,v->y3,v->x4,v->y4, + v->user_reverse, + v->grid_size, + v->grid_val, + v->x0, + v->y0, + v->w0, + v->h0, + frontback ); + + int res = fwrite( content, strlen(content), 1, fd ); + + if( res <= 0 ) + veejay_msg(VEEJAY_MSG_ERROR, "Unable to save viewport settings to %s", path ); + + fclose( fd ); + + veejay_msg(VEEJAY_MSG_DEBUG, "Saved viewport settings to %s", path); +} + +static int viewport_locate_marker( viewport_t *v, uint8_t *img, float fx, float fy , float *dx, float *dy ) +{ + uint32_t x = fx / 100.0f * v->w; + uint32_t y = fy / 100.0f * v->h; + + uint32_t x1 = x - v->marker_size; + uint32_t y1 = y - v->marker_size; + uint32_t x2 = x + v->marker_size; + uint32_t y2 = y + v->marker_size; + + if( x1 < 0 ) x1 = 0; else if ( x1 > v->w ) x1 = v->w; + if( y1 < 0 ) y1 = 0; else if ( y1 > v->h ) y1 = v->h; + if( x2 < 0 ) x2 = 0; else if ( x2 > v->w ) x2 = v->w; + if( y2 < 0 ) y2 = 0; else if ( y2 > v->h ) y2 = v->h; + + unsigned int i,j; + uint32_t product_row = 0; + uint32_t pixels_row = 0; + uint32_t product_col = 0; + uint32_t pixels_col = 0; + uint32_t pixels_row_c = 0; + uint32_t product_col_c = 0; + + unsigned long nc = 0, it =0; + uint8_t hist[256]; + uint8_t p0 = 0; + int32_t ii=0,ji=0; + veejay_memset(hist,0,sizeof(hist)); + + // find average and most occuring pixel + for( i = y1; i < y2; i ++ ) + { + for( j = x1; j < x2 ; j ++ ) + { + p0 = (img[i*v->w+j] >= 255 ? 0: img[i * v->w + j]); + nc += p0; + hist[ p0 ] ++; + it ++; + } + } + + for( i =0 ;i < 256; i ++ ) + { + if( hist[i] > ji ) + { + ii = i; + ji = hist[i]; + } + } + + unsigned int avg = 0; + if( nc > 0 ) + avg = (nc / it); + + int diff = abs( ii - avg ); + for( i = y1; i < y2; i ++ ) + { + pixels_row = 0; + for( j = x1; j < x2 ; j ++ ) + { + if (abs(img[i * v->w + j] - diff)>= avg) + { + pixels_row++; + } + } + product_row += (i * pixels_row); + pixels_row_c += pixels_row; + } + + for( i = x1; i < x2; i ++ ) + { + pixels_col = 0; + for( j = y1; j < y2; j ++ ) + { + if (abs(img[i * v->w + j] - diff)>= avg) + { + pixels_col ++; + } + } + product_col += (i * pixels_col); + product_col_c += pixels_col; + } + + if( pixels_row_c == 0 || product_col_c == 0 ) + return 0; + + + uint32_t cy = ( product_row / pixels_row_c ); + uint32_t cx = ( product_col / product_col_c ); + + *dx = (float) cx / (v->w / 100.0f); + *dy = (float) cy / (v->h / 100.0f); + + return 1; +} + +void viewport_projection_inc( void *data, int incr, int screen_width, int screen_height ) +{ + viewport_t *v = (viewport_t*) data; + float p[9]; + + p[0] = v->x1; + p[2] = v->x2; + p[4] = v->x3; + p[6] = v->x4; + p[1] = v->y1; + p[3] = v->y2; + p[5] = v->y3; + p[7] = v->y4; + + if( incr == -1 ) + { + v->x0 ++; + v->y0 ++; + v->w0 -= 2; + v->h0 -= 2; + } else + { + v->x0 --; + v->y0 --; + v->w0 +=2; + v->h0 +=2; + } + matrix_t *tmp = viewport_matrix(); + matrix_t *im = viewport_invert_matrix( v->M, tmp ); + + float dx1 ,dy1,dx2,dy2,dx3,dy3,dx4,dy4; + + point_map( im, v->x0, v->y0, &dx1, &dy1); + point_map( im, v->x0 + v->w0, v->y0, &dx2, &dy2 ); + point_map( im, v->x0, v->y0 + v->h0, &dx3, &dy3 ); + point_map( im, v->x0 + v->w0, v->y0 + v->h0, &dx4, &dy4 ); + + v->x1 = dx1 / (screen_width / 100.0f); + v->y1 = dy1 / (screen_height / 100.0f); + v->x2 = dx2 / (screen_width / 100.0f); + v->y2 = dy2 / (screen_height / 100.0f); + v->x4 = dx3 / (screen_width / 100.0f); + v->y4 = dy3 / (screen_height / 100.0f); + v->x3 = dx4 / (screen_width / 100.0f); + v->y3 = dy4 / (screen_height / 100.0f); + free(im); + free(tmp); + + viewport_update_perspective(v, p); +} + +#define ANIMAX + +#ifdef ANIMAX +#include +#define GROUP "227.0.0.17" +#define PORT_NUM 1234 +#endif + +typedef struct +{ + int x; + int y; +} point_t; + +inline int is_left( point_t *p0, point_t *p1, point_t *p2 ) +{ + return ( + (p1->x - p0->x) * (p2->y - p0->y) - + (p2->x - p0->x) * (p1->y - p0->y) + ); +} + +//@ chainhull 2D (C) 2001 softSurfer (www.softsurfer.com) +//@ http://geometryalgorithms.com/Archive/algorithm_0109/algorithm_0109.htm +point_t **chainhull_2d( point_t **p , int n, int *res ) +{ + point_t **H = (point_t**) vj_malloc( n * sizeof(point_t)); + int i; + + int bot=0, top=-1; + + int xmin = p[0]->x; + for( i = 1; i < n; i++) + if( p[i]->x != xmin ) break; + int minmax = i-1; + int minmin = 0; + if( minmax == (n-1)) { + H[++top] = p[minmin]; + if( p[minmax]->y != p[minmin]->y ) + H[++top] = p[minmax]; + H[++top] = p[minmin]; + *res = top + 1; + } + + int maxmin,maxmax = n-1; + int xmax = p[n-1]->x; + for( i = n-2; i >= 0; i -- ) + if( p[i]->x != xmax ) break; + maxmin = i+1; + + H[++top] = p[minmin]; + i= minmax; + while( ++i <= maxmin ) + { + if ( is_left( p[minmin], p[maxmin], p[i]) >= 0 && i < maxmin ) + continue; + while( top > 0 ) + { + if ( is_left( H[top-1], H[top], p[i] ) > 0 ) + break; + else + top--; + } + H[++top] = p[i]; + } + + + if( maxmax != maxmin ) + H[++top] = p[maxmax]; + bot = top; + i = maxmin; + while( --i >= minmax ) + { + if( is_left( p[maxmax], p[minmax], p[i] ) >= 0 && i > minmax ) + continue; + while( top > bot ) + { + if( is_left( H[top-1], H[top], p[i] ) > 0 ) + break; + else + top--; + } + H[++top] = p[i]; + } + if( minmax != minmin ) + H[++top] = p[minmin]; + + *res = top + 1; + + return H; +} + +static void shell_sort_points_by_degree( double *a , point_t **p, int n ) +{ + int i,j,increment=3; + double temp; + int dx,dy; + while( increment > 0 ) + { + for( i = 0; i < n; i ++ ) + { + j=i; + temp = a[i]; + dx = p[i]->x; + dy = p[i]->y; + while(( j>= increment) && (a[j-increment] > temp )) + { + a[j] = a[j-increment]; + p[j]->x = p[j-increment]->x; + p[j]->y = p[j-increment]->y; + j = j - increment; + } + a[j] = temp; + p[j]->x = dx; + p[j]->y = dy; + } + if( increment / 2 != 0 ) + increment = increment / 2; + else if (increment ==1 ) + increment = 0; + else + increment = 1; + } + +} + +static void sort_points_by_degree( double *a, point_t **p, int n ) +{ + int i; + for( i = 2; i <= n; i ++ ) + { + float sentinel = a[i]; + point_t point; + point.x = p[i]->x; + point.y = p[i]->y; + int k = i; + while( sentinel < a[k-1] && k > 0) + { + int j = k; + a[k] = a[--k]; + p[j]->x = p[k]->x; + p[j]->y = p[k]->y; + } + a[k] = sentinel; + p[k]->x = point.x; + p[k]->y = point.y; + } +} + +#define VEEJAY_PACKET_SIZE 16384 + +void viewport_dummy_send( void *data ) +{ + viewport_t *v = (viewport_t*) data; +#ifdef ANIMAX + unsigned char empty_buf[VEEJAY_PACKET_SIZE]; + veejay_memset( empty_buf, 0, VEEJAY_PACKET_SIZE ); + + if(! v->sender ) + { + v->sender = mcast_new_sender( GROUP ); + v->seq_id = 0; + } + if(!v->sender) + return; + + int result = mcast_send( v->sender, empty_buf,VEEJAY_PACKET_SIZE, PORT_NUM ); + if(result<=0) + { + veejay_msg(0, "Cannot send empty packet over mcast %s:%d", GROUP,PORT_NUM ); + mcast_close_sender( v->sender ); + v->sender = NULL; + } +#endif +} + +void viewport_transform_coords( + void *data, + void *input, + int n, + int blob_id, + int center_x, + int center_y, + int wid, + int hei, + int num_objects, + uint8_t *plane ) +{ + int i, res = 0; + viewport_t *v = (viewport_t*) data; +#ifdef ANIMAX + if(! v->sender ) + { + v->sender = mcast_new_sender( GROUP ); + v->seq_id = 0; + veejay_memset( v->buf, 0, VEEJAY_PACKET_SIZE ); + } + if(!v->sender) + return; +#endif + + if( n <= 0 ) + { + viewport_dummy_send( data ); + return; + } + + if( !v->T ) + { + matrix_t *tmp = viewport_matrix(); + v->T = viewport_invert_matrix( v->M, tmp ); + free(tmp); + } + + point_t **points = (point_t**) input; + double *array = (double*) vj_malloc( (n+3) * sizeof(double)); + + for( i = 0; i < n; i ++ ) + array[i] = atan2( (points[i]->x - center_x), (points[i]->y - center_y) ) * (180.0/M_PI ); + + //@ convex hull + point_t **contour = chainhull_2d( points, n, &res ); + + if( res > 256 ) + { + veejay_msg(1, "Convex Hull has %d points, Maximum allowed is 256", res ); + res = 256; + } + + if ( plane ) + { + for( i = 0; i < (res-1); i ++ ) + { + //@ draw polygon + viewport_line( plane, + contour[i]->x, + contour[i]->y, + contour[i+1]->x, + contour[i+1]->y, + wid, + hei, + 200 ); + } + + plane[ center_y * wid + center_x ] = 0xff; //@ display centroid + } + + shell_sort_points_by_degree( array, points, n ); + + //@ Protocol: + //@ bytes 0 ... 4 : blob id + // 4 ... 8 : number of points in convex hull + // 8 ... 12 : header symbol + // 12 ... 16 : sequence number + // 16 ... 20 : total number of blobs + // 20 ... 24 : number of points in contour + // 24 ... N1 : convex hull points + // N1 ... N2 : contour hull points + // + // packet size: 16 Kbytes + + v->buf[0] = blob_id; + v->buf[1] = res*2; + v->buf[2] = -1; + v->buf[3] = v->seq_id ++; + v->buf[4] = num_objects; + v->buf[5] = n*2; + int j = 6; + for( i = 0; i < res; i ++ ) + { + float dx1,dy1; + point_map( v->T, contour[i]->x, contour[i]->y, &dx1, &dy1 ); + v->buf[j + 0] = (int)((dx1/ (float) v->w) * 1000.0f ); + v->buf[j + 1] = (int)((dy1/ (float) v->h) * 1000.0f ); + j+=2; + } + + for( i = 0; i < n; i ++ ) + { + float dx1,dy1; + point_map( v->T, points[i]->x, points[i]->y, &dx1,&dy1 ); + v->buf[j + 0] = (int) ( ( dx1/(float) v->w) * 1000.0f ); + v->buf[j + 1] = (int) ( ( dy1/(float) v->h) * 1000.0f ); + j += 2; + } + int payload = ((n*2)+(res * 2) + 6) * sizeof(int); + int left = VEEJAY_PACKET_SIZE - payload; + + int *ptr = &(v->buf[j]); + + if(left > 0) + veejay_memset( ptr,0, left ); + + if( payload > VEEJAY_PACKET_SIZE ) + veejay_msg(1, "Contours and convex hull too large for packet"); + +#ifdef ANIMAX + int result = mcast_send( v->sender, v->buf,VEEJAY_PACKET_SIZE, PORT_NUM ); + if(result<=0) + { + veejay_msg(0, "Cannot send contour/convex hull over mcast %s:%d", GROUP,PORT_NUM ); + mcast_close_sender( v->sender ); + v->sender = NULL; + } +#endif + + free(contour); + free(array); + +} + +void viewport_external_mouse( void *data, uint8_t *img[3], int sx, int sy, int button, int frontback, int screen_width, int screen_height ) +{ + viewport_t *v = (viewport_t*) data; + if( sx == 0 && sy == 0 && button == 0 ) + return; + + int osd = 0; + int grid =0; + int ch = 0; + int width = v->w; + int height = v->h; + int point = -1; + int i; + + //@ use screen width/height + float x = (float)sx / ( screen_width / 100.0f ); + float y = (float)sy / ( screen_height / 100.0f ); + double dist = 100.0; + + float p[9]; + // x,y in range 0.0-1.0 + // make a copy of the parameters + + if( button == 11 ) + { + p[0] = v->x0; + p[1] = v->y0; + p[2] = v->x0 + v->w0; + p[3] = v->y0; + p[4] = v->x0 + v->w0; + p[5] = v->y0 + v->h0; + p[6] = v->x0; + p[7] = v->y0 + v->h0; + } else + { + p[0] = v->x1; + p[2] = v->x2; + p[4] = v->x3; + p[6] = v->x4; + p[1] = v->y1; + p[3] = v->y2; + p[5] = v->y3; + p[7] = v->y4; + } + + for( i = 0; i < 4 ; i ++ ) + v->users[ i ] = 1; + + if( v->user_ui ) + { + double dt[4]; + dt[0] = sqrt( (p[0] - x) * (p[0] - x) + ( p[1] - y ) * (p[1] -y ) ); + dt[1] = sqrt( (p[2] - x) * (p[2] - x) + ( p[3] - y ) * (p[3] -y ) ); + dt[2] = sqrt( (p[4] - x) * (p[4] - x) + ( p[5] - y ) * (p[5] -y ) ); + dt[3] = sqrt( (p[6] - x) * (p[6] - x) + ( p[7] - y ) * (p[7] -y ) ); + + for ( i = 0; i < 4; i ++ ) + { + if( dt[i] < dist ) + { + dist = dt[i]; + point = i; + } + } + } + + v->save = 0; + + if( ( button == 6 || button == 1 || button == 12) && point >= 0 ) + { + v->save = 1; + } + + if( button == 0 && point >= 0) + { + v->users[ point ] = 2; + } + + if( button == 0 ) + { + v->usermouse[0] = x; + v->usermouse[1] = y; + osd = 1; + } + + if( button == 2 ) + { + if(v->user_reverse) v->user_reverse = 0; else v->user_reverse = 1; + osd = 1; + ch = 1; + } + + if( button == 3 ) + { + if(v->user_ui) v->user_ui = 0; else v->user_ui = 1; + osd = 1; + + if( v->user_ui == 0 ) + { + viewport_save_settings(v, frontback); + } + } + + if( button == 4 || button == 13 || button == 15) // wheel up + { + if( button == 13 || button == 15 ) + { + v->x0 --; + v->y0 --; + v->w0 +=2; + v->h0 +=2; + + if( button == 15 ) + { + matrix_t *tmp = viewport_matrix(); + matrix_t *im = viewport_invert_matrix( v->M, tmp ); + + float dx1 ,dy1,dx2,dy2,dx3,dy3,dx4,dy4; + point_map( im, v->x0, v->y0, &dx1, &dy1); + point_map( im, v->x0 + v->w0, v->y0, &dx2, &dy2 ); + point_map( im, v->x0, v->y0 + v->h0, &dx3, &dy3 ); + point_map( im, v->x0 + v->w0, v->y0 + v->h0, &dx4, &dy4 ); + + veejay_msg(2, "Rect x0=%d, y0=%d, w0=%d, h0=%d", + v->x0,v->y0, v->w0, v->h0 ); + + v->x1 = dx1 / (screen_width / 100.0f); + v->y1 = dy1 / (screen_height / 100.0f); + v->x2 = dx2 / (screen_width / 100.0f); + v->y2 = dy2 / (screen_height / 100.0f); + v->x4 = dx3 / (screen_width / 100.0f); + v->y4 = dy3 / (screen_height / 100.0f); + v->x3 = dx4 / (screen_width / 100.0f); + v->y3 = dy4 / (screen_height / 100.0f); + + free(im); + free(tmp); + } + viewport_update_perspective( v, p ); + return; + + } + else + { + if( v->user_ui && v->snap_marker ) + { + if( v->marker_size <= 2 ) + v->marker_size = 32; + else + v->marker_size -= 2; + + grid = 0; + } else if( v->user_ui ) + { + if(v->grid_size <= 8 ) + v->grid_size = 8; + else + v->grid_size -=2; + grid = 1; + osd = 1; + } + } + } + if (button == 5 || button == 14 || button == 16) // wheel down + { + if( button == 14 || button == 16 ) + { + v->x0 ++; + v->y0 ++; + v->w0 -=2; + v->h0 -=2; + + if( button == 16 ) + { + matrix_t *tmp = viewport_matrix(); + matrix_t *im = viewport_invert_matrix( v->M, tmp ); + + float dx1 ,dy1,dx2,dy2,dx3,dy3,dx4,dy4; + point_map( im, v->x0, v->y0, &dx1, &dy1); + point_map( im, v->x0 + v->w0, v->y0, &dx2, &dy2 ); + point_map( im, v->x0, v->y0 + v->h0, &dx3, &dy3 ); + point_map( im, v->x0 + v->w0, v->y0 + v->h0, &dx4, &dy4 ); + veejay_msg(2, "Rect x0=%d, y0=%d, w0=%d, h0=%d", + v->x0,v->y0, v->w0, v->h0 ); + + v->x1 = dx1 / (screen_width / 100.0f); + v->y1 = dy1 / (screen_height / 100.0f); + v->x2 = dx2 / (screen_width / 100.0f); + v->y2 = dy2 / (screen_height / 100.0f); + v->x4 = dx3 / (screen_width / 100.0f); + v->y4 = dy3 / (screen_height / 100.0f); + v->x3 = dx4 / (screen_width / 100.0f); + v->y3 = dy4 / (screen_height / 100.0f); + + free(im); + free(tmp); + } + viewport_update_perspective(v,p); + return; + } + else + { + if( v->user_ui && v->snap_marker ) + { + if( v->marker_size > 32 ) + v->marker_size = 2; + else + v->marker_size += 2; + grid = 0; + } else if( v->user_ui ) + { + if( v->grid_size > ( width / 4 ) ) + v->grid_size = width/4; + else + v->grid_size +=2; + grid = 1; + osd = 1; + } + } + } + + if( button == 7 ) + { + if( v->grid_val == 0xff ) + v->grid_val = 0; + else + v->grid_val = 0xff; + grid = 1; + } + + if( grid && !v->snap_marker ) + viewport_update_grid( v, v->grid_size, v->grid_val ); + + if( osd ) + viewport_update_context_help(v); + + if(v->save) + { + if( button == 6 && !v->snap_marker) + { //@ Snap selected point to grid (upper left corner) + float rx = v->w / 100.0 * x; + float ry = v->h / 100.0 * y; + int dx = (rx+0.5) / v->grid_size; + int dy = (ry+0.5) / v->grid_size; + + x = (float) ( dx * v->grid_size / ( v->w / 100.0 ) ); + y = (float) ( dy * v->grid_size / ( v->h / 100.0 ) ); + } + + if( button == 12 ) + { + int my,mx; + switch( point ) + { + case 0: + v->x0 = (int32_t)sx; + v->y0 = (int32_t)sy; + clamp1(v->x0, 0, v->w ); + clamp1(v->y0, 0, v->h ); + break; + case 1: + v->w0 = sx - v->x0; + v->y0 = sy; + clamp1(v->w0, 0,v->w ); + clamp1(v->y0, 0,v->h ); + break; + case 2: + v->w0 = sx - v->x0; + v->h0 = sy - v->y0; + clamp1(v->w0, 0,v->w ); + clamp1(v->h0, 0,v->h ); + break; + case 3: + v->w0 = ( v->x0 - sx ) + v->w0; + v->x0 = sx; + v->h0 = sy - v->y0; + clamp1(v->x0, 0,v->w ); + clamp1(v->h0, 0,v->h ); + clamp1(v->w0, 0,v->w ); + break; + } + + + } + else + { + switch( point ) + { + case 0: + v->x1 = x; + v->y1 = y; + break; + case 1: + v->x2 = x; + v->y2 = y; + break; + case 2: + v->x3 = x; + v->y3 = y; + break; + case 3: + v->x4 = x; + v->y4 = y; + break; + } + } + ch = 1; + + } + + if( ch ) + { + if( v->save && v->snap_marker && button != 12) + { + float tx = x; + float ty = y; + + if( button != 6 && viewport_locate_marker( v, img[0], tx, ty, &x, &y ) ) + { + switch( point ) + { + case 0: + v->x1 = x; + v->y1 = y; + break; + case 1: + v->x2 = x; + v->y2 = y; + break; + case 2: + v->x3 = x; + v->y3 = y; + break; + case 3: + v->x4 = x; + v->y4 = y; + break; + } + } + } + viewport_update_perspective( v, p ); + } +} + + +static inline int grab_pixel( uint8_t *plane, int x, int y, int w ) +{ + if( plane[ (y*w) + x ] > 128 ) + return 0; + return 255; +} + +static void viewport_draw( void *data, uint8_t *plane ) +{ + viewport_t *v = (viewport_t*) data; + int width = v->w; + int height = v->h; + + float wx =(float) v->w / 100.0; + float wy =(float) v->h / 100.0; + + int fx1 = (int)( v->x1 *wx ); + int fy1 = (int)( v->y1 *wy ); + int fx2 = (int)( v->x2 *wx ); + int fy2 = (int)( v->y2 *wy ); + int fx3 = (int)( v->x3 *wx ); + int fy3 = (int)( v->y3 *wy ); + int fx4 = (int)( v->x4 *wx ); + int fy4 = (int)( v->y4 *wy ); + +// opacity_blend_luma_apply( plane,v->grid, (width*height), 100 ); + + viewport_line( plane, fx1, fy1, fx2,fy2,width,height, v->grid_val); + viewport_line( plane, fx1, fy1, fx4,fy4,width,height, v->grid_val ); + viewport_line( plane, fx4, fy4, fx3,fy3,width,height, v->grid_val ); + viewport_line( plane, fx2, fy2, fx3,fy3,width,height, v->grid_val ); + + draw_point( plane, fx1,fy1, width,height, v->users[0],v->grid_val ); + draw_point( plane, fx2,fy2, width,height, v->users[1],v->grid_val ); + draw_point( plane, fx3,fy3, width,height, v->users[2],v->grid_val ); + draw_point( plane, fx4,fy4, width,height, v->users[3],v->grid_val ); + + int mx = v->usermouse[0] * wx; + int my = v->usermouse[1] * wy; + if( mx >= 0 && my >= 0 && mx <= width && my < height ) + { + int col = grab_pixel( plane, v->usermouse[0]*wx, v->usermouse[1]*wy,width ); + draw_point( plane, v->usermouse[0]*wx,v->usermouse[1]*wy, width,height,1, v->grid_val ); + + } +} + +void viewport_set_marker( void *data, int status ) +{ + viewport_t *v = (viewport_t*) data; + v->snap_marker = status; + v->marker_size = 8; +} + +static void viewport_draw_col( void *data, uint8_t *plane, uint8_t *u, uint8_t *V ) +{ + viewport_t *v = (viewport_t*) data; + int width = v->w; + int height = v->h; + + float wx =(float) v->w / 100.0; + float wy =(float) v->h / 100.0; + + int fx1 = (int)( v->x1 *wx ); + int fy1 = (int)( v->y1 *wy ); + int fx2 = (int)( v->x2 *wx ); + int fy2 = (int)( v->y2 *wy ); + int fx3 = (int)( v->x3 *wx ); + int fy3 = (int)( v->y3 *wy ); + int fx4 = (int)( v->x4 *wx ); + int fy4 = (int)( v->y4 *wy ); + + const uint8_t p = v->grid_val; + const uint8_t uv = 128; + //opacity_blend_luma_apply( plane,v->grid, (width*height), 100 ); + + viewport_line( plane, fx1, fy1, fx2,fy2,width,height, p); + viewport_line( plane, fx1, fy1, fx4,fy4,width,height, p ); + viewport_line( plane, fx4, fy4, fx3,fy3,width,height, p ); + viewport_line( plane, fx2, fy2, fx3,fy3,width,height, p ); + viewport_line( u, fx1, fy1, fx2,fy2,width,height, uv); + viewport_line( u, fx1, fy1, fx4,fy4,width,height, uv ); + viewport_line( u, fx4, fy4, fx3,fy3,width,height, uv ); + viewport_line( u, fx2, fy2, fx3,fy3,width,height, uv ); + viewport_line( V, fx1, fy1, fx2,fy2,width,height, uv ); + viewport_line( V, fx1, fy1, fx4,fy4,width,height, uv ); + viewport_line( V, fx4, fy4, fx3,fy3,width,height, uv ); + viewport_line( V, fx2, fy2, fx3,fy3,width,height, uv ); + + viewport_line( plane, v->x0, v->y0, v->x0 + v->w0, v->y0, width,height, 0xff); + viewport_line( plane, v->x0+v->w0, v->y0, v->x0 + v->w0, v->y0 + v->h0, width,height, 0xff ); + viewport_line( plane, v->x0 + v->w0, v->y0 + v->h0, v->x0, v->y0 + v->h0, width,height, 0xff ); + viewport_line( plane, v->x0, v->y0 +v->h0, v->x0, v->y0, width,height, 0xff); + + + + + + + draw_point( plane, fx1,fy1, width,height, v->users[0],p ); + draw_point( plane, fx2,fy2, width,height, v->users[1],p ); + draw_point( plane, fx3,fy3, width,height, v->users[2],p ); + draw_point( plane, fx4,fy4, width,height, v->users[3],p ); + draw_point( u, fx1,fy1, width,height, v->users[0],uv ); + draw_point( u, fx2,fy2, width,height, v->users[1],uv ); + draw_point( u, fx3,fy3, width,height, v->users[2],uv ); + draw_point( u, fx4,fy4, width,height, v->users[3],uv ); + draw_point( V, fx1,fy1, width,height, v->users[0],uv ); + draw_point( V, fx2,fy2, width,height, v->users[1],uv ); + draw_point( V, fx3,fy3, width,height, v->users[2],uv ); + draw_point( V, fx4,fy4, width,height, v->users[3],uv ); + + int mx = v->usermouse[0] * wx; + int my = v->usermouse[1] * wy; + + if( mx >= 0 && my >= 0 && mx <= width && my < height ) + { + int col = grab_pixel( plane, v->usermouse[0]*wx, v->usermouse[1]*wy,width ); + draw_point( plane, v->usermouse[0]*wx,v->usermouse[1]*wy, width,height,1, v->grid_val ); + + if( v->snap_marker ) + { + int mx1 = mx - (v->marker_size * 2); + int my1 = my - (v->marker_size * 2); + int mx2 = mx + (v->marker_size * 2); + int my2 = my1; + int mx3 = mx2; + int my3 = my + v->marker_size*2; + int mx4 = mx1; + int my4 = my + v->marker_size * 2; + + viewport_line( plane, mx1, my1, mx2,my2,width,height, v->grid_val); + viewport_line( plane, mx1, my1, mx4,my4,width,height, v->grid_val ); + viewport_line( plane, mx4, my4, mx3,my3,width,height, v->grid_val ); + viewport_line( plane, mx2, my2, mx3,my3,width,height, v->grid_val ); + + } + } +} + +int viewport_render_ssm(void *vdata ) +{ + viewport_t *v = (viewport_t*) vdata; + + if( v->disable || v->user_ui) + return 0; + + return 1; +} + +void viewport_draw_interface( void *vdata, uint8_t *img[3] ) +{ + viewport_t *v = (viewport_t*) vdata; + viewport_draw( v, img[0] ); +} +void viewport_draw_interface_color( void *vdata, uint8_t *img[3] ) +{ + viewport_t *v = (viewport_t*) vdata; + viewport_draw_col( v, img[0],img[1],img[2] ); +} + + +void viewport_produce_full_img( void *vdata, uint8_t *img[3], uint8_t *out_img[3] ) +{ + viewport_t *v = (viewport_t*) vdata; + const int len = v->w * v->h; + register const int w = v->w; + register uint32_t i,j,n; + const int32_t *map = v->map; + uint8_t *inY = img[0]; + uint8_t *inU = img[1]; + uint8_t *inV = img[2]; + uint8_t *outY = out_img[0]; + uint8_t *outU = out_img[1]; + uint8_t *outV = out_img[2]; + inY[len+1] = 0; + inU[len+1] = 128; + inV[len+1] = 128; + + register const int32_t tx1 = v->ttx1; + register const int32_t tx2 = v->ttx2; + register const int32_t ty1 = v->tty1; + register const int32_t ty2 = v->tty2; + int x,y; + + y = ty1 * w; +#if defined (HAVE_ASM_MMX) || defined (HAVE_ASM_SSE) + fast_memset_dirty( outY, 0, y ); + fast_memset_dirty( outU, 128, y ); + fast_memset_dirty( outV, 128, y ); +#else + veejay_memset( outY,0,y); + veejay_memset( outU,128,y); + veejay_memset( outV, 128,y); +#endif + + for( y = ty1; y < ty2; y ++ ) + { +#if defined (HAVE_ASM_MMX) || defined( HAVE_ASM_SSE ) + fast_memset_dirty( outY + (y * w ), 0, tx1 ); + fast_memset_dirty( outY + (y * w ) + tx2, 0, (w-tx2)); + + fast_memset_dirty( outU + (y * w ), 128, tx1 ); + fast_memset_dirty( outU + (y * w ) + tx2, 128, (w-tx2)); + + fast_memset_dirty( outV + (y * w ), 128, tx1 ); + fast_memset_dirty( outV + (y * w ) + tx2, 128, (w-tx2)); +#else + veejay_memset( outY + (y * w ), 0, tx1 ); + veejay_memset( outY + (y * w ) + tx2, 0, (w-tx2)); + + veejay_memset( outU + (y * w ), 128, tx1 ); + veejay_memset( outU + (y * w ) + tx2, 128, (w-tx2)); + + veejay_memset( outV + (y * w ), 128, tx1 ); + veejay_memset( outV + (y * w ) + tx2, 128, (w-tx2)); +#endif + for( x = tx1; x < tx2 ; x ++ ) + { + i = y * w + x; + n = map[i]; + outY[i] = inY[n]; + outU[i] = inU[n]; + outV[i] = inV[n]; + } + } + y = (v->h - ty2 ) * w; + x = ty2 * w; +#if defined (HAVE_ASM_MMX) || defined (HAVE_AMS_SSE ) + + fast_memset_dirty( outY + x, 0, y ); + fast_memset_dirty( outU + x, 128, y ); + fast_memset_dirty( outV + x, 128, y ); + fast_memset_finish(); +#else + veejay_memset( outY+x,0,y); + veejay_memset( outU + x, 128,y); + veejay_memset( outV + x , 128, y ); + +#endif +} + +#define pack_yuyv_pixel( y0,u0,u1,y1,v0,v1 ) (\ + ( (int) y0 ) & 0xff ) +\ + ( (((int) ((u0+u1)>>1) ) & 0xff) << 8) +\ + ( ((((int) y1) & 0xff) << 16 )) +\ + ( ((((int) ((v0+v1)>>1)) & 0xff) << 24 )) + +void viewport_produce_full_img_yuyv( void *vdata, uint8_t *img[3], uint8_t *out_img ) +{ + viewport_t *v = (viewport_t*) vdata; + const int len = v->w * v->h; + const int32_t *map = v->map; + register uint8_t *inY = img[0]; + register uint8_t *inU = img[1]; + register uint8_t *inV = img[2]; + register uint32_t *plane_yuyv = (uint32_t*)out_img; + register uint8_t *outYUYV = out_img; + register const int32_t tx1 = v->ttx1; + register const int32_t tx2 = v->ttx2; + register const int32_t ty1 = v->tty1; + register const int32_t ty2 = v->tty2; + register const int w = v->w; + register const int h = v->h; + register const int uw = v->w >> 1; + register uint32_t i,x,y; + register int32_t n,m; + + inY[len+1] = 0; // "out of range" pixel value + inU[len+1] = 128; + inV[len+1] = 128; + + // clear the yuyv plane (black) + y = ty1 * w; + if( y > 0) + yuyv_plane_clear( y*2, out_img); + + for( y = ty1; y < ty2; y ++ ) + { + i = (y * w); + yuyv_plane_clear( tx1+tx1, outYUYV + i + i ); + yuyv_plane_clear( (w-tx2)+(w-tx2),outYUYV + (i+tx2) + (i+tx2)); + } + y = (v->h - ty2 ) * w; + x = ty2 * w; + if( y > 0 ) + yuyv_plane_clear( y*2, out_img + (x*2) ); +#if defined (HAVE_ASM_MMX) || defined (HAVE_AMS_SSE ) + fast_memset_finish(); // finish yuyv_plane_clear +#endif + for( y = ty1 ; y < ty2; y ++ ) + { + for( x = tx1; x < tx2; x += 8 ) + { // 4 YUYV pixels out, 8 Y in, 16 UV in + i = y * w ; + n = map[ i + x ]; + m = map[ i + x + 1]; + + + plane_yuyv[y * uw + ( (x+1)>>1)] = pack_yuyv_pixel( inY[n], inU[n], inU[m], + inY[m], inV[n], inV[m] ); + + n = map[ i + x + 2 ]; + m = map[ i + x + 3 ]; + + + plane_yuyv[y * uw + ( (x+1+2)>>1)] = pack_yuyv_pixel( inY[n], inU[n], inU[m], + inY[m], inV[n], inV[m] ); + + + n = map[ i + x + 4 ]; + m = map[ i + x + 5 ]; + + + plane_yuyv[y * uw + ( (x+1+4)>>1)] = pack_yuyv_pixel( inY[n], inU[n], inU[m], + inY[m], inV[n], inV[m] ); + + + n = map[ i + x + 6 ]; + m = map[ i + x + 7 ]; + + + plane_yuyv[y * uw + ( (x+1+6)>>1)] = pack_yuyv_pixel( inY[n], inU[n], inU[m], + inY[m], inV[n], inV[m] ); + + } + for( ; x < tx2; x += 2 ) + { + i = y * w ; + n = map[ i + x ]; + m = map[ i + x + 1]; + + plane_yuyv[y * uw + ( (x+1)>>1)] = pack_yuyv_pixel( inY[n], inU[n], inU[m], + inY[m], inV[n], inV[m] ); + } + } +} + +void viewport_produce_full_img_packed( void *vdata, uint8_t *img[3], uint8_t *out_img ) +{ + viewport_t *v = (viewport_t*) vdata; + const int len = v->w * v->h; + const int32_t *map = v->map; + uint8_t *inY = img[0]; + uint8_t *inU = img[1]; + uint8_t *inV = img[2]; + uint8_t *outYUYV = out_img; + + inY[len+1] = 0; + inU[len+1] = 128; + inV[len+1] = 128; + + register const int32_t tx1 = v->ttx1; + register const int32_t tx2 = v->ttx2; + register const int32_t ty1 = v->tty1; + register const int32_t ty2 = v->tty2; + register const int w = v->w; + register uint32_t n,i,x,y,m; + + y = ty1 * w; + yuyv_plane_clear( y*3, out_img); + + for( y = ty1 ; y < ty2; y ++ ) + { + yuyv_plane_clear( tx1*3, outYUYV + 3 * (y*w) ); + yuyv_plane_clear( (w-tx2)*3, outYUYV + 3 * (y*w+tx2)); + for( x = tx1; x < tx2; x ++ ) + { + i = y * w + x; + n = map[ i ]; + outYUYV[3 * i ] = inY[n]; + outYUYV[3 * i + 1 ] = inV[n]; + outYUYV[3 * i + 3 ] = inU[n]; + } + } + y = (v->h - ty2 ) * w; + x = ty2 * w; + + yuyv_plane_clear( y*3, out_img + (x*3) ); +#if defined (HAVE_ASM_MMX) || defined (HAVE_AMS_SSE ) + fast_memset_finish(); +#endif +} + + +void viewport_render( void *vdata, uint8_t *in[3], uint8_t *out[3],int width, int height, int uv_len ) +{ + viewport_t *v = (viewport_t*) vdata; + + if( v->disable ) + return; + + int len = (width * height); + + if(! v->user_ui ) + { + const int len = v->w * v->h; + const int w = v->w; + register uint32_t i,j,n,block; + const int32_t *map = v->map; + uint8_t *inY = in[0]; + uint8_t *inU = in[1]; + uint8_t *inV = in[2]; + uint8_t *outY = out[0]; + uint8_t *outU = out[1]; + uint8_t *outV = out[2]; + + inY[len+1] = 0; + inU[len+1] = 128; + inV[len+1] = 128; + + for( i = 0; i < len ; i += v->w ) + { + /* for( j = 0; j < w; j ++ ) + { + n = map[i+j]; + outY[i+j] = inY[n]; + outU[i+j] = inU[n]; + outV[i+j] = inV[n]; + }*/ + + for( j = 0; j < w; j += 4 ) + { + n = map[i + j]; + outY[i + j ] = inY[n]; + outU[i + j ] = inU[n]; + outV[i + j ] = inV[n]; + n = map[ i + j + 1 ]; + outY[ i + 1 + j ] = inY[n]; + outU[ i + 1 + j ] = inU[n]; + outV[ i + 1 + j ] = inV[n]; + n = map[ i + j + 2 ]; + outY[ i + 2 + j ] = inY[n]; + outU[ i + 2 + j ] = inU[n]; + outV[ i + 2 + j ] = inV[n]; + n = map[ i + j + 3 ]; + outY[ i + 3 + j ] = inY[n]; + outU[ i + 3 + j ] = inU[n]; + outV[ i + 3 + j ] = inV[n]; + } + for( ; j < w; j ++ ) + { + n = map[i+j]; + outY[i+j] = inY[n]; + outU[i+j] = inU[n]; + outV[i+j] = inV[n]; + } + } + } + else + { + viewport_draw( v, in[0] ); + veejay_memset( in[1], 128, uv_len ); + veejay_memset( in[2], 128, uv_len ); + } +} +void viewport_render_dynamic( void *vdata, uint8_t *in[3], uint8_t *out[3],int width, int height ) +{ + viewport_t *v = (viewport_t*) vdata; + + viewport_process_dynamic( v, in,out ); + +} + +void *viewport_fx_init_map( int wid, int hei, int x1, int y1, + int x2, int y2, int x3, int y3, int x4, int y4) +{ + viewport_t *v = (viewport_t*) vj_calloc(sizeof(viewport_t)); + + float fracx = (float) wid / 100.0f; + float fracy = (float) hei / 100.0f; + + v->x1 = x1 / fracx; + v->y1 = y1 / fracy; + v->x2 = x2 / fracx; + v->y2 = y2 / fracy; + v->x3 = x3 / fracx; + v->y3 = y3 / fracy; + v->x4 = x4 / fracx; + v->y4 = y4 / fracy; + + int res = viewport_configure (v, + v->x1, v->y1, + v->x2, v->y2, + v->x3, v->y3, + v->x4, v->y4, + 0,0, + wid,hei, + wid,hei, + 0, + 0xff, + wid/32 ); + + v->user_ui = 0; + + if(! res ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid point locations"); + viewport_destroy( v ); + return NULL; + } + + + return (void*)v; +} +void *viewport_fx_init(int type, int wid, int hei, int x, int y, int zoom, int dir) +{ + viewport_t *v = (viewport_t*) vj_calloc(sizeof(viewport_t)); + + float fracx = (float) wid; + float fracy = (float) hei; + + fracx *= 0.01f; + fracy *= 0.01f; + + if( type == VP_QUADZOOM ) + { + float cx = (float) x; + float cy = (float) y; + + cx = cx / fracx; + cy = cy / fracy; + + float w = 1.0 * zoom * 0.5; + float h = 1.0 * zoom * 0.5; + + v->x1 = cx - w; + v->y1 = cy - h; + v->x2 = cx + w; + v->y2 = cy - h; + v->x3 = cx + w; + v->y3 = cy + h; + v->x4 = cx - w; + v->y4 = cy + h; + } + + int res = viewport_configure (v, + v->x1, v->y1, + v->x2, v->y2, + v->x3, v->y3, + v->x4, v->y4, + 0,0, + wid,hei, + wid,hei, + dir, + 0xff, + wid/32 ); + + v->user_ui = 0; + + if(! res ) + { + veejay_msg(VEEJAY_MSG_ERROR, "Invalid point locations"); + viewport_destroy( v ); + return NULL; + } + + + return (void*)v; +} + diff --git a/veejay-server/veejay/vj-viewport.h b/veejay-server/veejay/vj-viewport.h new file mode 100644 index 00000000..9a06c9bd --- /dev/null +++ b/veejay-server/veejay/vj-viewport.h @@ -0,0 +1,47 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg + * + * 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. + */ +#ifndef VIEWPORT_H +#define VIEWPORT_H + +/* Viewport component for FX */ +#define VP_QUADZOOM 1 +void viewport_process_dynamic( void *data, uint8_t *in[3], uint8_t *out[3] ); +void viewport_process_dynamic_map( void *data, uint8_t *in[3], uint8_t *out[3], uint32_t *map, int feather ); +void *viewport_fx_init( int type, int wid, int hei, int x, int y, int zoom, int dir ); + + +/* The viewport */ +int viewport_active( void *data ); +int viewport_render_ssm(void *vdata ); +void viewport_render( void *data, uint8_t *in[3], uint8_t *out[3], int width, int height,int uv_len ); +void viewport_external_mouse( void *data, uint8_t *in[3],int sx, int sy, int button, int frontback, int w, int h ); +char *viewport_get_help(void *data); +void viewport_clone_parameters( void *src , void *dst ); +void *viewport_init(int x0, int y0, int w0, int h0, int w, int h, const char *dir, int *enable, int *frontback, int mode); +int viewport_active( void *data ); +void viewport_destroy( void *data ); +void vewport_draw_interface_color( void *vdata, uint8_t *img[3] ); +void viewport_produce_full_img_yuyv( void *vdata, uint8_t *img[3], uint8_t *out_img ); +void viewport_draw_interface_color( void *vdata, uint8_t *img[3] ); +void viewport_set_marker( void *vdata, int status ); +void viewport_projection_inc( void *data, int incr , int w, int h ); +void viewport_transform_coords( void *data, void *coords, int n, int blob_id, int cx, int cy ,int w, int h, int num_objects,uint8_t *plane); +void viewport_dummy_send( void *data ); +#endif diff --git a/veejay-server/veejay/vjkf.c b/veejay-server/veejay/vjkf.c new file mode 100644 index 00000000..caaa0b74 --- /dev/null +++ b/veejay-server/veejay/vjkf.c @@ -0,0 +1,369 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg < elburg@hio.hen.nl> + * + * 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. + * + * + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_XML2 +#include +#include +#endif +#ifdef STRICT_CHECKING +#include +#endif +/* veejay server stores keyframes + * + * + * + * keyframe format: + * ( [frame_num1][value1][frame_num2][value2] ... [frame_numN][valueN] ) + * + * + */ + +#include + +static char *keyframe_id( int p_id, int n_frame ) +{ + char tmp[32]; + sprintf(tmp, "FX%d_%d",p_id,n_frame ); + return strdup(tmp); +} + +static char *extract_( const char *prefix , int p_id ) +{ + char tmp[100]; + sprintf(tmp, "%s_p%d",prefix,p_id); + return strdup(tmp); +} + +unsigned char *keyframe_pack( void *port, int parameter_id, int entry_id, int *rlen ) +{ + int i,k=0; + char *result = NULL; + + + int start = 0, end = 0, type =0; + + char *k_s = extract_( "start", parameter_id ); + char *k_e = extract_( "end", parameter_id ); + char *k_t = extract_( "type", parameter_id ); + + if( vevo_property_get( port, k_s, 0, &start ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e); free(k_t); + return NULL; + } + if( vevo_property_get( port, k_e, 0, &end ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e); free(k_t); + return NULL; + } + if( vevo_property_get( port, k_t, 0, &type ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e); free(k_t); + return NULL; + } + + free(k_s); + free(k_e); + free(k_t); + + int len = end - start + 1; + + result = vj_calloc( (len*4) + 23 ); + + sprintf(result,"key%02d%02d%08d%08d%02d", entry_id,parameter_id,start, end, type ); + + unsigned char *out = result + 25; + + for( i = start; i < end; i ++ ) + { + char *key = keyframe_id( parameter_id, i ); + int value = 0; + + if(vevo_property_get(port, key, 0, &value )==VEVO_NO_ERROR) + { + unsigned char *buf = out + (4 * k); + + buf[0] = ( value ) & 0xff; + buf[1] = (value >> 8) & 0xff; + buf[2] = (value >> 16) & 0xff; + buf[3] = (value >> 24) & 0xff; + k++; + } + else + { + unsigned char *buf = out + (4 * k); + buf[0] = 0; + buf[1] = 0; + buf[2] = 0; + buf[3] = 0; + k++; + } + + free(key); + } + + *rlen = 25 + (4 * k); + + veejay_msg(VEEJAY_MSG_DEBUG, "KF %p pack: range=%d-%d, FX entry %d, P%d, type %d", + port,start,end, entry_id,parameter_id, type ); + + return result; +} + +int keyframe_unpack( unsigned char *in, int len, int *entry, int lookup, int is_sample ) +{ + int i; + int parameter_id = 0; + int start = 0, end = 0, type = 0; + int fx_entry = 0; + int n = sscanf( in, "key%2d%2d%8d%8d%2d", &fx_entry,¶meter_id, &start, &end,&type ); + + if(n != 5 ) + { + veejay_msg(0, "Unable to unpack parameter_id,start,end"); + return 0; + } + + void *port = (is_sample ? sample_get_kf_port( lookup, fx_entry ) : vj_tag_get_kf_port( lookup, fx_entry )); + + in += (25); + + for(i = start ; i < end; i ++ ) + { + unsigned char *ptr = in + (i * 4); + int value = + ( ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24) ); + char *key = keyframe_id( parameter_id, i ); + vevo_property_set( port, key, VEVO_ATOM_TYPE_INT, 1, &value ); + free(key); + } + + char *k_s = extract_ ( "start", parameter_id ); + char *k_e = extract_ ( "end", parameter_id ); + char *k_t = extract_ ( "type", parameter_id ); + + vevo_property_set( port, k_s, VEVO_ATOM_TYPE_INT,1, &start ); + vevo_property_set( port, k_e, VEVO_ATOM_TYPE_INT,1, &end ); + vevo_property_set( port, k_t, VEVO_ATOM_TYPE_INT,1, &type ); + + free(k_s); + free(k_e); + free(k_t); + + *entry = fx_entry; + + return 1; +} + +int keyframe_get_tokens( void *port, int parameter_id, int *start, int *end, int *type ) +{ + char *k_s = extract_ ( "start", parameter_id ); + char *k_e = extract_ ( "end", parameter_id ); + char *k_t = extract_ ( "type", parameter_id ); + + if( vevo_property_get( port, k_s, 0, start ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e); free(k_t); + return 0; + } + if( vevo_property_get( port, "end", 0, end ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e); free(k_t); + return 0; + } + if( vevo_property_get( port, "type", 0, type ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e); free(k_t); + return 0; + } + free(k_s); + free(k_e); + free(k_t); + + + return 1; +} + + + + +int keyframe_xml_pack( xmlNodePtr node, void *port, int parameter_id ) +{ + int i,k=0; + unsigned char *result = NULL; + int n_items = 0; + + int start = 0, end = 0, type = 0; + + char *k_s = extract_ ( "start", parameter_id ); + char *k_e = extract_ ( "end", parameter_id ); + char *k_t = extract_ ( "type", parameter_id ); + + + if( vevo_property_get( port, k_s, 0, &start ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e); free(k_t); + return 0; + } + if( vevo_property_get( port, k_e, 0, &end ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e); free(k_t); + return 0; + } + if( vevo_property_get( port, k_t, 0, &type ) != VEVO_NO_ERROR ) + { + free(k_s); free(k_e);free(k_t); + return 0; + } + + char xmlbuf[100]; + + snprintf(xmlbuf, 100,"%d", start ); + xmlNewChild(node, NULL, (const xmlChar*) k_s, xmlbuf ); + snprintf(xmlbuf, 100,"%d", end ); + xmlNewChild(node, NULL, (const xmlChar*) k_e, xmlbuf ); + snprintf(xmlbuf, 100,"%d", type ); + xmlNewChild(node, NULL, (const xmlChar*) k_t, xmlbuf ); + + for( i = start; i < end; i ++ ) + { + char *key = keyframe_id( parameter_id, i ); + int value = 0; + + if(vevo_property_get(port, key, 0, &value )==VEVO_NO_ERROR) + { + sprintf(xmlbuf, "%d %d", parameter_id,value ); + xmlNewChild(node, NULL, (const xmlChar*) "value", xmlbuf); + } + free(key); + } + + free( k_s); + free( k_e); + free( k_t); + + return 1; +} +static int get_xml_int( xmlDocPtr doc, xmlNodePtr node ) +{ + xmlChar *tmp = xmlNodeListGetString( doc, node->xmlChildrenNode, 1 ); + char *ch = UTF8toLAT1( tmp ); + int res = 0; + if( ch ) + { + res = atoi( ch ); + free(ch); + } + if(tmp) + free(tmp); + return res; +} +static int get_xml_2int( xmlDocPtr doc, xmlNodePtr node, int *second ) +{ + xmlChar *tmp = xmlNodeListGetString( doc, node->xmlChildrenNode, 1 ); + char *ch = UTF8toLAT1( tmp ); + int res = 0; + if( ch ) + { + sscanf( ch, "%d %d", &res, second ); + free(ch); + } + if(tmp) + free(tmp); + return res; +} + +int keyframe_xml_unpack( xmlDocPtr doc, xmlNodePtr node, void *port ) +{ + int i; + int n_frames; + int parameter_id = 0; + int start = 0 , end = 0, type = 0; + int frame = 0; + int nodes = 0; + int res = 0; + if(!node) + return 0; + + while( node != NULL ) + { + if( !xmlStrncmp(node->name, (const xmlChar*) "start",4 )) + { + start = get_xml_int( doc, node ); + vevo_property_set( port, node->name, VEVO_ATOM_TYPE_INT,1,&start); + nodes ++; + } + else if ( !xmlStrncmp(node->name, (const xmlChar*) "end",3 )) + { + end = get_xml_int( doc, node ); + vevo_property_set(port, node->name, VEVO_ATOM_TYPE_INT,1,&end); + } + else if ( !xmlStrncmp(node->name, (const xmlChar*) "type",4 )) + { + type = get_xml_int(doc,node); + vevo_property_set(port,node->name, VEVO_ATOM_TYPE_INT,1,&type); + } + else if ( !xmlStrcmp(node->name, (const xmlChar*) "value" )) + { + int val = 0; + int pid = get_xml_2int( doc, node, &val); + char *key = keyframe_id( pid, start + frame ); + + + vevo_property_set( port, key, VEVO_ATOM_TYPE_INT, 1, &val ); + free(key); + + frame ++; + if( frame > end ) + end = frame; + } + + node = node->next; + } + + veejay_msg(VEEJAY_MSG_DEBUG, "KF loaded: %d-%d with %d values",start,end, frame ); + + return nodes; +} + + +int get_keyframe_value(void *port, int n_frame, int parameter_id, int *result ) +{ + char *key = keyframe_id( parameter_id, n_frame ); + + int error = vevo_property_get( port, key, 0, result ); + if( error != VEVO_NO_ERROR ) + return 0; + return 1; +} + diff --git a/veejay-server/veejay/vjkf.h b/veejay-server/veejay/vjkf.h new file mode 100644 index 00000000..200d94d5 --- /dev/null +++ b/veejay-server/veejay/vjkf.h @@ -0,0 +1,36 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002-2007 Niels Elburg < elburg@hio.hen.nl> + * + * 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. + * + * + */ +#ifndef VJKF_H +#define VJKF_H +unsigned char *keyframe_pack( void *port, int parameter_id, int entry_id, int *rlen ); + +int keyframe_unpack( unsigned char *in, int len, int *entry, int lookup, int tag ); + +int keyframe_get_tokens( void *port, int parameter_id, int *start, int *end, int *type ); + + +int keyframe_xml_pack( xmlNodePtr node, void *port, int parameter_id ); + +int keyframe_xml_unpack( xmlDocPtr doc, xmlNodePtr node, void *port ); + +int get_keyframe_value(void *port, int n_frame, int parameter_id, int *result ); +#endif diff --git a/veejay-server/veejay/x11misc.c b/veejay-server/veejay/x11misc.c new file mode 100644 index 00000000..b18f3096 --- /dev/null +++ b/veejay-server/veejay/x11misc.c @@ -0,0 +1,157 @@ +/* veejay - Linux VeeJay + * (C) 2002-2006 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#ifndef X_DISPLAY_MISSING +#include +#include +#include +#include +#ifdef HAVE_XINERAMA +#include +#endif + +#define DECO (1L << 1) + +static int screen_saver_[4]; + +#ifdef HAVE_XDPMS +static CARD16 state_; +static BOOL onoff_; +#endif + +void x11_misc_init() +{ + memset(&screen_saver_,0, sizeof(screen_saver_)); +#ifdef HAVE_XDPMS + memset(&state_, 0,sizeof(state_)); + memset(&onoff_, 0,sizeof(onoff_)); +#endif +} + +void x11_disable_screensaver( void *display ) +{ + Display *d = (Display*) display; + + XGetScreenSaver( d, &screen_saver_[0], &screen_saver_[1], + &screen_saver_[2], &screen_saver_[3] ); + + if( screen_saver_[0] ) + { + XSetScreenSaver( d, 0, screen_saver_[1], screen_saver_[2],screen_saver_[3] ); + } + +#ifdef HAVE_XDPMS + int n = 0; + if( DPMSQueryExtension( d, &n, &n ) ) + { + DPMSInfo( d, &state_, &ononff_ ); + DPMSDisable( d ); + } +#endif +} + +void x11_enable_screensaver( void *display ) +{ + Display *d = (Display*) display; + + if( screen_saver_[0] ) + { + XSetScreenSaver( d, screen_saver_[0],screen_saver_[1], + screen_saver_[2],screen_saver_[3] ); + } +#ifdef HAVE_XDPMS + int n = 0; + if( DPMSQueryExtension( d, &n, &n ) ) + { + if( onoff_ ) + DPMSEnable( d ); + } +#endif +} + +void x11_misc_set_border( void *display, void *window, int status ) +{ + +} + +static int xinerama_screen_ = -1; +static int xinerama_x_ = 0; +static int xinerama_y_ = 0; +static int xinerama_user_selected_ = 0; +static int screen_w_ = 0; +static int screen_h_ = 0; + +void x11_move( void *display, void *window ) +{ + Display *d = (Display*) display; + Window *w = (Window*) window; +#ifdef HAVE_XINERAMA + if( XineramaIsActive( d ) ) + { + XMoveWindow( d, w, xinerama_x_, xinerama_y_ ); + } +#endif +} + +void x11_user_select( int n ) +{ + xinerama_user_selected_ = n; +} + +void x11_info(void *display) +{ + Display *d = (Display*) display; +#ifdef HAVE_XINERAMA + + int dis1,dis2; + + if( XineramaIsActive( d ) && + XineramaQueryExtension( d, &dis1,&dis2) ) + { + veejay_msg(VEEJAY_MSG_INFO, "\tUsing XFree Xinerama extension"); + + int n = 0; + XineramaScreenInfo *screens = + XineramaQueryScreens( d, &n ); + + if( xinerama_user_selected_ < 0 || + xinerama_user_selected_ >= n ) + { + veejay_msg(VEEJAY_MSG_ERROR, "\tRequested screen number invalid"); + xinerama_user_selected_ = 0; + } + + + xinerama_x_ = screens[ xinerama_user_selected_ ].x_org; + xinerama_y_ = screens[ xinerama_user_selected_ ].y_org; + screen_w_ = screens[ xinerama_user_selected_ ].width; + screen_h_ = screens[ xinerama_user_selected_ ].height; + + veejay_msg(VEEJAY_MSG_INFO, "\tUsing screen %d : %dx%d+%dx%d", + xinerama_user_selected_, screen_w_, screen_h_, xinerama_x_, xinerama_y_ ); + + XFree( screens ); + } +#endif +} + +#endif diff --git a/veejay-server/veejay/x11misc.h b/veejay-server/veejay/x11misc.h new file mode 100644 index 00000000..203d120f --- /dev/null +++ b/veejay-server/veejay/x11misc.h @@ -0,0 +1,32 @@ +/* veejay - Linux VeeJay + * (C) 2002-2006 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef X11MISC +#define X11MISC +void x11_enable_screensaver( void *display ); +void x11_disable_screensaver( void *display ); +void x11_misc_init(); +void x11_misc_set_border( void *display, void *window, int status ); + +void x11_move( void *display, void *window ); +void x11_info(void *display); + +void x11_user_select( int n ); + +#endif + diff --git a/veejay-server/ylwrap b/veejay-server/ylwrap new file mode 100755 index 00000000..102bd893 --- /dev/null +++ b/veejay-server/ylwrap @@ -0,0 +1,223 @@ +#! /bin/sh +# ylwrap - wrapper for lex/yacc invocations. + +scriptversion=2005-05-14.22 + +# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case "$1" in + '') + echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 + exit 1 + ;; + --basedir) + basedir=$2 + shift 2 + ;; + -h|--h*) + cat <<\EOF +Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... + +Wrapper for lex/yacc invocations, renaming files as desired. + + INPUT is the input file + OUTPUT is one file PROG generates + DESIRED is the file we actually want instead of OUTPUT + PROGRAM is program to run + ARGS are passed to PROG + +Any number of OUTPUT,DESIRED pairs may be used. + +Report bugs to . +EOF + exit $? + ;; + -v|--v*) + echo "ylwrap $scriptversion" + exit $? + ;; +esac + + +# The input. +input="$1" +shift +case "$input" in + [\\/]* | ?:[\\/]*) + # Absolute path; do nothing. + ;; + *) + # Relative path. Make it absolute. + input="`pwd`/$input" + ;; +esac + +pairlist= +while test "$#" -ne 0; do + if test "$1" = "--"; then + shift + break + fi + pairlist="$pairlist $1" + shift +done + +# The program to run. +prog="$1" +shift +# Make any relative path in $prog absolute. +case "$prog" in + [\\/]* | ?:[\\/]*) ;; + *[\\/]*) prog="`pwd`/$prog" ;; +esac + +# FIXME: add hostname here for parallel makes that run commands on +# other machines. But that might take us over the 14-char limit. +dirname=ylwrap$$ +trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 +mkdir $dirname || exit 1 + +cd $dirname + +case $# in + 0) $prog "$input" ;; + *) $prog "$@" "$input" ;; +esac +ret=$? + +if test $ret -eq 0; then + set X $pairlist + shift + first=yes + # Since DOS filename conventions don't allow two dots, + # the DOS version of Bison writes out y_tab.c instead of y.tab.c + # and y_tab.h instead of y.tab.h. Test to see if this is the case. + y_tab_nodot="no" + if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot="yes" + fi + + # The directory holding the input. + input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` + # Quote $INPUT_DIR so we can use it in a regexp. + # FIXME: really we should care about more than `.' and `\'. + input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` + + while test "$#" -ne 0; do + from="$1" + # Handle y_tab.c and y_tab.h output by DOS + if test $y_tab_nodot = "yes"; then + if test $from = "y.tab.c"; then + from="y_tab.c" + else + if test $from = "y.tab.h"; then + from="y_tab.h" + fi + fi + fi + if test -f "$from"; then + # If $2 is an absolute path name, then just use that, + # otherwise prepend `../'. + case "$2" in + [\\/]* | ?:[\\/]*) target="$2";; + *) target="../$2";; + esac + + # We do not want to overwrite a header file if it hasn't + # changed. This avoid useless recompilations. However the + # parser itself (the first file) should always be updated, + # because it is the destination of the .y.c rule in the + # Makefile. Divert the output of all other files to a temporary + # file so we can compare them to existing versions. + if test $first = no; then + realtarget="$target" + target="tmp-`echo $target | sed s/.*[\\/]//g`" + fi + # Edit out `#line' or `#' directives. + # + # We don't want the resulting debug information to point at + # an absolute srcdir; it is better for it to just mention the + # .y file with no path. + # + # We want to use the real output file name, not yy.lex.c for + # instance. + # + # We want the include guards to be adjusted too. + FROM=`echo "$from" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` + TARGET=`echo "$2" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` + + sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ + -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? + + # Check whether header files must be updated. + if test $first = no; then + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$2" is unchanged + rm -f "$target" + else + echo updating "$2" + mv -f "$target" "$realtarget" + fi + fi + else + # A missing file is only an error for the first file. This + # is a blatant hack to let us support using "yacc -d". If -d + # is not specified, we don't want an error when the header + # file is "missing". + if test $first = yes; then + ret=1 + fi + fi + shift + shift + first=no + done +else + ret=$? +fi + +# Remove the directory. +cd .. +rm -rf $dirname + +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/veejay-server/yo.yuv b/veejay-server/yo.yuv new file mode 100644 index 00000000..3e5d124e --- /dev/null +++ b/veejay-server/yo.yuv @@ -0,0 +1 @@ +YUV4MPEG2 W420 H300 F25:1 Ip A1:1 C420jpeg diff --git a/veejay-themes/AUTHORS b/veejay-themes/AUTHORS new file mode 100644 index 00000000..b4aa9ac9 --- /dev/null +++ b/veejay-themes/AUTHORS @@ -0,0 +1,2 @@ +Matthijs v. Henten +Niels Elburg diff --git a/veejay-themes/COPYING b/veejay-themes/COPYING new file mode 100644 index 00000000..d60c31a9 --- /dev/null +++ b/veejay-themes/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/veejay-themes/ChangeLog b/veejay-themes/ChangeLog new file mode 100644 index 00000000..e69de29b diff --git a/veejay-themes/GrayHeart.rc b/veejay-themes/GrayHeart.rc new file mode 100644 index 00000000..90a0e742 --- /dev/null +++ b/veejay-themes/GrayHeart.rc @@ -0,0 +1,1587 @@ +# "BlueHeart" theme for GTK+ 2.x by Jean-Paul Bizet (jp-bizet@bigfoot.com). +# Most graphics are from Claudiu Christian Fofiu, the author of the original BlueHeart theme for GTK 1.x, E, XMMS ... +# Part of this file comes from the GlossyP theme and from other themes. + + +style "default" +{ + GtkWidget::interior_focus = 1 + GtkWidget::focus_padding = 1 + GtkButton::default_border = { 0, 0, 0, 0 } + GtkButton::default_outside_border = { 0, 0, 0, 0 } + GtkRange::trough_border = 0 + GtkRange::slider_width = 16 + GtkRange::slider-length = 12 + GtkRange::stepper_size = 8 + GtkPaned::handle_size = 4 + GtkScrollbar::min_slider_length = 16 + GtkCheckButton::indicator_size = 8 + GtkCheckButton::indicator_spacing = 1 + GtkMenuBar::internal_padding = 2 + GtkOptionMenu::indicator_size = { 12, 6 } + GtkOptionMenu::indicator_spacing = { 8, 2, 0, 0 } + GtkStatusbar::shadow_type = GTK_SHADOW_ETCHED_OUT + + xthickness = 2 + ythickness = 2 + + fg[NORMAL] = "#1c1c1c" + fg[PRELIGHT] = "#cacaca" + fg[ACTIVE] = "#e5e5e5" + fg[SELECTED] = "#e5e5e5" + fg[INSENSITIVE] = "#3f3f3f" + + bg[NORMAL] = "#4b4b4b" + bg[PRELIGHT] = "#4b4b4b" + bg[ACTIVE] = "#4b4b4b" + bg[SELECTED] = "#b9b9b9" + + bg[INSENSITIVE] = "#4b4b4b" + + base[NORMAL] = "#444444" + base[PRELIGHT] = "#aeafb0" + base[ACTIVE] = "#aeafb0" + base[SELECTED] = "#aeafb0" + base[INSENSITIVE] = "#4b4b4b" + + text[NORMAL] = "#e5e5e5" + text[PRELIGHT] = "#383838" + text[ACTIVE] = "#000000" + text[SELECTED] = "#7a7d80" + text[INSENSITIVE] = "#3f3f3f" + + engine "pixmap" + { + + # Flat by default + +# image +# { +# function = BOX +# } + + # handle + + image + { + function = HANDLE + recolorable = TRUE + overlay_file = "handle-h.png" + overlay_stretch = FALSE + orientation = HORIZONTAL + } + image + { + function = HANDLE + recolorable = TRUE + overlay_file = "handle-v.png" + overlay_stretch = FALSE + orientation = VERTICAL + } + + # shadow + + image + { + function = SHADOW + shadow = IN + recolorable = FALSE + file = "shadow-in.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = SHADOW + shadow = OUT + recolorable = TRUE + file = "toolbar.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = SHADOW + shadow = ETCHED_IN + recolorable = TRUE + file = "frame2.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + } + image + { + function = SHADOW + shadow = ETCHED_OUT + recolorable = TRUE + file = "frame1.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + } + image + { + function = SHADOW_GAP + recolorable = TRUE + file = "frame1.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + gap_start_file = "frame-gap-start.png" + gap_start_border = { 2, 0, 2, 0 } + gap_end_file = "frame-gap-end.png" + gap_end_border = { 0, 2, 2, 0 } + gap_side = TOP + } + image + { + function = VLINE + recolorable = TRUE + file = "line-v.png" + border = { 1, 1, 0, 0 } + stretch = TRUE + } + image + { + function = HLINE + recolorable = TRUE + file = "line-h.png" + border = { 0, 0, 1, 1 } + stretch = TRUE + } + + # focus + + image + { + function = FOCUS + recolorable = TRUE + file = "focus.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + + # arrows + + image + { + function = ARROW + recolorable = TRUE + overlay_file = "arrow-up.png" + overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + arrow_direction = UP + } + image + { + function = ARROW + recolorable = TRUE + overlay_file = "arrow-down.png" + overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + arrow_direction = DOWN + } + image + { + function = ARROW + recolorable = TRUE + overlay_file = "arrow-left.png" + overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + arrow_direction = LEFT + } + image + { + function = ARROW + recolorable = TRUE + overlay_file = "arrow-right.png" + overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + arrow_direction = RIGHT + } + image + { + function = BOX + recolorable = TRUE + file = "toolbar.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + +class "GtkWidget" style "default" + + + +style "button" = "default" +{ + + engine "pixmap" + { + image + { + function = BOX + detail = "buttondefault" + recolorable = TRUE + file = "button-default.png" + border = { 9, 9, 9, 9 } + stretch = TRUE + } + image + { + function = BOX + state = PRELIGHT + recolorable = TRUE + file = "button-prelight.png" + border = { 3, 3, 3, 3} + stretch = TRUE + } + image + { + function = BOX + state = ACTIVE + file = "button-pressed.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = BOX + state = INSENSITIVE + file = "button-insensitive.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = BOX + file = "button-normal.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + + +style "togglebutton" +{ + engine "pixmap" { + + image + { + function = BOX + recolorable = TRUE + shadow = IN + file = "button-toggle.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = BOX + recolorable = TRUE + shadow = OUT + file = "button-normal.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + + +style "checkradiobutton" { + engine "pixmap" { + image + { + function = FLAT_BOX + recolorable = TRUE + file = "highlight.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + +class "GtkRadioButton" style "checkradiobutton" +class "GtkCheckButton" style "checkradiobutton" + + +style "optionmenu" = "default" +{ + engine "pixmap" + { + image + { + function = BOX + recolorable = TRUE + state = NORMAL + file = "button-normal.png" + border = { 4, 4, 4, 4} + stretch = TRUE + } + image + { + function = BOX + recolorable = TRUE + state = PRELIGHT + file = "button-prelight.png" + border = { 4, 4, 4, 4} + stretch = TRUE + } + image + { + function = BOX + recolorable = TRUE + state = ACTIVE + file = "button-normal.png" + border = { 4, 4, 4, 4} + stretch = TRUE + } + image + { + function = BOX + recolorable = TRUE + state = INSENSITIVE + file = "button-insensitive.png" + border = { 4, 4, 4, 4} + stretch = TRUE + } + image + { + function = TAB + recolorable = TRUE + overlay_file = "option-menu.png" + overlay_stretch = FALSE + } + } +} + + +style "combobox" = "default" +{ +engine "pixmap" { + image + { + function = BOX + recolorable = TRUE + state = NORMAL + file = "button-normal.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } +image + { + function = BOX + recolorable = TRUE + state = PRELIGHT + file = "button-prelight.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } +image + { + function = BOX + recolorable = TRUE + state = ACTIVE + file = "button-normal.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } +image + { + function = BOX + recolorable = TRUE + state = SELECTED + file = "button-normal.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } +image + { + function = BOX + recolorable = TRUE + state = INSENSITIVE + file = "button-insensitive.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } +image + { + function = VLINE + recolorable = TRUE + file = "null.png" + stretch = TRUE + } + } +} + + + +style "radiobutton" = "default" +{ + engine "pixmap" + { + image + { + function = OPTION + shadow = OUT + recolorable = TRUE + overlay_file = "option1.png" + #overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + } + image + { + function = OPTION + shadow = IN + recolorable = TRUE + overlay_file = "option2.png" + #overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + } + image + { + function = OPTION + shadow = ETCHED_IN + recolorable = TRUE + overlay_file = "option3.png" + #overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + } + } +} + + +style "checkbutton" = "default" +{ + engine "pixmap" + { + image + { + function = CHECK + shadow = OUT + recolorable = TRUE + overlay_file = "check1.png" + overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + } + image + { + function = CHECK + shadow = IN + recolorable = TRUE + overlay_file = "check2.png" + overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + } + image + { + function = CHECK + shadow = ETCHED_IN + recolorable = TRUE + overlay_file = "check3.png" + overlay_border = { 0, 0, 0, 0 } + overlay_stretch = FALSE + } + } +} + + +style "entry" = "default" +{ + GtkWidget::interior_focus = 1 + + engine "pixmap" + { + image + { + function = FOCUS + recolorable = TRUE + file = "shadow-in.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + + +style "spinbutton" = "entry" +{ + engine "pixmap" + { + image + { + function = ARROW + } + image + { + function = BOX + detail = "spinbutton_up" + recolorable = TRUE + file = "spin.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + overlay_file = "arrow-up.png" + overlay_border = { 10, 0, 7, 0 } + overlay_stretch = FALSE + } + image + { + function = BOX + detail = "spinbutton_down" + recolorable = TRUE + file = "spin.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + overlay_file = "arrow-down.png" + overlay_border = { 10, 0, 7, 0 } + overlay_stretch = FALSE + } + } +} + + +style "scrollbar" +{ + engine "pixmap" + { + + image + { + function = BOX + recolorable = TRUE + detail = "trough" + file = "trough.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = HORIZONTAL + } + image + { + function = BOX + recolorable = TRUE + detail = "trough" + file = "trough.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = VERTICAL + } + image + { + function = SLIDER + recolorable = TRUE + state = NORMAL + file = "slider-h.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = HORIZONTAL + overlay_file = "thumb-grip.png" + overlay_stretch = FALSE + orientation = HORIZONTAL + } + image + { + function = SLIDER + recolorable = TRUE + state = PRELIGHT + file = "slider-h.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = HORIZONTAL + overlay_file = "thumb-grip-prelight.png" + overlay_stretch = FALSE + orientation = HORIZONTAL + } + image + { + function = SLIDER + recolorable = TRUE + state = INSENSITIVE + file = "slider-h-insensitive.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = HORIZONTAL + overlay_file = "thumb-grip.png" + overlay_stretch = FALSE + orientation = HORIZONTAL + } + image + { + function = SLIDER + recolorable = TRUE + state = NORMAL + file = "slider-v.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = VERTICAL + overlay_file = "thumb-grip.png" + overlay_stretch = FALSE + orientation = VERTICAL + } + image + { + function = SLIDER + recolorable = TRUE + state = PRELIGHT + file = "slider-v.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = VERTICAL + overlay_file = "thumb-grip-prelight.png" + overlay_stretch = FALSE + orientation = VERTICAL + } + image + { + function = SLIDER + recolorable = TRUE + state = INSENSITIVE + file = "slider-v-insensitive.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = VERTICAL + overlay_file = "thumb-grip.png" + overlay_stretch = FALSE + orientation = VERTICAL + } + image + { + function = STEPPER + recolorable = TRUE + state = NORMAL + file = "stepper-up.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = UP + } + image + { + function = STEPPER + recolorable = TRUE + state = INSENSITIVE + file = "stepper-up-insensitive.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = UP + } + image + { + function = STEPPER + recolorable = TRUE + state = PRELIGHT + file = "stepper-up-prelight.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = UP + } + image + { + function = STEPPER + recolorable = TRUE + state = ACTIVE + file = "stepper-up-pressed.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = UP + } + image + { + function = STEPPER + recolorable = TRUE + state = NORMAL + file = "stepper-down.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = DOWN + } + image + { + function = STEPPER + recolorable = TRUE + state = INSENSITIVE + file = "stepper-down-insensitive.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = DOWN + } + image + { + function = STEPPER + recolorable = TRUE + state = PRELIGHT + file = "stepper-down-prelight.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = DOWN + } + image + { + function = STEPPER + recolorable = TRUE + state = ACTIVE + file = "stepper-down-pressed.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = DOWN + } + image + { + function = STEPPER + recolorable = TRUE + state = NORMAL + file = "stepper-right.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = RIGHT + } + image + { + function = STEPPER + recolorable = TRUE + state = INSENSITIVE + file = "stepper-right-insensitive.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = RIGHT + } + image + { + function = STEPPER + recolorable = TRUE + state = PRELIGHT + file = "stepper-right-prelight.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = RIGHT + } + image + { + function = STEPPER + recolorable = TRUE + state = ACTIVE + file = "stepper-right-pressed.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = RIGHT + } + image + { + function = STEPPER + recolorable = TRUE + state = NORMAL + file = "stepper-left.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = LEFT + } + image + { + function = STEPPER + recolorable = TRUE + state = INSENSITIVE + file = "stepper-left-insensitive.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = LEFT + } + image + { + function = STEPPER + recolorable = TRUE + state = PRELIGHT + file = "stepper-left-prelight.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = LEFT + } + image + { + function = STEPPER + recolorable = TRUE + state = ACTIVE + file = "stepper-left-pressed.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + arrow_direction = LEFT + } + } +} + + +style "progressbar" = "default" +{ + engine "pixmap" + { + image + { + function = BOX + detail = "trough" + recolorable = TRUE + file = "trough-progressbar.png" + border = { 5, 5, 5, 5 } + stretch = TRUE + } + image + { + function = BOX + detail = "bar" + recolorable = TRUE + file = "menubar.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + } + } +} + + +style "range" = "default" +{ + engine "pixmap" + { + image + { + function = BOX + recolorable = TRUE + state = ACTIVE + detail = "trough" + file = "trough.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = HORIZONTAL + } + image + { + function = BOX + recolorable = TRUE + state = INSENSITIVE + detail = "trough" + file = "trough-insensitive.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = HORIZONTAL + } + image + { + function = BOX + recolorable = TRUE + state = ACTIVE + detail = "trough" + file = "trough.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = VERTICAL + } + image + { + function = BOX + recolorable = TRUE + detail = "trough" + file = "trough-insensitive.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + orientation = VERTICAL + } + image + { + function = SLIDER + recolorable = TRUE + state = NORMAL + file = "slider-range-h.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + #overlay_file = "thumb-grip-h.png" + #overlay_stretch = FALSE + orientation = HORIZONTAL + } + image + { + function = SLIDER + recolorable = TRUE + state = PRELIGHT + file = "slider-range-prelight-h.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + #overlay_file = "thumb-grip-h.png" + #overlay_stretch = FALSE + orientation = HORIZONTAL + } + image + { + function = SLIDER + recolorable = TRUE + state = INSENSITIVE + file = "slider-range-h-insensitive.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + #overlay_file = "thumb-grip-h.png" + #overlay_stretch = FALSE + orientation = HORIZONTAL + } + image + { + function = SLIDER + recolorable = TRUE + state = NORMAL + file = "slider-range-v.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + #overlay_file = "thumb-grip-v.png" + #overlay_stretch = FALSE + orientation = VERTICAL + } + image + { + function = SLIDER + recolorable = TRUE + state = PRELIGHT + file = "slider-range-prelight-v.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + #overlay_file = "thumb-grip-v.png" + #overlay_stretch = FALSE + orientation = VERTICAL + } + image + { + function = SLIDER + recolorable = TRUE + state = INSENSITIVE + file = "slider-range-v-insensitive.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + #overlay_file = "thumb-grip-v.png" + #overlay_stretch = FALSE + orientation = VERTICAL + } + } +} + + +style "menu" = "default" +{ + engine "pixmap" + { + image + { + function = BOX + recolorable = TRUE + detail = "menu" + file = "menu.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + + +style "menubar" = "default" +{ + engine "pixmap" + { + image + { + function = BOX + file = "menubar.png" + border = { 3, 2, 2, 1 } + stretch = TRUE + } + } +} + + +style "menuitem" = "default" +{ + xthickness = 4 + engine "pixmap" + { + image + { + function = BOX + recolorable = TRUE + file = "menuitem.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = ARROW + recolorable = TRUE + overlay_file = "arrow-right.png" + overlay_stretch = FALSE + arrow_direction = RIGHT + } + } +} + + +style "tearoffmenuitem" = "menuitem" +{ + engine "pixmap" + { + image + { + function = ARROW + file = "arrow-left.png" + stretch = TRUE + arrow_direction = LEFT + } +# image +# { +# function = HLINE +# file = "cuthere.png" +# border = { 0, 0, 0, 0 } +# stretch = TRUE +# } + } +} + + +style "notebook" = "default" +{ + + engine "pixmap" + { + image + { + function = EXTENSION + recolorable = TRUE + state = ACTIVE + file = "ext-top.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + gap_side = BOTTOM + } + image + { + function = EXTENSION + recolorable = TRUE + state = ACTIVE + file = "ext-bottom.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + gap_side = TOP + } + image + { + function = EXTENSION + recolorable = TRUE + state = ACTIVE + file = "ext-right.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + gap_side = LEFT + } + image + { + function = EXTENSION + recolorable = TRUE + state = ACTIVE + file = "ext-left.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + gap_side = RIGHT + } + image + { + function = EXTENSION + recolorable = TRUE + file = "extension-top.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + gap_side = BOTTOM + } + image + { + function = EXTENSION + recolorable = TRUE + file = "extension-bottom.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + gap_side = TOP + } + image + { + function = EXTENSION + recolorable = TRUE + file = "extension-left.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + gap_side = RIGHT + } + image + { + function = EXTENSION + recolorable = TRUE + file = "extension-right.png" + border = { 4, 4, 4, 4 } + stretch = TRUE + gap_side = LEFT + } +# +# How to draw boxes with a gap on one side (ie the page of a notebook) +# + image + { + function = BOX_GAP + recolorable = TRUE + file = "notebook.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + gap_file = "gap_top.png" + gap_border = { 3, 2, 1, 1 } + gap_start_file = "null.png" + gap_end_file = "null.png" + gap_side = TOP + } + image + { + function = BOX_GAP + recolorable = TRUE + file = "notebook.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + gap_file = "gap_bottom.png" + gap_border = { 2, 1, 1, 1 } + gap_start_file = "null.png" + gap_end_file = "null.png" + gap_side = BOTTOM + } + image + { + function = BOX_GAP + recolorable = TRUE + file = "notebook.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + gap_file = "gap_left.png" + gap_border = { 1, 1, 2, 1 } + gap_start_file = "null.png" + gap_end_file = "null.png" + gap_side = LEFT + } + image + { + function = BOX_GAP + recolorable = TRUE + file = "notebook.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + gap_file = "gap_right.png" + gap_border = { 1, 1, 2, 1 } + gap_start_file = "null.png" + gap_end_file = "null.png" + gap_side = RIGHT + } +# +# How to draw the box of a notebook when it isnt attached to a tab +# + image + { + function = BOX + recolorable = TRUE + file = "notebook.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + gap_side = TOP + } + } +} + + +style "treeview" = "default" +{ + engine "pixmap" + { + # don't draw the focus around listitems + image + { + function = FOCUS + } + } +} + + +style "textview" = "default" +{ + bg[NORMAL] = "#000000" + + engine "pixmap" + { + # don't draw focus around textview + image + { + function = FOCUS + } + } +} + + +style "tooltips" = "default" +{ + bg[NORMAL] = "#888888" +} + + +style "ruler" = "default" +{ + engine "pixmap" { + image + { + function = BOX + recolorable = TRUE + detail = "vruler" + file = "ruler-v.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = BOX + recolorable = TRUE + detail = "hruler" + file = "ruler-h.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + + +style "handlebox" = "default" +{ + engine "pixmap" + { + image + { + #function = SHADOW + } + + image + { + function = HANDLE + recolorable = TRUE + overlay_file = "handle-v.png" + overlay_stretch = FALSE + orientation = VERTICAL + } + image + { + function = HANDLE + overlay_file = "handle-h.png" + overlay_stretch = FALSE + orientation = HORIZONTAL + } + } +} + + +style "flat" = "default" +{ + engine "pixmap" + { + image + { + function = SHADOW + } + } +} + + +style "list-header" +{ + #Comment out the ythickness setting below for thicker column headers. + #ythickness = 0 + GtkTreeView::odd_row_color = "#2c2c2c" + GtkTreeView::even_row_color = "#555555" + + engine "pixmap" + { + + #This image is used to draw the headers of columns in list views when they are + #not selected. + image + { + function = BOX + recolorable = TRUE + shadow = OUT + file = "list_header.png" + border = { 2, 2, 2, 1 } + stretch = TRUE + } + + #This image is used to draw the column headers in list views when they are + #clicked. + image + { + function = BOX + recolorable = TRUE + shadow = IN + file = "list_header-pressed.png" + border = { 2, 2, 2, 1 } + stretch = TRUE + } + + #Does this do anything? + image + { + function = BOX + recolorable = TRUE + shadow = OUT + state = PRELIGHT + file = "list_header-pressed.png" + border = { 2, 2, 2, 1 } + stretch = TRUE + } + } + +} + +widget_class "*List" style "list-header" +widget_class "*Tree*" style "list-header" +widget_class "GtkCList" style "list-header" + + +# This prevents Sodipodi from crashing while opening the +# Object-Style dialog. + + +style "unstyle" +{ + engine "" + { + } +} + +# recognizable pressed toggle buttons +# SPIcons seem to erase the background first. That's why I can't use +# the button style. + + +style "SPbutton" +{ + engine "pixmap" + { + image + { + function = BOX + shadow = IN + recolorable = TRUE + file = "shadow-out.png" + border = { 2, 2, 2, 2 } + stretch = TRUE + } + image + { + function = BOX + } + } +} + + +style "panelbg" +{ + xthickness = 1 + ythickness = 1 + #bg_pixmap[NORMAL] = "panel_bg.png" +} + +class "*Panel*" style "panelbg" + + +style "panelbuttons" = "default" +{ + engine "pixmap" + { + image + { + function = BOX + detail = "buttondefault" + recolorable = TRUE + file = "button-default.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = BOX + state = PRELIGHT + recolorable = TRUE + file = "button-normal-panel.png" + border = { 3, 3, 3, 3} + stretch = TRUE + } + image + { + function = BOX + state = ACTIVE + file = "button-pressed-panel.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = BOX + state = INSENSITIVE + file = "button-insensitive.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = BOX + file = "button-normal-panel.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + + +style "paneltogglebutton" +{ + engine "pixmap" { + + image + { + function = BOX + recolorable = TRUE + shadow = IN + file = "button-pressed-panel.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + image + { + function = BOX + recolorable = TRUE + shadow = OUT + file = "button-normal-panel.png" + border = { 3, 3, 3, 3 } + stretch = TRUE + } + } +} + +widget_class "*Panel*GtkToggleButton" style "paneltogglebutton" +widget_class "*Panel*GtkButton" style "panelbuttons" + + +class "GtkButton" style "button" +class "GtkRadioButton" style "radiobutton" +class "GtkToggleButton" style "togglebutton" +class "GtkRadioMenuItem" style "radiobutton" +class "GtkCheckButton" style "checkbutton" +class "GtkCheckMenuItem" style "checkbutton" +class "GtkOptionMenu" style "optionmenu" +widget_class "*Combo*" style "combobox" +class "GtkEntry" style "entry" +class "GtkOldEditable" style "entry" +class "GtkSpinButton" style "spinbutton" +class "GtkRuler" style "ruler" +class "GtkScrollbar" style "scrollbar" +class "GtkProgressBar" style "progressbar" +class "GtkRange" style "range" +class "GtkMenu" style "menu" +class "GtkMenuBar" style "menubar" +class "GtkItem" style "menuitem" +class "GtkTearoffMenuItem" style "tearoffmenuitem" +class "GtkNotebook" style "notebook" +class "GtkTextView" style "textview" +class "GtkTreeView" style "treeview" +class "GtkToolbar" style "flat" +class "GtkHandleBox" style "handlebox" +class "GtkEventBox" style "flat" +class "GtkPaned" style "handlebox" +class "SPButton" style "SPbutton" +widget "gtk-tooltips" style "tooltips" +# prevent Sodipodi from crashing +class "SPColorSlider" style "unstyle" + + +#style "metacity" { +# bg[NORMAL] = "#4b4b4b" # normal base color +# bg[INSENSITIVE] = "#4b4b4b" # unfocused titlebar background color +# bg[SELECTED] = "#4b6983" # focused titlebar background color +# fg[INSENSITIVE] = "#7bacb6" # unfocused text color +# fg[SELECTED] = "#e5e5e5" # focused text color +# fg[NORMAL] = "#e5e5e5" # focused icon color +#} + +#class "MetaFrames" style "metacity" + + +# icons from "Industrial" theme + +style "icon-style" +{ + +stock["gtk-goto-bottom"] = + { + { "stock_bottom.png", *, *, *} + } + + stock["gtk-goto-first"] = + { + { "stock_first.png", *, *, *} + } + + stock["gtk-goto-last"] = + { + { "stock_last.png", *, *, *} + } + + stock["gtk-goto-top"] = + { + { "stock_top.png", *, *, *} + } + + stock["gtk-go-back"] = + { + { "stock_left.png", *, *, *} + } + + stock["gtk-go-down"] = + { + { "stock_down.png", *, *, *} + } + + stock["gtk-go-forward"] = + { + { "stock_right.png", *, *, *} + } + + stock["gtk-go-up"] = + { + { "stock_up.png", *, *, *} + } + + stock["gtk-no"] = + { + { "stock_cancel.png", *, *, *} + } + + stock["gtk-apply"] = + { + { "stock_apply.png", *, *, *} + } + + stock["gtk-cancel"] = + { + { "stock_cancel.png", *, *, *} + } + + stock["gtk-ok"] = + { + { "stock_ok.png", *, *, *} + } + + stock["gtk-yes"] = + { + { "stock_apply.png", *, *, *} + } + + stock["gtk-refresh"] = + { + { "stock_refresh.png", *, *, *} + } +} + +class "GtkWidget" style "icon-style" diff --git a/veejay-themes/GrayHeart.tar.bz2 b/veejay-themes/GrayHeart.tar.bz2 new file mode 100644 index 00000000..462d3b6f Binary files /dev/null and b/veejay-themes/GrayHeart.tar.bz2 differ diff --git a/veejay-themes/INSTALL.sh b/veejay-themes/INSTALL.sh new file mode 100644 index 00000000..f74ccb17 --- /dev/null +++ b/veejay-themes/INSTALL.sh @@ -0,0 +1,83 @@ +#!/bin/bash + + +# install scripts in gveejay directory, symlink to user's dir + +reloaded=`which reloaded` +srcdir=`pwd` +dstdir="" +home=$1 + +if [ -z $reloaded ]; then + echo "Cannot find reloaded in PATH" + exit 1 +fi + +echo "Using srcdir $srcdir" + +if [ -z $home ]; then + echo "Using $HOME for current reloaded user, use $0 /path/to/home to specify another" + home=$HOME +fi + +lndir=`echo $home/.veejay/theme` + +if test -x $reloaded; then + dstdir=`$reloaded -q` + if [ -z $dstdir ]; then + echo "Wrong version of reloaded" + exit + fi +else + echo "reloaded not executable" + exit 1 +fi + +themedir=$dstdir/theme + +# make sure dir exists +mkdir -p $lndir 2>/dev/null +if [ ! -d $lndir ]; then + echo "Cannot create $lndir, abort" + exit 1 +fi + +# find all rc files in current dir +for rcfile in $srcdir/*.rc; do + tmp=`basename $rcfile` + themename=`echo $tmp|cut -d '.' -f1` + extra=$themename.tar.bz2 + mkdir -p $themedir/$themename 2>/dev/null + if [ ! -d $themedir/$themename ]; then + echo "Cannot create $themedir/$themename, abort" + exit 1 + fi + if test -f $extra ; then + cd $themedir/$themename/ + if tar -jxvf $srcdir/$extra >/dev/null ; then + echo " Extracted $extra in `pwd`" + fi + echo "$themedir/$themename" + if cp $rcfile $themedir/$themename/; then + ln -s $themedir/$themename $lndir/$themename 2>/dev/null + ln -s $lndir/$themename/$tmp $themedir/$themename/gveejay.rc 2>/dev/null + fi + cd $srcdir + else + mkdir $lndir/$themename 2>/dev/null + if cp $rcfile $themedir/$themename/; then + ln -s $themedir/$themename/$tmp $lndir/$themename/gveejay.rc 2>/dev/null + echo "Installed $themename to $themedir" + fi + + fi +done + +if test -f $lndir/theme.config ; then + content=`cat $lndir/theme.config` + echo "Current theme is $content" +else + echo "Default" > $lndir/theme.config + echo "Using default theme" +fi +echo "You can now (re)start gveejayreloaded" diff --git a/veejay-themes/NEWS b/veejay-themes/NEWS new file mode 100644 index 00000000..670cb836 --- /dev/null +++ b/veejay-themes/NEWS @@ -0,0 +1,2 @@ + +GveejayReloaded is themeable diff --git a/veejay-themes/README b/veejay-themes/README new file mode 100644 index 00000000..263c2572 --- /dev/null +++ b/veejay-themes/README @@ -0,0 +1,10 @@ + +These are flat themes for reloaded. + +To install them, run INSTALL.sh as root (sudo) +to remove them, run UNINSTALL.sh + + +$ sudo sh INSTALL.sh +# sh INSTALL.sh + diff --git a/veejay-themes/UNINSTALL.sh b/veejay-themes/UNINSTALL.sh new file mode 100644 index 00000000..ccbb3b4b --- /dev/null +++ b/veejay-themes/UNINSTALL.sh @@ -0,0 +1,38 @@ +#!/bin/bash + + +# install scripts in gveejay directory, symlink to user's dir + +reloaded=`which gveejayreloaded` +srcdir=`pwd` +dstdir="" +lndir=`echo $HOME/.veejay/theme` + +if test -x $reloaded; then + dstdir=`$reloaded -q` +else + echo "gveejayreloaded not found" + exit 1 +fi + +themedir=$dstdir/theme + +for rcfile in $srcdir/*.rc; do + tmp=`basename $rcfile` + themename=`echo $tmp|cut -d '.' -f1` + + if test -d $themedir/$themename ; then + if rm -rf $themedir/$themename; then + echo "Uninstalled $theme from $themedir" + else + echo "Unable to remove $themedir/$themename" + fi + fi + if test -f $lndir/$themename ; then + if rm -rf $lndir/$themename; then + echo "Removed $lndir/$themename" + else + echo "Unable to remove $lndir/$themename" + fi + fi +done diff --git a/veejay-themes/blackvelvet.rc b/veejay-themes/blackvelvet.rc new file mode 100644 index 00000000..abd60836 --- /dev/null +++ b/veejay-themes/blackvelvet.rc @@ -0,0 +1,165 @@ +# Edit these colors and fonts however you like. +style "default" +{ +# engine "hcengine" {} + xthickness = 1 + ythickness = 1 + GtkWidget::shadow_type = GTK_SHADOW_ETCHED_OUT + #GtkWidget::interior_focus = 0 + #GtkWidget::focus_padding = 0 + #GtkWidget::default_border = {0, 0, 0, 0} + #GtkWidget::default_outside_border = {0, 0, 0, 0} + GtkWidget::default_spacing = 0 + GtkScale::stepper_size = 8 + GtkRange::through-width = 4 + GtkRange::trough_border = 0 + GtkRange::slider-width = 16 + GtkScale::slider-length = 12 + + font_name = "Sans 8" + + fg[NORMAL] = "#333" # borders etc. + fg[PRELIGHT] = "#444" + fg[ACTIVE] = "#555" # ook borders, van sliders en notebook + fg[SELECTED] = "#666" + fg[INSENSITIVE] = "#777" + + bg[NORMAL] = "#000" # algemene achtergrond kleur + bg[PRELIGHT] = "#000" # achtergrond geselecteerd widget + bg[ACTIVE] = "#000" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#444" + bg[INSENSITIVE] = "#444" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#ccc" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#FF0000" + text[SELECTED] = "#FF0000" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#757f90" + base[SELECTED] = "#757ab3" + base[INSENSITIVE] = "#27282f" + +} + +style "scale"{ + GtkScale::stepper_size = 8 + GtkRange::through-width = 1 + GtkRange::trough_border = 0 + GtkRange::slider-width = 16 + GtkScale::slider-length = 12 + + bg[ACTIVE] = "#333" # trough + bg[NORMAL] = "#444" # normal + bg[PRELIGHT] = "#7a7c7c" # mouseover + bg[INSENSITIVE] = "#222" # achtergrond kleur van niet actieve knopjes + + fg[NORMAL] = "#ccc" # values ( text) + fg[INSENSITIVE] = "#000" # shadow color insensitive + +} + +style "notebook"{ + bg[ACTIVE] = "#333" # niet actieve tabs, achtergrond sliders +} + +style "menubar"{ + bg_pixmap[NORMAL] = "gradient.png" + bg[NORMAL] = "#000000" +} + +style "frame"{ + bg[NORMAL] = "#333" # 4lgemene achtergrond kleur +} + + +style "button"{ + bg[NORMAL] = "#000" + +} + +style "text" +{ + font_name = "Sans 8" + + fg[NORMAL] = "#fff" # borders etc. + fg[PRELIGHT] = "#ccc" + fg[ACTIVE] = "#ffffff" # ook borders, van sliders en notebook + fg[SELECTED] = "#ffffff" + fg[INSENSITIVE] = "#ffffff" + + + bg[NORMAL] = "#27282F" # algemene achtergrond kleur + bg[PRELIGHT] = "#aaacc1" # achtergrond geselecteerd widget + bg[ACTIVE] = "#454f60" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#5058a0" + bg[INSENSITIVE] = "#27282f" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#d8d8d8" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#fff" + text[SELECTED] = "#fff" + text[INSENSITIVE] = "#404040" + +} + +style "tree"{ + + text[NORMAL] = "#ccc" + text[PRELIGHT] = "#fff" + text[ACTIVE] = "#ccc" # when clicked on parent + text[SELECTED] = "#fff" # selected text + text[INSENSITIVE] = "#333" + + base[NORMAL] = "#333" # default background + base[PRELIGHT] = "#444" # special click + base[ACTIVE] = "#555" # matches text + base[SELECTED] = "#444" # selected background + base[INSENSITIVE] = "#000" # disabled + +} + +style "spin"{ + +} + +style "buttons" +{ + + font_name = "Sans 8" + bg_pixmap[NORMAL] = "gradient.png" + bg[NORMAL] = "#333" # normal + bg[PRELIGHT] = "#7a7c7c" # mouseover + bg[ACTIVE] = "#0f0" # onmouseclick + bg[SELECTED] = "#00f" + bg[INSENSITIVE] = "#000" +} + +style "togglebutton" +{ + bg[PRELIGHT] = "#000" # mouseover + bg[INSENSITIVE] = "#000" + + fg[NORMAL] = "#333" # borders etc. + fg[PRELIGHT] = "#444" + fg[ACTIVE] = "#000" # border on click + fg[SELECTED] = "#000" # check on click + fg[INSENSITIVE] = "#000" # disabled +} + + + + +class "GtkButton" style "buttons" +class "GtkSpinButton" style "spin" +class "GtkToggleButton" style "togglebutton" +class "GtkCheckBox" style "togglebutton" +class "GtkLabel" style "text" +class "GtkWidget" style "default" +class "GtkScale" style "scale" +class "GtkMenuBar" style "menubar" +class "GtkFrame" style "frame" +class "GtkNotebook" style "notebook" +class "GtkTreeView" style "tree" diff --git a/veejay-themes/blackvelvet.tar.bz2 b/veejay-themes/blackvelvet.tar.bz2 new file mode 100644 index 00000000..8a321872 Binary files /dev/null and b/veejay-themes/blackvelvet.tar.bz2 differ diff --git a/veejay-themes/fruitsalade.rc b/veejay-themes/fruitsalade.rc new file mode 100644 index 00000000..d5295db6 --- /dev/null +++ b/veejay-themes/fruitsalade.rc @@ -0,0 +1,161 @@ +# (C) Matthijs v. Henten, 2007 +# For license details, see COPYING. +# License: GNU GPL + +style "default" +{ + xthickness = 1 + ythickness = 1 + GtkWidget::shadow_type = GTK_SHADOW_NONE + #GtkWidget::interior_focus = 0 + #GtkWidget::focus_padding = 0 + GtkWidget::default_border = {0, 0, 0, 0} + GtkWidget::default_outside_border = {0, 0, 0, 0} + GtkWidget::default_spacing = 0 + + GtkScale::stepper_size = 8 + GtkRange::through-width = 1 + GtkRange::trough_border = 0 + GtkRange::slider-width = 16 + GtkScale::slider-length = 12 + + font_name = "Sans 10" + + fg[NORMAL] = "#333" # borders etc. + fg[PRELIGHT] = "#444" + fg[ACTIVE] = "#555" # ook borders, van sliders en notebook + fg[SELECTED] = "#666" + fg[INSENSITIVE] = "#777" + + bg[NORMAL] = "#86b3b2" # algemene achtergrond kleur + bg[PRELIGHT] = "#ad8282" # achtergrond geselecteerd widget + bg[ACTIVE] = "#8e8e6b" # niet actieve tabs, achtergrond sliders + bg[SELECTED] = "#444" + bg[INSENSITIVE] = "#8e8e6b" # achtergrond kleur van niet actieve knopjes + + text[NORMAL] = "#ccc" + text[PRELIGHT] = "#d8d8d8" + text[ACTIVE] = "#fff" + text[SELECTED] = "#fff" + text[INSENSITIVE] = "#404040" + + base[NORMAL] = "#37383f" + base[PRELIGHT] = "#aaacc1" + base[ACTIVE] = "#444" + base[SELECTED] = "#444" + base[INSENSITIVE] = "#27282f" + +} + + +style "container"{ + bg[NORMAL] = "#cccc9b" + bg[ACTIVE] = "#878765" # niet actieve tabs, achtergrond sliders +} + +style "menubar"{ + # bg_pixmap[NORMAL] = "gradient.png" + bg[NORMAL] = "#000000" +} + +style "frame"{ + bg[NORMAL] = "#333" # 4lgemene achtergrond kleur +} + + +style "spin"{ + font_name = "sans bold 10" + + GtkButton::default-border = {0, 0, 0, 0} + GtkButton::default-outside-border = {0, 0, 0, 0} + GtkButton::inner-border = {0, 0, 0, 0} + + + bg[NORMAL] = "#ad8282" # normal + bg[PRELIGHT] = "#7a7c7c" # mouseover + bg[ACTIVE] = "#0f0" # onmouseclick + bg[INSENSITIVE] = "#878765" + + base[NORMAL] = "#fff" # default background + base[SELECTED] = "#444" # selected background + + text[NORMAL] = "#000" + text[SELECTED] = "#fff" +} + +style "buttons" +{ + + # bg_pixmap[NORMAL] = "gradient.png" + bg[NORMAL] = "#ad8282" # normal + bg[PRELIGHT] = "#7a7c7c" # mouseover + bg[ACTIVE] = "#0f0" # onmouseclick + bg[INSENSITIVE] = "#878765" + + GtkButton::default-border = {0, 0, 0, 0} + GtkButton::default-outside-border = {0, 0, 0, 0} + GtkButton::inner-border = {0, 0, 0, 0} + + GtkButton::child-displacement-x = 0 + GtkButton::child-displacement-y = 0 + GtkButton::displace-focus = 0 + +} + + +style "combobox" +{ + GtkButton::default-border = {0, 0, 0, 0} + GtkButton::default-outside-border = {0, 0, 0, 0} + GtkButton::inner-border = {0, 0, 0, 0} + GtkWidget::focus-line-width = 0 + GtkWidget::focus-padding = 0 + GtkWidget::focus-line-pattern = "\0\0\0\0\0\0\0\0" + GtkComboBox::hildonlike = 0 + GtkComboBox::arrow-width = 20 + GtkComboBox::arrow-height = 10 + GtkComboBox::minimum-width = 50 + GtkComboBox::minimum-height = 15 + GtkComboBox::autodimmed_button = 0 + GtkComboBox::appears-as-list = 0 +} + +style "menubar"{ + font_name = "Sans Bold Italic 10" + bg[NORMAL] = "#009696" # normal + bg[PRELIGHT] = "#7a7c7c" # mouseover + bg[ACTIVE] = "#0f0" # onmouseclick + bg[INSENSITIVE] = "#ccc" +} + +style "white"{ + bg[NORMAL] = "#fff" # normal + bg[PRELIGHT] = "#fff" # mouseover + bg[ACTIVE] = "#fff" # onmouseclick + bg[INSENSITIVE] = "#fff" + +} + + + +class "GtkButton" style "buttons" +class "GtkSpinButton" style "spin" +class "GtkToggleButton" style "spin" +class "GtkCheckBox" style "spin" +class "GtkEntry" style "spin" + + +class "GtkWidget" style "default" +class "GtkComboBox" style "combobox" +class "GtkComboBoxEntry" style "combobox" +class "GtkNotebook" style "container" + + +# class "GtkTreeView" style "tree" +class "GtkMenuBar" style "menubar" +widget "*.GtkComboBox.*" style "combobox" +widget "menubar2" style "white" +widget "sample_bank_hbox" style "container" + + + diff --git a/veejay-utils/AUTHORS b/veejay-utils/AUTHORS new file mode 100644 index 00000000..ad418752 --- /dev/null +++ b/veejay-utils/AUTHORS @@ -0,0 +1 @@ +Niels Elburg \ No newline at end of file diff --git a/veejay-utils/COPYING b/veejay-utils/COPYING new file mode 100644 index 00000000..d60c31a9 --- /dev/null +++ b/veejay-utils/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/veejay-utils/ChangeLog b/veejay-utils/ChangeLog new file mode 100644 index 00000000..e69de29b diff --git a/veejay-utils/INSTALL b/veejay-utils/INSTALL new file mode 100644 index 00000000..54caf7c1 --- /dev/null +++ b/veejay-utils/INSTALL @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/veejay-utils/Makefile.am b/veejay-utils/Makefile.am new file mode 100644 index 00000000..be98f6c6 --- /dev/null +++ b/veejay-utils/Makefile.am @@ -0,0 +1,47 @@ +# Process with automake to produce Makefile.in + +SUBDIRS = src man + +# +# Add any non autoconf'd files here, extra readmes and other misc +# info to be copied into the dist +# +EXTRA_DIST = \ + autogen.sh\ + depcomp \ + cpuinfo.sh \ + autogen.sh + +DISTCLEANFILES = \ + confdefs.h \ + config.cache \ + config.status \ + config.log + + +MAINTAINERCLEANFILES = \ + compile \ + depcomp \ + install-sh \ + missing \ + mkinstalldirs \ + Makefile.in \ + aclocal.m4 \ + config.guess \ + config.h.in \ + config.sub \ + configure \ + ltmain.sh \ + stamp-h.in + +## make rpms +rpm: Makefile + $(MAKE) dist + rpmbuild -ta --clean $(PACKAGE)-$(VERSION).tar.gz + +## make debs +deb: Makefile dist + -chmod -R +w $(PACKAGE)-$(VERSION) + rm -rf $(PACKAGE)-$(VERSION) + tar xzf $(PACKAGE)-$(VERSION).tar.gz + cd $(PACKAGE)-$(VERSION); dpkg-buildpackage -rfakeroot diff --git a/veejay-utils/NEWS b/veejay-utils/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/veejay-utils/README b/veejay-utils/README new file mode 100644 index 00000000..7370bf02 --- /dev/null +++ b/veejay-utils/README @@ -0,0 +1,49 @@ + + + + + 10x0 0x x10x0x10x0x10x 10x0x10x0x10x0 x0x1 x0x1 10x0 x0x1 + 0x10x0 0x0x x10x0x10x0x10x 10x0x10x0x10x0 x0x1 10x0x10x 10x0x1 10x0x1 +0x0x10 0x0x10 x10x 10x0 x0x1 10x0x10x x0x10x 10x0 +0x0x10x0 0x0x10 x10x0x10x0x1 10x0x10x0x10 x0x1 0x10 0x0 x10x0x10 + 0x10x0 x10x0x x10x0x10x0x10x 10x0x10x0x10 x0x1 0x10x0x10x0 x10x0x10 + 10x0x1 x0x10x x10x 10x0 x0x1 0x10x0x10x0 0x0x + x0x10x0x10x0x1 x10x 10x0 x10x x0x1 0x10x0x10x0x10 0x0x + x10x0x10x0 x10x0x10x0x10x 10x0x10x0x10x0 x10x 10x0 0x0x 0x10 0x0x + 0x0x10 x10x0x10x0x10x 10x0x10x0x10x0 0x010x0 0x0x 0x10 0x0x + + + version 1.0 + + :: Veejay Utilities, a collection of commandline programs for veejay :: + http://veejayhq.net + + +Install +======= + +See file 'INSTALL' + +See doc/Howto_Compile.html +See doc/Howto_Compile_on_Ubuntu.html + +Documentation +============= + +man yuv2rawdv +man sayVIMS +man rawdv2yuv + + +Running +======= + +$ veejay -d +$ sayVIMS "600:;" + + +CONTACT / FEEDBACK & HELP +========================= + +http://veejayhq.net + diff --git a/veejay-utils/autogen.sh b/veejay-utils/autogen.sh new file mode 100755 index 00000000..ba7e3840 --- /dev/null +++ b/veejay-utils/autogen.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + + +autoreconf -v -f -i diff --git a/veejay-utils/configure.ac b/veejay-utils/configure.ac new file mode 100644 index 00000000..cec43aa1 --- /dev/null +++ b/veejay-utils/configure.ac @@ -0,0 +1,651 @@ +dnl Process this file with autoconf to produce a configure script. +dnl AC_INIT +AC_INIT([veejay-utils],[1.1],[veejay-users@lists.sourceforge.net]) +AC_PREREQ(2.57) +AC_CONFIG_SRCDIR([src/sayVIMS.c]) + +VEEJAY_MAJOR_VERSION=1 +VEEJAY_MINOR_VERSION=1 +VEEJAY_MICRO_VERSION=0 +VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION +VEEJAY_CODENAME="Veejay Utilities - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" +AC_CONFIG_HEADERS([config.h]) +dnl AX_CONFIG_PREFIXED_HEADER([veejay-config.h], [VEEJAY], [config.h]) + +AC_CANONICAL_HOST +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE([1.7]) +AM_MAINTAINER_MODE +AM_INIT_AUTOMAKE([dist-bzip2]) + +AC_DEFINE(VEEJAYUTIL,1,[Building Veejay Utilities]) +AC_DEFINE(HAVE_CONFIG_H,1,[Include config.h]) +# libtool versioning +LT_RELEASE=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION +LT_CURRENT=$VEEJAY_MICRO_VERSION +LT_REVISION=$VEEJAY_MICRO_VERSION +LT_AGE=$VEEJAY_MICRO_VERSION +AC_SUBST(LT_RELEASE) +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) +dnl ********************************************************************** +dnl Options + + +dnl kill CFLAGS +CFLAGS="" +AC_ARG_ENABLE(strict, + AC_HELP_STRING([--enable-strict], + [Compile in paranoia assertion checking])) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], + [Compile in debugging information])) +AC_ARG_ENABLE(profile, + AC_HELP_STRING([--enable-profiling], + [Compile in profiling information])) +AC_ARG_ENABLE(compile-warnings, + AC_HELP_STRING([--enable-compile-warnings], + [Turn on compiler warnings.])) +AC_ARG_ENABLE(warnings_as_errors, + AC_HELP_STRING([--enable-warnings_as_errors], + [Compiler warnings are errors.])) +AC_ARG_ENABLE(simd-accel, + AC_HELP_STRING([--enable-simd-accel], + [use SIMD multimedia instructions such as MMX, AltiVec, etc.if possible])) +AC_ARG_WITH(extra-cflags, + AC_HELP_STRING([--with-extra-cflags=flags], + [Options to be added to CFLAGS (optional)])) + +AC_GNU_SOURCE + +dnl Initialize libtool +AC_PROG_LIBTOOL + +dnl Checks for programs. +AC_PROG_AWK +AC_PROG_CC +AM_PROG_CC_STDC +AC_PROG_YACC +AM_PROG_LEX +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_LN_S +AC_C_BIGENDIAN +AC_C_CONST +AC_C_INLINE +AC_SYS_LARGEFILE + +dnl configure AS and ASFLAGS... +AM_PROG_AS + +AC_CHECK_HEADERS([fenv.h stdint.h inttypes.h sys/types.h alloca.h]) + +dnl AX_PREFIXED_DEFINE([VEEJAY], [HAVE_STDINT_H]) +dnl AX_PREFIXED_DEFINE([VEEJAY], [HAVE_INTTYPES_H]) + +AC_CHECK_FUNCS([posix_memalign memalign fmax lround pow bzero gettimeofday memset mmap strndup strstr strncasecmp]) +AC_CHECK_FUNCS([sched_get_priority_max]) +AC_CHECK_FUNCS([select socket getpagesize memcpy]) + +AC_CHECK_FUNC(getopt_long, + [AC_DEFINE(HAVE_GETOPT_LONG, 1, [long getopt support])], + [ # FreeBSD and BSD/OS have a gnugetopt library for this: + AC_CHECK_LIB([gnugetopt], [getopt_long], + [AC_DEFINE(HAVE_GETOPT_LONG, 1, + [long getopt support]) + LIBGETOPT_LIB="-lgnugetopt"]) + ]) + +AC_CHECK_SIZEOF([int]) +AC_CHECK_SIZEOF([long int]) +AC_CHECK_SIZEOF([size_t]) +AC_CHECK_SIZEOF([float]) + + + +AC_SUBST(LIBGETOPT_LIB) + +AC_TYPE_SIGNAL + +AC_MSG_NOTICE([The host is $host $host_cpu $host_vendor $host_os .]) + +dnl ********************************************************************* +dnl Test whether we're linux or not. If so, define HAVE_V4L and build the +dnl video4linux/hardware dependent tools. Else, undefine HAVE_V4L +have_v4l=false +have_linux=false +have_darwin=false +use_gveejayreloaded=false +dnl use_gveejay=false +case $host in + *-*-linux*) + AC_CHECK_HEADER(linux/version.h, + [have_linux=true + if test x$with_gveejayreloaded != xno ; then + use_gveejayreloaded=true + fi +dnl if test x$with_gveejay != xno ; then +dnl use_gveejay=true +dnl fi + AC_DEFINE(HAVE_LINUX,,[Linux platform]) + ], + [AC_MSG_ERROR([version.h not found - please install the linux kernel headers]) + ]) + LIBM_LIBS="-lm" + ;; + *-apple-darwin*) + AC_DEFINE(HAVE_DARWIN,,[MAC OS X Darin]) + dnl OS-X/Darwin needs no-cpp-precomp + CFLAGS="$CFLAGS -no-cpp-precomp" + have_darwin=true + LIBM_LIBS="" + ;; + *) + AC_MSG_WARN([Alien platform - Good Luck!]) + LIBM_LIBS="" + ;; +esac + + +dnl ====== check for PKG_CONFIG_PATH +if test x"$PKG_CONFIG_PATH" = x ; then + AC_MSG_NOTICE([The PKG_CONFIG_PATH variable was not set]) + AC_MSG_NOTICE([You should set it to the directories that contain the .pc files]) + AC_MSG_ERROR([Abort]) +fi + + +AC_SUBST(LIBM_LIBS) + + +have_dl_dlopen=false +AC_CHECK_LIB(dl,dlopen) +if test "$ac_cv_lib_dl_dlopen" = "yes"; then + AC_DEFINE(HAVE_DL_DLOPEN,,[Compile with dlopen support]) + have_dl_dlopen=true +fi + + +PKG_CHECK_MODULES( VEEJAY, [veejay >= 1.0], + [ + AC_SUBST( VEEJAY_CFLAGS ) + AC_SUBST( VEEJAY_LIBS ) + have_veejay=true + AC_DEFINE( HAVE_VEEJAY,1, [Veejay Installed])], + [have_veejay=false]) + +if test x$have_veejay != xtrue; then + AC_MSG_ERROR( [Cannot find veejay]) +fi + +dnl ********************************************************************* +dnl Check for mjpegtools +dnl (creates MJPEGYTOOLS_CFLAGS, +dnl ********************************************************************* +have_mjpegtools=false +PKG_CHECK_MODULES(MJPEGTOOLS, [mjpegtools >= 1.6 ], + [ + AC_SUBST( MJPEGTOOLS_CFLAGS ) + AC_SUBST( MJPEGTOOLS_LIBS ) + have_mjpegtools=true + AC_DEFINE(HAVE_MJPEGTOOLS, 1, [MJPEGTools installed])], + [have_mjpegtools=false]) + +if test x$have_mjpegtools != xtrue ; then + AC_MSG_ERROR([Cannot find mjpegtools. Did you set PKG_CONFIG_PATH variable?]) +fi + +dnl Check for libdv +dnl (creates LIBDV_CFLAGS, LIBDV_LIBS; defines HAVE_LIBDV) +dnl ********************************************************************* +have_libdv=false +if test x$with_libdv != xno ; then + PKG_CHECK_MODULES(LIBDV, [libdv >= 0.102], + [have_libdv=true + AC_DEFINE(SUPPORT_READ_DV2, 1, [libdv is present])], + [have_libdv=false]) +fi + +AC_MSG_CHECKING(whether to compile in debugging information) +debugCFLAGS="" +if test "x$enable_debug" = "xyes" ; then + debugCFLAGS="-g" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AC_MSG_CHECKING(whether to compile in profiling information) +if test "x$enable_profiling" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -fprofile-arcs -ftest-coverage" + DEBUGLIBS="-lgcov" + AC_SUBST( DEBUGLIBS ) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AC_MSG_CHECKING(whether to compile in assertion checking) +if test "x$enable_strict" = "xyes" ; then + debugCFLAGS="$debugCFLAGS -DSTRICT_CHECKING" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +dnl ******************************************************************** +dnl Test for MMX support if an IA32 platform. If on a PPC then look for +dnl Altivec support. For the IA32 platform see if gcc understands inline +dnl MMX instructions. +dnl +dnl TODO: host = non intel, target = intel do the checks also? +dnl Remember we are checking that the toolchain can generate the +dnl code, not whether the host can execute the code, thats done +dnl at run time with the exception of the SSE code. + + +have_asm_nasm=false +have_asm_mmx=false +have_asm_sse=false +have_asm_sse2=false +have_asm_mmx2=false +have_asm_3dnow=false +have_cmov=false +have_x86cpu=false +have_x86_64cpu=false +have_altivec=false +have_mips=false +have_ppccpu=false +have_ps2=false + +OP_CFLAGS="" +YUVCFLAGS="-fif-conversion" + +AC_MSG_CHECKING([Architecture]) +case $host_cpu in + i[[3-7]]86) + AC_DEFINE(HAVE_X86CPU,, [Compiling for x86 architecture CPU]) + AC_DEFINE(ARCH_X86,1,[Compiling for x86 architecture]) + have_x86cpu=true + + PROGRAM_NOPIC="-fno-PIC" + + if test "x$enable_debug" != "xyes" ; then + OP_CFLAGS="-O3" + fi + + AC_SUBST( OP_CFLAGS ) + AC_SUBST( YUVCFLAGS ) + + dnl If the host is pentium, align on double word boundary + case $host_cpu in + i686) + CFLAGS="$CFLAGS" + ;; + *) + ;; + esac + + ;; + x86_64*|k8-*) + AC_DEFINE(HAVE_X86_CPU,, [Compiling for x86-64 architecture CPU]) + AC_DEFINE(ARCH_X86_64,1, [Compiling for x86-64 architecture CPU]) + have_x86cpu=true + have_x86_64cpu=true + CFLAGS="$CFLAGS -fPIC -DPIC" + ;; + powerpc | powerpc64) + AC_DEFINE(HAVE_PPCCPU,, [Compiling for PowerPC CPU]) + AC_DEFINE(ARCH_PPC,,[Compiling for PowerPC]) + have_ppccpu=true + + case $host in + *-apple-darwin*) + PROGRAM_NOPIC="-mdynamic-no-pic" # dynamic-no-pic is an Apple gcc option +dnl CFLAGS="$CFLAGS -no-cpp-precomp" + + ;; + *) + PROGRAM_NOPIC="" + ;; + esac + ;; + mips | mipsel) + AC_DEFINE(ARCH_MIPS,,[Compiling for MIPS CPU]) + AC_DEFINE(HAVE_MIPS,,[Compiling for MIPS CPU]) + have_mips=true + AC_MSG_CHECKING([if we are compiling on playstation2 hardware]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], + [[#include + #include + ]])], + [have_ps2=true], + [have_ps2=false]) + + if test x$have_ps2 = xtrue ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PS2,,[Compile for playstation2]) + else + AC_MSG_RESULT(no) + fi + + ;; + *) + AC_MSG_RESULT([unknown]) + ;; +esac + +dnl This flag is used for PROGRAMS not SHARED LIBRARIES. PIC code is required +dnl for shared libraries but is slower than non-pic code. Compute bound +dnl programs such as yuvdenoise and y4mspatialfilter can use this flag by +dnl simply adding programname_CFLAGS=@PROGRAM_NOPIC@ to the Makefile.am + +AC_SUBST(PROGRAM_NOPIC) + +if test x$have_x86cpu = xtrue +then + AC_CACHE_CHECK(for MMX on processor(s), ac_cv_flag_mmx, [ + if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx=yes + else + ac_cv_flag_mmx=no + fi + ]) + + if test $ac_cv_flag_mmx = yes; then + AC_DEFINE(HAVE_ASM_MMX,,[Compiling in MMX support]) + AC_DEFINE(HAVE_MMX,,[Compiling in MMX support]) + have_asm_mmx=true + fi + + AC_CACHE_CHECK(for SSE on processor(s), ac_cv_flag_sse, [ + if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse=yes + else + ac_cv_flag_sse=no + fi + ]) + + if test $ac_cv_flag_sse = yes; then + AC_DEFINE(HAVE_ASM_SSE,,[Compiling in SSE support]) + AC_DEFINE(HAVE_SSE,,[Compiling in SSE support]) + have_asm_sse=true + fi + + + dnl check for sse2 + AC_CACHE_CHECK(for SSE2 on processor(s), ac_cv_flag_sse2, [ + if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then + ac_cv_flag_sse2=yes + else + ac_cv_flag_sse2=no + fi + ]) + + if test $ac_cv_flag_sse2 = yes; then + AC_DEFINE(HAVE_ASM_SSE2,,[Compiling in SSE2 support]) + AC_DEFINE(HAVE_SSE2,,[Compiling in SSE2 support]) + have_asm_sse2=true + fi + + AC_CACHE_CHECK(for 3DNOW on processor(s), ac_cv_flag_3dnow, [ + if grep "^flags.* 3dnow" /proc/cpuinfo > /dev/null; then + ac_cv_flag_3dnow=yes + else + ac_cv_flag_3dnow=no + fi + ]) + + if test $ac_cv_flag_3dnow = yes; then + AC_DEFINE(HAVE_ASM_3DNOW,,[Compiling in 3Dnow]) + have_asm_3dnow=true + fi + + AC_CACHE_CHECK(for CMOV on processor(s), ac_cv_flag_cmov, [ + if grep "^flags.* cmov" /proc/cpuinfo > /dev/null; then + ac_cv_flag_cmov=yes + else + ac_cv_flag_cmov=yes + fi + ]) + + if test $ac_cv_flag_cmov = yes; then + AC_DEFINE(HAVE_CMOV,,[Compiling in CMOV]) + have_cmov=true + fi + + + dnl check for MMX2 + AC_CACHE_CHECK(for MMX2 on processor(s), ac_cv_flag_mmx2, [ + if grep "^flags.* mmxext" /proc/cpuinfo > /dev/null; then + ac_cv_flag_mmx2=yes + else + ac_cv_flag_mmx2=yes + fi + ]) + + if test $ac_cv_flag_mmx2 = yes; then + AC_DEFINE(HAVE_ASM_MMX2,,[Compiling in MMX2]) + AC_DEFINE(HAVE_MMX2,,[Compiling in MMX2]) + AC_DEFINE(HAVE_ASM_MMXEXT,,[Compiling in MMXEXT]) + have_asm_mmx2=true + fi + +fi + +if test x$have_ppccpu = xtrue +then + AC_MSG_CHECKING([compiler support for AltiVec]) + cat > conftest.c < +#endif +int main() { + union { vector signed int v; + signed int i; + } vi; + vi.v = vec_splat_s32(1); + return vi.i; +} +EOF + ALTIVEC_CFLAGS="" + if $CC -o conftest conftest.c >/dev/null 2>&1; then + have_altivec=true + elif $CC $CFLAGS -faltivec -o conftest conftest.c >/dev/null 2>&1; then + # Mac OS X style + have_altivec=true + ALTIVEC_CFLAGS="-faltivec" + elif $CC $CFLAGS -fvec -o conftest conftest.c >/dev/null 2>&1; then + # Motorola style + have_altivec=true + ALTIVEC_CFLAGS="-fvec" + elif $CC $CFLAGS -DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec -o conftest conftest.c >/dev/null 2>&1; then + # gcc 3.1 style + have_altivec=true + ALTIVEC_CFLAGS="-DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec" + fi + rm -f conftest*; + + if test x$have_altivec = xtrue + then + # add -O3 flag + ALTIVEC_CFLAGS="-O3 ${ALTIVEC_CFLAGS}" + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ALTIVEC,, + [Inline PPC Altivec primitives available]) + AC_SUBST(ALTIVEC_CFLAGS) + else + AC_MSG_RESULT(no) + fi + + +fi + +if test ! -r $srcdir/cpuinfo.sh; then + AC_MSG_ERROR([cpuinfo.sh script not found - do a cvs update]) +fi + + +if test x$have_x86cpu = xtrue -o x$have_ppccpu = xtrue; then + if test x$host_alias != x; then + dnl Cross compiling + AC_MSG_CHECKING(sub-architecture settings) + if test x$have_x86cpu = xtrue; then + host_mod_cpu=`echo $host_cpu|tr _ -` + ARCHFLAGS="-march=$host_mod_cpu -mcpu=$host_mod_cpu" + AC_MSG_RESULT($ARCHFLAGS) + fi + else + AC_MSG_CHECKING(sub-architecture settings) + chmod +x $srcdir/cpuinfo.sh + + if test x$have_x86cpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh x86` + fi + if test x$have_ppccpu = xtrue; then + ARCHFLAGS=`$srcdir/cpuinfo.sh ppc` + fi + AC_MSG_RESULT($ARCHFLAGS) + fi +fi + + +if test x$have_x86cpu = xtrue; +then + AC_MSG_NOTICE([enable_debug = $enable_debug]) + if test "x$enable_debug" != "xyes" ; + then + AC_MSG_NOTICE([debug koekje]) + if test $ac_cv_flag_sse = yes; then + CFLAGS="$CFLAGS -msse -mfpmath=sse" + AC_MSG_NOTICE([cflags aangepast]) + fi + if test $av_cv_flag_sse2 = yes; then + CFLAGS="$CFLAGS -msse2 -mfpmath=sse" + AC_MSG_NOTICE([cflags aangepast]) + fi + fi +fi + +AC_MSG_RESULT($CFLAGS) + + +AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED,, + [Defined if building against uninstalled FFmpeg source]) + +dnl ********************************************************************** +dnl All the conditional stuff for the Makefiles +AM_CONDITIONAL(HAVE_ASM_MMX, test x$have_asm_mmx = xtrue) +AM_CONDITIONAL(HAVE_X86CPU, test x$have_x86cpu = xtrue) +AM_CONDITIONAL(HAVE_PPCCPU, test x$have_ppccpu = xtrue) +AM_CONDITIONAL(ARCH_PPC, test x$have_ppccpu = xtrue) +AM_CONDITIONAL(ARCH_X86, test x$have_x86cpu = xtrue) +AM_CONDITIONAL(HAVE_ALTIVEC, test x$have_altivec = xtrue) +AM_CONDITIONAL(HAVE_ASM_MMX2, test x$have_asm_mmx2 = xtrue) +AM_CONDITIONAL(HAVE_ASM_SSE, test x$have_asm_sse = xtrue) +AM_CONDITIONAL(HAVE_ASM_SSE2, test x$have_asm_sse2 = xtrue) +AM_CONDITIONAL(HAVE_ASM_NASM, test x$have_asm_nasm = xtrue) +AM_CONDITIONAL(HAVE_MMX, test x$have_asm_mmx = xtrue) +AM_CONDITIONAL(HAVE_SSE, test x$have_asm_sse = xtrue) +AM_CONDITIONAL(HAVE_SSE2, test x$have_asm_sse2 = xtrue) +AM_CONDITIONAL(HAVE_MMX2, test x$have_asm_mmx2 = xtrue) +AM_CONDITIONAL(SUPPORT_READ_DV2, test x$have_libdv = xtrue) +AM_CONDITIONAL(HAVE_DL_DLOPEN, test x$have_dl_dlopen = xtrue) + +CFLAGS="$ARCHFLAGS $CFLAGS" +CXXFLAGS="$ARCHFLAGS $CXXFLAGS" + + +if test "x${GCC}" != "xyes" ; then + enable_compile_warnings=no +fi + +AC_MSG_CHECKING(what warning flags to pass to the C compiler) +warnCFLAGS= +warnCXXFLAGS= +if test "x$enable_compile_warnings" != "xno" ; then + if test "x$GCC" = "xyes" ; then + case "$CFLAGS" in + *-Wall*) ;; + *) warnCFLAGS="-Wall -Wunused " ;; + esac + if test "x$enable_compile_warnings" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wundef -Wshadow -Wbad-function-cast -Wconversion -Wpadded -Wunreachable-code -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" + fi + if test "x$enable_warnings_as_errors" = "xyes" ; then + warnCFLAGS="$warnCFLAGS -Werror" + warnCXXFLAGS="$warnCXXFLAGS -Werror" + fi + fi +fi + +if test "x$cflags_set" != "xyes" ; then + if test "x$enable_debug" = "xyes" ; then + CFLAGS="$debugCFLAGS $warnCFLAGS $CFLAGS" + else + CFLAGS="$CFLAGS $warnCFLAGS" + fi + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS" + cflags_set=yes +fi + + +if test x"$with_extra_cflags" != "x"; then + CFLAGS="$CFLAGS $with_extra_cflags" + CXXFLAGS="$CXXFLAGS $with_extra_cflags" +fi + + +AC_CONFIG_FILES([ +Makefile +man/Makefile +src/Makefile +]) +AC_OUTPUT + +AC_DEFINE(VERSION, ${VERSION}) + +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Veejay-Utilities ${VERSION} build configuration :]) +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Compiler flags: $CFLAGS]) +AC_MSG_NOTICE([ $YUVCFLAGS]) +AC_MSG_NOTICE([ $OP_CFLAGS]) +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Architecture: ${host_cpu} ]) +AC_MSG_NOTICE([]) +if test "$have_x86cpu" = "true" ; then +AC_MSG_NOTICE([ x86 ]) +AC_MSG_NOTICE([ MMX enabled : ${ac_cv_flag_mmx}]) +AC_MSG_NOTICE([ MMX2 enabled : ${ac_cv_flag_mmx2}]) +AC_MSG_NOTICE([ SSE enabled : ${ac_cv_flag_sse}]) +AC_MSG_NOTICE([ SSE2 enabled : ${ac_cv_flag_sse2}]) +AC_MSG_NOTICE([ 3DNOW enabled : ${ac_cv_flag_3dnow}]) +AC_MSG_NOTICE([ CMOV enabled : ${ac_cv_flag_cmov}]) +fi + +if test "$have_ppccpu" = "true" ; then +AC_MSG_NOTICE([ ppc]) +AC_MSG_NOTICE([ AltiVec enabled : ${have_altivec}]) +fi + +if test "$have_mips" = "true" ; then +AC_MSG_NOTICE([ mips]) +AC_MSG_NOTICE([ PS/2 enabled : ${have_ps2}]) +fi +AC_MSG_NOTICE([]) +if test "$have_linux" = "true" ; then +AC_MSG_NOTICE([ Platform: Linux]) +fi + +if test "$have_darwin" = "true" ; then +AC_MSG_NOTICE([ Platform: Darwin]) +AC_MSG_NOTICE([ Good luck! You can be the first! ]) +fi + +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([ Required dependencies:]) +AC_MSG_NOTICE([ - Veejay : ${have_veejay}]) +AC_MSG_NOTICE([ - POSIX Threads (pthread) : ${have_pthread}]) +AC_MSG_NOTICE([ - MJPEGTools : ${have_mjpegtools}]) + diff --git a/veejay-utils/cpuinfo.sh b/veejay-utils/cpuinfo.sh new file mode 100755 index 00000000..6bd7c205 --- /dev/null +++ b/veejay-utils/cpuinfo.sh @@ -0,0 +1,326 @@ +#!/bin/sh + +if test x"$CC" = x; then + CC=gcc +fi + +if test $# -ne 1; then + echo "Please give the arch (ppc or x86) as an argument!" 1>&2 + exit 1 +fi + +if test `uname -s` = Darwin; then + IsDarwin=yes +else + IsDarwin=no +fi + +target=$1 + +cc_version=`$CC -dumpversion` +_cc_major=`echo $cc_version | cut -d'.' -f1` +_cc_minor=`echo $cc_version | cut -d'.' -f2` + +if test $_cc_major -ge 4; then + _opt_mcpu="-mtune" +else + _opt_mcpu="-mcpu" +fi + +do_cc() +{ + $CC -o conftest conftest.c $@ >/dev/null 2>&1 +} + +extcheck() +{ +cat > conftest.c < +void catch() { exit(1); } +int main(void){ + signal(SIGILL, catch); + __asm__ __volatile__ ("$1":::"memory"); + exit(0); +} +EOF + +do_cc +if test -x ./conftest; then + ./conftest + if test $? -ne 0; then + return 1 + fi + return 0 +else + return 1 +fi +} + +do_x86() +{ +if test -r /proc/cpuinfo; then + _cpuinfo="cat /proc/cpuinfo" +else + $CC -o cpuinfo utils/cpuinfo.c + _cpuinfo="./cpuinfo" +fi + +# Cpu determination logic adapted from the MPlayer configure script. + +pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -n 1` +pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pfamily=`$_cpuinfo | grep 'cpu family' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pstep=`$_cpuinfo | grep 'stepping' | cut -d':' -f2 | cut -d' ' -f2 | head -n 1` +pparam=`$_cpuinfo | grep 'features' | cut -d':' -f2 | head -n 1` + +if test -z "$pparam" ; then + pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | head -n 1` +fi + +_mmx=no +_3dnow=no +_3dnowex=no +_mmx2=no +_sse=no +_sse2=no +_mtrr=no + +for i in $pparam ; do + case "$i" in + 3dnow) _3dnow=yes ;; + 3dnowext) _3dnow=yes _3dnowex=yes ;; + mmx) _mmx=yes ;; + mmxext) _mmx2=yes ;; + mtrr|k6_mtrr|cyrix_arr) _mtrr=yes ;; + xmm|sse|kni) _sse=yes _mmx2=yes ;; + sse2) _sse2=yes ;; + esac +done + +case "$pvendor" in + AuthenticAMD) + case "$pfamily" in + 3)proc=i386 + ;; + 4) proc=i486 + ;; + 5) iproc=586 + # models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3 + # K6 model 13 are the K6-2+ and K6-III+ + if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then + proc=k6-3 + elif test "$pmodel" -ge 8; then + proc=k6-2 + elif test "$pmodel" -ge 6; then + proc=k6 + else + proc=i586 + fi + ;; + 6) iproc=686 + if test "$pmodel" -ge 7; then + proc=athlon-4 + elif test "$pmodel" -ge 6; then + if test "$_sse" = yes && test "$pstep" -ge 2; then + proc=athlon-xp + else + proc=athlon-4 + fi + elif test "$pmodel" -ge 4; then + proc=athlon-tbird + else + proc=athlon + fi + ;; + 15) + # Despite what the gcc into says 'athlon64' is not accepted as + # synonym for 'k8' + proc=k8 + ;; + *) proc=athlon-xp + ;; + esac + ;; + GenuineIntel) + case "$pfamily" in + 3) proc=i386 + ;; + 4) proc=i486 + ;; + 5) iproc=586 + if test "$pmodel" -eq 4 || test "$pmodel" -eq 8; then + proc=pentium-mmx # 4 is desktop, 8 is mobile + else + proc=i586 + fi + ;; + 6) iproc=686 + if test "$pmodel" -ge 7; then + proc=pentium3 + elif test "$pmodel" -ge 3; then + proc=pentium2 + else + proc=i686 + fi + ;; + 15) proc=pentium4 + ;; + *) proc=pentium4 + ;; + esac + ;; + unknown) + case "$pfamily" in + 3) proc=i386 + ;; + 4) proc=i486 + ;; + *) proc=i586 + ;; + esac + ;; + *) + proc=i586 + ;; +esac + +# check that gcc supports our CPU, if not, fall back to earlier ones + +cat > conftest.c << EOF +int main(void) { return 0; } +EOF +if test "$proc" = "athlon64" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=athlon-xp +fi + +if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" || test "$proc" = "athlon-tbird"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=athlon +fi + +if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=k6 +fi + +if test "$proc" = "k6"; then + do_cc -march=$proc $_opt_mcpu=$proc + if test $? -ne 0; then + if do_cc -march=i586 $_opt_mcpu=i686; then + proc=i586-i686 + else + proc=i586 + fi + fi +fi + +if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i686 +fi +if test "$proc" = "i686" || test "$proc" = "pentium-mmx"; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i586 +fi +if test "$proc" = "i586" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i486 +fi +if test "$proc" = "i486" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=i386 +fi +if test "$proc" = "i386" ; then + do_cc -march=$proc $_opt_mcpu=$proc || proc=error +fi +if test "$proc" = "error" ; then + echo "Your $_cc does not even support \"i386\" for '-march' and $_opt_mcpu." + _mcpu="" + _march="" +elif test "$proc" = "i586-i686"; then + _march="-march=i586" + _mcpu="$_opt_mcpu=i686" +else + _march="-march=$proc" + _mcpu="$_opt_mcpu=$proc" +fi + +if test $_cc_major -ge 3; then + extcheck "xorps %%xmm0, %%xmm0" || _gcc3_ext="$_gcc3_ext -mno-sse" + extcheck "xorpd %%xmm0, %%xmm0" || _gcc3_ext="$_gcc3_ext -mno-sse2" + + if test x"$_gcc3_ext" != "x"; then + # if we had to disable sse/sse2 because the active kernel does not + # support this instruction set extension, we also have to tell + # gcc3 to not generate sse/sse2 instructions for normal C code + cat > conftest.c << EOF +int main(void) { return 0; } +EOF + do_cc $_march $_gcc3_ext && _march="$_march $_gcc3_ext" + fi +fi + +echo $_march $_mcpu +rm -f conftest.c conftest cpuinfo +return 0 +} + +do_ppc() +{ +# Linux on a PPC has /proc/info +# Darwin (OS/X) has the hostinfo command +# If neither of those we have no idea what to do - so do nothing. +if test -r /proc/cpuinfo; then + proc=`grep cpu /proc/cpuinfo | cut -d':' -f2 | cut -d',' -f1 | cut -b 2- | head -n 1` +elif test $IsDarwin = yes; then + proc=`hostinfo | grep "Processor type" | cut -f3 -d' ' | sed 's/ppc//'` +else + return 0 +fi + +case "$proc" in + 601) _march="$_opt_mcpu=601" _mcpu='-mtune=601' + ;; + 603) _march="$_opt_mcpu=603" _mcpu='-mtune=603' + ;; + 603e|603ev) _march="$_opt_mcpu=603e" _mcpu='-mtune=603e' + ;; + 604|604e|604r|604ev) _march="$_opt_mcpu=604" _mcpu='-mtune=604' + ;; + 740|740/750|745/755) _march="$_opt_mcpu=740" _mcpu='-mtune=740' + ;; + 750|750CX) _march="$_opt_mcpu=750" _mcpu='-mtune=750' + ;; + *) ;; +esac + +# gcc 3.1(.1) and up supports 7400 and 7450 +if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" || test "$_cc_major" -ge "4"; then + case "$proc" in + 7400*|7410*) _march="$_opt_mcpu=7400" _mcpu='-mtune=7400' ;; + 7450*|7455*) _march="$_opt_mcpu=7450" _mcpu='-mtune=7450' ;; + *) ;; + esac +fi + +# gcc 3.2 and up supports 970 +if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then + case "$proc" in + 970*) if test $IsDarwin = yes; then + _march="$_opt_mcpu=G5 -mpowerpc64 -mpowerpc-gpopt -falign-loops=16 -force_cpusubtype_ALL" _mcpu='-mtune=G5' + else + _march="$_opt_mcpu=970" _mcpu='-mtune=970' + fi + ;; + *) ;; + esac +fi + +echo $_march $_mcpu +return 0 +} + +# +# The script that runs the various functions above +# + +if test $target = x86; then + do_x86 +elif test $target = ppc; then + do_ppc +fi diff --git a/veejay-utils/man/Makefile.am b/veejay-utils/man/Makefile.am new file mode 100644 index 00000000..d86a739c --- /dev/null +++ b/veejay-utils/man/Makefile.am @@ -0,0 +1,3 @@ +man_MANS = yuv2rawdv.1 rawdv2yuv.1 sayVIMS.1 +EXTRA_DIST = $(man_MANS) +MAINTAINERCLEANFILES = Makefile.in diff --git a/veejay-utils/man/rawdv2yuv.1 b/veejay-utils/man/rawdv2yuv.1 new file mode 100644 index 00000000..53247392 --- /dev/null +++ b/veejay-utils/man/rawdv2yuv.1 @@ -0,0 +1,58 @@ +.TH "rawdv2yuv" 1 +.SH NAME +rawdv2yuv decodes a rawdv stream from stdin to yuv I420/YV12 and +writes it to stdout. +.SH SYNOPSIS +.B rawdv2yuv [options] +.SH DESCRIPTION +.B rawdv2yuv +rawdv2yuv is a simple I420/YV12 encoder that has some additional +parameters to produce a half sized I420/YV12 frame. The motivation +for this option is to be able to quickly downscale a full PAL/NTSC +frame. + +This program expects input from STDIN and writes a Y4M stream +to STDOUT. + +.SH OPTIONS +The command line options allow to specify its behaviour +.TP +.B \-x +Swap cb/cr channels to produce IV12 (default is I420) +.TP +.B \-n [01] +Norm to use for rawdv input, 0 = NTSC , 1 = PAL (default is PAL) +.TP +.B \-h +Output half sized YV12/I420 frame (default is no downscaling) +.TP +.B \-c +Clip width by a multiple of 8 +.TP +.B \-q +Set rawdv quality to FASTEST (monochrome). Default is BEST. +.TP +.B \-v [012] +Try to be silent or verbose +.SH USEFULL EXAMPLES +.TP +.B dvgrab --format rawdv - |rawdv2yuv -h -c 8 | yuvplay +This commands grabs rawdv and pipes it trough rawdv2yuv +to produce a 352x288 y4m stream. Full PAL is 720x576, +the -h option produces 360x288 and -c clips off 8 pixels +from the frame width. +.TP +.B cat rawdv_file.dv | rawdv2yuv -n 1 > i420_stream.y4m +Converts a NTSC rawdv file to a 720x480 y4m frame (I420) +.SH BUGS +see BUGS in the source package +.SH AUTHOR +This man page was written by Niels Elburg. +If you have questions, remarks or you just want to +contact the developers, the main mailing list for this +project is: +.I veejay-users@lists.sourceforge.net +For more info see the website at +.I http://veejay.sourceforge.net +.SH "SEE ALSO" +.B veejay yuv2rawdv rawdv2yuv sendVIMS diff --git a/veejay-utils/man/sayVIMS.1 b/veejay-utils/man/sayVIMS.1 new file mode 100644 index 00000000..aa096bc0 --- /dev/null +++ b/veejay-utils/man/sayVIMS.1 @@ -0,0 +1,78 @@ +.TH "sayVIMS" 1 +.SH NAME +sayVIMS - sends VIMS messages to veejay +.SH SYNOPSIS +.B sayVIMS [options] [filename] +.SH DESCRIPTION +.B sayVIMS +is a simple program to send VIMS messages to veejay. + +.SH OPTIONS +The command line options allow to specify its behaviour +.TP +.B \-p [3490] +Veejay port to connect to +.TP +.B \-h [localhost] +Veejay host to connect to +.TP +.B \-f [filename] +Use a filename instead of strings on the commandline +.TP +.B \-g [multicast address] +Multicast address to send to +.TP +.B \-i +Start in interactive mode (use ? to get help) +.TP +.B \-c +Start with colored text (geek feature) + +.SH USEFULL EXAMPLES +.TP +.B sayVIMS -h localhost -p 3490 "255:;" +Start sayVIMS and connect to veejay (and tell veejay to quit) +.TP +.B sayVIMS -g 224.0.0.50 -p 5000 "255:;" +Ditto, for multicast. +.TP +.SH Message Format +A message is described as +.B :; +.TP +For example: +.B 099:1 0; +.TP +The selector is a 3 digit number identifying some atomic function in veejay. The colon is used to indicate the start of the list of arguments. The semicolon denotes the end of message. +.TP +.SH Passing arguments +Each of veejay's functions except an ordered argument list ; depending on the +In case of messages clips, streams or effect chain some values refer to defaults or current: +.TP +.B 0 for current clip/stream +.TP +.B -1 for last clip/stream +.TP +.B > 0 any clip/stream number +.TP +.B -1 for current chain entry +.TP +.B >= 0 < 20 any chain entry + + +.SH BUGS +see BUGS in the source package +.SH AUTHOR +This man page was written by Niels Elburg. +If you have questions, remarks or you just want to +contact the developers, the main mailing list for this +project is: +.I veejay-users@lists.sourceforge.net +For more info see the website at +.I http://veejay.sourceforge.net +.SH HISTORY +This tool was first named 'sendVIMS' , but it +confused to much with 'sendVIMS for PD' although +the latter is derived from this one. +.SH "SEE ALSO" +.B veejay yuv2rawdv rawdv2yuv diff --git a/veejay-utils/man/yuv2rawdv.1 b/veejay-utils/man/yuv2rawdv.1 new file mode 100644 index 00000000..b5431cd5 --- /dev/null +++ b/veejay-utils/man/yuv2rawdv.1 @@ -0,0 +1,47 @@ +.TH "yuv2rawdv" 1 +.SH NAME +yuv2rawdv - encodes raw YCbCr (YUV 4:2:0) into a raw DV stream +.SH SYNOPSIS +.B yuv2rawdv [options] +.SH DESCRIPTION +.B yuv2rawdv +is a simple RAW DV encoder for raw YUV 4:2:0 frame streams. It +converts the YUV 4:2:0 to YUV 4:2:2 and encodes it using the Quasar +DV Codec + +This program expects input from STDIN and writes a raw DV stream +to STDOUT. + +.SH OPTIONS +The command line options allow to specify its behaviour +.TP +.B \-c [01] +Clamp luma (default 0=no) When enabled this will clamp the Luminance +channel to a range of 16-235. +.TP +.B \-l [01] +Clamp chroma (default 0=no) When enabled this will clamp the Chrominance +channels to a range of 16-240 +.TP +.B \-v [01] +Try to be silent or verbose +.SH USEFULL EXAMPLES +.TP +.B cat yuv4mpeg_file | yuv2rawdv | playdv +You can encode a yuv4mpeg stream from veejay through this program +and encode it to DV while watching the resulting video with playdv +.TP +.B cat yuv4mpeg_file | yuv2rawdv > raw_dv_stream.dv +Encode a yuv4mpeg stream to raw dv format into a file +.SH BUGS +see BUGS in the source package +.SH AUTHOR +This man page was written by Niels Elburg. +If you have questions, remarks or you just want to +contact the developers, the main mailing list for this +project is: +.I veejay-users@lists.sourceforge.net +For more info see the website at +.I http://veejay.sourceforge.net +.SH "SEE ALSO" +.B veejay yuv2rawdv rawdv2yuv sendVIMS diff --git a/veejay-utils/src/Makefile.am b/veejay-utils/src/Makefile.am new file mode 100644 index 00000000..eb7cfa44 --- /dev/null +++ b/veejay-utils/src/Makefile.am @@ -0,0 +1,24 @@ +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = -I$(top_srcdir) \ + -I$(includedir) $(MJPEGTOOLS_CFLAGS) $(VEEJAY_CFLAGS) $(GLIB_CFLAGS) + +yuv2rawdv_SOURCES = yuv2rawdv.c +yuv2rawdv_LDFLAGS = $(LIBDV_LIBS) $(LAV_ALL_LIB_OPTS) +yuv2rawdv_LDADD = $(VEEJAY_LIBS) $(MJPEGTOOLS_LIBS) @LIBGETOPT_LIB@ +rawdv2yuv_SOURCES = rawdv2yuv.c +rawdv2yuv_LDFLAGS = $(LIBDV_LIBS) $(LAV_ALL_LIB_OPTS) +rawdv2yuv_LDADD = $(VEEJAY_LIBS) $(MJPEGTOOLS_LIBS) @LIBGETOPT_LIB@ +any2yuv_SOURCES = any2yuv.c +any2yuv_LDFLAGS = $(LAV_ALL_LIB_OPTS) +any2yuv_LDADD = $(VEEJAY_LIBS) $(MJPEGTOOLS_LIBS) @LIBGETOPT_LIB@ +sayVIMS_SOURCES = sayVIMS.c +sayVIMS_LDFLAGS = $(LAV_ALL_LIB_OPTS) +sayVIMS_LDADD = $(VEEJAY_LIBS) @LIBGETOPT_LIB@ + +YUV2RAWDV_BIN = yuv2rawdv rawdv2yuv any2yuv sayVIMS + +bin_PROGRAMS = \ + $(YUV2RAWDV_BIN) + + diff --git a/veejay-utils/src/any2yuv.c b/veejay-utils/src/any2yuv.c new file mode 100644 index 00000000..8c5aa671 --- /dev/null +++ b/veejay-utils/src/any2yuv.c @@ -0,0 +1,235 @@ +/* + * any2yuv - read anything to yuv + * + * (C) Niels Elburg 2003 + * + * 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. + */ + + +#include +#include +#include +#ifndef HAVE_STDINT_H +#define HAVE_STDINT_H +#endif + +#include +#include +#include "mjpeg_logging.h" +#include "yuv4mpeg.h" +#include + +#define NTSC_W 720 +#define NTSC_H 480 +#define PAL_W 720 +#define PAL_H 576 + +static int got_sigint = 0; +static uint8_t *raw_in[3]; /* decoder buffer */ +static uint8_t *yuv[3]; /* yuv destination buffer */ + +static int width = 352; +static int height = 288; +static int swap = 0; /* dont swap cb/cr by default */ +static int verbose = 1; /* level 1 verbosity by default */ +static int PAL=1; /* use PAL by default */ + +static int input_len; /* length of dv input len */ + +static double fps = 25.0; /* PAL framerate */ + + +static void usage(void) +{ + fprintf(stderr, + "This program reads anything from stdin and puts YV12/I420 to stdout\n" + "Usage: any2yuv [params]\n" + "where possible params are:\n" + " -v num Verbosity [0..2] (default 1)\n" + " -x Swap Cb/Cr channels to produce IV12 (default is I420)\n" + " -n num Norm to use: 0 = NTSC, 1 = PAL (default 1)\n" + ); + exit(0); +} + +static void sigint_handler (int signal) { + + mjpeg_debug( "Caught SIGINT, exiting..."); + got_sigint = 1; + +} + +static void allocate_mem() { + + raw_in[0] = (uint8_t*)malloc(width * height * sizeof(uint8_t) * 3); + yuv[0] = (uint8_t*)malloc( sizeof(uint8_t) * width * height ); + yuv[1] = (uint8_t*)malloc( sizeof(uint8_t) * (width * height)/4 ); + yuv[2] = (uint8_t*)malloc( sizeof(uint8_t) * (width * height)/4 ); + + memset(raw_in[0],0,width*height*3); + memset(yuv[0],16,width*height); + + memset(yuv[1],128,(width*height)/4); + memset(yuv[2],128,(width*height)/4); +} + +static void free_mem() { + if(raw_in[0]) free(raw_in[0]); + if(yuv[1]) free(yuv[1]); + if(yuv[2]) free(yuv[2]); +} + +static void set_options(int argc, char *argv[]) { + int n; + while ((n = getopt(argc, argv, "v:sn:w:h:f:")) != -1) { + switch (n) { + case 'v': + verbose = atoi(optarg); + if (verbose < 0 || verbose > 2) { + mjpeg_error( "-v option requires arg 0, 1, or 2"); + usage(); + } + break; + case 's': + swap = 1; + break; + case 'n': + PAL = atoi(optarg); + if(PAL <0 || PAL > 1) { + mjpeg_error("-n option requires arg 0 or 1"); + usage(); + } + break; + case 'w': + width = atoi(optarg); + break; + case 'h': + height = atoi(optarg); + break; + case 'f': + fps = (double) atof(optarg); + + break; + default: + usage(); + exit(1); + } + } + +} + +int main(int argc, char *argv[] ) { + int frame; + int fd_in; + int fd_out; + int res; + y4m_frame_info_t frameinfo; + y4m_stream_info_t streaminfo; + int error = 0; + uint8_t *raw; + + + set_options(argc,argv); + + (void)mjpeg_default_handler_verbosity(verbose); + + fd_in = 0; /* stdin */ + fd_out = 1; /* stdout */ + + + allocate_mem(); + + /* setup the y4m stream */ + y4m_init_stream_info(&streaminfo); + y4m_init_frame_info(&frameinfo); + + y4m_si_set_width( &streaminfo, width); + y4m_si_set_height( &streaminfo,height); + y4m_si_set_interlace( &streaminfo, 0); + + if (y4m_write_stream_header(fd_out, &streaminfo) != Y4M_OK) { + mjpeg_error( "Couldn't write YUV4MPEG header!"); + exit (1); + } + + /* setup interrupt handler */ + signal (SIGINT, sigint_handler); + + /* be verbosive */ + if(verbose) { + mjpeg_info("width: %d",width); + mjpeg_info("height: %d",height); + } + + /* first frame */ + frame = 0; + raw = raw_in[0]; + /* start processing */ + while ( (!got_sigint) && !error) { + int skip = 0; + res = read( fd_in ,raw,(width*height*2)); + if( res != (width*height*2)) { + if(res <= 0) { + error = 1; /* error */ + skip = 1; + } + else { /* try to read the rest of the frame */ + int bytes=0; + int bytes_left = (width*height*2)- res; + while(bytes_left) { + bytes = read(fd_in,raw+res, bytes_left); + if(bytes <= 0) { error = 1; break; } + bytes_left -= bytes; + } + } + } + + if(!skip) { + int i,j=0; + for(i=0; i < (width*height); i++) { + yuv[0][i] = raw[i]; + j++; + } + for(i=0; i < (width*height)/4; i++) { + yuv[1][i] = raw[j]; + yuv[2][i] = raw[j++]; + } + + if ( y4m_write_frame( fd_out,&streaminfo,&frameinfo, yuv)!=Y4M_OK) { + mjpeg_warn("Error writing frame"); + } + else { + if(verbose) mjpeg_info("Writing frame %d",frame); + } + + + } + + frame++; + + } + + if(verbose) mjpeg_info("Wrote %d frames",frame); + + y4m_fini_stream_info(&streaminfo); + y4m_fini_frame_info(&frameinfo); + + + free_mem(); + + return 0; +} + diff --git a/veejay-utils/src/rawdv2yuv.c b/veejay-utils/src/rawdv2yuv.c new file mode 100644 index 00000000..d15fba3a --- /dev/null +++ b/veejay-utils/src/rawdv2yuv.c @@ -0,0 +1,540 @@ +/* + * yuv2rawdv - write rawdv data stream from stdin to stdout + * + * (C) Niels Elburg 2003 + * + * 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. + */ + +#include +#include + +#ifdef SUPPORT_READ_DV2 + +#ifndef HAVE_STDINT_H +#define HAVE_STDINT_H +#endif + +#include +#include +#include "mjpeg_logging.h" +#include "yuv4mpeg.h" +#include +#include + +#define NTSC_W 720 +#define NTSC_H 480 +#define PAL_W 720 +#define PAL_H 576 +#define DV_PAL_SIZE 144000 +#define DV_NTSC_SIZE 120000 + +static int got_sigint = 0; +static uint8_t *dv_in[3]; /* decoder buffer */ +static uint8_t *yuv[3]; /* yuv destination buffer */ +static uint8_t input_buf[144008]; /* buffer containing raw dv data */ +static uint8_t *half[3]; /* half size yuv destination buffer */ + +static int width; +static int height; +static int swap = 0; /* dont swap cb/cr by default */ +static int clip = 0; /* no clipping by default */ +static int verbose = 1; /* level 1 verbosity by default */ +static int PAL=1; /* use PAL by default */ +static int quality=0; /* use best quality by default */ + +static dv_decoder_t *decoder; /* dv decoder */ + +static int input_len; /* length of dv input len */ +static int half_size = 0; +static int half_width; +static int half_height; + +static double fps = 25.0; /* PAL framerate */ + + +static void yuv_clip(uint8_t *input[3], uint8_t *output[3], int w, int h) { + unsigned int uv_len = (w*h)>>2; + unsigned int len = (w*h)>>2; + int uv = clip>>1; + unsigned int r,c; + uint8_t *Y_out = output[0]; + uint8_t *Y_in = input[0]; + uint8_t *Cr_in = input[2]; + uint8_t *Cr_out = output[2]; + uint8_t *Cb_out = output[1]; + uint8_t *Cb_in = input[1]; + unsigned int nw = w >> 1; + unsigned int nh = h >> 1; + + memcpy( Y_in, Y_out, len); + memcpy( Cb_in, Cb_out, uv_len); + memcpy( Cr_in, Cr_out, uv_len); + + + /* Luminance */ + for(r=0; r < (nw*nh)+(nw-clip); r+=nw) { + for(c=0; c < nw-clip; c++) { + *(Y_out)++ = Y_in[r+c]; + } + } + /* Chroma Cb */ + nw = (w>>2); + nh = (h>>2); + for(r=0; r < (nw*nh)+(nw-uv); r+=nw) { + for(c=0; c < nw-uv; c++) { + *(Cb_out)++ = Cb_in[r+c]; + } + } + /* Chroma Cr */ + nw = (w>>2); + nh = (h>>2); + uv = clip>>1; + for(r=0; r < (nw*nh)+(nw-uv); r+=nw) { + for(c=0; c < nw-uv; c++) { + *(Cr_out)++ = Cr_in[r+c]; + } + } +} + +static void yuv_resize(uint8_t *input[3], uint8_t *output[3], int w, int h) { + int len = (w * h); + int r,c; + int sw = w * 2; + int i=0; + uint8_t p1,p2,p3,p4,ps; + uint8_t *Y_out = output[0]; + uint8_t *Y_in = input[0]; + uint8_t *Cb_out = output[1]; + uint8_t *Cb_in = input[1]; + uint8_t *Cr_out = output[2]; + uint8_t *Cr_in = input[2]; + /* Luminance */ + for(r=w; r < len+w; r+= sw) { + for(c=0; c < w; c+=2) { + p1 = Y_in[r+c]; /* center */ + p2 = Y_in[r+c+1]; /* west */ + p3 = Y_in[r-w+c+1]; /* north west */ + p4 = Y_in[r-w+c]; /* north */ + + /* clip pixels to valid range */ + if(p1 < 16) p1 = 16; else if (p1 > 240) p1 = 240; + if(p2 < 16) p2 = 16; else if (p2 > 240) p2 = 240; + if(p3 < 16) p3 = 16; else if (p3 > 240) p3 = 240; + if(p4 < 16) p4 = 16; else if (p4 > 240) p4 = 240; + + + /* look at neighbours to determine brightest value */ + if (p1 < p2 && p1 < p3) + ps = ( p2 + p3 ) >> 1; + else + if( ( p1 < p3 ) && (p1 < p4) ) + ps = ( p3 + p4 ) >> 1; + if( ( p1 < p4 ) && ( p1 < p2) ) + ps = ( p2 + p4 ) >> 1; + else /* average 4 pixels and divide by 4 */ + ps = ( p1 + p2 + p3 + p4 ) >> 2; + + /* store pixel */ + *(Y_out)++ = ps; + + } + } + + /* Chroma Cb */ + + len = len >> 1; + sw = w * 2; + + for(r=w; r < len+w; r+= sw) { + for(c=0; c < w; c+=2) { + p1 = Cb_in[r+c]; /* center */ + p2 = Cb_in[r+c+1]; /* west */ + p3 = Cb_in[r-w+c+1]; /* north west */ + p4 = Cb_in[r-w+c]; /* north */ + + /* clip pixels to valid range */ + if(p1 < 16) p1 = 16; else if (p1 > 235) p1 = 235; + if(p2 < 16) p2 = 16; else if (p2 > 235) p2 = 235; + if(p3 < 16) p3 = 16; else if (p3 > 235) p3 = 235; + if(p4 < 16) p4 = 16; else if (p4 > 235) p4 = 235; + /* look at neighbours to determine better value */ + if (p1 < p2 && p1 < p3) + ps = ( p2 + p3 ) >> 1; + else + if( ( p1 < p3 ) && (p1 < p4) ) + ps = ( p3 + p4 ) >> 1; + if( ( p1 < p4 ) && ( p1 < p2) ) + ps = ( p2 + p4 ) >> 1; + else /* average 4 pixels and divide by 4 */ + ps = ( p1 + p2 + p3 + p4 ) >> 2; + + *(Cb_out)++ = ps; + + } + } + + /* Chroma Cr */ + + len = len >> 1; + sw = w * 2; + + for(r=w; r < len+w; r+= sw) { + for(c=0; c < w; c += 2) { + p1 = Cr_in[r+c]; /* center */ + p2 = Cr_in[r+c+1]; /* west */ + p3 = Cr_in[r-w+c+1]; /* north west */ + p4 = Cr_in[r-w+c]; /* north */ + + /* clip pixels to valid range */ + if(p1 < 16) p1 = 16; else if (p1 > 235) p1 = 235; + if(p2 < 16) p2 = 16; else if (p2 > 235) p2 = 235; + if(p3 < 16) p3 = 16; else if (p3 > 235) p3 = 235; + if(p4 < 16) p4 = 16; else if (p4 > 235) p4 = 235; + /* look at neighbours to determine better value */ + if (p1 < p2 && p1 < p3) + ps = ( p2 + p3 ) >> 1; + else + if( ( p1 < p3 ) && (p1 < p4) ) + ps = ( p3 + p4 ) >> 1; + if( ( p1 < p4 ) && ( p1 < p2) ) + ps = ( p2 + p4 ) >> 1; + else /* average 4 pixels and divide by 4 */ + ps = ( p1 + p2 + p3 + p4 ) >> 2; + + *(Cr_out)++ = ps; + + } + } + +} + +/* convert 4:2:2 to IV12 ,swap u v to get 4:2:0 */ +static void yuy2toyv12(uint8_t * _y, uint8_t * _u, uint8_t * _v, uint8_t * input, + int width, int height) +{ + int i, j, w2; + uint8_t *y, *u, *v; + w2 = width / 2; + y = _y; + v = _v; + u = _u; + for (i = 0; i < height; i += 2) { + for (j = 0; j < w2; j++) { + /* packed YUV 422 is: Y[i] U[i] Y[i+1] V[i] */ + *(y++) = *(input++); + *(u++) = *(input++); + *(y++) = *(input++); + *(v++) = *(input++); + } + //down sampling + for (j = 0; j < w2; j++) { + *(y++) = *(input++); *(input++); + *(y++) = *(input++); *(input++); + } + } +} + + +static void usage(void) +{ + fprintf(stderr, + "This program reads a raw DV stream from stdin and puts YV12/I420 to stdout\n" + "Usage: rawdv2yuv [params]\n" + "where possible params are:\n" + " -v num Verbosity [0..2] (default 1)\n" + " -x Swap Cb/Cr channels to produce IV12 (default is I420)\n" + " -n num Norm to use: 0 = NTSC, 1 = PAL (default 1)\n" + " -q DV quality to fastest (Monochrome)\n" + " -h Output Half frame size\n" + " -c num clip off rows of frame (for use with -h)\n" + " must be a multiple of 8\n" + ); + exit(0); +} + +static void sigint_handler (int signal) { + + mjpeg_debug( "Caught SIGINT, exiting..."); + got_sigint = 1; + +} + +static void allocate_mem() { + + dv_in[0] = (uint8_t*)malloc(width * height * sizeof(uint8_t) * 4); + dv_in[1] = NULL; + dv_in[2] = NULL; + yuv[0] = (uint8_t*)malloc( sizeof(uint8_t) * width * height ); + yuv[1] = (uint8_t*)malloc( sizeof(uint8_t) * (width * height)/2 ); + yuv[2] = (uint8_t*)malloc( sizeof(uint8_t) * (width * height)/2 ); + + half[0] = (uint8_t*)malloc( sizeof(uint8_t) * (half_width * half_height) ); + half[1] = (uint8_t*)malloc( sizeof(uint8_t) * (half_width * half_height) ); + half[2] = (uint8_t*)malloc( sizeof(uint8_t) * (half_width * half_height) ); + + memset(dv_in[0],0,width*height*4); + memset(yuv[0],0,width*height); + memset(half[0],0,half_width * half_height); + memset(input_buf,0,input_len); + + memset(yuv[1],0,(width*height)/2); + memset(half[1],0,(half_width * half_height)); + + memset(yuv[1],0,(width*height)/2); + memset(half[0],0,(half_width * half_height)); +} + +static void free_mem() { + if(dv_in[0]) free(dv_in[0]); + if(yuv[0]) free(yuv[0]); + if(yuv[1]) free(yuv[1]); + if(yuv[2]) free(yuv[2]); + if(half[0]) free(half[0]); + if(half[1]) free(half[1]); + if(half[2]) free(half[2]); +} + +static void set_options(int argc, char *argv[]) { + int n; + while ((n = getopt(argc, argv, "v:sqhn:c:")) != -1) { + switch (n) { + case 'v': + verbose = atoi(optarg); + if (verbose < 0 || verbose > 2) { + mjpeg_error( "-v option requires arg 0, 1, or 2"); + usage(); + } + break; + case 's': + swap = 1; + break; + case 'n': + PAL = atoi(optarg); + if(PAL <0 || PAL > 1) { + mjpeg_error("-n option requires arg 0 or 1"); + usage(); + } + break; + case 'q': + quality = 1; + break; + case 'h': + half_size = 1; + break; + case 'c': + clip = atoi(optarg); + if(clip < 0) { + mjpeg_error("That does not make sense"); + usage(); + } + break; + default: + usage(); + exit(1); + } + } + +} + +int main(int argc, char *argv[] ) { + int frame; + int fd_in; + int fd_out; + int res; + y4m_frame_info_t frameinfo; + y4m_stream_info_t streaminfo; + int pitches[3]; + int error = 0; + + set_options(argc,argv); + + if(PAL) { + width = PAL_W; + height = PAL_H; + input_len = 144000; + } + else { + width = NTSC_W; + height = NTSC_H; + input_len = 120000; + } + + (void)mjpeg_default_handler_verbosity(verbose); + + fd_in = 0; /* stdin */ + fd_out = 1; /* stdout */ + + + half_width = width >> 1; + half_height = height >> 1; + + allocate_mem(); + + /* setup the dv decoder */ + decoder = dv_decoder_new(1,1,0); + decoder->quality = (quality==0 ? DV_QUALITY_BEST : DV_QUALITY_FASTEST); + + /* setup the y4m stream */ + y4m_init_stream_info(&streaminfo); + y4m_init_frame_info(&frameinfo); + + y4m_si_set_width( &streaminfo, (half_size==1 ? half_width-clip: width)); + y4m_si_set_height( &streaminfo,(half_size==1 ? half_height: height)); + y4m_si_set_interlace( &streaminfo, 0); + + if (y4m_write_stream_header(fd_out, &streaminfo) != Y4M_OK) { + mjpeg_error( "Couldn't write YUV4MPEG header!"); + exit (1); + } + + if( height == PAL_H && width == PAL_W) { + mjpeg_info("Video is PAL, dimensions are %d x %d\n",width,height); + } + else if(height == NTSC_H && width == NTSC_W) { + mjpeg_info("Video is NTSC, dimensions are %d x %d\n", width,height); + } + else { + mjpeg_error("Error: Video is not PAL or NTSC.\n"); + exit(1); + } + if(half_size) { + mjpeg_info("Resizing to %d x %d\n",half_width-clip,half_height); + } + + /* setup interrupt handler */ + signal (SIGINT, sigint_handler); + + /* be verbosive */ + if(verbose) { + mjpeg_info("width: %d",width); + mjpeg_info("height: %d",height); + mjpeg_info("norm: %s", (PAL ? "PAL" : "NTSC")); + mjpeg_info("%s", (swap ? "IV12" : "I420")); + } + + /* first frame */ + frame = 0; + + /* try to read first frame of raw stream to extract dv header */ + if(read(fd_in,input_buf,input_len) <= 0) { + mjpeg_warn("Error reading first frame\n"); + } + + if(dv_parse_header(decoder, input_buf) < 0) mjpeg_warn("Error parsing dv header"); + + /* set the format */ + if(dv_format_wide(decoder)) { + mjpeg_warn("format 16:9"); + } + + if(dv_format_normal(decoder)) { + mjpeg_warn("format 4:3"); + } + + if (decoder->sampling == e_dv_sample_411 || + decoder->sampling == e_dv_sample_422 || + decoder->sampling == e_dv_sample_420) { + + pitches[0] = width * 2; + pitches[1] = 0; + pitches[2] = 0; + } + + + /* start processing */ + while ( (!got_sigint) && !error) { + int skip = 0; + res = read(fd_in, input_buf,input_len); + if( res !=input_len) { + if(res <= 0) { + error = 1; /* error */ + skip = 1; + } + else { /* try to read the rest of the frame */ + int bytes=0; + int bytes_left = input_len - res; + while(bytes_left) { + bytes = read(fd_in,input_buf+res, bytes_left); + if(bytes <= 0) { error = 1; break; } + bytes_left -= bytes; + } + } + } + + //dv_parse_header(decoder,input_buf); + + if(!skip) { + dv_decode_full_frame( decoder, input_buf, + e_dv_color_yuv, dv_in, pitches); + + if(!swap) + yuy2toyv12(yuv[0],yuv[1], yuv[2], dv_in[0], width, height); + else + yuy2toyv12(yuv[0],yuv[2],yuv[1],dv_in[0],width,height); + + if(half_size) { + yuv_resize(yuv,half,width,height); + if(clip) yuv_clip(yuv, half,width,height); + if ( y4m_write_frame( fd_out,&streaminfo,&frameinfo, half)!=Y4M_OK) { + mjpeg_warn("Error writing frame"); + } + } + else { + if ( y4m_write_frame( fd_out,&streaminfo,&frameinfo, yuv)!=Y4M_OK) { + mjpeg_warn("Error writing frame"); + } + else { + if(verbose) mjpeg_info("Writing frame %d",frame); + } + + } + + } + + frame++; + + } + + if(verbose) mjpeg_info("Wrote %d frames",frame); + + /* free the dv decoder */ + dv_decoder_free(decoder); + + /* finalize the y4m stream */ + y4m_fini_stream_info(&streaminfo); + y4m_fini_frame_info(&frameinfo); + + + free_mem(); + + return 0; +} + +#else + +int main(int argc, char *argv[]) +{ + mjpeg_error("%s requires libdv, get it from http://libdv.sourceforge.net and recompile veejay's tools",argv[0]); + return 1; +} + +#endif + +/* + + + +*/ diff --git a/veejay-utils/src/sayVIMS.c b/veejay-utils/src/sayVIMS.c new file mode 100644 index 00000000..84fe20ce --- /dev/null +++ b/veejay-utils/src/sayVIMS.c @@ -0,0 +1,256 @@ +/* sendVIMS - very simple client for VeeJay + * (C) 2002-2004 Niels Elburg + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +static int interactive = 0; +static int port_num = 3490; +static char *filename = NULL; +static char *group_name = NULL; +static char *host_name = NULL; +static vj_client *sayvims = NULL; +static int colors = 0; +static int fd_in = 0; // stdin +static int single_msg = 0; +static int dump = 0; + +/* count played frames (delay) */ +static void vj_flush(int frames) { + int n = 0; + char status[100]; + bzero(status,100); + + while(frames>0) { + if( vj_client_poll(sayvims, V_STATUS )) + { + char sta_len[6]; + bzero(sta_len, 6 ); + int nb = vj_client_read( sayvims, V_STATUS, sta_len, 5 ); + if(sta_len[0] == 'V' ) + { + int bytes = 0; + sscanf( sta_len + 1, "%03d", &bytes ); + if(bytes > 0 ) + { + bzero(status, 100); + int n = vj_client_read(sayvims,V_STATUS,status,bytes); + if( n ) + { + if(dump) fprintf(stdout , "%s\n", status ); + frames -- ; + } + if(n == -1) + { + fprintf(stderr, "Error reading status from Veejay\n"); + exit(0); + } + } + } + } + } +} + +static void Usage(char *progname) +{ + fprintf(stderr, "Usage: %s [options] [messages]\n",progname); + fprintf(stderr, "where options are:\n"); + fprintf(stderr, " -p\t\tVeejay port (3490)\n"); + fprintf(stderr, " -g\t\tVeejay groupname (224.0.0.31)\n"); + fprintf(stderr, " -h\t\tVeejay hostname (localhost)\n"); + fprintf(stderr, " -m\t\tSend single message\n"); + fprintf(stderr, " -c\t\tColored output\n"); + fprintf(stderr, " -d\t\tDump status to stdout\n"); + fprintf(stderr, "Messages to send to veejay must be wrapped in quotes\n"); + fprintf(stderr, "You can send multiple messages by seperating them with a whitespace\n"); + fprintf(stderr, "Example: %s \"600:;\"\n",progname); + fprintf(stderr, " (quit veejay)\n"); + fprintf(stderr, "Example: echo \"%03d:;\" | %s \n", VIMS_QUIT, progname); + fprintf(stderr, "\n"); + fprintf(stderr, "Example: sayVIMS -h 192.168.100.12 -m \"600:;\"\n"); +} + +static int set_option(const char *name, char *value) +{ + int err = 0; + if(strcmp(name, "h") == 0 ) + { + host_name = strdup(optarg); + if(group_name) err ++; + } + else if(strcmp(name, "g") == 0) + { + if(host_name) err ++; + group_name = strdup( optarg ); + } + else if (strcmp(name, "p") == 0) + { + port_num = atoi(optarg); + } + else if (strcmp(name, "i") == 0) + { + interactive = 1; + } + else if (strcmp(name, "c") == 0) + { + colors = 1; + } + else if (strcmp(name, "m") == 0 ) + { + single_msg = 1; + } + else if(strcmp(name, "d") == 0) + { + dump = 1; + } + else err++; + + return err; +} + +vj_client *sayvims_connect(void) +{ + vj_client *client = vj_client_alloc( 0,0,0 ); + if(!client) + { + fprintf(stderr, "Memory allocation error\n"); + return NULL; + } + + if(host_name == NULL) + host_name = strdup( "localhost" ); + + if(!vj_client_connect( client, host_name,group_name, port_num )) + { + fprintf(stderr,"Unable to connect to %s:%d\n", host_name, port_num ); + return NULL; + } + + return client; +} + +int main(int argc, char *argv[]) +{ + int i; + int n = 0; + int x = 0; + int k =0; + char msg[20]; + char option[2]; + char ibuf[1024]; + int err = 0; + FILE *infile; + + veejay_set_debug_level(0); + + // parse commandline parameters + while( ( n = getopt(argc,argv, "h:g:p:micd")) != EOF) + { + sprintf(option,"%c",n); + err += set_option( option,optarg); + } + + if( err || optind > argc) + { + Usage( argv[0] ); + return -1; + } + + sayvims = sayvims_connect(); + if(!sayvims) + return -1; + + if(single_msg || interactive ) + { + char **msg = argv + optind; + int nmsg = argc - optind; + i=0; + while( i < nmsg ) + { + if(msg[i][0] == '+') + { + int delay = 1; + char *tmp = msg[i]; + if(sscanf(tmp + 1, "%d",&delay) == 1 ) + { + vj_flush(delay); + } + else + { + fprintf(stderr, "Fatal: error parsing %s\n", tmp ); + return -1; + } + } + else + { + int n = vj_client_send( sayvims,V_CMD, msg[i] ); + vj_flush(1); + } + i++; + } + } + else + { + /* read from stdin*/ + int not_done = 1; + infile = fdopen( fd_in, "r" ); + if(!infile) + { + fprintf(stderr, "Cannot read from STDIN\n"); + return 0; + } + char buf[128]; + while( fgets(buf, 100, infile) ) + { + if( buf[0] == '+' ) + { + int wait_ = 1; + + if(sscanf( buf+1, "%d", &wait_ ) ) + { + vj_flush( wait_ ); + } + else + { + fprintf(stderr,"Delay not valid: '%d'\n", wait_ ); + } + } + else + { + vj_client_send( sayvims, V_CMD, buf ); + vj_flush(1); + } + } + } + + vj_client_close(sayvims); + vj_client_free(sayvims); + + return 0; +} diff --git a/veejay-utils/src/sequenc.c b/veejay-utils/src/sequenc.c new file mode 100644 index 00000000..30b682d4 --- /dev/null +++ b/veejay-utils/src/sequenc.c @@ -0,0 +1,364 @@ +#include +#include +#include +#include +#include + +#define DATA_ERROR 0 +#define DATA_DONE 1 +#define RETRIEVING_DATA 2 +#define DATA_READY 3 + +typedef struct +{ + GThread *thread; + gchar *hostname; + gint port_num; + gint active; + vj_client *fd; + gchar status_buffer[100]; + guchar *data_buffers[2]; + int data_status[2]; + gint frame_num; + gint width; + gint height; + glong time_out; // in microseconds + GCond *cond; + GMutex *mutex; +} veejay_sequence_t; + + // 3 second timeout +static int veejay_ipc_send( veejay_sequence_t *v, + int vims_id, const char format[], ... ) +{ + gchar block[255]; + gchar tmp[255]; + va_list args; + + if( format == NULL ) + { + g_snprintf( block, sizeof(block)-1, "%03d:;", vims_id ); + gint n = vj_client_send( v->fd, V_CMD, block ); + if( n <= 0 ) + return 0; + return n; + } + + va_start( args, format ); + vsnprintf( tmp, sizeof(tmp)-1, format, args ); + g_snprintf( block,sizeof(block)-1, "%03d:%s;", vims_id, tmp ); + va_end( args ); + + gint n = vj_client_send( v->fd, V_CMD, block ); + if( n <= 0 ) + return 0; + + return n; +} +/* +int veejay_sequence_send( void *data , int vims_id, const char format[], ... ) +{ + + g_mutex_lock( v->data ); + gint ret = 0; + gchar block[255]; + gchar tmp[255]; + va_list args; + + if( format == NULL ) + { + g_snprintf( block, sizeof(block)-1, "%03d:;", vims_id ); + ret = vj_client_send( v->fd, V_CMD, block ); + } + else + { + va_start( args, format ); + vsnprintf( tmp, sizeof(tmp)-1, format, args ); + g_snprintf( block,sizeof(block)-1, "%03d:%s;", vims_id, tmp ); + va_end( args ); + + ret = vj_client_send( v->fd, V_CMD, block ); + } + g_mutex_unlock( v->data ); + return ret; +}*/ + +static int veejay_ipc_recv( veejay_sequence_t *v, gint header_len, gint *payload, guchar *buffer ) +{ + gint tmp_len = header_len + 1; + gchar tmp[tmp_len]; + gint len = 0; + bzero( tmp, tmp_len ); + + gint n = vj_client_read( v->fd, V_CMD, tmp, header_len ); + + if( n<= 0 ) + return 0; + + if( sscanf( tmp, "%6d", &len )<=0) + return 0; + + if( len <= 0 ) + return 0; + + + gint bw = 0; + gint bytes_read = len; + guchar *buf_ptr = buffer; + + *payload = 0; + + while( bw < len ) + { + n = vj_client_read( v->fd, V_CMD, buf_ptr, bytes_read ); + if ( n <= 0 ) + return 0; + + bw += n; + + bytes_read -= n; + buf_ptr += bw; + } + + *payload = bw; + + return 1; +} + +static int veejay_process_status( veejay_sequence_t *v ) +{ + gchar status_len[6]; + bzero( status_len, 6 ); + + + gint nb = vj_client_read( v->fd, V_STATUS, status_len, 5 ); + if( status_len[0] == 'V' ) + { + gint bytes = 0; + sscanf( status_len + 1, "%03d", &bytes ); + if( bytes > 0 ) + { + bzero( v->status_buffer, 100 ); + gint n = vj_client_read( v->fd, V_STATUS, v->status_buffer, bytes ); + if( n <= 0 ) + return 0; + printf( "'%s'\n", v->status_buffer ); + return 1; + } + } + assert(0); + return 0; +} + + +static int veejay_get_image_data(veejay_sequence_t *v ) +{ + gint res = veejay_ipc_send( v, VIMS_RGB24_IMAGE, "%d %d", v->width,v->height ); + if( res <= 0 ) + return 0; + gint bw = 0; + + res = veejay_ipc_recv( v, 6, &bw, v->data_buffers[v->frame_num] ); + if( res <= 0 ) + return 0; + return bw; +} + +int veejay_get_image( void *data, guchar *pixels) +{ + veejay_sequence_t *v = (veejay_sequence_t*) data; + gint ret = 0; + g_mutex_lock( v->mutex ); + GTimeVal time_val; + + g_get_current_time( &time_val ); + g_time_val_add( &time_val, v->time_out ); + + while( v->data_status[v->frame_num] == RETRIEVING_DATA ) + { + if(!g_cond_timed_wait( v->cond, v->mutex, &time_val )) + { // timeout ! + v->data_status[v->frame_num] = DATA_ERROR; + g_mutex_unlock(v->mutex); + return ret; + } + } + if( v->data_status[v->frame_num] == DATA_READY ) + { + ret = 1; + v->data_status[v->frame_num] = DATA_DONE; + } + if( v->data_status[v->frame_num] == DATA_ERROR ) + { + ret = -1; + } + g_mutex_unlock( v->mutex ); + return ret; +} + +void veejay_configure_sequence( void *data, gint w, gint h ) +{ + veejay_sequence_t *v = (veejay_sequence_t*) data; + g_mutex_lock( v->mutex ); + + while( v->data_status[v->frame_num] == RETRIEVING_DATA ) + g_cond_wait( v->cond, v->mutex ); + + if( v->data_status[v->frame_num] == DATA_READY || v->data_status[v->frame_num] == DATA_DONE ) + { + v->width = w; + v->height = h; + } + + g_mutex_unlock( v->mutex ); +} + + +static int veejay_process_data( veejay_sequence_t *v ) +{ + gint ret = 0; + g_mutex_lock( v->mutex ); + + if( v->width <= 0 || v->height <= 0 ) + { + g_mutex_unlock( v->mutex ); + return 1; + } + + if(v->data_status[v->frame_num] == DATA_READY) + { + v->data_status[v->frame_num] = DATA_DONE; + } + if(v->data_status[v->frame_num] == DATA_DONE ) + { + v->data_status[v->frame_num] = RETRIEVING_DATA; + ret = veejay_get_image_data( v ); + if(ret) + v->data_status[v->frame_num] = DATA_READY; + else + v->data_status[v->frame_num] = DATA_ERROR; + + g_cond_signal( v->cond ); + } + g_mutex_unlock( v->mutex ); + + return ret; +} + + +void *veejay_sequence_thread(gpointer data) +{ + veejay_sequence_t *v = (veejay_sequence_t*) data; + + for ( ;; ) + { + if( vj_client_poll( v->fd, V_STATUS )) + { + if( veejay_process_status( v ) == 0 ) + { + printf("Status line terminated\n"); + return NULL; + } + if ( veejay_process_data( v ) == 0 ) + { + printf("Command line terminated\n"); + return NULL; + } + } + } + return NULL; +} + + +void *veejay_sequence_init(int port, char *hostname, gint max_width, gint max_height) +{ + GError *err = NULL; + veejay_sequence_t *v = (veejay_sequence_t*) malloc(sizeof( veejay_sequence_t )); + memset( v, 0, sizeof(veejay_sequence_t)); + + v->hostname = strdup( hostname ); + v->port_num = port; + v->data_buffers[0] = (guchar*) malloc(sizeof(guchar) * max_width * max_height * 3 ); + v->data_buffers[1] = (guchar*) malloc(sizeof(guchar) * max_width * max_height * 3 ); + v->fd = vj_client_alloc(0,0,0); + if(!vj_client_connect( v->fd, v->hostname, NULL,v->port_num ) ) + { + vj_client_free( v->fd ); + printf("Error while connecting.\n"); + if( v->hostname ) free(v->hostname ); + if( v ) free (v); + return NULL; + } + + v->data_status[0] = DATA_DONE; + v->data_status[1] = DATA_DONE; + v->time_out = 1000000 * 3; // 3 second timeout + v->frame_num = 0; + v->mutex = g_mutex_new(); + v->cond = g_cond_new(); + v->thread = g_thread_create( + (GThreadFunc) veejay_sequence_thread, + (gpointer*) v, + TRUE, + &err ); + if(!v->thread) + { + printf("%s\n", err->message ); + if(v) free(v); + return NULL; + } + + return v; +} + +void veejay_sequence_free( void *data ) +{ + veejay_sequence_t *v = (veejay_sequence_t*) data; + + g_thread_join( v->thread ); + g_cond_free( v->cond ); + g_mutex_free( v->mutex ); + vj_client_close( v->fd ); + + if( v->hostname ) + free(v->hostname ); + if( v->data_buffers[0] ) + free( v->data_buffers[0] ); + if( v->data_buffers[1] ) + free( v->data_buffers[1] ); + + free(v); + v = NULL; +} + + +int main(int argc, char *argv[]) +{ + + if(!g_thread_supported()) + { + g_thread_init(NULL); + } + + void *v = veejay_sequence_init( 3490, "localhost",512,512 ); + if(!v) + return 0; + void *v2 = veejay_sequence_init( 4490, "localhost",512,512 ); + if(!v2) + return 0; + + while(1) + { + if( veejay_get_image(v,NULL) > 0 ) + { + printf("grabbed frame 3490\n"); + } + if( veejay_get_image(v2,NULL) > 0) + { + printf("grabbed frame 4490\n"); + } + } + veejay_sequence_free( v ); + veejay_sequence_free( v2 ); + return 1; +} diff --git a/veejay-utils/src/sequence.h b/veejay-utils/src/sequence.h new file mode 100644 index 00000000..854d14d2 --- /dev/null +++ b/veejay-utils/src/sequence.h @@ -0,0 +1,8 @@ +int veejay_get_image( void *data , guchar *pixels); + +void *veejay_sequence_init(int port, char *hostname, gint w, gint h); + +void veejay_configure_sequence( void *data, gint w, gint h ); + +void veejay_sequence_free( void *data ); + diff --git a/veejay-utils/src/yuv2rawdv.c b/veejay-utils/src/yuv2rawdv.c new file mode 100644 index 00000000..b65dc009 --- /dev/null +++ b/veejay-utils/src/yuv2rawdv.c @@ -0,0 +1,254 @@ +/* + * yuv2rawdv - write rawdv data stream from stdin to stdout + * + * (C) Niels Elburg 2003 + * + * 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. + */ +#ifndef HAVE_STDINT_H +#define HAVE_STDINT_H +#endif +#include +#ifdef SUPPORT_READ_DV2 +#include +#include +#include "mjpeg_logging.h" +#include "yuv4mpeg.h" +#include +#include +#define NTSC_W 720 +#define NTSC_H 480 +#define PAL_W 720 +#define PAL_H 576 +#define DV_PAL_SIZE 144000 +#define DV_NTSC_SIZE 120000 + +static int got_sigint = 0; +static int verbose = 1; +static uint8_t *yuv_in[3]; /* yuv frame from stdin */ +static uint8_t *yuv422; /* yuv 4:2:2 buffer for encoding to dv */ +static uint8_t *output_buf; /* buffer containing rawdv data */ +static int width; +static int height; +static dv_encoder_t *encoder; /* dv decoder */ +static int clamp_chroma = 0; +static int clamp_luma = 0; +static int ntsc_setup = 0; + +/* convert 4:2:0 to yuv 4:2:2 + derived from Kino's ExtractYUV (src/frame.cc) +*/ +static void convert_yuv420p_to_yuv422() { + unsigned int x,y; + unsigned int i=0; + + for(y=0; y < height; ++y) { + uint8_t *Y = yuv_in[0] + y * width; + uint8_t *Cb = yuv_in[1] + (y/2) * (width/2); + uint8_t *Cr = yuv_in[2] + (y/2) * (width/2); + for(x=0; x < width; x+=2) { + *(yuv422+i) = Y[0]; + *(yuv422+i+1) = Cb[0]; + *(yuv422+i+2) = Y[1]; + *(yuv422+i+3) = Cr[0]; + i+=4; + Y += 2; + ++Cb; + ++Cr; + } + } +} + +/* make a yuv422 frame and give it to the DV encoder */ +static void encode_yuv420_to_dv(uint8_t *outbuf) { + static uint8_t *pixels[3]; /* pointers */ + time_t now = time(NULL); /* time */ + + + convert_yuv420p_to_yuv422(); /* conversion */ + + pixels[0] = (uint8_t*) yuv422; + if(encoder->isPAL) { + pixels[2] = (uint8_t*)yuv422 + (PAL_W * PAL_H); + pixels[1] = (uint8_t*)yuv422 + (PAL_W * PAL_H*5)/4; + } + else { + pixels[2] = (uint8_t*)yuv422 + (NTSC_W * NTSC_H); + pixels[1] = (uint8_t*)yuv422 + (NTSC_W * NTSC_H * 5)/4; + } + + dv_encode_full_frame(encoder, pixels, e_dv_color_yuv, output_buf); + dv_encode_metadata(output_buf, encoder->isPAL, encoder->is16x9, &now, 0); + dv_encode_timecode(output_buf, encoder->isPAL, 0); + +} + + +void usage(void) +{ + fprintf(stderr, + "This program reads a YUV4MPEG stream and puts RAW DV to stdout\n" + "Usage: yuv2rawdv [params]\n" + "where possible params are:\n" + " -v num Verbosity [0..2] (default 1)\n" + " -l num Clamp Luma (default 0)\n" + " -c num Clamp Chroma (default 0) \n" + ); +} + +void sigint_handler (int signal) { + + mjpeg_debug( "Caught SIGINT, exiting..."); + got_sigint = 1; + +} + +int main(int argc, char *argv[]) +{ + int frame; + int fd_in; + int fd_out; + int n; + int output_len; /* length of buffer, either 144000 or 120000 */ + int bytes_written = 0; + y4m_frame_info_t frameinfo; + y4m_stream_info_t streaminfo; + + + + while ((n = getopt(argc, argv, "v:l:c:")) != -1) { + switch (n) { + case 'v': + verbose = atoi(optarg); + if (verbose < 0 || verbose > 2) { + mjpeg_error( "-v option requires arg 0, 1, or 2"); + usage(); + } + break; + case 'l': + clamp_luma = atoi(optarg); + if(clamp_luma < 0 || clamp_luma > 1) { + mjpeg_error("-l option requires arg 0 or 1"); + usage(); + } + break; + case 'c': + clamp_chroma = atoi(optarg); + if(clamp_chroma < 0 || clamp_chroma > 1) { + mjpeg_error("-c option requires arg 0 or 1"); + usage(); + } + break; + default: + usage(); + exit(1); + } + } + + (void)mjpeg_default_handler_verbosity(verbose); + + fd_in = 0; /* stdin */ + fd_out = 1; + + y4m_init_stream_info(&streaminfo); + y4m_init_frame_info(&frameinfo); + + if (y4m_read_stream_header(fd_in, &streaminfo) != Y4M_OK) { + mjpeg_error( "Couldn't read YUV4MPEG header!"); + exit (1); + } + + width = y4m_si_get_width(&streaminfo); + height = y4m_si_get_height(&streaminfo); + + if( height == PAL_H && width == PAL_W) { + mjpeg_info("Video is PAL, dimensions are %d x %d\n",width,height); + } + else if(height == NTSC_H && width == NTSC_W) { + mjpeg_info("Video is NTSC, dimensions are %d x %d\n", width,height); + ntsc_setup = 1; + } + else { + mjpeg_error("Error: Video is not PAL or NTSC.\n"); + exit(1); + } + + encoder = dv_encoder_new(ntsc_setup,clamp_luma,clamp_chroma); + encoder->isPAL = ( height == PAL_H ? 1: 0); + encoder->is16x9 = FALSE; + encoder->vlc_encode_passes = 3; + encoder->static_qno = 0; + encoder->force_dct = DV_DCT_AUTO; + + if(encoder->isPAL) { + output_len = 144000; /* PAL size */ + } + else { + output_len = 120000; /* NTSC size */ + } + + yuv_in[0] = (uint8_t*)malloc(width * height * sizeof(uint8_t)); + yuv_in[1] = (uint8_t*)malloc(width * height * sizeof(uint8_t)); + yuv_in[2] = (uint8_t*)malloc(width * height * sizeof(uint8_t)); + yuv422 = (uint8_t*)malloc( sizeof(uint8_t) * 4 * width * height ); + output_buf = (uint8_t*) malloc(sizeof(uint8_t) * output_len); + + + signal (SIGINT, sigint_handler); + + if(verbose) { + mjpeg_info("width: %d",width); + mjpeg_info("height: %d",height); + mjpeg_info("norm: %s", (encoder->isPAL ? "PAL" : "NTSC")); + mjpeg_info("clamp luma: %s", clamp_luma ? "yes" : "no"); + mjpeg_info("clamp chroma: %s", clamp_chroma ? "yes" : "no"); + } + + frame = 0; + while (y4m_read_frame(fd_in, &streaminfo, &frameinfo, yuv_in)==Y4M_OK && (!got_sigint)) { + + encode_yuv420_to_dv(output_buf); + + frame++; + + bytes_written = write( fd_out, output_buf, output_len); + if(verbose) mjpeg_info ("Raw DV frame %d len = %d\r", frame,bytes_written); + if(bytes_written != output_len) { + mjpeg_warn("Unable to write Full frame. (%d out of %d bytes)\n", + bytes_written,output_len); + } + } + + + /* clean up */ + for (n=0; n<3; n++) { + free(yuv_in[n]); + } + free(output_buf); + free(yuv422); + + y4m_fini_frame_info(&frameinfo); + y4m_fini_stream_info(&streaminfo); + + return 0; +} +#else + +int main(int argc, char *argv[]) +{ + printf("yuv2rawdv needs libdv\n"); + return 0; +} +#endif